fix 514760
This commit is contained in:
parent
872b43c434
commit
ee4bb69f75
114
redhat-lsb-trigger.patch
Normal file
114
redhat-lsb-trigger.patch
Normal file
@ -0,0 +1,114 @@
|
||||
--- redhat_lsb_trigger.c.jj 2008-04-16 19:50:14.000000000 +0200
|
||||
+++ redhat_lsb_trigger.c 2009-10-26 19:51:12.886058784 +0100
|
||||
@@ -423,10 +423,76 @@ is_ia64 (void)
|
||||
#define is_ia64() 0
|
||||
#endif
|
||||
|
||||
+char *
|
||||
+strtok (char *p, const char *delim)
|
||||
+{
|
||||
+ static char *olds;
|
||||
+ const char *d;
|
||||
+ char *token;
|
||||
+ if (p == NULL)
|
||||
+ p = olds;
|
||||
+ while (*p)
|
||||
+ {
|
||||
+ for (d = delim; *d; d++)
|
||||
+ if (*p == *d)
|
||||
+ break;
|
||||
+ if (!*d)
|
||||
+ break;
|
||||
+ p++;
|
||||
+ }
|
||||
+ if (!*p)
|
||||
+ {
|
||||
+ olds = p;
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ token = p;
|
||||
+ while (*p)
|
||||
+ {
|
||||
+ for (d = delim; *d; d++)
|
||||
+ if (*p == *d)
|
||||
+ break;
|
||||
+ if (*d)
|
||||
+ break;
|
||||
+ p++;
|
||||
+ }
|
||||
+ if (!*p)
|
||||
+ olds = p;
|
||||
+ else
|
||||
+ {
|
||||
+ *p = '\0';
|
||||
+ olds = p + 1;
|
||||
+ }
|
||||
+ return token;
|
||||
+}
|
||||
+
|
||||
+size_t
|
||||
+strlen (const char *s)
|
||||
+{
|
||||
+ const char *p;
|
||||
+ for (p = s; *p; ++p);
|
||||
+ return p - s;
|
||||
+}
|
||||
+
|
||||
+void *
|
||||
+mempcpy (void *dst, const void *src, size_t n)
|
||||
+{
|
||||
+ char *d = dst;
|
||||
+ const char *s = src;
|
||||
+ while (n--)
|
||||
+ *d++ = *s++;
|
||||
+ return d;
|
||||
+}
|
||||
+
|
||||
+char *
|
||||
+strcpy (char *dst, const char *src)
|
||||
+{
|
||||
+ char *ret = dst;
|
||||
+ while ((*dst++ = *src++) != '\0');
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
-/* redhat_lsb_trigger.c:428: warning: unused variable 'ret' */
|
||||
-/* long ret; */
|
||||
INTERNAL_SYSCALL_DECL (err);
|
||||
char lsbsover[] = LSBSOVER;
|
||||
char *LSBVER, *p = lsbsover;
|
||||
@@ -455,11 +521,18 @@ void __libc_csu_fini (void) { }
|
||||
pid_t __fork (void) { return -1; }
|
||||
char thr_buf[65536];
|
||||
|
||||
+void
|
||||
+__attribute__ ((noreturn))
|
||||
+__stack_chk_fail (void)
|
||||
+{
|
||||
+ INTERNAL_SYSCALL_DECL (err);
|
||||
+ while (1)
|
||||
+ INTERNAL_SYSCALL (exit, err, 1, 1);
|
||||
+}
|
||||
+
|
||||
#ifndef __powerpc__
|
||||
|
||||
-/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
|
||||
- * * (.opd+0x10): multiple definition of `__libc_start_main' */
|
||||
-int ___libc_start_main (int (*main) (int argc, char **argv),
|
||||
+int __libc_start_main (int (*main) (int argc, char **argv),
|
||||
int argc, char **argv,
|
||||
void (*init) (void), void (*fini) (void),
|
||||
void (*rtld_fini) (void), void * stack_end)
|
||||
@@ -472,9 +545,7 @@ struct startup_info
|
||||
void (*fini) (void);
|
||||
};
|
||||
|
||||
-/* /usr/lib/gcc/ppc64-redhat-linux/4.1.2/../../../../lib64/libc.a(libc-start.o): In function `__libc_start_main':
|
||||
- * (.opd+0x10): multiple definition of `__libc_start_main' */
|
||||
-int ___libc_start_main (int argc, char **argv, char **ev,
|
||||
+int __libc_start_main (int argc, char **argv, char **ev,
|
||||
void *auxvec, void (*rtld_fini) (void),
|
||||
struct startup_info *stinfo,
|
||||
char **stack_on_entry)
|
@ -49,11 +49,12 @@
|
||||
Summary: LSB support for Red Hat Linux
|
||||
Name: redhat-lsb
|
||||
Version: 3.2
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
URL: http://www.linuxfoundation.org/collaborate/workgroups/lsb
|
||||
Source0: %{name}-%{version}-%{srcrelease}.tar.bz2
|
||||
Patch0: lsb-release-3.1-update-init-functions.patch
|
||||
Patch1: redhat-lsb-lsb_start_daemon-fix.patch
|
||||
Patch2: redhat-lsb-trigger.patch
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
@ -528,6 +529,7 @@ installed on the system.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p0 -b .triggerfix
|
||||
|
||||
%build
|
||||
cd lsb-release-%{upstreamlsbrelver}
|
||||
@ -582,7 +584,7 @@ ln -snf ../../../sbin/chkconfig $RPM_BUILD_ROOT/usr/lib/lsb/remove_initd
|
||||
|
||||
# According to https://bugzilla.redhat.com/show_bug.cgi?id=232918 , the '-static' option
|
||||
# is imported against segfault error while running redhat_lsb_trigger
|
||||
gcc $RPM_OPT_FLAGS -Os -static -o redhat_lsb_trigger{.%{_target_cpu},.c} -DLSBSOVER='"%{lsbsover}"' \
|
||||
gcc $RPM_OPT_FLAGS -Os -static -fno-stack-protector -o redhat_lsb_trigger{.%{_target_cpu},.c} -DLSBSOVER='"%{lsbsover}"' \
|
||||
-DLDSO='"%{ldso}"' -DLSBLDSO='"/%{_lib}/%{lsbldso}"' -D_GNU_SOURCE
|
||||
install -m 700 redhat_lsb_trigger.%{_target_cpu} \
|
||||
$RPM_BUILD_ROOT%{_sbindir}/redhat_lsb_trigger.%{_target_cpu}
|
||||
@ -647,6 +649,9 @@ fi
|
||||
#/usr/X11R6/lib/X11/rgb.txt
|
||||
|
||||
%changelog
|
||||
* Tue Oct 27 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2-7
|
||||
- apply fix from bz514760 (thanks to Jakub Jelinek)
|
||||
|
||||
* Wed Oct 21 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2-6
|
||||
- apply fix from bz485367 (thanks to Jon Thomas)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user