forked from pool/pcfclock
Accepting request 960191 from network:time
OBS-URL: https://build.opensuse.org/request/show/960191 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcfclock?expand=0&rev=27
This commit is contained in:
commit
1d4d2e53b5
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 7 20:05:06 UTC 2022 - Martin Wilck <mwilck@suse.com>
|
||||
|
||||
- use /lib/modprobe.d in 15.3, too
|
||||
- Add code for safe modprobe.d migration
|
||||
(https://en.opensuse.org/openSUSE:Packaging_UsrEtc)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 20 20:11:49 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package pcfclock
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -15,10 +15,13 @@
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%if 0%{?suse_version} < 1550 && 0%{?sle_version} < 150300
|
||||
# systemd-rpm-macros(or kmod) is wrong in 15.2
|
||||
|
||||
%if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150300
|
||||
# systemd-rpm-macros is wrong in 15.3 and below
|
||||
%define _modprobedir /lib/modprobe.d
|
||||
%endif
|
||||
%global modprobe_d_files 50-pcfclock.conf
|
||||
|
||||
Name: pcfclock
|
||||
Version: 0.44
|
||||
Release: 0
|
||||
@ -111,10 +114,24 @@ mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||
install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}
|
||||
%endif
|
||||
|
||||
%pre
|
||||
# Avoid restoring outdated stuff in posttrans
|
||||
for _f in %{?modprobe_d_files}; do
|
||||
[ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
|
||||
mv -f "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}.rpmsave.old" || :
|
||||
done
|
||||
|
||||
%post
|
||||
# Create devices nodes at installation time
|
||||
systemd-tmpfiles --create %{_tmpfilesdir}/pcfclock.conf
|
||||
|
||||
%posttrans
|
||||
# Migration of modprobe.conf files to _modprobedir
|
||||
for _f in %{?modprobe_d_files}; do
|
||||
[ ! -f "/etc/modprobe.d/${_f}.rpmsave" ] || \
|
||||
mv -fv "/etc/modprobe.d/${_f}.rpmsave" "/etc/modprobe.d/${_f}" || :
|
||||
done
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README
|
||||
|
Loading…
Reference in New Issue
Block a user