From 9d43165817e451c15bd1506cb21abaf2fda75c9161ecf7fb687f347182fbbcf2 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 9 Mar 2009 22:36:07 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysvinit?expand=0&rev=38 --- startpar-0.52.dif | 137 ------------------ startpar-0.52.tar.bz2 | 3 - ...par-0.52-preload.diff => startpar-0.53.dif | 0 startpar-0.53.tar.bz2 | 3 + sysvinit.changes | 5 + sysvinit.spec | 12 +- 6 files changed, 14 insertions(+), 146 deletions(-) delete mode 100644 startpar-0.52.dif delete mode 100644 startpar-0.52.tar.bz2 rename startpar-0.52-preload.diff => startpar-0.53.dif (100%) create mode 100644 startpar-0.53.tar.bz2 diff --git a/startpar-0.52.dif b/startpar-0.52.dif deleted file mode 100644 index 27807ec..0000000 --- a/startpar-0.52.dif +++ /dev/null @@ -1,137 +0,0 @@ ---- makeboot.c -+++ makeboot.c 2009-02-06 14:42:41.492201093 +0100 -@@ -13,6 +13,12 @@ - #include - #include - #include "makeboot.h" -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+# include -+# include -+# include -+static int o_flags = O_RDONLY; -+#endif - - - int tree_entries = 0; -@@ -95,6 +101,7 @@ static struct makelist *new_list(struct - /* - * check whether the given target would create an infinte loop - */ -+static int loop; - static int check_loop(struct makenode *dep, struct makenode *src) - { - struct makelist *s; -@@ -103,6 +110,8 @@ static int check_loop(struct makenode *d - fprintf(stderr, "loop exists %s in %s!\n", dep->name, src->name); - return 1; - } -+ if (loop++ > 999) -+ return 1; - if (check_loop(s->node, src)) - return 1; - } -@@ -117,6 +126,7 @@ static void add_depend(struct makenode * - struct makenode *dep; - - dep = add_target(dst); -+ loop = 0; - if (check_loop(dep, node)) - return; - dep->select = new_list(node, dep->select); -@@ -158,11 +168,28 @@ void parse_makefile(const char *path) - char *s, *strp, *p; - struct makenode *node; - -- if ((fp = fopen(path, "r")) == NULL) { -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+ int fd; -+ -+ if (getuid() == (uid_t)0) -+ o_flags |= O_NOATIME; -+ if ((fd = open(path, o_flags)) < 0) { - fprintf(stderr, "Can't open %s: %s\n", path, strerror(errno)); - exit(1); - } -- -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_WILLNEED); -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_NOREUSE); -+ -+ if ((fp = fdopen(fd, "r")) == NULL) -+#else -+ if ((fp = fopen(path, "r")) == NULL) -+#endif -+ { -+ fprintf(stderr, "Can't open %s: %s\n", path, strerror(errno)); -+ exit(1); -+ } -+ - while (fgets(buf, sizeof(buf), fp)) { - for (s = buf; *s && isspace(*s); s++) - ; -@@ -198,6 +225,11 @@ void parse_makefile(const char *path) - } - } - } -+ -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); -+#endif -+ - fclose(fp); - - for (node = tree_list; node; node = node->next) { -@@ -234,7 +266,17 @@ static void filter_files(const char *dir - - filter_prefix = prefix; - snprintf(path, sizeof(path), "/etc/init.d/%s.d", dir); -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+ if ((i = open(path, o_flags|O_DIRECTORY|O_LARGEFILE)) >= 0) { -+ (void)posix_fadvise(i, 0, 0, POSIX_FADV_SEQUENTIAL); -+ (void)posix_fadvise(i, 0, 0, POSIX_FADV_NOREUSE); -+ } -+#endif - ndirs = scandir(path, &dirlist, dirfilter, alphasort); -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+ if (i >= 0) -+ (void)posix_fadvise(i, 0, 0, POSIX_FADV_DONTNEED); -+#endif - /* mark all matching nodes */ - for (i = 0; i < ndirs; i++) { - t = lookup_target(dirlist[i]->d_name + 3); -@@ -342,6 +384,17 @@ struct makenode *pickup_task(void) - } - } - if (best) { -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+ char path[128]; -+ int fd; -+ snprintf(path, sizeof(path), "/etc/init.d/%s", best->name); -+ if ((fd = open(path, o_flags|O_DIRECT)) >= 0) { -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_WILLNEED); -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_NOREUSE); -+ close(fd); -+ } -+#endif - blogger("service %s", best->name); - best->status = T_RUNNING; - } -@@ -359,6 +412,17 @@ void finish_task(struct makenode *node) - return; - for (n = node->select; n; n = n->next) - n->node->num_deps--; -+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600 -+ { -+ char path[128]; -+ int fd; -+ snprintf(path, sizeof(path), "/etc/init.d/%s", node->name); -+ if ((fd = open(path, o_flags|O_DIRECT)) >= 0) { -+ (void)posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); -+ close(fd); -+ } -+ } -+#endif - node->status = T_FINISHED; - blogger("service %s done", node->name); - } diff --git a/startpar-0.52.tar.bz2 b/startpar-0.52.tar.bz2 deleted file mode 100644 index b87811d..0000000 --- a/startpar-0.52.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:926ec61c624f18f27b3d4c03ba3bb19ee83fc6387986e1f6e3f966d76feb39bd -size 17560 diff --git a/startpar-0.52-preload.diff b/startpar-0.53.dif similarity index 100% rename from startpar-0.52-preload.diff rename to startpar-0.53.dif diff --git a/startpar-0.53.tar.bz2 b/startpar-0.53.tar.bz2 new file mode 100644 index 0000000..c6a684a --- /dev/null +++ b/startpar-0.53.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae6bbfbb84b87d59a3c692f991c2c65c53b854f03ac27f7d2bd35ab0215fcecb +size 18105 diff --git a/sysvinit.changes b/sysvinit.changes index bf2d0e8..e413f6c 100644 --- a/sysvinit.changes +++ b/sysvinit.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 9 13:54:55 CET 2009 - werner@suse.de + +- Add patch from Debian people to startpar and mode to version 0.53 + ------------------------------------------------------------------- Thu Mar 5 17:27:33 CET 2009 - werner@suse.de diff --git a/sysvinit.spec b/sysvinit.spec index 14a3b91..9cd369d 100644 --- a/sysvinit.spec +++ b/sysvinit.spec @@ -24,13 +24,13 @@ Name: sysvinit %define KPVER 2.14 %define SCVER 1.09 %define SIVER 2.86 -%define START 0.52 +%define START 0.53 License: GPL v2 or later Group: System/Base PreReq: coreutils AutoReqProv: on Version: 2.86 -Release: 197 +Release: 198 Summary: SysV-Style init BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libselinux-devel libsepol-devel @@ -38,7 +38,7 @@ Source: sysvinit-2.86.tar.bz2 Source2: killproc-2.14.tar.bz2 Source3: powerd-2.0.2.tar.bz2 Source4: showconsole-1.09.tar.bz2 -Source5: startpar-0.52.tar.bz2 +Source5: startpar-0.53.tar.bz2 Source6: rc.powerd Source7: sysvinit-rpmlintrc Source8: mkinitrd-boot.sh @@ -57,13 +57,12 @@ Patch10: showconsole-1.09.dif Patch11: sysvinit-2.86-race.patch Patch12: sysvinit-2.86-lib64.patch Patch13: sysvinit-2.82-multiline.patch -Patch14: startpar-0.52.dif +Patch14: startpar-0.53.dif Patch15: sysvinit-2.86-usage-message.patch Patch16: sysvinit-2.86-full-time.patch Patch17: sysvinit-2.86-hddown.patch Patch18: sysvinit-2.86-selinux.patch Patch19: sysvinit-2.86-fuse-no-kill.patch -Patch20: startpar-0.52-preload.diff %description System V style init programs by Miquel van Smoorenburg that control the @@ -111,7 +110,6 @@ pushd ../showconsole-%{SCVER} popd pushd ../startpar-%{START} %patch -P 14 -%patch -P 20 popd %_fixowner . %_fixgroup . @@ -325,6 +323,8 @@ rm -rf ${RPM_BUILD_ROOT} %doc %{_mandir}/man8/mkill.8.gz %changelog +* Mon Mar 09 2009 werner@suse.de +- Add patch from Debian people to startpar and mode to version 0.53 * Thu Mar 05 2009 werner@suse.de - Updte to killproc 2.14 to include most of our patches and to use openat(2), readlinkat(2), and opendirat(2) system calls.