Bug 1816 (minidlna)

Summary: Review request: minidlna - Lightweight DLNA/UPnP-AV server targeted at embedded systems
Product: Package Reviews Reporter: Andrea Musuruane <musuruan>
Component: Review RequestAssignee: Ismael Olea <ismael>
Status: RESOLVED FIXED    
Severity: normal CC: hobbes1069, ismael, rpmfusion-package-review, zdzichu
Priority: P5    
Version: Current   
Hardware: All   
OS: GNU/Linux   
namespace:
Bug Depends on:    
Bug Blocks: 4    

Description Andrea Musuruane 2011-06-21 19:03:37 CEST
http://www.lesloueizeh.com/musuruan/minidlna.spec
http://www.lesloueizeh.com/musuruan/minidlna-1.0.20-1.fc15.src.rpm

* Description:
MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully 
compliant with DLNA/UPnP-AV clients.

The minidlna daemon serves media files (music, pictures, and video) to 
clients on your network.  Example clients include applications such as 
Totem and XBMC, and devices such as portable media players, smartphones, 
and televisions.

* Why this package is not eligible to be included in Fedora:
It requires ffmpeg.

* Rpmlint:
$ rpmlint /home/andrea/rpmbuild/SRPMS/minidlna-1.0.20-1.fc15.src.rpm
minidlna.src: W: spelling-error %description -l en_US smartphones -> smart phones, smart-phones, earphones
minidlna.src: W: invalid-url Source2: minidlna-1.0.18-debian-manpages.tar.gz
1 packages and 0 specfiles checked; 0 errors, 2 warnings.
$ rpmlint /home/andrea/rpmbuild/RPMS/x86_64/minidlna-1.0.20-1.fc15.x86_64.rpm
minidlna.x86_64: W: spelling-error %description -l en_US smartphones -> smart phones, smart-phones, earphones
minidlna.x86_64: W: non-standard-uid /etc/minidlna.conf minidlna
minidlna.x86_64: W: non-standard-gid /etc/minidlna.conf minidlna
minidlna.x86_64: E: incorrect-fsf-address /usr/share/doc/minidlna-1.0.20/LICENCE
1 packages and 0 specfiles checked; 1 errors, 3 warnings.
$ rpmlint /home/andrea/rpmbuild/RPMS/x86_64/minidlna-debuginfo-1.0.20-1.fc15.x86_64.rpm
minidlna-debuginfo.x86_64: E: incorrect-fsf-address /usr/src/debug/minidlna-1.0.20/log.h
minidlna-debuginfo.x86_64: E: incorrect-fsf-address /usr/src/debug/minidlna-1.0.20/log.c
1 packages and 0 specfiles checked; 2 errors, 0 warnings.

I ignored spelling errors.

The incorrect FSF address has been reported upstream and already fixed in CVS:
http://sourceforge.net/tracker/?func=detail&atid=1121516&aid=3321927&group_id=243163

Non standard UID/GID are necessary for starting the daemon from a non root user.

* Notes:
This is my first package that has a systemd unit file. I will submit this file upstream after this review request will be approved.
Comment 1 Tomasz Torcz 2011-08-01 11:08:52 CEST
mindlna.service looks fine.
Comment 2 Andrea Musuruane 2011-08-03 14:25:21 CEST
http://www.lesloueizeh.com/musuruan/minidlna.spec
http://www.lesloueizeh.com/musuruan/minidlna-1.0.21-1.fc15.src.rpm

Changelog:
- Updated to upstream 1.0.21

Please note that systemd unit file (the same I made for v1.0.20) broke in this release and I cannot understand why. When I try to invoke the service it is not started. It is fine if I recall minidlna from cmd line though.

Comment 3 Richard 2011-12-27 20:40:44 CET
(In reply to comment #2)
> Please note that systemd unit file (the same I made for v1.0.20) broke in this
> release and I cannot understand why. When I try to invoke the service it is not
> started. It is fine if I recall minidlna from cmd line though.

It might be something you mucked up on your side during development of the package. It worked fine for me without modification (from a running system, not on boot).

# systemctl status minidlna.service
minidlna.service - MiniDLNA is a DLNA/UPnP-AV server software
          Loaded: loaded (/lib/systemd/system/minidlna.service)
          Active: active (running) since Tue, 27 Dec 2011 13:39:29 -0600; 7s ago
         Process: 21626 ExecStart=/usr/sbin/minidlna -f /etc/minidlna.conf (code=exited, status=0/SUCCESS)
        Main PID: 21627 (minidlna)
          CGroup: name=systemd:/system/minidlna.service
                  รข 21627 /usr/sbin/minidlna -f /etc/minidlna.conf

Richard
Comment 4 Ismael Olea 2012-01-04 13:09:36 CET
I'll review it.
Comment 5 Ismael Olea 2012-01-15 14:23:44 CET
Here is my review.

First, please notice there is a new 1.0.22 release at upstream.

Do you plan to maintain it for EL5? If not please remove
  %defattr 
  BuildRoot:
  %clean  

About funcionality, I couldn't test if it really works but I would suggest to consider to preset presentation_url to a working parameter. This is completely at your discretion.

The rest of the package seems to be in very good state, including systemd scriptlets: I'm not really familiarized with systemd but seems you are following all Fedora recomendations.
Comment 6 Ismael Olea 2012-01-15 14:47:54 CET
btw, when (re)starting the service I always got this error:

Jan 15 14:46:07 patxuko systemd[1]: Failed to read PID file /var/run/minidlna.pid after start. The service might be broken.

I didn't diagnose why it's really happening.
Comment 7 Andrea Musuruane 2012-01-15 19:41:11 CET
(In reply to comment #5)
> First, please notice there is a new 1.0.22 release at upstream.

Thank you, I missed it!

> Do you plan to maintain it for EL5? If not please remove
>   %defattr 
>   BuildRoot:
>   %clean  

I won't maintain for EL5. I removed them.
 
> About funcionality, I couldn't test if it really works but I would suggest to
> consider to preset presentation_url to a working parameter. This is completely
> at your discretion.

The problem is that there is no suitable default presentation_url because the media files are usually under a user's home dir. Therefore this parameter must be edited manually. Other suggestions are appreciated :-)

You can test minidlna using a DLNA DMP such as XMBC. Upnp-inspector is also available for Fedora to analyze the DLNA stack components.

> The rest of the package seems to be in very good state, including systemd
> scriptlets: I'm not really familiarized with systemd but seems you are
> following all Fedora recomendations.

I still have problems with systemd but I still have to investigate them better. I just noticed that if I comment the User and the Group lines in minidlna.service it always work. 

Anyway here it is an updated package.

http://www.lesloueizeh.com/musuruan/minidlna.spec
http://www.lesloueizeh.com/musuruan/minidlna-1.0.22-1.fc16.src.rpm

Changelog:
- Updated to upstream 1.0.22
- Removed default Fedora RPM features (defattr, BuildRoot, clean section)
- Better consistent macro usage
Comment 8 Ismael Olea 2012-01-17 10:29:32 CET
(In reply to comment #7)

> The problem is that there is no suitable default presentation_url because the
> media files are usually under a user's home dir. Therefore this parameter must
> be edited manually. Other suggestions are appreciated :-)
> 
> You can test minidlna using a DLNA DMP such as XMBC. Upnp-inspector is also
> available for Fedora to analyze the DLNA stack components.

Well, I'm very new to upnp/dlna and still not sure how it works (or if my LAN is mangling upnp announces)

Looking through upnp-inspector I found the default URI is the same as I am specting, so now I think my comment is obvious.


> I still have problems with systemd but I still have to investigate them better.
> I just noticed that if I comment the User and the Group lines in
> minidlna.service it always work. 

Maybe you should ask advice to the systemd gurus.
 
> Anyway here it is an updated package.

final checklist:

+: OK
-: must be fixed
=: should be fixed (at your discretion)
?: Question or clairification needed
N: not applicable

MUST:
[=] rpmlint output: shown in comment: none
[+] follows package naming guidelines
[+] spec file base name matches package name
[+] package meets the packaging guidelines
[+] package uses a Fedora approved license: GPLv2
[+] license field matches the actual license: spec credits GPLv2
[+] license file is included in %doc: COPYING
[+] spec file is in American English
[+] spec file is legible
[+] sources match upstream: md5sum matches
[+] package builds on at least one primary arch: Tested F16 x86
[N] appropriate use of ExcludeArch
[+] all build requirements in BuildRequires
[+] spec file handles locales properly
[N] ldconfig in %post and %postun
[+] no bundled copies of system libraries
[+] no relocatable packages
[+] package owns all directories that it creates
[+] no files listed twice in %files
[+] proper permissions on files 
[+] consistent use of macros
[+] code or permissible content
[N] large documentation in -doc
[+] no runtime dependencies in %doc
[N] header files in -devel
[N] static libraries in -static
[N] .so in -devel
[N] -devel requires main package
[+] package contains no libtool archives
[N] package contains a desktop file, uses desktop-file-install/validate
[+] package does not own files/dirs owned by other packages
[+] all filenames in UTF-8

SHOULD:
[N] query upstream for license text
[=] description and summary contains available translations
[+] package builds in mock
[?] package builds on all supported arches: Tested x86_64
[?] package functions as described: service is up and running, didn't test funcionality
[+] sane scriptlets
[N] subpackages require the main package
[N] placement of pkgconfig files
[+] file dependencies versus package dependencies
[+] package contains man pages for binaries/scripts

*** APPROVED ***
Comment 9 Andrea Musuruane 2012-01-19 14:17:13 CET
Thanks for you review!

Package CVS request
======================
Package Name: minidlna 
Short Description: Lightweight DLNA/UPnP-AV server targeted at embedded systems
Owners: musuruan
Branches: F-16
InitialCC:
----------------------
License tag: free
Comment 10 Andrea Musuruane 2012-01-22 15:12:45 CET
Built. Closing.