Spec URL: https://jruzicka.fedorapeople.org/pkgs/sysrepo.spec SRPM URL: https://jruzicka.fedorapeople.org/pkgs/sysrepo-2.0.53-1.fc36.src.rpm Description: Applications can use sysrepo to store their configuration modeled by provided YANG model instead of using e.g. flat configuration files. Sysrepo will ensure data consistency of the data stored in the data store and enforce data constraints defined by YANG model. Fedora Account System Username: jruzicka
No luck getting review so far... Maybe @pemensik could help, as this is familiar to libnetconf2 #2023307 ?
Sure, I will review it
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed Issues found: - Missing systemd unit for sysrepo-plugind daemon. If it should not be started as standalone daemon, is it documented how is it used? It is not clear to me how is it used. Either system or user unit should be installed in tools subpackage. - Shouldn't plugind daemon belong to /usr/sbin, when it has manual .8 suffix? Can it be used by unprivileged users? ===== MUST items ===== C/C++: [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [x]: If your application is a C or C++ application you must list a BuildRequires against gcc, gcc-c++ or clang. [x]: Header files in -devel subpackage, if present. [x]: ldconfig not called in %post and %postun for Fedora 28 and later. [x]: Package does not contain any libtool archives (.la) [x]: Rpath absent or only used for internal libs. [x]: Development (unversioned) .so files in -devel subpackage, if present. 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: "Unknown or generated", "BSD (3 clause)". 212 files have unknown license. Detailed output of licensecheck in /home/reviewer/fedora/rawhide/2042998-sysrepo/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [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. [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. [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 20480 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]: 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]: 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]: 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 sysrepo- devel , sysrepo-tools ^^ This seems wrong, exactly this is present [?]: 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]: 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. [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]: The placement of pkgconfig(.pc) files are correct. [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: sysrepo-2.0.53-1.fc36.x86_64.rpm sysrepo-devel-2.0.53-1.fc36.x86_64.rpm sysrepo-tools-2.0.53-1.fc36.x86_64.rpm sysrepo-debuginfo-2.0.53-1.fc36.x86_64.rpm sysrepo-debugsource-2.0.53-1.fc36.x86_64.rpm sysrepo-2.0.53-1.fc36.src.rpm sysrepo.x86_64: W: spelling-error %description -l en_US datastore -> data store, data-store, devastator sysrepo-devel.x86_64: W: description-shorter-than-summary sysrepo-devel.x86_64: W: no-documentation sysrepo-tools.x86_64: W: summary-not-capitalized C sysrepo executable tools sysrepo.src: W: spelling-error %description -l en_US datastore -> data store, data-store, devastator 6 packages and 0 specfiles checked; 0 errors, 5 warnings. Rpmlint (debuginfo) ------------------- Checking: sysrepo-debuginfo-2.0.53-1.fc36.x86_64.rpm sysrepo-tools-debuginfo-2.0.53-1.fc36.x86_64.rpm 2 packages and 0 specfiles checked; 0 errors, 0 warnings. Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output: Source checksums ---------------- https://github.com/sysrepo/sysrepo/archive/v2.0.53/sysrepo-2.0.53.tar.gz : CHECKSUM(SHA256) this package : fe09da5f40fb53e3fb97268a134cc0ed3003f0018d0d117c73e81e1553a11f30 CHECKSUM(SHA256) upstream package : fe09da5f40fb53e3fb97268a134cc0ed3003f0018d0d117c73e81e1553a11f30 Requires -------- sysrepo (rpmlib, GLIBC filtered): libc.so.6()(64bit) libyang.so.2()(64bit) rtld(GNU_HASH) sysrepo-devel (rpmlib, GLIBC filtered): /usr/bin/pkg-config libsysrepo.so.6()(64bit) pkgconfig pkgconfig(libyang) sysrepo(x86-64) sysrepo-tools (rpmlib, GLIBC filtered): libc.so.6()(64bit) libsysrepo.so.6()(64bit) libyang.so.2()(64bit) rtld(GNU_HASH) sysrepo(x86-64) sysrepo-debuginfo (rpmlib, GLIBC filtered): sysrepo-debugsource (rpmlib, GLIBC filtered): Provides -------- sysrepo: libsysrepo.so.6()(64bit) sysrepo sysrepo(x86-64) sysrepo-devel: pkgconfig(sysrepo) sysrepo-devel sysrepo-devel(x86-64) sysrepo-tools: sysrepo-tools sysrepo-tools(x86-64) sysrepo-debuginfo: debuginfo(build-id) libsysrepo.so.6.4.19-2.0.53-1.fc36.x86_64.debug()(64bit) sysrepo-debuginfo sysrepo-debuginfo(x86-64) sysrepo-debugsource: sysrepo-debugsource sysrepo-debugsource(x86-64) Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 2042998 Buildroot used: fedora-rawhide-x86_64 Active plugins: C/C++, Shell-api, Generic Disabled plugins: Perl, fonts, Ocaml, PHP, Haskell, R, Python, SugarActivity, Java Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
Spec URL: https://jruzicka.fedorapeople.org/pkgs/sysrepo.spec SRPM URL: https://jruzicka.fedorapeople.org/pkgs/sysrepo-2.1.42-1.fc37.src.rpm Sorry for the long delay, the discussion and testing around the service file prompted a chain of new upstream releases (already in rawhide) - sysrepo-plugind.service is now provided by the upstream tarball. > - Missing systemd unit for sysrepo-plugind daemon. > If it should not be started as standalone daemon, is it documented how is it used? It is not clear to me how is it used. > Either system or user unit should be installed in tools subpackage. I've updated the .spec to include the service file, which is now rendered during the CMake build. > - Shouldn't plugind daemon belong to /usr/sbin, when it has manual .8 suffix? Can it be used by unprivileged users? It can be used by unprivileged users. IIUC system-wide use is more common/easier, thus system unit as opposed to user unit. man section 8: System administration commands and daemons Well, it's a daemon... you think other man section would be more appropriate?
Well, man man citation: 8 System administration commands (usually only for root) I don't know how common it is in other distributions. If most often usage of that daemon is by the system, then I would expect it resides with similar services in /usr/sbin. It is not very important on Fedora, where also /sbin directory is added to default path. It seems man section is correct, but as a tool usually for administrators it should be in sbin. I think that daemon should also have its entries in %post and %postun from systemd-rpm-config, ensuring it is properly restarted on upgrades: BuildRequires: systemd-rpm-config ... %install ... %post tools %systemd_post %{name}-plugind.service %postun tools %systemd_postun_with_restart %{name}-plugind.service Unless it is required, service should run under its own non-privileged user. If its communication is lust local, it may be okay. Some options are described on [1]. Note SELinux strips even for root user systemd services ability to modify files of other users, where it does not have normal rights for modification. If that is required, it would need modification of selinux-policy. Otherwise it seems ready for inclusion. Thank you for working on it! 1. https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/sysrepo
I've worked with upstream to properly package the sysrepo-plugind with future plugins in mind, and we ended up splitting it into a separate subpackage. sysrepo is now using sysrepo group while sysrepo-plugind has a dedicated sysrepo-plugind non-privileged user who runs the service. With the new user setup and how it's implemented in the build system, it's now sadly not possible to run the tests in `%check` during package build, they'd need to be run after packages are installed and all scripts have run (like Debian autopkgtests). @pmensik Thank you for your insightful review which hopefully resulted in higher quality package 🦾 Feel free to review the new user setup in distgit: https://src.fedoraproject.org/rpms/sysrepo/blob/rawhide/f/sysrepo.spec
I would change library pattern in main package to: %{_libdir}/libsysrepo.so.7* I would remin the developer when this does not match anymore that dependent packages needs rebuild also. As a minor thing %{_libdir}/libsysrepo.so is also part of main package, but it should be only in devel subpackage. Anything that needs to link with sysrepo should have BuildRequires: sysrepo-devel. sysrepo should not work alone. %{_sysconfdir}/sysrepo should be created in %install section with appropriate group. It does not belong to %post script. %attr(0770,root,sysrepo) %{_sysconfdir}/sysrepo # put into %files I am not sure %postun deletion of shm files is required. I am not sure, but wouldn't they be autoremoved as soon as dependent application stops? Shouldn't any dependent application or daemon shutdown on uninstallation? I think dependencies should force any dependent packages to stop their users, so nothing should remain here. Not sure, I don't maintain any package using shm. And please add this bug to bodhi updates with sysrepo builds. It would get closed once they get into stable repository.
FEDORA-2022-078eef305a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-078eef305a
FEDORA-2022-078eef305a has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.