You are not logged in.

#1 2015-09-20 01:23:48

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

makepkg package not upgrading

I setup a headless pc with Plex Server running on Arch. (4.1.6)

When built I installed Plex Server  version 0.9.12.11 using makepgk from aur: https://aur.archlinux.org/packages/plex … -plexpass/
Everything worked well, fastest plex server I have had.

Then the new Plex version came out I upgraded using the same AUR repo which showed the latest version.
The upgrade showed no errors and if I check the version installed it shows Version 0.9.12.12 but going into Plex with browser it still says I am out of date?

Output for:

 sudo pacman -Q plex-media-server-plexpass

is:

plex-media-server-plexpass 0.9.12.12.1459-1

So it looks like the latest version is installed and running but not actually showing in the app. Is this an application issue?

Offline

#2 2015-09-20 02:04:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: makepkg package not upgrading

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-09-20 07:16:24

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: makepkg package not upgrading

Stupid question, but did you restart the plex server?

Offline

#4 2015-09-20 07:27:07

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

@Runical, yes restarted service and after no joy the system. No change.

Offline

#5 2015-09-20 07:50:59

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

After the restart question I looked at what is actually being started by the service. And if I am correct it starting Plex from the /usr/lib folder.

[Unit]
Description=Plex Media Server for Linux
After=network.target

[Service]
Environment="PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/var/lib/plexmediaserver/Library/Application Support"
Environment=PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver
Environment=PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
Environment=PLEX_MEDIA_SERVER_TMPDIR=/tmp
]Environment=LD_LIBRARY_PATH=/usr/lib/plexmediaserver
Environment=LC_ALL=en_US.UTF-8
Environment=LANG=en_US.UTF-8
ExecStartPre=/bin/sh -c '/usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}"'
ExecStart=/bin/sh -c '/usr/lib/plexmediaserver/Plex\ Media\ Server'
Type=simple
User=plex
Group=plex
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

I stopped the service using systemctl stop and then started Plex from the /opt/plexmediaserver/ folder using the start shell script
Then although my library is not showing it started the new version.

Does this mean that the AUR script below has copied the files incorrectly? This is the AUR PKGBUILD section that setup the install:

 install -dm 755 "${pkgdir}"/{opt,etc/conf.d,usr/lib/systemd/system}
  cp -dr --no-preserve='ownership' usr/lib/plexmediaserver "${pkgdir}"/opt/
  install -m 644 plexmediaserver.service "${pkgdir}"/usr/lib/systemd/system/
  install -m 644 plexmediaserver.conf.d "${pkgdir}"/etc/conf.d/plexmediaserver

  install -dm 755 "${pkgdir}"/var/lib/plex
  chown 421:421 -R "${pkgdir}"/var/lib/plex

  install -dm 755 "${pkgdir}"/usr/share/licenses/plex-media-server
  install -m 644 terms.txt "${pkgdir}"/usr/share/licenses/plex-media-server/

Offline

#6 2015-09-20 08:16:08

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: makepkg package not upgrading

Which package owns that service file and the directory /usr/lib/plexmediaserver? Neither seems to belong to that AUR package, so check with `pacman -Qo`.

Offline

#7 2015-09-20 08:24:49

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

Cannot find file or directory? Could I have installed some other package?

sudo pacman -Q --owns plex-media-server-plexpass
error: failed to find 'plex-media-server-plexpass' in PATH: No such file or directory

Offline

#8 2015-09-20 08:34:56

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: makepkg package not upgrading

You need to call that on the file or directory. In  this case  /usr/lib/plexmediaserver


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#9 2015-09-20 08:37:56

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

By call you mean run it against the directory:

 
sudo pacman -Qo /usr/lib/plexmediaserver/
error: No package owns /usr/lib/plexmediaserver

Offline

#10 2015-09-20 08:47:57

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

Just out the interest of learning. Like having ownership of file or directory a package can own a file or directory? Or am I confused?

Offline

#11 2015-09-20 12:14:41

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,396

Re: makepkg package not upgrading

$ pacman -Qo /usr/share/oolite/
/usr/share/oolite/ is owned by oolite-dev 1.82-1
~]$ 

keep in mind that pacman keeps it's own database of ownership for packages.  It is completely separate from filesystem owernship.


what does pacman -Qo /usr/lib/plexmediaserver/Plex\ Media\ Server output ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#12 2015-09-20 13:26:48

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

@Lone_Wolf,
The output is still the same no ownership.

sudo pacman -Qo /usr/lib/plexmediaserver/Plex\ Media\ Server 
error: No package owns /usr/lib/plexmediaserver/Plex Media Server

And the version in the /opt directory output this:

sudo pacman -Qo /opt/plexmediaserver/
/opt/plexmediaserver/ is owned by plex-media-server-plexpass 0.9.12.12.1459-1

Another Newb question, is there a chown for packages?

Offline

#13 2015-09-20 13:30:56

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

I just did some reading on
https://wiki.archlinux.org/index.php/Pacman
and it looks like this is what I will need to do.

If you had installed a program manually without using pacman or a frontend, for example through make install, you have to remove it and all its files and reinstall properly using pacman.

EDIT: (prevent to many posts)

And after looking at the "files" file under /var/lib/pacman/local/plex-media-server-plexpass-0.9.12.12.1459-1/ it shows all files are under /opt.

Which means that pacman does not even know about the version installed under /usr/lib/plexmediaserver.

Could this have happened when I ran makepkg? The PKGBUILD was done in a different folder?

Last edited by blueteq (2015-09-20 13:37:00)

Offline

#14 2015-09-20 15:49:23

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: makepkg package not upgrading

If a package "owns" a file, that means that the file was installed by installing the package. It was "in" the package.

If no package owns a file, it means that the file didn't get there because of a pacman package you installed.

So, no, there's no chown for packages or anything like that. Pacman just keeps track of what files a package installs. It has nothing to do with the other kind of file ownership.

I don't think it's likely that the other version got there because of the PKGBUILD, though I don't really get the prepare() function of the PKGBUILD. Are you on ARM perchance?

Offline

#15 2015-09-20 23:00:20

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

@Steef435

That makes sense, thanks. By pacman having owership it means it installed the package and keeping track of it. I somehow installed this package without pacman keeping track.

Its x86, Intel i3. So no ARM.

Offline

#16 2015-09-21 15:04:26

Steef435
Member
Registered: 2013-08-29
Posts: 577
Website

Re: makepkg package not upgrading

Yes, it appears to be the case. It's not managed by pacman and it's outdated so you might as well get rid of it.

Where does that service file come from? The one provided by the package looks like this:

[Unit]
Description=Plex Media Server
After=network.target

[Service]
EnvironmentFile=/etc/conf.d/plexmediaserver
ExecStart=/opt/plexmediaserver/Plex\x20Media\x20Server
Type=simple
User=plex
Group=plex
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
StandardOutput=null

[Install]
WantedBy=multi-user.target

EDIT: I expect it's also not owned by a package, you may have installed the software without using pacman in the past or maybe the software thought it a good idea to mess with your system. The best thing I think you could do is to remove all the unowned files related to plex.

Last edited by Steef435 (2015-09-21 15:07:30)

Offline

#17 2015-09-21 22:53:07

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

Thanks @Steef435. Will remove and install again.

Offline

#18 2015-09-27 12:54:04

blueteq
Member
From: Melbourne
Registered: 2013-09-06
Posts: 23

Re: makepkg package not upgrading

Thank you all for the help, just an update. I managed to get the latest version installed.

As pacman did not own the package I manually deleted the plexmediaserver folder under /usr/lib/plexmediaserver

 sudo rm -rf /usr/lib/plexmediaserver

Disabled the service:

 sudo systemctl disable plexmediaserver.service

Then deleted the service file:

 sudo rm /etc/systemd/system/plexmediaserver.service

Downloaded the latest Plex-Media-Server-Plexpass snapshot from: https://aur.archlinux.org/packages/plex … -plexpass/
used makepkg to build and isntall version 9.12.12 into /opt/

For some reason my backups was not done properly so I have to setup libraries again. At least its now upgradable and working.

Offline

Board footer

Powered by FluxBB