From 73548df098c9fc481c83643fea7d2a4ae483bd1a07932bf15bdd6fbbb5901027 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 7 May 2020 09:13:48 +0000 Subject: [PATCH 1/5] Accepting request 800973 from home:lnussel:branches:Base:System - install nsswitch.conf in /usr - package gai.conf as %doc only. The default config is empty so not needed. - move gconv modules to separate subpackage OBS-URL: https://build.opensuse.org/request/show/800973 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=559 --- baselibs.conf | 4 +++- glibc-nsswitch-usr.diff | 15 +++++++++++++++ glibc.changes | 7 +++++++ glibc.spec | 29 ++++++++++++++++++++++++----- 4 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 glibc-nsswitch-usr.diff diff --git a/baselibs.conf b/baselibs.conf index 5840700..5d7b420 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -6,13 +6,15 @@ glibc targettype ia32 +/etc/ld.so.conf targettype ia32 "/lib/ld-linux.so.2 -> /lib/ld-linux.so.2" prereq -glibc-x86 + recommends glibc-gconv-modules- +/usr/lib/getconf/[^g] +/usr/sbin/iconvconfig -> /usr/sbin/iconvconfig- -glibc-locale-base +glibc-gconv-modules arch i586 block! +/usr/lib(64)?/gconv/gconv-modules targettype x86 -/usr/lib(64)?/gconv/gconv-modules obsoletes "glibc-locale-" + provides "glibc-locale-base-:%{_libdir}/gconv/gconv-modules" post "/usr/sbin/iconvconfig-" glibc-devel requires "glibc- = %version" diff --git a/glibc-nsswitch-usr.diff b/glibc-nsswitch-usr.diff new file mode 100644 index 0000000..0c35677 --- /dev/null +++ b/glibc-nsswitch-usr.diff @@ -0,0 +1,15 @@ +Index: glibc-2.31/nss/nsswitch.c +=================================================================== +--- glibc-2.31.orig/nss/nsswitch.c ++++ glibc-2.31/nss/nsswitch.c +@@ -134,6 +134,10 @@ __nss_database_lookup2 (const char *data + /* Read config file. */ + service_table = nss_parse_file (_PATH_NSSWITCH_CONF); + ++ /* retry os vendor provided one */ ++ if (service_table == NULL) ++ service_table = nss_parse_file ("/usr" _PATH_NSSWITCH_CONF); ++ + /* Test whether configuration data is available. */ + if (service_table != NULL) + { diff --git a/glibc.changes b/glibc.changes index e4fd004..52d50d0 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Apr 23 12:02:11 UTC 2020 - Ludwig Nussel + +- install nsswitch.conf in /usr +- package gai.conf as %doc only. The default config is empty so not needed. +- move gconv modules to separate subpackage + ------------------------------------------------------------------- Mon Apr 20 12:43:19 UTC 2020 - Andreas Schwab diff --git a/glibc.spec b/glibc.spec index 361f040..68d8da8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -196,6 +196,7 @@ Provides: ld-linux.so.3(GLIBC_2.4) %endif Requires(pre): filesystem Recommends: glibc-extra +Recommends: glibc-gconv-modules Provides: rtld(GNU_HASH) %endif %if %{build_utils} @@ -235,6 +236,8 @@ Patch14: glibc-bindresvport-blacklist.diff Patch15: glibc-2.3.90-langpackdir.diff # PATCH-FEATURE-SLE Use nscd user for nscd Patch19: nscd-server-user.patch +# PATCH-FEATURE-SLE read nsswich.conf from /usr +Patch20: glibc-nsswitch-usr.diff ### Locale related patches # PATCH-FIX-OPENSUSE Add additional locales @@ -351,6 +354,16 @@ Requires: glibc = %{version} Locale data for the internationalisation features of the GNU C library. This package contains only the U.S. English locale. +%package gconv-modules +Summary: Gconv data files +License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later +Group: System/Libraries +Requires: glibc = %{version} +Provides: glibc-locale-base:%{_libdir}/gconv/gconv-modules + +%description gconv-modules +Gconv plugins for various code pages + %package locale Summary: Locale Data for Localized Programs License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later @@ -460,6 +473,7 @@ makedb: A program to create a database for nss %patch14 -p1 %patch15 -p1 %patch19 -p1 +%patch20 -p1 %patch100 -p1 %patch102 -p1 @@ -833,8 +847,8 @@ rm -rf %{buildroot}%{_datadir}/locale/*/ # Miscelanna: install -m 644 %{SOURCE7} %{buildroot}/etc -install -m 644 %{SOURCE5} %{buildroot}/etc -install -m 644 posix/gai.conf %{buildroot}/etc +install -D -m 644 %{SOURCE5} %{buildroot}/usr/etc/nsswitch.conf +install -m 644 /dev/null %{buildroot}/etc/nsswitch.conf mkdir -p %{buildroot}/etc/default install -m 644 nis/nss %{buildroot}/etc/default/ @@ -1045,7 +1059,7 @@ end %postun -p /sbin/ldconfig -%post locale-base +%post gconv-modules /usr/sbin/iconvconfig %post info @@ -1084,8 +1098,10 @@ exit 0 %config /etc/ld.so.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache %config(noreplace) /etc/rpc -%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf -%verify(not md5 size mtime) %config(noreplace) /etc/gai.conf +%ghost %config(noreplace) /etc/nsswitch.conf +/usr/etc/nsswitch.conf +%ghost %config(noreplace) /etc/gai.conf +%doc posix/gai.conf %config(noreplace) /etc/default/nss %doc %{_mandir}/man1/gencat.1.gz %doc %{_mandir}/man1/getconf.1.gz @@ -1228,6 +1244,9 @@ exit 0 %{_prefix}/lib/locale/C.utf8 %{_prefix}/lib/locale/en_US.utf8 %endif + +%files gconv-modules +%defattr(-,root,root) %dir %{_libdir}/gconv %{_libdir}/gconv/*.so %{_libdir}/gconv/gconv-modules From b33d15110a81acc10da1467744a7a5ce1c3a3cca3f301814010f1b3ffae7a1e5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 7 May 2020 09:25:36 +0000 Subject: [PATCH 2/5] OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=560 --- glibc.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/glibc.changes b/glibc.changes index 52d50d0..01712bf 100644 --- a/glibc.changes +++ b/glibc.changes @@ -2,6 +2,7 @@ Thu Apr 23 12:02:11 UTC 2020 - Ludwig Nussel - install nsswitch.conf in /usr +- glibc-nsswitch-usr.diff: read nsswich.conf from /usr - package gai.conf as %doc only. The default config is empty so not needed. - move gconv modules to separate subpackage From 0921aeb8746e051a68040e5912abff81f751ca433328cb93f529816b6b730110 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 7 May 2020 09:27:49 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=561 --- baselibs.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baselibs.conf b/baselibs.conf index 5d7b420..8326f6a 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -6,7 +6,7 @@ glibc targettype ia32 +/etc/ld.so.conf targettype ia32 "/lib/ld-linux.so.2 -> /lib/ld-linux.so.2" prereq -glibc-x86 - recommends glibc-gconv-modules- + recommends "glibc-gconv-modules-" +/usr/lib/getconf/[^g] +/usr/sbin/iconvconfig -> /usr/sbin/iconvconfig- glibc-gconv-modules From 7f8046cfb0e74d04944c9017cfbf6800b62cdf7bd5aede42b952fc5747d0ef42 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 7 May 2020 10:31:57 +0000 Subject: [PATCH 4/5] osc copypac from project:Base:System package:glibc revision:558 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=562 --- baselibs.conf | 4 +--- glibc-nsswitch-usr.diff | 15 --------------- glibc.changes | 8 -------- glibc.spec | 29 +++++------------------------ 4 files changed, 6 insertions(+), 50 deletions(-) delete mode 100644 glibc-nsswitch-usr.diff diff --git a/baselibs.conf b/baselibs.conf index 8326f6a..5840700 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -6,15 +6,13 @@ glibc targettype ia32 +/etc/ld.so.conf targettype ia32 "/lib/ld-linux.so.2 -> /lib/ld-linux.so.2" prereq -glibc-x86 - recommends "glibc-gconv-modules-" +/usr/lib/getconf/[^g] +/usr/sbin/iconvconfig -> /usr/sbin/iconvconfig- -glibc-gconv-modules +glibc-locale-base arch i586 block! +/usr/lib(64)?/gconv/gconv-modules targettype x86 -/usr/lib(64)?/gconv/gconv-modules obsoletes "glibc-locale-" - provides "glibc-locale-base-:%{_libdir}/gconv/gconv-modules" post "/usr/sbin/iconvconfig-" glibc-devel requires "glibc- = %version" diff --git a/glibc-nsswitch-usr.diff b/glibc-nsswitch-usr.diff deleted file mode 100644 index 0c35677..0000000 --- a/glibc-nsswitch-usr.diff +++ /dev/null @@ -1,15 +0,0 @@ -Index: glibc-2.31/nss/nsswitch.c -=================================================================== ---- glibc-2.31.orig/nss/nsswitch.c -+++ glibc-2.31/nss/nsswitch.c -@@ -134,6 +134,10 @@ __nss_database_lookup2 (const char *data - /* Read config file. */ - service_table = nss_parse_file (_PATH_NSSWITCH_CONF); - -+ /* retry os vendor provided one */ -+ if (service_table == NULL) -+ service_table = nss_parse_file ("/usr" _PATH_NSSWITCH_CONF); -+ - /* Test whether configuration data is available. */ - if (service_table != NULL) - { diff --git a/glibc.changes b/glibc.changes index 01712bf..e4fd004 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Thu Apr 23 12:02:11 UTC 2020 - Ludwig Nussel - -- install nsswitch.conf in /usr -- glibc-nsswitch-usr.diff: read nsswich.conf from /usr -- package gai.conf as %doc only. The default config is empty so not needed. -- move gconv modules to separate subpackage - ------------------------------------------------------------------- Mon Apr 20 12:43:19 UTC 2020 - Andreas Schwab diff --git a/glibc.spec b/glibc.spec index 68d8da8..361f040 100644 --- a/glibc.spec +++ b/glibc.spec @@ -196,7 +196,6 @@ Provides: ld-linux.so.3(GLIBC_2.4) %endif Requires(pre): filesystem Recommends: glibc-extra -Recommends: glibc-gconv-modules Provides: rtld(GNU_HASH) %endif %if %{build_utils} @@ -236,8 +235,6 @@ Patch14: glibc-bindresvport-blacklist.diff Patch15: glibc-2.3.90-langpackdir.diff # PATCH-FEATURE-SLE Use nscd user for nscd Patch19: nscd-server-user.patch -# PATCH-FEATURE-SLE read nsswich.conf from /usr -Patch20: glibc-nsswitch-usr.diff ### Locale related patches # PATCH-FIX-OPENSUSE Add additional locales @@ -354,16 +351,6 @@ Requires: glibc = %{version} Locale data for the internationalisation features of the GNU C library. This package contains only the U.S. English locale. -%package gconv-modules -Summary: Gconv data files -License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later -Group: System/Libraries -Requires: glibc = %{version} -Provides: glibc-locale-base:%{_libdir}/gconv/gconv-modules - -%description gconv-modules -Gconv plugins for various code pages - %package locale Summary: Locale Data for Localized Programs License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later @@ -473,7 +460,6 @@ makedb: A program to create a database for nss %patch14 -p1 %patch15 -p1 %patch19 -p1 -%patch20 -p1 %patch100 -p1 %patch102 -p1 @@ -847,8 +833,8 @@ rm -rf %{buildroot}%{_datadir}/locale/*/ # Miscelanna: install -m 644 %{SOURCE7} %{buildroot}/etc -install -D -m 644 %{SOURCE5} %{buildroot}/usr/etc/nsswitch.conf -install -m 644 /dev/null %{buildroot}/etc/nsswitch.conf +install -m 644 %{SOURCE5} %{buildroot}/etc +install -m 644 posix/gai.conf %{buildroot}/etc mkdir -p %{buildroot}/etc/default install -m 644 nis/nss %{buildroot}/etc/default/ @@ -1059,7 +1045,7 @@ end %postun -p /sbin/ldconfig -%post gconv-modules +%post locale-base /usr/sbin/iconvconfig %post info @@ -1098,10 +1084,8 @@ exit 0 %config /etc/ld.so.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache %config(noreplace) /etc/rpc -%ghost %config(noreplace) /etc/nsswitch.conf -/usr/etc/nsswitch.conf -%ghost %config(noreplace) /etc/gai.conf -%doc posix/gai.conf +%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf +%verify(not md5 size mtime) %config(noreplace) /etc/gai.conf %config(noreplace) /etc/default/nss %doc %{_mandir}/man1/gencat.1.gz %doc %{_mandir}/man1/getconf.1.gz @@ -1244,9 +1228,6 @@ exit 0 %{_prefix}/lib/locale/C.utf8 %{_prefix}/lib/locale/en_US.utf8 %endif - -%files gconv-modules -%defattr(-,root,root) %dir %{_libdir}/gconv %{_libdir}/gconv/*.so %{_libdir}/gconv/gconv-modules From 0c1833dfc66e5025708788de69e7445cd4b2a18473addee6a1e84068e4b8fe1c Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 19 May 2020 10:03:06 +0000 Subject: [PATCH 5/5] Accepting request 807178 from home:Andreas_Schwab:Factory - glibc-nsswitch-usr.diff: read /usr/etc/nsswitch.conf if /etc/nsswitch.conf does not exist - Install default nsswitch.conf in /usr/etc - Don't install gai.conf in /etc OBS-URL: https://build.opensuse.org/request/show/807178 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=563 --- glibc-nsswitch-usr.diff | 15 +++++++++++++++ glibc.changes | 8 ++++++++ glibc.spec | 14 ++++++++------ 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 glibc-nsswitch-usr.diff diff --git a/glibc-nsswitch-usr.diff b/glibc-nsswitch-usr.diff new file mode 100644 index 0000000..ff86d7e --- /dev/null +++ b/glibc-nsswitch-usr.diff @@ -0,0 +1,15 @@ +Index: glibc-2.31/nss/nsswitch.c +=================================================================== +--- glibc-2.31.orig/nss/nsswitch.c ++++ glibc-2.31/nss/nsswitch.c +@@ -134,6 +134,10 @@ __nss_database_lookup2 (const char *data + /* Read config file. */ + service_table = nss_parse_file (_PATH_NSSWITCH_CONF); + ++ /* Retry with the OS vendor provided config file. */ ++ if (service_table == NULL) ++ service_table = nss_parse_file ("/usr" _PATH_NSSWITCH_CONF); ++ + /* Test whether configuration data is available. */ + if (service_table != NULL) + { diff --git a/glibc.changes b/glibc.changes index e4fd004..139305c 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 18 12:25:49 UTC 2020 - Andreas Schwab + +- glibc-nsswitch-usr.diff: read /usr/etc/nsswitch.conf if + /etc/nsswitch.conf does not exist +- Install default nsswitch.conf in /usr/etc +- Don't install gai.conf in /etc + ------------------------------------------------------------------- Mon Apr 20 12:43:19 UTC 2020 - Andreas Schwab diff --git a/glibc.spec b/glibc.spec index 361f040..491002b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -235,6 +235,8 @@ Patch14: glibc-bindresvport-blacklist.diff Patch15: glibc-2.3.90-langpackdir.diff # PATCH-FEATURE-SLE Use nscd user for nscd Patch19: nscd-server-user.patch +# PATCH-FEATURE-SLE read nsswich.conf from /usr +Patch20: glibc-nsswitch-usr.diff ### Locale related patches # PATCH-FIX-OPENSUSE Add additional locales @@ -460,6 +462,7 @@ makedb: A program to create a database for nss %patch14 -p1 %patch15 -p1 %patch19 -p1 +%patch20 -p1 %patch100 -p1 %patch102 -p1 @@ -833,8 +836,7 @@ rm -rf %{buildroot}%{_datadir}/locale/*/ # Miscelanna: install -m 644 %{SOURCE7} %{buildroot}/etc -install -m 644 %{SOURCE5} %{buildroot}/etc -install -m 644 posix/gai.conf %{buildroot}/etc +install -D -m 644 %{SOURCE5} %{buildroot}%{_prefix}/etc/nsswitch.conf mkdir -p %{buildroot}/etc/default install -m 644 nis/nss %{buildroot}/etc/default/ @@ -843,8 +845,6 @@ mkdir -p %{buildroot}%{_includedir}/resolv install -m 0644 resolv/mapv4v6addr.h %{buildroot}%{_includedir}/resolv/ install -m 0644 resolv/mapv4v6hostent.h %{buildroot}%{_includedir}/resolv/ -touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache - %if %{build_html} mkdir -p %{buildroot}%{_datadir}/doc/glibc cp -p cc-base/manual/libc/*.html %{buildroot}%{_datadir}/doc/glibc @@ -1084,8 +1084,10 @@ exit 0 %config /etc/ld.so.conf %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache %config(noreplace) /etc/rpc -%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf -%verify(not md5 size mtime) %config(noreplace) /etc/gai.conf +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/nsswitch.conf +%{_prefix}/etc/nsswitch.conf +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf +%doc posix/gai.conf %config(noreplace) /etc/default/nss %doc %{_mandir}/man1/gencat.1.gz %doc %{_mandir}/man1/getconf.1.gz