Accepting request 896868 from home:gmbr3:Active

- Change to using systemd-sysusers
- Remove otherproviders, not needed anymore

OBS-URL: https://build.opensuse.org/request/show/896868
OBS-URL: https://build.opensuse.org/package/show/network:time/chrony?expand=0&rev=99
This commit is contained in:
Reinhard Max 2021-06-07 11:01:00 +00:00 committed by Git OBS Bridge
parent cde7f90ece
commit ac480f5e95
3 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 2 09:10:41 UTC 2021 - Callum Farmer <gmbr3@opensuse.org>
- Change to using systemd-sysusers
- Remove otherproviders, not needed anymore
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 1 12:53:23 UTC 2021 - Reinhard Max <max@suse.com> Tue Jun 1 12:53:23 UTC 2021 - Reinhard Max <max@suse.com>

View File

@ -45,6 +45,7 @@ Source10: https://github.com/mlichvar/clknetsim/archive/%{clknetsim_ver}/c
Source11: chrony-tmpfiles Source11: chrony-tmpfiles
Source12: pool.conf.suse Source12: pool.conf.suse
Source13: pool.conf.opensuse Source13: pool.conf.opensuse
Source14: system-user-chrony.conf
Source99: series Source99: series
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0: chrony-config.patch Patch0: chrony-config.patch
@ -65,10 +66,10 @@ BuildRequires: pps-tools-devel
BuildRequires: timezone BuildRequires: timezone
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
BuildRequires: rubygem(asciidoctor) BuildRequires: rubygem(asciidoctor)
BuildRequires: sysuser-tools
Recommends: logrotate Recommends: logrotate
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
Requires(pre): %{_sbindir}/groupadd %sysusers_requires
Requires(pre): %{_sbindir}/useradd
Requires: %name-pool Requires: %name-pool
Recommends: %name-pool-nonempty Recommends: %name-pool-nonempty
Provides: ntp-daemon Provides: ntp-daemon
@ -105,7 +106,7 @@ Summary: Chrony preconfiguration for SUSE
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: %name-pool = %version Provides: %name-pool = %version
Provides: %name-pool-nonempty Provides: %name-pool-nonempty
Conflicts: otherproviders(%name-pool) Conflicts: %name-pool
Requires: %name = %version Requires: %name = %version
BuildArch: noarch BuildArch: noarch
RemovePathPostfixes: .suse RemovePathPostfixes: .suse
@ -119,7 +120,7 @@ Summary: Chrony preconfiguration for openSUSE
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: %name-pool = %version Provides: %name-pool = %version
Provides: %name-pool-nonempty Provides: %name-pool-nonempty
Conflicts: otherproviders(%name-pool) Conflicts: %name-pool
Requires: %name = %version Requires: %name = %version
BuildArch: noarch BuildArch: noarch
Supplements: (chrony and branding-openSUSE) Supplements: (chrony and branding-openSUSE)
@ -133,7 +134,7 @@ default.
Summary: Empty pool preconfiguration for chrony Summary: Empty pool preconfiguration for chrony
Group: Productivity/Networking/Other Group: Productivity/Networking/Other
Provides: %name-pool = %version Provides: %name-pool = %version
Conflicts: otherproviders(%name-pool) Conflicts: %name-pool
Requires: %name = %version Requires: %name = %version
BuildArch: noarch BuildArch: noarch
Supplements: (chrony and branding-SLE) Supplements: (chrony and branding-SLE)
@ -183,6 +184,7 @@ export LDFLAGS="-pie -Wl,-z,relro,-z,now"
--with-sendmail=%{_sbindir}/sendmail \ --with-sendmail=%{_sbindir}/sendmail \
--enable-ntp-signd --enable-ntp-signd
make %{?_smp_mflags} all docs make %{?_smp_mflags} all docs
%sysusers_generate_pre %{SOURCE14} chrony
%install %install
%make_install %make_install
@ -229,6 +231,9 @@ touch %{buildroot}%{_localstatedir}/lib/chrony/{drift,rtc}
install -Dpm 644 %{SOURCE12} %{SOURCE13} %{buildroot}/etc/chrony.d install -Dpm 644 %{SOURCE12} %{SOURCE13} %{buildroot}/etc/chrony.d
touch %{buildroot}/etc/chrony.d/pool.conf.empty touch %{buildroot}/etc/chrony.d/pool.conf.empty
mkdir -p %{buildroot}%{_sysusersdir}
install -m 0644 %{SOURCE14} %{buildroot}%{_sysusersdir}/
%if %{with testsuite} %if %{with testsuite}
%ifnarch %ix86 %ifnarch %ix86
%check %check
@ -240,9 +245,7 @@ make %{?_smp_mflags} check
%endif %endif
%endif %endif
%pre %pre -f chrony.pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || useradd -r -g %{name} -d "%{_localstatedir}/lib/chrony" -s /bin/false -c "Chrony Daemon" %{name}
%service_add_pre chronyd.service chrony-wait.service %service_add_pre chronyd.service chrony-wait.service
%preun %preun
@ -268,6 +271,7 @@ getent passwd %{name} >/dev/null || useradd -r -g %{name} -d "%{_localstatedir}/
%dir %{_sysconfdir}/dhcp/ %dir %{_sysconfdir}/dhcp/
%dir %{_sysconfdir}/dhcp/dhclient.d/ %dir %{_sysconfdir}/dhcp/dhclient.d/
%{_sysconfdir}/dhcp/dhclient.d/chrony.sh %{_sysconfdir}/dhcp/dhclient.d/chrony.sh
%{_sysusersdir}/system-user-chrony.conf
%{_bindir}/chronyc %{_bindir}/chronyc
%{_sbindir}/chronyd %{_sbindir}/chronyd
%{_libexecdir}/%name %{_libexecdir}/%name

2
system-user-chrony.conf Normal file
View File

@ -0,0 +1,2 @@
#Type Name ID GECOS Home directory Shell
u chrony - "Chrony Daemon" /var/lib/chrony -