Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package smartmontools for openSUSE:Factory checked in at 2023-09-29 21:12:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/smartmontools (Old) and /work/SRC/openSUSE:Factory/.smartmontools.new.28202 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "smartmontools" Fri Sep 29 21:12:55 2023 rev:92 rq:1114129 version:7.4 Changes: -------- --- /work/SRC/openSUSE:Factory/smartmontools/smartmontools.changes 2023-08-18 19:27:13.439193759 +0200 +++ /work/SRC/openSUSE:Factory/.smartmontools.new.28202/smartmontools.changes 2023-09-29 21:13:27.409495312 +0200 @@ -1,0 +2,8 @@ +Fri Sep 22 07:41:12 UTC 2023 - Michal Suchanek <msucha...@suse.com> + +- Do not quit with an error when no drives to monitor are available (bsc#990406 bsc#1167051). +- Add smartd_service_dont_quit.patch +- Refresh harden_smartd.service.patch +- Run through spec-cleaner, use autosetup + +------------------------------------------------------------------- New: ---- smartd_service_dont_quit.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ smartmontools.spec ++++++ --- /var/tmp/diff_new_pack.KNYRSF/_old 2023-09-29 21:13:29.081555639 +0200 +++ /var/tmp/diff_new_pack.KNYRSF/_new 2023-09-29 21:13:29.081555639 +0200 @@ -20,10 +20,13 @@ %if ! %{defined _fillupdir} %define _fillupdir /var/adm/fillup-templates %endif - Name: smartmontools Version: 7.4 Release: 0 +Summary: Monitor for SMART devices +License: GPL-2.0-or-later +Group: Hardware/Other +URL: https://www.smartmontools.org/ Source: https://sourceforge.net/projects/smartmontools/files/smartmontools/%{version}/%{name}-%{version}.tar.gz Source1: https://sourceforge.net/projects/smartmontools/files/smartmontools/%{version}/%{name}-%{version}.tar.gz.asc Source2: smartmontools.sysconfig @@ -41,21 +44,19 @@ Patch4: smartmontools-suse-default.patch # PATCH-FIX-OPENSUSE smartmontools-var-lock-subsys.patch sbra...@suse.cz -- Do not use unsupported /var/lock/subsys. Patch10: smartmontools-var-lock-subsys.patch -Patch11: harden_smartd.service.patch -Requires(pre): %fillup_prereq -# Needed by generate_smartd_opt: -Requires(pre): coreutils -URL: https://www.smartmontools.org/ +# PATCH-FIX-SLE smartd_service_dont_quit.patch bsc990406 bsc1167051 msucha...@suse.de -- Do not quit when no drives are available. +Patch11: smartd_service_dont_quit.patch +Patch12: harden_smartd.service.patch BuildRequires: gcc-c++ -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libcap-ng-devel BuildRequires: libselinux-devel +BuildRequires: pkgconfig BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(systemd) +Requires(pre): %fillup_prereq +# Needed by generate_smartd_opt: +Requires(pre): coreutils %{?systemd_requires} -Summary: Monitor for SMART devices -License: GPL-2.0-or-later -Group: Hardware/Other %description SMARTmontools controls and monitors storage devices using the @@ -71,13 +72,10 @@ commands man smartctl and man smartd will provide more information. %prep -%setup -q +%autosetup -p1 cp -a %{SOURCE2} %{SOURCE5} . # Following line is handled by smartmontools-drivedb_h-update.sh. #cp -a %{SOURCE7} drivedb.h.new -%patch4 -%patch10 -p1 -%patch11 -p1 # # PATCH-FEATURE-OPENSUSE (sed on smartd.service.in) sbra...@suse.cz -- Use generated smartd_opts (from SUSE sysconfig file). Systemd smartd.service cannot be smart enough to parse SUSE sysconfig file and generate smartd_opts on fly. And we do not want to launch shell just for it in every boot. sed "s:/usr/local/etc/sysconfig/smartmontools:%{_localstatedir}/lib/smartmontools/smartd_opts:" <smartd.service.in >smartd.service.in.new @@ -114,12 +112,12 @@ --with-attributelog \ --with-nvme-devicescan -make %{?_smp_mflags} BUILD_INFO='"(SUSE RPM)"' -SERVICE=/usr/sbin/service +%make_build BUILD_INFO='"(SUSE RPM)"' +SERVICE=%{_sbindir}/service sed "s:@prefix@:%{_prefix}:g;s:@localstatedir@:%{_localstatedir}:g;s:@SERVICE@:$SERVICE:" <smartmontools.generate_smartd_opts.in >generate_smartd_opts %install -%makeinstall +%make_install mkdir -p %{buildroot}%{_prefix}/lib/smartmontools mkdir -p %{buildroot}%{_fillupdir} cp smartmontools.sysconfig %{buildroot}%{_fillupdir}/sysconfig.smartmontools @@ -157,7 +155,7 @@ # Extract drivedb.h branch for installed version. We will need it in %%post. if test -f %{_sbindir}/update-smart-drivedb ; then BRANCH= - eval $(grep "^BRANCH=\"[^\"]*\"$" /usr/sbin/update-smart-drivedb) + eval $(grep "^BRANCH=\"[^\"]*\"$" %{_sbindir}/update-smart-drivedb) if test -n "$BRANCH" ; then echo -n "$BRANCH" >%{_datadir}/smartmontools/drivedb.h.branch.rpmtemp fi @@ -172,10 +170,10 @@ %post # First prepare sysconfig. -%{fillup_only} +%fillup_only # Up to Leap 42.3 and SLE 15 SP3 Maintenance Update there was a "Command" meta comment in the sysconfig file. # It is not needed any more, but fillup does not delete it. Do it explicitly. (bsc#1195785, bsc#1196103) -sed -i '\@^##[[:space:]]*Command:[[:space:]]*/usr/lib/smartmontools/generate_smartd_opts$@d' /etc/sysconfig/smartmontools +sed -i '\@^##[[:space:]]*Command:[[:space:]]*%{_prefix}/lib/smartmontools/generate_smartd_opts$@d' %{_sysconfdir}/sysconfig/smartmontools # Then generate initial %%{_localstatedir}/lib/smartmontools/smartd_opts needed by smartd.service. SMARTD_SKIP_INIT=1 %{_prefix}/lib/smartmontools/generate_smartd_opts # No start by default here.. belongs to -presets packages @@ -190,7 +188,7 @@ if test "$DRIVEDB_H_RELEASE_RPM" -lt "${DRIVEDB_H_RELEASE_SAVED:-0}" ; then # If it is an update to the new branch, always replace the database. # Extract drivedb.h branch for the new version to default_branch. - eval $(grep "^default_branch=\"[^\"]*\"$" /usr/sbin/update-smart-drivedb) + eval $(grep "^default_branch=\"[^\"]*\"$" %{_sbindir}/update-smart-drivedb) OLD_BRANCH= if test -f %{_datadir}/smartmontools/drivedb.h.branch.rpmtemp ; then OLD_BRANCH=$(<%{_datadir}/smartmontools/drivedb.h.branch.rpmtemp) @@ -232,14 +230,13 @@ fi %files -%defattr(-, root, root) %doc %{_docdir}/%{name} %dir %{_datadir}/smartmontools %verify(not md5 size mtime) %{_datadir}/smartmontools/drivedb.h %ghost %{_datadir}/smartmontools/drivedb.h.error %ghost %{_datadir}/smartmontools/drivedb.h.lastcheck %ghost %{_datadir}/smartmontools/drivedb.h.old -%doc %{_mandir}/man*/* +%{_mandir}/man*/* %dir %{_localstatedir}/lib/smartmontools %ghost %{_localstatedir}/lib/smartmontools/smartd_opts %{_prefix}/lib/smartmontools ++++++ harden_smartd.service.patch ++++++ --- /var/tmp/diff_new_pack.KNYRSF/_old 2023-09-29 21:13:29.109556650 +0200 +++ /var/tmp/diff_new_pack.KNYRSF/_new 2023-09-29 21:13:29.113556794 +0200 @@ -1,8 +1,8 @@ -Index: smartmontools-7.2/smartd.service.in +Index: smartmontools-7.4/smartd.service.in =================================================================== ---- smartmontools-7.2.orig/smartd.service.in -+++ smartmontools-7.2/smartd.service.in -@@ -4,6 +4,16 @@ Documentation=man:smartd(8) man:smartd.c +--- smartmontools-7.4.orig/smartd.service.in ++++ smartmontools-7.4/smartd.service.in +@@ -7,6 +7,16 @@ Documentation=man:smartd(8) man:smartd.c ConditionVirtualization=no [Service] @@ -18,5 +18,5 @@ +# end of automatic additions Type=notify EnvironmentFile=-/usr/local/etc/sysconfig/smartmontools - ExecStart=/usr/local/sbin/smartd -n $smartd_opts + ExecStart=/usr/local/sbin/smartd -n -q never $smartd_opts ++++++ smartd_service_dont_quit.patch ++++++ Index: smartmontools-7.4/smartd.service.in =================================================================== --- smartmontools-7.4.orig/smartd.service.in +++ smartmontools-7.4/smartd.service.in @@ -9,7 +9,7 @@ ConditionVirtualization=no [Service] Type=notify EnvironmentFile=-/usr/local/etc/sysconfig/smartmontools -ExecStart=/usr/local/sbin/smartd -n $smartd_opts +ExecStart=/usr/local/sbin/smartd -n -q never $smartd_opts ExecReload=/bin/kill -HUP $MAINPID [Install] ++++++ smartmontools-suse-default.patch ++++++ --- /var/tmp/diff_new_pack.KNYRSF/_old 2023-09-29 21:13:29.185559392 +0200 +++ /var/tmp/diff_new_pack.KNYRSF/_new 2023-09-29 21:13:29.189559536 +0200 @@ -1,7 +1,7 @@ Index: smartd.conf =================================================================== ---- smartd.conf -+++ smartd.conf +--- a/smartd.conf ++++ b/smartd.conf @@ -9,6 +9,15 @@ # device per line. Text after a hash (#) is ignored, and you may use # spaces and tabs for white space. You may use '\' to continue lines.