Freebsd (Freenas in own jail) - Portsnap out of date

Tried to upgrade my plex installation to the latest (1.15.3.876 *as indicated on the plex interface), updated my ports *“portsnap update” and also tried a fresh install “portsnap fetch extract” but version of plex still points to v1.15.2.793 for plex *yet most recent release is v1.15.3.876

Tried to download the tar manually but havent found any info on how to actually install it. Made an attempt to explode the tar into /usr/local/share and after renaming old installation and renaming just exploded version to old plex server name, it wouldnt load - Searched left right and center but failed to find any useful info on how to actually apply manually downloaded tar’s for plex.

If portsnap were up to date then it wouldnt have been much of an issue, but make file is still assuming previous version.

Due to the way the ports system work it takes manual intervention and a bit of time to get that updated upstream and then built so you can use pkg install (1-2 days if using the latest freebsd repo).

That said also due to the way the ports system makes things simple it would be that hard to:

  1. Download the tarball to /usr/ports/distfiles/
  2. cd to the port directory
    3…Update the Makefile PORTVERSION and sufix
  3. Run: make makesum
  4. Run: make package

Then you can install the txz build into the ports work/pkg/ dir.

I know it’s not ideal, but until the port updates it is a viable workaround and could be automated, it should also work in any freebsd based distro like freenas.

Just to add on what was said before, for the OP, this is not just an issue with Plex.

Many software devs do NOT upload their content onto freshports or other repositories.

They release the .tar* file and there’s plenty of information out there on how to install any file like that in the *BSD world. It’s not really title-specific.

That said, the Plex updates are loaded onto freshports by an individual who can sometimes be found on these forums, at his personal availability.

You can always check this stuff on freshports to see when it was last updated. As of right now, the main public release Plex platform hasn’t been updated since 3/25/19 I believe. The Plexpass variant was updated on 4/3.

Not related to your question, but cause it comes up, the PKG variant is generated I believe on Thursdays of each week. So you have to verify that freshports was updated, then the following Thursday, the PKG version will be available in PKG format for installation as well.

This is why some use those popular scripts to update, which fetch the tar file from Plex directly and apply it.

Im sure your right - only problem is that I dont seem to be able to find anything that actually works!

Initially downloaded the tar from Plex site and exploded it into “/usr/local/share/plexmediaserver” after shutting down plex service and renaming old folder. - service refuse to start.

Then followed this (which is pretty much what I did initially) - and again service refuse to start up once done.
No info in that tar ball and no info elsewhere.

Steps:

  1. mkdir /tmp/src
  2. cd /tmp/src
  3. wget http://downloads.plex.tv/plex-media-server-new/1.15.3.876-ad6e39743/freebsd/PlexMediaServer-1.15.3.876-ad6e39743-FreeBSD-amd64.tar.bz2
  4. tar xvf PlexMediaServer-1.15.3.876-ad6e39743-FreeBSD-amd64.tar.bz2
  5. service plexmediaserver stop
  6. mv /usr/local/share/plexmediaserver /usr/local/share/plexmediaserver.old
  7. mkdir /usr/local/share/plexmediaserver
  8. cp -r /tmp/src/PlexMediaServer-1.15.3.876-ad6e39743/* /usr/local/share/plexmediaserver/
  9. service plexmediaserver start

Should also be noted that Im NOT using PlexPass version

From what you just typed it doesn’t seem like you’re trying anything other then directly replacing the binaries!

Best advice I can give as a FreeBSD user my self: Stick to the pkg/ports system, or the FreeNAS plugin.

Replacing files doesn’t handle the rc.d file i.e.

Tehe’s several posts in the forums about the rc.d script needing to be updated to match 1.15.x releases i.e. and this could change again in future (Although it should be rare).

If you unpack to /usr/ports/distfiles as I said and do the rest of the steps you’ll end up with a valid txz, you can then pkg remove plexmediaserver pkg install /usr/ports/multimedia/plexmediaserver/work/pkg/XXXXXXXX.txz

The tarbal is NOT a “ready to install pkg” as explained by @tullnd, although there’s been some consideration in doing it for FreeBSD, the tarball is still useful for FreeBSD based OSes which is why historically it has always been easier to just provide the tarball and let the existing systems deal with the rest.

Ok, get that - however part of my point on this is that PLEX that
provide these updates dont mention a word on installation

  Other posts suggest exactly the method I outlined so I guess it

should work simply swap out old with new

cheers

The support articles do say that on NAS devices you should install via whichever method is provided by such system!

Not only FreeNAS but other NAS systems have even more complicated ways to manually update packages and even when we do provide a public build that doesn’t mean they get updated.
They also have their own process, QA etc and in some cases lock to a specific version until they decide to update to our most recent public.

FreeNAS i.e. is always using a previous version of the FreeBSD base system it self, because stability is more important in this systems then always running latest OS/software versions.

There’s also some history around this… FreeNAS used a much more complicated method for plugins in the past, they are now based on iocage jails, and this simplifies things.

So maybe it now makes more sense to have a txz, or host our own repo for pkgng, which I can say its something we have considered since we have the new build system, but this does take time and resources so I can’t really promise anything.

Of course it doesn’t mean that FreeNAS would always update the plugin from our txz (they don’t do it know if the pkg is updated on FreeBSD repo anyway) But having a “ready to install txz” would at least make it easier for public builds on FreeBSD, or in you’re case when using a “clean jail” and not the plugin also it would also avoid some confusion and issues when people start using custom scripts.

For now however to get stable and recent build best way is to wait for the port to update.

What about the method I posted? would that help you? If so I’m sure I could script it to update the Makefile, a run those commands. (Its own I update my own pms server :slight_smile: )

I think your suggestion would work even though there’s some mucking around with the make file etc - I don’t necessary like to idea of being forced to de-install plex as part of this though since that would blow away everything including plex config and db.
Sure you could tar your existing “/usr/local/plexdata/Plex\ Media\ Server” and once the new installation is there, replace the “Plex Media Server” folder content with your tar ball. But its still messy :wink:
Would have been nice if there was a clean way to upgrade existing versions.

Ok, port tree now updated. (portsnap fetch extract)

Steps performed to update plex:

  1. logged on to plex web interface and turned off Library=>Empty trash automatically after every scan" then logged out as a user.
  2. ssh into jail
  3. as a precaution I tared up old plex data
    i,e tar -zcvf /usr/local/plexdata/backup-yyyy.dd.mm-plex.archive.tar.gz /usr/local/plexdata/Plex\ Media\ Server
  4. pkg remove plexmediaserver
  5. cd /usr/ports/multimedia/plexmediaserver
  6. make install clean
  7. logged on to plex web interface and turned on the “Library=>Empty trash automatically after every scan” again

Update successful!!!
Should probably have shut down the service before, but forgot it and it didn’t affect anything
Old plex config tarred up earlier, remained untouched so no need to fall back on backup.

That’s just how a pkg upgrade is done, it’s essentially a remove+install.

Doing that simply removes the files in /usr/ local/share/plexmediaserver or others that the pkg might have installed, it does not remove anything in your plexdata dir.

Or to be more clear, if you run pkg info -l plexmediaserver it will list all the files installed by the port.

Those files are the ones that get removed on pkg remove, so in practice even if there was a file on the install dir that was not put there by pkgng then it doesn’t get removed.

So yeah it’s a very safe process.

Well

  • pkg remove plexmediaserver
  • cd /usr/ports/multimedia/plexmediaserver
  • make install clean

… is what I did and it worked - I will keep what you said safe until next time :wink: - cheers

I prefer the make package option cause you can copy the txz to another dir and keep it there for easy rollback :slight_smile:

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