From c81fdb57f6c15b84f2fdaca9eaa8197ae6047f5db753334ea0f85a01a5d7bf74 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Fri, 21 Oct 2011 14:10:21 +0000 Subject: [PATCH] Accepting request 88821 from Base:System Ignore failure of chkstat (bnc#725145) (forwarded request 88819 from a_jaeger) OBS-URL: https://build.opensuse.org/request/show/88821 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=90 --- glibc.changes | 11 +++++++++++ glibc.spec | 2 ++ glibc_post_upgrade.c | 29 ++++++++++++++++++----------- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/glibc.changes b/glibc.changes index 268b696..35a1292 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Oct 20 08:58:47 UTC 2011 - aj@suse.de + +- Ignore failure of chkstat (bnc#725145). + +------------------------------------------------------------------- +Wed Oct 19 12:07:41 UTC 2011 - aj@suse.de + +- Provide glibc-static from glibc-devel-static to make packaging + easier. glibc-static is the Fedora name. + ------------------------------------------------------------------- Mon Oct 17 07:47:54 UTC 2011 - aj@suse.de diff --git a/glibc.spec b/glibc.spec index e37a981..1a57909 100644 --- a/glibc.spec +++ b/glibc.spec @@ -331,6 +331,8 @@ library. Summary: C library static libraries for -static linking Group: Development/Libraries/C and C++ Requires: %{name}-devel = %{version} +# Provide Fedora name for package to make packaging easier +Provides: %{name}-static %description devel-static The glibc-devel-static package contains the C library static libraries diff --git a/glibc_post_upgrade.c b/glibc_post_upgrade.c index cde2295..f351234 100644 --- a/glibc_post_upgrade.c +++ b/glibc_post_upgrade.c @@ -15,14 +15,14 @@ #include #include -#define verbose_exec(failcode, path...) \ +#define verbose_exec(failcode, fail_ok, path...) \ do \ { \ char *const arr[] = { path, NULL }; \ - vexec (failcode, arr); \ + vexec (failcode, fail_ok, arr); \ } while (0) -__attribute__((noinline)) void vexec (int failcode, char *const path[]); +__attribute__((noinline)) void vexec (int failcode, int fail_ok, char *const path[]); __attribute__((noinline)) void says (const char *str); __attribute__((noinline)) void sayn (long num); __attribute__((noinline)) void message (char *const path[]); @@ -116,21 +116,21 @@ main (void) before running one of the lib's %post scriptlet. /sbin/ldconfig will then be run by the other arch's %post. */ if (access ("/sbin/ldconfig", X_OK) == 0) - verbose_exec (110, "/sbin/ldconfig", "/sbin/ldconfig", "-X"); + verbose_exec (110, 0, "/sbin/ldconfig", "/sbin/ldconfig", "-X"); if (utimes (GCONV_MODULES_DIR "/gconv-modules.cache", NULL) == 0) { #ifndef ICONVCONFIG #define ICONVCONFIG "/usr/sbin/iconvconfig" #endif - verbose_exec (113, ICONVCONFIG, "/usr/sbin/iconvconfig", + verbose_exec (113, 0, ICONVCONFIG, "/usr/sbin/iconvconfig", "-o", GCONV_MODULES_DIR"/gconv-modules.cache", "--nostdlib", GCONV_MODULES_DIR); } /* Implement %set_permissions %{_libdir}/pt_chown. */ if (access ("/usr/bin/chkstat", X_OK) == 0) - verbose_exec (114, "/usr/bin/chkstat", "/usr/bin/chkstat", + verbose_exec (114, 1, "/usr/bin/chkstat", "/usr/bin/chkstat", "-n", "--set", "--system", "/usr/lib/pt_chown", "/usr/lib64/pt_chown"); @@ -148,7 +148,7 @@ main (void) _exit (0); if (check_elf ("/proc/1/exe")) - verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u"); + verbose_exec (116, 0, "/sbin/telinit", "/sbin/telinit", "u"); #if 0 /* Check if we can safely condrestart sshd. */ @@ -157,7 +157,7 @@ main (void) && access ("/bin/bash", X_OK) == 0) { if (check_elf ("/usr/sbin/sshd")) - verbose_exec (121, "/sbin/service", "/sbin/service", "sshd", "condrestart"); + verbose_exec (121, 0, "/sbin/service", "/sbin/service", "sshd", "condrestart"); } #endif @@ -165,7 +165,7 @@ main (void) } void -vexec (int failcode, char *const path[]) +vexec (int failcode, int fail_ok, char *const path[]) { pid_t pid; int status, save_errno; @@ -201,8 +201,15 @@ vexec (int failcode, char *const path[]) message (path); says (" child exited with exit code "); sayn (WEXITSTATUS (status)); - says ("\n"); - _exit (WEXITSTATUS (status)); + if (fail_ok) + { + says (" (ignored) \n"); + } + else + { + says ("\n"); + _exit (WEXITSTATUS (status)); + } } }