ReadyNAS6 restructured packages (Intel) UPDATED + WORKING

I will wait for a new release before fiddling, but I can mention, (while I am on 0.9.9.0 with NAS OS 6.1.5) but the GUI reports 0.9.8.5 as being the installed version.

It doesn't matter, since plex reports 0.9.9.0, but just something to mention.

I do notice on the Netgear box, if i pause a chromecast"ed" stream, it will never resume.  But when I pause a chromcast"ed" UnRAID it has no issues.

I will wait for a new release before fiddling, but I can mention, (while I am on 0.9.9.0 with NAS OS 6.1.5) but the GUI reports 0.9.8.5 as being the installed version.

It doesn't matter, since plex reports 0.9.9.0, but just something to mention.

I do notice on the Netgear box, if i pause a chromecast"ed" stream, it will never resume.  But when I pause a chromcast"ed" UnRAID it has no issues.

Well, now that I know I can reliably get back to 0.9.8.18, I'll be testing this tonight. I had once installed 0.9.9.0 with the two package method and had transcoding/playback issues. I'll beat my head against this some, but if it gets too awful then I roll back. This rebundling will likely not address that since it's really the same build. :)

I will wait for a new release before fiddling, but I can mention, (while I am on 0.9.9.0 with NAS OS 6.1.5) but the GUI reports 0.9.8.5 as being the installed version.

It doesn't matter, since plex reports 0.9.9.0, but just something to mention.

I do notice on the Netgear box, if i pause a chromecast"ed" stream, it will never resume. But when I pause a chromcast"ed" UnRAID it has no issues.


The GUI is reading the version from /apps/plexmediaserver/config.xml so change it there. If the config file isn't there it defaults to reading it from /apps/.freeapps/plexmediaserver/config.xml

And if this latest package looks good, then it will most likely be the code/framework that's getting added for the next release. Just heads up on that.


- Mark

Well, now that I know I can reliably get back to 0.9.8.18, I'll be testing this tonight. I had once installed 0.9.9.0 with the two package method and had transcoding/playback issues. I'll beat my head against this some, but if it gets too awful then I roll back. This rebundling will likely not address that since it's really the same build. :)


Appreciate it Bill, thanks.


- Mark

here is my output:

root@NAS:~# dpkg -i plexmediaserver-ros6-binaries_0.9.9.0.308-7e8496a_amd64.deb 

dpkg: considering removing plexmediaserver-ros6 in favour of plexmediaserver-ros6-binaries ...

dpkg: yes, will remove plexmediaserver-ros6 in favour of plexmediaserver-ros6-binaries

(Reading database ... 23284 files and directories currently installed.)

Preparing to replace plexmediaserver-ros6-binaries 0.9.8.18.290-11b7fdd (using plexmediaserver-ros6-binaries_0.9.9.0.308-7e8496a_amd64.deb) ...

rm '/etc/systemd/system/multi-user.target.wants/fvapp-plexmediaserver.service'

Unpacking replacement plexmediaserver-ros6-binaries ...

Setting up plexmediaserver-ros6-binaries (0.9.9.0.308-7e8496a) ...

Adding 'diversion of /apps/plexmediaserver/config.xml to /apps/plexmediaserver/config.xml.orig by plexmediaserver-ros6-binaries'

dpkg-divert: error: rename involves overwriting `/apps/plexmediaserver/config.xml.orig' with

  different file `/apps/plexmediaserver/config.xml', not allowed

dpkg: error processing plexmediaserver-ros6-binaries (--install):

 subprocess installed post-installation script returned error exit status 2

Errors were encountered while processing:

 plexmediaserver-ros6-binaries

Plex installed and is working with the right version. I´m not quite sure why.

Right. Didn’t see that on my own test runs, ill figure put how to ensure that the right config ends up in /apps/plexmediaserver without issues. I assume the reason for this happening the is we plant a new config.xml in place and then old gets renamed to .orig, so diverting the config.xml.orig to config.xml might be trying to overwrite our new one. So not a huge error, but one I need to fix. Thanks for reporting back.


  • Mark

That config.xml message was occuring in bundles previously too, during upgrades. So this may be fixing an old behavior at this point. I was able to successfully apply this latest package from FrontView and things launched up cleanly afterward. This was an upgrade from 0.9.8.18. Next I will attempt to remove and reinstall fresh using this package, again through Frontview.

For completeness, I'll take the dpkg route as well. Sure it's the same thing. But at least with the two-package setup, I was always unable to apply updates from FrontView, so that seemed a reasonable place to begin. :)

Interesting. When uninstalling the app via FrontView, the /apps/plexmediaserver folder was completely removed. This is surprising given it's propendency to not remove it if files were left over in the past. That could be a big red flag for people to save their MediaLibrary folders first, in the future. :)

Installing fresh via dpkg gives:

# dpkg -i /data/media/Plex/plexmediaserver-ros6-binaries_0.9.9.0.308-7e8496a_amd64.deb.3

Selecting previously unselected package plexmediaserver-ros6-binaries.
(Reading database … 12931 files and directories currently installed.)
Unpacking plexmediaserver-ros6-binaries (from …/plexmediaserver-ros6-binaries_0.9.9.0.308-7e8496a_amd64.deb.3) …
Setting up plexmediaserver-ros6-binaries (0.9.9.0.308-7e8496a) …
Leaving ‘diversion of /apps/plexmediaserver/config.xml to /apps/plexmediaserver/config.xml.orig by plexmediaserver-ros6-binaries’
Leaving ‘diversion of /apps/plexmediaserver/plexmediaserver_environment to /apps/plexmediaserver/plexmediaserver_environment.orig by plexmediaserver-ros6-binaries’
Leaving ‘diversion of /apps/plexmediaserver/pre-start.sh to /apps/plexmediaserver/pre-start.sh.orig by plexmediaserver-ros6-binaries’
Leaving ‘diversion of /apps/plexmediaserver/start.sh to /apps/plexmediaserver/start.sh.orig by plexmediaserver-ros6-binaries’
Leaving ‘diversion of /apps/plexmediaserver/fvapp-plexmediaserver.service to /apps/plexmediaserver/fvapp-plexmediaserver.service.orig by plexmediaserver-ros6-binaries’
Leaving ‘diversion of /apps/plexmediaserver/logo.png to /apps/plexmediaserver/logo.png.orig by plexmediaserver-ros6-binaries’
ln -s ‘/lib/systemd/system/fvapp-plexmediaserver.service’ ‘/etc/systemd/system/multi-user.target.wants/fvapp-plexmediaserver.service’

Looks good. Service is there and the /apps/plexmediaserver folder contains:

drwxr-xr-x 1 admin admin   1600 Jan 25 15:41 Binaries
-rw-r--r-- 1 admin admin    706 Jan 24 05:32 config.xml
-rw-r--r-- 1 admin admin    307 Jan 24 05:32 fvapp-plexmediaserver.service
-rw-r--r-- 1 admin admin 209118 Jan 24 05:32 logo.png
-rw-r--r-- 1 admin admin    518 Jan 24 05:32 plexmediaserver_environment
-rw-r--r-- 1 admin admin      0 Jan 24 05:32 policy.properties
-rwxr-xr-x 1 admin admin    927 Jan 24 05:32 pre-start.sh
-rw-r--r-- 1 admin admin      0 Jan 24 05:32 provision.xml
lrwxrwxrwx 1 root  root      39 Jan 25 15:41 start.sh -> /apps/plexmediaserver/Binaries/start.sh

Doing an uninstall using dpkg --purge mostly worked. It did leave artifacts in /apps/plexmediaserver.... the MediaLibrary (which I suppose is OK, but could leave phantom usage if you really were uninstalling it completely) and start.sh (which seems weird). More worrisome is that it left the service definition in place. /etc/systemd/fvapp-plexmediaserver.service was removed, but the copy in /lib/systemd/system/ was not. When I did systemctl status it reported back as present but not running. oops.

Doing a completely clean install from FrontView resulted in same result as with upgrade and dpkg clean install. EXCELLENT!

Maybe a few tweaks for uninstall and that config.xml message on upgrade, but from my perspective this looks great!

So, I have an update.

I have been packaging upgrading/removing/installing/etc for quite some time now. So here is the result.

With the package linked to in OP, we now have a package that upgrade any install and yanks out the non binaries package. Now, if you remove the package from command line via dpkg -r and dpkg -P then the /apps/plexmediaserver directory stays there. The downside of this for the ReadyNAS OS is that the config.xml remains (even if it didn’t the following scenario is valid), but since we still have the config.xml PlexMediaServer will still remain visible in the UI even if its gone from the dpkg database. If one removes the config.xml the UI defaults to the config in /apps/.freepps/plexmediaserver/config.xml and shows the old 0.9.7.28 version. This seems to be a design choice by ReadyNAS. So this will allow you behind the scene of the UI to remove and rip out all plex binary packages and install them fresh without loosing your metadata library. This library is placed in /apps/plexmediaserver, and if you choose to remove plex from the UI it will be wiped.

So I believe things are in the best shape we can be considering how the ReadyNAS UI is working. Please bring on the errors or apply criticism with kindness :smiley:

- Mark

This is a MASSIVE improvement for PLEX packaging on ROS6.

If I had one thing to suggest, it would be that we might consider having this package create a user-accessible SHARE for the MediaLibrary (for ROS6, in /data/...) that would (a) consistently be retained between installations/upgrades and ( B) would easily be accessible for maintenance by end-users and to backup jobs, as desired. Sadly, stuff in /apps/... is well beyond the reach of many users, especially those unfamiliar or uncomfortable with ssh.

As I mentioned, I will wait for the next rev in the coming weeks/days to test, but I look forward to this HTP, thanks for being our OS6 advocate. It has been trial and error for about a year now, but this thread gives promise.

THX.

Great work. Will be much simpler to only have to install the one package in future.

i saw the new release, plexmediaserver-ros6-binaries_0.9.9.1.357-b2fadd5_amd64.deb, and tried to install it using the GUI.

I'm not entirely sure how I monitor it's success.  The NAS 516 UI interface still says 0.9.9.0.308 (which i installed from command line).  However, I havent waited the 20-30 min it takes for my dpkg install to run.

Any suggestions on monitoring progress or reporting errors?

here's what's in dkpg.log

2014-01-29 12:00:08 startup packages configure
2014-01-29 12:00:08 configure plexmediaserver-ros6-binaries:amd64 0.9.9.0.308-7e8496a 
2014-01-29 12:00:08 status half-configured plexmediaserver-ros6-binaries:amd64 0.9.9.0.308-7e8496a

Which i guess makes sense.  

var/log/readynasd/install_dpkg.log

Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  plexmediaserver-ros6* plexmediaserver-ros6-binaries*
0 upgraded, 0 newly installed, 2 to remove and 25 not upgraded.
After this operation, 165 MB disk space will be freed.
(Reading database ... 16956 files and directories currently installed.)
Removing plexmediaserver-ros6-binaries ...
START(/tmp/plexmediaserver-ros6-binaries_0.9.9.1.357-b2fadd5_amd64.deb): Wed Jan 29 12:00:07 PST 2014

that makes it look like it went ok..

but it's still running:

31883 ?        S<     0:01 dpkg --force-confnew -i /tmp/plexmediaserver-ros6-binaries_0.9.9.1.357-b2fadd5_amd64.d
31923 ?        S      0:00 [btrfs-endio-met]
31993 ?        Ss     0:00 /bin/sh -c /apps/plexmediaserver/Binaries/Plex\ Media\ Server
31994 ?        Sl     0:00 /apps/plexmediaserver/Binaries/Plex Media Server
32003 ?        SNl    0:03 Plex Plug-in [com.plexapp.system] /apps/plexmediaserver/MediaLibrary/Plex Media Server
32082 ?        Sl     0:00 Plex Plug-in [com.plexapp.agents.wikipedia] /apps/plexmediaserver/MediaLibrary/Plex Me
32084 ?        Sl     0:00 Plex Plug-in [com.plexapp.agents.themoviedb] /apps/plexmediaserver/MediaLibrary/Plex M
32175 ?        S<     0:00 /bin/sh /var/lib/dpkg/info/plexmediaserver-ros6-binaries.postinst configure 0.9.8.18.2
32177 ?        D<     0:03 chown -R admin:admin /apps/plexmediaserver

that chown -R seems to take forever on my 516..

 

-mark

i saw the new release, plexmediaserver-ros6-binaries_0.9.9.1.357-b2fadd5_amd64.deb, and tried to install it using the GUI.
 
I'm not entirely sure how I monitor it's success.  The NAS 516 UI interface still says 0.9.9.0.308 (which i installed from command line).  However, I havent waited the 20-30 min it takes for my dpkg install to run.
 
Any suggestions on monitoring progress or reporting errors?
 
here's what's in dkpg.log

2014-01-29 12:00:08 startup packages configure
2014-01-29 12:00:08 configure plexmediaserver-ros6-binaries:amd64 0.9.9.0.308-7e8496a 
2014-01-29 12:00:08 status half-configured plexmediaserver-ros6-binaries:amd64 0.9.9.0.308-7e8496a
Which i guess makes sense.  
 
var/log/readynasd/install_dpkg.log
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  plexmediaserver-ros6* plexmediaserver-ros6-binaries*
0 upgraded, 0 newly installed, 2 to remove and 25 not upgraded.
After this operation, 165 MB disk space will be freed.
(Reading database ... 16956 files and directories currently installed.)
Removing plexmediaserver-ros6-binaries ...
START(/tmp/plexmediaserver-ros6-binaries_0.9.9.1.357-b2fadd5_amd64.deb): Wed Jan 29 12:00:07 PST 2014
that makes it look like it went ok..
 
but it's still running:
31883 ?        S<     0:01 dpkg --force-confnew -i /tmp/plexmediaserver-ros6-binaries_0.9.9.1.357-b2fadd5_amd64.d
31923 ?        S      0:00 [btrfs-endio-met]
31993 ?        Ss     0:00 /bin/sh -c /apps/plexmediaserver/Binaries/Plex\ Media\ Server
31994 ?        Sl     0:00 /apps/plexmediaserver/Binaries/Plex Media Server
32003 ?        SNl    0:03 Plex Plug-in [com.plexapp.system] /apps/plexmediaserver/MediaLibrary/Plex Media Server
32082 ?        Sl     0:00 Plex Plug-in [com.plexapp.agents.wikipedia] /apps/plexmediaserver/MediaLibrary/Plex Me
32084 ?        Sl     0:00 Plex Plug-in [com.plexapp.agents.themoviedb] /apps/plexmediaserver/MediaLibrary/Plex M
32175 ?        S<     0:00 /bin/sh /var/lib/dpkg/info/plexmediaserver-ros6-binaries.postinst configure 0.9.8.18.2
32177 ?        D<     0:03 chown -R admin:admin /apps/plexmediaserver
that chown -R seems to take forever on my 516..
 

 
-mark


I can't say for how much metadata is in the /apps/plexmediaserver directory. Is it still running that command? In theory we only need to chown all files except the /apps/plexmediaserver/MediaLibrary because PMS actually runs as root. So it might make sense tracking down the history of why that command has always been in there.

I would love some more feedback if its stuck on install. I didn't experience any issues on the tests I did. But then the metadata library was not that huge on the devices I have been testing on. If its still hanging you could kill the chown with "kill -3" (might need to add package again if it dies, and you don't get the config installed. chown is the first thing the post script runs)

If issues are still at hand, please post back.

- Mark

I'm not surprised to hear the chmod is taking forever... my MediaLibrary has 292135 files and directories, and it takes AGES to complete. This causes me to seriously renew my desire for having MediaLibrary located *outside* the /apps/plexmedia folder. During package testing, I did so and manually symlinked it back to /apps/plexmedia from within /data/... My package install took like 45 seconds.

Further good news is that 0.9.9.1 applied via GUI without any issues. I saw no need to retest from dpkg in ssh. As much as I enjoy ssh, I much prefer packages that don't require me to tweak them that way.

THANK YOU! :D

I'm not surprised to hear the chmod is taking forever... my MediaLibrary has 292135 files and directories, and it takes AGES to complete. This causes me to seriously renew my desire for having MediaLibrary located *outside* the /apps/plexmedia folder. During package testing, I did so and manually symlinked it back to /apps/plexmedia from within /data/... My package install took like 45 seconds.
 
Further good news is that 0.9.9.1 applied via GUI without any issues. I saw no need to retest from dpkg in ssh. As much as I enjoy ssh, I much prefer packages that don't require me to tweak them that way.
 
THANK YOU! :D


I noticed that MediaLibrary on start is owned by root anyways. So if I were to improve one thing it might be the chown command. No need to go through a directory that is going to get data written by root.

Thanks for reporting successful install back.

- Mark

I noticed that MediaLibrary on start is owned by root anyways. So if I were to improve one thing it might be the chown command. No need to go through a directory that is going to get data written by root.

To be clear, though, there are other reasons not to want MediaLibrary in the app folder... like being able to do MediaLibrary migrations, or backups, without using ssh. ;) Imagine having the MediaLibrary someplace you could turn on "continuous protection" (snapshots) to have a safe way to revert your library in case of problems, bugs, etc. :) Can't do that from inside /apps.

To be clear, though, there are other reasons not to want MediaLibrary in the app folder... like being able to do MediaLibrary migrations, or backups, without using ssh. ;) Imagine having the MediaLibrary someplace you could turn on "continuous protection" (snapshots) to have a safe way to revert your library in case of problems, bugs, etc. :) Can't do that from inside /apps.


Totally agree. Just requires subtle intervention without causing to much havoc to existing libraries. Like not move it out if the user already symlinked it :D

- Mark

Totally agree. Just requires subtle intervention without causing to much havoc to existing libraries. Like not move it out if the user already symlinked it :D

Why, whatever could you mean? ;-) I understand... just piling up examples for why it would be a nice idea. I suppose you could be a warning in the release notes -- wait, do we get those? ;) -- but having it check it was a real folder before potentially relocating it would be a good idea. There is the whole matter of spawning a new share on install/upgrade as well. This is fairly common practice for ReadyNAS add-ons, though.

If you are planning to tackle this... i might suggest going ahead with share creation, if the share doesn't yet exists, but short-circuit the migration if MediaLibrary isn't a real directory. At least then, those of us who've jury rigged it can realign our instalation to conform after the fact. :D

Installed via GUI this morning, had to reboot to get it to work.  

Seems to have installed just fine.