Repository: https://codeberg.org/gbcox/beetbrainz URL: https://copr.fedorainfracloud.org/coprs/gbcox/dogfood/package/golang-codeberg-gbcox-beetbrainz/ Fedora Review: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-42-x86_64/09182272-golang-codeberg-gbcox-beetbrainz/fedora-review/ Wiki: https://codeberg.org/gbcox/beetbrainz/wiki Summary: Beetbrainz is a simple Go-based webhook listener that integrates various media server playback events (Plex, Emby, Tautulli) with ListenBrainz to scrobble music playback. It uses Beets.io for enriched metadata where available. Reproducible: Always
The ticket summary is not in the correct format. Expected: Review Request: <main package name here> - <short summary here> Found: Review Request: golang-codeberg-gbcox-beetbrainz As a consequence, the package name cannot be parsed and submitted to be automatically build. Please modify the ticket summary and trigger a build by typing [fedora-review-service-build]. --- 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.
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09196210-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09196210-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.6-1.20250621gitbb1da8b.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197613-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197613-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.8-1.20250621git9bf7c06.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197613-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197613-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.8-1.20250621git9bf7c06.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197635-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197635-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.8-1.20250621git9bf7c06.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197688-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197688-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.9-1.20250621git9bf7c06.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09198027-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09198027-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.11-1.20250621git9bf7c06.fc43.src.rpm
I will take this review.
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues ====== 1. No debuginfo or debugsource packages are produced. This seems to be deliberate, but that is contrary to Fedora packaging guidelines. In addition, I see that the standard LDFLAGS have been copied verbatim into the spec file. That may break in the future if Fedora's standard LDFLAGS change. Both issues can be addressed by making the following changes to the spec file: - Remove "%define debug_package %{nil}" - Change the "export LDFLAGS" in %build to this: export LDFLAGS='\ -X main.appVersion=%{version} \ -X main.commit=%{commit} \ -X main.shortCommit=%{shortcommit} \ -linkmode external -extldflags "-pie -fPIE %{build_ldflags}"' 2. Note the unused-direct-shlib-dependency rpmlint warning below. I see 3 instances of "-ldflags=\"-O2\" \"-g\" \"-lresolv\"" in the build logs. That does not include the Fedora flags; in particular, -Wl,--as-needed is missing. This leads to an unneeded and unwanted dependency on libresolv. I'm not sure where those ldflags invocations come from. Can they be modified to include Fedora's LDFLAGS? 3. Is there any possibility of creating a man page, perhaps with help2man? ===== MUST items ===== 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. No licenses found. Please check the source files for licenses manually. [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. [x]: Package contains systemd file(s) if in need. [!]: Useful -debuginfo package or justification otherwise. See issue #1 above. [x]: Package is not known to require an ExcludeArch tag. [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]: The License field must be a valid SPDX expression. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [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]: systemd_post is invoked in %post, systemd_preun in %preun, and systemd_postun in %postun for Systemd service files. Note: Systemd service file(s) in golang-codeberg-gbcox-beetbrainz [x]: File names are valid UTF-8. [x]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 790 bytes in 1 files. [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]: %check is present and all tests pass. There are no tests, so "all tests pass" is vacuously true. [x]: Packages should try to preserve timestamps of original installed files. [x]: Spec use %global instead of %define unless justified. [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]: Package should compile and build into binary rpms on all supported architectures. ===== EXTRA items ===== Generic: [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: golang-codeberg-gbcox-beetbrainz-1.0.11-1.20250621git9bf7c06.fc43.x86_64.rpm golang-codeberg-gbcox-beetbrainz-1.0.11-1.20250621git9bf7c06.fc43.src.rpm ============================ 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 rpmlintrc: [PosixPath('/tmp/tmphcwcdhs8')] checks: 32, packages: 2 golang-codeberg-gbcox-beetbrainz.src: E: spelling-error ('webhook', 'Summary(en_US) webhook -> web hook, web-hook, webfoot') golang-codeberg-gbcox-beetbrainz.src: E: spelling-error ('scrobbling', 'Summary(en_US) scrobbling -> scribbling, scrabbling, scrolling') golang-codeberg-gbcox-beetbrainz.src: E: spelling-error ('webhook', '%description -l en_US webhook -> web hook, web-hook, webfoot') golang-codeberg-gbcox-beetbrainz.src: E: spelling-error ('scrobbling', '%description -l en_US scrobbling -> scribbling, scrabbling, scrolling') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('webhook', 'Summary(en_US) webhook -> web hook, web-hook, webfoot') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('scrobbling', 'Summary(en_US) scrobbling -> scribbling, scrabbling, scrolling') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('webhook', '%description -l en_US webhook -> web hook, web-hook, webfoot') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('scrobbling', '%description -l en_US scrobbling -> scribbling, scrabbling, scrolling') golang-codeberg-gbcox-beetbrainz.x86_64: W: no-manual-page-for-binary beetbrainz golang-codeberg-gbcox-beetbrainz.x86_64: W: incoherent-version-in-changelog 1.0.11-1 ['1.0.11-1.20250621git9bf7c06.fc43', '1.0.11-1.20250621git9bf7c06'] 2 packages and 0 specfiles checked; 8 errors, 2 warnings, 7 filtered, 8 badness; has taken 0.4 s Rpmlint (installed packages) ---------------------------- /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.14/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: 1 golang-codeberg-gbcox-beetbrainz.x86_64: W: unused-direct-shlib-dependency /usr/bin/beetbrainz /lib64/libresolv.so.2 golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('webhook', 'Summary(en_US) webhook -> web hook, web-hook, webfoot') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('scrobbling', 'Summary(en_US) scrobbling -> scribbling, scrabbling, scrolling') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('webhook', '%description -l en_US webhook -> web hook, web-hook, webfoot') golang-codeberg-gbcox-beetbrainz.x86_64: E: spelling-error ('scrobbling', '%description -l en_US scrobbling -> scribbling, scrabbling, scrolling') golang-codeberg-gbcox-beetbrainz.x86_64: W: no-manual-page-for-binary beetbrainz golang-codeberg-gbcox-beetbrainz.x86_64: W: incoherent-version-in-changelog 1.0.11-1 ['1.0.11-1.20250621git9bf7c06.fc43', '1.0.11-1.20250621git9bf7c06'] 1 packages and 0 specfiles checked; 4 errors, 3 warnings, 3 filtered, 4 badness; has taken 0.1 s Source checksums ---------------- https://codeberg.org/gbcox/beetbrainz/archive/9bf7c065a2f3694b4e4e61c2cfa6e8dfb048fc2c.tar.gz : CHECKSUM(SHA256) this package : 05ac885ce5269a86988183470a7b4c82ef4affa2a033f9b91cc362824d57b43d CHECKSUM(SHA256) upstream package : 05ac885ce5269a86988183470a7b4c82ef4affa2a033f9b91cc362824d57b43d Requires -------- golang-codeberg-gbcox-beetbrainz (rpmlib, GLIBC filtered): /bin/sh config(golang-codeberg-gbcox-beetbrainz) libc.so.6()(64bit) libresolv.so.2()(64bit) rtld(GNU_HASH) Provides -------- golang-codeberg-gbcox-beetbrainz: config(golang-codeberg-gbcox-beetbrainz) golang-codeberg-gbcox-beetbrainz golang-codeberg-gbcox-beetbrainz(x86-64) Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -b 2373805 -m fedora-rawhide-x86_64 Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, Shell-api Disabled plugins: Java, C/C++, Ruby, Haskell, Python, Ocaml, R, Perl, SugarActivity, fonts, PHP Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH
Hello Jerry, Thank you for the review and the excellent feedback. Much appreciated! Here's the current status on each of your points: 1. No debuginfo or debugsource packages and hardcoded LDFLAGS: I've adopted your suggestions, thanks! 2. unused-direct-shlib-dependency /usr/bin/beetbrainz /lib64/libresolv.so.2 and missing -Wl,--as-needed: I believe that is a false flag from rpmlint. beetbrainz is a webhook listener and network application, meaning libresolv.so.2 (which handles DNS lookups) is needed for its core functionality. Even though --as-needed is correctly specified via %{build_ldflags}, Go's external linking process often includes libresolv because its network routines or CGo interactions genuinely depend on it, making the dependency used rather than unused. 3. Possibility of creating a man page: Good idea, I created one and it is in the tarball as beetbrainz.8. However, despite the file being physically present in the buildroot immediately after installation (confirmed by ls -l in %install), every attempt to package beetbrainz.8 as a manual page has consistently resulted in an "error: File not found" during the RPM packaging's %files section processing. For diagnostic purposes, when the same file was renamed to beetbrainz.txt and packaged as a generic documentation file (%doc in %{_docdir}), the build completed successfully without error. This strongly indicates that the problem is not with the file's presence or basic installability, but specifically with RPM's internal processing or validation routines for files identified as system manual pages within this particular build environment. While the man page is intended to be included, and I've tried various standard methods, I've had to temporarily omit its packaging to allow the package to build (hence the W: no-manual-page-for-binary beetbrainz warning ). If you have an idea of something to try, I'd appreciate hearing it. Otherwise, I'll follow up with the GOLANG sig and see if they might have a clue as to what is going on. spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09205041-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09205041-golang-codeberg-gbcox-beetbrainz/golang-codeberg-gbcox-beetbrainz-1.0.12-1.20250624gitef649cd.fc43.src.rpm
This package is APPROVED. (In reply to Gerald Cox from comment #10) > 2. unused-direct-shlib-dependency /usr/bin/beetbrainz /lib64/libresolv.so.2 > and missing -Wl,--as-needed: > > I believe that is a false flag from rpmlint. beetbrainz is a webhook > listener and network application, meaning libresolv.so.2 (which handles DNS > lookups) is needed for its core functionality. Even though --as-needed is > correctly specified via %{build_ldflags}, Go's external linking process > often includes libresolv because its network routines or CGo interactions > genuinely depend on it, making the dependency used rather than unused. Okay, this isn't a big deal, but I will note that after installing the binary package, I see this: $ ldd -u /usr/bin/beetbrainz Unused direct dependencies: /lib64/libresolv.so.2 That means that no undefined symbols in /usr/bin/beetbrainz are resolved by libresolv.so.2. Indeed, looking at the undefined symbols in /usr/bin/beetbrainz (readelf -s /usr/bin/beetbrainz), the only network-related symbols I see are: - getaddrinfo - freeaddrinfo - gai_strerror all of which are defined in libc these days. So I think rpmlint is correct and the libresolv dependency is unused. But I'm not going to make a fuss about it. :-) > 3. Possibility of creating a man page: > > Good idea, I created one and it is in the tarball as beetbrainz.8. > > However, despite the file being physically present in the buildroot > immediately after installation (confirmed by ls -l in %install), every > attempt to package beetbrainz.8 as a manual page has consistently resulted > in an "error: File not found" during the RPM packaging's %files section > processing. The trick with man pages is that they are automatically compressed (by /usr/lib/rpm/brp-compress), so you have to account for the extra filename extension in %files. Right now, the man pages are compressed with gzip, but that could change in the future, so a glob is usually used. For example, I modified your spec file by adding this to %install: mkdir -p %{buildroot}%{_mandir}/man8 install -p %{project}.8 %{buildroot}%{_mandir}/man8 And adding this to %files: %{_mandir}/man8/%{project}.8* That works. Obligatory link to the packaging guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages I have approved this package. You can decide whether or not to include the manpage when you import the package.
Thanks Jerry. I'll include the man page. Thanks for the explanation. Much appreciated. I'll also try to get to the bottom of what is happening with libresolv.
Here is some analysis provided by openai and gemini. TLDR: libresolv.so.2 Unused Dependency: rpmlint flagged this as an unused direct dependency. Reviewer Analysis: libresolv.so.2 is indeed unused because the necessary network symbols are provided by libc.so.6. Attempted Fix: You tried the netgo build tag to force Go's pure resolver, hoping to eliminate the dependency. Result: The libresolv.so.2 library is still listed in the binary's NEEDED section (meaning it's pulled in by the linker) and ldd -u still reports it as an "Unused direct dependency." Conclusion: This is a persistent quirk of Go's external linking process—the binary requests libresolv.so.2 even when libc satisfies the actual symbol needs. Longer version: You've provided very insightful output from readelf -d! The line you found: 0x0000000000000001 (NEEDED) Shared library: [libresolv.so.2] This is the key piece of information that answers "why beetbrainz is pulling it in." The NEEDED section of a binary's dynamic (ELF) header explicitly lists the shared libraries that the program requires to run. What this means: The binary explicitly declares a need for libresolv.so.2. This entry is written into the executable by the linker (ld) during the build process. When you run beetbrainz, the system's dynamic linker (ld.so) will load libresolv.so.2 because the binary says it needs it. ldd -u correctly reports it as an "Unused direct dependency" because the actual symbols that beetbrainz needs for network operations (like getaddrinfo) are provided by libc.so.6. So, while libc is handling the symbol resolution, the linker has still embedded libresolv.so.2 in the NEEDED list. Why this might happen (the deeper "why"): This scenario typically points to a nuance in how Go's external linker (or the golang-macros if it adds flags) interacts with the system linker. Default Linker Flags from Go: The Go toolchain, when compiling a network-aware application with -linkmode external, might by default add -lresolv to the gcc/ld command line it executes. Even with --as-needed, if the linker is presented with libresolv.so.2 and there's any possible path or internal Go runtime code that could reference a symbol from it (even if libc also provides it), it might choose to list it in NEEDED. Overlapping Functionality: As mentioned, libc has integrated many functions historically found in libresolv. But if libresolv.so.2 contains additional or alternative implementations of related functions, or if the linking order or specific Go runtime behavior causes it to reference libresolv's version of a symbol over libc's, it could get pulled in. Essentially, the binary is "pulling it in" because the NEEDED entry tells the system to load it. The ldd -u output then clarifies that, despite being pulled in, it's not actually used by the application's executed code because its symbol needs are met elsewhere. It's a harmless, albeit slightly inefficient, quirk in this specific Go build context.
The Pagure repository was created at https://src.fedoraproject.org/rpms/golang-codeberg-gbcox-beetbrainz
FEDORA-2025-27862f6663 (golang-codeberg-gbcox-beetbrainz-1.0.12-1.20250624gitef649cd.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-27862f6663
FEDORA-2025-27862f6663 (golang-codeberg-gbcox-beetbrainz-1.0.12-1.20250624gitef649cd.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2025-3c7ade5780 (golang-codeberg-gbcox-beetbrainz-1.0.12-1.20250624gitef649cd.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-3c7ade5780
FEDORA-2025-3c7ade5780 has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-3c7ade5780 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-3c7ade5780 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-3c7ade5780 (golang-codeberg-gbcox-beetbrainz-1.0.12-1.20250624gitef649cd.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.