forked from pool/glibc
Accepting request 88819 from home:a_jaeger:branches:openSUSE:Factory
Ignore failure of chkstat (bnc#725145) OBS-URL: https://build.opensuse.org/request/show/88819 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=122
This commit is contained in:
parent
7efe2fcc0c
commit
a20f66157e
@ -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
|
||||
|
||||
|
@ -15,14 +15,14 @@
|
||||
#include <sys/stat.h>
|
||||
#include <elf.h>
|
||||
|
||||
#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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user