Spec URL: https://raw.githubusercontent.com/sandrobonazzola/laby/f951299f34049b2eb34e179bc10bbc07e61c7131/packaging/laby.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/sbonazzo/Laby/fedora-25-x86_64/00551645-laby/laby-0.6.4-1.fc25.src.rpm Description: Laby is a small program to learn how to program with ants and spider webs. You have to move an ant out of a labyrinth, avoid spider webs, move rocks, etc. Fedora Account System Username: sbonazzo
Updated spec file for Fedora >= 26 support https://github.com/sgimenez/laby/pull/44/files Spec URL: https://raw.githubusercontent.com/sandrobonazzola/laby/57d06a9fd6ebb0bbb947627f0123bfa95b8a93ab/packaging/laby.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/sbonazzo/Laby/fedora-rawhide-x86_64/00552574-laby/laby-0.6.4-2.fc27.src.rpm
FWIW I'm testing this with OCaml 4.04.1 in Rawhide.
You shouldn't use any of the following: %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) - This has been replaced by either %ocaml_native_compiler or %ocaml_natdynlink. Please see /usr/lib/rpm/macros.d/macros.ocaml-srpm %global debug_package %{nil} - Debuginfo should work these days. You may need to modify the build so it passes -g option to ocamlopt. %global _use_internal_dependency_generator 0 %global __find_requires /usr/lib/rpm/ocaml-find-requires.sh %global __find_provides /usr/lib/rpm/ocaml-find-provides.sh - This is plain wrong nowadays. The RPM dependency generator just does the right thing. And yes I'm aware that the OCaml packaging guidelines aren't up to date on some of these issues. Also that OCaml packages don't consistently do this -- I've been fixing those over time.
Fedora-review finds the following issues: - Header files in -devel subpackage, if present. Note: laby : /usr/share/laby/mods/c/lib/robot.h laby : /usr/share/laby/mods/cpp/lib/robot.h See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages - Package contains BR: python2-devel or python3-devel - gtk-update-icon-cache is invoked in %postun and %posttrans if package contains icons. Note: icons in laby See: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
The build system is pretty crazy. I couldn't work out if it was installing the bytecode or native code version of the binary. I *think* it's the native code version, which would be correct. You might consider using ‘make native’ so it only builds the native code version, since building the bytecode version is a waste of time on all architectures that recent Fedora supports.
Thanks for the review, I'll try to address all your comments. (In reply to Richard W.M. Jones from comment #4) > Fedora-review finds the following issues: > > - Header files in -devel subpackage, if present. > Note: laby : /usr/share/laby/mods/c/lib/robot.h laby : > /usr/share/laby/mods/cpp/lib/robot.h > See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages This one is intentional. The game teach you also how to program in C and in order to move the ant, you'll need the robot.h header file. It isn't the use case addressed by -devel subpackages. Should I add a comment in the spec file about this? > - Package contains BR: python2-devel or python3-devel What's BR?
(In reply to Sandro Bonazzola from comment #6) > Thanks for the review, I'll try to address all your comments. > > (In reply to Richard W.M. Jones from comment #4) > > Fedora-review finds the following issues: > > > > - Header files in -devel subpackage, if present. > > Note: laby : /usr/share/laby/mods/c/lib/robot.h laby : > > /usr/share/laby/mods/cpp/lib/robot.h > > See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages > > This one is intentional. The game teach you also how to program in C and in > order to move the ant, you'll need the robot.h header file. It isn't the use > case addressed by -devel subpackages. Should I add a comment in the spec > file about this? Sure, a note in the spec file is fine. > > - Package contains BR: python2-devel or python3-devel > > What's BR? BR == BuildRequires. TBH I'm not exactly sure what fedora-review is complaining about here. AFAIK it's not wrong to BR these packages, but maybe you can check the Python packaging guidelines just to be sure.
Updated addressing your comments to my best. I may need help about the debug symbols, looks like the generated debug rpm is missing sources. Spec URL: https://raw.githubusercontent.com/sandrobonazzola/laby/33014dae825b35f10e65752821ef42a3518f27f8/packaging/laby.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/sbonazzo/Laby/fedora-rawhide-x86_64/00554044-laby/laby-0.6.4-3.fc27.src.rpm
(In reply to Sandro Bonazzola from comment #8) > Updated addressing your comments to my best. I may need help about the debug > symbols, looks like the generated debug rpm is missing sources. It has actually included the sources in the debuginfo file, and also ‘-g’ is being passed to each invocation of ‘ocamlopt’, so everything seems fine to me.
A few problems still. See my comments inline below. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed Issues: ======= - Header files in -devel subpackage, if present. Note: laby : /usr/share/laby/mods/c/lib/robot.h laby : /usr/share/laby/mods/cpp/lib/robot.h See: http://fedoraproject.org/wiki/Packaging/Guidelines#DevelPackages This is explained in the spec file and is not a problem. - Package contains BR: python2-devel or python3-devel I think this is bogus and can be ignored. ===== MUST items ===== C/C++: [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [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: "GPL", "LGPL (v2 or later)", "GPL (v3 or later)", "Unknown or generated". 97 files have unknown license. Detailed output of licensecheck in /home/rjones/1450679-laby/licensecheck.txt I checked the licenses and is does appear that the author intends GPLv3+. I guess you could ask upstream to use proper per-file GPL headers instead of ones they appear to have made up, but it's not urgent. There does not appear to be any problematic content. [x]: License file installed when any subpackage combination is installed. Yes, in /usr/share/licenses/laby/gpl-3.0.txt [x]: Package does not own files or directories owned by other packages. [-]: %build honors applicable compiler flags or justifies otherwise. OCaml package, so not applicable. [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [!]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. Note: rm -rf %{buildroot} present but not required Please remove rm -rf %{buildroot} at the beginning of the %install section. [x]: Sources contain only permissible code or content. [-]: Development files must be in a -devel package See comment in source about the header file. [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. The Requires lines should be removed. The final binary will contain statically-linked copies of ocaml-lablgtk and gtksourceview2. It dynamically links to the C libs gtk etc. There is no need to pull in those packages at runtime at all. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: gtk-update-icon-cache is invoked in %postun and %posttrans if package contains icons. Note: icons in laby [x]: Useful -debuginfo package or justification otherwise. [x]: Package is not known to require an ExcludeArch tag. [-]: 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 must own all directories that it creates. [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]: 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: [!]: Uses parallel make %{?_smp_mflags} macro. Did you try enabling this? If it works it should be used. If the build system is broken for parallel builds (not uncommon, unfortunately) it may be worth adding a comment in the spec file. [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [!]: Final provides and requires are sane (see attachments). See above about Requires. The other (generated) requires / provides of the package are correct. [?]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in laby- debuginfo I don't know what fedora-review means by this, but as far as I know this is not necessary. [?]: Package functions as described. [x]: Latest version is packaged. Latest available is 0.6.4, same as version being packaged. [x]: Package does not include license text files separate from upstream. [-]: Patches link to upstream bugs/comments/lists or are otherwise justified. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [?]: Package should compile and build into binary rpms on all supported architectures. We will find out when you build this in Rawhide. [-]: %check is present and all tests pass. There don't appear to be any tests provided upstream. [x]: Packages should try to preserve timestamps of original installed files. [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]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [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: laby-0.6.4-3.fc27.x86_64.rpm laby-debuginfo-0.6.4-3.fc27.x86_64.rpm laby-0.6.4-3.fc27.src.rpm laby.x86_64: W: only-non-binary-in-usr-lib laby.x86_64: W: hidden-file-or-dir /usr/lib/.build-id laby.x86_64: W: hidden-file-or-dir /usr/lib/.build-id laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/c/lib/robot.c laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/c/lib/robot.h laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/cpp/lib/robot.cpp laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/cpp/lib/robot.h laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/ocaml/lib/robot.ml The following seem to be real problems. The files in the RPMs are really zero length, which seems like it is wrong: laby.x86_64: E: zero-length /usr/share/laby/sound/carry-exit.wav laby.x86_64: E: zero-length /usr/share/laby/sound/drop-no-space.wav laby.x86_64: E: zero-length /usr/share/laby/sound/drop-nothing.wav laby.x86_64: E: zero-length /usr/share/laby/sound/exit-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/no-exit.wav laby.x86_64: E: zero-length /usr/share/laby/sound/rock-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/rock-take.wav laby.x86_64: E: zero-length /usr/share/laby/sound/start.wav laby.x86_64: E: zero-length /usr/share/laby/sound/take-no-space.wav laby.x86_64: E: zero-length /usr/share/laby/sound/take-nothing.wav laby.x86_64: E: zero-length /usr/share/laby/sound/wall-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/web-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/web-out.wav laby.x86_64: W: no-manual-page-for-binary laby 3 packages and 0 specfiles checked; 13 errors, 9 warnings. Apart from the *.wav files, all other warnings can be ignored. Rpmlint (debuginfo) ------------------- Checking: laby-debuginfo-0.6.4-3.fc27.x86_64.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings. Rpmlint (installed packages) ---------------------------- sh: /usr/bin/python: No such file or directory laby.x86_64: W: only-non-binary-in-usr-lib laby.x86_64: W: hidden-file-or-dir /usr/lib/.build-id laby.x86_64: W: hidden-file-or-dir /usr/lib/.build-id laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/c/lib/robot.c laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/c/lib/robot.h laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/cpp/lib/robot.cpp laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/cpp/lib/robot.h laby.x86_64: W: devel-file-in-non-devel-package /usr/share/laby/mods/ocaml/lib/robot.ml laby.x86_64: E: zero-length /usr/share/laby/sound/carry-exit.wav laby.x86_64: E: zero-length /usr/share/laby/sound/drop-no-space.wav laby.x86_64: E: zero-length /usr/share/laby/sound/drop-nothing.wav laby.x86_64: E: zero-length /usr/share/laby/sound/exit-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/no-exit.wav laby.x86_64: E: zero-length /usr/share/laby/sound/rock-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/rock-take.wav laby.x86_64: E: zero-length /usr/share/laby/sound/start.wav laby.x86_64: E: zero-length /usr/share/laby/sound/take-no-space.wav laby.x86_64: E: zero-length /usr/share/laby/sound/take-nothing.wav laby.x86_64: E: zero-length /usr/share/laby/sound/wall-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/web-in.wav laby.x86_64: E: zero-length /usr/share/laby/sound/web-out.wav laby.x86_64: W: no-manual-page-for-binary laby 2 packages and 0 specfiles checked; 13 errors, 9 warnings. Requires -------- laby (rpmlib, GLIBC filtered): /bin/sh gtksourceview2 libatk-1.0.so.0()(64bit) libc.so.6()(64bit) libcairo.so.2()(64bit) libdl.so.2()(64bit) libfontconfig.so.1()(64bit) libfreetype.so.6()(64bit) libgdk-x11-2.0.so.0()(64bit) libgdk_pixbuf-2.0.so.0()(64bit) libgio-2.0.so.0()(64bit) libglib-2.0.so.0()(64bit) libgobject-2.0.so.0()(64bit) libgtk-x11-2.0.so.0()(64bit) libgtksourceview-2.0.so.0()(64bit) libm.so.6()(64bit) libpango-1.0.so.0()(64bit) libpangocairo-1.0.so.0()(64bit) libpangoft2-1.0.so.0()(64bit) ocaml-lablgtk rtld(GNU_HASH) laby-debuginfo (rpmlib, GLIBC filtered): Provides -------- laby: appdata() appdata(laby.appdata.xml) application() application(laby.desktop) laby laby(x86-64) laby-debuginfo: laby-debuginfo laby-debuginfo(x86-64) Source checksums ---------------- https://github.com/sgimenez/laby/archive/laby-0.6.4.tar.gz : CHECKSUM(SHA256) this package : ce43990f6f581ca1624989010a00bcdbad7a6635f438b9de5113075a9272d93f CHECKSUM(SHA256) upstream package : ce43990f6f581ca1624989010a00bcdbad7a6635f438b9de5113075a9272d93f Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02 Command line :/usr/bin/fedora-review -b 1450679 Buildroot used: fedora-rawhide-x86_64 Active plugins: Python, Generic, Shell-api, C/C++, Perl Disabled plugins: Java, fonts, SugarActivity, Ocaml, Haskell, R, PHP Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6
(In reply to Richard W.M. Jones from comment #10) > [x]: License field in the package spec file matches the actual license. > Note: Checking patched sources after %prep for licenses. Licenses > found: "GPL", "LGPL (v2 or later)", "GPL (v3 or later)", "Unknown or > generated". 97 files have unknown license. Detailed output of > licensecheck in /home/rjones/1450679-laby/licensecheck.txt > > I checked the licenses and is does appear that the author intends > GPLv3+. > > I guess you could ask upstream to use proper per-file GPL headers > instead of ones they appear to have made up, but it's not urgent. Reported upstream: https://github.com/sgimenez/laby/issues/46 > [!]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the > beginning of %install. > Note: rm -rf %{buildroot} present but not required > > Please remove rm -rf %{buildroot} at the beginning of the %install section. Done > [!]: Requires correct, justified where necessary. > > The Requires lines should be removed. The final binary will > contain statically-linked copies of ocaml-lablgtk and gtksourceview2. > It dynamically links to the C libs gtk etc. There is no need to pull in > those packages at runtime at all. Done > Generic: > [!]: Uses parallel make %{?_smp_mflags} macro. > > Did you try enabling this? If it works it should be used. If the > build system is broken for parallel builds (not uncommon, unfortunately) > it may be worth adding a comment in the spec file. Added, seems to work fine. > [!]: Final provides and requires are sane (see attachments). > > See above about Requires. The other (generated) requires / provides > of the package are correct. Done > [?]: Fully versioned dependency in subpackages if applicable. > Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in laby- > debuginfo > > I don't know what fedora-review means by this, but as far as I know > this is not necessary. Agreed > [?]: Package functions as described. Verified working > [?]: Package should compile and build into binary rpms on all supported > architectures. > > We will find out when you build this in Rawhide. ok > The following seem to be real problems. The files in the RPMs > are really zero length, which seems like it is wrong: > > laby.x86_64: E: zero-length /usr/share/laby/sound/carry-exit.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/drop-no-space.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/drop-nothing.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/exit-in.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/no-exit.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/rock-in.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/rock-take.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/start.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/take-no-space.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/take-nothing.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/wall-in.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/web-in.wav > laby.x86_64: E: zero-length /usr/share/laby/sound/web-out.wav They are zero-length in the upstream source tree. I opened https://github.com/sgimenez/laby/issues/47 to track it. Looking at the code looks like they are installed to avoid file not found errors while playing sounds in src/sounds.ml. I think best solution for this is getting upstream to add real sound files or add error handling, instead of just adding placeholders for avoiding file not found errors. In the meanwhile, in order to keep the game working, they're needed even if empty. Spec URL: https://raw.githubusercontent.com/sandrobonazzola/laby/17eb8daef0d416b8122f22f4e69de03ba709d36f/packaging/laby.spec SRPM URL: https://copr-be.cloud.fedoraproject.org/results/sbonazzo/Laby/fedora-rawhide-x86_64/00554778-laby/laby-0.6.4-4.fc27.src.rpm
Thanks - the new spec file addresses all the problems, except for the wav files which is tracked upstream. Therefore this package is APPROVED. You will need to follow on with the package review process, starting by making an SCM admin request. https://fedoraproject.org/wiki/Package_Review_Process
(In reply to Richard W.M. Jones from comment #12) > Thanks - the new spec file addresses all the problems, except > for the wav files which is tracked upstream. > > Therefore this package is APPROVED. > > You will need to follow on with the package review process, > starting by making an SCM admin request. > https://fedoraproject.org/wiki/Package_Review_Process Thanks for the review and the help with the package. SCM admin request opened.
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/laby
laby-0.6.4-4.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-674816c1d1
laby-0.6.4-4.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-674816c1d1
laby-0.6.4-4.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.