Skip to content

Commit

Permalink
Merge pull request #2231 from ATIX-AG/fix_debian_packaging
Browse files Browse the repository at this point in the history
Fix debian packaging
  • Loading branch information
cnsnyder authored Mar 25, 2020
2 parents 1ecb904 + 072e111 commit f69fd6c
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 54 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ more consistent and easy experience.
In order to build, develop, and test locally, please follow
[instructions at candlepinproject.org](http://www.candlepinproject.org/docs/subscription-manager/installation.html#installation-of-upstream-from-source-code).

For instructions on building the debian-packages of this project, see instructions in contrib/debian/README.source.

Due to unintuitive behavior with `sys.path`
(see https://github.com/asottile/scratch/wiki/PythonPathSadness),
`python src/subscription_manager/scripts/subscription_manager.py` does not work
Expand Down
47 changes: 44 additions & 3 deletions contrib/debian/README.source
Original file line number Diff line number Diff line change
@@ -1,10 +1,51 @@
subscription-manager for Debian
------------------------------

<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>
Required packages for build
---------------------------

* build-essentials
* devscripts (for dch)
* equivs (for mk-build-deps)


-- Matthias Dellweg <[email protected]> Wed, 06 Dec 2017 13:49:53 +0100
Steps before build
------------------

Copy debian-directory into the source root

cp -r contrib/debian .

Adapt package-version (new version)..

dch -v <new-version>

..or just increase release-number

dch -i


Install dependencies
--------------------

Create and install meta-package that pulls in the required build-dependencies:

mk-build-deps debian/control
apt install ./subscription-manager-build-deps-*.deb

The apt is able to install local deb-packages starting with version 1.1


Build package
-------------

Build the binary package (the resulting package files can be found in the parent-directory of the source-root-directory):

dpkg-buildpackage -b

For additional information about debian package building please refer to the debian developer manuals (https://www.debian.org/doc/devel-manuals).

Debian packaging manuals can also be installed locally through debian packages (e.g. 'debian-policy')

-- Markus Bucher <[email protected]> Tue, 24 Mar 2020 14:37:36 +0100

4 changes: 2 additions & 2 deletions contrib/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Source: subscription-manager
Section: unknown
Priority: optional
Maintainer: Matthias Dellweg <[email protected]>
#Build-Depends: debhelper (>= 9), dh-python, libglib2.0-dev, libdbus-glib-1-dev, libgtk2.0-dev, libglib2.0-dev, libgconf2-dev, libnotify-dev, lsb-release, pkg-config, python-all, python-setuptools, python3-all, python3-setuptools, intltool, python-dbus, python3-dbus, python-kitchen, python3-kitchen, python-flake8, python3-flake8, python-freezegun, python3-freezegun, python-polib, python3-polib, python-coverage, python3-coverage, python-dev, python3-dev
Build-Depends: debhelper (>= 9), dh-python, libglib2.0-dev, libdbus-glib-1-dev, libgtk2.0-dev, libglib2.0-dev, libgconf2-dev, libnotify-dev, lsb-release, pkg-config, python-all, python-setuptools, intltool, python-dbus, python-kitchen, python-flake8, python-freezegun, python-polib, python-coverage, python-dev
#Build-Depends: debhelper (>= 9), dh-python, libglib2.0-dev, libdbus-glib-1-dev, libgtk2.0-dev, libglib2.0-dev, libgconf2-dev, libnotify-dev, lsb-release, pkg-config, python-all, python-setuptools, python3-all, python3-setuptools, intltool, python-dbus, python3-dbus, python-kitchen, python3-kitchen, python-flake8, python3-flake8, python-freezegun, python3-freezegun, python-polib, python3-polib, python-coverage, python3-coverage, python-dev, python3-dev, libssl-dev
Build-Depends: debhelper (>= 9), dh-python, libglib2.0-dev, libdbus-glib-1-dev, libgtk2.0-dev, libglib2.0-dev, libgconf2-dev, libnotify-dev, lsb-release, pkg-config, python-all, python-setuptools, intltool, python-dbus, python-kitchen, python-flake8, python-freezegun, python-polib, python-coverage, python-dev, libssl-dev
Standards-Version: 3.9.8
Homepage: https://github.com/candlepin/subscription-manager
X-Python-Version: >= 2.6
Expand Down
2 changes: 0 additions & 2 deletions contrib/debian/python-subscription-manager-doc.substvars

This file was deleted.

7 changes: 0 additions & 7 deletions contrib/debian/python-subscription-manager.postinst.debhelper

This file was deleted.

12 changes: 0 additions & 12 deletions contrib/debian/python-subscription-manager.prerm.debhelper

This file was deleted.

5 changes: 0 additions & 5 deletions contrib/debian/python-subscription-manager.substvars

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions contrib/debian/python3-subscription-manager.prerm.debhelper

This file was deleted.

5 changes: 0 additions & 5 deletions contrib/debian/python3-subscription-manager.substvars

This file was deleted.

2 changes: 1 addition & 1 deletion contrib/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ override_dh_auto_build:

override_dh_auto_install:
make -f Makefile install GTK_VERSION=2 OS_DIST=debian PREFIX=/usr DESTDIR=debian/python-subscription-manager
sed -i -e '/dbus-python/d' debian/python-subscription-manager/usr/lib/python2.7/site-packages/subscription_manager-1.25.1-py2.7.egg-info/requires.txt
sed -i -e '/dbus-python/d' debian/python-subscription-manager/usr/lib/python2.7/site-packages/subscription_manager-*.egg-info/requires.txt
sed -i 's/libexec/lib\/$(DEB_HOST_MULTIARCH)/g' debian/python-subscription-manager/etc/cron.daily/rhsmd

override_dh_auto_test:
Expand Down

0 comments on commit f69fd6c

Please sign in to comment.