Looks like Suites and Components is hard-coded. I doubt I’ll be able to figure out how to get it to properly read anything out of the foreman server config, but if it helps anyone, that’s where it is.
bzanaj@ubuntu18:~$ cat /etc/apt/sources.list.d/rhsm.sources
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "apt-get update" to refresh available repos
#
# *** DO NOT EDIT THIS FILE ***
#
Suites: default
sslverify: 1
enabled_metadata: 1
sslclientkey: /etc/pki/entitlement/<ID>-key.pem
sslclientcert: /etc/pki/entitlement/<ID>.pem
Trusted: yes
enabled: 1
baseurl: https://forema.server.com/pulp/deb/<ORG>/Live/Ubuntu_Content_View/custom/Ubuntu_18/Helper_Repo
id: <ORG>_Ubuntu_18_Helper_Repo
sslcacert: /etc/rhsm/ca/katello-server-ca.pem
Components: all
gpgcheck: 0
metadata_expire: 1
URIs: katello://3847035710451318546@foreman.server.com/pulp/deb/<ORG>/Live/Ubuntu_Content_View/custom/Ubuntu_18/Helper_Repo
Types: deb
name: Helper Repo
Sorry I forgot the details on this step, adding a bit more info.
Download the certificate rpm package from katello on the same debian/ubuntu server you are using for building. then convert that package from RPM to a DEB. In the RPM there is basically just one bash script (the one in my previous comment)
replace that line with the following:
$ sudo alien -d katello-ca-consumer-latest.noarch.rpm
$ sudo chown $USER:$GROUPS katello-ca-consumer-foreman.domain.com_1.0-2_all.deb
$ sudo apt install -f katello-ca-consumer-foreman.domain.com_1.0-2_all.deb
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.
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 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) ./setup.py clean --all
- EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./setup.py build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
+ $(PYTHON) ./setup.py clean --all
+ $(PYTHON) ./setup.py build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
else
build: rhsmcertd build-subpackages
- EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./setup.py clean --all
- EXCLUDE_PACKAGES:="$(EXCLUDE_PACKAGES)" $(PYTHON) ./setup.py build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
+ $(PYTHON) ./setup.py clean --all
+ $(PYTHON) ./setup.py build --quiet --gtk-version=$(GTK_VERSION) --rpm-version=$(VERSION)
endif
# 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 <jan.lentfer@web.de> 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
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.