Created attachment 155095 [details] Patch to move multimedia/mediabrowser to multimedia/emby and update to 3.0.5569.0 Move the multimedia/mediabrowser port to multimedia/emby-server to reflect the change of the upstream project name. http://emby.media/community/index.php?/blog/1/entry-179-introducing-emby/ Also update to version 3.0.5569.0 which includes these new features: - Add cloud & folder sync features - Migrate from GDI to ImageMagick
Created attachment 155097 [details] Patch to move multimedia/mediabrowser to multimedia/emby and update to 3.0.5569.0 Correct pkg-message and files/emby-server.in to ensure it is clear that /etc/rc.conf should contain emby_server_enable="YES" and the service should be started with "service emby-server start" (note the hyphen rather than an underscore).
Created attachment 155142 [details] Patch to move multimedia/mediabrowser to multimedia/emby and update to 3.0.5569.0 Remove unnecessary post-patch step (fix incorporated upstream)
Ben I'm not sure that reusing 989 is the best idea. I see the "pw groupmod" line that you've added, but is there any benefit to just creating a new emby group/user? Or is your patch more likely to be transparent to end-users?
I think the user rename makes things easier for users. this way they can delete the old package, install the new package, and their data-directory is still writable and will be used.
We made UID/GID 989 as a dedicated user/group for this program. Therefore I think it makes sense for the UID/GID 989 to continue to be used for this program, even if it has changed names. Also, I think the database at /var/db/mediabrowser owned by UID/GID 989 which has been created by users for this program should not be left behind simply because of a project name change. That historical data should come along with the new project name, and the easiest way to do that for users is to automatically rename the directory to /var/db/emby-server and automatically change the user/group name for 989 to emby. If the UID/GID 989 was used for some other purpose other than running this program and owning the database, I would agree we should use another UID/GID. But the scripts I have included with the patch ensure that UID 989 exists and has the username mediabrowser, confirming that UID 989 does not exist for some other purpose.
(Cc'ing bapt@ for advice) Hi Bapt, I haven't addressed this problem before, and I was wondering if you could review the plan here? This PR is to rename mediabrowser to emby. Part of the move will require migrating ${USERS} and ${GROUPS}, and renaming directories in /var/db. What Ben (maintainer) is proposing is: - Rename group 989/user 989 from mediabrowser -> emby - @exec line in pkg-plist - Rename /var/db/mediabrowser -> /var/db/emby - In rc(8) script It seems like a good proposal to me, because it avoids having to manually chown files in /var/db/. Is there collateral damage that I'm not anticipating? Are there periodic daily/security scripts that are going to complain? The /var/db files/dirs do not appear in the plist.
Hi Ben, There is now a newer version of this. Also, I recommend you don't move the /var/db/mediabrowser directory in the rc.d script. * this doesn't work in practice. emby-server will not start because some directories are still expected in the old location. I suspect a config file or sqlite database somewhere in the data-directory also needs to be updated * This adds additional complexity while not successfully achieving the intended purpose. what users could do if they want to migrate from mediabrowser to emby is either.. * set emby_server_data_dir=/var/db/mediabrowser * move the directory as you do, but also edit the locations that still point to the mediabrowser location. (I don't know where these are exactly though)
Created attachment 155230 [details] Patch to move multimedia/mediabrowser to multimedia/emby-server and update to 3.0.5572.0 Changed patch to update to latest upstream release 3.0.5572.0 Stable. Other changes (since previous PR199093 attachment): - do not move an existing database (it is not supported as the full path is used in some database entries). If a database exists at the old location /var/db/mediabrowser, use it. Otherwise, a new database will be created upon start at a new location /var/db/emby-server. - do not rename an existing user/group. If a user/group exists with name mediabrowser, use it by default. Otherwise, a new user/group will be created with name emby. - add a note to pkg-message explaining the above to the user.
Really good job on this, Ben. Sorry about the long delay before committing. The only thing you forgot to do was update multimedia/Makefile but I took care of that :-)
A commit references this bug: Author: adamw Date: Wed Apr 8 15:56:56 UTC 2015 New revision: 383577 URL: https://svnweb.freebsd.org/changeset/ports/383577 Log: Rename multimedia/mediabrowser to multimedia/emby-server, and update to 3.0.5572.0. The user and group names have change, but the uid/gid remain the same. The port will continue to use the old database and user/group names if they exist, but will default to the new names for new installs. Instructions are in pkg-message for how to manually migrate things yourself. PR: 199093 Submitted by: maintainer (Ben Woods) Changes: head/GIDs head/MOVED head/UIDs head/multimedia/Makefile head/multimedia/emby-server/ head/multimedia/emby-server/Makefile head/multimedia/emby-server/distinfo head/multimedia/emby-server/files/emby-server.in head/multimedia/emby-server/files/mediabrowser.in head/multimedia/emby-server/pkg-deinstall head/multimedia/emby-server/pkg-descr head/multimedia/emby-server/pkg-message head/multimedia/emby-server/pkg-plist head/multimedia/mediabrowser/
Doh - multimedia/Makefile... Thanks for that!