Compare commits

...

1 Commits
master ... f17

Author SHA1 Message Date
Parag Nemade 2b50ab3ff5 Resolves:rh:#832807: Excessive dependencies for redhat-lsb
- Resolves:rh:#832771: redhat-lsb.i686 missing for x86_64 due to new subpackages
- Resolves:rh:#806190: gethostbyaddr sets h_errno to 3, not HOST_NOT_FOUND
- Resolves:rh:#832928: redhat-lsb-4.1 requires /usr/sbin/sendmail
- Resolves:rh:#835777: Need requires libpng-compat, not libpng on F17 or rhel7
2012-07-02 19:58:21 +05:30
1 changed files with 51 additions and 42 deletions

View File

@ -43,7 +43,7 @@
Summary: Implementation of Linux Standard Base specification
Name: redhat-lsb
Version: 4.1
Release: 4%{?dist}
Release: 5%{?dist}
URL: http://www.linuxfoundation.org/collaborate/workgroups/lsb
Source0: https://fedorahosted.org/releases/r/e/redhat-lsb/%{name}-%{version}-%{srcrelease}.tar.bz2
Patch0: lsb-release-3.1-update-init-functions.patch
@ -269,6 +269,7 @@ Requires: /usr/sbin/groupmod
Requires: /usr/sbin/useradd
Requires: /usr/sbin/userdel
Requires: /usr/sbin/usermod
Requires: /usr/sbin/sendmail
Requires: redhat-lsb-submod-security%{?_isa} = %{version}
Provides: lsb-core-%{archname} = %{version}
@ -318,14 +319,11 @@ Requires: /usr/bin/fc-match
Requires: cairo%{?_isa}
Requires: freetype%{?_isa}
Requires: libjpeg-turbo%{?_isa}
%ifarch %{ix86}
Requires: libpng12.so.0
%endif
%ifarch x86_64
Requires: libpng12.so.0()(64bit)
%endif
%if %({ [ 0%{?fedora} -ge 17 -o 0%{?rhel} -ge 7 ] && echo 1; } || echo 0)
Requires: libpng-compat%{?_isa}
%else
Requires: libpng%{?_isa}
%endif
Requires: libXft%{?_isa}
Requires: libXrender%{?_isa}
# toolkit-gtk
@ -432,7 +430,7 @@ which are not required parts of the LSB Specification.
cd lsb-release-%{upstreamlsbrelver}
make
%pre
%pre core
# remove the extra symlink /bin/mailx -> /bin/mail
if [ -e /bin/mailx ]; then
if [ -L /bin/mailx ]; then
@ -440,6 +438,14 @@ if [ -e /bin/mailx ]; then
fi
fi
# restore /etc/nsswitch.conf if it is modified by redhat-lsb-4.1-4
if [ -e %{_datadir}/lsb/nsswitch.conf -a -e %{_datadir}/lsb/nsswitch.conf.orig ];then
if cmp -s %{_datadir}/lsb/nsswitch.conf /etc/nsswitch.conf;then
cat %{_datadir}/lsb/nsswitch.conf.orig >/etc/nsswitch.conf
fi
rm -f %{_datadir}/lsb/{nsswitch.conf,nsswitch.conf.orig}
fi
%install
# LSB uses /usr/lib rather than /usr/lib64 even for 64bit OS
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir} $RPM_BUILD_ROOT/%{_lib} $RPM_BUILD_ROOT%{_mandir} \
@ -552,11 +558,8 @@ install -p -m 700 redhat_lsb_trigger.%{_target_cpu} \
cp -p redhat_lsb_init $RPM_BUILD_ROOT/bin/redhat_lsb_init
%if %({ [ 0%{?fedora} -gt 17 -o 0%{?rhel} -gt 6 ] && echo 0; } || echo 1)
%triggerpostun -- glibc
if [ -x /usr/sbin/redhat_lsb_trigger.%{_target_cpu} ]; then
/usr/sbin/redhat_lsb_trigger.%{_target_cpu}
fi
%ifnarch %{ix86}
/sbin/sln %{ldso} /%{_lib}/%{lsbldso} || :
%else
@ -570,18 +573,31 @@ fi
done
fi
%endif
if ! grep -s -q '^hosts: \+files \+dns *$' /etc/nsswitch.conf;then
cat /etc/nsswitch.conf >%{_datadir}/lsb/nsswitch.conf.orig
ed -s /etc/nsswitch.conf <<EOF
/^hosts: \+files \+/s/.*/hosts: files dns/
w
q
EOF
cat /etc/nsswitch.conf > %{_datadir}/lsb/nsswitch.conf
%endif
%triggerpostun core -- glibc
if [ -x /usr/sbin/redhat_lsb_trigger.%{_target_cpu} ]; then
/usr/sbin/redhat_lsb_trigger.%{_target_cpu}
fi
%post
%if %({ [ 0%{?fedora} -gt 17 -o 0%{?rhel} -gt 6 ] && echo 1; } || echo 0)
%ifnarch %{ix86}
/sbin/sln %{ldso} /%{_lib}/%{lsbldso} || :
%else
if [ -f /emul/ia32-linux/lib/%{ldso} ]; then
for LSBVER in %{lsbsover}; do
/sbin/sln /emul/ia32-linux/lib/%{ldso} /%{_lib}/%{lsbldso}.$LSBVER || :
done
else
for LSBVER in %{lsbsover}; do
/sbin/sln %{ldso} /%{_lib}/%{lsbldso}.$LSBVER || :
done
fi
%endif
%endif
%ifarch %{ix86}
%post core
# make this softlink again for /emul
if [ -f /emul/ia32-linux/lib/%{ldso} ]; then
for LSBVER in %{lsbsover}; do
@ -589,25 +605,6 @@ fi
done
fi
%endif
if ! grep -s -q '^hosts: \+files \+dns *$' /etc/nsswitch.conf;then
cat /etc/nsswitch.conf >%{_datadir}/lsb/nsswitch.conf.orig
ed -s /etc/nsswitch.conf <<EOF
/^hosts: \+files \+/s/.*/hosts: files dns/
w
q
EOF
cat /etc/nsswitch.conf >%{_datadir}/lsb/nsswitch.conf
fi
%preun
if [ $1 -eq 0 ];then
if [ -e %{_datadir}/lsb/nsswitch.conf -a -e %{_datadir}/lsb/nsswitch.conf.orig ];then
if cmp -s %{_datadir}/lsb/nsswitch.conf /etc/nsswitch.conf;then
cat %{_datadir}/lsb/nsswitch.conf.orig >/etc/nsswitch.conf
fi
rm -f %{_datadir}/lsb/{nsswitch.conf,nsswitch.conf.orig}
fi
fi
%postun submod-security -p <lua>
os.remove("%{_datadir}/lsb/%{lsbrelver}/submodules")
@ -651,7 +648,10 @@ os.remove("%{_datadir}/lsb/%{lsbrelver}")
os.remove("%{_datadir}/lsb")
%files
%{_datadir}/lsb/
%dir %{_datadir}/lsb/
%if %({ [ 0%{?fedora} -gt 17 -o 0%{?rhel} -gt 6 ] && echo 0; } || echo 1)
/%{_lib}/*so*
%endif
%files submod-security
%{_datadir}/lsb/%{lsbrelver}/submodules/security-%{lsbrelver}-%{archname}
@ -669,7 +669,9 @@ os.remove("%{_datadir}/lsb")
#/bin/mailx
/bin/redhat_lsb_init
/usr/lib/lsb
%if %({ [ 0%{?fedora} -gt 17 -o 0%{?rhel} -gt 6 ] && echo 1; } || echo 0)
/%{_lib}/*so*
%endif
/lib/lsb*
%{_sbindir}/redhat_lsb_trigger.%{_target_cpu}
%{_datadir}/lsb/%{lsbrelver}/modules/core
@ -723,6 +725,13 @@ os.remove("%{_datadir}/lsb")
%changelog
* Mon Jul 02 2012 xning <xning AT redhat DOT com> - 4.1-5
- Resolves:rh:#832807: Excessive dependencies for redhat-lsb
- Resolves:rh:#832771: redhat-lsb.i686 missing for x86_64 due to new subpackages
- Resolves:rh:#806190: gethostbyaddr sets h_errno to 3, not HOST_NOT_FOUND
- Resolves:rh:#832928: redhat-lsb-4.1 requires /usr/sbin/sendmail
- Resolves:rh:#835777: Need requires libpng-compat, not libpng on F17 or rhel7
* Tue May 29 2012 xning <xning AT redhat DOT com> - 4.1-4
- Resolves:rh:#825261: redhat-lsb scripts blow away my /etc/nsswitch.conf