Bug 1264715 - Review Request: flacon - Audio File Encoder
Review Request: flacon - Audio File Encoder
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jiri Eischmann
Fedora Extras Quality Assurance
:
Depends On: 1264713
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-20 20:59 EDT by Ilya Gradina
Modified: 2016-08-23 01:43 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-14 11:48:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
eischmann: fedora‑review+


Attachments (Terms of Use)
appstream metadata file (1.10 KB, application/xml)
2016-05-04 08:44 EDT, Jiri Eischmann
no flags Details

  None (edit)
Description Ilya Gradina 2015-09-20 20:59:41 EDT
Spec URL: https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon.spec
SRPM URL: https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon-1.2.0-1.fc24.src.rpm
Description: Flacon extracts individual tracks from one big audio file containing
the entire album of music and saves them as separate audio files.
Fedora Account System Username: ilgrad
Comment 1 Jiri Eischmann 2016-04-26 15:51:52 EDT
Are you still interested in getting this package to Fedora? I'd like to see Flacon in the official repositories, so I can do a review for you.
Comment 2 Ilya Gradina 2016-04-27 05:34:10 EDT
Hi Jiri,
thx!

new Spec URL: https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon.spec
new SRPM URL: https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon-2.0.1-1.fc24.src.rpm

but the tests do not pass:
********** 
http://paste.fedoraproject.org/360125/61749018/
**********
If I am building the package manually, and run tests/flacon_test the output:
****** 
http://paste.fedoraproject.org/360122/61748623/
******
Comment 3 Jiri Eischmann 2016-04-27 11:17:27 EDT
Unfortunately, I have not been able to run fedora-review on it in F24 for some reason. So for the start:

1)
current: BuildRequires: %{_bindir}/desktop-file-validate
correct: BuildRequires: desktop-file-utils

2)
current: BuildRequires: gcc-c++ cmake
correct: BuildRequires: cmake
gcc-c++ doesn't have to be specifically required

3)
mkdir build should go to the %build section

4)
I consulted the %build and %install sections with Jan Grulich who maintains quite a few Qt apps in Fedora, it should be like this according to him:

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} \
    -DBUILD_TESTS=Yes \
    -DUSE_QT5=Yes \
    ..
popd
 
make %{?_smp_mflags} -C %{_target_platform}
 
 
%install
make install DESTDIR=%{buildroot} -C %{_target_platform}
 
%find_lang %{name} --with-qt

5)
There is no need to specify a full path, so it should rather be:

%post
update-desktop-database &> /dev/null ||
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 
%postun
update-desktop-database &> /dev/null ||
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
fi
 
 
%posttrans
gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :

6)
Desktop file validation should be in the %check section

7)
It's a desktop app, so it needs to have an AppData metadata file to appear in the app catalog. There also needs to be a validation check: https://fedoraproject.org/wiki/Packaging:AppData
I can help you create the metadata file.

8)
Commands don't have to be indented, it's rather rare to see in spec files, but it's just formality.

9)
It fails the upstream tests because the test is specifically looking for ffmpeg which is not available in Fedora for legal reasons. But I tried and Falcon doesn't depend on it, it's still useful and can do the job with free music formats, so I would just ignore the tests.
Comment 5 Jiri Eischmann 2016-05-04 07:42:07 EDT
I was finally able to run fedora-review on the package:

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "LGPL (v2.1 or later)", "Unknown or generated". 10 files have
     unknown license. Detailed output of licensecheck in
     /home/eischmann/1264715-flacon/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package must own all directories that it creates.
     Note: Directories without known owners:
     /usr/share/icons/hicolor/32x32/apps,
     /usr/share/icons/hicolor/16x16/apps, /usr/share/icons/hicolor/16x16,
     /usr/share/icons/hicolor/48x48, /usr/share/icons/hicolor/48x48/apps,
     /usr/share/icons/hicolor/32x32, /usr/share/icons/hicolor
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[!]: Requires correct, justified where necessary.
Missing libfishsound
[x]: Spec file is legible and written in American English.
[x]: Package contains systemd file(s) if in need.
[x]: update-desktop-database is invoked in %post and %postun if package
     contains desktop file(s) with a MimeType: entry.
     Note: desktop file(s) with MimeType entry in flacon
[x]: gtk-update-icon-cache is invoked in %postun and %posttrans if package
     contains icons.
     Note: icons in flacon
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Package contains desktop file if it is a GUI application.
[x]: Package installs a %{name}.desktop using desktop-file-install or
     desktop-file-validate if there is such a file.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in flacon-
     debuginfo
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[?]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[!]: %check is present and all tests pass.
The upstream test is IMHO not necessary since it tests non-mandatory features which depend on components that are not in Fedora.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: flacon-2.0.1-2.fc23.x86_64.rpm
          flacon-debuginfo-2.0.1-2.fc23.x86_64.rpm
          flacon-2.0.1-2.fc23.src.rpm
flacon.x86_64: E: explicit-lib-dependency libfishsound
3 packages and 0 specfiles checked; 1 errors, 0 warnings.




Rpmlint (debuginfo)
-------------------
Checking: flacon-debuginfo-2.0.1-2.fc23.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
sh: /usr/bin/python: Adresář nebo soubor neexistuje
flacon.x86_64: E: explicit-lib-dependency libfishsound
2 packages and 0 specfiles checked; 1 errors, 0 warnings.



Requires
--------
flacon-debuginfo (rpmlib, GLIBC filtered):

flacon (rpmlib, GLIBC filtered):
    /bin/sh
    flac
    libQt5Core.so.5()(64bit)
    libQt5Core.so.5(Qt_5)(64bit)
    libQt5Core.so.5(Qt_5.6)(64bit)
    libQt5Gui.so.5()(64bit)
    libQt5Gui.so.5(Qt_5)(64bit)
    libQt5Network.so.5()(64bit)
    libQt5Network.so.5(Qt_5)(64bit)
    libQt5Widgets.so.5()(64bit)
    libQt5Widgets.so.5(Qt_5)(64bit)
    libc.so.6()(64bit)
    libfishsound
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libm.so.6()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libuchardet.so.0()(64bit)
    opus-tools
    rtld(GNU_HASH)
    shntool
    vorbis-tools
    vorbisgain
    wavpack



Provides
--------
flacon-debuginfo:
    flacon-debuginfo
    flacon-debuginfo(x86-64)

flacon:
    application()
    application(flacon.desktop)
    flacon
    flacon(x86-64)
    mimehandler(application/x-cue)



Source checksums
----------------
https://github.com/flacon/flacon/archive/v2.0.1.tar.gz :
  CHECKSUM(SHA256) this package     : 3408304e7ab524a2e8a621ea780579e1be7b3359fefe7d37a1b88f34d6120e02
  CHECKSUM(SHA256) upstream package : 3408304e7ab524a2e8a621ea780579e1be7b3359fefe7d37a1b88f34d6120e02


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -b 1264715
Buildroot used: fedora-23-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6
Comment 6 Jiri Eischmann 2016-05-04 08:44:03 EDT
I think you don't need to own the directories reported by fedora-review. So only unsolved problems is the reported missing dependency (libfishsound) and missing appdata file. I've created one for you (see the attachment). Since it's not shipped by upstream (you should definitely propose it there) the best way is to include in the spec file. See e.g. the spec file of Inkscape package how to do it. See the linked guidelines above to learn how to install and verify an appdata file.
Also the license should probably be LGPL-2.1. That's also what the upstream RPM spec file says.
Comment 7 Jiri Eischmann 2016-05-04 08:44 EDT
Created attachment 1153833 [details]
appstream metadata file
Comment 8 Ilya Gradina 2016-05-08 19:32:00 EDT
Hi Jiri,
thx for xml file.
What about license, I think should be LGPLv2+ based in this:
*****************
https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing#Good_Licenses
*****************
xml file: 
https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon.appdata.xml
*****************
new SPEC file:
https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon.spec
*****************
new SRPM file:
https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon-2.0.1-3.fc24.src.rpm
*****************
Comment 9 Jiri Eischmann 2016-05-09 18:29:44 EDT
I think the license is fine. I still get an error with missing dependency (libfishsound), I suppose it needs to be a build-time dependency. I also get an error with the validation of the appdata.xml file. The ratio of screenshots should be 16x9. But it seems to pass the validation test in %check, so it's probably just a detail. Just try putting libfishsound to BuildRequires and if fedora-review doesn't complain I'll sign off the package.
Comment 10 Jiri Eischmann 2016-05-10 10:26:44 EDT
So I tried to add libfishsoup to BuildRequires and RMPlint stopped complaining, looks like optional build-time dependency. If it gets pulled in (I couldn't find any clue in cmake scripts) it's statically linked. That should be properly marked: https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries
I don't know what functionality libfishsoup gives to Flacon, best to ask the upstream devels. But Russian Fedora is building Flacon without it, so I think the best approach for now is to leave it out.
Comment 11 Ilya Gradina 2016-05-10 15:52:42 EDT
Hi Jiri, thx!

libfishsound for opusenc. (https://www.xiph.org/fishsound/ ). 
I removed libfishsound from requires, and had changed appdata xml file.
xml file: 
https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon.appdata.xml
*****************
new SPEC file:
https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon.spec
*****************
new SRPM file:
https://github.com/ilgrad/fedora-packages/raw/master/flacon/flacon-2.0.1-4.fc24.src.rpm
*****************
Comment 12 Jiri Eischmann 2016-05-11 03:40:26 EDT
I'm OK with the package now.
Comment 13 Ilya Gradina 2016-05-11 07:34:57 EDT
(In reply to Jiri Eischmann from comment #12)
> I'm OK with the package now.

I can now add request new package on "https://admin.fedoraproject.org/pkgdb/" ?
Comment 14 Jiri Eischmann 2016-05-11 07:37:55 EDT
I marked the fedora review as done, you should be in the group of packagers AFAIK, so I think you can go ahead and request a new package.
Comment 15 Ilya Gradina 2016-05-11 07:43:01 EDT
(In reply to Jiri Eischmann from comment #14)
> I marked the fedora review as done, you should be in the group of packagers
> AFAIK, so I think you can go ahead and request a new package.

ok, thx! I made request a new package.
Comment 16 Gwyn Ciesla 2016-05-11 09:40:24 EDT
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/flacon

Note You need to log in before you can comment on or make changes to this bug.