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