Discussion:
[Spacewalk-list] Ubuntu/Deb Support
Randall R. Sargent
2018-09-24 14:59:09 UTC
Permalink
Hi all,

*Newbie* to Spacewalk here. At the risk of beating a dead horse, has anyone been able to successfully manage Ubuntu clients on 2.8? We have 14.04 & 16.04 clients and it would make my life so much easier if I could get them to reliably work. I have been able to get 14.04 to register, and even update (with minor issues), but not 16.x. Documentation is spotty out there in Google-land.

Any help is appreciated!


Randy Sargent
Sr. Systems Administrator | Technology Services
[cid:***@01D3D32B.1D990B60]<https://www.pilotcat.com/>
Office (251) 634-3312 | Fax (888) 217-4567
________________________________
This e-mail and its attachments are subject to the Electronic Communications Privacy Act, 18 USC 2510-2521 and intended solely for the intended addressee. If you are not the intended recipient, stop reading this message and delete it from your system. Unauthorized retaining, reading, distribution, copying, or other use is strictly prohibited.
Robert Paschedag
2018-09-24 15:41:52 UTC
Permalink
Am 24. September 2018 16:59:09 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Hi all,
>
>*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
>anyone been able to successfully manage Ubuntu clients on 2.8? We have
>14.04 & 16.04 clients and it would make my life so much easier if I
>could get them to reliably work. I have been able to get 14.04 to
>register, and even update (with minor issues), but not 16.x.
>Documentation is spotty out there in Google-land.
>
>Any help is appreciated!

I only have Debian 8&9 clients smoothly running on SW 2.7 server.

Robert
>
>
>Randy Sargent
>Sr. Systems Administrator | Technology Services
>[cid:***@01D3D32B.1D990B60]<https://www.pilotcat.com/>
>Office (251) 634-3312 | Fax (888) 217-4567
>________________________________
>This e-mail and its attachments are subject to the Electronic
>Communications Privacy Act, 18 USC 2510-2521 and intended solely for
>the intended addressee. If you are not the intended recipient, stop
>reading this message and delete it from your system. Unauthorized
>retaining, reading, distribution, copying, or other use is strictly
>prohibited.


--
sent from my mobile device
Andrei Popenta
2018-09-24 17:25:57 UTC
Permalink
Hi,

I've got Ubuntu 16.04 and 18.04 working in SW 2.7.
what's your issue with ubuntu 16.04 ?

Andrei

On Mon, 24 Sep 2018 at 17:59, Randall R. Sargent <***@pilotcat.com>
wrote:

> Hi all,
>
>
>
> **Newbie** to Spacewalk here. At the risk of beating a dead horse, has
> anyone been able to successfully manage Ubuntu clients on 2.8? We have
> 14.04 & 16.04 clients and it would make my life so much easier if I could
> get them to reliably work. I have been able to get 14.04 to register, and
> even update (with minor issues), but not 16.x. Documentation is spotty out
> there in Google-land.
>
>
>
> Any help is appreciated!
>
>
>
>
>
> Randy Sargent
>
> *Sr. Systems Administrator | Technology Services*
>
> [image: cid:***@01D3D32B.1D990B60] <https://www.pilotcat.com/>
>
> *Office* (251) 634-3312 | *Fax* (888) 217-4567
> ------------------------------
>
> *This e-mail and its attachments are subject to the Electronic
> Communications Privacy Act, 18 USC 2510-2521 and intended solely for the
> intended addressee. If you are not the intended recipient, stop reading
> this message and delete it from your system. Unauthorized retaining,
> reading, distribution, copying, or other use is strictly prohibited.*
>
>
> _______________________________________________
> Spacewalk-list mailing list
> Spacewalk-***@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-list
Randall R. Sargent
2018-09-24 17:56:52 UTC
Permalink
16.04 registers, but any package installation or upgrade fails. Console on the client after doing a rhn_check doesn’t show an error, but the event history on SW just says the client reported it failed.

On Sep 24, 2018, at 12:26 PM, Andrei Popenta <***@visma.com<mailto:***@visma.com>> wrote:

Hi,

I've got Ubuntu 16.04 and 18.04 working in SW 2.7.
what's your issue with ubuntu 16.04 ?

Andrei

On Mon, 24 Sep 2018 at 17:59, Randall R. Sargent <***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
Hi all,

*Newbie* to Spacewalk here. At the risk of beating a dead horse, has anyone been able to successfully manage Ubuntu clients on 2.8? We have 14.04 & 16.04 clients and it would make my life so much easier if I could get them to reliably work. I have been able to get 14.04 to register, and even update (with minor issues), but not 16.x. Documentation is spotty out there in Google-land.

Any help is appreciated!


Randy Sargent
Sr. Systems Administrator | Technology Services
[cid:***@01D3D32B.1D990B60]<https://www.pilotcat.com/>
Office (251) 634-3312 | Fax (888) 217-4567
________________________________
This e-mail and its attachments are subject to the Electronic Communications Privacy Act, 18 USC 2510-2521 and intended solely for the intended addressee. If you are not the intended recipient, stop reading this message and delete it from your system. Unauthorized retaining, reading, distribution, copying, or other use is strictly prohibited.

_______________________________________________
Spacewalk-list mailing list
Spacewalk-***@redhat.com<mailto:Spacewalk-***@redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list
_______________________________________________
Spacewalk-list mailing list
Spacewalk-***@redhat.com<mailto:Spacewalk-***@redhat.com>
https://www.redhat.com/mailman/listinfo/spacewalk-list
Neal Gompa
2018-09-24 17:48:55 UTC
Permalink
On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent <***@pilotcat.com>
wrote:

> Hi all,
>
>
>
> **Newbie** to Spacewalk here. At the risk of beating a dead horse, has
> anyone been able to successfully manage Ubuntu clients on 2.8? We have
> 14.04 & 16.04 clients and it would make my life so much easier if I could
> get them to reliably work. I have been able to get 14.04 to register, and
> even update (with minor issues), but not 16.x. Documentation is spotty out
> there in Google-land.
>
>
>
> Any help is appreciated!
>
>
>
>
Hey, yeah, it's possible to successfully manage Ubuntu clients with
Spacewalk 2.8.

A couple of months ago, my colleague and I fixed the clients to work in
Spacewalk git master (upcoming Spacewalk 2.9), and we backported this to
the 2.8 clients.

The sources are here:
https://gitlab.com/datto/engineering/spacewalk-debian-client-packages

We also built the packages and published them on OBS. You can use them by
doing the following:

# If you have older clients from Debian/Ubuntu repos
$ sudo apt purge apt-transport-spacewalk rhnsd
$ sudo apt autoremove
# Installing the new packages
$ sudo bash -c 'echo "deb
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/
/" > /etc/apt/sources.list.d/spacewalk2.8-debclients.list'
$ sudo apt-key adv --fetch-keys
http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/Release.key
$ sudo apt-get update
$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
apt-transport-spacewalk rhncfg rhncfg-actions

There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and
9.0. Just swap "xUbuntu_16.04" in the instructions above for "xUbuntu_18.04"
or "Debian_8.0" or "Debian_9.0".

Future development of the clients are going into Spacewalk's next release.



--
真実はい぀も䞀぀/ Always, there's only one truth!
Randall R. Sargent
2018-09-24 19:07:58 UTC
Permalink
Thanks much for this. I’m not seeing any difference in the behavior of my 16.04 clients. They are able to register, but doing a package update fails (any package):

[cid:***@01D4540F.FE7E7510]

From: spacewalk-list-***@redhat.com <spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
Sent: Monday, September 24, 2018 12:49 PM
To: spacewalk-***@redhat.com
Subject: Re: [Spacewalk-list] Ubuntu/Deb Support

On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent <***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
Hi all,

*Newbie* to Spacewalk here. At the risk of beating a dead horse, has anyone been able to successfully manage Ubuntu clients on 2.8? We have 14.04 & 16.04 clients and it would make my life so much easier if I could get them to reliably work. I have been able to get 14.04 to register, and even update (with minor issues), but not 16.x. Documentation is spotty out there in Google-land.

Any help is appreciated!


Hey, yeah, it's possible to successfully manage Ubuntu clients with Spacewalk 2.8.

A couple of months ago, my colleague and I fixed the clients to work in Spacewalk git master (upcoming Spacewalk 2.9), and we backported this to the 2.8 clients.

The sources are here: https://gitlab.com/datto/engineering/spacewalk-debian-client-packages

We also built the packages and published them on OBS. You can use them by doing the following:

# If you have older clients from Debian/Ubuntu repos
$ sudo apt purge apt-transport-spacewalk rhnsd
$ sudo apt autoremove
# Installing the new packages
$ sudo bash -c 'echo "deb http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/ /" > /etc/apt/sources.list.d/spacewalk2.8-debclients.list'
$ sudo apt-key adv --fetch-keys http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/Release.key
$ sudo apt-get update
$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd apt-transport-spacewalk rhncfg rhncfg-actions

There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and 9.0. Just swap "xUbuntu_16.04" in the instructions above for "xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".

Future development of the clients are going into Spacewalk's next release.



--
真実はい぀も䞀぀/ Always, there's only one truth!
Robert Paschedag
2018-09-24 19:27:49 UTC
Permalink
Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Thanks much for this. I’m not seeing any difference in the behavior of
>my 16.04 clients. They are able to register, but doing a package update
>fails (any package):
>
>[cid:***@01D4540F.FE7E7510]
>

I'm pretty sure, you are not using signs repos.

Newer "apt", especially the python "apt" module fails while checking the signatures of the repo, thus the "update" fails.

Note: it is the update ("apt-get update") within the call to install the package that fails.

I also had this error with Debian 9, because I did not yet "sign" my repos and used "Allow unsigned = true" within apt.conf.

But these settings seem to be ignored, hence, the "apt" python module "requires" the repos to be signed. It took me a while to debug this.

In case you "are" using signs repos, you should provide some more info...e.g. "rhn_check -vvvv" while trying to install a package via SW.

Robert

>From: spacewalk-list-***@redhat.com
><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>Sent: Monday, September 24, 2018 12:49 PM
>To: spacewalk-***@redhat.com
>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
>On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>Hi all,
>
>*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
>anyone been able to successfully manage Ubuntu clients on 2.8? We have
>14.04 & 16.04 clients and it would make my life so much easier if I
>could get them to reliably work. I have been able to get 14.04 to
>register, and even update (with minor issues), but not 16.x.
>Documentation is spotty out there in Google-land.
>
>Any help is appreciated!
>
>
>Hey, yeah, it's possible to successfully manage Ubuntu clients with
>Spacewalk 2.8.
>
>A couple of months ago, my colleague and I fixed the clients to work in
>Spacewalk git master (upcoming Spacewalk 2.9), and we backported this
>to the 2.8 clients.
>
>The sources are here:
>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>
>We also built the packages and published them on OBS. You can use them
>by doing the following:
>
># If you have older clients from Debian/Ubuntu repos
>$ sudo apt purge apt-transport-spacewalk rhnsd
>$ sudo apt autoremove
># Installing the new packages
>$ sudo bash -c 'echo "deb
>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/
>/" > /etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>$ sudo apt-key adv --fetch-keys
>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/Release.key
>$ sudo apt-get update
>$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>apt-transport-spacewalk rhncfg rhncfg-actions
>
>There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and
>9.0. Just swap "xUbuntu_16.04" in the instructions above for
>"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>
>Future development of the clients are going into Spacewalk's next
>release.
>
>
>
>--
>真実はいつも一つ!/ Always, there's only one truth!


--
sent from my mobile device
Randall R. Sargent
2018-09-24 20:09:43 UTC
Permalink
Robert – Your comment on the repo not being signed sounds like the issue. Do I assign a gpg key to the Channel, or do I assign a cert to the repo?

*I’m seeing messages in the archive long before I get the email.

From: Randall R. Sargent
Sent: Monday, September 24, 2018 2:08 PM
To: spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

Thanks much for this. I’m not seeing any difference in the behavior of my 16.04 clients. They are able to register, but doing a package update fails (any package):

[cid:***@01D45418.9F063740]

From: spacewalk-list-***@redhat.com<mailto:spacewalk-list-***@redhat.com> <spacewalk-list-***@redhat.com<mailto:spacewalk-list-***@redhat.com>> On Behalf Of Neal Gompa
Sent: Monday, September 24, 2018 12:49 PM
To: spacewalk-***@redhat.com<mailto:spacewalk-***@redhat.com>
Subject: Re: [Spacewalk-list] Ubuntu/Deb Support

On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent <***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
Hi all,

*Newbie* to Spacewalk here. At the risk of beating a dead horse, has anyone been able to successfully manage Ubuntu clients on 2.8? We have 14.04 & 16.04 clients and it would make my life so much easier if I could get them to reliably work. I have been able to get 14.04 to register, and even update (with minor issues), but not 16.x. Documentation is spotty out there in Google-land.

Any help is appreciated!


Hey, yeah, it's possible to successfully manage Ubuntu clients with Spacewalk 2.8.

A couple of months ago, my colleague and I fixed the clients to work in Spacewalk git master (upcoming Spacewalk 2.9), and we backported this to the 2.8 clients.

The sources are here: https://gitlab.com/datto/engineering/spacewalk-debian-client-packages

We also built the packages and published them on OBS. You can use them by doing the following:

# If you have older clients from Debian/Ubuntu repos
$ sudo apt purge apt-transport-spacewalk rhnsd
$ sudo apt autoremove
# Installing the new packages
$ sudo bash -c 'echo "deb http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/ /" > /etc/apt/sources.list.d/spacewalk2.8-debclients.list'
$ sudo apt-key adv --fetch-keys http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/Release.key
$ sudo apt-get update
$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd apt-transport-spacewalk rhncfg rhncfg-actions

There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and 9.0. Just swap "xUbuntu_16.04" in the instructions above for "xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".

Future development of the clients are going into Spacewalk's next release.



--
真実はい぀も䞀぀/ Always, there's only one truth!
Robert Paschedag
2018-09-25 05:34:30 UTC
Permalink
Am 24. September 2018 22:09:43 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Robert – Your comment on the repo not being signed sounds like the
>issue. Do I assign a gpg key to the Channel, or do I assign a cert to
>the repo?
>
>*I’m seeing messages in the archive long before I get the email.

You might want to check this (debug this).

The error should arise within the Python ".../apt/cache.py" module. Should be this line which fails.

https://salsa.debian.org/apt-team/python-apt/blob/master/apt/cache.py#L546

Robert

>
>From: Randall R. Sargent
>Sent: Monday, September 24, 2018 2:08 PM
>To: spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Thanks much for this. I’m not seeing any difference in the behavior of
>my 16.04 clients. They are able to register, but doing a package update
>fails (any package):
>
>[cid:***@01D45418.9F063740]
>
>From:
>spacewalk-list-***@redhat.com<mailto:spacewalk-list-***@redhat.com>
><spacewalk-list-***@redhat.com<mailto:spacewalk-list-***@redhat.com>>
>On Behalf Of Neal Gompa
>Sent: Monday, September 24, 2018 12:49 PM
>To: spacewalk-***@redhat.com<mailto:spacewalk-***@redhat.com>
>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
>On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>Hi all,
>
>*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
>anyone been able to successfully manage Ubuntu clients on 2.8? We have
>14.04 & 16.04 clients and it would make my life so much easier if I
>could get them to reliably work. I have been able to get 14.04 to
>register, and even update (with minor issues), but not 16.x.
>Documentation is spotty out there in Google-land.
>
>Any help is appreciated!
>
>
>Hey, yeah, it's possible to successfully manage Ubuntu clients with
>Spacewalk 2.8.
>
>A couple of months ago, my colleague and I fixed the clients to work in
>Spacewalk git master (upcoming Spacewalk 2.9), and we backported this
>to the 2.8 clients.
>
>The sources are here:
>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>
>We also built the packages and published them on OBS. You can use them
>by doing the following:
>
># If you have older clients from Debian/Ubuntu repos
>$ sudo apt purge apt-transport-spacewalk rhnsd
>$ sudo apt autoremove
># Installing the new packages
>$ sudo bash -c 'echo "deb
>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/
>/" > /etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>$ sudo apt-key adv --fetch-keys
>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04/Release.key
>$ sudo apt-get update
>$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>apt-transport-spacewalk rhncfg rhncfg-actions
>
>There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and
>9.0. Just swap "xUbuntu_16.04" in the instructions above for
>"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>
>Future development of the clients are going into Spacewalk's next
>release.
>
>
>
>--
>真実はいつも一つ!/ Always, there's only one truth!


--
sent from my mobile device
Randall R. Sargent
2018-09-26 13:16:06 UTC
Permalink
I'm having no luck getting my xenial clients to recognize the Release & Release.gpg files in my repos. I resorted to modifying the pre-invoke.py script to write [trusted=yes] for each line in spacewalk.list, now I'm no longer getting complaints about missing Release files when I do an apt update. I am still unable to upgrade any packages though:

# rhn_check -vvvv
D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4</string></value>\n<value><string>8ubuntu1.11</string></value>\n<value><string>1</string></value>\n<value><string>amd64-deb</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 26}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: rpcServer: Calling XMLRPC up2date.login
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at 1537966985.67 with expiration of 1537970585.67 seconds.
successfully retrieved authentication token from up2date server
D: logininfo:{'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time': '1537966985.69', 'X-RHN-Auth': '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=', 'X-RHN-Auth-Channels': [['xenial-main', '20180925171652', '1', '1'], ['xenial-security', '20180925175349', '0', '1'], ['xenial-updates', '20180925172643', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4</string></value>\n<value><string>8ubuntu1.11</string></value>\n<value><string>1</string></value>\n<value><string>amd64-deb</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 26}
D: handle_action actionid = 26, version = 2
D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11', '1', 'amd64-deb']]
Apt-Spacewalk: Updating sources.list
D: Sending back response(1, 'update failed', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: Called refresh_list
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
D: rpcServer: Calling XMLRPC registration.update_packages
D: local action status: (0, 'package list refreshed', {})
D: rpcServer: Calling XMLRPC registration.welcome_message

Does anyone have any ideas?



-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Monday, September 24, 2018 2:28 PM
To: spacewalk-***@redhat.com; Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
Subject: Re: [Spacewalk-list] Ubuntu/Deb Support

Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Thanks much for this. I’m not seeing any difference in the behavior of
>my 16.04 clients. They are able to register, but doing a package update
>fails (any package):
>
>[cid:***@01D4540F.FE7E7510]
>

I'm pretty sure, you are not using signs repos.

Newer "apt", especially the python "apt" module fails while checking the signatures of the repo, thus the "update" fails.

Note: it is the update ("apt-get update") within the call to install the package that fails.

I also had this error with Debian 9, because I did not yet "sign" my repos and used "Allow unsigned = true" within apt.conf.

But these settings seem to be ignored, hence, the "apt" python module "requires" the repos to be signed. It took me a while to debug this.

In case you "are" using signs repos, you should provide some more info...e.g. "rhn_check -vvvv" while trying to install a package via SW.

Robert

>From: spacewalk-list-***@redhat.com
><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>Sent: Monday, September 24, 2018 12:49 PM
>To: spacewalk-***@redhat.com
>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
>On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>Hi all,
>
>*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
>anyone been able to successfully manage Ubuntu clients on 2.8? We have
>14.04 & 16.04 clients and it would make my life so much easier if I
>could get them to reliably work. I have been able to get 14.04 to
>register, and even update (with minor issues), but not 16.x.
>Documentation is spotty out there in Google-land.
>
>Any help is appreciated!
>
>
>Hey, yeah, it's possible to successfully manage Ubuntu clients with
>Spacewalk 2.8.
>
>A couple of months ago, my colleague and I fixed the clients to work in
>Spacewalk git master (upcoming Spacewalk 2.9), and we backported this
>to the 2.8 clients.
>
>The sources are here:
>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>
>We also built the packages and published them on OBS. You can use them
>by doing the following:
>
># If you have older clients from Debian/Ubuntu repos $ sudo apt purge
>apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing the
>new packages $ sudo bash -c 'echo "deb
>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>/2.8:/debclients/xUbuntu_16.04/ /" >
>/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>$ sudo apt-key adv --fetch-keys
>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>/2.8:/debclients/xUbuntu_16.04/Release.key
>$ sudo apt-get update
>$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>apt-transport-spacewalk rhncfg rhncfg-actions
>
>There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and
>9.0. Just swap "xUbuntu_16.04" in the instructions above for
>"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>
>Future development of the clients are going into Spacewalk's next
>release.
>
>
>
>--
>真実はいつも一つ!/ Always, there's only one truth!


--
sent from my mobile device
Robert Paschedag
2018-09-26 15:09:43 UTC
Permalink
> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
> Von: "Randall R. Sargent" <***@pilotcat.com>
> An: "Robert Paschedag" <***@web.de>, "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>, "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>
> I'm having no luck getting my xenial clients to recognize the Release & Release.gpg files in my repos. I resorted to modifying the pre-invoke.py script to write [trusted=yes] for each line in spacewalk.list, now I'm no longer getting complaints about missing Release files when I do an apt update. I am still unable to upgrade any packages though:
>
> # rhn_check -vvvv
> D: check_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4</string></value>\n<value><string>8ubuntu1.11</string></value>\n<value><string>1</string></value>\n<value><string>amd64-deb</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 26}
> updateLoginInfo() login info
> D: login(forceUpdate=True) invoked
> logging into up2date server
> D: rpcServer: Calling XMLRPC up2date.login
> D: writeCachedLogin() invoked
> D: Wrote pickled loginInfo at 1537966985.67 with expiration of 1537970585.67 seconds.
> successfully retrieved authentication token from up2date server
> D: logininfo:{'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time': '1537966985.69', 'X-RHN-Auth': '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=', 'X-RHN-Auth-Channels': [['xenial-main', '20180925171652', '1', '1'], ['xenial-security', '20180925175349', '0', '1'], ['xenial-updates', '20180925172643', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
> D: handle_action{'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4</string></value>\n<value><string>8ubuntu1.11</string></value>\n<value><string>1</string></value>\n<value><string>amd64-deb</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 26}
> D: handle_action actionid = 26, version = 2
> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11', '1', 'amd64-deb']]
> Apt-Spacewalk: Updating sources.list

Error starts here

> D: Sending back response(1, 'update failed', {})

The python-apt module failes to verify the repos.

You said, your are using SW 2.8. Release? If yes, you are missing a patch to support "signed" debian repos. See PR https://github.com/spacewalkproject/spacewalk/pull/636. This is the part you need to patch on the server.

You also need to patch the clients. If you installed the newest packages (as stated within this thread), your clients should be ok. You can check this within
your /etc/apt/sources.list.d/spacewalk file. If this file contains one line for each channel your client subscribes, you are fine.

Now you still need to create the "InRelease" or "Release.gpg" files. @Phil has written in his blog years ago. See http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spacewalk

You need to create these files for each repo, of course.

But even if this all works, you might still hit another bug with newer Ubuntu / Debian distros using newer APT version, which got some "improvements".
The error you might hit is the missing "Multi-Arch" header missing within the repo meta data for each channel.

So.....what I currently do (on my SW 2.7) system is.

- Use the "old" sync script from Steve Meier in a modified version. (see my repo https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-header)
- wait some minutes after the sync finshed to let SW recreate the "packages.gz" for each channel (here, the "Multi-Arch" headers are missing)
- now run my spacewalk-add-debian-multiarch-header script to add the missing headers to the packages.gz for each Debian channel I synced before.
- now sign the repos

Now, if all went well, clients have been patched (apt-spacewalk), server has been patched (rhnRepository.py - see PR 636), your clients should work.

Robert

> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
> D: Called refresh_list
> Updating package profile
> D: rpcServer: Calling XMLRPC registration.welcome_message
> D: rpcServer: Calling XMLRPC registration.update_packages
> D: local action status: (0, 'package list refreshed', {})
> D: rpcServer: Calling XMLRPC registration.welcome_message
>
> Does anyone have any ideas?
>
>
>
> -----Original Message-----
> From: Robert Paschedag <***@web.de>
> Sent: Monday, September 24, 2018 2:28 PM
> To: spacewalk-***@redhat.com; Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
> >Thanks much for this. I’m not seeing any difference in the behavior of
> >my 16.04 clients. They are able to register, but doing a package update
> >fails (any package):
> >
> >[cid:***@01D4540F.FE7E7510]
> >
>
> I'm pretty sure, you are not using signs repos.
>
> Newer "apt", especially the python "apt" module fails while checking the signatures of the repo, thus the "update" fails.
>
> Note: it is the update ("apt-get update") within the call to install the package that fails.
>
> I also had this error with Debian 9, because I did not yet "sign" my repos and used "Allow unsigned = true" within apt.conf.
>
> But these settings seem to be ignored, hence, the "apt" python module "requires" the repos to be signed. It took me a while to debug this.
>
> In case you "are" using signs repos, you should provide some more info...e.g. "rhn_check -vvvv" while trying to install a package via SW.
>
> Robert
>
> >From: spacewalk-list-***@redhat.com
> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
> >Sent: Monday, September 24, 2018 12:49 PM
> >To: spacewalk-***@redhat.com
> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
> >
> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
> >Hi all,
> >
> >*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
> >anyone been able to successfully manage Ubuntu clients on 2.8? We have
> >14.04 & 16.04 clients and it would make my life so much easier if I
> >could get them to reliably work. I have been able to get 14.04 to
> >register, and even update (with minor issues), but not 16.x.
> >Documentation is spotty out there in Google-land.
> >
> >Any help is appreciated!
> >
> >
> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
> >Spacewalk 2.8.
> >
> >A couple of months ago, my colleague and I fixed the clients to work in
> >Spacewalk git master (upcoming Spacewalk 2.9), and we backported this
> >to the 2.8 clients.
> >
> >The sources are here:
> >https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
> >
> >We also built the packages and published them on OBS. You can use them
> >by doing the following:
> >
> ># If you have older clients from Debian/Ubuntu repos $ sudo apt purge
> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing the
> >new packages $ sudo bash -c 'echo "deb
> >http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
> >/2.8:/debclients/xUbuntu_16.04/ /" >
> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
> >$ sudo apt-key adv --fetch-keys
> >http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
> >/2.8:/debclients/xUbuntu_16.04/Release.key
> >$ sudo apt-get update
> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
> >apt-transport-spacewalk rhncfg rhncfg-actions
> >
> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0 and
> >9.0. Just swap "xUbuntu_16.04" in the instructions above for
> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
> >
> >Future development of the clients are going into Spacewalk's next
> >release.
> >
> >
> >
> >--
> >真実はいつも一つ!/ Always, there's only one truth!
>
>
> --
> sent from my mobile device
>
>
Randall R. Sargent
2018-09-26 16:01:16 UTC
Permalink
Thanks Robert.

I applied the patch for rhnRepository.py and verified the client version is up to date using the criteria gave (spacewalk.list). I did follow Phil's blog and have been able to create Release & Release.gpg files. I did not do any of the patching he mentioned though because I'm assuming my versions are updated since he wrote the post.

Attempting to patch after that gives me the same error.

Next I am trying to run your add-multiarch-header script but am getting the following error:

/etc/rhn/spacewalk-add-debian-multiarch-header.py /var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
Error: Inputfile '/tmp/xenial-main' not available.

Am I just running your modified script, or do I need to run spacewalk-debian-sync.pl before?

Thanks again.

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Wednesday, September 26, 2018 10:10 AM
To: Randall R. Sargent <***@pilotcat.com>
Cc: spacewalk-***@redhat.com
Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support



> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
> Von: "Randall R. Sargent" <***@pilotcat.com>
> An: "Robert Paschedag" <***@web.de>,
> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>
> I'm having no luck getting my xenial clients to recognize the Release & Release.gpg files in my repos. I resorted to modifying the pre-invoke.py script to write [trusted=yes] for each line in spacewalk.list, now I'm no longer getting complaints about missing Release files when I do an apt update. I am still unable to upgrade any packages though:
>
> # rhn_check -vvvv
> D: check_action{'action': "<?xml
> version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
> >\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
> ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
> /string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
> <string>1</string></value>\n<value><string>amd64-deb</string></value>\
> n</data></array></value>\n</data></array></value>\n</param>\n</params>
> \n</methodCall>\n", 'version': 2, 'id': 26}
> updateLoginInfo() login info
> D: login(forceUpdate=True) invoked
> logging into up2date server
> D: rpcServer: Calling XMLRPC up2date.login
> D: writeCachedLogin() invoked
> D: Wrote pickled loginInfo at 1537966985.67 with expiration of 1537970585.67 seconds.
> successfully retrieved authentication token from up2date server
> D: logininfo:{'X-RHN-Server-Id': 1000010000, 'X-RHN-Auth-Server-Time':
> '1537966985.69', 'X-RHN-Auth':
> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=', 'X-RHN-Auth-Channels':
> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643', '0',
> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
> D: handle_action{'action': "<?xml
> version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
> >\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
> ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
> /string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
> <string>1</string></value>\n<value><string>amd64-deb</string></value>\
> n</data></array></value>\n</data></array></value>\n</param>\n</params>
> \n</methodCall>\n", 'version': 2, 'id': 26}
> D: handle_action actionid = 26, version = 2
> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11', '1',
> 'amd64-deb']]
> Apt-Spacewalk: Updating sources.list

Error starts here

> D: Sending back response(1, 'update failed', {})

The python-apt module failes to verify the repos.

You said, your are using SW 2.8. Release? If yes, you are missing a patch to support "signed" debian repos. See PR https://github.com/spacewalkproject/spacewalk/pull/636. This is the part you need to patch on the server.

You also need to patch the clients. If you installed the newest packages (as stated within this thread), your clients should be ok. You can check this within your /etc/apt/sources.list.d/spacewalk file. If this file contains one line for each channel your client subscribes, you are fine.

Now you still need to create the "InRelease" or "Release.gpg" files. @Phil has written in his blog years ago. See http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spacewalk

You need to create these files for each repo, of course.

But even if this all works, you might still hit another bug with newer Ubuntu / Debian distros using newer APT version, which got some "improvements".
The error you might hit is the missing "Multi-Arch" header missing within the repo meta data for each channel.

So.....what I currently do (on my SW 2.7) system is.

- Use the "old" sync script from Steve Meier in a modified version. (see my repo https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-header)
- wait some minutes after the sync finshed to let SW recreate the "packages.gz" for each channel (here, the "Multi-Arch" headers are missing)
- now run my spacewalk-add-debian-multiarch-header script to add the missing headers to the packages.gz for each Debian channel I synced before.
- now sign the repos

Now, if all went well, clients have been patched (apt-spacewalk), server has been patched (rhnRepository.py - see PR 636), your clients should work.

Robert

> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
> D: Called refresh_list
> Updating package profile
> D: rpcServer: Calling XMLRPC registration.welcome_message
> D: rpcServer: Calling XMLRPC registration.update_packages
> D: local action status: (0, 'package list refreshed', {})
> D: rpcServer: Calling XMLRPC registration.welcome_message
>
> Does anyone have any ideas?
>
>
>
> -----Original Message-----
> From: Robert Paschedag <***@web.de>
> Sent: Monday, September 24, 2018 2:28 PM
> To: spacewalk-***@redhat.com; Randall R. Sargent
> <***@pilotcat.com>; spacewalk-***@redhat.com
> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
> >Thanks much for this. I’m not seeing any difference in the behavior
> >of my 16.04 clients. They are able to register, but doing a package
> >update fails (any package):
> >
> >[cid:***@01D4540F.FE7E7510]
> >
>
> I'm pretty sure, you are not using signs repos.
>
> Newer "apt", especially the python "apt" module fails while checking the signatures of the repo, thus the "update" fails.
>
> Note: it is the update ("apt-get update") within the call to install the package that fails.
>
> I also had this error with Debian 9, because I did not yet "sign" my repos and used "Allow unsigned = true" within apt.conf.
>
> But these settings seem to be ignored, hence, the "apt" python module "requires" the repos to be signed. It took me a while to debug this.
>
> In case you "are" using signs repos, you should provide some more info...e.g. "rhn_check -vvvv" while trying to install a package via SW.
>
> Robert
>
> >From: spacewalk-list-***@redhat.com
> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
> >Sent: Monday, September 24, 2018 12:49 PM
> >To: spacewalk-***@redhat.com
> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
> >
> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
> >Hi all,
> >
> >*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
> >anyone been able to successfully manage Ubuntu clients on 2.8? We
> >have
> >14.04 & 16.04 clients and it would make my life so much easier if I
> >could get them to reliably work. I have been able to get 14.04 to
> >register, and even update (with minor issues), but not 16.x.
> >Documentation is spotty out there in Google-land.
> >
> >Any help is appreciated!
> >
> >
> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
> >Spacewalk 2.8.
> >
> >A couple of months ago, my colleague and I fixed the clients to work
> >in Spacewalk git master (upcoming Spacewalk 2.9), and we backported
> >this to the 2.8 clients.
> >
> >The sources are here:
> >https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
> >
> >We also built the packages and published them on OBS. You can use
> >them by doing the following:
> >
> ># If you have older clients from Debian/Ubuntu repos $ sudo apt purge
> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing the
> >new packages $ sudo bash -c 'echo "deb
> >http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
> >/2.8:/debclients/xUbuntu_16.04/ /" >
> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
> >$ sudo apt-key adv --fetch-keys
> >http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
> >/2.8:/debclients/xUbuntu_16.04/Release.key
> >$ sudo apt-get update
> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
> >apt-transport-spacewalk rhncfg rhncfg-actions
> >
> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0
> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
> >
> >Future development of the clients are going into Spacewalk's next
> >release.
> >
> >
> >
> >--
> >真実はいつも一つ!/ Always, there's only one truth!
>
>
> --
> sent from my mobile device
>
>
Robert Paschedag
2018-09-27 05:03:19 UTC
Permalink
Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Thanks Robert.
>
>I applied the patch for rhnRepository.py and verified the client
>version is up to date using the criteria gave (spacewalk.list). I did
>follow Phil's blog and have been able to create Release & Release.gpg
>files. I did not do any of the patching he mentioned though because I'm
>assuming my versions are updated since he wrote the post.
>
>Attempting to patch after that gives me the same error.
>
>Next I am trying to run your add-multiarch-header script but am getting
>the following error:
>
>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>Error: Inputfile '/tmp/xenial-main' not available.
>
>Am I just running your modified script, or do I need to run
>spacewalk-debian-sync.pl before?

Of course you must sync the repos with the modified sync script (as stated). This extracts the Multi-Arch headers from the original Ubuntu / Debian repos and writes them to temporary files within /tmp.

Robert
>
>Thanks again.
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Wednesday, September 26, 2018 10:10 AM
>To: Randall R. Sargent <***@pilotcat.com>
>Cc: spacewalk-***@redhat.com
>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>
>
>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>> Von: "Randall R. Sargent" <***@pilotcat.com>
>> An: "Robert Paschedag" <***@web.de>,
>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>> I'm having no luck getting my xenial clients to recognize the Release
>& Release.gpg files in my repos. I resorted to modifying the
>pre-invoke.py script to write [trusted=yes] for each line in
>spacewalk.list, now I'm no longer getting complaints about missing
>Release files when I do an apt update. I am still unable to upgrade any
>packages though:
>>
>> # rhn_check -vvvv
>> D: check_action{'action': "<?xml
>>
>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>
>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>
>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>
>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>
><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>
>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>> \n</methodCall>\n", 'version': 2, 'id': 26}
>> updateLoginInfo() login info
>> D: login(forceUpdate=True) invoked
>> logging into up2date server
>> D: rpcServer: Calling XMLRPC up2date.login
>> D: writeCachedLogin() invoked
>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>1537970585.67 seconds.
>> successfully retrieved authentication token from up2date server
>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>'X-RHN-Auth-Server-Time':
>> '1537966985.69', 'X-RHN-Auth':
>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>'X-RHN-Auth-Channels':
>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>'0',
>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>'3600.0'}
>> D: handle_action{'action': "<?xml
>>
>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>
>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>
>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>
>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>
><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>
>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>> \n</methodCall>\n", 'version': 2, 'id': 26}
>> D: handle_action actionid = 26, version = 2
>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11', '1',
>
>> 'amd64-deb']]
>> Apt-Spacewalk: Updating sources.list
>
>Error starts here
>
>> D: Sending back response(1, 'update failed', {})
>
>The python-apt module failes to verify the repos.
>
>You said, your are using SW 2.8. Release? If yes, you are missing a
>patch to support "signed" debian repos. See PR
>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>part you need to patch on the server.
>
>You also need to patch the clients. If you installed the newest
>packages (as stated within this thread), your clients should be ok. You
>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>this file contains one line for each channel your client subscribes,
>you are fine.
>
>Now you still need to create the "InRelease" or "Release.gpg" files.
>@Phil has written in his blog years ago. See
>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spacewalk
>
>You need to create these files for each repo, of course.
>
>But even if this all works, you might still hit another bug with newer
>Ubuntu / Debian distros using newer APT version, which got some
>"improvements".
>The error you might hit is the missing "Multi-Arch" header missing
>within the repo meta data for each channel.
>
>So.....what I currently do (on my SW 2.7) system is.
>
>- Use the "old" sync script from Steve Meier in a modified version.
>(see my repo
>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-header)
>- wait some minutes after the sync finshed to let SW recreate the
>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>missing)
>- now run my spacewalk-add-debian-multiarch-header script to add the
>missing headers to the packages.gz for each Debian channel I synced
>before.
>- now sign the repos
>
>Now, if all went well, clients have been patched (apt-spacewalk),
>server has been patched (rhnRepository.py - see PR 636), your clients
>should work.
>
>Robert
>
>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>> D: Called refresh_list
>> Updating package profile
>> D: rpcServer: Calling XMLRPC registration.welcome_message
>> D: rpcServer: Calling XMLRPC registration.update_packages
>> D: local action status: (0, 'package list refreshed', {})
>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>
>> Does anyone have any ideas?
>>
>>
>>
>> -----Original Message-----
>> From: Robert Paschedag <***@web.de>
>> Sent: Monday, September 24, 2018 2:28 PM
>> To: spacewalk-***@redhat.com; Randall R. Sargent
>> <***@pilotcat.com>; spacewalk-***@redhat.com
>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>
>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>> >Thanks much for this. I’m not seeing any difference in the behavior
>> >of my 16.04 clients. They are able to register, but doing a package
>> >update fails (any package):
>> >
>> >[cid:***@01D4540F.FE7E7510]
>> >
>>
>> I'm pretty sure, you are not using signs repos.
>>
>> Newer "apt", especially the python "apt" module fails while checking
>the signatures of the repo, thus the "update" fails.
>>
>> Note: it is the update ("apt-get update") within the call to install
>the package that fails.
>>
>> I also had this error with Debian 9, because I did not yet "sign" my
>repos and used "Allow unsigned = true" within apt.conf.
>>
>> But these settings seem to be ignored, hence, the "apt" python module
>"requires" the repos to be signed. It took me a while to debug this.
>>
>> In case you "are" using signs repos, you should provide some more
>info...e.g. "rhn_check -vvvv" while trying to install a package via SW.
>>
>> Robert
>>
>> >From: spacewalk-list-***@redhat.com
>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>> >Sent: Monday, September 24, 2018 12:49 PM
>> >To: spacewalk-***@redhat.com
>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>> >
>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>> >Hi all,
>> >
>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse, has
>
>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>> >have
>> >14.04 & 16.04 clients and it would make my life so much easier if I
>> >could get them to reliably work. I have been able to get 14.04 to
>> >register, and even update (with minor issues), but not 16.x.
>> >Documentation is spotty out there in Google-land.
>> >
>> >Any help is appreciated!
>> >
>> >
>> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
>> >Spacewalk 2.8.
>> >
>> >A couple of months ago, my colleague and I fixed the clients to work
>
>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we backported
>> >this to the 2.8 clients.
>> >
>> >The sources are here:
>>
>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>> >
>> >We also built the packages and published them on OBS. You can use
>> >them by doing the following:
>> >
>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>purge
>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing the
>
>> >new packages $ sudo bash -c 'echo "deb
>>
>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>> >$ sudo apt-key adv --fetch-keys
>>
>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>> >$ sudo apt-get update
>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>> >apt-transport-spacewalk rhncfg rhncfg-actions
>> >
>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0
>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>> >
>> >Future development of the clients are going into Spacewalk's next
>> >release.
>> >
>> >
>> >
>> >--
>> >真実はいつも一つ!/ Always, there's only one truth!
>>
>>
>> --
>> sent from my mobile device
>>
>>


--
sent from my mobile device
Robert Paschedag
2018-09-27 05:07:20 UTC
Permalink
Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag <***@web.de>:
>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>Thanks Robert.
>>
>>I applied the patch for rhnRepository.py and verified the client
>>version is up to date using the criteria gave (spacewalk.list). I did
>>follow Phil's blog and have been able to create Release & Release.gpg
>>files. I did not do any of the patching he mentioned though because
>I'm
>>assuming my versions are updated since he wrote the post.
>>
>>Attempting to patch after that gives me the same error.
>>
>>Next I am trying to run your add-multiarch-header script but am
>getting
>>the following error:
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>Error: Inputfile '/tmp/xenial-main' not available.
>>
>>Am I just running your modified script, or do I need to run
>>spacewalk-debian-sync.pl before?
>
>Of course you must sync the repos with the modified sync script (as
>stated). This extracts the Multi-Arch headers from the original Ubuntu
>/ Debian repos and writes them to temporary files within /tmp.

But you should check your repos are signed correctly by running apt-get update.

If this does not work correctly or complains about missing release files, you made a mistake somewhere.

Robert
>
>Robert
>>
>>Thanks again.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Wednesday, September 26, 2018 10:10 AM
>>To: Randall R. Sargent <***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>
>>
>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>> An: "Robert Paschedag" <***@web.de>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> I'm having no luck getting my xenial clients to recognize the
>Release
>>& Release.gpg files in my repos. I resorted to modifying the
>>pre-invoke.py script to write [trusted=yes] for each line in
>>spacewalk.list, now I'm no longer getting complaints about missing
>>Release files when I do an apt update. I am still unable to upgrade
>any
>>packages though:
>>>
>>> # rhn_check -vvvv
>>> D: check_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> updateLoginInfo() login info
>>> D: login(forceUpdate=True) invoked
>>> logging into up2date server
>>> D: rpcServer: Calling XMLRPC up2date.login
>>> D: writeCachedLogin() invoked
>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>1537970585.67 seconds.
>>> successfully retrieved authentication token from up2date server
>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>'X-RHN-Auth-Server-Time':
>>> '1537966985.69', 'X-RHN-Auth':
>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>'X-RHN-Auth-Channels':
>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>'0',
>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>'3600.0'}
>>> D: handle_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> D: handle_action actionid = 26, version = 2
>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>'1',
>>
>>> 'amd64-deb']]
>>> Apt-Spacewalk: Updating sources.list
>>
>>Error starts here
>>
>>> D: Sending back response(1, 'update failed', {})
>>
>>The python-apt module failes to verify the repos.
>>
>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>patch to support "signed" debian repos. See PR
>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>part you need to patch on the server.
>>
>>You also need to patch the clients. If you installed the newest
>>packages (as stated within this thread), your clients should be ok.
>You
>>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>>this file contains one line for each channel your client subscribes,
>>you are fine.
>>
>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>@Phil has written in his blog years ago. See
>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spacewalk
>>
>>You need to create these files for each repo, of course.
>>
>>But even if this all works, you might still hit another bug with newer
>>Ubuntu / Debian distros using newer APT version, which got some
>>"improvements".
>>The error you might hit is the missing "Multi-Arch" header missing
>>within the repo meta data for each channel.
>>
>>So.....what I currently do (on my SW 2.7) system is.
>>
>>- Use the "old" sync script from Steve Meier in a modified version.
>>(see my repo
>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-header)
>>- wait some minutes after the sync finshed to let SW recreate the
>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>missing)
>>- now run my spacewalk-add-debian-multiarch-header script to add the
>>missing headers to the packages.gz for each Debian channel I synced
>>before.
>>- now sign the repos
>>
>>Now, if all went well, clients have been patched (apt-spacewalk),
>>server has been patched (rhnRepository.py - see PR 636), your clients
>>should work.
>>
>>Robert
>>
>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>> D: Called refresh_list
>>> Updating package profile
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>> D: local action status: (0, 'package list refreshed', {})
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>
>>> Does anyone have any ideas?
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Robert Paschedag <***@web.de>
>>> Sent: Monday, September 24, 2018 2:28 PM
>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>> >Thanks much for this. I’m not seeing any difference in the behavior
>
>>> >of my 16.04 clients. They are able to register, but doing a package
>
>>> >update fails (any package):
>>> >
>>> >[cid:***@01D4540F.FE7E7510]
>>> >
>>>
>>> I'm pretty sure, you are not using signs repos.
>>>
>>> Newer "apt", especially the python "apt" module fails while checking
>>the signatures of the repo, thus the "update" fails.
>>>
>>> Note: it is the update ("apt-get update") within the call to install
>>the package that fails.
>>>
>>> I also had this error with Debian 9, because I did not yet "sign" my
>>repos and used "Allow unsigned = true" within apt.conf.
>>>
>>> But these settings seem to be ignored, hence, the "apt" python
>module
>>"requires" the repos to be signed. It took me a while to debug this.
>>>
>>> In case you "are" using signs repos, you should provide some more
>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>SW.
>>>
>>> Robert
>>>
>>> >From: spacewalk-list-***@redhat.com
>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>> >Sent: Monday, September 24, 2018 12:49 PM
>>> >To: spacewalk-***@redhat.com
>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>> >
>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>> >Hi all,
>>> >
>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>has
>>
>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>>> >have
>>> >14.04 & 16.04 clients and it would make my life so much easier if I
>
>>> >could get them to reliably work. I have been able to get 14.04 to
>>> >register, and even update (with minor issues), but not 16.x.
>>> >Documentation is spotty out there in Google-land.
>>> >
>>> >Any help is appreciated!
>>> >
>>> >
>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
>
>>> >Spacewalk 2.8.
>>> >
>>> >A couple of months ago, my colleague and I fixed the clients to
>work
>>
>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we backported
>
>>> >this to the 2.8 clients.
>>> >
>>> >The sources are here:
>>>
>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>>> >
>>> >We also built the packages and published them on OBS. You can use
>>> >them by doing the following:
>>> >
>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>purge
>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>the
>>
>>> >new packages $ sudo bash -c 'echo "deb
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>> >$ sudo apt-key adv --fetch-keys
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>> >$ sudo apt-get update
>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>> >
>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0
>
>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>> >
>>> >Future development of the clients are going into Spacewalk's next
>>> >release.
>>> >
>>> >
>>> >
>>> >--
>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>
>>>
>>> --
>>> sent from my mobile device
>>>
>>>
>
>
>--
>sent from my mobile device
>
>_______________________________________________
>Spacewalk-list mailing list
>Spacewalk-***@redhat.com
>https://www.redhat.com/mailman/listinfo/spacewalk-list


--
sent from my mobile device
Randall R. Sargent
2018-09-27 13:05:39 UTC
Permalink
Thanks Robert. My clients are complaining about the repos being signed with a weak digest (SHA1), but it doesn't look fatal. I thought I created the gpg keys with SHA256, but I may need to try again.

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Thursday, September 27, 2018 12:07 AM
To: spacewalk-***@redhat.com; Randall R. Sargent <***@pilotcat.com>
Cc: spacewalk-***@redhat.com
Subject: Re: [Spacewalk-list] Ubuntu/Deb Support

Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag <***@web.de>:
>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>Thanks Robert.
>>
>>I applied the patch for rhnRepository.py and verified the client
>>version is up to date using the criteria gave (spacewalk.list). I did
>>follow Phil's blog and have been able to create Release & Release.gpg
>>files. I did not do any of the patching he mentioned though because
>I'm
>>assuming my versions are updated since he wrote the post.
>>
>>Attempting to patch after that gives me the same error.
>>
>>Next I am trying to run your add-multiarch-header script but am
>getting
>>the following error:
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>Error: Inputfile '/tmp/xenial-main' not available.
>>
>>Am I just running your modified script, or do I need to run
>>spacewalk-debian-sync.pl before?
>
>Of course you must sync the repos with the modified sync script (as
>stated). This extracts the Multi-Arch headers from the original Ubuntu
>/ Debian repos and writes them to temporary files within /tmp.

But you should check your repos are signed correctly by running apt-get update.

If this does not work correctly or complains about missing release files, you made a mistake somewhere.

Robert
>
>Robert
>>
>>Thanks again.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Wednesday, September 26, 2018 10:10 AM
>>To: Randall R. Sargent <***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>
>>
>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>> An: "Robert Paschedag" <***@web.de>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> I'm having no luck getting my xenial clients to recognize the
>Release
>>& Release.gpg files in my repos. I resorted to modifying the
>>pre-invoke.py script to write [trusted=yes] for each line in
>>spacewalk.list, now I'm no longer getting complaints about missing
>>Release files when I do an apt update. I am still unable to upgrade
>any
>>packages though:
>>>
>>> # rhn_check -vvvv
>>> D: check_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> updateLoginInfo() login info
>>> D: login(forceUpdate=True) invoked
>>> logging into up2date server
>>> D: rpcServer: Calling XMLRPC up2date.login
>>> D: writeCachedLogin() invoked
>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>1537970585.67 seconds.
>>> successfully retrieved authentication token from up2date server
>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>'X-RHN-Auth-Server-Time':
>>> '1537966985.69', 'X-RHN-Auth':
>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>'X-RHN-Auth-Channels':
>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>'0',
>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>'3600.0'}
>>> D: handle_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> D: handle_action actionid = 26, version = 2
>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>'1',
>>
>>> 'amd64-deb']]
>>> Apt-Spacewalk: Updating sources.list
>>
>>Error starts here
>>
>>> D: Sending back response(1, 'update failed', {})
>>
>>The python-apt module failes to verify the repos.
>>
>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>patch to support "signed" debian repos. See PR
>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>part you need to patch on the server.
>>
>>You also need to patch the clients. If you installed the newest
>>packages (as stated within this thread), your clients should be ok.
>You
>>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>>this file contains one line for each channel your client subscribes,
>>you are fine.
>>
>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>@Phil has written in his blog years ago. See
>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spa
>>cewalk
>>
>>You need to create these files for each repo, of course.
>>
>>But even if this all works, you might still hit another bug with newer
>>Ubuntu / Debian distros using newer APT version, which got some
>>"improvements".
>>The error you might hit is the missing "Multi-Arch" header missing
>>within the repo meta data for each channel.
>>
>>So.....what I currently do (on my SW 2.7) system is.
>>
>>- Use the "old" sync script from Steve Meier in a modified version.
>>(see my repo
>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-he
>>ader)
>>- wait some minutes after the sync finshed to let SW recreate the
>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>missing)
>>- now run my spacewalk-add-debian-multiarch-header script to add the
>>missing headers to the packages.gz for each Debian channel I synced
>>before.
>>- now sign the repos
>>
>>Now, if all went well, clients have been patched (apt-spacewalk),
>>server has been patched (rhnRepository.py - see PR 636), your clients
>>should work.
>>
>>Robert
>>
>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>> D: Called refresh_list
>>> Updating package profile
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>> D: local action status: (0, 'package list refreshed', {})
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>
>>> Does anyone have any ideas?
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Robert Paschedag <***@web.de>
>>> Sent: Monday, September 24, 2018 2:28 PM
>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>> >Thanks much for this. I’m not seeing any difference in the behavior
>
>>> >of my 16.04 clients. They are able to register, but doing a package
>
>>> >update fails (any package):
>>> >
>>> >[cid:***@01D4540F.FE7E7510]
>>> >
>>>
>>> I'm pretty sure, you are not using signs repos.
>>>
>>> Newer "apt", especially the python "apt" module fails while checking
>>the signatures of the repo, thus the "update" fails.
>>>
>>> Note: it is the update ("apt-get update") within the call to install
>>the package that fails.
>>>
>>> I also had this error with Debian 9, because I did not yet "sign" my
>>repos and used "Allow unsigned = true" within apt.conf.
>>>
>>> But these settings seem to be ignored, hence, the "apt" python
>module
>>"requires" the repos to be signed. It took me a while to debug this.
>>>
>>> In case you "are" using signs repos, you should provide some more
>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>SW.
>>>
>>> Robert
>>>
>>> >From: spacewalk-list-***@redhat.com
>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>> >Sent: Monday, September 24, 2018 12:49 PM
>>> >To: spacewalk-***@redhat.com
>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>> >
>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>> >Hi all,
>>> >
>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>has
>>
>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>>> >have
>>> >14.04 & 16.04 clients and it would make my life so much easier if I
>
>>> >could get them to reliably work. I have been able to get 14.04 to
>>> >register, and even update (with minor issues), but not 16.x.
>>> >Documentation is spotty out there in Google-land.
>>> >
>>> >Any help is appreciated!
>>> >
>>> >
>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
>
>>> >Spacewalk 2.8.
>>> >
>>> >A couple of months ago, my colleague and I fixed the clients to
>work
>>
>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we backported
>
>>> >this to the 2.8 clients.
>>> >
>>> >The sources are here:
>>>
>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>>> >
>>> >We also built the packages and published them on OBS. You can use
>>> >them by doing the following:
>>> >
>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>purge
>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>the
>>
>>> >new packages $ sudo bash -c 'echo "deb
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>> >$ sudo apt-key adv --fetch-keys
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>> >$ sudo apt-get update
>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>> >
>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0
>
>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>> >
>>> >Future development of the clients are going into Spacewalk's next
>>> >release.
>>> >
>>> >
>>> >
>>> >--
>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>
>>>
>>> --
>>> sent from my mobile device
>>>
>>>
>
>
>--
>sent from my mobile device
>
>_______________________________________________
>Spacewalk-list mailing list
>Spacewalk-***@redhat.com
>https://www.redhat.com/mailman/listinfo/spacewalk-list


--
sent from my mobile device
Randall R. Sargent
2018-09-27 13:39:40 UTC
Permalink
The other issue I'm having is the sync script keeps keeps giving me "rhnpush failed". The first time it was permissions issues for the apache process on /tmp. I fixed that and got about 75% of the way finished syncing, then it did it again. Next I tried running it as 'apache' and now I'm getting permission issues writing to '/usr/share/httpd/.rhnpushcache'.

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Thursday, September 27, 2018 12:07 AM
To: spacewalk-***@redhat.com; Randall R. Sargent <***@pilotcat.com>
Cc: spacewalk-***@redhat.com
Subject: Re: [Spacewalk-list] Ubuntu/Deb Support

Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag <***@web.de>:
>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>Thanks Robert.
>>
>>I applied the patch for rhnRepository.py and verified the client
>>version is up to date using the criteria gave (spacewalk.list). I did
>>follow Phil's blog and have been able to create Release & Release.gpg
>>files. I did not do any of the patching he mentioned though because
>I'm
>>assuming my versions are updated since he wrote the post.
>>
>>Attempting to patch after that gives me the same error.
>>
>>Next I am trying to run your add-multiarch-header script but am
>getting
>>the following error:
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>Error: Inputfile '/tmp/xenial-main' not available.
>>
>>Am I just running your modified script, or do I need to run
>>spacewalk-debian-sync.pl before?
>
>Of course you must sync the repos with the modified sync script (as
>stated). This extracts the Multi-Arch headers from the original Ubuntu
>/ Debian repos and writes them to temporary files within /tmp.

But you should check your repos are signed correctly by running apt-get update.

If this does not work correctly or complains about missing release files, you made a mistake somewhere.

Robert
>
>Robert
>>
>>Thanks again.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Wednesday, September 26, 2018 10:10 AM
>>To: Randall R. Sargent <***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>
>>
>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>> An: "Robert Paschedag" <***@web.de>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> I'm having no luck getting my xenial clients to recognize the
>Release
>>& Release.gpg files in my repos. I resorted to modifying the
>>pre-invoke.py script to write [trusted=yes] for each line in
>>spacewalk.list, now I'm no longer getting complaints about missing
>>Release files when I do an apt update. I am still unable to upgrade
>any
>>packages though:
>>>
>>> # rhn_check -vvvv
>>> D: check_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> updateLoginInfo() login info
>>> D: login(forceUpdate=True) invoked
>>> logging into up2date server
>>> D: rpcServer: Calling XMLRPC up2date.login
>>> D: writeCachedLogin() invoked
>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>1537970585.67 seconds.
>>> successfully retrieved authentication token from up2date server
>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>'X-RHN-Auth-Server-Time':
>>> '1537966985.69', 'X-RHN-Auth':
>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>'X-RHN-Auth-Channels':
>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>'0',
>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>'3600.0'}
>>> D: handle_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> D: handle_action actionid = 26, version = 2
>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>'1',
>>
>>> 'amd64-deb']]
>>> Apt-Spacewalk: Updating sources.list
>>
>>Error starts here
>>
>>> D: Sending back response(1, 'update failed', {})
>>
>>The python-apt module failes to verify the repos.
>>
>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>patch to support "signed" debian repos. See PR
>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>part you need to patch on the server.
>>
>>You also need to patch the clients. If you installed the newest
>>packages (as stated within this thread), your clients should be ok.
>You
>>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>>this file contains one line for each channel your client subscribes,
>>you are fine.
>>
>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>@Phil has written in his blog years ago. See
>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spa
>>cewalk
>>
>>You need to create these files for each repo, of course.
>>
>>But even if this all works, you might still hit another bug with newer
>>Ubuntu / Debian distros using newer APT version, which got some
>>"improvements".
>>The error you might hit is the missing "Multi-Arch" header missing
>>within the repo meta data for each channel.
>>
>>So.....what I currently do (on my SW 2.7) system is.
>>
>>- Use the "old" sync script from Steve Meier in a modified version.
>>(see my repo
>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-he
>>ader)
>>- wait some minutes after the sync finshed to let SW recreate the
>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>missing)
>>- now run my spacewalk-add-debian-multiarch-header script to add the
>>missing headers to the packages.gz for each Debian channel I synced
>>before.
>>- now sign the repos
>>
>>Now, if all went well, clients have been patched (apt-spacewalk),
>>server has been patched (rhnRepository.py - see PR 636), your clients
>>should work.
>>
>>Robert
>>
>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>> D: Called refresh_list
>>> Updating package profile
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>> D: local action status: (0, 'package list refreshed', {})
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>
>>> Does anyone have any ideas?
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Robert Paschedag <***@web.de>
>>> Sent: Monday, September 24, 2018 2:28 PM
>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>> >Thanks much for this. I’m not seeing any difference in the behavior
>
>>> >of my 16.04 clients. They are able to register, but doing a package
>
>>> >update fails (any package):
>>> >
>>> >[cid:***@01D4540F.FE7E7510]
>>> >
>>>
>>> I'm pretty sure, you are not using signs repos.
>>>
>>> Newer "apt", especially the python "apt" module fails while checking
>>the signatures of the repo, thus the "update" fails.
>>>
>>> Note: it is the update ("apt-get update") within the call to install
>>the package that fails.
>>>
>>> I also had this error with Debian 9, because I did not yet "sign" my
>>repos and used "Allow unsigned = true" within apt.conf.
>>>
>>> But these settings seem to be ignored, hence, the "apt" python
>module
>>"requires" the repos to be signed. It took me a while to debug this.
>>>
>>> In case you "are" using signs repos, you should provide some more
>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>SW.
>>>
>>> Robert
>>>
>>> >From: spacewalk-list-***@redhat.com
>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>> >Sent: Monday, September 24, 2018 12:49 PM
>>> >To: spacewalk-***@redhat.com
>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>> >
>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>> >Hi all,
>>> >
>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>has
>>
>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>>> >have
>>> >14.04 & 16.04 clients and it would make my life so much easier if I
>
>>> >could get them to reliably work. I have been able to get 14.04 to
>>> >register, and even update (with minor issues), but not 16.x.
>>> >Documentation is spotty out there in Google-land.
>>> >
>>> >Any help is appreciated!
>>> >
>>> >
>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
>
>>> >Spacewalk 2.8.
>>> >
>>> >A couple of months ago, my colleague and I fixed the clients to
>work
>>
>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we backported
>
>>> >this to the 2.8 clients.
>>> >
>>> >The sources are here:
>>>
>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>>> >
>>> >We also built the packages and published them on OBS. You can use
>>> >them by doing the following:
>>> >
>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>purge
>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>the
>>
>>> >new packages $ sudo bash -c 'echo "deb
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>> >$ sudo apt-key adv --fetch-keys
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>> >$ sudo apt-get update
>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>> >
>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0
>
>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>> >
>>> >Future development of the clients are going into Spacewalk's next
>>> >release.
>>> >
>>> >
>>> >
>>> >--
>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>
>>>
>>> --
>>> sent from my mobile device
>>>
>>>
>
>
>--
>sent from my mobile device
>
>_______________________________________________
>Spacewalk-list mailing list
>Spacewalk-***@redhat.com
>https://www.redhat.com/mailman/listinfo/spacewalk-list


--
sent from my mobile device
Randall R. Sargent
2018-09-27 20:55:40 UTC
Permalink
I'm still unable to update packages on Xenial. I've updated '/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py' to include Release files, I'm using spacewalk-debian-sync.pl & spacewalk-add-debian-multiarch-header.py to sync repos and 'secureApt.sh' to sign the files. Running 'apt update' on the client gives zero errors on the Spacewalk repos. Still not working.

Does anyone have ideas? How can I debug to get the reason why the rhnpush-initiated update is failing?

/etc/rhn/spacewalk-debian-sync.pl --url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/ --channel=xenial-main --username=xxxx --password=xxxx

/etc/rhn/spacewalk-add-debian-multiarch-header.py /var/cache/rhn/repodata/xenial-main/Packages /var/satellite/sat-tmp/xenial-main

gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new > /var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r /var/cache/rhn/repodata/xenial-main/Packages

/var/cache/rhn/repodata/xenial-main/Packages.gz

/etc/rhn/secureApt.sh xenial-main Xenial

-----Original Message-----
From: Randall R. Sargent
Sent: Thursday, September 27, 2018 8:40 AM
To: 'Robert Paschedag' <***@web.de>; spacewalk-***@redhat.com
Cc: spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

The other issue I'm having is the sync script keeps keeps giving me "rhnpush failed". The first time it was permissions issues for the apache process on /tmp. I fixed that and got about 75% of the way finished syncing, then it did it again. Next I tried running it as 'apache' and now I'm getting permission issues writing to '/usr/share/httpd/.rhnpushcache'.

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Thursday, September 27, 2018 12:07 AM
To: spacewalk-***@redhat.com; Randall R. Sargent <***@pilotcat.com>
Cc: spacewalk-***@redhat.com
Subject: Re: [Spacewalk-list] Ubuntu/Deb Support

Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag <***@web.de>:
>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>Thanks Robert.
>>
>>I applied the patch for rhnRepository.py and verified the client
>>version is up to date using the criteria gave (spacewalk.list). I did
>>follow Phil's blog and have been able to create Release & Release.gpg
>>files. I did not do any of the patching he mentioned though because
>I'm
>>assuming my versions are updated since he wrote the post.
>>
>>Attempting to patch after that gives me the same error.
>>
>>Next I am trying to run your add-multiarch-header script but am
>getting
>>the following error:
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>Error: Inputfile '/tmp/xenial-main' not available.
>>
>>Am I just running your modified script, or do I need to run
>>spacewalk-debian-sync.pl before?
>
>Of course you must sync the repos with the modified sync script (as
>stated). This extracts the Multi-Arch headers from the original Ubuntu
>/ Debian repos and writes them to temporary files within /tmp.

But you should check your repos are signed correctly by running apt-get update.

If this does not work correctly or complains about missing release files, you made a mistake somewhere.

Robert
>
>Robert
>>
>>Thanks again.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Wednesday, September 26, 2018 10:10 AM
>>To: Randall R. Sargent <***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>
>>
>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>> An: "Robert Paschedag" <***@web.de>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> I'm having no luck getting my xenial clients to recognize the
>Release
>>& Release.gpg files in my repos. I resorted to modifying the
>>pre-invoke.py script to write [trusted=yes] for each line in
>>spacewalk.list, now I'm no longer getting complaints about missing
>>Release files when I do an apt update. I am still unable to upgrade
>any
>>packages though:
>>>
>>> # rhn_check -vvvv
>>> D: check_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> updateLoginInfo() login info
>>> D: login(forceUpdate=True) invoked
>>> logging into up2date server
>>> D: rpcServer: Calling XMLRPC up2date.login
>>> D: writeCachedLogin() invoked
>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>1537970585.67 seconds.
>>> successfully retrieved authentication token from up2date server
>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>'X-RHN-Auth-Server-Time':
>>> '1537966985.69', 'X-RHN-Auth':
>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>'X-RHN-Auth-Channels':
>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>'0',
>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>'3600.0'}
>>> D: handle_action{'action': "<?xml
>>>
>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>
>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>
>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>
>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>
>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>
>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>> D: handle_action actionid = 26, version = 2
>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>'1',
>>
>>> 'amd64-deb']]
>>> Apt-Spacewalk: Updating sources.list
>>
>>Error starts here
>>
>>> D: Sending back response(1, 'update failed', {})
>>
>>The python-apt module failes to verify the repos.
>>
>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>patch to support "signed" debian repos. See PR
>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>part you need to patch on the server.
>>
>>You also need to patch the clients. If you installed the newest
>>packages (as stated within this thread), your clients should be ok.
>You
>>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>>this file contains one line for each channel your client subscribes,
>>you are fine.
>>
>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>@Phil has written in his blog years ago. See
>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spa
>>cewalk
>>
>>You need to create these files for each repo, of course.
>>
>>But even if this all works, you might still hit another bug with newer
>>Ubuntu / Debian distros using newer APT version, which got some
>>"improvements".
>>The error you might hit is the missing "Multi-Arch" header missing
>>within the repo meta data for each channel.
>>
>>So.....what I currently do (on my SW 2.7) system is.
>>
>>- Use the "old" sync script from Steve Meier in a modified version.
>>(see my repo
>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-he
>>ader)
>>- wait some minutes after the sync finshed to let SW recreate the
>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>missing)
>>- now run my spacewalk-add-debian-multiarch-header script to add the
>>missing headers to the packages.gz for each Debian channel I synced
>>before.
>>- now sign the repos
>>
>>Now, if all went well, clients have been patched (apt-spacewalk),
>>server has been patched (rhnRepository.py - see PR 636), your clients
>>should work.
>>
>>Robert
>>
>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>> D: Called refresh_list
>>> Updating package profile
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>> D: local action status: (0, 'package list refreshed', {})
>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>
>>> Does anyone have any ideas?
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Robert Paschedag <***@web.de>
>>> Sent: Monday, September 24, 2018 2:28 PM
>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>> >Thanks much for this. I’m not seeing any difference in the behavior
>
>>> >of my 16.04 clients. They are able to register, but doing a package
>
>>> >update fails (any package):
>>> >
>>> >[cid:***@01D4540F.FE7E7510]
>>> >
>>>
>>> I'm pretty sure, you are not using signs repos.
>>>
>>> Newer "apt", especially the python "apt" module fails while checking
>>the signatures of the repo, thus the "update" fails.
>>>
>>> Note: it is the update ("apt-get update") within the call to install
>>the package that fails.
>>>
>>> I also had this error with Debian 9, because I did not yet "sign" my
>>repos and used "Allow unsigned = true" within apt.conf.
>>>
>>> But these settings seem to be ignored, hence, the "apt" python
>module
>>"requires" the repos to be signed. It took me a while to debug this.
>>>
>>> In case you "are" using signs repos, you should provide some more
>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>SW.
>>>
>>> Robert
>>>
>>> >From: spacewalk-list-***@redhat.com
>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>> >Sent: Monday, September 24, 2018 12:49 PM
>>> >To: spacewalk-***@redhat.com
>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>> >
>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>> >Hi all,
>>> >
>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>has
>>
>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>>> >have
>>> >14.04 & 16.04 clients and it would make my life so much easier if I
>
>>> >could get them to reliably work. I have been able to get 14.04 to
>>> >register, and even update (with minor issues), but not 16.x.
>>> >Documentation is spotty out there in Google-land.
>>> >
>>> >Any help is appreciated!
>>> >
>>> >
>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients with
>
>>> >Spacewalk 2.8.
>>> >
>>> >A couple of months ago, my colleague and I fixed the clients to
>work
>>
>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we backported
>
>>> >this to the 2.8 clients.
>>> >
>>> >The sources are here:
>>>
>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>>> >
>>> >We also built the packages and published them on OBS. You can use
>>> >them by doing the following:
>>> >
>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>purge
>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>the
>>
>>> >new packages $ sudo bash -c 'echo "deb
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>> >$ sudo apt-key adv --fetch-keys
>>>
>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>> >$ sudo apt-get update
>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>> >
>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian 8.0
>
>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>> >
>>> >Future development of the clients are going into Spacewalk's next
>>> >release.
>>> >
>>> >
>>> >
>>> >--
>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>
>>>
>>> --
>>> sent from my mobile device
>>>
>>>
>
>
>--
>sent from my mobile device
>
>_______________________________________________
>Spacewalk-list mailing list
>Spacewalk-***@redhat.com
>https://www.redhat.com/mailman/listinfo/spacewalk-list


--
sent from my mobile device
Robert Paschedag
2018-09-28 05:11:01 UTC
Permalink
Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>I'm still unable to update packages on Xenial. I've updated
>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py' to
>include Release files, I'm using spacewalk-debian-sync.pl &
>spacewalk-add-debian-multiarch-header.py to sync repos and
>'secureApt.sh' to sign the files. Running 'apt update' on the client
>gives zero errors on the Spacewalk repos. Still not working.

Also no warning anymore about low security SHA1?

Well...I would tail the http logs while trying to update a package on the client. As it is trying to update the cache, you should find requests to your release and package files.

Finally.. Debug python. Schedule a package install via SW and run "python -i -m pdb $(which rhn_check)" on the client

You need to know the line within the python-apt module you want to start debug. (I think it's the "update" function within the "cache.py" file). Set a breakpoint within debugger with "break <full_path_to_file>:<line_number>"

Robert
>
>Does anyone have ideas? How can I debug to get the reason why the
>rhnpush-initiated update is failing?
>
>/etc/rhn/spacewalk-debian-sync.pl
>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/
>--channel=xenial-main --username=xxxx --password=xxxx
>
>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>/var/cache/rhn/repodata/xenial-main/Packages
>/var/satellite/sat-tmp/xenial-main
>
>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>/var/cache/rhn/repodata/xenial-main/Packages
>
>/var/cache/rhn/repodata/xenial-main/Packages.gz
>
>/etc/rhn/secureApt.sh xenial-main Xenial
>
>-----Original Message-----
>From: Randall R. Sargent
>Sent: Thursday, September 27, 2018 8:40 AM
>To: 'Robert Paschedag' <***@web.de>;
>spacewalk-***@redhat.com
>Cc: spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>The other issue I'm having is the sync script keeps keeps giving me
>"rhnpush failed". The first time it was permissions issues for the
>apache process on /tmp. I fixed that and got about 75% of the way
>finished syncing, then it did it again. Next I tried running it as
>'apache' and now I'm getting permission issues writing to
>'/usr/share/httpd/.rhnpushcache'.
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Thursday, September 27, 2018 12:07 AM
>To: spacewalk-***@redhat.com; Randall R. Sargent
><***@pilotcat.com>
>Cc: spacewalk-***@redhat.com
>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
><***@web.de>:
>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>>Thanks Robert.
>>>
>>>I applied the patch for rhnRepository.py and verified the client
>>>version is up to date using the criteria gave (spacewalk.list). I did
>
>>>follow Phil's blog and have been able to create Release & Release.gpg
>
>>>files. I did not do any of the patching he mentioned though because
>>I'm
>>>assuming my versions are updated since he wrote the post.
>>>
>>>Attempting to patch after that gives me the same error.
>>>
>>>Next I am trying to run your add-multiarch-header script but am
>>getting
>>>the following error:
>>>
>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>
>>>Am I just running your modified script, or do I need to run
>>>spacewalk-debian-sync.pl before?
>>
>>Of course you must sync the repos with the modified sync script (as
>>stated). This extracts the Multi-Arch headers from the original Ubuntu
>
>>/ Debian repos and writes them to temporary files within /tmp.
>
>But you should check your repos are signed correctly by running apt-get
>update.
>
>If this does not work correctly or complains about missing release
>files, you made a mistake somewhere.
>
>Robert
>>
>>Robert
>>>
>>>Thanks again.
>>>
>>>-----Original Message-----
>>>From: Robert Paschedag <***@web.de>
>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>To: Randall R. Sargent <***@pilotcat.com>
>>>Cc: spacewalk-***@redhat.com
>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>
>>>
>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>> An: "Robert Paschedag" <***@web.de>,
>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>> I'm having no luck getting my xenial clients to recognize the
>>Release
>>>& Release.gpg files in my repos. I resorted to modifying the
>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>Release files when I do an apt update. I am still unable to upgrade
>>any
>>>packages though:
>>>>
>>>> # rhn_check -vvvv
>>>> D: check_action{'action': "<?xml
>>>>
>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>>
>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>>
>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>>
>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>>
>>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>>
>>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>> updateLoginInfo() login info
>>>> D: login(forceUpdate=True) invoked
>>>> logging into up2date server
>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>> D: writeCachedLogin() invoked
>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>1537970585.67 seconds.
>>>> successfully retrieved authentication token from up2date server
>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>'X-RHN-Auth-Server-Time':
>>>> '1537966985.69', 'X-RHN-Auth':
>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>'X-RHN-Auth-Channels':
>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>'0',
>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>'3600.0'}
>>>> D: handle_action{'action': "<?xml
>>>>
>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName
>>>>
>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<val
>>>>
>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4<
>>>>
>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value>
>>>>
>>><string>1</string></value>\n<value><string>amd64-deb</string></value>\
>>>>
>>>n</data></array></value>\n</data></array></value>\n</param>\n</params>
>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>> D: handle_action actionid = 26, version = 2
>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>'1',
>>>
>>>> 'amd64-deb']]
>>>> Apt-Spacewalk: Updating sources.list
>>>
>>>Error starts here
>>>
>>>> D: Sending back response(1, 'update failed', {})
>>>
>>>The python-apt module failes to verify the repos.
>>>
>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>>patch to support "signed" debian repos. See PR
>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>>part you need to patch on the server.
>>>
>>>You also need to patch the clients. If you installed the newest
>>>packages (as stated within this thread), your clients should be ok.
>>You
>>>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>
>>>this file contains one line for each channel your client subscribes,
>>>you are fine.
>>>
>>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>>@Phil has written in his blog years ago. See
>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-spa
>>>cewalk
>>>
>>>You need to create these files for each repo, of course.
>>>
>>>But even if this all works, you might still hit another bug with
>newer
>>>Ubuntu / Debian distros using newer APT version, which got some
>>>"improvements".
>>>The error you might hit is the missing "Multi-Arch" header missing
>>>within the repo meta data for each channel.
>>>
>>>So.....what I currently do (on my SW 2.7) system is.
>>>
>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>(see my repo
>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-he
>>>ader)
>>>- wait some minutes after the sync finshed to let SW recreate the
>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>missing)
>>>- now run my spacewalk-add-debian-multiarch-header script to add the
>>>missing headers to the packages.gz for each Debian channel I synced
>>>before.
>>>- now sign the repos
>>>
>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>server has been patched (rhnRepository.py - see PR 636), your clients
>
>>>should work.
>>>
>>>Robert
>>>
>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>> D: Called refresh_list
>>>> Updating package profile
>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>> D: local action status: (0, 'package list refreshed', {})
>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>
>>>> Does anyone have any ideas?
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Robert Paschedag <***@web.de>
>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>><***@pilotcat.com>:
>>>> >Thanks much for this. I’m not seeing any difference in the
>behavior
>>
>>>> >of my 16.04 clients. They are able to register, but doing a
>package
>>
>>>> >update fails (any package):
>>>> >
>>>> >[cid:***@01D4540F.FE7E7510]
>>>> >
>>>>
>>>> I'm pretty sure, you are not using signs repos.
>>>>
>>>> Newer "apt", especially the python "apt" module fails while
>checking
>>>the signatures of the repo, thus the "update" fails.
>>>>
>>>> Note: it is the update ("apt-get update") within the call to
>install
>>>the package that fails.
>>>>
>>>> I also had this error with Debian 9, because I did not yet "sign"
>my
>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>
>>>> But these settings seem to be ignored, hence, the "apt" python
>>module
>>>"requires" the repos to be signed. It took me a while to debug this.
>>>>
>>>> In case you "are" using signs repos, you should provide some more
>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>SW.
>>>>
>>>> Robert
>>>>
>>>> >From: spacewalk-list-***@redhat.com
>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>> >To: spacewalk-***@redhat.com
>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>> >
>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>> >Hi all,
>>>> >
>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>has
>>>
>>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>>>> >have
>>>> >14.04 & 16.04 clients and it would make my life so much easier if
>I
>>
>>>> >could get them to reliably work. I have been able to get 14.04 to
>>>> >register, and even update (with minor issues), but not 16.x.
>>>> >Documentation is spotty out there in Google-land.
>>>> >
>>>> >Any help is appreciated!
>>>> >
>>>> >
>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>with
>>
>>>> >Spacewalk 2.8.
>>>> >
>>>> >A couple of months ago, my colleague and I fixed the clients to
>>work
>>>
>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>backported
>>
>>>> >this to the 2.8 clients.
>>>> >
>>>> >The sources are here:
>>>>
>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packages
>>>> >
>>>> >We also built the packages and published them on OBS. You can use
>>>> >them by doing the following:
>>>> >
>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>purge
>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>the
>>>
>>>> >new packages $ sudo bash -c 'echo "deb
>>>>
>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>> >$ sudo apt-key adv --fetch-keys
>>>>
>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>> >$ sudo apt-get update
>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>> >
>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>8.0
>>
>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>> >
>>>> >Future development of the clients are going into Spacewalk's next
>>>> >release.
>>>> >
>>>> >
>>>> >
>>>> >--
>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>
>>>>
>>>> --
>>>> sent from my mobile device
>>>>
>>>>
>>
>>
>>--
>>sent from my mobile device
>>
>>_______________________________________________
>>Spacewalk-list mailing list
>>Spacewalk-***@redhat.com
>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Randall R. Sargent
2018-09-28 14:23:42 UTC
Permalink
I'm finding two cache.py files. Which am I debugging?

/usr/lib/python2.7/dist-packages/apt/cache.py

/usr/lib/python3/dist-packages/apt/cache.py

Yes, no SHA1 errors. I re-did the key with SHA256.

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Friday, September 28, 2018 12:11 AM
To: Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>I'm still unable to update packages on Xenial. I've updated
>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py' to
>include Release files, I'm using spacewalk-debian-sync.pl &
>spacewalk-add-debian-multiarch-header.py to sync repos and
>'secureApt.sh' to sign the files. Running 'apt update' on the client
>gives zero errors on the Spacewalk repos. Still not working.

Also no warning anymore about low security SHA1?

Well...I would tail the http logs while trying to update a package on the client. As it is trying to update the cache, you should find requests to your release and package files.

Finally.. Debug python. Schedule a package install via SW and run "python -i -m pdb $(which rhn_check)" on the client

You need to know the line within the python-apt module you want to start debug. (I think it's the "update" function within the "cache.py" file). Set a breakpoint within debugger with "break <full_path_to_file>:<line_number>"

Robert
>
>Does anyone have ideas? How can I debug to get the reason why the
>rhnpush-initiated update is failing?
>
>/etc/rhn/spacewalk-debian-sync.pl
>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd6
>4/ --channel=xenial-main --username=xxxx --password=xxxx
>
>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>/var/cache/rhn/repodata/xenial-main/Packages
>/var/satellite/sat-tmp/xenial-main
>
>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>/var/cache/rhn/repodata/xenial-main/Packages
>
>/var/cache/rhn/repodata/xenial-main/Packages.gz
>
>/etc/rhn/secureApt.sh xenial-main Xenial
>
>-----Original Message-----
>From: Randall R. Sargent
>Sent: Thursday, September 27, 2018 8:40 AM
>To: 'Robert Paschedag' <***@web.de>;
>spacewalk-***@redhat.com
>Cc: spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>The other issue I'm having is the sync script keeps keeps giving me
>"rhnpush failed". The first time it was permissions issues for the
>apache process on /tmp. I fixed that and got about 75% of the way
>finished syncing, then it did it again. Next I tried running it as
>'apache' and now I'm getting permission issues writing to
>'/usr/share/httpd/.rhnpushcache'.
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Thursday, September 27, 2018 12:07 AM
>To: spacewalk-***@redhat.com; Randall R. Sargent
><***@pilotcat.com>
>Cc: spacewalk-***@redhat.com
>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
><***@web.de>:
>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>>Thanks Robert.
>>>
>>>I applied the patch for rhnRepository.py and verified the client
>>>version is up to date using the criteria gave (spacewalk.list). I did
>
>>>follow Phil's blog and have been able to create Release & Release.gpg
>
>>>files. I did not do any of the patching he mentioned though because
>>I'm
>>>assuming my versions are updated since he wrote the post.
>>>
>>>Attempting to patch after that gives me the same error.
>>>
>>>Next I am trying to run your add-multiarch-header script but am
>>getting
>>>the following error:
>>>
>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>
>>>Am I just running your modified script, or do I need to run
>>>spacewalk-debian-sync.pl before?
>>
>>Of course you must sync the repos with the modified sync script (as
>>stated). This extracts the Multi-Arch headers from the original Ubuntu
>
>>/ Debian repos and writes them to temporary files within /tmp.
>
>But you should check your repos are signed correctly by running apt-get
>update.
>
>If this does not work correctly or complains about missing release
>files, you made a mistake somewhere.
>
>Robert
>>
>>Robert
>>>
>>>Thanks again.
>>>
>>>-----Original Message-----
>>>From: Robert Paschedag <***@web.de>
>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>To: Randall R. Sargent <***@pilotcat.com>
>>>Cc: spacewalk-***@redhat.com
>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>
>>>
>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>> An: "Robert Paschedag" <***@web.de>,
>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>> I'm having no luck getting my xenial clients to recognize the
>>Release
>>>& Release.gpg files in my repos. I resorted to modifying the
>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>Release files when I do an apt update. I am still unable to upgrade
>>any
>>>packages though:
>>>>
>>>> # rhn_check -vvvv
>>>> D: check_action{'action': "<?xml
>>>>
>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNam
>>>e
>>>>
>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<va
>>>>l
>>>>
>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4
>>>ue><
>>>>
>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value
>>>>
>>>>
>>><string>1</string></value>\n<value><string>amd64-deb</string></value>
>>>\
>>>>
>>>n</data></array></value>\n</data></array></value>\n</param>\n</params
>>>>
>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>> updateLoginInfo() login info
>>>> D: login(forceUpdate=True) invoked
>>>> logging into up2date server
>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>> D: writeCachedLogin() invoked
>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>1537970585.67 seconds.
>>>> successfully retrieved authentication token from up2date server
>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>'X-RHN-Auth-Server-Time':
>>>> '1537966985.69', 'X-RHN-Auth':
>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>'X-RHN-Auth-Channels':
>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>'0',
>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>'3600.0'}
>>>> D: handle_action{'action': "<?xml
>>>>
>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNam
>>>e
>>>>
>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<va
>>>>l
>>>>
>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4
>>>ue><
>>>>
>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value
>>>>
>>>>
>>><string>1</string></value>\n<value><string>amd64-deb</string></value>
>>>\
>>>>
>>>n</data></array></value>\n</data></array></value>\n</param>\n</params
>>>>
>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>> D: handle_action actionid = 26, version = 2
>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>'1',
>>>
>>>> 'amd64-deb']]
>>>> Apt-Spacewalk: Updating sources.list
>>>
>>>Error starts here
>>>
>>>> D: Sending back response(1, 'update failed', {})
>>>
>>>The python-apt module failes to verify the repos.
>>>
>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>>patch to support "signed" debian repos. See PR
>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>>part you need to patch on the server.
>>>
>>>You also need to patch the clients. If you installed the newest
>>>packages (as stated within this thread), your clients should be ok.
>>You
>>>can check this within your /etc/apt/sources.list.d/spacewalk file. If
>
>>>this file contains one line for each channel your client subscribes,
>>>you are fine.
>>>
>>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>>@Phil has written in his blog years ago. See
>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-sp
>>>a
>>>cewalk
>>>
>>>You need to create these files for each repo, of course.
>>>
>>>But even if this all works, you might still hit another bug with
>newer
>>>Ubuntu / Debian distros using newer APT version, which got some
>>>"improvements".
>>>The error you might hit is the missing "Multi-Arch" header missing
>>>within the repo meta data for each channel.
>>>
>>>So.....what I currently do (on my SW 2.7) system is.
>>>
>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>(see my repo
>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-h
>>>e
>>>ader)
>>>- wait some minutes after the sync finshed to let SW recreate the
>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>missing)
>>>- now run my spacewalk-add-debian-multiarch-header script to add the
>>>missing headers to the packages.gz for each Debian channel I synced
>>>before.
>>>- now sign the repos
>>>
>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>server has been patched (rhnRepository.py - see PR 636), your clients
>
>>>should work.
>>>
>>>Robert
>>>
>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>> D: Called refresh_list
>>>> Updating package profile
>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>> D: local action status: (0, 'package list refreshed', {})
>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>
>>>> Does anyone have any ideas?
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Robert Paschedag <***@web.de>
>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>><***@pilotcat.com>:
>>>> >Thanks much for this. I’m not seeing any difference in the
>behavior
>>
>>>> >of my 16.04 clients. They are able to register, but doing a
>package
>>
>>>> >update fails (any package):
>>>> >
>>>> >[cid:***@01D4540F.FE7E7510]
>>>> >
>>>>
>>>> I'm pretty sure, you are not using signs repos.
>>>>
>>>> Newer "apt", especially the python "apt" module fails while
>checking
>>>the signatures of the repo, thus the "update" fails.
>>>>
>>>> Note: it is the update ("apt-get update") within the call to
>install
>>>the package that fails.
>>>>
>>>> I also had this error with Debian 9, because I did not yet "sign"
>my
>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>
>>>> But these settings seem to be ignored, hence, the "apt" python
>>module
>>>"requires" the repos to be signed. It took me a while to debug this.
>>>>
>>>> In case you "are" using signs repos, you should provide some more
>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>SW.
>>>>
>>>> Robert
>>>>
>>>> >From: spacewalk-list-***@redhat.com
>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>> >To: spacewalk-***@redhat.com
>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>> >
>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>> >Hi all,
>>>> >
>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>has
>>>
>>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>>>> >have
>>>> >14.04 & 16.04 clients and it would make my life so much easier if
>I
>>
>>>> >could get them to reliably work. I have been able to get 14.04 to
>>>> >register, and even update (with minor issues), but not 16.x.
>>>> >Documentation is spotty out there in Google-land.
>>>> >
>>>> >Any help is appreciated!
>>>> >
>>>> >
>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>with
>>
>>>> >Spacewalk 2.8.
>>>> >
>>>> >A couple of months ago, my colleague and I fixed the clients to
>>work
>>>
>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>backported
>>
>>>> >this to the 2.8 clients.
>>>> >
>>>> >The sources are here:
>>>>
>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-package
>>>>s
>>>> >
>>>> >We also built the packages and published them on OBS. You can use
>>>> >them by doing the following:
>>>> >
>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>purge
>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>the
>>>
>>>> >new packages $ sudo bash -c 'echo "deb
>>>>
>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>> >$ sudo apt-key adv --fetch-keys
>>>>
>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>> >$ sudo apt-get update
>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>> >
>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>8.0
>>
>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>> >
>>>> >Future development of the clients are going into Spacewalk's next
>>>> >release.
>>>> >
>>>> >
>>>> >
>>>> >--
>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>
>>>>
>>>> --
>>>> sent from my mobile device
>>>>
>>>>
>>
>>
>>--
>>sent from my mobile device
>>
>>_______________________________________________
>>Spacewalk-list mailing list
>>Spacewalk-***@redhat.com
>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Robert Paschedag
2018-09-28 15:24:32 UTC
Permalink
Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>I'm finding two cache.py files. Which am I debugging?
>
>/usr/lib/python2.7/dist-packages/apt/cache.py
>
>/usr/lib/python3/dist-packages/apt/cache.py

That depends on your default version of Python and the shebang line within "rhn_check"

But if apt-get update does not complain anymore, the update should work... Or say, the cache update should not be the problem anymore.

What if you try to install the package manually via apt-get install??

Robert
>
>Yes, no SHA1 errors. I re-did the key with SHA256.
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 12:11 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>I'm still unable to update packages on Xenial. I've updated
>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>to
>>include Release files, I'm using spacewalk-debian-sync.pl &
>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>>gives zero errors on the Spacewalk repos. Still not working.
>
>Also no warning anymore about low security SHA1?
>
>Well...I would tail the http logs while trying to update a package on
>the client. As it is trying to update the cache, you should find
>requests to your release and package files.
>
>Finally.. Debug python. Schedule a package install via SW and run
>"python -i -m pdb $(which rhn_check)" on the client
>
>You need to know the line within the python-apt module you want to
>start debug. (I think it's the "update" function within the "cache.py"
>file). Set a breakpoint within debugger with "break
><full_path_to_file>:<line_number>"
>
>Robert
>>
>>Does anyone have ideas? How can I debug to get the reason why the
>>rhnpush-initiated update is failing?
>>
>>/etc/rhn/spacewalk-debian-sync.pl
>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd6
>>4/ --channel=xenial-main --username=xxxx --password=xxxx
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages
>>/var/satellite/sat-tmp/xenial-main
>>
>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>/var/cache/rhn/repodata/xenial-main/Packages
>>
>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>
>>/etc/rhn/secureApt.sh xenial-main Xenial
>>
>>-----Original Message-----
>>From: Randall R. Sargent
>>Sent: Thursday, September 27, 2018 8:40 AM
>>To: 'Robert Paschedag' <***@web.de>;
>>spacewalk-***@redhat.com
>>Cc: spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>The other issue I'm having is the sync script keeps keeps giving me
>>"rhnpush failed". The first time it was permissions issues for the
>>apache process on /tmp. I fixed that and got about 75% of the way
>>finished syncing, then it did it again. Next I tried running it as
>>'apache' and now I'm getting permission issues writing to
>>'/usr/share/httpd/.rhnpushcache'.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Thursday, September 27, 2018 12:07 AM
>>To: spacewalk-***@redhat.com; Randall R. Sargent
>><***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>><***@web.de>:
>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>><***@pilotcat.com>:
>>>>Thanks Robert.
>>>>
>>>>I applied the patch for rhnRepository.py and verified the client
>>>>version is up to date using the criteria gave (spacewalk.list). I
>did
>>
>>>>follow Phil's blog and have been able to create Release &
>Release.gpg
>>
>>>>files. I did not do any of the patching he mentioned though because
>>>I'm
>>>>assuming my versions are updated since he wrote the post.
>>>>
>>>>Attempting to patch after that gives me the same error.
>>>>
>>>>Next I am trying to run your add-multiarch-header script but am
>>>getting
>>>>the following error:
>>>>
>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>
>>>>Am I just running your modified script, or do I need to run
>>>>spacewalk-debian-sync.pl before?
>>>
>>>Of course you must sync the repos with the modified sync script (as
>>>stated). This extracts the Multi-Arch headers from the original
>Ubuntu
>>
>>>/ Debian repos and writes them to temporary files within /tmp.
>>
>>But you should check your repos are signed correctly by running
>apt-get
>>update.
>>
>>If this does not work correctly or complains about missing release
>>files, you made a mistake somewhere.
>>
>>Robert
>>>
>>>Robert
>>>>
>>>>Thanks again.
>>>>
>>>>-----Original Message-----
>>>>From: Robert Paschedag <***@web.de>
>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>Cc: spacewalk-***@redhat.com
>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>>
>>>>
>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>> I'm having no luck getting my xenial clients to recognize the
>>>Release
>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>>Release files when I do an apt update. I am still unable to upgrade
>>>any
>>>>packages though:
>>>>>
>>>>> # rhn_check -vvvv
>>>>> D: check_action{'action': "<?xml
>>>>>
>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNam
>>>>e
>>>>>
>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<va
>>>>>l
>>>>>
>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4
>>>>ue><
>>>>>
>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value
>>>>>
>>>>>
>>>><string>1</string></value>\n<value><string>amd64-deb</string></value>
>>>>\
>>>>>
>>>>n</data></array></value>\n</data></array></value>\n</param>\n</params
>>>>>
>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>> updateLoginInfo() login info
>>>>> D: login(forceUpdate=True) invoked
>>>>> logging into up2date server
>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>> D: writeCachedLogin() invoked
>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>1537970585.67 seconds.
>>>>> successfully retrieved authentication token from up2date server
>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>'X-RHN-Auth-Server-Time':
>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>'X-RHN-Auth-Channels':
>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>>'0',
>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>'3600.0'}
>>>>> D: handle_action{'action': "<?xml
>>>>>
>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNam
>>>>e
>>>>>
>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<va
>>>>>l
>>>>>
>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P4
>>>>ue><
>>>>>
>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<value
>>>>>
>>>>>
>>>><string>1</string></value>\n<value><string>amd64-deb</string></value>
>>>>\
>>>>>
>>>>n</data></array></value>\n</data></array></value>\n</param>\n</params
>>>>>
>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>> D: handle_action actionid = 26, version = 2
>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>'1',
>>>>
>>>>> 'amd64-deb']]
>>>>> Apt-Spacewalk: Updating sources.list
>>>>
>>>>Error starts here
>>>>
>>>>> D: Sending back response(1, 'update failed', {})
>>>>
>>>>The python-apt module failes to verify the repos.
>>>>
>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>>>patch to support "signed" debian repos. See PR
>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>>>part you need to patch on the server.
>>>>
>>>>You also need to patch the clients. If you installed the newest
>>>>packages (as stated within this thread), your clients should be ok.
>>>You
>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>If
>>
>>>>this file contains one line for each channel your client subscribes,
>
>>>>you are fine.
>>>>
>>>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>>>@Phil has written in his blog years ago. See
>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-sp
>>>>a
>>>>cewalk
>>>>
>>>>You need to create these files for each repo, of course.
>>>>
>>>>But even if this all works, you might still hit another bug with
>>newer
>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>"improvements".
>>>>The error you might hit is the missing "Multi-Arch" header missing
>>>>within the repo meta data for each channel.
>>>>
>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>
>>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>>(see my repo
>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-h
>>>>e
>>>>ader)
>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>missing)
>>>>- now run my spacewalk-add-debian-multiarch-header script to add the
>
>>>>missing headers to the packages.gz for each Debian channel I synced
>>>>before.
>>>>- now sign the repos
>>>>
>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>server has been patched (rhnRepository.py - see PR 636), your
>clients
>>
>>>>should work.
>>>>
>>>>Robert
>>>>
>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>> D: Called refresh_list
>>>>> Updating package profile
>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>
>>>>> Does anyone have any ideas?
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Robert Paschedag <***@web.de>
>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>><***@pilotcat.com>:
>>>>> >Thanks much for this. I’m not seeing any difference in the
>>behavior
>>>
>>>>> >of my 16.04 clients. They are able to register, but doing a
>>package
>>>
>>>>> >update fails (any package):
>>>>> >
>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>> >
>>>>>
>>>>> I'm pretty sure, you are not using signs repos.
>>>>>
>>>>> Newer "apt", especially the python "apt" module fails while
>>checking
>>>>the signatures of the repo, thus the "update" fails.
>>>>>
>>>>> Note: it is the update ("apt-get update") within the call to
>>install
>>>>the package that fails.
>>>>>
>>>>> I also had this error with Debian 9, because I did not yet "sign"
>>my
>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>
>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>module
>>>>"requires" the repos to be signed. It took me a while to debug this.
>>>>>
>>>>> In case you "are" using signs repos, you should provide some more
>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>>SW.
>>>>>
>>>>> Robert
>>>>>
>>>>> >From: spacewalk-list-***@redhat.com
>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>> >To: spacewalk-***@redhat.com
>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>> >
>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>> >Hi all,
>>>>> >
>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>>has
>>>>
>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>
>>>>> >have
>>>>> >14.04 & 16.04 clients and it would make my life so much easier if
>>I
>>>
>>>>> >could get them to reliably work. I have been able to get 14.04 to
>
>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>> >Documentation is spotty out there in Google-land.
>>>>> >
>>>>> >Any help is appreciated!
>>>>> >
>>>>> >
>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>with
>>>
>>>>> >Spacewalk 2.8.
>>>>> >
>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>work
>>>>
>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>backported
>>>
>>>>> >this to the 2.8 clients.
>>>>> >
>>>>> >The sources are here:
>>>>>
>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-package
>>>>>s
>>>>> >
>>>>> >We also built the packages and published them on OBS. You can use
>
>>>>> >them by doing the following:
>>>>> >
>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>purge
>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>>the
>>>>
>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>
>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>
>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>> >$ sudo apt-get update
>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>> >
>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>8.0
>>>
>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>> >
>>>>> >Future development of the clients are going into Spacewalk's next
>
>>>>> >release.
>>>>> >
>>>>> >
>>>>> >
>>>>> >--
>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>
>>>>>
>>>>> --
>>>>> sent from my mobile device
>>>>>
>>>>>
>>>
>>>
>>>--
>>>sent from my mobile device
>>>
>>>_______________________________________________
>>>Spacewalk-list mailing list
>>>Spacewalk-***@redhat.com
>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Randall R. Sargent
2018-09-28 16:06:58 UTC
Permalink
Trying to install 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb' - which also shows as an available upgrade package in SW:

# apt install bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
E: Couldn't find any package by glob 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
E: Couldn't find any package by regex 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Friday, September 28, 2018 10:25 AM
To: Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>I'm finding two cache.py files. Which am I debugging?
>
>/usr/lib/python2.7/dist-packages/apt/cache.py
>
>/usr/lib/python3/dist-packages/apt/cache.py

That depends on your default version of Python and the shebang line within "rhn_check"

But if apt-get update does not complain anymore, the update should work... Or say, the cache update should not be the problem anymore.

What if you try to install the package manually via apt-get install??

Robert
>
>Yes, no SHA1 errors. I re-did the key with SHA256.
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 12:11 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>I'm still unable to update packages on Xenial. I've updated
>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>to
>>include Release files, I'm using spacewalk-debian-sync.pl &
>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>>gives zero errors on the Spacewalk repos. Still not working.
>
>Also no warning anymore about low security SHA1?
>
>Well...I would tail the http logs while trying to update a package on
>the client. As it is trying to update the cache, you should find
>requests to your release and package files.
>
>Finally.. Debug python. Schedule a package install via SW and run
>"python -i -m pdb $(which rhn_check)" on the client
>
>You need to know the line within the python-apt module you want to
>start debug. (I think it's the "update" function within the "cache.py"
>file). Set a breakpoint within debugger with "break
><full_path_to_file>:<line_number>"
>
>Robert
>>
>>Does anyone have ideas? How can I debug to get the reason why the
>>rhnpush-initiated update is failing?
>>
>>/etc/rhn/spacewalk-debian-sync.pl
>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd
>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages
>>/var/satellite/sat-tmp/xenial-main
>>
>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>/var/cache/rhn/repodata/xenial-main/Packages
>>
>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>
>>/etc/rhn/secureApt.sh xenial-main Xenial
>>
>>-----Original Message-----
>>From: Randall R. Sargent
>>Sent: Thursday, September 27, 2018 8:40 AM
>>To: 'Robert Paschedag' <***@web.de>;
>>spacewalk-***@redhat.com
>>Cc: spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>The other issue I'm having is the sync script keeps keeps giving me
>>"rhnpush failed". The first time it was permissions issues for the
>>apache process on /tmp. I fixed that and got about 75% of the way
>>finished syncing, then it did it again. Next I tried running it as
>>'apache' and now I'm getting permission issues writing to
>>'/usr/share/httpd/.rhnpushcache'.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Thursday, September 27, 2018 12:07 AM
>>To: spacewalk-***@redhat.com; Randall R. Sargent
>><***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>><***@web.de>:
>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>><***@pilotcat.com>:
>>>>Thanks Robert.
>>>>
>>>>I applied the patch for rhnRepository.py and verified the client
>>>>version is up to date using the criteria gave (spacewalk.list). I
>did
>>
>>>>follow Phil's blog and have been able to create Release &
>Release.gpg
>>
>>>>files. I did not do any of the patching he mentioned though because
>>>I'm
>>>>assuming my versions are updated since he wrote the post.
>>>>
>>>>Attempting to patch after that gives me the same error.
>>>>
>>>>Next I am trying to run your add-multiarch-header script but am
>>>getting
>>>>the following error:
>>>>
>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>
>>>>Am I just running your modified script, or do I need to run
>>>>spacewalk-debian-sync.pl before?
>>>
>>>Of course you must sync the repos with the modified sync script (as
>>>stated). This extracts the Multi-Arch headers from the original
>Ubuntu
>>
>>>/ Debian repos and writes them to temporary files within /tmp.
>>
>>But you should check your repos are signed correctly by running
>apt-get
>>update.
>>
>>If this does not work correctly or complains about missing release
>>files, you made a mistake somewhere.
>>
>>Robert
>>>
>>>Robert
>>>>
>>>>Thanks again.
>>>>
>>>>-----Original Message-----
>>>>From: Robert Paschedag <***@web.de>
>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>Cc: spacewalk-***@redhat.com
>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>>
>>>>
>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>> I'm having no luck getting my xenial clients to recognize the
>>>Release
>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>>Release files when I do an apt update. I am still unable to upgrade
>>>any
>>>>packages though:
>>>>>
>>>>> # rhn_check -vvvv
>>>>> D: check_action{'action': "<?xml
>>>>>
>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNa
>>>>m
>>>>e
>>>>>
>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<v
>>>>>a
>>>>>l
>>>>>
>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P
>>>>ue>4
>>>>ue><
>>>>>
>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<valu
>>>>e
>>>>>
>>>>>
>>>><string>1</string></value>\n<value><string>amd64-deb</string></value
>>>>>
>>>>\
>>>>>
>>>>n</data></array></value>\n</data></array></value>\n</param>\n</param
>>>>s
>>>>>
>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>> updateLoginInfo() login info
>>>>> D: login(forceUpdate=True) invoked logging into up2date server
>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>> D: writeCachedLogin() invoked
>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>1537970585.67 seconds.
>>>>> successfully retrieved authentication token from up2date server
>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>'X-RHN-Auth-Server-Time':
>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>'X-RHN-Auth-Channels':
>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>>'0',
>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>'3600.0'}
>>>>> D: handle_action{'action': "<?xml
>>>>>
>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNa
>>>>m
>>>>e
>>>>>
>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<v
>>>>>a
>>>>>l
>>>>>
>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P
>>>>ue>4
>>>>ue><
>>>>>
>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<valu
>>>>e
>>>>>
>>>>>
>>>><string>1</string></value>\n<value><string>amd64-deb</string></value
>>>>>
>>>>\
>>>>>
>>>>n</data></array></value>\n</data></array></value>\n</param>\n</param
>>>>s
>>>>>
>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>> D: handle_action actionid = 26, version = 2
>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>'1',
>>>>
>>>>> 'amd64-deb']]
>>>>> Apt-Spacewalk: Updating sources.list
>>>>
>>>>Error starts here
>>>>
>>>>> D: Sending back response(1, 'update failed', {})
>>>>
>>>>The python-apt module failes to verify the repos.
>>>>
>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>>>patch to support "signed" debian repos. See PR
>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>>>part you need to patch on the server.
>>>>
>>>>You also need to patch the clients. If you installed the newest
>>>>packages (as stated within this thread), your clients should be ok.
>>>You
>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>If
>>
>>>>this file contains one line for each channel your client subscribes,
>
>>>>you are fine.
>>>>
>>>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>>>@Phil has written in his blog years ago. See
>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-s
>>>>p
>>>>a
>>>>cewalk
>>>>
>>>>You need to create these files for each repo, of course.
>>>>
>>>>But even if this all works, you might still hit another bug with
>>newer
>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>"improvements".
>>>>The error you might hit is the missing "Multi-Arch" header missing
>>>>within the repo meta data for each channel.
>>>>
>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>
>>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>>(see my repo
>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-
>>>>h
>>>>e
>>>>ader)
>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>missing)
>>>>- now run my spacewalk-add-debian-multiarch-header script to add the
>
>>>>missing headers to the packages.gz for each Debian channel I synced
>>>>before.
>>>>- now sign the repos
>>>>
>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>server has been patched (rhnRepository.py - see PR 636), your
>clients
>>
>>>>should work.
>>>>
>>>>Robert
>>>>
>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>> D: Called refresh_list
>>>>> Updating package profile
>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>
>>>>> Does anyone have any ideas?
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Robert Paschedag <***@web.de>
>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>><***@pilotcat.com>:
>>>>> >Thanks much for this. I’m not seeing any difference in the
>>behavior
>>>
>>>>> >of my 16.04 clients. They are able to register, but doing a
>>package
>>>
>>>>> >update fails (any package):
>>>>> >
>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>> >
>>>>>
>>>>> I'm pretty sure, you are not using signs repos.
>>>>>
>>>>> Newer "apt", especially the python "apt" module fails while
>>checking
>>>>the signatures of the repo, thus the "update" fails.
>>>>>
>>>>> Note: it is the update ("apt-get update") within the call to
>>install
>>>>the package that fails.
>>>>>
>>>>> I also had this error with Debian 9, because I did not yet "sign"
>>my
>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>
>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>module
>>>>"requires" the repos to be signed. It took me a while to debug this.
>>>>>
>>>>> In case you "are" using signs repos, you should provide some more
>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>>SW.
>>>>>
>>>>> Robert
>>>>>
>>>>> >From: spacewalk-list-***@redhat.com
>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>> >To: spacewalk-***@redhat.com
>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>> >
>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>> >Hi all,
>>>>> >
>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>>has
>>>>
>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>
>>>>> >have
>>>>> >14.04 & 16.04 clients and it would make my life so much easier if
>>I
>>>
>>>>> >could get them to reliably work. I have been able to get 14.04 to
>
>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>> >Documentation is spotty out there in Google-land.
>>>>> >
>>>>> >Any help is appreciated!
>>>>> >
>>>>> >
>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>with
>>>
>>>>> >Spacewalk 2.8.
>>>>> >
>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>work
>>>>
>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>backported
>>>
>>>>> >this to the 2.8 clients.
>>>>> >
>>>>> >The sources are here:
>>>>>
>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packag
>>>>>e
>>>>>s
>>>>> >
>>>>> >We also built the packages and published them on OBS. You can use
>
>>>>> >them by doing the following:
>>>>> >
>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>purge
>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>>the
>>>>
>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>
>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>
>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>> >$ sudo apt-get update
>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>> >
>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>8.0
>>>
>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>> >
>>>>> >Future development of the clients are going into Spacewalk's next
>
>>>>> >release.
>>>>> >
>>>>> >
>>>>> >
>>>>> >--
>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>
>>>>>
>>>>> --
>>>>> sent from my mobile device
>>>>>
>>>>>
>>>
>>>
>>>--
>>>sent from my mobile device
>>>
>>>_______________________________________________
>>>Spacewalk-list mailing list
>>>Spacewalk-***@redhat.com
>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Robert Paschedag
2018-09-28 16:23:51 UTC
Permalink
Am 28. September 2018 18:06:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Trying to install 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb' -
>which also shows as an available upgrade package in SW:
>
># apt install bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>E: Unable to locate package
>bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>E: Couldn't find any package by glob
>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>E: Couldn't find any package by regex
>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'

apt-get install bind9-host


>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 10:25 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>I'm finding two cache.py files. Which am I debugging?
>>
>>/usr/lib/python2.7/dist-packages/apt/cache.py
>>
>>/usr/lib/python3/dist-packages/apt/cache.py
>
>That depends on your default version of Python and the shebang line
>within "rhn_check"
>
>But if apt-get update does not complain anymore, the update should
>work... Or say, the cache update should not be the problem anymore.
>
>What if you try to install the package manually via apt-get install??
>
>Robert
>>
>>Yes, no SHA1 errors. I re-did the key with SHA256.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Friday, September 28, 2018 12:11 AM
>>To: Randall R. Sargent <***@pilotcat.com>;
>>spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>>I'm still unable to update packages on Xenial. I've updated
>>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>>to
>>>include Release files, I'm using spacewalk-debian-sync.pl &
>>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>>>gives zero errors on the Spacewalk repos. Still not working.
>>
>>Also no warning anymore about low security SHA1?
>>
>>Well...I would tail the http logs while trying to update a package on
>>the client. As it is trying to update the cache, you should find
>>requests to your release and package files.
>>
>>Finally.. Debug python. Schedule a package install via SW and run
>>"python -i -m pdb $(which rhn_check)" on the client
>>
>>You need to know the line within the python-apt module you want to
>>start debug. (I think it's the "update" function within the "cache.py"
>>file). Set a breakpoint within debugger with "break
>><full_path_to_file>:<line_number>"
>>
>>Robert
>>>
>>>Does anyone have ideas? How can I debug to get the reason why the
>>>rhnpush-initiated update is failing?
>>>
>>>/etc/rhn/spacewalk-debian-sync.pl
>>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd
>>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
>>>
>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>/var/satellite/sat-tmp/xenial-main
>>>
>>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>
>>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>>
>>>/etc/rhn/secureApt.sh xenial-main Xenial
>>>
>>>-----Original Message-----
>>>From: Randall R. Sargent
>>>Sent: Thursday, September 27, 2018 8:40 AM
>>>To: 'Robert Paschedag' <***@web.de>;
>>>spacewalk-***@redhat.com
>>>Cc: spacewalk-***@redhat.com
>>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>The other issue I'm having is the sync script keeps keeps giving me
>>>"rhnpush failed". The first time it was permissions issues for the
>>>apache process on /tmp. I fixed that and got about 75% of the way
>>>finished syncing, then it did it again. Next I tried running it as
>>>'apache' and now I'm getting permission issues writing to
>>>'/usr/share/httpd/.rhnpushcache'.
>>>
>>>-----Original Message-----
>>>From: Robert Paschedag <***@web.de>
>>>Sent: Thursday, September 27, 2018 12:07 AM
>>>To: spacewalk-***@redhat.com; Randall R. Sargent
>>><***@pilotcat.com>
>>>Cc: spacewalk-***@redhat.com
>>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>>><***@web.de>:
>>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>>><***@pilotcat.com>:
>>>>>Thanks Robert.
>>>>>
>>>>>I applied the patch for rhnRepository.py and verified the client
>>>>>version is up to date using the criteria gave (spacewalk.list). I
>>did
>>>
>>>>>follow Phil's blog and have been able to create Release &
>>Release.gpg
>>>
>>>>>files. I did not do any of the patching he mentioned though because
>>>>I'm
>>>>>assuming my versions are updated since he wrote the post.
>>>>>
>>>>>Attempting to patch after that gives me the same error.
>>>>>
>>>>>Next I am trying to run your add-multiarch-header script but am
>>>>getting
>>>>>the following error:
>>>>>
>>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>>
>>>>>Am I just running your modified script, or do I need to run
>>>>>spacewalk-debian-sync.pl before?
>>>>
>>>>Of course you must sync the repos with the modified sync script (as
>>>>stated). This extracts the Multi-Arch headers from the original
>>Ubuntu
>>>
>>>>/ Debian repos and writes them to temporary files within /tmp.
>>>
>>>But you should check your repos are signed correctly by running
>>apt-get
>>>update.
>>>
>>>If this does not work correctly or complains about missing release
>>>files, you made a mistake somewhere.
>>>
>>>Robert
>>>>
>>>>Robert
>>>>>
>>>>>Thanks again.
>>>>>
>>>>>-----Original Message-----
>>>>>From: Robert Paschedag <***@web.de>
>>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>>Cc: spacewalk-***@redhat.com
>>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>>
>>>>>
>>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>> I'm having no luck getting my xenial clients to recognize the
>>>>Release
>>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>>>Release files when I do an apt update. I am still unable to upgrade
>>>>any
>>>>>packages though:
>>>>>>
>>>>>> # rhn_check -vvvv
>>>>>> D: check_action{'action': "<?xml
>>>>>>
>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNa
>>>>>m
>>>>>e
>>>>>>
>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<v
>>>>>>a
>>>>>>l
>>>>>>
>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P
>>>>>ue>4
>>>>>ue><
>>>>>>
>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<valu
>>>>>e
>>>>>>
>>>>>>
>>>>><string>1</string></value>\n<value><string>amd64-deb</string></value
>>>>>>
>>>>>\
>>>>>>
>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</param
>>>>>s
>>>>>>
>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>> updateLoginInfo() login info
>>>>>> D: login(forceUpdate=True) invoked logging into up2date server
>>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>>> D: writeCachedLogin() invoked
>>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>>1537970585.67 seconds.
>>>>>> successfully retrieved authentication token from up2date server
>>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>>'X-RHN-Auth-Server-Time':
>>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>>'X-RHN-Auth-Channels':
>>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>
>>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>>>'0',
>>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>>'3600.0'}
>>>>>> D: handle_action{'action': "<?xml
>>>>>>
>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNa
>>>>>m
>>>>>e
>>>>>>
>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<v
>>>>>>a
>>>>>>l
>>>>>>
>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P
>>>>>ue>4
>>>>>ue><
>>>>>>
>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<valu
>>>>>e
>>>>>>
>>>>>>
>>>>><string>1</string></value>\n<value><string>amd64-deb</string></value
>>>>>>
>>>>>\
>>>>>>
>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</param
>>>>>s
>>>>>>
>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>> D: handle_action actionid = 26, version = 2
>>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>>'1',
>>>>>
>>>>>> 'amd64-deb']]
>>>>>> Apt-Spacewalk: Updating sources.list
>>>>>
>>>>>Error starts here
>>>>>
>>>>>> D: Sending back response(1, 'update failed', {})
>>>>>
>>>>>The python-apt module failes to verify the repos.
>>>>>
>>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>
>>>>>patch to support "signed" debian repos. See PR
>>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>
>>>>>part you need to patch on the server.
>>>>>
>>>>>You also need to patch the clients. If you installed the newest
>>>>>packages (as stated within this thread), your clients should be ok.
>>>>You
>>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>>If
>>>
>>>>>this file contains one line for each channel your client
>subscribes,
>>
>>>>>you are fine.
>>>>>
>>>>>Now you still need to create the "InRelease" or "Release.gpg"
>files.
>>>>>@Phil has written in his blog years ago. See
>>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-s
>>>>>p
>>>>>a
>>>>>cewalk
>>>>>
>>>>>You need to create these files for each repo, of course.
>>>>>
>>>>>But even if this all works, you might still hit another bug with
>>>newer
>>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>>"improvements".
>>>>>The error you might hit is the missing "Multi-Arch" header missing
>>>>>within the repo meta data for each channel.
>>>>>
>>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>>
>>>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>>>(see my repo
>>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-
>>>>>h
>>>>>e
>>>>>ader)
>>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>>missing)
>>>>>- now run my spacewalk-add-debian-multiarch-header script to add
>the
>>
>>>>>missing headers to the packages.gz for each Debian channel I synced
>
>>>>>before.
>>>>>- now sign the repos
>>>>>
>>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>>server has been patched (rhnRepository.py - see PR 636), your
>>clients
>>>
>>>>>should work.
>>>>>
>>>>>Robert
>>>>>
>>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>>> D: Called refresh_list
>>>>>> Updating package profile
>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>>
>>>>>> Does anyone have any ideas?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Robert Paschedag <***@web.de>
>>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>>><***@pilotcat.com>:
>>>>>> >Thanks much for this. I’m not seeing any difference in the
>>>behavior
>>>>
>>>>>> >of my 16.04 clients. They are able to register, but doing a
>>>package
>>>>
>>>>>> >update fails (any package):
>>>>>> >
>>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>>> >
>>>>>>
>>>>>> I'm pretty sure, you are not using signs repos.
>>>>>>
>>>>>> Newer "apt", especially the python "apt" module fails while
>>>checking
>>>>>the signatures of the repo, thus the "update" fails.
>>>>>>
>>>>>> Note: it is the update ("apt-get update") within the call to
>>>install
>>>>>the package that fails.
>>>>>>
>>>>>> I also had this error with Debian 9, because I did not yet "sign"
>>>my
>>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>>
>>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>>module
>>>>>"requires" the repos to be signed. It took me a while to debug
>this.
>>>>>>
>>>>>> In case you "are" using signs repos, you should provide some more
>>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>>>SW.
>>>>>>
>>>>>> Robert
>>>>>>
>>>>>> >From: spacewalk-list-***@redhat.com
>>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>>> >To: spacewalk-***@redhat.com
>>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>> >
>>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>>> >Hi all,
>>>>>> >
>>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>>>has
>>>>>
>>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8?
>We
>>
>>>>>> >have
>>>>>> >14.04 & 16.04 clients and it would make my life so much easier
>if
>>>I
>>>>
>>>>>> >could get them to reliably work. I have been able to get 14.04
>to
>>
>>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>>> >Documentation is spotty out there in Google-land.
>>>>>> >
>>>>>> >Any help is appreciated!
>>>>>> >
>>>>>> >
>>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>>with
>>>>
>>>>>> >Spacewalk 2.8.
>>>>>> >
>>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>>work
>>>>>
>>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>>backported
>>>>
>>>>>> >this to the 2.8 clients.
>>>>>> >
>>>>>> >The sources are here:
>>>>>>
>>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packag
>>>>>>e
>>>>>>s
>>>>>> >
>>>>>> >We also built the packages and published them on OBS. You can
>use
>>
>>>>>> >them by doing the following:
>>>>>> >
>>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>>purge
>>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>>>the
>>>>>
>>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>>
>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>>
>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>>> >$ sudo apt-get update
>>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>>> >
>>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>>8.0
>>>>
>>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>
>>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>>> >
>>>>>> >Future development of the clients are going into Spacewalk's
>next
>>
>>>>>> >release.
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >--
>>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>>
>>>>>>
>>>>>> --
>>>>>> sent from my mobile device
>>>>>>
>>>>>>
>>>>
>>>>
>>>>--
>>>>sent from my mobile device
>>>>
>>>>_______________________________________________
>>>>Spacewalk-list mailing list
>>>>Spacewalk-***@redhat.com
>>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>>
>>>--
>>>sent from my mobile device
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Randall R. Sargent
2018-09-28 16:34:50 UTC
Permalink
I'm an idiot. Yes, that worked, but it looks like it's getting it from the ubuntu repos instead of Spacewalk:

# apt install bind9-host
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141
Suggested packages:
rblcheck
The following packages will be upgraded:
bind9-host dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141
7 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Need to get 1,321 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 bind9-host amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [38.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dnsutils amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [89.2 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisc160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [215 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdns162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [881 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisccfg140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [40.4 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblwres141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [33.7 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libbind9-140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [23.6 kB]
Fetched 1,321 kB in 0s (1,712 kB/s)
(Reading database ... 71960 files and directories currently installed.)
Preparing to unpack .../bind9-host_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../dnsutils_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libisc160_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libisccfg140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../liblwres141_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libbind9-140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Apt-Spacewalk: Updating package profile



-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Friday, September 28, 2018 11:24 AM
To: Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

Am 28. September 2018 18:06:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Trying to install 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb' -
>which also shows as an available upgrade package in SW:
>
># apt install bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>E: Unable to locate package
>bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>E: Couldn't find any package by glob
>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>E: Couldn't find any package by regex
>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'

apt-get install bind9-host


>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 10:25 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>I'm finding two cache.py files. Which am I debugging?
>>
>>/usr/lib/python2.7/dist-packages/apt/cache.py
>>
>>/usr/lib/python3/dist-packages/apt/cache.py
>
>That depends on your default version of Python and the shebang line
>within "rhn_check"
>
>But if apt-get update does not complain anymore, the update should
>work... Or say, the cache update should not be the problem anymore.
>
>What if you try to install the package manually via apt-get install??
>
>Robert
>>
>>Yes, no SHA1 errors. I re-did the key with SHA256.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Friday, September 28, 2018 12:11 AM
>>To: Randall R. Sargent <***@pilotcat.com>;
>>spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>>I'm still unable to update packages on Xenial. I've updated
>>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>>to
>>>include Release files, I'm using spacewalk-debian-sync.pl &
>>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>>>gives zero errors on the Spacewalk repos. Still not working.
>>
>>Also no warning anymore about low security SHA1?
>>
>>Well...I would tail the http logs while trying to update a package on
>>the client. As it is trying to update the cache, you should find
>>requests to your release and package files.
>>
>>Finally.. Debug python. Schedule a package install via SW and run
>>"python -i -m pdb $(which rhn_check)" on the client
>>
>>You need to know the line within the python-apt module you want to
>>start debug. (I think it's the "update" function within the "cache.py"
>>file). Set a breakpoint within debugger with "break
>><full_path_to_file>:<line_number>"
>>
>>Robert
>>>
>>>Does anyone have ideas? How can I debug to get the reason why the
>>>rhnpush-initiated update is failing?
>>>
>>>/etc/rhn/spacewalk-debian-sync.pl
>>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-am
>>>d
>>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
>>>
>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>/var/satellite/sat-tmp/xenial-main
>>>
>>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>
>>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>>
>>>/etc/rhn/secureApt.sh xenial-main Xenial
>>>
>>>-----Original Message-----
>>>From: Randall R. Sargent
>>>Sent: Thursday, September 27, 2018 8:40 AM
>>>To: 'Robert Paschedag' <***@web.de>;
>>>spacewalk-***@redhat.com
>>>Cc: spacewalk-***@redhat.com
>>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>The other issue I'm having is the sync script keeps keeps giving me
>>>"rhnpush failed". The first time it was permissions issues for the
>>>apache process on /tmp. I fixed that and got about 75% of the way
>>>finished syncing, then it did it again. Next I tried running it as
>>>'apache' and now I'm getting permission issues writing to
>>>'/usr/share/httpd/.rhnpushcache'.
>>>
>>>-----Original Message-----
>>>From: Robert Paschedag <***@web.de>
>>>Sent: Thursday, September 27, 2018 12:07 AM
>>>To: spacewalk-***@redhat.com; Randall R. Sargent
>>><***@pilotcat.com>
>>>Cc: spacewalk-***@redhat.com
>>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>>><***@web.de>:
>>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>>><***@pilotcat.com>:
>>>>>Thanks Robert.
>>>>>
>>>>>I applied the patch for rhnRepository.py and verified the client
>>>>>version is up to date using the criteria gave (spacewalk.list). I
>>did
>>>
>>>>>follow Phil's blog and have been able to create Release &
>>Release.gpg
>>>
>>>>>files. I did not do any of the patching he mentioned though because
>>>>I'm
>>>>>assuming my versions are updated since he wrote the post.
>>>>>
>>>>>Attempting to patch after that gives me the same error.
>>>>>
>>>>>Next I am trying to run your add-multiarch-header script but am
>>>>getting
>>>>>the following error:
>>>>>
>>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>>
>>>>>Am I just running your modified script, or do I need to run
>>>>>spacewalk-debian-sync.pl before?
>>>>
>>>>Of course you must sync the repos with the modified sync script (as
>>>>stated). This extracts the Multi-Arch headers from the original
>>Ubuntu
>>>
>>>>/ Debian repos and writes them to temporary files within /tmp.
>>>
>>>But you should check your repos are signed correctly by running
>>apt-get
>>>update.
>>>
>>>If this does not work correctly or complains about missing release
>>>files, you made a mistake somewhere.
>>>
>>>Robert
>>>>
>>>>Robert
>>>>>
>>>>>Thanks again.
>>>>>
>>>>>-----Original Message-----
>>>>>From: Robert Paschedag <***@web.de>
>>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>>Cc: spacewalk-***@redhat.com
>>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>>
>>>>>
>>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>> I'm having no luck getting my xenial clients to recognize the
>>>>Release
>>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>>>Release files when I do an apt update. I am still unable to upgrade
>>>>any
>>>>>packages though:
>>>>>>
>>>>>> # rhn_check -vvvv
>>>>>> D: check_action{'action': "<?xml
>>>>>>
>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
>>>>>a
>>>>>m
>>>>>e
>>>>>>
>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
>>>>>>v
>>>>>>a
>>>>>>l
>>>>>>
>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
>>>>>ue>P
>>>>>ue>4
>>>>>ue><
>>>>>>
>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
>>>>>u
>>>>>e
>>>>>>
>>>>>>
>>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
>>>>>e
>>>>>>
>>>>>\
>>>>>>
>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
>>>>>m
>>>>>s
>>>>>>
>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>> updateLoginInfo() login info
>>>>>> D: login(forceUpdate=True) invoked logging into up2date server
>>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>>> D: writeCachedLogin() invoked
>>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>>1537970585.67 seconds.
>>>>>> successfully retrieved authentication token from up2date server
>>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>>'X-RHN-Auth-Server-Time':
>>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>>'X-RHN-Auth-Channels':
>>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>
>>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>>>'0',
>>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>>'3600.0'}
>>>>>> D: handle_action{'action': "<?xml
>>>>>>
>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
>>>>>a
>>>>>m
>>>>>e
>>>>>>
>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
>>>>>>v
>>>>>>a
>>>>>>l
>>>>>>
>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
>>>>>ue>P
>>>>>ue>4
>>>>>ue><
>>>>>>
>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
>>>>>u
>>>>>e
>>>>>>
>>>>>>
>>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
>>>>>e
>>>>>>
>>>>>\
>>>>>>
>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
>>>>>m
>>>>>s
>>>>>>
>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>> D: handle_action actionid = 26, version = 2
>>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>>'1',
>>>>>
>>>>>> 'amd64-deb']]
>>>>>> Apt-Spacewalk: Updating sources.list
>>>>>
>>>>>Error starts here
>>>>>
>>>>>> D: Sending back response(1, 'update failed', {})
>>>>>
>>>>>The python-apt module failes to verify the repos.
>>>>>
>>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>
>>>>>patch to support "signed" debian repos. See PR
>>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>
>>>>>part you need to patch on the server.
>>>>>
>>>>>You also need to patch the clients. If you installed the newest
>>>>>packages (as stated within this thread), your clients should be ok.
>>>>You
>>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>>If
>>>
>>>>>this file contains one line for each channel your client
>subscribes,
>>
>>>>>you are fine.
>>>>>
>>>>>Now you still need to create the "InRelease" or "Release.gpg"
>files.
>>>>>@Phil has written in his blog years ago. See
>>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-
>>>>>s
>>>>>p
>>>>>a
>>>>>cewalk
>>>>>
>>>>>You need to create these files for each repo, of course.
>>>>>
>>>>>But even if this all works, you might still hit another bug with
>>>newer
>>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>>"improvements".
>>>>>The error you might hit is the missing "Multi-Arch" header missing
>>>>>within the repo meta data for each channel.
>>>>>
>>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>>
>>>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>>>(see my repo
>>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch
>>>>>-
>>>>>h
>>>>>e
>>>>>ader)
>>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>>missing)
>>>>>- now run my spacewalk-add-debian-multiarch-header script to add
>the
>>
>>>>>missing headers to the packages.gz for each Debian channel I synced
>
>>>>>before.
>>>>>- now sign the repos
>>>>>
>>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>>server has been patched (rhnRepository.py - see PR 636), your
>>clients
>>>
>>>>>should work.
>>>>>
>>>>>Robert
>>>>>
>>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>>> D: Called refresh_list
>>>>>> Updating package profile
>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>>
>>>>>> Does anyone have any ideas?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Robert Paschedag <***@web.de>
>>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>>><***@pilotcat.com>:
>>>>>> >Thanks much for this. I’m not seeing any difference in the
>>>behavior
>>>>
>>>>>> >of my 16.04 clients. They are able to register, but doing a
>>>package
>>>>
>>>>>> >update fails (any package):
>>>>>> >
>>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>>> >
>>>>>>
>>>>>> I'm pretty sure, you are not using signs repos.
>>>>>>
>>>>>> Newer "apt", especially the python "apt" module fails while
>>>checking
>>>>>the signatures of the repo, thus the "update" fails.
>>>>>>
>>>>>> Note: it is the update ("apt-get update") within the call to
>>>install
>>>>>the package that fails.
>>>>>>
>>>>>> I also had this error with Debian 9, because I did not yet "sign"
>>>my
>>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>>
>>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>>module
>>>>>"requires" the repos to be signed. It took me a while to debug
>this.
>>>>>>
>>>>>> In case you "are" using signs repos, you should provide some more
>>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>>>SW.
>>>>>>
>>>>>> Robert
>>>>>>
>>>>>> >From: spacewalk-list-***@redhat.com
>>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>>> >To: spacewalk-***@redhat.com
>>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>> >
>>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>>> >Hi all,
>>>>>> >
>>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>>>has
>>>>>
>>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8?
>We
>>
>>>>>> >have
>>>>>> >14.04 & 16.04 clients and it would make my life so much easier
>if
>>>I
>>>>
>>>>>> >could get them to reliably work. I have been able to get 14.04
>to
>>
>>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>>> >Documentation is spotty out there in Google-land.
>>>>>> >
>>>>>> >Any help is appreciated!
>>>>>> >
>>>>>> >
>>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>>with
>>>>
>>>>>> >Spacewalk 2.8.
>>>>>> >
>>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>>work
>>>>>
>>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>>backported
>>>>
>>>>>> >this to the 2.8 clients.
>>>>>> >
>>>>>> >The sources are here:
>>>>>>
>>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packa
>>>>>>g
>>>>>>e
>>>>>>s
>>>>>> >
>>>>>> >We also built the packages and published them on OBS. You can
>use
>>
>>>>>> >them by doing the following:
>>>>>> >
>>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>>purge
>>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>>>the
>>>>>
>>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>>
>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>>
>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>>> >$ sudo apt-get update
>>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>>> >
>>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>>8.0
>>>>
>>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>
>>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>>> >
>>>>>> >Future development of the clients are going into Spacewalk's
>next
>>
>>>>>> >release.
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >--
>>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>>
>>>>>>
>>>>>> --
>>>>>> sent from my mobile device
>>>>>>
>>>>>>
>>>>
>>>>
>>>>--
>>>>sent from my mobile device
>>>>
>>>>_______________________________________________
>>>>Spacewalk-list mailing list
>>>>Spacewalk-***@redhat.com
>>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>>
>>>--
>>>sent from my mobile device
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Randall R. Sargent
2018-09-28 17:41:04 UTC
Permalink
Ok, I commented out the default sources.list and inserted the SW repos from my spacewalk.list - this time I was able to install a package manually from SW *and also able to rhn_check and upgrade packages.* So I'm confused.

What's interesting is SW was reporting 17 packages that could be upgraded, however apt list --upgradable showed over 400 packages. I applied the 17 package updates via SW and now it shows 0 updates for that client, but on the client apt list --upgradable shows 400. I manually ran apt upgrade and it ran successfully, but still shows those updates are needed. SW says no updates are available.

Help?

-----Original Message-----
From: Randall R. Sargent
Sent: Friday, September 28, 2018 11:35 AM
To: 'Robert Paschedag' <***@web.de>; spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

I'm an idiot. Yes, that worked, but it looks like it's getting it from the ubuntu repos instead of Spacewalk:

# apt install bind9-host
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141 Suggested packages:
rblcheck
The following packages will be upgraded:
bind9-host dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141
7 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
Need to get 1,321 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 bind9-host amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [38.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dnsutils amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [89.2 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisc160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [215 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdns162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [881 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisccfg140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [40.4 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblwres141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [33.7 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libbind9-140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [23.6 kB] Fetched 1,321 kB in 0s (1,712 kB/s) (Reading database ... 71960 files and directories currently installed.) Preparing to unpack .../bind9-host_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../dnsutils_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libisc160_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libisccfg140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../liblwres141_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libbind9-140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Apt-Spacewalk: Updating package profile



-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Friday, September 28, 2018 11:24 AM
To: Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

Am 28. September 2018 18:06:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>Trying to install 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb' -
>which also shows as an available upgrade package in SW:
>
># apt install bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>E: Unable to locate package
>bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>E: Couldn't find any package by glob
>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>E: Couldn't find any package by regex
>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'

apt-get install bind9-host


>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 10:25 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>I'm finding two cache.py files. Which am I debugging?
>>
>>/usr/lib/python2.7/dist-packages/apt/cache.py
>>
>>/usr/lib/python3/dist-packages/apt/cache.py
>
>That depends on your default version of Python and the shebang line
>within "rhn_check"
>
>But if apt-get update does not complain anymore, the update should
>work... Or say, the cache update should not be the problem anymore.
>
>What if you try to install the package manually via apt-get install??
>
>Robert
>>
>>Yes, no SHA1 errors. I re-did the key with SHA256.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Friday, September 28, 2018 12:11 AM
>>To: Randall R. Sargent <***@pilotcat.com>;
>>spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>>I'm still unable to update packages on Xenial. I've updated
>>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>>to
>>>include Release files, I'm using spacewalk-debian-sync.pl &
>>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>>>gives zero errors on the Spacewalk repos. Still not working.
>>
>>Also no warning anymore about low security SHA1?
>>
>>Well...I would tail the http logs while trying to update a package on
>>the client. As it is trying to update the cache, you should find
>>requests to your release and package files.
>>
>>Finally.. Debug python. Schedule a package install via SW and run
>>"python -i -m pdb $(which rhn_check)" on the client
>>
>>You need to know the line within the python-apt module you want to
>>start debug. (I think it's the "update" function within the "cache.py"
>>file). Set a breakpoint within debugger with "break
>><full_path_to_file>:<line_number>"
>>
>>Robert
>>>
>>>Does anyone have ideas? How can I debug to get the reason why the
>>>rhnpush-initiated update is failing?
>>>
>>>/etc/rhn/spacewalk-debian-sync.pl
>>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-am
>>>d
>>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
>>>
>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>/var/satellite/sat-tmp/xenial-main
>>>
>>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>
>>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>>
>>>/etc/rhn/secureApt.sh xenial-main Xenial
>>>
>>>-----Original Message-----
>>>From: Randall R. Sargent
>>>Sent: Thursday, September 27, 2018 8:40 AM
>>>To: 'Robert Paschedag' <***@web.de>;
>>>spacewalk-***@redhat.com
>>>Cc: spacewalk-***@redhat.com
>>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>The other issue I'm having is the sync script keeps keeps giving me
>>>"rhnpush failed". The first time it was permissions issues for the
>>>apache process on /tmp. I fixed that and got about 75% of the way
>>>finished syncing, then it did it again. Next I tried running it as
>>>'apache' and now I'm getting permission issues writing to
>>>'/usr/share/httpd/.rhnpushcache'.
>>>
>>>-----Original Message-----
>>>From: Robert Paschedag <***@web.de>
>>>Sent: Thursday, September 27, 2018 12:07 AM
>>>To: spacewalk-***@redhat.com; Randall R. Sargent
>>><***@pilotcat.com>
>>>Cc: spacewalk-***@redhat.com
>>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>>><***@web.de>:
>>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>>><***@pilotcat.com>:
>>>>>Thanks Robert.
>>>>>
>>>>>I applied the patch for rhnRepository.py and verified the client
>>>>>version is up to date using the criteria gave (spacewalk.list). I
>>did
>>>
>>>>>follow Phil's blog and have been able to create Release &
>>Release.gpg
>>>
>>>>>files. I did not do any of the patching he mentioned though because
>>>>I'm
>>>>>assuming my versions are updated since he wrote the post.
>>>>>
>>>>>Attempting to patch after that gives me the same error.
>>>>>
>>>>>Next I am trying to run your add-multiarch-header script but am
>>>>getting
>>>>>the following error:
>>>>>
>>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>>
>>>>>Am I just running your modified script, or do I need to run
>>>>>spacewalk-debian-sync.pl before?
>>>>
>>>>Of course you must sync the repos with the modified sync script (as
>>>>stated). This extracts the Multi-Arch headers from the original
>>Ubuntu
>>>
>>>>/ Debian repos and writes them to temporary files within /tmp.
>>>
>>>But you should check your repos are signed correctly by running
>>apt-get
>>>update.
>>>
>>>If this does not work correctly or complains about missing release
>>>files, you made a mistake somewhere.
>>>
>>>Robert
>>>>
>>>>Robert
>>>>>
>>>>>Thanks again.
>>>>>
>>>>>-----Original Message-----
>>>>>From: Robert Paschedag <***@web.de>
>>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>>Cc: spacewalk-***@redhat.com
>>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>>
>>>>>
>>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>> I'm having no luck getting my xenial clients to recognize the
>>>>Release
>>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>>>Release files when I do an apt update. I am still unable to upgrade
>>>>any
>>>>>packages though:
>>>>>>
>>>>>> # rhn_check -vvvv
>>>>>> D: check_action{'action': "<?xml
>>>>>>
>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
>>>>>a
>>>>>m
>>>>>e
>>>>>>
>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
>>>>>>v
>>>>>>a
>>>>>>l
>>>>>>
>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
>>>>>ue>P
>>>>>ue>4
>>>>>ue><
>>>>>>
>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
>>>>>u
>>>>>e
>>>>>>
>>>>>>
>>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
>>>>>e
>>>>>>
>>>>>\
>>>>>>
>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
>>>>>m
>>>>>s
>>>>>>
>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>> updateLoginInfo() login info
>>>>>> D: login(forceUpdate=True) invoked logging into up2date server
>>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>>> D: writeCachedLogin() invoked
>>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>>1537970585.67 seconds.
>>>>>> successfully retrieved authentication token from up2date server
>>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>>'X-RHN-Auth-Server-Time':
>>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>>'X-RHN-Auth-Channels':
>>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>
>>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>>>'0',
>>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>>'3600.0'}
>>>>>> D: handle_action{'action': "<?xml
>>>>>>
>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
>>>>>a
>>>>>m
>>>>>e
>>>>>>
>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
>>>>>>v
>>>>>>a
>>>>>>l
>>>>>>
>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
>>>>>ue>P
>>>>>ue>4
>>>>>ue><
>>>>>>
>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
>>>>>u
>>>>>e
>>>>>>
>>>>>>
>>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
>>>>>e
>>>>>>
>>>>>\
>>>>>>
>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
>>>>>m
>>>>>s
>>>>>>
>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>> D: handle_action actionid = 26, version = 2
>>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>>'1',
>>>>>
>>>>>> 'amd64-deb']]
>>>>>> Apt-Spacewalk: Updating sources.list
>>>>>
>>>>>Error starts here
>>>>>
>>>>>> D: Sending back response(1, 'update failed', {})
>>>>>
>>>>>The python-apt module failes to verify the repos.
>>>>>
>>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>
>>>>>patch to support "signed" debian repos. See PR
>>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>
>>>>>part you need to patch on the server.
>>>>>
>>>>>You also need to patch the clients. If you installed the newest
>>>>>packages (as stated within this thread), your clients should be ok.
>>>>You
>>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>>If
>>>
>>>>>this file contains one line for each channel your client
>subscribes,
>>
>>>>>you are fine.
>>>>>
>>>>>Now you still need to create the "InRelease" or "Release.gpg"
>files.
>>>>>@Phil has written in his blog years ago. See
>>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-
>>>>>s
>>>>>p
>>>>>a
>>>>>cewalk
>>>>>
>>>>>You need to create these files for each repo, of course.
>>>>>
>>>>>But even if this all works, you might still hit another bug with
>>>newer
>>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>>"improvements".
>>>>>The error you might hit is the missing "Multi-Arch" header missing
>>>>>within the repo meta data for each channel.
>>>>>
>>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>>
>>>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>>>(see my repo
>>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch
>>>>>-
>>>>>h
>>>>>e
>>>>>ader)
>>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>>missing)
>>>>>- now run my spacewalk-add-debian-multiarch-header script to add
>the
>>
>>>>>missing headers to the packages.gz for each Debian channel I synced
>
>>>>>before.
>>>>>- now sign the repos
>>>>>
>>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>>server has been patched (rhnRepository.py - see PR 636), your
>>clients
>>>
>>>>>should work.
>>>>>
>>>>>Robert
>>>>>
>>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>>> D: Called refresh_list
>>>>>> Updating package profile
>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>>
>>>>>> Does anyone have any ideas?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Robert Paschedag <***@web.de>
>>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>>><***@pilotcat.com>:
>>>>>> >Thanks much for this. I’m not seeing any difference in the
>>>behavior
>>>>
>>>>>> >of my 16.04 clients. They are able to register, but doing a
>>>package
>>>>
>>>>>> >update fails (any package):
>>>>>> >
>>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>>> >
>>>>>>
>>>>>> I'm pretty sure, you are not using signs repos.
>>>>>>
>>>>>> Newer "apt", especially the python "apt" module fails while
>>>checking
>>>>>the signatures of the repo, thus the "update" fails.
>>>>>>
>>>>>> Note: it is the update ("apt-get update") within the call to
>>>install
>>>>>the package that fails.
>>>>>>
>>>>>> I also had this error with Debian 9, because I did not yet "sign"
>>>my
>>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>>
>>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>>module
>>>>>"requires" the repos to be signed. It took me a while to debug
>this.
>>>>>>
>>>>>> In case you "are" using signs repos, you should provide some more
>>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>>>SW.
>>>>>>
>>>>>> Robert
>>>>>>
>>>>>> >From: spacewalk-list-***@redhat.com
>>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>>> >To: spacewalk-***@redhat.com
>>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>> >
>>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>>> >Hi all,
>>>>>> >
>>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>>>has
>>>>>
>>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8?
>We
>>
>>>>>> >have
>>>>>> >14.04 & 16.04 clients and it would make my life so much easier
>if
>>>I
>>>>
>>>>>> >could get them to reliably work. I have been able to get 14.04
>to
>>
>>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>>> >Documentation is spotty out there in Google-land.
>>>>>> >
>>>>>> >Any help is appreciated!
>>>>>> >
>>>>>> >
>>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>>with
>>>>
>>>>>> >Spacewalk 2.8.
>>>>>> >
>>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>>work
>>>>>
>>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>>backported
>>>>
>>>>>> >this to the 2.8 clients.
>>>>>> >
>>>>>> >The sources are here:
>>>>>>
>>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packa
>>>>>>g
>>>>>>e
>>>>>>s
>>>>>> >
>>>>>> >We also built the packages and published them on OBS. You can
>use
>>
>>>>>> >them by doing the following:
>>>>>> >
>>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>>purge
>>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>>>the
>>>>>
>>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>>
>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>>
>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>>> >$ sudo apt-get update
>>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>>> >
>>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>>8.0
>>>>
>>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>
>>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>>> >
>>>>>> >Future development of the clients are going into Spacewalk's
>next
>>
>>>>>> >release.
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> >--
>>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>>
>>>>>>
>>>>>> --
>>>>>> sent from my mobile device
>>>>>>
>>>>>>
>>>>
>>>>
>>>>--
>>>>sent from my mobile device
>>>>
>>>>_______________________________________________
>>>>Spacewalk-list mailing list
>>>>Spacewalk-***@redhat.com
>>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>
>>>
>>>--
>>>sent from my mobile device
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Robert Paschedag
2018-09-29 07:17:44 UTC
Permalink
> Gesendet: Freitag, 28. September 2018 um 19:41 Uhr
> Von: "Randall R. Sargent" <***@pilotcat.com>
> An: "Robert Paschedag" <***@web.de>, "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>
> Ok, I commented out the default sources.list and inserted the SW repos from my spacewalk.list - this time I was able to install a package manually from SW *and also able to rhn_check and upgrade packages.* So I'm confused.
>
> What's interesting is SW was reporting 17 packages that could be upgraded, however apt list --upgradable showed over 400 packages. I applied the 17 package updates via SW and now it shows 0 updates for that client, but on the client apt list --upgradable shows 400. I manually ran apt upgrade and it ran successfully, but still shows those updates are needed. SW says no updates are available.

This just sounds like the error when Multi-Arch headers are missing. The problem you get, is, you can "upgrade" these packages with such a header over and over again.

I would suggest to clear your /etc/apt/sources.list completly (let apt-transport-spacewalk do its job), clear all caches (rm -f /var/lib/apt/lists/*, update your caches 2 times (first might get new channels from spacewalk, the second run will the refresh the caches of all repos) and try again.

You said you get over 400 packages that are upgradeable. Then test, if you can "install" one of them over and over again. Normally, apt would tell you, that the newest package is already installed and skip this.

So if you can install over and over again, then there is still Multi-Arch headers missing. Could have the following reasons.

- Something went wrong with the "...add-header..." script
- You might still have had some old "repo metadata" on your client (therefore, clear caches, etc.)
- maybe your packages.gz has been rebuild for some channel (because something has changed within the channel) and your "Multi-Arch" headers are missing "again" (before you signed the files).

Check, that your channel metadata files contain "Multi-Arch" headers. Run "grep -c ^Multi-Arch /var/lib/apt/lists/<one_of_your_channel_files". On the main channels, there should be a lot (on Debian 9 main, there are nearly 10000 packages with such a header!).

Good luck.

Robert


>
> Help?
>
> -----Original Message-----
> From: Randall R. Sargent
> Sent: Friday, September 28, 2018 11:35 AM
> To: 'Robert Paschedag' <***@web.de>; spacewalk-***@redhat.com
> Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
> I'm an idiot. Yes, that worked, but it looks like it's getting it from the ubuntu repos instead of Spacewalk:
>
> # apt install bind9-host
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following additional packages will be installed:
> dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141 Suggested packages:
> rblcheck
> The following packages will be upgraded:
> bind9-host dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141
> 7 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
> Need to get 1,321 kB of archives.
> After this operation, 0 B of additional disk space will be used.
> Do you want to continue? [Y/n] y
> Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 bind9-host amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [38.4 kB]
> Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dnsutils amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [89.2 kB]
> Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisc160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [215 kB]
> Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdns162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [881 kB]
> Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisccfg140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [40.4 kB]
> Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblwres141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [33.7 kB]
> Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libbind9-140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [23.6 kB] Fetched 1,321 kB in 0s (1,712 kB/s) (Reading database ... 71960 files and directories currently installed.) Preparing to unpack .../bind9-host_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Preparing to unpack .../dnsutils_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Preparing to unpack .../libisc160_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Preparing to unpack .../libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Preparing to unpack .../libisccfg140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Preparing to unpack .../liblwres141_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Preparing to unpack .../libbind9-140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
> Unpacking libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
> Processing triggers for man-db (2.7.5-1) ...
> Processing triggers for libc-bin (2.23-0ubuntu10) ...
> Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
> Processing triggers for libc-bin (2.23-0ubuntu10) ...
> Apt-Spacewalk: Updating package profile
>
>
>
> -----Original Message-----
> From: Robert Paschedag <***@web.de>
> Sent: Friday, September 28, 2018 11:24 AM
> To: Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
> Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
> Am 28. September 2018 18:06:58 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
> >Trying to install 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb' -
> >which also shows as an available upgrade package in SW:
> >
> ># apt install bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
> >Reading package lists... Done
> >Building dependency tree
> >Reading state information... Done
> >E: Unable to locate package
> >bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
> >E: Couldn't find any package by glob
> >'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
> >E: Couldn't find any package by regex
> >'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>
> apt-get install bind9-host
>
>
> >
> >-----Original Message-----
> >From: Robert Paschedag <***@web.de>
> >Sent: Friday, September 28, 2018 10:25 AM
> >To: Randall R. Sargent <***@pilotcat.com>;
> >spacewalk-***@redhat.com
> >Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
> >
> >Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent"
> ><***@pilotcat.com>:
> >>I'm finding two cache.py files. Which am I debugging?
> >>
> >>/usr/lib/python2.7/dist-packages/apt/cache.py
> >>
> >>/usr/lib/python3/dist-packages/apt/cache.py
> >
> >That depends on your default version of Python and the shebang line
> >within "rhn_check"
> >
> >But if apt-get update does not complain anymore, the update should
> >work... Or say, the cache update should not be the problem anymore.
> >
> >What if you try to install the package manually via apt-get install??
> >
> >Robert
> >>
> >>Yes, no SHA1 errors. I re-did the key with SHA256.
> >>
> >>-----Original Message-----
> >>From: Robert Paschedag <***@web.de>
> >>Sent: Friday, September 28, 2018 12:11 AM
> >>To: Randall R. Sargent <***@pilotcat.com>;
> >>spacewalk-***@redhat.com
> >>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
> >>
> >>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
> >><***@pilotcat.com>:
> >>>I'm still unable to update packages on Xenial. I've updated
> >>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
> >>to
> >>>include Release files, I'm using spacewalk-debian-sync.pl &
> >>>spacewalk-add-debian-multiarch-header.py to sync repos and
> >>>'secureApt.sh' to sign the files. Running 'apt update' on the client
> >>>gives zero errors on the Spacewalk repos. Still not working.
> >>
> >>Also no warning anymore about low security SHA1?
> >>
> >>Well...I would tail the http logs while trying to update a package on
> >>the client. As it is trying to update the cache, you should find
> >>requests to your release and package files.
> >>
> >>Finally.. Debug python. Schedule a package install via SW and run
> >>"python -i -m pdb $(which rhn_check)" on the client
> >>
> >>You need to know the line within the python-apt module you want to
> >>start debug. (I think it's the "update" function within the "cache.py"
> >>file). Set a breakpoint within debugger with "break
> >><full_path_to_file>:<line_number>"
> >>
> >>Robert
> >>>
> >>>Does anyone have ideas? How can I debug to get the reason why the
> >>>rhnpush-initiated update is failing?
> >>>
> >>>/etc/rhn/spacewalk-debian-sync.pl
> >>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-am
> >>>d
> >>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
> >>>
> >>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
> >>>/var/cache/rhn/repodata/xenial-main/Packages
> >>>/var/satellite/sat-tmp/xenial-main
> >>>
> >>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
> >>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
> >>>/var/cache/rhn/repodata/xenial-main/Packages
> >>>
> >>>/var/cache/rhn/repodata/xenial-main/Packages.gz
> >>>
> >>>/etc/rhn/secureApt.sh xenial-main Xenial
> >>>
> >>>-----Original Message-----
> >>>From: Randall R. Sargent
> >>>Sent: Thursday, September 27, 2018 8:40 AM
> >>>To: 'Robert Paschedag' <***@web.de>;
> >>>spacewalk-***@redhat.com
> >>>Cc: spacewalk-***@redhat.com
> >>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
> >>>
> >>>The other issue I'm having is the sync script keeps keeps giving me
> >>>"rhnpush failed". The first time it was permissions issues for the
> >>>apache process on /tmp. I fixed that and got about 75% of the way
> >>>finished syncing, then it did it again. Next I tried running it as
> >>>'apache' and now I'm getting permission issues writing to
> >>>'/usr/share/httpd/.rhnpushcache'.
> >>>
> >>>-----Original Message-----
> >>>From: Robert Paschedag <***@web.de>
> >>>Sent: Thursday, September 27, 2018 12:07 AM
> >>>To: spacewalk-***@redhat.com; Randall R. Sargent
> >>><***@pilotcat.com>
> >>>Cc: spacewalk-***@redhat.com
> >>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
> >>>
> >>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
> >>><***@web.de>:
> >>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
> >>>><***@pilotcat.com>:
> >>>>>Thanks Robert.
> >>>>>
> >>>>>I applied the patch for rhnRepository.py and verified the client
> >>>>>version is up to date using the criteria gave (spacewalk.list). I
> >>did
> >>>
> >>>>>follow Phil's blog and have been able to create Release &
> >>Release.gpg
> >>>
> >>>>>files. I did not do any of the patching he mentioned though because
> >>>>I'm
> >>>>>assuming my versions are updated since he wrote the post.
> >>>>>
> >>>>>Attempting to patch after that gives me the same error.
> >>>>>
> >>>>>Next I am trying to run your add-multiarch-header script but am
> >>>>getting
> >>>>>the following error:
> >>>>>
> >>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
> >>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
> >>>>>Error: Inputfile '/tmp/xenial-main' not available.
> >>>>>
> >>>>>Am I just running your modified script, or do I need to run
> >>>>>spacewalk-debian-sync.pl before?
> >>>>
> >>>>Of course you must sync the repos with the modified sync script (as
> >>>>stated). This extracts the Multi-Arch headers from the original
> >>Ubuntu
> >>>
> >>>>/ Debian repos and writes them to temporary files within /tmp.
> >>>
> >>>But you should check your repos are signed correctly by running
> >>apt-get
> >>>update.
> >>>
> >>>If this does not work correctly or complains about missing release
> >>>files, you made a mistake somewhere.
> >>>
> >>>Robert
> >>>>
> >>>>Robert
> >>>>>
> >>>>>Thanks again.
> >>>>>
> >>>>>-----Original Message-----
> >>>>>From: Robert Paschedag <***@web.de>
> >>>>>Sent: Wednesday, September 26, 2018 10:10 AM
> >>>>>To: Randall R. Sargent <***@pilotcat.com>
> >>>>>Cc: spacewalk-***@redhat.com
> >>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
> >>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
> >>>>>> An: "Robert Paschedag" <***@web.de>,
> >>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
> >>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
> >>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
> >>>>>>
> >>>>>> I'm having no luck getting my xenial clients to recognize the
> >>>>Release
> >>>>>& Release.gpg files in my repos. I resorted to modifying the
> >>>>>pre-invoke.py script to write [trusted=yes] for each line in
> >>>>>spacewalk.list, now I'm no longer getting complaints about missing
> >>>>>Release files when I do an apt update. I am still unable to upgrade
> >>>>any
> >>>>>packages though:
> >>>>>>
> >>>>>> # rhn_check -vvvv
> >>>>>> D: check_action{'action': "<?xml
> >>>>>>
> >>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
> >>>>>a
> >>>>>m
> >>>>>e
> >>>>>>
> >>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
> >>>>>>v
> >>>>>>a
> >>>>>>l
> >>>>>>
> >>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
> >>>>>ue>P
> >>>>>ue>4
> >>>>>ue><
> >>>>>>
> >>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
> >>>>>u
> >>>>>e
> >>>>>>
> >>>>>>
> >>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
> >>>>>e
> >>>>>>
> >>>>>\
> >>>>>>
> >>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
> >>>>>m
> >>>>>s
> >>>>>>
> >>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
> >>>>>> updateLoginInfo() login info
> >>>>>> D: login(forceUpdate=True) invoked logging into up2date server
> >>>>>> D: rpcServer: Calling XMLRPC up2date.login
> >>>>>> D: writeCachedLogin() invoked
> >>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
> >>>>>1537970585.67 seconds.
> >>>>>> successfully retrieved authentication token from up2date server
> >>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
> >>>>>'X-RHN-Auth-Server-Time':
> >>>>>> '1537966985.69', 'X-RHN-Auth':
> >>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
> >>>>>'X-RHN-Auth-Channels':
> >>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
> >
> >>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
> >>>>>'0',
> >>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
> >>>>>'3600.0'}
> >>>>>> D: handle_action{'action': "<?xml
> >>>>>>
> >>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
> >>>>>a
> >>>>>m
> >>>>>e
> >>>>>>
> >>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
> >>>>>>v
> >>>>>>a
> >>>>>>l
> >>>>>>
> >>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
> >>>>>ue>P
> >>>>>ue>4
> >>>>>ue><
> >>>>>>
> >>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
> >>>>>u
> >>>>>e
> >>>>>>
> >>>>>>
> >>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
> >>>>>e
> >>>>>>
> >>>>>\
> >>>>>>
> >>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
> >>>>>m
> >>>>>s
> >>>>>>
> >>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
> >>>>>> D: handle_action actionid = 26, version = 2
> >>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
> >>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
> >>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
> >>>>'1',
> >>>>>
> >>>>>> 'amd64-deb']]
> >>>>>> Apt-Spacewalk: Updating sources.list
> >>>>>
> >>>>>Error starts here
> >>>>>
> >>>>>> D: Sending back response(1, 'update failed', {})
> >>>>>
> >>>>>The python-apt module failes to verify the repos.
> >>>>>
> >>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
> >
> >>>>>patch to support "signed" debian repos. See PR
> >>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
> >
> >>>>>part you need to patch on the server.
> >>>>>
> >>>>>You also need to patch the clients. If you installed the newest
> >>>>>packages (as stated within this thread), your clients should be ok.
> >>>>You
> >>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
> >>If
> >>>
> >>>>>this file contains one line for each channel your client
> >subscribes,
> >>
> >>>>>you are fine.
> >>>>>
> >>>>>Now you still need to create the "InRelease" or "Release.gpg"
> >files.
> >>>>>@Phil has written in his blog years ago. See
> >>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-
> >>>>>s
> >>>>>p
> >>>>>a
> >>>>>cewalk
> >>>>>
> >>>>>You need to create these files for each repo, of course.
> >>>>>
> >>>>>But even if this all works, you might still hit another bug with
> >>>newer
> >>>>>Ubuntu / Debian distros using newer APT version, which got some
> >>>>>"improvements".
> >>>>>The error you might hit is the missing "Multi-Arch" header missing
> >>>>>within the repo meta data for each channel.
> >>>>>
> >>>>>So.....what I currently do (on my SW 2.7) system is.
> >>>>>
> >>>>>- Use the "old" sync script from Steve Meier in a modified version.
> >>>>>(see my repo
> >>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch
> >>>>>-
> >>>>>h
> >>>>>e
> >>>>>ader)
> >>>>>- wait some minutes after the sync finshed to let SW recreate the
> >>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
> >>>>>missing)
> >>>>>- now run my spacewalk-add-debian-multiarch-header script to add
> >the
> >>
> >>>>>missing headers to the packages.gz for each Debian channel I synced
> >
> >>>>>before.
> >>>>>- now sign the repos
> >>>>>
> >>>>>Now, if all went well, clients have been patched (apt-spacewalk),
> >>>>>server has been patched (rhnRepository.py - see PR 636), your
> >>clients
> >>>
> >>>>>should work.
> >>>>>
> >>>>>Robert
> >>>>>
> >>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
> >>>>>> D: Called refresh_list
> >>>>>> Updating package profile
> >>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
> >>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
> >>>>>> D: local action status: (0, 'package list refreshed', {})
> >>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
> >>>>>>
> >>>>>> Does anyone have any ideas?
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Robert Paschedag <***@web.de>
> >>>>>> Sent: Monday, September 24, 2018 2:28 PM
> >>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
> >>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
> >>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
> >>>>>>
> >>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
> >>>>><***@pilotcat.com>:
> >>>>>> >Thanks much for this. I’m not seeing any difference in the
> >>>behavior
> >>>>
> >>>>>> >of my 16.04 clients. They are able to register, but doing a
> >>>package
> >>>>
> >>>>>> >update fails (any package):
> >>>>>> >
> >>>>>> >[cid:***@01D4540F.FE7E7510]
> >>>>>> >
> >>>>>>
> >>>>>> I'm pretty sure, you are not using signs repos.
> >>>>>>
> >>>>>> Newer "apt", especially the python "apt" module fails while
> >>>checking
> >>>>>the signatures of the repo, thus the "update" fails.
> >>>>>>
> >>>>>> Note: it is the update ("apt-get update") within the call to
> >>>install
> >>>>>the package that fails.
> >>>>>>
> >>>>>> I also had this error with Debian 9, because I did not yet "sign"
> >>>my
> >>>>>repos and used "Allow unsigned = true" within apt.conf.
> >>>>>>
> >>>>>> But these settings seem to be ignored, hence, the "apt" python
> >>>>module
> >>>>>"requires" the repos to be signed. It took me a while to debug
> >this.
> >>>>>>
> >>>>>> In case you "are" using signs repos, you should provide some more
> >>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
> >>>>SW.
> >>>>>>
> >>>>>> Robert
> >>>>>>
> >>>>>> >From: spacewalk-list-***@redhat.com
> >>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
> >>>>>> >Sent: Monday, September 24, 2018 12:49 PM
> >>>>>> >To: spacewalk-***@redhat.com
> >>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
> >>>>>> >
> >>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
> >>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
> >>>>>> >Hi all,
> >>>>>> >
> >>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
> >>>>has
> >>>>>
> >>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8?
> >We
> >>
> >>>>>> >have
> >>>>>> >14.04 & 16.04 clients and it would make my life so much easier
> >if
> >>>I
> >>>>
> >>>>>> >could get them to reliably work. I have been able to get 14.04
> >to
> >>
> >>>>>> >register, and even update (with minor issues), but not 16.x.
> >>>>>> >Documentation is spotty out there in Google-land.
> >>>>>> >
> >>>>>> >Any help is appreciated!
> >>>>>> >
> >>>>>> >
> >>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
> >>>with
> >>>>
> >>>>>> >Spacewalk 2.8.
> >>>>>> >
> >>>>>> >A couple of months ago, my colleague and I fixed the clients to
> >>>>work
> >>>>>
> >>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
> >>>backported
> >>>>
> >>>>>> >this to the 2.8 clients.
> >>>>>> >
> >>>>>> >The sources are here:
> >>>>>>
> >>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packa
> >>>>>>g
> >>>>>>e
> >>>>>>s
> >>>>>> >
> >>>>>> >We also built the packages and published them on OBS. You can
> >use
> >>
> >>>>>> >them by doing the following:
> >>>>>> >
> >>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
> >>>>>purge
> >>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
> >>>>the
> >>>>>
> >>>>>> >new packages $ sudo bash -c 'echo "deb
> >>>>>>
> >>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
> >>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
> >>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
> >>>>>> >$ sudo apt-key adv --fetch-keys
> >>>>>>
> >>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
> >>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
> >>>>>> >$ sudo apt-get update
> >>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
> >>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
> >>>>>> >
> >>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
> >>>8.0
> >>>>
> >>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
> >
> >>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
> >>>>>> >
> >>>>>> >Future development of the clients are going into Spacewalk's
> >next
> >>
> >>>>>> >release.
> >>>>>> >
> >>>>>> >
> >>>>>> >
> >>>>>> >--
> >>>>>> >真実はいつも一つ!/ Always, there's only one truth!
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> sent from my mobile device
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>>--
> >>>>sent from my mobile device
> >>>>
> >>>>_______________________________________________
> >>>>Spacewalk-list mailing list
> >>>>Spacewalk-***@redhat.com
> >>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
> >>>
> >>>
> >>>--
> >>>sent from my mobile device
> >>
> >>
> >>--
> >>sent from my mobile device
> >
> >
> >--
> >sent from my mobile device
>
>
> --
> sent from my mobile device
>
>
Robert Paschedag
2018-09-28 17:58:34 UTC
Permalink
Am 28. September 2018 18:34:50 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>I'm an idiot. Yes, that worked, but it looks like it's getting it from
>the ubuntu repos instead of Spacewalk:

Then why the hell don't you deactivate all other non spacewalk repos (also warning producing CD-ROM) and try again?

Robert

>
># apt install bind9-host
>Reading package lists... Done
>Building dependency tree
>Reading state information... Done
>The following additional packages will be installed:
> dnsutils libbind9-140 libdns162 libisc160 libisccfg140 liblwres141
>Suggested packages:
> rblcheck
>The following packages will be upgraded:
>bind9-host dnsutils libbind9-140 libdns162 libisc160 libisccfg140
>liblwres141
>7 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
>Need to get 1,321 kB of archives.
>After this operation, 0 B of additional disk space will be used.
>Do you want to continue? [Y/n] y
>Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>bind9-host amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [38.4 kB]
>Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>dnsutils amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [89.2 kB]
>Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>libisc160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [215 kB]
>Get:4 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>libdns162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [881 kB]
>Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>libisccfg140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [40.4 kB]
>Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>liblwres141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [33.7 kB]
>Get:7 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
>libbind9-140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.11 [23.6 kB]
>Fetched 1,321 kB in 0s (1,712 kB/s)
>(Reading database ... 71960 files and directories currently installed.)
>Preparing to unpack
>.../bind9-host_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Preparing to unpack
>.../dnsutils_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Preparing to unpack
>.../libisc160_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Preparing to unpack
>.../libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Preparing to unpack
>.../libisccfg140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Preparing to unpack
>.../liblwres141_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Preparing to unpack
>.../libbind9-140_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
>Unpacking libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) over
>(1:9.10.3.dfsg.P4-8ubuntu1.10) ...
>Processing triggers for man-db (2.7.5-1) ...
>Processing triggers for libc-bin (2.23-0ubuntu10) ...
>Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
>Processing triggers for libc-bin (2.23-0ubuntu10) ...
>Apt-Spacewalk: Updating package profile
>
>
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 11:24 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 28. September 2018 18:06:58 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>Trying to install 'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>-
>>which also shows as an available upgrade package in SW:
>>
>># apt install bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>>Reading package lists... Done
>>Building dependency tree
>>Reading state information... Done
>>E: Unable to locate package
>>bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb
>>E: Couldn't find any package by glob
>>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>>E: Couldn't find any package by regex
>>'bind9-host-9.10.3.dfsg.P4-8ubuntu1.11:1.amd64-deb'
>
>apt-get install bind9-host
>
>
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Friday, September 28, 2018 10:25 AM
>>To: Randall R. Sargent <***@pilotcat.com>;
>>spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent"
>><***@pilotcat.com>:
>>>I'm finding two cache.py files. Which am I debugging?
>>>
>>>/usr/lib/python2.7/dist-packages/apt/cache.py
>>>
>>>/usr/lib/python3/dist-packages/apt/cache.py
>>
>>That depends on your default version of Python and the shebang line
>>within "rhn_check"
>>
>>But if apt-get update does not complain anymore, the update should
>>work... Or say, the cache update should not be the problem anymore.
>>
>>What if you try to install the package manually via apt-get install??
>>
>>Robert
>>>
>>>Yes, no SHA1 errors. I re-did the key with SHA256.
>>>
>>>-----Original Message-----
>>>From: Robert Paschedag <***@web.de>
>>>Sent: Friday, September 28, 2018 12:11 AM
>>>To: Randall R. Sargent <***@pilotcat.com>;
>>>spacewalk-***@redhat.com
>>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>
>>>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
>>><***@pilotcat.com>:
>>>>I'm still unable to update packages on Xenial. I've updated
>>>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>>>to
>>>>include Release files, I'm using spacewalk-debian-sync.pl &
>>>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>
>>>>gives zero errors on the Spacewalk repos. Still not working.
>>>
>>>Also no warning anymore about low security SHA1?
>>>
>>>Well...I would tail the http logs while trying to update a package on
>
>>>the client. As it is trying to update the cache, you should find
>>>requests to your release and package files.
>>>
>>>Finally.. Debug python. Schedule a package install via SW and run
>>>"python -i -m pdb $(which rhn_check)" on the client
>>>
>>>You need to know the line within the python-apt module you want to
>>>start debug. (I think it's the "update" function within the
>"cache.py"
>>>file). Set a breakpoint within debugger with "break
>>><full_path_to_file>:<line_number>"
>>>
>>>Robert
>>>>
>>>>Does anyone have ideas? How can I debug to get the reason why the
>>>>rhnpush-initiated update is failing?
>>>>
>>>>/etc/rhn/spacewalk-debian-sync.pl
>>>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-am
>>>>d
>>>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
>>>>
>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>>/var/satellite/sat-tmp/xenial-main
>>>>
>>>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>>>/var/cache/rhn/repodata/xenial-main/Packages
>>>>
>>>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>>>
>>>>/etc/rhn/secureApt.sh xenial-main Xenial
>>>>
>>>>-----Original Message-----
>>>>From: Randall R. Sargent
>>>>Sent: Thursday, September 27, 2018 8:40 AM
>>>>To: 'Robert Paschedag' <***@web.de>;
>>>>spacewalk-***@redhat.com
>>>>Cc: spacewalk-***@redhat.com
>>>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>>The other issue I'm having is the sync script keeps keeps giving me
>>>>"rhnpush failed". The first time it was permissions issues for the
>>>>apache process on /tmp. I fixed that and got about 75% of the way
>>>>finished syncing, then it did it again. Next I tried running it as
>>>>'apache' and now I'm getting permission issues writing to
>>>>'/usr/share/httpd/.rhnpushcache'.
>>>>
>>>>-----Original Message-----
>>>>From: Robert Paschedag <***@web.de>
>>>>Sent: Thursday, September 27, 2018 12:07 AM
>>>>To: spacewalk-***@redhat.com; Randall R. Sargent
>>>><***@pilotcat.com>
>>>>Cc: spacewalk-***@redhat.com
>>>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>>>><***@web.de>:
>>>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>>>><***@pilotcat.com>:
>>>>>>Thanks Robert.
>>>>>>
>>>>>>I applied the patch for rhnRepository.py and verified the client
>>>>>>version is up to date using the criteria gave (spacewalk.list). I
>>>did
>>>>
>>>>>>follow Phil's blog and have been able to create Release &
>>>Release.gpg
>>>>
>>>>>>files. I did not do any of the patching he mentioned though
>because
>>>>>I'm
>>>>>>assuming my versions are updated since he wrote the post.
>>>>>>
>>>>>>Attempting to patch after that gives me the same error.
>>>>>>
>>>>>>Next I am trying to run your add-multiarch-header script but am
>>>>>getting
>>>>>>the following error:
>>>>>>
>>>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>>>
>>>>>>Am I just running your modified script, or do I need to run
>>>>>>spacewalk-debian-sync.pl before?
>>>>>
>>>>>Of course you must sync the repos with the modified sync script (as
>
>>>>>stated). This extracts the Multi-Arch headers from the original
>>>Ubuntu
>>>>
>>>>>/ Debian repos and writes them to temporary files within /tmp.
>>>>
>>>>But you should check your repos are signed correctly by running
>>>apt-get
>>>>update.
>>>>
>>>>If this does not work correctly or complains about missing release
>>>>files, you made a mistake somewhere.
>>>>
>>>>Robert
>>>>>
>>>>>Robert
>>>>>>
>>>>>>Thanks again.
>>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Robert Paschedag <***@web.de>
>>>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>>>Cc: spacewalk-***@redhat.com
>>>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>>
>>>>>>> I'm having no luck getting my xenial clients to recognize the
>>>>>Release
>>>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>>>spacewalk.list, now I'm no longer getting complaints about missing
>
>>>>>>Release files when I do an apt update. I am still unable to
>upgrade
>>>>>any
>>>>>>packages though:
>>>>>>>
>>>>>>> # rhn_check -vvvv
>>>>>>> D: check_action{'action': "<?xml
>>>>>>>
>>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
>>>>>>a
>>>>>>m
>>>>>>e
>>>>>>>
>>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
>>>>>>>v
>>>>>>>a
>>>>>>>l
>>>>>>>
>>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
>>>>>>ue>P
>>>>>>ue>4
>>>>>>ue><
>>>>>>>
>>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
>>>>>>u
>>>>>>e
>>>>>>>
>>>>>>>
>>>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
>>>>>>e
>>>>>>>
>>>>>>\
>>>>>>>
>>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
>>>>>>m
>>>>>>s
>>>>>>>
>>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>>> updateLoginInfo() login info
>>>>>>> D: login(forceUpdate=True) invoked logging into up2date server
>>>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>>>> D: writeCachedLogin() invoked
>>>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>>>1537970585.67 seconds.
>>>>>>> successfully retrieved authentication token from up2date server
>>>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>>>'X-RHN-Auth-Server-Time':
>>>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>>>'X-RHN-Auth-Channels':
>>>>>>> [['xenial-main', '20180925171652', '1', '1'],
>['xenial-security',
>>
>>>>>>> '20180925175349', '0', '1'], ['xenial-updates',
>'20180925172643',
>>>>>>'0',
>>>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>>>'3600.0'}
>>>>>>> D: handle_action{'action': "<?xml
>>>>>>>
>>>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodN
>>>>>>a
>>>>>>m
>>>>>>e
>>>>>>>
>>>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<
>>>>>>>v
>>>>>>>a
>>>>>>>l
>>>>>>>
>>>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.
>>>>>>ue>P
>>>>>>ue>4
>>>>>>ue><
>>>>>>>
>>>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<val
>>>>>>u
>>>>>>e
>>>>>>>
>>>>>>>
>>>>>><string>1</string></value>\n<value><string>amd64-deb</string></valu
>>>>>>e
>>>>>>>
>>>>>>\
>>>>>>>
>>>>>>n</data></array></value>\n</data></array></value>\n</param>\n</para
>>>>>>m
>>>>>>s
>>>>>>>
>>>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>>>> D: handle_action actionid = 26, version = 2
>>>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>>>'1',
>>>>>>
>>>>>>> 'amd64-deb']]
>>>>>>> Apt-Spacewalk: Updating sources.list
>>>>>>
>>>>>>Error starts here
>>>>>>
>>>>>>> D: Sending back response(1, 'update failed', {})
>>>>>>
>>>>>>The python-apt module failes to verify the repos.
>>>>>>
>>>>>>You said, your are using SW 2.8. Release? If yes, you are missing
>a
>>
>>>>>>patch to support "signed" debian repos. See PR
>>>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is
>the
>>
>>>>>>part you need to patch on the server.
>>>>>>
>>>>>>You also need to patch the clients. If you installed the newest
>>>>>>packages (as stated within this thread), your clients should be
>ok.
>>>>>You
>>>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>>>If
>>>>
>>>>>>this file contains one line for each channel your client
>>subscribes,
>>>
>>>>>>you are fine.
>>>>>>
>>>>>>Now you still need to create the "InRelease" or "Release.gpg"
>>files.
>>>>>>@Phil has written in his blog years ago. See
>>>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-
>>>>>>s
>>>>>>p
>>>>>>a
>>>>>>cewalk
>>>>>>
>>>>>>You need to create these files for each repo, of course.
>>>>>>
>>>>>>But even if this all works, you might still hit another bug with
>>>>newer
>>>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>>>"improvements".
>>>>>>The error you might hit is the missing "Multi-Arch" header missing
>
>>>>>>within the repo meta data for each channel.
>>>>>>
>>>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>>>
>>>>>>- Use the "old" sync script from Steve Meier in a modified
>version.
>>>>>>(see my repo
>>>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch
>>>>>>-
>>>>>>h
>>>>>>e
>>>>>>ader)
>>>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>>>missing)
>>>>>>- now run my spacewalk-add-debian-multiarch-header script to add
>>the
>>>
>>>>>>missing headers to the packages.gz for each Debian channel I
>synced
>>
>>>>>>before.
>>>>>>- now sign the repos
>>>>>>
>>>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>>>server has been patched (rhnRepository.py - see PR 636), your
>>>clients
>>>>
>>>>>>should work.
>>>>>>
>>>>>>Robert
>>>>>>
>>>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>>>> D: Called refresh_list
>>>>>>> Updating package profile
>>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>>>
>>>>>>> Does anyone have any ideas?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Robert Paschedag <***@web.de>
>>>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>>
>>>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>>>><***@pilotcat.com>:
>>>>>>> >Thanks much for this. I’m not seeing any difference in the
>>>>behavior
>>>>>
>>>>>>> >of my 16.04 clients. They are able to register, but doing a
>>>>package
>>>>>
>>>>>>> >update fails (any package):
>>>>>>> >
>>>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>>>> >
>>>>>>>
>>>>>>> I'm pretty sure, you are not using signs repos.
>>>>>>>
>>>>>>> Newer "apt", especially the python "apt" module fails while
>>>>checking
>>>>>>the signatures of the repo, thus the "update" fails.
>>>>>>>
>>>>>>> Note: it is the update ("apt-get update") within the call to
>>>>install
>>>>>>the package that fails.
>>>>>>>
>>>>>>> I also had this error with Debian 9, because I did not yet
>"sign"
>>>>my
>>>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>>>
>>>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>>>module
>>>>>>"requires" the repos to be signed. It took me a while to debug
>>this.
>>>>>>>
>>>>>>> In case you "are" using signs repos, you should provide some
>more
>>>>>>info...e.g. "rhn_check -vvvv" while trying to install a package
>via
>>>>>SW.
>>>>>>>
>>>>>>> Robert
>>>>>>>
>>>>>>> >From: spacewalk-list-***@redhat.com
>>>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>>>> >To: spacewalk-***@redhat.com
>>>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>>> >
>>>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>>>> >Hi all,
>>>>>>> >
>>>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead
>horse,
>>>>>has
>>>>>>
>>>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8?
>>We
>>>
>>>>>>> >have
>>>>>>> >14.04 & 16.04 clients and it would make my life so much easier
>>if
>>>>I
>>>>>
>>>>>>> >could get them to reliably work. I have been able to get 14.04
>>to
>>>
>>>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>>>> >Documentation is spotty out there in Google-land.
>>>>>>> >
>>>>>>> >Any help is appreciated!
>>>>>>> >
>>>>>>> >
>>>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>>>with
>>>>>
>>>>>>> >Spacewalk 2.8.
>>>>>>> >
>>>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>>>work
>>>>>>
>>>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>>>backported
>>>>>
>>>>>>> >this to the 2.8 clients.
>>>>>>> >
>>>>>>> >The sources are here:
>>>>>>>
>>>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packa
>>>>>>>g
>>>>>>>e
>>>>>>>s
>>>>>>> >
>>>>>>> >We also built the packages and published them on OBS. You can
>>use
>>>
>>>>>>> >them by doing the following:
>>>>>>> >
>>>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>>>purge
>>>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove #
>Installing
>>>>>the
>>>>>>
>>>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>>>
>>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>>>
>>>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>>>> >$ sudo apt-get update
>>>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>>>> >
>>>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>>>8.0
>>>>>
>>>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above
>for
>>
>>>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>>>> >
>>>>>>> >Future development of the clients are going into Spacewalk's
>>next
>>>
>>>>>>> >release.
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >--
>>>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> sent from my mobile device
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>sent from my mobile device
>>>>>
>>>>>_______________________________________________
>>>>>Spacewalk-list mailing list
>>>>>Spacewalk-***@redhat.com
>>>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>>>
>>>>
>>>>--
>>>>sent from my mobile device
>>>
>>>
>>>--
>>>sent from my mobile device
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Randall R. Sargent
2018-09-28 16:08:41 UTC
Permalink
Also, performing an apt update looks normal to me:

# apt update
Apt-Spacewalk: Updating sources.list
Ign:1 cdrom://Ubuntu-Server 16.04.5 LTS _Xenial Xerus_ - Release amd64 (20180731) xenial InRelease
Err:2 cdrom://Ubuntu-Server 16.04.5 LTS _Xenial Xerus_ - Release amd64 (20180731) xenial Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign:3 spacewalk://spacewalk.pilotcat.com xenial-main InRelease
Ign:4 spacewalk://spacewalk.pilotcat.com xenial-security InRelease
Ign:5 spacewalk://spacewalk.pilotcat.com xenial-updates InRelease
Get:6 spacewalk://spacewalk.pilotcat.com xenial-main Release [929 B]
Get:7 spacewalk://spacewalk.pilotcat.com xenial-security Release [929 B]
Get:8 spacewalk://spacewalk.pilotcat.com xenial-updates Release [932 B]
Hit:9 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Get:12 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:14 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Ign:15 http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04 InRelease
Hit:16 http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/2.8:/debclients/xUbuntu_16.04 Release
Get:17 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Reading package lists... Done
E: The repository 'cdrom://Ubuntu-Server 16.04.5 LTS _Xenial Xerus_ - Release amd64 (20180731) xenial Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

-----Original Message-----
From: Robert Paschedag <***@web.de>
Sent: Friday, September 28, 2018 10:25 AM
To: Randall R. Sargent <***@pilotcat.com>; spacewalk-***@redhat.com
Subject: RE: [Spacewalk-list] Ubuntu/Deb Support

Am 28. September 2018 16:23:42 MESZ schrieb "Randall R. Sargent" <***@pilotcat.com>:
>I'm finding two cache.py files. Which am I debugging?
>
>/usr/lib/python2.7/dist-packages/apt/cache.py
>
>/usr/lib/python3/dist-packages/apt/cache.py

That depends on your default version of Python and the shebang line within "rhn_check"

But if apt-get update does not complain anymore, the update should work... Or say, the cache update should not be the problem anymore.

What if you try to install the package manually via apt-get install??

Robert
>
>Yes, no SHA1 errors. I re-did the key with SHA256.
>
>-----Original Message-----
>From: Robert Paschedag <***@web.de>
>Sent: Friday, September 28, 2018 12:11 AM
>To: Randall R. Sargent <***@pilotcat.com>;
>spacewalk-***@redhat.com
>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>
>Am 27. September 2018 22:55:40 MESZ schrieb "Randall R. Sargent"
><***@pilotcat.com>:
>>I'm still unable to update packages on Xenial. I've updated
>>'/usr/lib/python2.7/site-packages/spacewalk/server/rhnRepository.py'
>to
>>include Release files, I'm using spacewalk-debian-sync.pl &
>>spacewalk-add-debian-multiarch-header.py to sync repos and
>>'secureApt.sh' to sign the files. Running 'apt update' on the client
>>gives zero errors on the Spacewalk repos. Still not working.
>
>Also no warning anymore about low security SHA1?
>
>Well...I would tail the http logs while trying to update a package on
>the client. As it is trying to update the cache, you should find
>requests to your release and package files.
>
>Finally.. Debug python. Schedule a package install via SW and run
>"python -i -m pdb $(which rhn_check)" on the client
>
>You need to know the line within the python-apt module you want to
>start debug. (I think it's the "update" function within the "cache.py"
>file). Set a breakpoint within debugger with "break
><full_path_to_file>:<line_number>"
>
>Robert
>>
>>Does anyone have ideas? How can I debug to get the reason why the
>>rhnpush-initiated update is failing?
>>
>>/etc/rhn/spacewalk-debian-sync.pl
>>--url=http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd
>>6 4/ --channel=xenial-main --username=xxxx --password=xxxx
>>
>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>/var/cache/rhn/repodata/xenial-main/Packages
>>/var/satellite/sat-tmp/xenial-main
>>
>>gzip -c /var/cache/rhn/repodata/xenial-main/Packages.new >
>>/var/cache/rhn/repodata/xenial-main/Packages.gz && touch -r
>>/var/cache/rhn/repodata/xenial-main/Packages
>>
>>/var/cache/rhn/repodata/xenial-main/Packages.gz
>>
>>/etc/rhn/secureApt.sh xenial-main Xenial
>>
>>-----Original Message-----
>>From: Randall R. Sargent
>>Sent: Thursday, September 27, 2018 8:40 AM
>>To: 'Robert Paschedag' <***@web.de>;
>>spacewalk-***@redhat.com
>>Cc: spacewalk-***@redhat.com
>>Subject: RE: [Spacewalk-list] Ubuntu/Deb Support
>>
>>The other issue I'm having is the sync script keeps keeps giving me
>>"rhnpush failed". The first time it was permissions issues for the
>>apache process on /tmp. I fixed that and got about 75% of the way
>>finished syncing, then it did it again. Next I tried running it as
>>'apache' and now I'm getting permission issues writing to
>>'/usr/share/httpd/.rhnpushcache'.
>>
>>-----Original Message-----
>>From: Robert Paschedag <***@web.de>
>>Sent: Thursday, September 27, 2018 12:07 AM
>>To: spacewalk-***@redhat.com; Randall R. Sargent
>><***@pilotcat.com>
>>Cc: spacewalk-***@redhat.com
>>Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>
>>Am 27. September 2018 07:03:19 MESZ schrieb Robert Paschedag
>><***@web.de>:
>>>Am 26. September 2018 18:01:16 MESZ schrieb "Randall R. Sargent"
>>><***@pilotcat.com>:
>>>>Thanks Robert.
>>>>
>>>>I applied the patch for rhnRepository.py and verified the client
>>>>version is up to date using the criteria gave (spacewalk.list). I
>did
>>
>>>>follow Phil's blog and have been able to create Release &
>Release.gpg
>>
>>>>files. I did not do any of the patching he mentioned though because
>>>I'm
>>>>assuming my versions are updated since he wrote the post.
>>>>
>>>>Attempting to patch after that gives me the same error.
>>>>
>>>>Next I am trying to run your add-multiarch-header script but am
>>>getting
>>>>the following error:
>>>>
>>>>/etc/rhn/spacewalk-add-debian-multiarch-header.py
>>>>/var/cache/rhn/repodata/xenial-main/Packages /tmp/xenial-main
>>>>Error: Inputfile '/tmp/xenial-main' not available.
>>>>
>>>>Am I just running your modified script, or do I need to run
>>>>spacewalk-debian-sync.pl before?
>>>
>>>Of course you must sync the repos with the modified sync script (as
>>>stated). This extracts the Multi-Arch headers from the original
>Ubuntu
>>
>>>/ Debian repos and writes them to temporary files within /tmp.
>>
>>But you should check your repos are signed correctly by running
>apt-get
>>update.
>>
>>If this does not work correctly or complains about missing release
>>files, you made a mistake somewhere.
>>
>>Robert
>>>
>>>Robert
>>>>
>>>>Thanks again.
>>>>
>>>>-----Original Message-----
>>>>From: Robert Paschedag <***@web.de>
>>>>Sent: Wednesday, September 26, 2018 10:10 AM
>>>>To: Randall R. Sargent <***@pilotcat.com>
>>>>Cc: spacewalk-***@redhat.com
>>>>Subject: Aw: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>
>>>>
>>>>
>>>>> Gesendet: Mittwoch, 26. September 2018 um 15:16 Uhr
>>>>> Von: "Randall R. Sargent" <***@pilotcat.com>
>>>>> An: "Robert Paschedag" <***@web.de>,
>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>,
>>>>> "spacewalk-***@redhat.com" <spacewalk-***@redhat.com>
>>>>> Betreff: RE: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>> I'm having no luck getting my xenial clients to recognize the
>>>Release
>>>>& Release.gpg files in my repos. I resorted to modifying the
>>>>pre-invoke.py script to write [trusted=yes] for each line in
>>>>spacewalk.list, now I'm no longer getting complaints about missing
>>>>Release files when I do an apt update. I am still unable to upgrade
>>>any
>>>>packages though:
>>>>>
>>>>> # rhn_check -vvvv
>>>>> D: check_action{'action': "<?xml
>>>>>
>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNa
>>>>m
>>>>e
>>>>>
>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<v
>>>>>a
>>>>>l
>>>>>
>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P
>>>>ue>4
>>>>ue><
>>>>>
>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<valu
>>>>e
>>>>>
>>>>>
>>>><string>1</string></value>\n<value><string>amd64-deb</string></value
>>>>>
>>>>\
>>>>>
>>>>n</data></array></value>\n</data></array></value>\n</param>\n</param
>>>>s
>>>>>
>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>> updateLoginInfo() login info
>>>>> D: login(forceUpdate=True) invoked logging into up2date server
>>>>> D: rpcServer: Calling XMLRPC up2date.login
>>>>> D: writeCachedLogin() invoked
>>>>> D: Wrote pickled loginInfo at 1537966985.67 with expiration of
>>>>1537970585.67 seconds.
>>>>> successfully retrieved authentication token from up2date server
>>>>> D: logininfo:{'X-RHN-Server-Id': 1000010000,
>>>>'X-RHN-Auth-Server-Time':
>>>>> '1537966985.69', 'X-RHN-Auth':
>>>>> '8okffYSJDt+fznMR/PhU4rZCo31NCg9sFe84Gx6oRVo=',
>>>>'X-RHN-Auth-Channels':
>>>>> [['xenial-main', '20180925171652', '1', '1'], ['xenial-security',
>>>>> '20180925175349', '0', '1'], ['xenial-updates', '20180925172643',
>>>>'0',
>>>>> '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset':
>>>>'3600.0'}
>>>>> D: handle_action{'action': "<?xml
>>>>>
>>>>version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodNa
>>>>m
>>>>e
>>>>>
>>>>>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<v
>>>>>a
>>>>>l
>>>>>
>>>>ue><string>bind9-host</string></value>\n<value><string>9.10.3.dfsg.P
>>>>ue>4
>>>>ue><
>>>>>
>>>>/string></value>\n<value><string>8ubuntu1.11</string></value>\n<valu
>>>>e
>>>>>
>>>>>
>>>><string>1</string></value>\n<value><string>amd64-deb</string></value
>>>>>
>>>>\
>>>>>
>>>>n</data></array></value>\n</data></array></value>\n</param>\n</param
>>>>s
>>>>>
>>>>> \n</methodCall>\n", 'version': 2, 'id': 26}
>>>>> D: handle_action actionid = 26, version = 2
>>>>> D: do_call packages.update([['bind9-host', '9.10.3.dfsg.P4',
>>>>> '8ubuntu1.11', '1', 'amd64-deb']],){'cache_only': None}
>>>>> D: Called update[['bind9-host', '9.10.3.dfsg.P4', '8ubuntu1.11',
>>>'1',
>>>>
>>>>> 'amd64-deb']]
>>>>> Apt-Spacewalk: Updating sources.list
>>>>
>>>>Error starts here
>>>>
>>>>> D: Sending back response(1, 'update failed', {})
>>>>
>>>>The python-apt module failes to verify the repos.
>>>>
>>>>You said, your are using SW 2.8. Release? If yes, you are missing a
>>>>patch to support "signed" debian repos. See PR
>>>>https://github.com/spacewalkproject/spacewalk/pull/636. This is the
>>>>part you need to patch on the server.
>>>>
>>>>You also need to patch the clients. If you installed the newest
>>>>packages (as stated within this thread), your clients should be ok.
>>>You
>>>>can check this within your /etc/apt/sources.list.d/spacewalk file.
>If
>>
>>>>this file contains one line for each channel your client subscribes,
>
>>>>you are fine.
>>>>
>>>>Now you still need to create the "InRelease" or "Release.gpg" files.
>>>>@Phil has written in his blog years ago. See
>>>>http://www.devops-blog.net/spacewalk/gpg-signing-apt-repository-in-s
>>>>p
>>>>a
>>>>cewalk
>>>>
>>>>You need to create these files for each repo, of course.
>>>>
>>>>But even if this all works, you might still hit another bug with
>>newer
>>>>Ubuntu / Debian distros using newer APT version, which got some
>>>>"improvements".
>>>>The error you might hit is the missing "Multi-Arch" header missing
>>>>within the repo meta data for each channel.
>>>>
>>>>So.....what I currently do (on my SW 2.7) system is.
>>>>
>>>>- Use the "old" sync script from Steve Meier in a modified version.
>>>>(see my repo
>>>>https://github.com/rpasche/spacewalk-debian-sync/tree/add-multiarch-
>>>>h
>>>>e
>>>>ader)
>>>>- wait some minutes after the sync finshed to let SW recreate the
>>>>"packages.gz" for each channel (here, the "Multi-Arch" headers are
>>>>missing)
>>>>- now run my spacewalk-add-debian-multiarch-header script to add the
>
>>>>missing headers to the packages.gz for each Debian channel I synced
>>>>before.
>>>>- now sign the repos
>>>>
>>>>Now, if all went well, clients have been patched (apt-spacewalk),
>>>>server has been patched (rhnRepository.py - see PR 636), your
>clients
>>
>>>>should work.
>>>>
>>>>Robert
>>>>
>>>>> D: do_call packages.checkNeedUpdate('rhnsd=1',){}
>>>>> D: Called refresh_list
>>>>> Updating package profile
>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>> D: rpcServer: Calling XMLRPC registration.update_packages
>>>>> D: local action status: (0, 'package list refreshed', {})
>>>>> D: rpcServer: Calling XMLRPC registration.welcome_message
>>>>>
>>>>> Does anyone have any ideas?
>>>>>
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Robert Paschedag <***@web.de>
>>>>> Sent: Monday, September 24, 2018 2:28 PM
>>>>> To: spacewalk-***@redhat.com; Randall R. Sargent
>>>>> <***@pilotcat.com>; spacewalk-***@redhat.com
>>>>> Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>>
>>>>> Am 24. September 2018 21:07:58 MESZ schrieb "Randall R. Sargent"
>>>><***@pilotcat.com>:
>>>>> >Thanks much for this. I’m not seeing any difference in the
>>behavior
>>>
>>>>> >of my 16.04 clients. They are able to register, but doing a
>>package
>>>
>>>>> >update fails (any package):
>>>>> >
>>>>> >[cid:***@01D4540F.FE7E7510]
>>>>> >
>>>>>
>>>>> I'm pretty sure, you are not using signs repos.
>>>>>
>>>>> Newer "apt", especially the python "apt" module fails while
>>checking
>>>>the signatures of the repo, thus the "update" fails.
>>>>>
>>>>> Note: it is the update ("apt-get update") within the call to
>>install
>>>>the package that fails.
>>>>>
>>>>> I also had this error with Debian 9, because I did not yet "sign"
>>my
>>>>repos and used "Allow unsigned = true" within apt.conf.
>>>>>
>>>>> But these settings seem to be ignored, hence, the "apt" python
>>>module
>>>>"requires" the repos to be signed. It took me a while to debug this.
>>>>>
>>>>> In case you "are" using signs repos, you should provide some more
>>>>info...e.g. "rhn_check -vvvv" while trying to install a package via
>>>SW.
>>>>>
>>>>> Robert
>>>>>
>>>>> >From: spacewalk-list-***@redhat.com
>>>>> ><spacewalk-list-***@redhat.com> On Behalf Of Neal Gompa
>>>>> >Sent: Monday, September 24, 2018 12:49 PM
>>>>> >To: spacewalk-***@redhat.com
>>>>> >Subject: Re: [Spacewalk-list] Ubuntu/Deb Support
>>>>> >
>>>>> >On Mon, Sep 24, 2018 at 10:59 AM Randall R. Sargent
>>>>> ><***@pilotcat.com<mailto:***@pilotcat.com>> wrote:
>>>>> >Hi all,
>>>>> >
>>>>> >*Newbie* to Spacewalk here. At the risk of beating a dead horse,
>>>has
>>>>
>>>>> >anyone been able to successfully manage Ubuntu clients on 2.8? We
>
>>>>> >have
>>>>> >14.04 & 16.04 clients and it would make my life so much easier if
>>I
>>>
>>>>> >could get them to reliably work. I have been able to get 14.04 to
>
>>>>> >register, and even update (with minor issues), but not 16.x.
>>>>> >Documentation is spotty out there in Google-land.
>>>>> >
>>>>> >Any help is appreciated!
>>>>> >
>>>>> >
>>>>> >Hey, yeah, it's possible to successfully manage Ubuntu clients
>>with
>>>
>>>>> >Spacewalk 2.8.
>>>>> >
>>>>> >A couple of months ago, my colleague and I fixed the clients to
>>>work
>>>>
>>>>> >in Spacewalk git master (upcoming Spacewalk 2.9), and we
>>backported
>>>
>>>>> >this to the 2.8 clients.
>>>>> >
>>>>> >The sources are here:
>>>>>
>>>>>https://gitlab.com/datto/engineering/spacewalk-debian-client-packag
>>>>>e
>>>>>s
>>>>> >
>>>>> >We also built the packages and published them on OBS. You can use
>
>>>>> >them by doing the following:
>>>>> >
>>>>> ># If you have older clients from Debian/Ubuntu repos $ sudo apt
>>>>purge
>>>>> >apt-transport-spacewalk rhnsd $ sudo apt autoremove # Installing
>>>the
>>>>
>>>>> >new packages $ sudo bash -c 'echo "deb
>>>>>
>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>> >/2.8:/debclients/xUbuntu_16.04/ /" >
>>>>> >/etc/apt/sources.list.d/spacewalk2.8-debclients.list'
>>>>> >$ sudo apt-key adv --fetch-keys
>>>>>
>>>>>http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:
>>>>> >/2.8:/debclients/xUbuntu_16.04/Release.key
>>>>> >$ sudo apt-get update
>>>>> >$ sudo apt install rhn-client-tools rhn-check rhn-setup rhnsd
>>>>> >apt-transport-spacewalk rhncfg rhncfg-actions
>>>>> >
>>>>> >There are builds for xUbuntu 16.04 and 18.04, as well as Debian
>>8.0
>>>
>>>>> >and 9.0. Just swap "xUbuntu_16.04" in the instructions above for
>>>>> >"xUbuntu_18.04" or "Debian_8.0" or "Debian_9.0".
>>>>> >
>>>>> >Future development of the clients are going into Spacewalk's next
>
>>>>> >release.
>>>>> >
>>>>> >
>>>>> >
>>>>> >--
>>>>> >真実はいつも一つ!/ Always, there's only one truth!
>>>>>
>>>>>
>>>>> --
>>>>> sent from my mobile device
>>>>>
>>>>>
>>>
>>>
>>>--
>>>sent from my mobile device
>>>
>>>_______________________________________________
>>>Spacewalk-list mailing list
>>>Spacewalk-***@redhat.com
>>>https://www.redhat.com/mailman/listinfo/spacewalk-list
>>
>>
>>--
>>sent from my mobile device
>
>
>--
>sent from my mobile device


--
sent from my mobile device
Continue reading on narkive:
Loading...