forked from pool/patch2mail
Accepting request 1133612 from system:packagemanager
OBS-URL: https://build.opensuse.org/request/show/1133612 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/patch2mail?expand=0&rev=18
This commit is contained in:
commit
836d3cc8d2
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 3 18:00:17 UTC 2023 - Martin Schreiner <martin.schreiner@suse.com>
|
||||||
|
|
||||||
|
- Migrate from cron to systemd-timers.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 20 11:26:06 CEST 2019 - kukuk@suse.de
|
Tue Aug 20 11:26:06 CEST 2019 - kukuk@suse.de
|
||||||
|
|
||||||
|
17
patch2mail.service
Normal file
17
patch2mail.service
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Automatic execution of patch2mail
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# added automatically, for details please see
|
||||||
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
# end of automatic additions
|
||||||
|
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/patch2mail
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package patch2mail
|
# spec file for package patch2mail
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2023 SUSE LLC
|
||||||
# Copyright (c) 2008-2015 Christian Boltz
|
# Copyright (c) 2008-2015 Christian Boltz
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -25,25 +25,19 @@
|
|||||||
Name: patch2mail
|
Name: patch2mail
|
||||||
Version: 1.1.2
|
Version: 1.1.2
|
||||||
Release: 0
|
Release: 0
|
||||||
#
|
|
||||||
#
|
|
||||||
Summary: Patch and package update notification via mail
|
Summary: Patch and package update notification via mail
|
||||||
#BuildRequires: bash
|
|
||||||
#
|
|
||||||
#Url: http://blog.cboltz.de/plugin/tag/patch2mail
|
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
Url: https://github.com/openSUSE/zypp-utils/tree/master/patch2mail
|
URL: https://github.com/openSUSE/zypp-utils/tree/master/patch2mail
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
#
|
Source1: %{name}.service
|
||||||
|
Source2: %{name}.timer
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: cron
|
|
||||||
Requires: /bin/hostname
|
Requires: /bin/hostname
|
||||||
Requires: /bin/rm
|
Requires: /bin/rm
|
||||||
Requires: /usr/bin/xsltproc
|
Requires: /usr/bin/xsltproc
|
||||||
Requires: cron
|
|
||||||
Requires: grep
|
Requires: grep
|
||||||
Requires: mail
|
Requires: mail
|
||||||
Requires: mktemp
|
Requires: mktemp
|
||||||
@ -66,36 +60,35 @@ if any patches or updated packages (configureable) are available.
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_datadir}/%{name}
|
%{__install} -d -m 0755 %{buildroot}%{_datadir}/%{name}
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_sysconfdir}/cron.daily
|
|
||||||
%{__install} -d -m 0755 %{buildroot}%{_fillupdir}/
|
%{__install} -d -m 0755 %{buildroot}%{_fillupdir}/
|
||||||
|
%{__install} -D -m 0644 %{SOURCE1} %{buildroot}/%{_unitdir}/%{name}.service
|
||||||
|
%{__install} -D -m 0644 %{SOURCE2} %{buildroot}/%{_unitdir}/%{name}.timer
|
||||||
|
%{__install} -D -m 0755 patch2mail %{buildroot}%{_bindir}/patch2mail
|
||||||
|
%{__install} -m 0644 patch2mail.sysconfig %{buildroot}%{_fillupdir}/sysconfig.patch2mail
|
||||||
|
|
||||||
%{__install} -m 0644 patch2mail.xsl %{buildroot}%{_datadir}/%{name}/patch2mail.xsl
|
%{__install} -m 0644 patch2mail.xsl %{buildroot}%{_datadir}/%{name}/patch2mail.xsl
|
||||||
%if 0%{?suse_version} < 1030
|
%if 0%{?suse_version} < 1030
|
||||||
%{__install} -m 0644 patch2mail.xsl_10.2 %{buildroot}%{_datadir}/%{name}/patch2mail.xsl
|
%{__install} -m 0644 patch2mail.xsl_10.2 %{buildroot}%{_datadir}/%{name}/patch2mail.xsl
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%{__install} -m 0755 patch2mail %{buildroot}%{_sysconfdir}/cron.daily/patch2mail
|
%pre
|
||||||
%if 0%{?suse_version} < 1110
|
%service_add_pre %{name}.service %{name}.timer
|
||||||
%{__install} -m 0755 patch2mail_11.0 %{buildroot}%{_sysconfdir}/cron.daily/patch2mail
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} < 1100
|
|
||||||
%{__install} -m 0755 patch2mail_10.3 %{buildroot}%{_sysconfdir}/cron.daily/patch2mail
|
|
||||||
%endif
|
|
||||||
%{__install} -m 0644 patch2mail.sysconfig %{buildroot}%{_fillupdir}/sysconfig.patch2mail
|
|
||||||
|
|
||||||
echo ==== Buildroot: %{buildroot} ====
|
%preun
|
||||||
find %{buildroot}
|
%service_del_preun %{name}.service %{name}.timer
|
||||||
echo ================================
|
|
||||||
|
|
||||||
%clean
|
|
||||||
%{__rm} -rf %{buildroot}
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_only -n patch2mail}
|
%{fillup_only -n patch2mail}
|
||||||
|
%service_add_post %{name}.service %{name}.timer
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun %{name}.service %{name}.timer
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_sysconfdir}/cron.daily/%{name}
|
%{_bindir}/%{name}
|
||||||
|
%{_unitdir}/%{name}.service
|
||||||
|
%{_unitdir}/%{name}.timer
|
||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
%{_fillupdir}/sysconfig.patch2mail
|
%{_fillupdir}/sysconfig.patch2mail
|
||||||
%doc README COPYING
|
%doc README COPYING
|
||||||
|
10
patch2mail.timer
Normal file
10
patch2mail.timer
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Automatic execution of patch2mail
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Daily
|
||||||
|
AccuracySec=1h
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
Loading…
Reference in New Issue
Block a user