Bug 194634 - [NEW PORT] multimedia/mediabrowser: Home media server built on top of other popular open source technologies.
Summary: [NEW PORT] multimedia/mediabrowser: Home media server built on top of other p...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: http://www.mediabrowser.tv/
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-27 16:01 UTC by Ben Woods
Modified: 2014-11-07 18:55 UTC (History)
1 user (show)

See Also:


Attachments
shar file for new multimedia/mediabrowser port (58.76 KB, text/plain)
2014-10-28 15:33 UTC, Ben Woods
no flags Details
Updated shar file for new multimedia/mediabrowser port (56.45 KB, text/plain)
2014-11-02 10:09 UTC, Ben Woods
no flags Details
Patch to add new mediabrowser user and mediabrowser group to ports tree (705 bytes, patch)
2014-11-02 13:29 UTC, Ben Woods
no flags Details | Diff
Output from portlint; make clean && make check-plist; make stage-qa (711.77 KB, text/plain)
2014-11-02 13:31 UTC, Ben Woods
no flags Details
Updated shar file for new multimedia/mediabrowser port (56.18 KB, text/plain)
2014-11-02 14:19 UTC, Ben Woods
no flags Details
Output from portlint; make clean && make check-plist; make stage-qa (711.60 KB, text/plain)
2014-11-02 14:20 UTC, Ben Woods
no flags Details
Updated shar file for new multimedia/mediabrowser port (56.18 KB, text/plain)
2014-11-02 15:12 UTC, Ben Woods
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Woods freebsd_committer freebsd_triage 2014-10-27 16:01:56 UTC
Please consider adding this new port for mediabrowser.tv. It is a home media server, similar to plexmediaserver, but fully open source and developed in mono.

A copy of my port can be found here:
https://redports.org/browser/woodsb02/multimedia/mediabrowser
Comment 1 Ben Woods freebsd_committer freebsd_triage 2014-10-27 16:08:07 UTC
I think we may need to add something to the Makefile to run the following command post install: mozroots --import --sync

As described by the MediaBrowser developers:
"This imports all trusted ssl root certificates from the system into the mono certificate store so mono can access ssl secured websites. You generally need to do this only once, but if you build a package for everyone to use you will probably want to include it as you don't know if users already executed that or not. Also in general the package systems do not differ between install or reinstall. Depending on how mono was installed in the system this might already have been done by the install procedure."
Comment 2 Ben Woods freebsd_committer freebsd_triage 2014-10-28 15:33:24 UTC
Created attachment 148737 [details]
shar file for new multimedia/mediabrowser port

User mediabrowser and Group mediabrowser also need to be added to UIDs and GIDs
Comment 3 John Marino freebsd_committer freebsd_triage 2014-11-01 13:21:45 UTC
you are misunderstanding the purpose of @dir in pkg-plist.  Most if not all of those lines should be removed.  Please review /usr/ports/CHANGES for more information about the point of this keyword (it is not a new name for @dirrm and @dirrmtry)

Also, if *at all* possible, please provide poudriere testport logs as attachments.

The process of testing your port may flush out other issues.  Don't forget to run ports-mgmt/portlint on the port either.
Comment 4 Ben Woods freebsd_committer freebsd_triage 2014-11-02 10:09:58 UTC
Created attachment 148923 [details]
Updated shar file for new multimedia/mediabrowser port

Thanks John. I have removed the @dir entries from pkg-plist (they were auto-created by makeplist and I assumed that behaviour was correct with the recent changes). My testing has shown they were not required as you said. I also ran portlint to iron-out a few minor wrinkles.

I do not have access to a poudriere environment at the moment, so I am not able to attach the logs sorry.

Reminder: User mediabrowser and Group mediabrowser will need to be added to UIDs and GIDs files
Comment 5 John Marino freebsd_committer freebsd_triage 2014-11-02 13:02:23 UTC
(In reply to Ben Woods from comment #4)
> Created attachment 148923 [details]
> Updated shar file for new multimedia/mediabrowser port
> 
> Thanks John. I have removed the @dir entries from pkg-plist (they were
> auto-created by makeplist and I assumed that behaviour was correct with the
> recent changes). My testing has shown they were not required as you said. I
> also ran portlint to iron-out a few minor wrinkles.
> 
> I do not have access to a poudriere environment at the moment, so I am not
> able to attach the logs sorry.
> 
> Reminder: User mediabrowser and Group mediabrowser will need to be added to
> UIDs and GIDs files

I've seen quite a few of these cases recently, and now it's clear that "make makeplist" is to blame.

It has never been designed to work "out of the box" which is why the first line is "don't trust this output and hand-edit".  I think people are just removing the first line and calling it a day.

In particular, make makeplist has been too conservative with @dirrmtry and now @dir and people are just accepting it.  That makes it clear what is really going on and this tool is essentially abused.

But well, now you know and hopefully will not get bitten by that again.

As for poudriere, the phrase "access to" is kind of curious since it's just something you install.  What normally prevents it's use is running freebsd on a modest VM rather than real hardware (the allocated resources are too low for modest VMs).  It's not a service or anything like that, so the word "access" is throwing me.  (to be clear, installing poudriere cost nothing and is very easy, but building jails and running it is heavy resource-wise)
Comment 6 John Marino freebsd_committer freebsd_triage 2014-11-02 13:10:39 UTC
the shar visually looks okay, but at a minimum you need to run this and report the output:

> portlint

> make clean && make check-plist

> make stage-qa

(New ports are at a big disadvantage if they don't provided poudriere logs.  They are proof that proper testing has been done on the port which eliminates basic problems before a review starts really looking at it)


Also, go ahead and create a separate attachment which is a diff to change UIDs and GIDs with the value you need.  That way the requirement will be hard to miss.
Comment 7 Ben Woods freebsd_committer freebsd_triage 2014-11-02 13:29:29 UTC
Created attachment 148926 [details]
Patch to add new mediabrowser user and mediabrowser group to ports tree
Comment 8 Ben Woods freebsd_committer freebsd_triage 2014-11-02 13:31:42 UTC
Created attachment 148927 [details]
Output from portlint; make clean && make check-plist; make stage-qa

I have attached the output of the tests you asked for.

I only have a FreeNAS box (no FreeBSD installation), so I cannot run poudriere (it doesn't work in a jail yet on FreeNAS). However, you gave me the idea of running it in a virtual machine - I will give that a try now and attach that output if I succeed.
Comment 9 John Marino freebsd_committer freebsd_triage 2014-11-02 13:45:29 UTC
based on this output, I'd say poudriere log is "nice to have" (vs. mandatory) at this point.  The stage-qa check comes up clean.

portlint whines about this:
# portlint -A
WARN: /usr/ports/multimedia/mediabrowser/pkg-plist: [743]: installing shared libraries, please define USE_LDCONFIG as appropriate
WARN: /usr/ports/multimedia/mediabrowser/pkg-plist: [744]: installing shared libraries, please define USE_LDCONFIG as appropriate


The port might benefit from USE_LDCONFIG actually.  Have you already thought about this?
Comment 10 Ben Woods freebsd_committer freebsd_triage 2014-11-02 13:49:14 UTC
Yes I have thought about it, and it is not necessary.
The shared libraries portlint is referring to are the precompiled Linux binaries of libwebp.so and libsqlite3.so.0.8.6, which are not used by this port (the mediabrowser developers include them for Linux distributions in case they were not able to be found in the shared libraries, however this FreeBSD port uses the webp and sqlite3 installed from ports which are available in the shared libraries section).
Comment 11 John Marino freebsd_committer freebsd_triage 2014-11-02 13:58:20 UTC
okay, then perhaps a stupid question:

Why install libraries that we are sure will not / cannot be used?  Should they be removed in the post-install target to avoid a bigger-than-necessary binary package?

Maybe it's a micro-optimization but I should at least ask the question.
Comment 12 Ben Woods freebsd_committer freebsd_triage 2014-11-02 14:19:34 UTC
Created attachment 148931 [details]
Updated shar file for new multimedia/mediabrowser port

Removed unused Linux and Mac OSX libraries
Comment 13 Ben Woods freebsd_committer freebsd_triage 2014-11-02 14:20:35 UTC
Created attachment 148932 [details]
Output from portlint; make clean && make check-plist; make stage-qa

Updated the port sanity checks after removing unused Linux and Mac OSX libraries
Comment 14 John Marino freebsd_committer freebsd_triage 2014-11-02 14:23:29 UTC
okay, thanks!

I'm promoting the PR now, to the "patch-ready" pool where it can be committed.
Comment 15 Ben Woods freebsd_committer freebsd_triage 2014-11-02 15:12:39 UTC
Created attachment 148934 [details]
Updated shar file for new multimedia/mediabrowser port

Ensure unused Linux and Mac OSX libraries are verbosely deleted, to ensure build output shows all files which were removed.
Comment 16 commit-hook freebsd_committer freebsd_triage 2014-11-07 18:54:14 UTC
A commit references this bug:

Author: adamw
Date: Fri Nov  7 18:53:48 UTC 2014
New revision: 372291
URL: https://svnweb.freebsd.org/changeset/ports/372291

Log:
  Add multimedia/mediabrowser.

  Media Browser Server is a home media server built on top of other popular
  open source technologies such as Service Stack, jQuery, jQuery mobile,
  and Mono.

  It features a REST-based api with built-in documention to facilitate
  client development. We also have client libraries for our api to enable
  rapid development.

  WWW: http://mediabrowser.tv/

  PR:		194634
  Submitted by:	Ben Woods

Changes:
  head/GIDs
  head/UIDs
  head/multimedia/mediabrowser/
  head/multimedia/mediabrowser/Makefile
  head/multimedia/mediabrowser/distinfo
  head/multimedia/mediabrowser/files/
  head/multimedia/mediabrowser/files/mediabrowser.in
  head/multimedia/mediabrowser/pkg-descr
  head/multimedia/mediabrowser/pkg-install
  head/multimedia/mediabrowser/pkg-message
  head/multimedia/mediabrowser/pkg-plist
Comment 17 Adam Weinberger freebsd_committer freebsd_triage 2014-11-07 18:55:17 UTC
Good work, as usual, Ben.

I do get this error in poudriere:

====>> Checking for filesystem violations... done
====>> Error: Filesystem touched during build:
extra: root/.config

I don't know if that's a mono thing, but can you let me know if it's fixable?