commit mlocate for openSUSE:Factory
Hello community, here is the log from the commit of package mlocate for openSUSE:Factory checked in at 2018-11-30 16:33:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mlocate (Old) and /work/SRC/openSUSE:Factory/.mlocate.new.19453 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "mlocate" Fri Nov 30 16:33:56 2018 rev:25 rq:652842 version:0.26 Changes: -------- --- /work/SRC/openSUSE:Factory/mlocate/mlocate.changes 2018-09-11 17:17:06.087428200 +0200 +++ /work/SRC/openSUSE:Factory/.mlocate.new.19453/mlocate.changes 2018-11-30 16:34:03.761231256 +0100 @@ -1,0 +2,13 @@ +Fri Nov 30 06:27:56 UTC 2018 - erictorres4@protonmail.com + +- Add systemd service and timer units [boo#1115408] +- Add rc symlinks for backwards compatibility +- Add BuildRequires for systemd-rpm-macros +- Minor correction to summary, change 'an' to 'a' +- Add commands for registering systemd unit files in install scripts +- Update files list to include systemd units +- Remove dependency on cron +- Move logic from cron script to systemd service unit +- Remove all variables except RUN_UPDATEDB_AS from sysconfig.locate + +------------------------------------------------------------------- @@ -228 +240,0 @@ - Old: ---- mlocate.cron New: ---- mlocate.service mlocate.timer ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mlocate.spec ++++++ --- /var/tmp/diff_new_pack.2nOPJ8/_old 2018-11-30 16:34:10.557222346 +0100 +++ /var/tmp/diff_new_pack.2nOPJ8/_new 2018-11-30 16:34:10.557222346 +0100 @@ -12,10 +12,9 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # - #Compat macro for new _fillupdir macro introduced in Nov 2017 %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates @@ -23,22 +22,23 @@ Name: mlocate Version: 0.26 Release: 0 -Summary: An utility for finding files by name +Summary: A utility for finding files by name License: GPL-2.0-only Group: System/Monitoring -Url: https://pagure.io/mlocate +URL: https://pagure.io/mlocate Source0: https://fedorahosted.org/releases/m/l/%{name}/%{name}-%{version}.tar.xz Source1: updatedb.conf -Source2: %{name}.cron -Source3: sysconfig.locate +Source2: sysconfig.locate # apparmor profile -Source4: usr.bin.locate -Source5: usr.bin.updatedb +Source3: usr.bin.locate +Source4: usr.bin.updatedb +Source5: mlocate.timer +Source6: mlocate.service BuildRequires: gettext-tools BuildRequires: grep BuildRequires: sed +BuildRequires: systemd-rpm-macros BuildRequires: xz -Requires: cron Requires(post): %fillup_prereq Recommends: %{name}-lang = %{version} Provides: findutils:%{_bindir}/locate @@ -84,34 +84,53 @@ # Config mkdir -p %{buildroot}%{_sysconfdir} install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir} -# Cron -mkdir -p %{buildroot}%{_sysconfdir}/cron.daily -install -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.daily # Sysconfig settings -install -D -m 644 %{SOURCE3} %{buildroot}%{_fillupdir}/sysconfig.locate +install -D -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.locate +# systemd units +install -D -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/mlocate.timer +install -D -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/mlocate.service +# rc symlink +mkdir -p %{buildroot}%{_sbindir} +ln -s /usr/sbin/service %{buildroot}/%{_sbindir}/rcmlocate # apparmor -install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/apparmor.d/usr.bin.locate -install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/apparmor.d/usr.bin.updatedb +install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/apparmor.d/usr.bin.locate +install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/apparmor.d/usr.bin.updatedb %check make check %{?_smp_mflags} +%pre +%service_add_pre mlocate.service +%service_add_pre mlocate.timer + %post %{fillup_only -n locate} +%service_add_post mlocate.service +%service_add_post mlocate.timer + +%preun +%service_del_preun mlocate.service +%service_del_preun mlocate.timer + +%postun +%service_del_postun mlocate.service +%service_del_postun mlocate.timer %files %license COPYING %doc AUTHORS ChangeLog README NEWS %config(noreplace) %{_sysconfdir}/updatedb.conf -%{_sysconfdir}/cron.daily/%{name}.cron %attr(0755,root,root) %{_bindir}/locate %{_bindir}/updatedb %{_mandir}/man*/* +%{_unitdir}/mlocate.timer +%{_unitdir}/mlocate.service %dir %{_localstatedir}/lib/mlocate %ghost %{_localstatedir}/lib/mlocate/mlocate.db %{_fillupdir}/* %dir %{_sysconfdir}/apparmor.d/ %{_sysconfdir}/apparmor.d/* +%{_sbindir}/rcmlocate %files lang -f %{name}.lang ++++++ mlocate.service ++++++ [Unit] Description=Update locate database Documentation=man:updatedb [Service] Type=oneshot ExecStart=/bin/sh -c \ "chown -R ${RUN_UPDATEDB_AS}:root /var/lib/mlocate && \ su ${RUN_UPDATEDB_AS} -c /usr/bin/updatedb" # Ensure we have proper umask bnc#941296 UMask=0022 # Alter the priority of the updatedb process Nice=19 IOSchedulingClass=2 IOSchedulingPriority=7 # Load sysconfig EnvironmentFile=/etc/sysconfig/locate ++++++ mlocate.timer ++++++ [Unit] Description=Daily locate database update Documentation=man:updatedb [Timer] OnCalendar=daily AccuracySec=12h Unit=mlocate.service Persistent=true [Install] WantedBy=timers.target ++++++ sysconfig.locate ++++++ --- /var/tmp/diff_new_pack.2nOPJ8/_old 2018-11-30 16:34:10.625222257 +0100 +++ /var/tmp/diff_new_pack.2nOPJ8/_new 2018-11-30 16:34:10.625222257 +0100 @@ -1,16 +1,9 @@ ## Path: Applications/Locate ## Description: Configuration of updatedb # -# NOTE: These variables only apply to cron updatedb service only +# NOTE: These variables only apply to systemd updatedb service only # NOTE: For the app-wide settings see /etc/updatedb.conf # -## Type: yesno -## Default: yes -# -# Should updatedb (for locate) be started by cron.daily ("yes" or "no") -# -RUN_UPDATEDB=yes - ## Type: string(nobody, root, ...) ## Default: nobody # @@ -23,21 +16,3 @@ # If you want security use RUN_UPDATEDB_AS=nobody. # RUN_UPDATEDB_AS=nobody - -## Type: integer -## Default: 19 -# nice value to run at: see -n in nice(1) -# -NICE="19" - -## Type: integer -## Default: 2 -# ionice class to run at: see -c in ionice(1) -# -IONICE_CLASS="2" - -## Type: integer -## Default: 7 -# ionice priority to run at: see -n in ionice(1) -# -IONICE_PRIORITY="7"
participants (1)
-
root