diff --git a/glibc.changes b/glibc.changes index 66e8759..35a1292 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 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)); + } } }