Spec URL: https://download.copr.fedorainfracloud.org/results/herzenschein/qman/fedora-rawhide-x86_64/08896427-qman/qman.spec SRPM URL: https://download.copr.fedorainfracloud.org/results/herzenschein/qman/fedora-rawhide-x86_64/08896427-qman/qman-1.4.1-1.fc43.src.rpm Description: A more modern manual page viewer for our terminals Fedora Account System Username: herzenschein This is my first package, so I'll need a sponsor. I've contacted the upstream developer before about fixing things for a potential openSUSE package, I can inform them later than I'm also looking into making one for Fedora. My COPR using this spec is available on https://copr.fedorainfracloud.org/coprs/herzenschein/qman/
Copr build: https://copr.fedorainfracloud.org/coprs/build/8897642 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2359302-qman/fedora-rawhide-x86_64/08897642-qman/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
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]: If your application is a C or C++ application you must list a BuildRequires against gcc, gcc-c++ or clang. [x]: Package does not contain any libtool archives (.la) [x]: Package contains no static executables. [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: "BSD 2-Clause License", "Unknown or generated", "*No copyright* BSD 2-Clause License". 45 files have unknown license. Detailed output of licensecheck in /home/fedora-packaging/reviews/qman/2359302- qman/licensecheck.txt [!]: Package requires other packages for directories it uses. Note: No known owner of /etc/xdg/qman/themes, /etc/xdg/qman [ ]: Package must own all directories that it creates. Note: Directories without known owners: /etc/xdg/qman, /etc/xdg/qman/themes [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. [-]: Package contains desktop file if it is a GUI application. [-]: 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. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [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 13753 bytes in 3 files. [ ]: 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: No rpmlint messages. [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]: The License field must be a valid SPDX expression. [x]: Package does not own files or directories owned by other packages. [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]: %config files are marked noreplace or the reason is justified. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: No %config files under /usr. [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: [-]: 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). [ ]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [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: No rpmlint messages. [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: qman-1.4.1-1.fc43.x86_64.rpm qman-1.4.1-1.fc43.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.6.1 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmpgc9qs6zd')] checks: 32, packages: 2 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 7 filtered, 0 badness; has taken 0.2 s Rpmlint (debuginfo) ------------------- Checking: qman-debuginfo-1.4.1-1.fc43.x86_64.rpm ============================ rpmlint session starts ============================ rpmlint: 2.6.1 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmp7g57i6kt')] checks: 32, packages: 1 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 5 filtered, 0 badness; has taken 0.1 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 2 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 9 filtered, 0 badness; has taken 0.3 s Source checksums ---------------- https://github.com/plp13/qman/archive/refs/tags/v1.4.1.tar.gz : CHECKSUM(SHA256) this package : 644f9cfc19adcb3e630eb7dc86b1928f1a162d7a2171e91c2465751486796671 CHECKSUM(SHA256) upstream package : 644f9cfc19adcb3e630eb7dc86b1928f1a162d7a2171e91c2465751486796671 Requires -------- qman (rpmlib, GLIBC filtered): config(qman) groff-base libbz2.so.1()(64bit) libc.so.6()(64bit) liblzma.so.5()(64bit) liblzma.so.5(XZ_5.0)(64bit) libncursesw.so.6()(64bit) libtinfo.so.6()(64bit) libz.so.1()(64bit) libz.so.1(ZLIB_1.2.0.2)(64bit) libz.so.1(ZLIB_1.2.3.3)(64bit) man rtld(GNU_HASH) Provides -------- qman: config(qman) qman qman(x86-64) Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -b 2359302 Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, Shell-api, C/C++ Disabled plugins: fonts, Haskell, Perl, Python, SugarActivity, Java, R, PHP, Ocaml Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH Comments: a) Please replace: Source0: https://github.com/plp13/%{name}/archive/refs/tags/v%{version}.tar.gz by Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz b) Add %dir %{_sysconfdir}/xdg/qman/ to the file listing to ensure the directory is owned c) Consider changing BuildRequires: python3-cogapp to BuildRequires: python3dist(cogapp) so name matches what is on PyPI d) Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=131488283 e) Some warnings during the build ../src/eini.c: In function ‘eini’: ../src/eini.c:238:9: warning: ‘__strncat_chk’ output may be truncated copying between 0 and 1023 bytes from a string of length 1023 [-Ws tringop-truncation] 238 | strncat(ipath, apath, BS_LINE - strlen(ipath) - 1); | ^ ../src/util.c: In function ‘xbasename’: ../src/util.c:294:15: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] 294 | char *res = strncpy(dest, src, n); | ^ ../src/util.c: In function ‘xdirname’: ../src/util.c:294:15: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] ../src/tui.c: In function ‘init_tui’: ../src/tui.c:480:19: warning: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types] 480 | signal(SIGUSR1, sigusr1_handler); | ^~~~~~~~~~~~~~~ | | | void (*)(void) In file included from ../src/lib.h:14, from ../src/tui.c:3: /usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’ 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) | ~~~~~~~~~~~~~~~^~~~~~~~~ ../src/tui.c:163:6: note: ‘sigusr1_handler’ declared here 163 | void sigusr1_handler() { | ^~~~~~~~~~~~~~~ /usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here 72 | typedef void (*__sighandler_t) (int); ../src/eini.c: In function ‘eini’: ../src/eini.c:238:9: warning: ‘__strncat_chk’ output may be truncated copying between 0 and 1023 bytes from a string of length 1023 [-Ws tringop-truncation] 238 | strncat(ipath, apath, BS_LINE - strlen(ipath) - 1); ../src/util.c: In function ‘xbasename’: ../src/util.c:294:15: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] 294 | char *res = strncpy(dest, src, n); | ^ ../src/util.c: In function ‘xdirname’: ../src/util.c:294:15: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] ../src/tui.c: In function ‘init_tui’: ../src/tui.c:480:19: warning: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types] 480 | signal(SIGUSR1, sigusr1_handler); | ^~~~~~~~~~~~~~~ | | | void (*)(void) In file included from ../src/lib.h:14, from ../src/tui.c:3: /usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘void (*)(void)’ 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) | ~~~~~~~~~~~~~~~^~~~~~~~~ ../src/tui.c:163:6: note: ‘sigusr1_handler’ declared here 163 | void sigusr1_handler() { | ^~~~~~~~~~~~~~~ /usr/include/signal.h:72:16: note: ‘__sighandler_t’ declared here 72 | typedef void (*__sighandler_t) (int); | ^~~~~~~~~~~~~~ f) Please do a few mock reviews of other packages that have been submitted and link them here. See: https://docs.fedoraproject.org/en-US/fesco/Packager_sponsor_policy/#comment_on_reviews
``` # -Wincompatible-pointer-types issue with gcc introduced in 1.4.0 %global build_type_safety_c 2 ``` A simpler (and perhaps more correct) way to fix the error you were having would be to correct the signature of the sigusr1_handler function: ``` --- a/src/tui.c 2025-04-12 08:55:10.000000000 -0300 +++ b/src/tui.c 2025-04-13 00:19:48.009633599 -0300 @@ -160,7 +160,7 @@ // Re-configure the program. `init_tui()` makes sure this is called whenever // `SIGUSR1` is received. -void sigusr1_handler() { +void sigusr1_handler(int signum) { // Don't attempt attempt to reconfigure on ancient terminals if (tcap.colours < 256 || tcap.term == strstr(tcap.term, "rxvt")) { return; ``` Consider changing ``` BuildRequires: xz-devel BuildRequires: CUnit-devel ``` to ``` BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(cunit) ``` Consider using this description from qman man page [1]: ``` %description Qman is a modern, interactive manual page viewer for our terminals. It strives to be easy to use for anyone familiar with the man(1) command, and also to be fast and tiny, so that it can be used everywhere. ``` Consider removing PACKAGING.md and TESTING.md, as these files are not useful to be installed [2]: ``` %install %meson_install rm -v %{buildroot}/%{_datadir}/doc/%{name}/{PACKAGING,TESTING}.md ``` You need to use this pattern for the man page [3]: ``` %{_mandir}/man1/%{name}.1* ``` 1. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_summary_and_description 2. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation 3. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages
I have updated the spec and added it to a pagure repository: https://pagure.io/qman/blob/master/f/qman.spec As before the builds are available on COPR: https://copr.fedorainfracloud.org/coprs/herzenschein/qman/ > a) Please replace: > Source0: https://github.com/plp13/%{name}/archive/refs/tags/v%{version}.tar.gz > by > Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz How did you find that link? I can't seem to find it on Github. >A simpler (and perhaps more correct) way to fix the error you were having would >be to correct the signature of the sigusr1_handler function: I'm getting an error when attempting to add the patch: ``` + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/sigurs1_handler.patch + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch -f The text leading up to this was: -------------------------- |--- a/src/tui.c 2025-04-12 08:55:10.000000000 -0300 |+++ b/src/tui.c 2025-04-13 00:19:48.009633599 -0300 -------------------------- No file to patch. Skipping patch. 1 out of 1 hunk ignored error: Bad exit status from /var/tmp/rpm-tmp.sySLid (%prep) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.sySLid (%prep) ``` Also, would this require that I make an upstream bug report, as mentioned in https://docs.fedoraproject.org/en-US/packaging-guidelines/#_all_patches_should_have_an_upstream_bug_link_or_comment ? I see upstream has just fixed this 11 hours ago, I'm not sure how to proceed: https://github.com/plp13/qman/commit/68c705134fd8524770258e2b28386afe5c01036c
Ah, figured out a proper way to fix applying the patch. It just needed stripping the prefix with -p1. I have updated the spec and built successfully from COPR.
(In reply to Thiago Sueto from comment #4) > I have updated the spec and added it to a pagure repository: > https://pagure.io/qman/blob/master/f/qman.spec > > As before the builds are available on COPR: > https://copr.fedorainfracloud.org/coprs/herzenschein/qman/ > Please place links to what should be reviewed here. spec: https://download.copr.fedorainfracloud.org/results/herzenschein/qman/fedora-rawhide-x86_64/08903635-qman/qman.spec srpm: https://download.copr.fedorainfracloud.org/results/herzenschein/qman/fedora-rawhide-x86_64/08903635-qman/qman-1.4.1-1.fc43.src.rpm > > a) Please replace: > > Source0: https://github.com/plp13/%{name}/archive/refs/tags/v%{version}.tar.gz > > by > > Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz > > How did you find that link? I can't seem to find it on Github. > It is in the Fedora documentation, but is not the default shown on GitHub: https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_git_tags Many spec files also use it. > >A simpler (and perhaps more correct) way to fix the error you were having would > >be to correct the signature of the sigusr1_handler function: > > I'm getting an error when attempting to add the patch: > > ``` > + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . > + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/sigurs1_handler.patch > + /usr/bin/patch -s --fuzz=0 --no-backup-if-mismatch -f > The text leading up to this was: > -------------------------- > |--- a/src/tui.c 2025-04-12 08:55:10.000000000 -0300 > |+++ b/src/tui.c 2025-04-13 00:19:48.009633599 -0300 > -------------------------- > No file to patch. Skipping patch. > 1 out of 1 hunk ignored > error: Bad exit status from /var/tmp/rpm-tmp.sySLid (%prep) > > RPM build errors: > Bad exit status from /var/tmp/rpm-tmp.sySLid (%prep) > ``` > > Also, would this require that I make an upstream bug report, as mentioned in > https://docs.fedoraproject.org/en-US/packaging-guidelines/ > #_all_patches_should_have_an_upstream_bug_link_or_comment ? > > I see upstream has just fixed this 11 hours ago, I'm not sure how to > proceed: > https://github.com/plp13/qman/commit/68c705134fd8524770258e2b28386afe5c01036c You can either package a commit, or add a patch and refer to the pull request.