From 1b82897569fa41fedde7a388f47afe159066ee00355ba4e1d897ff3390aa3218 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 30 Jan 2021 08:05:35 +0000 Subject: [PATCH] Accepting request 867612 from home:sbrabec:branches:distconfdir-fix - Do not require libeconf-devel on products without /usr/etc. OBS-URL: https://build.opensuse.org/request/show/867612 OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=100 --- shadow.changes | 5 +++++ shadow.spec | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/shadow.changes b/shadow.changes index d1a4ee4..6c34e07 100644 --- a/shadow.changes +++ b/shadow.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 28 22:28:02 UTC 2021 - Stanislav Brabec + +- Do not require libeconf-devel on products without /usr/etc. + ------------------------------------------------------------------- Thu Jan 21 06:52:30 UTC 2021 - Thorsten Kukuk diff --git a/shadow.spec b/shadow.spec index dca2c38..352fd50 100644 --- a/shadow.spec +++ b/shadow.spec @@ -70,7 +70,10 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: libacl-devel BuildRequires: libattr-devel +# It should be %%if %%{defined no_config}, but OBS cannot handle it: +%if 0%{?suse_version} >= 1550 BuildRequires: libeconf-devel +%endif BuildRequires: libselinux-devel BuildRequires: libsemanage-devel BuildRequires: libtool @@ -266,12 +269,17 @@ test -f /etc/login.defs.rpmsave && mv -v /etc/login.defs.rpmsave /etc/login.defs %service_del_postun shadow.service shadow.timer %posttrans +%if %{defined no_config} # Migration to /usr/etc for i in pam.d/chage pam.d/chfn pam.d/chpasswd pam.d/chsh pam.d/groupadd pam.d/groupdel pam.d/groupmod pam.d/newusers pam.d/passwd pam.d/useradd pam.d/userdel pam.d/usermod; do test -f /etc/${i}.rpmsave && mv -v /etc/${i}.rpmsave /etc/${i} ||: done +%endif %posttrans -n login_defs +# rpmsave file can be created by +# - change of owning package (SLE15 SP2->SP3, Leap 15.2->15.3) +# - Migration to /usr/etc (after SLE15 and Leap 15) test -f /etc/login.defs.rpmsave && mv -v /etc/login.defs.rpmsave /etc/login.defs ||: %files -f shadow.lang