diff --git a/util-linux.spec b/util-linux.spec index 7b57def..9d3e52b 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -339,9 +339,6 @@ mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps} -mkdir -p ${RPM_BUILD_ROOT}/var/log -touch ${RPM_BUILD_ROOT}/var/log/lastlog -chmod 0644 ${RPM_BUILD_ROOT}/var/log/lastlog # install util-linux %make_install @@ -434,24 +431,6 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%post -# only for minimal buildroots without /var/log -[ -d /var/log ] || mkdir -p /var/log -touch /var/log/lastlog -chown root:root /var/log/lastlog -chmod 0644 /var/log/lastlog -# Fix the file context, do not use restorecon -if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - SECXT=$( /usr/sbin/matchpathcon -n /var/log/lastlog 2> /dev/null ) - if [ -n "$SECXT" ]; then - # Selinux enabled, but without policy? It's true for buildroots - # without selinux stuff on host machine with enabled selinux. - # We don't want to use any RPM dependence on selinux policy for - # matchpathcon(2). SELinux policy should be optional. - /usr/bin/chcon "$SECXT" /var/log/lastlog >/dev/null 2>&1 || : - fi -fi - %post -n util-linux-core if [ ! -L /etc/mtab ]; then ln -sf ../proc/self/mounts /etc/mtab || : @@ -517,8 +496,6 @@ fi %attr(755,root,root) %{_bindir}/login %attr(2755,root,tty) %{_bindir}/write -%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog - %{_unitdir}/fstrim.* %{_bindir}/cal