From 4646688d9417ca64965e366e1eab2c18c4e2c8fbb1249e319a8d58c753a05e68 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 11 Mar 2011 16:57:09 +0000 Subject: [PATCH 1/5] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=104 --- startpar-0.57.dif | 27 +++++++++++++++++++++++---- sysvinit.changes | 6 ++++++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/startpar-0.57.dif b/startpar-0.57.dif index eba5d85..e4c47d3 100644 --- a/startpar-0.57.dif +++ b/startpar-0.57.dif @@ -1,5 +1,5 @@ --- makeboot.c -+++ makeboot.c 2010-10-12 16:42:53.996426160 +0000 ++++ makeboot.c 2010-10-12 16:42:54.000000000 +0000 @@ -407,6 +407,7 @@ void check_run_files(const char *action, */ #ifndef USE_BLOGD @@ -9,7 +9,7 @@ /* --- proc.c -+++ proc.c 2010-09-30 12:19:16.000000000 +0000 ++++ proc.c 2011-03-11 16:00:04.491925980 +0000 @@ -94,3 +94,74 @@ int read_proc(unsigned long int * const return 0; } @@ -50,7 +50,7 @@ +void detect_consoles(void) +{ + FILE *fc; -+ if ((fc = fopen("/proc/tty/consoles", "r"))) { ++ if ((fc = fopen("/proc/consoles", "r"))) { + char fbuf[16]; + int maj, min; + DIR *dir; @@ -94,7 +94,7 @@ -extern void unraw_consoles(void); -extern void raw_consoles(void); --- startpar.c -+++ startpar.c 2010-10-12 16:45:32.040429641 +0000 ++++ startpar.c 2011-03-11 15:59:16.388425553 +0000 @@ -52,6 +52,12 @@ #include #include @@ -164,6 +164,15 @@ if (setpgid(0, 0)) perror("setpgid"); +@@ -486,7 +481,7 @@ void run(struct prg *p) + _exit(1); + } + TEMP_FAILURE_RETRY(dup2(1, 2)); +- if (tcsetattr(1, TCSANOW, &tio)) ++ if (tcsetattr(1, TCSANOW, &tio) && errno != ENOTTY) + perror("tcsetattr"); + if (wzok) + ioctl(1, TIOCSWINSZ, &wz); @@ -582,14 +577,7 @@ int run_single(const char *prg, const ch { sigset_t nmask; @@ -244,3 +253,13 @@ (void)sigemptyset(&nmask); (void)sigaddset(&nmask, SIGHUP); sigprocmask(SIG_UNBLOCK, &nmask, NULL); +@@ -1015,7 +1021,8 @@ int main(int argc, char **argv) + + if (tcgetattr(0, &tio)) + { +- perror("tcgetattr"); ++ if (errno != ENOTTY) ++ perror("tcgetattr"); + tcgetattr(2, &tio); + } + cfmakeraw(&tio); diff --git a/sysvinit.changes b/sysvinit.changes index 7810115..c78da4c 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 11 17:05:55 CET 2011 - werner@suse.de + +- startpar: fix location of consoles under /proc +- startpar: ignore errors from system console not being a tty + ------------------------------------------------------------------- Thu Mar 10 15:15:33 CET 2011 - werner@suse.de From 7442d5a1e36b520e3d64b81eed39c11ecd991d2d803c0b3e191bee8663c42bcf Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Mon, 14 Mar 2011 09:44:00 +0000 Subject: [PATCH 2/5] Updating link to change in openSUSE:Factory/sysvinit revision 105.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=7088794b60b0fa094ef8c50110c4ba61 --- sysvinit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysvinit.spec b/sysvinit.spec index 5863569..15318bd 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -29,7 +29,7 @@ License: GPLv2+ Group: System/Base AutoReqProv: on Version: 2.88 -Release: 39 +Release: 40 Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: audit-devel libselinux-devel libsepol-devel pam-devel From 7dad6e91f652d27dc201e288a5c5abf04e92ce02c8f549cadd581973a1c07788 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 15 Mar 2011 15:09:26 +0000 Subject: [PATCH 3/5] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=106 --- sysvinit-2.88dsf.dif => sysvinit-2.88dsf+.dif | 12 +++--- sysvinit-2.88dsf+.tar.bz2 | 3 ++ sysvinit-2.88dsf-nfs.patch | 21 ---------- sysvinit-2.88dsf-selinux.patch | 35 ---------------- sysvinit-2.88dsf-utf8.dif | 40 ------------------- sysvinit-2.88dsf.tar.bz2 | 3 -- sysvinit-last-ipv6-heuristic.patch | 40 ------------------- sysvinit.changes | 31 ++++++++++++++ sysvinit.spec | 14 ++----- 9 files changed, 43 insertions(+), 156 deletions(-) rename sysvinit-2.88dsf.dif => sysvinit-2.88dsf+.dif (83%) create mode 100644 sysvinit-2.88dsf+.tar.bz2 delete mode 100644 sysvinit-2.88dsf-nfs.patch delete mode 100644 sysvinit-2.88dsf-selinux.patch delete mode 100644 sysvinit-2.88dsf-utf8.dif delete mode 100644 sysvinit-2.88dsf.tar.bz2 delete mode 100644 sysvinit-last-ipv6-heuristic.patch diff --git a/sysvinit-2.88dsf.dif b/sysvinit-2.88dsf+.dif similarity index 83% rename from sysvinit-2.88dsf.dif rename to sysvinit-2.88dsf+.dif index 6e2d9e0..76f002d 100644 --- a/sysvinit-2.88dsf.dif +++ b/sysvinit-2.88dsf+.dif @@ -31,17 +31,17 @@ ln -sf last $(ROOT)/usr/bin/lastb; \ fi --- src/bootlogd.c -+++ src/bootlogd.c 2006-08-18 12:45:28.000000000 +0000 -@@ -241,7 +241,7 @@ int isconsole(char *s, char *res, int rl - int consolename(char *res, int rlen) ++++ src/bootlogd.c 2011-03-15 14:58:54.000000000 +0000 +@@ -241,7 +241,7 @@ + int consolename(char *res, size_t rlen) { #ifdef TIOCGDEV - unsigned int kdev; + kdev_t kdev; #endif - struct stat st, st2; - char buf[256]; -@@ -555,7 +555,7 @@ int main(int argc, char **argv) + struct stat st; + int n; +@@ -559,7 +559,7 @@ } (void)ioctl(0, TIOCCONS, NULL); diff --git a/sysvinit-2.88dsf+.tar.bz2 b/sysvinit-2.88dsf+.tar.bz2 new file mode 100644 index 0000000..7766365 --- /dev/null +++ b/sysvinit-2.88dsf+.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7307778802f199f533a91f16dee3f5afc260e9e2b10dc59d96e1076553e57e7a +size 107415 diff --git a/sysvinit-2.88dsf-nfs.patch b/sysvinit-2.88dsf-nfs.patch deleted file mode 100644 index 86ec3ea..0000000 --- a/sysvinit-2.88dsf-nfs.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- src/killall5.c -+++ src/killall5.c 2010-10-21 09:51:07.771926189 +0000 -@@ -112,8 +112,8 @@ typedef struct _s_nfs - struct _s_nfs *next; /* Pointer to next struct. */ - struct _s_nfs *prev; /* Pointer to previous st. */ - SHADOW *shadow; /* Pointer to shadows */ -- char * name; - size_t nlen; -+ char * name; - } NFS; - - /* List of processes. */ -@@ -346,7 +346,7 @@ static void clear_mnt(void) - } - - /* -- * Check if path is ia shadow off a NFS partition. -+ * Check if path is a shadow of a NFS partition. - */ - static int shadow(SHADOW *restrict this, const char *restrict name, const size_t nlen) - { diff --git a/sysvinit-2.88dsf-selinux.patch b/sysvinit-2.88dsf-selinux.patch deleted file mode 100644 index 1c37664..0000000 --- a/sysvinit-2.88dsf-selinux.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- src/init.c -+++ src/init.c 2010-05-17 09:32:29.958932802 +0000 -@@ -54,10 +54,6 @@ - - #ifdef WITH_SELINUX - # include --# include --# ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */ --# define MNT_DETACH 2 --# endif - #endif - - #ifdef __i386__ -@@ -2886,11 +2882,9 @@ int main(int argc, char **argv) - - #ifdef WITH_SELINUX - if (getenv("SELINUX_INIT") == NULL) { -- const int rc = mount("proc", "/proc", "proc", 0, 0); -- if (is_selinux_enabled() > 0) { -- putenv("SELINUX_INIT=YES"); -- if (rc == 0) umount2("/proc", MNT_DETACH); -+ if (is_selinux_enabled() != 1) { - if (selinux_init_load_policy(&enforce) == 0) { -+ putenv("SELINUX_INIT=YES"); - execv(myname, argv); - } else { - if (enforce > 0) { -@@ -2901,7 +2895,6 @@ int main(int argc, char **argv) - } - } - } -- if (rc == 0) umount2("/proc", MNT_DETACH); - } - #endif - /* Start booting. */ diff --git a/sysvinit-2.88dsf-utf8.dif b/sysvinit-2.88dsf-utf8.dif deleted file mode 100644 index 799f73d..0000000 --- a/sysvinit-2.88dsf-utf8.dif +++ /dev/null @@ -1,40 +0,0 @@ ---- doc/Changelog -+++ doc/Changelog 2010-05-12 13:26:34.679992111 +0200 -@@ -35,6 +35,8 @@ sysvinit (2.88dsf) world; urgency=low - get binaries with debug information installed. - - [ Werner Fink ] -+ * Correct fix for Debian bug #547073: use IUTF8 flag if defined -+ and if already set. - * Add the comment from Andrea Arcangeli about the correct - place of setting the default childhandler within spawn(). - * Make sure that newline is printed out for last(1) even ---- src/init.c -+++ src/init.c 2010-05-12 13:24:44.536090878 +0200 -@@ -788,10 +788,11 @@ void console_stty(void) - /* - * Set pre and post processing - */ -- tty.c_iflag = IGNPAR|ICRNL|IXON|IXANY; --#ifdef IUTF8 /* Not defined on FreeBSD */ -- tty.c_iflag |= IUTF8; -+ tty.c_iflag = IGNPAR|ICRNL|IXON|IXANY -+#ifdef IUTF8 /* Not defined on FreeBSD */ -+ | (tty.c_iflag & IUTF8) - #endif /* IUTF8 */ -+ ; - tty.c_oflag = OPOST|ONLCR; - tty.c_lflag = ISIG|ICANON|ECHO|ECHOCTL|ECHOPRT|ECHOKE; - ---- src/sulogin.c -+++ src/sulogin.c 2010-05-12 13:24:44.576090860 +0200 -@@ -101,9 +101,6 @@ void fixtty(void) - * the same result as `stty sane cr0 pass8' - */ - tty.c_iflag |= (BRKINT | ICRNL | IMAXBEL); --#ifdef IUTF8 /* Not defined on FreeBSD */ -- tty.c_iflag |= IUTF8; --#endif /* IUTF8 */ - tty.c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP); - tty.c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0); - tty.c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | OFDEL |\ diff --git a/sysvinit-2.88dsf.tar.bz2 b/sysvinit-2.88dsf.tar.bz2 deleted file mode 100644 index 296ce52..0000000 --- a/sysvinit-2.88dsf.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519 -size 105551 diff --git a/sysvinit-last-ipv6-heuristic.patch b/sysvinit-last-ipv6-heuristic.patch deleted file mode 100644 index 0719fa7..0000000 --- a/sysvinit-last-ipv6-heuristic.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/trunk/src/last.c b/trunk/src/last.c -index 5003c7c..02103e0 100644 ---- a/trunk/src/last.c -+++ b/trunk/src/last.c -@@ -318,30 +318,22 @@ int dns_lookup(char *result, int size, int useip, int32_t *a) - struct sockaddr_in6 sin6; - struct sockaddr *sa; - int salen, flags; -- unsigned int topnibble; -- unsigned int azero = 0, sitelocal = 0; - int mapped = 0; - - flags = useip ? NI_NUMERICHOST : 0; - - /* -- * IPv4 or IPv6 ? We use 2 heuristics: -- * 1. Current IPv6 range uses 2000-3fff or fec0-feff. -- * Outside of that is illegal and must be IPv4. -- * 2. If last 3 bytes are 0, must be IPv4 -- * 3. If IPv6 in IPv4, handle as IPv4 -+ * IPv4 or IPv6 ? -+ * 1. If last 3 4bytes are 0, must be IPv4 -+ * 2. If IPv6 in IPv4, handle as IPv4 -+ * 3. Anything else is IPv6 - * - * Ugly. - */ - if (a[0] == 0 && a[1] == 0 && a[2] == (int32_t)htonl (0xffff)) - mapped = 1; -- topnibble = ntohl((unsigned int)a[0]) >> 28; - -- azero = ntohl((unsigned int)a[0]) >> 16; -- sitelocal = (azero >= 0xfec0 && azero <= 0xfeff) ? 1 : 0; -- -- if (((topnibble < 2 || topnibble > 3) && (!sitelocal)) || mapped || -- (a[1] == 0 && a[2] == 0 && a[3] == 0)) { -+ if (mapped || (a[1] == 0 && a[2] == 0 && a[3] == 0)) { - /* IPv4 */ - sin.sin_family = AF_INET; - sin.sin_port = 0; diff --git a/sysvinit.changes b/sysvinit.changes index c78da4c..fdb1f9f 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,34 @@ +------------------------------------------------------------------- +Tue Mar 15 16:01:22 CET 2011 - werner@suse.de + +- Update to current SVN version of sysvinit 2.88dsf: + * Fix counting message lines in wall. Patch from Petr Lautrbach. + * Fix bad printf conversion specifier in wall. Patch from Sébastien Luttringer. + * Add patches from Openwall project. Thanks goes to Solar Designer. + * Add code to detect the system consoles with the help of the + new /proc/consoles files of linux kernel 2.6.38+ + * Try to make utmpdump IPv6 valid, change based on suggestion from + Navdeep Bhatia (see local bug #32429) + * Fix signal and alarm handling based on the patch from Florent Viard. + (was local bug #32304) + * Add fix for Redhat bug #573346: last incorrectly displays IPv6 + addresses (was local bug #29497) + * Correct fix for Debian bug #547073: use IUTF8 flag if defined + and if already set to make sure the utf-8 flag is not cleared + from the tty. Patch from Samuel Thibault. + * Include limits.h in killall.c to enforce definition of PATH_MAX + * Fix sysvinit bug #29758 Linker invocation should not contain + headers. Change based on patch from Elias Pipping. + * Add fix for Debian bug #580272: use return value 1 of + is_selinux_enabled() to determine if SELinux is enabled, + otherwise initialize SELinux and load the policy. Patch from + Petter Reinholdtsen. + * Make quotes visible in example of the manual page of fstab-decode + * Add #ifdef in bootlogd.c to avoid gcc warnings about unused + variable on non-linux platforms. + * Only set the VSWTC field for termios in init if it is available, + to get the source building on FreeBSD. + ------------------------------------------------------------------- Fri Mar 11 17:05:55 CET 2011 - werner@suse.de diff --git a/sysvinit.spec b/sysvinit.spec index 15318bd..c6d39d9 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -34,7 +34,7 @@ Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: audit-devel libselinux-devel libsepol-devel pam-devel Url: http://savannah.nongnu.org/projects/sysvinit/ -Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2 +Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf+.tar.bz2 Source2: killproc-2.19.tar.bz2 Source3: powerd-2.0.2.tar.bz2 Source4: showconsole-1.13.tar.bz2 @@ -44,15 +44,11 @@ Source7: sysvinit-rpmlintrc Source8: mkinitrd-boot.sh Source9: mkinitrd-kill1.sh Source10: mkinitrd-kill2.sh -Patch: sysvinit-2.88dsf.dif +Patch: sysvinit-2.88dsf+.dif Patch1: sysvinit-2.82-startstop.patch Patch2: sysvinit-2.88dsf-suse.patch Patch3: sysvinit-2.88dsf-no-kill.patch Patch4: notify-pam-dead.patch -Patch5: sysvinit-last-ipv6-heuristic.patch -Patch6: sysvinit-2.88dsf-utf8.dif -Patch7: sysvinit-2.88dsf-selinux.patch -Patch8: sysvinit-2.88dsf-nfs.patch Patch20: powerd-2.0.2.dif Patch21: powerd-2.0.2-getaddrinfo.patch Patch30: killproc-2.19.dif @@ -88,15 +84,11 @@ to startpar, killproc and pidof. System V init specific programs are in the sysvinit package. %prep -%setup -n sysvinit-%{SIVER}dsf -q -b 2 -b 3 -b 4 -b 5 +%setup -n sysvinit-%{SIVER}dsf+ -q -b 2 -b 3 -b 4 -b 5 %patch1 -p0 -b .startstop %patch2 -p0 -b .suse %patch3 -p0 -b .no-kill %patch4 -p0 -b .pam -%patch5 -p2 -b .ipv6 -%patch6 -p0 -b .utf8 -%patch7 -p0 -b .selinux -%patch8 -p0 -b .nfs %patch pushd ../powerd-%{PDVER} %patch20 From c50f69e4b27941317a63f257fbb56c8f13a416bd93e788ed60508567a469b00f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 15 Mar 2011 15:14:46 +0000 Subject: [PATCH 4/5] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=107 --- sysvinit-2.88dsf+.dif => sysvinit-2.88+dsf.dif | 0 sysvinit-2.88+dsf.tar.bz2 | 3 +++ sysvinit.spec | 10 +++++----- 3 files changed, 8 insertions(+), 5 deletions(-) rename sysvinit-2.88dsf+.dif => sysvinit-2.88+dsf.dif (100%) create mode 100644 sysvinit-2.88+dsf.tar.bz2 diff --git a/sysvinit-2.88dsf+.dif b/sysvinit-2.88+dsf.dif similarity index 100% rename from sysvinit-2.88dsf+.dif rename to sysvinit-2.88+dsf.dif diff --git a/sysvinit-2.88+dsf.tar.bz2 b/sysvinit-2.88+dsf.tar.bz2 new file mode 100644 index 0000000..30035b9 --- /dev/null +++ b/sysvinit-2.88+dsf.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2856651d40e0173eedeb0ba316cad9c8ffd25b712190522fbb19e8b06c9e022e +size 107454 diff --git a/sysvinit.spec b/sysvinit.spec index c6d39d9..c3f76c2 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -23,18 +23,18 @@ Name: sysvinit %define PDVER 2.0.2 %define KPVER 2.19 %define SCVER 1.13 -%define SIVER 2.88 +%define SIVER 2.88+ %define START 0.57 License: GPLv2+ Group: System/Base AutoReqProv: on -Version: 2.88 +Version: 2.88+ Release: 40 Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: audit-devel libselinux-devel libsepol-devel pam-devel Url: http://savannah.nongnu.org/projects/sysvinit/ -Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf+.tar.bz2 +Source: http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88+dsf.tar.bz2 Source2: killproc-2.19.tar.bz2 Source3: powerd-2.0.2.tar.bz2 Source4: showconsole-1.13.tar.bz2 @@ -44,7 +44,7 @@ Source7: sysvinit-rpmlintrc Source8: mkinitrd-boot.sh Source9: mkinitrd-kill1.sh Source10: mkinitrd-kill2.sh -Patch: sysvinit-2.88dsf+.dif +Patch: sysvinit-2.88+dsf.dif Patch1: sysvinit-2.82-startstop.patch Patch2: sysvinit-2.88dsf-suse.patch Patch3: sysvinit-2.88dsf-no-kill.patch @@ -84,7 +84,7 @@ to startpar, killproc and pidof. System V init specific programs are in the sysvinit package. %prep -%setup -n sysvinit-%{SIVER}dsf+ -q -b 2 -b 3 -b 4 -b 5 +%setup -n sysvinit-%{SIVER}dsf -q -b 2 -b 3 -b 4 -b 5 %patch1 -p0 -b .startstop %patch2 -p0 -b .suse %patch3 -p0 -b .no-kill From 1ad8174dc70c643678d2f92fb4bb3b9993d164400836afb4bee58de38459633f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 15 Mar 2011 15:15:21 +0000 Subject: [PATCH 5/5] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=108 --- sysvinit-2.88dsf+.tar.bz2 | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 sysvinit-2.88dsf+.tar.bz2 diff --git a/sysvinit-2.88dsf+.tar.bz2 b/sysvinit-2.88dsf+.tar.bz2 deleted file mode 100644 index 7766365..0000000 --- a/sysvinit-2.88dsf+.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7307778802f199f533a91f16dee3f5afc260e9e2b10dc59d96e1076553e57e7a -size 107415