SHA256
1
0
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:
Dominique Leuenberger 2022-03-08 19:32:21 +00:00 committed by Git OBS Bridge
commit 1d4d2e53b5
2 changed files with 27 additions and 3 deletions

View File

@ -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> Fri Aug 20 20:11:49 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>

View File

@ -1,7 +1,7 @@
# #
# spec file for package pcfclock # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -15,10 +15,13 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/ # 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 %define _modprobedir /lib/modprobe.d
%endif %endif
%global modprobe_d_files 50-pcfclock.conf
Name: pcfclock Name: pcfclock
Version: 0.44 Version: 0.44
Release: 0 Release: 0
@ -111,10 +114,24 @@ mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}
%endif %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 %post
# Create devices nodes at installation time # Create devices nodes at installation time
systemd-tmpfiles --create %{_tmpfilesdir}/pcfclock.conf 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 %files
%defattr(-,root,root) %defattr(-,root,root)
%doc README %doc README