From 554abb20dec7ef9a9071c65365684726d34aee61d2363a1f71a55bba94854e17 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 23 Nov 2012 15:16:20 +0000 Subject: [PATCH 1/3] Accepting request 142601 from home:matz2:branches:Base:System - Fix getaddrinfo-ipv6-sanity.diff to apply again. OBS-URL: https://build.opensuse.org/request/show/142601 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=231 --- getaddrinfo-ipv6-sanity.diff | 22 +++++++++++----------- glibc.changes | 5 +++++ glibc.spec | 2 +- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/getaddrinfo-ipv6-sanity.diff b/getaddrinfo-ipv6-sanity.diff index 28eb26b..dfd99d3 100644 --- a/getaddrinfo-ipv6-sanity.diff +++ b/getaddrinfo-ipv6-sanity.diff @@ -1,8 +1,8 @@ -diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c -index 1a023f9..c8af8b9 100644 ---- a/sysdeps/posix/getaddrinfo.c -+++ b/sysdeps/posix/getaddrinfo.c -@@ -269,7 +269,7 @@ extern service_user *__nss_hosts_database attribute_hidden; +Index: glibc-2.16.90/sysdeps/posix/getaddrinfo.c +=================================================================== +--- glibc-2.16.90.orig/sysdeps/posix/getaddrinfo.c 2012-11-20 03:45:45.000000000 +0100 ++++ glibc-2.16.90/sysdeps/posix/getaddrinfo.c 2012-11-23 15:32:33.000000000 +0100 +@@ -269,7 +269,7 @@ extern service_user *__nss_hosts_databas static int gaih_inet (const char *name, const struct gaih_service *service, const struct addrinfo *req, struct addrinfo **pai, @@ -11,10 +11,10 @@ index 1a023f9..c8af8b9 100644 { const struct gaih_typeproto *tp = gaih_inet_typeproto; struct gaih_servtuple *st = (struct gaih_servtuple *) &nullserv; -@@ -832,7 +832,10 @@ gaih_inet (const char *name, const struct gaih_service *service, - no_data = 0; - nss_gethostbyname4_r fct4 - = __nss_lookup_function (nip, "gethostbyname4_r"); +@@ -839,7 +839,10 @@ gaih_inet (const char *name, const struc + if (req->ai_family == PF_UNSPEC) + fct4 = __nss_lookup_function (nip, "gethostbyname4_r"); + - if (fct4 != NULL) + /* If we don't want ipv6, don't use gethostbyname4_r, + as it's using T_UNSPEC to libc_res_nsearch, which always @@ -23,7 +23,7 @@ index 1a023f9..c8af8b9 100644 { int herrno; -@@ -935,7 +938,7 @@ gaih_inet (const char *name, const struct gaih_service *service, +@@ -942,7 +945,7 @@ gaih_inet (const char *name, const struc if (fct != NULL) { if (req->ai_family == AF_INET6 @@ -32,7 +32,7 @@ index 1a023f9..c8af8b9 100644 { gethosts (AF_INET6, struct in6_addr); no_inet6_data = no_data; -@@ -2418,7 +2421,11 @@ getaddrinfo (const char *name, const char *service, +@@ -2462,7 +2465,11 @@ getaddrinfo (const char *name, const cha if (hints->ai_family == AF_UNSPEC || hints->ai_family == AF_INET || hints->ai_family == AF_INET6) { diff --git a/glibc.changes b/glibc.changes index 8bdb31c..7049d70 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 23 14:33:37 UTC 2012 - matz@suse.com + +- Fix getaddrinfo-ipv6-sanity.diff to apply again. + ------------------------------------------------------------------- Tue Nov 20 08:06:49 UTC 2012 - aj@suse.de diff --git a/glibc.spec b/glibc.spec index b0f3c98..8e8085b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -466,7 +466,7 @@ rm nscd/s-stamp %patch300 -p1 %patch301 -p1 -#%patch302 -p1 +%patch302 -p1 %patch304 -p1 %patch305 -p1 %patch306 -p1 From 31d00d149118ef3388d69d9c1049c877b5e44412a6eb4e38b0be7ef93ed5f184 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 24 Nov 2012 14:18:54 +0000 Subject: [PATCH 2/3] Accepting request 142683 from home:a_jaeger:my-factory-packages Remove nscd init script, use systemd files. OBS-URL: https://build.opensuse.org/request/show/142683 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=232 --- glibc.changes | 5 +++++ glibc.spec | 22 +++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/glibc.changes b/glibc.changes index 7049d70..89f9887 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Nov 24 13:48:40 UTC 2012 - aj@suse.de + +- Remove nscd init script, use systemd files. + ------------------------------------------------------------------- Fri Nov 23 14:33:37 UTC 2012 - matz@suse.com diff --git a/glibc.spec b/glibc.spec index 8e8085b..c9bd842 100644 --- a/glibc.spec +++ b/glibc.spec @@ -33,6 +33,7 @@ BuildRequires: fdupes BuildRequires: libselinux-devel BuildRequires: makeinfo BuildRequires: xz +BuildRequires: pkgconfig(systemd) %if %{with glibc_run_testsuite} BuildRequires: gcc-c++ BuildRequires: libstdc++-devel @@ -129,7 +130,6 @@ Source: glibc-%{version}-%{git_id}.tar.xz Source3: noversion.tar.bz2 Source4: manpages.tar.bz2 Source5: nsswitch.conf -Source6: nscd.init Source7: bindresvport.blacklist Source8: glibc_post_upgrade.c Source9: glibc.rpmlintrc @@ -315,12 +315,9 @@ Locale data for the internationalisation features of the GNU C library. Summary: Name Service Caching Daemon License: GPL-2.0+ Group: System/Daemons -Provides: aaa_base:/etc/init.d/nscd Provides: glibc:/usr/sbin/nscd Requires: glibc = %{version} -Requires(preun): %insserv_prereq -Requires(post): %insserv_prereq -Requires(postun): %insserv_prereq +%{?systemd_requires} %description -n nscd Nscd caches name service lookups and can dramatically improve @@ -901,8 +898,7 @@ popd cp nscd/nscd.conf %{buildroot}/etc mkdir -p %{buildroot}/etc/init.d -install -m 755 %{SOURCE6} %{buildroot}/etc/init.d/nscd -ln -sf /etc/init.d/nscd %{buildroot}/usr/sbin/rcnscd +ln -sf /sbin/service %{buildroot}/usr/sbin/rcnscd mkdir -p %{buildroot}/var/run/nscd touch %{buildroot}/var/run/nscd/{passwd,group,hosts} touch %{buildroot}/var/run/nscd/{socket,nscd.pid} @@ -1000,12 +996,14 @@ done %postun info %install_info_delete --info-dir=%{_infodir} %{_infodir}/libc.info.gz -%preun -n nscd +%pre -n nscd +%service_add_pre nscd.service -%stop_on_removal nscd +%preun -n nscd +%service_del_preun nscd.service %post -n nscd -%{insserv_force_if_yast nscd} +%service_add_post nscd.service mkdir -p /var/run/nscd # Previously we had nscd.socket, remove it test -x /usr/bin/systemctl && /usr/bin/systemctl stop nscd.socket || : @@ -1015,8 +1013,7 @@ rm -f /etc/systemd/system/sockets.target.wants/nscd.socket exit 0 %postun -n nscd -%restart_on_update nscd -%insserv_cleanup +%service_del_postun nscd.service exit 0 ####################################################################### @@ -1243,7 +1240,6 @@ exit 0 %files -n nscd %defattr(-,root,root) %config(noreplace) /etc/nscd.conf -%config /etc/init.d/nscd %{_sbindir}/nscd %{_sbindir}/rcnscd /lib/systemd/system/nscd.service From 97da09b03051e6613d5ce851a80718ae831d3ac4f579491510a0d1e4389fe07c Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 24 Nov 2012 21:05:14 +0000 Subject: [PATCH 3/3] Accepting request 142717 from home:a_jaeger:my-factory-packages Remove nscd init script, use systemd files. OBS-URL: https://build.opensuse.org/request/show/142717 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=233 --- nscd.init | 125 ------------------------------------------------------ 1 file changed, 125 deletions(-) delete mode 100644 nscd.init diff --git a/nscd.init b/nscd.init deleted file mode 100644 index 52c960e..0000000 --- a/nscd.init +++ /dev/null @@ -1,125 +0,0 @@ -#! /bin/sh -# Copyright (c) 1995-2004 SuSE Linux AG, Nuernberg, Germany. -# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany. -# All rights reserved. -# -# Author: Ruediger Oertel -# Thorsten Kukuk -# -# Please send feedback to http://www.suse.de/feedback -# -# init.d/nscd -# -# and symbolic its link -# -# /usr/sbin/rcnscd -# -# System startup script for the NIS daemon -# -### BEGIN INIT INFO -# Provides: nscd -# Required-Start: $remote_fs $time -# Should-Start: $syslog $named winbind -# Should-Stop: $null -# Required-Stop: $null -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Start Name Service Cache Daemon -# Description: Start Name Service Cache Daemon -### END INIT INFO - -# Source SuSE config -. /etc/rc.status - -NSCD_BIN=/usr/sbin/nscd -test -x $NSCD_BIN || { echo "$NSCD_BIN not installed"; - if [ "$1" = "stop" ]; then exit 0; else exit 5; fi; } - -NSCD_CONFIG=/etc/nscd.conf -test -r $NSCD_CONFIG || { echo "$NSCD_CONFIG not existing"; - if [ "$1" = "stop" ]; then exit 0; else exit 6; fi; } - -NSCD_PID=/var/run/nscd/nscd.pid - -# Shell functions sourced from /etc/rc.status: -# rc_check check and set local and overall rc status -# rc_status check and set local and overall rc status -# rc_status -v ditto but be verbose in local rc status -# rc_status -v -r ditto and clear the local rc status -# rc_failed set local and overall rc status to failed -# rc_reset clear local rc status (overall remains) -# rc_exit exit appropriate to overall rc status - -# First reset status of this service -rc_reset - -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - misc error -# 2 - invalid or excess args -# 3 - unimplemented feature (e.g. reload) -# 4 - insufficient privilege -# 5 - program not installed -# 6 - program not configured -# - -case "$1" in - start) - echo -n "Starting Name Service Cache Daemon" - # /var/run might be on tmpfs - [ -d /var/run/nscd ] || mkdir /var/run/nscd - /sbin/startproc -p $NSCD_PID $NSCD_BIN - rc_status -v - ;; - stop) - echo -n "Shutting down Name Service Cache Daemon" - /sbin/killproc -p $NSCD_PID -TERM $NSCD_BIN - # if nscd does not run as root, it cannot remove this files: - rm -f /var/run/nscd/socket $NSCD_PID - rc_status -v - ;; - try-restart|condrestart) - ## RH has a similar command named condrestart. - if test "$1" = "condrestart"; then - echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}" - fi - $0 status - if test $? = 0; then - $0 restart - else - rc_reset # Not running is not a failure. - fi - rc_status - ;; - restart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - $0 stop - $0 start - rc_status - ;; - force-reload) - echo "Reload Name Service Cache Daemon" - $0 try-restart - rc_status - ;; - reload) - # nscd does not support SIGHUP, so fail. - echo -n "Reload Name Service Cache Daemon" - rc_failed 3 - rc_status -v - ;; - status) - echo -n "Checking for Name Service Cache Daemon: " - /sbin/checkproc -p $NSCD_PID $NSCD_BIN - rc_status -v - ;; - probe) - test $NSCD_CONFIG -nt $NSCD_PID && echo restart - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" - exit 1 - ;; -esac -rc_exit