Page 1 of 1

RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 8th, 2020, 1:55 pm
by l2g
I tried to share this info on /r/usenet but it got down voted into oblivion. Since it took me several hours to build an entire RPM suite for SABnzbd with extensions, I figured I'd try just passing the announcement here too.

@safihre please feel free to delete/move this post if this isn't the right spot for it.

You basically just have to connect to my repository (Nuxref);

Code: Select all

# Visit http://nuxref.com/nuxref-repository/ for the latest instructions
# but otherwise...:

# CentOS/Redhat/OracleLinux v8.0 Users:
sudo rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm

# Fedora Users:
VER=32
sudo rpm -Uhi http://repo.nuxref.com/fedora/fc32/en/x86_64/custom/nuxref-release-1.0.0-5.fc$VER.nuxref.noarch.rpm
CentOS 8 users will need to connect to EPEL:

Code: Select all

# EPEL Hookup
sudo dnf install -y epel-release
Then install what you need:

Code: Select all

# sabnzbd
sudo dnf install -y sabnzbd

# I've only packaged one script so far:
sudo dnf install -y sabnzbd-script-notify

# Once installed, the plugins will just show up in you SABnzbd settings - it's that easy
There is better (and more detailed) instructions here, but the above pretty much sums it up.

If you want me to add more extensions built as RPMs, just let me know. Please keep in mind they must work in Python v3.

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 9th, 2020, 12:00 am
by sander
Great that you did that!

I'm not a Centos user, but I tried the below.⎄

Code: Select all

$ sudo docker run -it centos /bin/bash
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
3c72a8ed6814: Pull complete 
Digest: sha256:76d24f3ba3317fa945743bb3746fbaf3a0b752f10b10376960de01da70685fbd
Status: Downloaded newer image for centos:latest

[root@e64489d6822e /]# rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
warning: /var/tmp/rpm-tmp.QCWDn5: Header V4 RSA/SHA1 Signature, key ID efe82e3b: NOKEY
################################# [100%]
################################# [100%]
Updating / installing...
################################# [100%]


[root@e64489d6822e /]# dnf install -y sabnzbd
Failed to set locale, defaulting to C.UTF-8
RHEL 8 - nuxref.com                                                                                                                    19 kB/s |  14 kB     00:00    
RHEL 8 - nuxref.com - shared                                                                                                          1.2 kB/s | 552  B     00:00    
CentOS-8 - AppStream                                                                                                                  2.6 MB/s | 5.8 MB     00:02    
CentOS-8 - Base                                                                                                                       2.9 MB/s | 2.2 MB     00:00    
CentOS-8 - Extras                                                                                                                      15 kB/s | 7.3 kB     00:00    
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides dbus-python needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides p7zip needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides par2cmdline needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides python3-cheetah needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides python3-cheroot needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides python3-cherrypy needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides python3-feedparser needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides python3-notify2 needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides python3-portend needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
  - nothing provides unrar needed by sabnzbd-3.0.2-2.fc31.nuxref.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@e64489d6822e /]#
Am I doing something wrong? Should I install the dependencies by hand?

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 9th, 2020, 10:23 am
by l2g
Hmm...

Strange, you're installing the el8 release, but your packages it's trying to find are fc31 (Fedora Core 31).

Another note is some of those packages are provided elsewhere so i didn't want to waste disk-space and rehost them. But maybe to ease the setup, i should probably do this. Thanks for bringing this to my attention. I'll get this straightened out.

Some of the RPMs you failed to find you can get by just also being hooked up to EPEL:

Code: Select all

# EPEL Hookup
sudo dnf install -y epel-release
Thank you for bringing this to my attention!

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 9th, 2020, 10:54 am
by sander
Then I get

Code: Select all

Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides dbus-python needed by sabnzbd-3.0.2-2.el8.nuxref.noarch
  - nothing provides python3-feedparser needed by sabnzbd-3.0.2-2.el8.nuxref.noarch
  - nothing provides unrar needed by sabnzbd-3.0.2-2.el8.nuxref.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Full log:

Code: Select all


$ sudo docker run -it centos /bin/bash
[sudo] password for sander: 
[root@dea3e97f6a4d /]# dnf install -y epel-release
Failed to set locale, defaulting to C.UTF-8
CentOS-8 - AppStream                                                                                                                  3.7 MB/s | 5.8 MB     00:01    
CentOS-8 - Base                                                                                                                       2.3 MB/s | 2.2 MB     00:00    
CentOS-8 - Extras                                                                                                                      69 kB/s | 7.3 kB     00:00    
Dependencies resolved.
======================================================================================================================================================================
 Package                                     Architecture                          Version                                Repository                             Size
======================================================================================================================================================================
Installing:
 epel-release                                noarch                                8-8.el8                                extras                                 23 k

Transaction Summary
======================================================================================================================================================================
Install  1 Package

Total download size: 23 k
Installed size: 32 k
Downloading Packages:
epel-release-8-8.el8.noarch.rpm                                                                                                       492 kB/s |  23 kB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                  65 kB/s |  23 kB     00:00     
warning: /var/cache/dnf/extras-cbfb2f07b0021b7e/packages/epel-release-8-8.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS-8 - Extras                                                                                                                     1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x8483C65D:
 Userid     : "CentOS (CentOS Official Signing Key) <[email protected]>"
 Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                              1/1 
  Installing       : epel-release-8-8.el8.noarch                                                                                                                  1/1 
  Running scriptlet: epel-release-8-8.el8.noarch                                                                                                                  1/1 
  Verifying        : epel-release-8-8.el8.noarch                                                                                                                  1/1 

Installed:
  epel-release-8-8.el8.noarch                                                                                                                                         

Complete!
[root@dea3e97f6a4d /]# rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
################################# [100%]
################################# [100%]
Updating / installing...
################################# [100%]
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
error: /etc/pki/rpm-gpg/RPM-GPG-KEY-nuxref-com: key 1 import failed.
[root@dea3e97f6a4d /]# 
[root@dea3e97f6a4d /]# 
[root@dea3e97f6a4d /]# rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
################################# [100%]
################################# [100%]
	package nuxref-release-1.0.0-5.el8.nuxref.noarch is already installed
[root@dea3e97f6a4d /]# 
[root@dea3e97f6a4d /]# dnf install -y sabnzbd
Failed to set locale, defaulting to C.UTF-8
RHEL 8 - nuxref.com                                                                                                                    32 kB/s |  14 kB     00:00    
RHEL 8 - nuxref.com - shared                                                                                                          1.3 kB/s | 552  B     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64                                                                                305 kB/s | 117 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                                                                                        4.6 MB/s | 8.0 MB     00:01    
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides dbus-python needed by sabnzbd-3.0.2-2.el8.nuxref.noarch
  - nothing provides python3-feedparser needed by sabnzbd-3.0.2-2.el8.nuxref.noarch
  - nothing provides unrar needed by sabnzbd-3.0.2-2.el8.nuxref.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@dea3e97f6a4d /]# 


Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 9th, 2020, 4:04 pm
by l2g
@Sanders; first off thank you so much for testing all this. I tested Fedora 31 and 33 and i just assumed it would work with EL8 since i didn't change any of the EL7 sections of the RPM SPEC file. You graciously proved me wrong :)

First off the epel-release RPM forwhatever reason is looking entirely at the wrong repo. So for you:

Code: Select all

# Drop the RPM out
sudo rpm -e nuxref-release

# Put it back in (fixed version)
sudo rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
  • I didn't realize that python3-feedparser doesn't ship with EL8 (but does with all Fedora versions). I built it for EL8 and added it to the repo. That will fix that entry.
  • I built the unrar packages as well and am now hosting them; so that will no longer be a problem
  • dbus-python i dropped as a Required RPM; i don't feel it's needed personally.
You may need to flush your cache to pull in the new repo updates:

Code: Select all

sudo dnf clean all
sudo dnf install sabnzbd

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 10th, 2020, 12:09 am
by sander
Wit a fresh docker I did this:

Code: Select all

rpm -e nuxref-release
rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
dnf clean all
dnf install sabnzbd
Is that correct? It gives the errors below

Code: Select all

$ sudo docker run -it centos /bin/bash
[sudo] password for sander: 

[root@f4cc707a8486 /]# rpm -e nuxref-release
error: package nuxref-release is not installed
[root@f4cc707a8486 /]# rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
warning: /var/tmp/rpm-tmp.hmIDCm: Header V4 RSA/SHA1 Signature, key ID efe82e3b: NOKEY
################################# [100%]
################################# [100%]
Updating / installing...
################################# [100%]
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
error: /etc/pki/rpm-gpg/RPM-GPG-KEY-nuxref-com: key 1 import failed.
[root@f4cc707a8486 /]# dnf clean all
Failed to set locale, defaulting to C.UTF-8
0 files removed
[root@f4cc707a8486 /]# dnf install sabnzbd
Failed to set locale, defaulting to C.UTF-8
RHEL 8 - nuxref.com                                                                                                                    35 kB/s |  17 kB     00:00    
RHEL 8 - nuxref.com - shared                                                                                                          9.3 kB/s | 5.3 kB     00:00    
CentOS-8 - AppStream                                                                                                                  4.0 MB/s | 5.8 MB     00:01    
CentOS-8 - Base                                                                                                                       2.9 MB/s | 2.2 MB     00:00    
CentOS-8 - Extras                                                                                                                      54 kB/s | 7.5 kB     00:00    
Error: 
 Problem: cannot install the best candidate for the job
  - nothing provides p7zip needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
  - nothing provides par2cmdline needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
  - nothing provides python3-cheetah needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
  - nothing provides python3-cheroot needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
  - nothing provides python3-cherrypy needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
  - nothing provides python3-notify2 needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
  - nothing provides python3-portend needed by sabnzbd-3.0.2-3.el8.nuxref.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@f4cc707a8486 /]#

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 10th, 2020, 10:43 am
by l2g
It's all good; you just forgot about the one step that CentOS 8 first requires you to connect to EPEL i spoke of earlier (i already updated the blog).

Code: Select all

# EPEL Hookup
sudo dnf install -y epel-release
I'll update my original comment above too

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: September 10th, 2020, 12:59 pm
by sander
After

Code: Select all

rpm -Uhi http://repo.nuxref.com/centos/8/en/x86_64/custom/nuxref-release-1.0.0-5.el8.nuxref.noarch.rpm
dnf install -y epel-release
dnf install -y sabnzbd
I could indeed run

Code: Select all

/usr/share/sabnzbd/SABnzbd.py
Well done! Thank you for providing the repo

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: December 26th, 2020, 10:40 pm
by kjtsanaktsidis
Hey @l2g - thanks for your work putting this together. Unfortunately I tried to set this up today but I can't install any of the packages because the TLS certs on your server are broken (you're only serving up the leaf certificate, but you need to serve the R3 letsencrypt intermediate as well).

I wrote up a big spiel about what the issue was but it's chock-full of URLs, and the forum won't let me post any because i'm a new user :/ so... if you want the detailed diagnosis on why it's not working (and why it works fine in browsers), i put it in a gist at.... "https" // gist dot github dot com /KJTsanaktsidis/ee2efa514c1117184d7683920e94fcf7

Re: RPM Packaging for SABnzbd for Fedora 30+ and CentOS/Redhat 8

Posted: December 29th, 2020, 1:50 pm
by l2g
@kjtsanaktsidis: Thank you so much for such an in-depth investigation! I had no idea I wasn't bundling it correctly. :o

I think I've fixed this now (all thanks to your directional help)!