New RPM packaging for Plex Media Server
This is to introduce, discuss, test, and resolve any errors with the new packaging .
Package processing is identical to that seen on Debian-based systems.
A. What has changed
I have taken the Debian (DEB) packaging, transferred it to Redhat (RPM) systems, and added the appropriate special handling needed by some distros.
It performs the same non-destructive pre-installation validation per the %pre
phase of the spec
file.
It evaluates the service override file(s) per systemd handling rules and integrates that info as it performs validation so it can correctly determine what the runtime environment will be.
It is also capable of utilizing variables from your Plex Preferences.xml. If any values are extracted and used, you will see them annotated as such in the configuration summary.
Any errors are captured there, reported, and, if sufficient to cause failure, will force it to exit until the errors are remedied.
At this time, it supports:
B. Currently Supports
- Normal installation & upgrade on systemd-based systems.
- LXC container installation
- Docker container installation
- Installing in a custom (container) configuration.
Installation Distros & version minimums currently are set as:
- Centos 7+
- Fedora 26+
- Redhat 7+
- OpenSuse (Leap) 15+
I have tested installation with:
- Centos 7
- Fedora 31
- openSuse Leap 15.0
C. What it looks like
[root@localhost output-all]# yum -y install plexmediaserver-1.20.0.3125-9661fc77c.x86_64.rpm
Loaded plugins: fastestmirror, langpacks
Examining plexmediaserver-1.20.0.3125-9661fc77c.x86_64.rpm: plexmediaserver-1.20.0.3125-9661fc77c.x86_64
Marking plexmediaserver-1.20.0.3125-9661fc77c.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package plexmediaserver.x86_64 0:1.20.0.3125-9661fc77c will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===========================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================
Installing:
plexmediaserver x86_64 1.20.0.3125-9661fc77c /plexmediaserver-1.20.0.3125-9661fc77c.x86_64 227 M
Transaction Summary
===========================================================================================================================================================
Install 1 Package
Total size: 227 M
Installed size: 227 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Installing : plexmediaserver-1.20.0.3125-9661fc77c.x86_64 1/1
PlexMediaServer install: 1.20.0.3125-9661fc77c - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: Update
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/stuff.conf
PlexMediaServer install: Transcoding HW: Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: Starting Plex Media Server.
PlexMediaServer install: 1.20.0.3125-9661fc77c - Installation successful. Errors: 0, Warnings: 0
Verifying : plexmediaserver-1.20.0.3125-9661fc77c.x86_64 1/1
Installed:
plexmediaserver.x86_64 0:1.20.0.3125-9661fc77c
Complete!
[root@localhost output-all]#
As with all systems, /tmp/plexinstaller.log
is written for diagnostic purposes.
[root@localhost output-all]# cat /tmp/plexinstaller.log
# Plex Media Server installation configuration info: Sat Jul 25 12:05:56 PDT 2020
Systemd=1
Custom=0
LinuxContainer=0
NewInstall=0
HaveOverride=1
OverrideFile="/etc/systemd/system/plexmediaserver.service.d/stuff.conf"
PlexUser="plex"
PlexGroup="plex"
VideoGroup="video"
AppSuppDir="/var/lib/plexmediaserver/Library/Application Support"
PlexTempDir="/tmp"
LangEncoding="en_US.UTF-8"
ExistingVersion=0
HaveHardware=1
HaveTranscoderPref=0
NeedUser=0
NeedGroup=0
NeedVideo=0
Verbose=1
Running=0
Errors=0
Warnings=0
Platform="VMware Virtual Platform"
Processor="Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz"
Distro="CentOS Linux 7 (Core)"
Kernel="Linux localhost.localdomain 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux"
Memory="3770 1028 1068"
[root@localhost output-all]#
D. NON-SIGNED developer test packages
After a few have helped me confirm this fundamentally works outside my development & test VMs, I will setup the CI system to generate properly signed packages which will allow us to complete testing on all the platforms and move this to the next stage in the QA process.
E. Caution is advised.
As with any experimental / development software, caution is advised.
This is not something which should be tried on your production system at this time unless you’re 100% confident in your ability to install, uninstall, re-install previous version(s) and resume normal via the command line.
At this time, I have created only the X86_64 package. When complete and released the 32 bit build will also be available.
Please feel free to comment and discuss below.
I welcome open discussion on this new packaging to ensure it best serves the needs of everyone.