SHA256
3
0
forked from pool/shadow

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
This commit is contained in:
Marcus Meissner 2021-01-30 08:05:35 +00:00 committed by Git OBS Bridge
parent a4ea6b15c3
commit 1b82897569
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 28 22:28:02 UTC 2021 - Stanislav Brabec <sbrabec@suse.com>
- Do not require libeconf-devel on products without /usr/etc.
-------------------------------------------------------------------
Thu Jan 21 06:52:30 UTC 2021 - Thorsten Kukuk <kukuk@suse.com>

View File

@ -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