Spec URL: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor.spec SRPM URL: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor-1.1-1.fc30.src.rpm Description: The Low Memory Monitor is an early boot daemon that will monitor memory pressure information coming from the kernel, and, first, send a signal to user-space applications when memory is running low, and then activate the kernel's OOM killer when memory is running really low. Fedora Account System Username: hadess
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed Issues: ======= - License file should be installed when any subpackage combination is installed. - Fully versioned dependency in subpackages if applicable. The -docs subpackage should require the main package: Requires: %{name} = %{version}-%{release} - Should require systemd-rpm-macros rather than %{?systemd_requires}, per: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_dependencies_on_the_systemd_package ===== MUST items ===== C/C++: [-]: Provides: bundled(gnulib) in place as required. [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. [-]: 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. [!]: License file installed when any subpackage combination is installed. [x]: Package must own all directories that it creates. Note: %{_sysconfdir}/dbus-1/system.d/ is OK because systemd and D-Bus are both required for low-memory-monitor to function [x]: Package does not own files or directories owned by other packages. Note: %{_datadir}/gtk-doc/html/ OK because gtk-doc is not required for low-memory-monitor to function [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. [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 2 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]: Package requires other packages for directories it uses. [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. [-]: 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]: 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 low-memory-monitor [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). [!]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in low- memory-monitor-docs [x]: 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. [-]: 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. [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). But they are all strange false positives. [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: low-memory-monitor-1.1-1.fc32.x86_64.rpm low-memory-monitor-docs-1.1-1.fc32.noarch.rpm low-memory-monitor-debuginfo-1.1-1.fc32.x86_64.rpm low-memory-monitor-debugsource-1.1-1.fc32.x86_64.rpm low-memory-monitor-1.1-1.fc32.src.rpm low-memory-monitor.x86_64: W: non-conffile-in-etc /etc/dbus-1/system.d/org.freedesktop.LowMemoryMonitor.conf low-memory-monitor.x86_64: W: non-conffile-in-etc /etc/low-memory-monitor.conf 5 packages and 0 specfiles checked; 0 errors, 2 warnings. Rpmlint (debuginfo) ------------------- Checking: low-memory-monitor-debuginfo-1.1-1.fc32.x86_64.rpm 1 packages and 0 specfiles checked; 0 errors, 0 warnings. Rpmlint (installed packages) ---------------------------- perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "C.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "C.UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). low-memory-monitor-docs.noarch: W: invalid-url URL: https://gitlab.freedesktop.org/hadess/low-memory-monitor <urlopen error [Errno -2] Name or service not known> low-memory-monitor-debuginfo.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/hadess/low-memory-monitor <urlopen error [Errno -2] Name or service not known> low-memory-monitor-debugsource.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/hadess/low-memory-monitor <urlopen error [Errno -2] Name or service not known> low-memory-monitor.x86_64: W: invalid-url URL: https://gitlab.freedesktop.org/hadess/low-memory-monitor <urlopen error [Errno -2] Name or service not known> low-memory-monitor.x86_64: W: non-conffile-in-etc /etc/dbus-1/system.d/org.freedesktop.LowMemoryMonitor.conf low-memory-monitor.x86_64: W: non-conffile-in-etc /etc/low-memory-monitor.conf 4 packages and 0 specfiles checked; 0 errors, 6 warnings. Source checksums ---------------- https://gitlab.freedesktop.org/hadess/low-memory-monitor/uploads/e9a3f55a615245292b4aa64f40beb4fc/low-memory-monitor-1.1.tar.xz : CHECKSUM(SHA256) this package : 4eb644504a774adca7efa45dabd0c551dbeb4b9d1363fb1c68ddfa38875d43f3 CHECKSUM(SHA256) upstream package : 4eb644504a774adca7efa45dabd0c551dbeb4b9d1363fb1c68ddfa38875d43f3 Requires -------- low-memory-monitor (rpmlib, GLIBC filtered): /bin/sh libc.so.6()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit) libgio-2.0.so.0()(64bit) libglib-2.0.so.0()(64bit) libgobject-2.0.so.0()(64bit) rtld(GNU_HASH) systemd low-memory-monitor-docs (rpmlib, GLIBC filtered): low-memory-monitor-debuginfo (rpmlib, GLIBC filtered): low-memory-monitor-debugsource (rpmlib, GLIBC filtered): Provides -------- low-memory-monitor: low-memory-monitor low-memory-monitor(x86-64) low-memory-monitor-docs: low-memory-monitor-docs low-memory-monitor-debuginfo: debuginfo(build-id) low-memory-monitor-debuginfo low-memory-monitor-debuginfo(x86-64) low-memory-monitor-debugsource: low-memory-monitor-debugsource low-memory-monitor-debugsource(x86-64) Generated by fedora-review 0.7.3 (44b83c7) last change: 2019-09-18 Command line :/usr/bin/fedora-review -b 1769843 Buildroot used: fedora-rawhide-{{ target_arch }} Active plugins: C/C++, Generic, Shell-api Disabled plugins: Python, fonts, R, PHP, SugarActivity, Haskell, Java, Ocaml, Perl Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
Updated spec: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor.spec Updated package: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor-1.1-2.fc30.src.rpm
(In reply to Michael Catanzaro from comment #1) > [x]: Rpmlint is run on all installed packages. > Note: There are rpmlint messages (see attachment). > But they are all strange false positives. As discussed on IRC, they're not false-positives, you need %config(noreplace) or %config for the files under /etc.
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.LowMemoryMonitor.conf should also use %config I see you added %config for %{_sysconfdir}/low-memory-monitor.conf, but I would use %config(noreplace) in case the user chooses to modify it. Finally, you still have %{?systemd_requires} where systemd-rpm-macros should suffice.
(In reply to Michael Catanzaro from comment #4) > %{_sysconfdir}/dbus-1/system.d/org.freedesktop.LowMemoryMonitor.conf should > also use %config It's not really a configuration file, and shouldn't be modified by users, or even administrators. > I see you added %config for %{_sysconfdir}/low-memory-monitor.conf, but I > would use %config(noreplace) in case the user chooses to modify it. I would actually want the file to be replaced to automatically use the new defaults set in the package, rather than keep the old ones. So the current tag is correct for this file. > Finally, you still have %{?systemd_requires} where systemd-rpm-macros should > suffice. That expands to: %systemd_requires \ Requires(post): systemd \ Requires(preun): systemd \ Requires(postun): systemd \ %{nil} Which I think is what we want. Or am I missing something?
(In reply to Bastien Nocera from comment #5) > It's not really a configuration file, and shouldn't be modified by users, or > even > administrators. I notice there is also %{_datadir}/dbus-1/system.d/. Not sure about the history behind these two locations, but how about we put it there instead? Seems like a better place? > I would actually want the file to be replaced to automatically use the new > defaults > set in the package, rather than keep the old ones. So the current tag is > correct for > this file. That is allowed if you add a comment to the spec file, but it's discouraged: """ As a rule of thumb, use %config(noreplace) instead of plain %config unless your best, educated guess is that doing so will break things. In other words, think hard before overwriting local changes in configuration files on package upgrades. An example case when /not/ to use noreplace is when a package’s configuration file changes so that the new package revision wouldn’t work with the config file from the previous package revision. Whenever plain %config is used, add a brief comment to the specfile explaining why. """ Basically users won't ever be able to safely edit this file if you replace their changes on package upgrade. Seems better for low-memory-monitor to assume default values for anything it doesn't find in its configuration file, which you probably do already anyway. But if you really want to replace it despite that guidance, you can add a comment. > That expands to: > %systemd_requires \ > Requires(post): systemd \ > Requires(preun): systemd \ > Requires(postun): systemd \ > %{nil} > > Which I think is what we want. Or am I missing something? Final sentence here: """ If package scriptlets call other systemd tools, for example systemd-tmpfiles, the package SHOULD declare appropriate dependencies. The %systemd_requires macro is a shortcut to require systemd for the %pre, %post, and %postun scriptlets. Note that those dependencies are not required for the %systemd_{post,preun,postun_with_restart,user_post,user_preun} macros listed above. """
(In reply to Michael Catanzaro from comment #6) > (In reply to Bastien Nocera from comment #5) > > It's not really a configuration file, and shouldn't be modified by users, or > > even > > administrators. > > I notice there is also %{_datadir}/dbus-1/system.d/. Not sure about the > history behind these two locations, but how about we put it there instead? > Seems like a better place? Indeed, done upstream. > > I would actually want the file to be replaced to automatically use the new > > defaults > > set in the package, rather than keep the old ones. So the current tag is > > correct for > > this file. > > That is allowed if you add a comment to the spec file, but it's discouraged: > > """ > As a rule of thumb, use %config(noreplace) instead of plain %config unless > your best, educated guess is that doing so will break things. In other > words, think hard before overwriting local changes in configuration files on > package upgrades. An example case when /not/ to use noreplace is when a > package’s configuration file changes so that the new package revision > wouldn’t work with the config file from the previous package revision. > Whenever plain %config is used, add a brief comment to the specfile > explaining why. > """ > > Basically users won't ever be able to safely edit this file if you replace > their changes on package upgrade. Seems better for low-memory-monitor to > assume default values for anything it doesn't find in its configuration > file, which you probably do already anyway. > > But if you really want to replace it despite that guidance, you can add a > comment. I've nuked the config file from the package. Now admins can create their own config files if they want to override the default, but the default is in the binary itself, controlled by the distributor. > > That expands to: > > %systemd_requires \ > > Requires(post): systemd \ > > Requires(preun): systemd \ > > Requires(postun): systemd \ > > %{nil} > > > > Which I think is what we want. Or am I missing something? > > Final sentence here: > > """ > If package scriptlets call other systemd tools, for example > systemd-tmpfiles, the package SHOULD declare appropriate dependencies. The > %systemd_requires macro is a shortcut to require systemd for the %pre, > %post, and %postun scriptlets. Note that those dependencies are not required > for the %systemd_{post,preun,postun_with_restart,user_post,user_preun} > macros listed above. > """ OK, will remove this. I'll update the package soon.
Updated packages: URL: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor.spec SRPM URL: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor-2.0-1.fc30.src.rpm
Did you try, as requested: BuildRequires: systemd-rpm-macros
Everything else looks fine, just check that BR once more before uploading. The packaging guidelines indicate systemd-rpm-macros should be used.
(In reply to Michael Catanzaro from comment #10) > Everything else looks fine, just check that BR once more before uploading. > The packaging guidelines indicate systemd-rpm-macros should be used. I built with "systemd-rpm-macros" here: https://koji.fedoraproject.org/koji/taskinfo?taskID=39019014 and without it here: https://koji.fedoraproject.org/koji/taskinfo?taskID=39019120 In both cases the systemd-rpm-macros are correctly expanded. I don't think a dependency on systemd for systemctl is needed as the macros already account for systemd not being installed yet, and will pick up the .service file we install when it, itself, gets installed. If I read correctly, the BR isn't needed, and scratch builds work as expected. In the worst case, I'll get a bug about it, but it won't make the package any less functional in the short term.
Source0: https://gitlab.freedesktop.org/hadess/low-memory-monitor/uploads/18351c4a6587ba7121594f9dfec05d71/low-memory-monitor-2.0.tar.xz → Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.gz %package docs → %package doc
(In reply to Artem from comment #12) > Source0: > https://gitlab.freedesktop.org/hadess/low-memory-monitor/uploads/ > 18351c4a6587ba7121594f9dfec05d71/low-memory-monitor-2.0.tar.xz > → > Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.gz They're not the same files. So no. > > %package docs > → > %package doc I can make that change, but where's the guideline that recommends that?
(In reply to Bastien Nocera from comment #13) > > %package docs > > → > > %package doc > > I can make that change, but where's the guideline that recommends that? https://docs.fedoraproject.org/en-US/packaging-guidelines/#_documentation
URL: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor.spec SRPM URL: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor-2.0-2.fc30.src.rpm
(In reply to Bastien Nocera from comment #15) > URL: > https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor.spec > SRPM URL: > https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor-2.0-2. > fc30.src.rpm Make that: https://hadess.fedorapeople.org/low-memory-monitor/low-memory-monitor-2.0-2.fc31.src.rpm
Thanks Artem, good catch! BTW Bastien, you already have fedora-review+ here so you can proceed when desired.
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/low-memory-monitor
low-memory-monitor-2.0-3.fc32 has been built in rawhide: https://koji.fedoraproject.org/koji/buildinfo?buildID=1414568 Thanks for the reviews!
FEDORA-2019-5b12d346b1 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-5b12d346b1
low-memory-monitor-2.0-3.fc31 has been pushed to the Fedora 31 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-2019-5b12d346b1
low-memory-monitor-2.0-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.