From 3e23336adc1e94d566f5e7f2a38be46567e0d1ae Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:07:56 +0100 Subject: [PATCH] added xlocale.h legacy symlink to locale.h nscd: switch to systemd [release 2.26-3mamba;Sat Dec 23 2017] --- glibc.spec | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/glibc.spec b/glibc.spec index 3f03dc3..dc03aee 100644 --- a/glibc.spec +++ b/glibc.spec @@ -108,7 +108,7 @@ Name: glibc Version: 2.26 -Release: 2mamba +Release: 3mamba Summary: The GNU libc libraries Group: System/Libraries Vendor: openmamba @@ -175,6 +175,7 @@ BuildRequires: libcap-devel %endif BuildRequires: kernelsanitisedheaders Requires: ldconfig = %{?epoch:%epoch:}%{version}-%{release} +%systemd_requires Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -610,7 +611,7 @@ cp -avrf %{glibc_headers_dir}/* %{buildroot}%{glibc_includedir} install -d %{buildroot}/var/log/nscd install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/nscd install -D -m644 %{SOURCE5} %{buildroot}%{_sysconfdir}/nscd.conf -install -D -m755 %{SOURCE6} %{buildroot}%{_initrddir}/nscd +install -D -m644 nscd/nscd.service %{buildroot}%{_unitdir}/nscd.service # work around to avoid stripping libthread_db-1.0.so for debugging %if "%{?stage1}" != "1" chmod -x %{buildroot}/%{slibdir}/libthread_db-1.0.so @@ -651,6 +652,8 @@ rm -f %{buildroot}%{_libdir}/libnsl.* %if "%{_target_platform}" == "%{_host}" # 2.26: workaround for header required by external libnss_nis install -D -m0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/mapv4v6addr.h +# legacy symlink +ln -s locale.h %{buildroot}%{_includedir}/xlocale.h %endif %if "%{?stage1}" != "1" @@ -719,9 +722,11 @@ exit 0 %post %{?multilib:multilib-}devel %install_info libc.info +: %postun %{?multilib:multilib-}devel %uninstall_info libc.info +: %posttrans %{?multilib:multilib-}i18ndata # update locale-archive for current language settings @@ -732,35 +737,30 @@ for l in ${LOCALES[*]}; do input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'` localedef -i $input -c -f $charset $locale done -exit 0 +: %pre -n nscd%{?multilib:-multilib} -if [ $1 -eq 1 ]; then - /usr/sbin/groupadd -g 65001 nscd - /usr/sbin/useradd -u 65001 -g nscd -d /dev/null nscd -s /bin/false +if [ $1 -ge 1 ]; then + /usr/sbin/groupadd -g 65001 nscd &>/dev/null || true + /usr/sbin/useradd -u 65001 -g nscd -d /dev/null nscd -s /bin/false &>/dev/null || true fi -exit 0 +%systemd_pre nscd +: %post -n nscd%{?multilib:-multilib} -if [ $1 -eq 1 ]; then - /sbin/chkconfig --add nscd - service nscd start -fi -exit 0 +%systemd_post nscd +: %preun -n nscd%{?multilib:-multilib} +%systemd_preun nscd if [ $1 -eq 0 ]; then - service nscd stop - /sbin/chkconfig --del nscd /usr/sbin/userdel nscd fi -exit 0 +: %postun -n nscd%{?multilib:-multilib} -if [ $1 -eq 1 ]; then - service nscd restart -fi -exit 0 +%systemd_postun_with_restart nscd +: %if "%{_target_platform}" == "%{_host}" %files %{?multilib:multilib} @@ -904,13 +904,13 @@ exit 0 %files -n nscd%{?multilib:-multilib} %defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/logrotate.d/nscd +%config(noreplace) %{_sysconfdir}/nscd.conf +%{_unitdir}/nscd.service %if "%{multilib}" != "1" %{_sbindir}/nscd %endif %attr(0755,nscd,nscd) /var/log/nscd -%config(noreplace) %{_sysconfdir}/logrotate.d/nscd -%config(noreplace) %{_sysconfdir}/nscd.conf -%attr(0755,root,root) %{_initrddir}/nscd %files -n timezone%{?multilib:-multilib} %defattr(-,root,root) @@ -933,6 +933,10 @@ exit 0 %endif %changelog +* Sat Dec 23 2017 Silvan Calarco 2.26-3mamba +- added xlocale.h legacy symlink to locale.h +- nscd: switch to systemd + * Sat Sep 30 2017 Silvan Calarco 2.26-2mamba - rebuilt without --enable-obsolete-rpc