Debian Client Support in Foreman/Katello

after successful installation, im getting below error.

File “/usr/lib/apt/methods/katello”, line 31
from future import print_function
SyntaxError: from future imports must occur at the beginning of the file
Reading package lists… Done
E: Method katello has died unexpectedly!
E: Sub-process katello returned an error code (1)
E: Method /usr/lib/apt/methods/katello did not start correctly
E: Failed to fetch katello://fqdn/CS/Library/Ubuntu18_04CV/custom/Ubunu1804/bionic/dists/default/InRelease
E: Some index files failed to download. They have been ignored, or old ones used instead.

Make sure you have a ubuntu product with a repo, on a content view and the
activation key with that subscription activated

Hello all,

I’m wondering if anyone encountered this issue when building the debian package (currently using the repo from -

It seems to trip up at the syspurpose part of the build due to some unexpected parameters in the python command;

/subscription-manager/syspurpose /subscription-manager
running install
running build
running build_py
running build_trans
running install_lib
byte-compiling debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose/ to files.pyc
byte-compiling debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose/ to i18n.pyc
byte-compiling debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose/ to cli.pyc
byte-compiling debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose/ to main.pyc
byte-compiling debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose/ to init.pyc
byte-compiling debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose/ to utils.pyc
running install_data
running install_egg_info
running egg_info
creating src/syspurpose.egg-info
writing src/syspurpose.egg-info/PKG-INFO
writing top-level names to src/syspurpose.egg-info/top_level.txt
writing dependency_links to src/syspurpose.egg-info/dependency_links.txt
writing entry points to src/syspurpose.egg-info/entry_points.txt
writing manifest file ‘src/syspurpose.egg-info/SOURCES.txt’
reading manifest file ‘src/syspurpose.egg-info/SOURCES.txt’
writing manifest file ‘src/syspurpose.egg-info/SOURCES.txt’
removing ‘debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose-1.28.0-py2.7.egg-info’ (and everything under it)
Copying src/syspurpose.egg-info to debian/python-subscription-manager/usr/lib/python2.7/site-packages/syspurpose-1.28.0-py2.7.egg-info
running install_scripts
Installing syspurpose script to debian/python-subscription-manager/usr/bin
EXCLUDE_PACKAGES="""" python ./ clean --all" python ./ build --quiet --gtk-version=2 --rpm-version=1.28.0-1-38-g720aee96" python ./ install --root debian/python-subscription-manager --gtk-version=2 --rpm-version=1.28.0-1-38-g720aee96 --prefix=/usr
–with-systemd=true --with-subman-gui=true --with-cockpit-desktop-entry=true
usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …]
or: --help [cmd1 cmd2 …]
or: --help-commands
or: cmd --help

error: option --all python ./ build --quiet --gtk-version not recognized
Makefile:341: recipe for target ‘install-via-setup’ failed
make[2]: *** [install-via-setup] Error 1
make[2]: Leaving directory ‘/subscription-manager’
debian/rules:24: recipe for target ‘override_dh_auto_install’ failed
make[1]: *** [override_dh_auto_install] Error 2
make[1]: Leaving directory ‘/subscription-manager’
debian/rules:12: recipe for target ‘binary’ failed
make: *** [binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2

I was following the instructions posted earlier in the thread from @besmirzanaj

I am attempting to do the same, adding Ubuntu servers to Katello, any updates? was anyone able to accomplish this?

Hi, even if you subscribe the system to katello, you won’t be able to manage packages from it. There’s a problem with katello ddbb and seems fixing it is not really a priority for now. (I’m also waiting for it, btw ) .
There’s a workaround via a PR, but you need to rebuild whole foreman+katello from scratch and it’s strongly discouraged/not ready for production environments.
check also : 'Content hosts' not showing installable updates for Debian like systems
Sorry for the bad news.


I see the same here trying to build on Debian 10. Did you find a solution for this?

I was able to build current git version by applying these changes (… and then copying contrib/debian one level higher) and running “debuild -b -uc -us”.

~/subscription-manager# git diff Makefile  contrib/debian/changelog 
diff --git a/Makefile b/Makefile
index 427e92795..0cfd3be4e 100644
--- a/Makefile
+++ b/Makefile
@@ -135,12 +135,12 @@ build-subpackages:
 # any cruft so developers don't end up install old builds.
 ifeq ($(WITH_SUBMAN_GUI),true)
     build: rhsmcertd rhsm-icon build-subpackages
-        EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./ clean --all
-        EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./ build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
+       $(PYTHON) ./ clean --all
+       $(PYTHON) ./ build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
     build: rhsmcertd build-subpackages
-        EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./ clean --all
-        EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./ build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
+       $(PYTHON) ./ clean --all
+       $(PYTHON) ./ build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
 # we never "remake" this makefile, so add a target so
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
index 088fe1271..c1695770d 100644
--- a/contrib/debian/changelog
+++ b/contrib/debian/changelog
@@ -1,3 +1,9 @@
+subscription-manager (1.28.2-1) unstable; urgency=medium
+  * Update to version 1.28.2
+ -- Jan Lentfer <>  Tue, 25 Aug 2020 11:54:00 +0200
 subscription-manager (1.25.1-2) unstable; urgency=medium
   * Change the path to rhsmd in /etc/cron.daily/rhsmd

I was using 1.25 IIRC, not much juice from it. did you get anything interesting from this newer version?

As I mentioned (probably in another thread), we (ATIX) are currently working to release our debian / ubuntu packages including subscription-manager, apt-transport-katello and katello-upload-profile.

Its just a question of “days” (hopefully).


No - no difference. Just building was a bit easier with the newer version.

Would be cool if you could make aarch64 packages available, too :slight_smile:
Really looking forword for improved Debian / Ubuntu support, also professionally.

any news on the Debian packages?

Sorry for the delay. We are still working on it. I will let you know when done.

Thanks! Was just about to enquire.

I performed these actions and the build of subscription-manager and the installation of the packages went very well.
When I try to register a Ubuntu server it will register as a host and content host, but I don’t see how many updates are available.
Also on the server and many that’s why, I dont have any repositories to list.
subscription-manager repos returns nothing.

Any idea’s?


I too am interested in managing Debian/Ubuntu hosts with Foreman+Katello. It feels so close to ready!

1 Like

Last time I tried I did not have success due to some bugs and also the python dependencies are not clearly defined.

I even tried python3 to prepare the DEBs and it still failed to get content.

For everyone who is tracking this thread, there is another one about the release of the ATIX subscription-manager packages: Subscription Manager for Debian & Ubuntu on