Deb package

Would it be possible to package the deb (and possible also rpm) so that one of the following two options happen:

  1. use /etc/defaults/plexmediaserver to allow configuration of parameter like “PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR”

  2. do not overwrite “/etc/systemd/system/multi-user.target.wants/plexmediaserver.service” on every update which allows for changing “PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR”

That either of the above are not in place, ruins auto update.

No everyone wants to have their library in “/var/lib/plexmediaserver/Library/…”

Thanks,

Casper

Thanks.

I now know why I will never become a fan of systemd …

I did my first systemd override file yesterday after moving my library; wasn’t particularly difficult.

I’ve run Debian for a buncha years and a .deb package should respect an existing configuration in /etc. Either the .deb package is configured incorrectly or someone packaged it that way on purpose :slight_smile:

What’s wrong with the debian packaging?

Jumpstart issue?
Sysv-init issue?

Not much, it just shouldn’t overwrite an existing configuration in /etc unless the sysadmin explicitly tells dpkg to do that. /etc belongs to the sysadmin and by default dpkg won’t overwrite an existing configuration unless you use a ‘force-confmiss’ switch.

If apt is overwriting files in /etc it’s because something in the package told it to :slight_smile:

There are files which belong to core PMS. If I’m accidentally overwriting files I shouldn’t be, I can easily correct that.

I thought I had everything correct with which files are owned by the package manager because I had to re-write all of it for systemd and bash (the SELinux change update).

Under systemd, /lib/systemd/system, everything is under system control, with exception to override files (e.g. /etc/systemd/system/plexmediaserver.service.d/override.conf) which is your customization of the default. I leave that sacred. I do overwrite /lib/systemd/system/plexmediaserver.service because it’s under package manager control.

If you can help me sort it out, I’ll gladly implement the change provided it’s not a 1-off thing

Hi, Chuck - I didn’t realize I was talking to the packager :slight_smile:

The purpose of /etc/systemd/system is to override defaults in /lib/systemd/system. An override file shouldn’t be necessary because /etc/systemd/system/plexmediaserver.service is an override file.

The proper way to override a systemd .service file is to copy the file from /lib/systemd/system to /etc/systemd/system and make your edits there. The only time you would need a separate override file is if you wanted to override what’s in /etc, which belongs to the sysadmin anyway either way will work to override what’s in /lib but if someone has manually overridden the service we probably shouldn’t be overwriting it :slight_smile:

the plexmediaserver.service in /etc/systemd/system is superflous if it mirrors what’s in /lib/systemd -

I was using the override process until about five minutes ago - then I renamed the override.conf, fixed /etc/systemd/system/plexmediaserver.service to store its database in my home directory, changed the location of the temp directory and the user under which Plex runs. Worked just fine :slight_smile:

Actually, you’re in error because there are two types of overrides and your method cuts you off from any corrective actions I may need to take at the system level

  1. You may override the service by using `/etc/systemd/system/plexmediaserver.service.d/override.conf
  2. You may completely override the entire unit forever by creating /etc/systemd/system/plexmediaserver.service

I chose to implement the service override. It gives you the freedom to customize variables you need for your local conditions while still affording me the the ability to adapt to system-level issues . Doing it this way affords you the same freedom as /etc/default/plexmediaserver on init systems.

The documentation for this is here: Customizing your Plex configuration

Edit: Some of the vendors ‘tweak’ systemd to their liking. Because the packaging must work everywhere, I utilize the systemd standard specifications. Since I’ve implemented it 2 years ago, there have been no ill side-effects

FWIW: I will always re-write /lib/systemd/system/plexmediaserver.service because there is the well established and supported mechanism which works on:

  • Ubuntu 16+
  • Debian 8+
  • Centos 7
  • Fedora

And any other system which supports systemd.

In the override file, you would only need the following lines which is why i don’t understand copying the entire service file.

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/home/<username>
User=<username>

Oh, I understand, I just don’t agree :slight_smile:

Believe me, I appreciate everything you guys do and I really don’t feel the need to debate - I would prefer the package respected changes I make in /etc, that’s all.

As far as changes in /lib - if I can’t read a changelog and my override breaks the system that’s my fault and I get to fix the thing or at least keep the pieces :smiley:

Have a good rest-of-the-weekend -

I respect them. It must be apt. If I didn’t respect /etc then the override would be useless.

I don’t know what version you have but whatever works for you is good.

The problem with Linux, which we can agree on, “There’s too many ways to do the same thing!” :slight_smile:

here’s my ‘install’ file.

All the PMS binaries are in the src directory.

[chuck@lizum debian.143]$ cat *.install
src/* /usr/lib/plexmediaserver
debian/start_pms /usr/sbin
plexmediaserver.desktop /usr/share/applications
plexmediaserver.png /usr/share/pixmaps
plexmediaserver.service /lib/systemd/system
distribution.txt /usr/lib/plexmediaserver/Resources
plexmediaserver.list /etc/apt/sources.list.d
60-tvbutler-perms.rules /lib/udev/rules.d
[chuck@lizum debian.144]$

Absolutely. We love choices :slight_smile:

Running Debian Unstable here - I did have some GPG weirdness with apt and plex repos for awhile that seems to have resolved now. Other than that each installation has been pretty much flawless.

Hey - thank the rest of the team for me, willya?

Will do!

Enjoy that rollercoaster ! :smiley:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.