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

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
User avatar
l2g
Newbie
Newbie
Posts: 11
Joined: October 28th, 2016, 10:47 pm
Contact:

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

Post 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.
Last edited by l2g on September 10th, 2020, 10:44 am, edited 1 time in total.

User avatar
sander
Release Testers
Release Testers
Posts: 7188
Joined: January 22nd, 2008, 2:22 pm

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

Post 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

[[email protected] /]# 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%]


[[email protected] /]# 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)
[[email protected] /]#
Am I doing something wrong? Should I install the dependencies by hand?

User avatar
l2g
Newbie
Newbie
Posts: 11
Joined: October 28th, 2016, 10:47 pm
Contact:

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

Post 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!

User avatar
sander
Release Testers
Release Testers
Posts: 7188
Joined: January 22nd, 2008, 2:22 pm

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

Post 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: 
[ro[email protected] /]# 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!
[[email protected] /]# 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.
[[email protected] /]# 
[[email protected]ea3e97f6a4d /]# 
[[email protected] /]# 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
[[email protected] /]# 
[[email protected] /]# 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)
[[email protected] /]# 


User avatar
l2g
Newbie
Newbie
Posts: 11
Joined: October 28th, 2016, 10:47 pm
Contact:

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

Post 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

User avatar
sander
Release Testers
Release Testers
Posts: 7188
Joined: January 22nd, 2008, 2:22 pm

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

Post 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: 

[[email protected] /]# rpm -e nuxref-release
error: package nuxref-release is not installed
[[email protected] /]# 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.
[[email protected] /]# dnf clean all
Failed to set locale, defaulting to C.UTF-8
0 files removed
[[email protected] /]# 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)
[[email protected] /]#

User avatar
l2g
Newbie
Newbie
Posts: 11
Joined: October 28th, 2016, 10:47 pm
Contact:

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

Post 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

User avatar
sander
Release Testers
Release Testers
Posts: 7188
Joined: January 22nd, 2008, 2:22 pm

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

Post 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

Post Reply