We ran into some minor issues trying to load packages into a custom child channel. First, rhnpush wouldn't recognize deb packages. This minor change allowed rhnpush to recognize .deb files diff -u /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py.bak /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py --- /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py.bak 2022-04-13 11:02:58.598147587 -0700 +++ /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py 2022-04-13 10:07:14.590320048 -0700 @@ -177,7 +177,7 @@ for filename in listdir(self.options.dir): # only add packages - if filename[-3:] in ("rpm", "mpm"): + if filename[-3:] in ("rpm", "mpm", "deb"): self.files.append(filename) def filter_excludes(self): Next, we ran into some permission issues on the back end. Exception Handler Information Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/spacewalk/server/apacheUploadServer.py", line 102, in _wrapper ret = function(req) File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 117, in handler self.file_checksum_type, self.file_checksum) File "/usr/lib/python3.6/site-packages/spacewalk/server/rhnPackageUpload.py", line 281, in save_uploaded_package prefix='-'.join((nevra[0], nevra[2], nevra[3], nevra[4]))) File "/usr/lib64/python3.6/tempfile.py", line 551, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/usr/lib64/python3.6/tempfile.py", line 262, in _mkstemp_inner fd = _os.open(file, flags, 0o600) PermissionError: [Errno 13] Permission denied: '/var/spacewalk/packages/1/stage/Newpackaget-8.3.0-X-amd64-debmdg_d6ri' Turns out permissions on /var/spacewalk/packages/1/stage were root.root. Chown wwwrun.www /var/spacewalk/packages/1/stage to match the other dirs in /var/spacewalk/packages/1 allowed the rhnpush to succeed. Cheers, Paul-Andre Panon
Hi Paul-Andre, I would suggest to submit a PR so other people who stumble upon this issue don't need to figure it out by themselves. Best regards, Abid On 4/13/22 20:28, Paul-Andre Panon wrote:
We ran into some minor issues trying to load packages into a custom child channel.
First, rhnpush wouldn't recognize deb packages. This minor change allowed rhnpush to recognize .deb files diff -u /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py.bak /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py --- /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py.bak 2022-04-13 11:02:58.598147587 -0700 +++ /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py 2022-04-13 10:07:14.590320048 -0700 @@ -177,7 +177,7 @@
for filename in listdir(self.options.dir): # only add packages - if filename[-3:] in ("rpm", "mpm"): + if filename[-3:] in ("rpm", "mpm", "deb"): self.files.append(filename)
def filter_excludes(self):
Next, we ran into some permission issues on the back end.
Exception Handler Information Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/spacewalk/server/apacheUploadServer.py", line 102, in _wrapper ret = function(req) File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 117, in handler self.file_checksum_type, self.file_checksum) File "/usr/lib/python3.6/site-packages/spacewalk/server/rhnPackageUpload.py", line 281, in save_uploaded_package prefix='-'.join((nevra[0], nevra[2], nevra[3], nevra[4]))) File "/usr/lib64/python3.6/tempfile.py", line 551, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/usr/lib64/python3.6/tempfile.py", line 262, in _mkstemp_inner fd = _os.open(file, flags, 0o600) PermissionError: [Errno 13] Permission denied: '/var/spacewalk/packages/1/stage/Newpackaget-8.3.0-X-amd64-debmdg_d6ri'
Turns out permissions on /var/spacewalk/packages/1/stage were root.root. Chown wwwrun.www /var/spacewalk/packages/1/stage to match the other dirs in /var/spacewalk/packages/1 allowed the rhnpush to succeed.
Cheers,
Paul-Andre Panon
-- Abid Mehmood SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director/Geschäftsführer: Ivo Totev
I've opened an issue (#5212 ) on GitHub including the details and workarounds from my previous message, as well as one more problem we noticed: 3 Problems with creating custom channels for Ubuntu. · Issue #5212 · uyuni-project/uyuni (github.com) -----Original Message----- From: Abid Mehmood <amehmood@suse.de> Sent: Thursday, April 14, 2022 1:31 AM To: users@lists.uyuni-project.org Subject: Re: minor issues trying to use rhnpush Hi Paul-Andre, I would suggest to submit a PR so other people who stumble upon this issue don't need to figure it out by themselves. Best regards, Abid On 4/13/22 20:28, Paul-Andre Panon wrote:
We ran into some minor issues trying to load packages into a custom child channel.
First, rhnpush wouldn't recognize deb packages. This minor change allowed rhnpush to recognize .deb files diff -u /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py.bak /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py --- /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py.bak 2022-04-13 11:02:58.598147587 -0700 +++ /usr/lib/python3.6/site-packages/rhnpush/uploadLib.py 2022-04-13 10:07:14.590320048 -0700 @@ -177,7 +177,7 @@
for filename in listdir(self.options.dir): # only add packages - if filename[-3:] in ("rpm", "mpm"): + if filename[-3:] in ("rpm", "mpm", "deb"): self.files.append(filename)
def filter_excludes(self):
Next, we ran into some permission issues on the back end.
Exception Handler Information Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/spacewalk/server/apacheUploadServer. py", line 102, in _wrapper ret = function(req) File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 117, in handler self.file_checksum_type, self.file_checksum) File "/usr/lib/python3.6/site-packages/spacewalk/server/rhnPackageUpload.py ", line 281, in save_uploaded_package prefix='-'.join((nevra[0], nevra[2], nevra[3], nevra[4]))) File "/usr/lib64/python3.6/tempfile.py", line 551, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/usr/lib64/python3.6/tempfile.py", line 262, in _mkstemp_inner fd = _os.open(file, flags, 0o600) PermissionError: [Errno 13] Permission denied: '/var/spacewalk/packages/1/stage/Newpackaget-8.3.0-X-amd64-debmdg_d6ri'
Turns out permissions on /var/spacewalk/packages/1/stage were root.root. Chown wwwrun.www /var/spacewalk/packages/1/stage to match the other dirs in /var/spacewalk/packages/1 allowed the rhnpush to succeed.
Cheers,
Paul-Andre Panon
-- Abid Mehmood SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director/Geschäftsführer: Ivo Totev
participants (2)
-
Abid Mehmood
-
Paul-Andre Panon