diff options
author | Robert Piasek <dagger@gentoo.org> | 2009-01-12 19:58:20 +0000 |
---|---|---|
committer | Robert Piasek <dagger@gentoo.org> | 2009-01-12 19:58:20 +0000 |
commit | 6a4c00b3bff21beb6ed29074ecb0e08c7ffa615c (patch) | |
tree | 67261bb2b33db79575be82665c5b4845900fe677 /sys-apps | |
parent | Crossdev wrappers for paludis and openmoko overlay (diff) | |
download | embedded-cross-6a4c00b3bff21beb6ed29074ecb0e08c7ffa615c.tar.gz embedded-cross-6a4c00b3bff21beb6ed29074ecb0e08c7ffa615c.tar.bz2 embedded-cross-6a4c00b3bff21beb6ed29074ecb0e08c7ffa615c.zip |
Bumped openrc revision to 0.4.1. It also includes fix
for gentoo bug #231462
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/openrc/Manifest | 13 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.1/0001-msg-style.patch (renamed from sys-apps/openrc/files/0.4.0/0001-msg-style.patch) | 0 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.1/0002-useful-functions.patch (renamed from sys-apps/openrc/files/0.4.0/0002-useful-functions.patch) | 0 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.1/0003-KV.patch (renamed from sys-apps/openrc/files/0.4.0/0003-KV.patch) | 0 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.1/0004-s-s-d-retry.patch | 54 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.1/0005-init-script-novserver.patch | 25 | ||||
-rw-r--r-- | sys-apps/openrc/files/0.4.1/0006-openrc-utime.patch | 510 | ||||
-rw-r--r-- | sys-apps/openrc/openrc-0.4.1-r2.ebuild (renamed from sys-apps/openrc/openrc-0.4.0.ebuild) | 0 |
8 files changed, 597 insertions, 5 deletions
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest index 9d78f6b..3270ab5 100644 --- a/sys-apps/openrc/Manifest +++ b/sys-apps/openrc/Manifest @@ -9,15 +9,18 @@ AUX 0.3.0/0005-add-back-KV_-funcs.patch 2581 RMD160 ab6bfb3a7786120f21a02934009c AUX 0.3.0/0006-Fix-tests-Gentoo-240350.patch 1302 RMD160 2594c6dbc4896e5e897a682bdc100a120b596f32 SHA1 d3063dc1ad9b3a763456cef0314fb62a2e5e8e8d SHA256 b285fd499a5f23ce79bad0ccab2add93b972644ce9945c1c94b470047157d673 AUX 0.3.0/0007-Fix-utmp-permissions-Gentoo-240437.patch 846 RMD160 3f766bf93af8d535a7611885c9e4a7e5a3a524f1 SHA1 085e13efe91810686182d16a9bce03a0dd31b23a SHA256 ddb5c44735647a1576f11f69993fbb2d4e52f41ae1beda91eac89770b14ba410 AUX 0.3.0/0008-Clean-up-warnings-regarding-printf.patch 13827 RMD160 9d19dc1ff80b554fc3a134b3f815b063d1260937 SHA1 3c5d57088a1c98e78c542a306a1852a251b4b2bd SHA256 b434b8351815bce1133d059f824897d9f2b6e340abcc787f27c5d9879b39186f -AUX 0.4.0/0001-msg-style.patch 1709 RMD160 c8f22d90c66cd99da701d0840094694d96269def SHA1 2983c97f1b3c770d9b2afce4540d6d8a7db8abe7 SHA256 5a5d7cd9c0289eb9e7332b01aa15331e8497579efc78ea4d833400d00cb46f7b -AUX 0.4.0/0002-useful-functions.patch 1803 RMD160 be1963ad7d51deb8ffc96d9ce5d7c59903e9dbcd SHA1 d07901d1c65af2c37a4817d05b364f736b66470c SHA256 d270bba9141333df12c5b5795566bba9f59ba6d6c26a58f09abf0c394f802475 -AUX 0.4.0/0003-KV.patch 2569 RMD160 7ccbca71beba996aedcec5aa1def57a96c008893 SHA1 d3489d7a34f9984b4267819677b5e4549c12fc00 SHA256 dab3a00036718ea99058f362d84a4bac5e9bbd4eff934f1ad1d4da85c8551539 +AUX 0.4.1/0001-msg-style.patch 1709 RMD160 c8f22d90c66cd99da701d0840094694d96269def SHA1 2983c97f1b3c770d9b2afce4540d6d8a7db8abe7 SHA256 5a5d7cd9c0289eb9e7332b01aa15331e8497579efc78ea4d833400d00cb46f7b +AUX 0.4.1/0002-useful-functions.patch 1803 RMD160 be1963ad7d51deb8ffc96d9ce5d7c59903e9dbcd SHA1 d07901d1c65af2c37a4817d05b364f736b66470c SHA256 d270bba9141333df12c5b5795566bba9f59ba6d6c26a58f09abf0c394f802475 +AUX 0.4.1/0003-KV.patch 2569 RMD160 7ccbca71beba996aedcec5aa1def57a96c008893 SHA1 d3489d7a34f9984b4267819677b5e4549c12fc00 SHA256 dab3a00036718ea99058f362d84a4bac5e9bbd4eff934f1ad1d4da85c8551539 +AUX 0.4.1/0004-s-s-d-retry.patch 1318 RMD160 a6267d19011bc6aeb98612b316976a61724a7a32 SHA1 7696705648a342c6337836a1752b1765d3f77adf SHA256 c3687109d8af290c3a2ed8e9d70a62bb462eda9047fb74979445ceb9a8cc43a6 +AUX 0.4.1/0005-init-script-novserver.patch 505 RMD160 7cdf5d423537124fd87abfd1fe6bfa8f48b3a3c7 SHA1 6dac19b53490b00f8ca958892847c99f12357240 SHA256 fc5c510647b9958edbee4e87878e478f114d6191de25a42b3aa31efabc5d78a1 +AUX 0.4.1/0006-openrc-utime.patch 15057 RMD160 be7035866152c89763c43e2ee58f8d22a91f1de5 SHA1 f027424299fd21a387685f811ba4c712d409f285 SHA256 751165e43e418462874215f4d619232163f240d28edce6a53026cb9ed31168d1 AUX 9999/0001-msg-style.patch 1709 RMD160 c8f22d90c66cd99da701d0840094694d96269def SHA1 2983c97f1b3c770d9b2afce4540d6d8a7db8abe7 SHA256 5a5d7cd9c0289eb9e7332b01aa15331e8497579efc78ea4d833400d00cb46f7b AUX 9999/0002-useful-functions.patch 1803 RMD160 be1963ad7d51deb8ffc96d9ce5d7c59903e9dbcd SHA1 d07901d1c65af2c37a4817d05b364f736b66470c SHA256 d270bba9141333df12c5b5795566bba9f59ba6d6c26a58f09abf0c394f802475 AUX 9999/0003-KV.patch 2569 RMD160 7ccbca71beba996aedcec5aa1def57a96c008893 SHA1 d3489d7a34f9984b4267819677b5e4549c12fc00 SHA256 dab3a00036718ea99058f362d84a4bac5e9bbd4eff934f1ad1d4da85c8551539 DIST openrc-0.2.5.tar.bz2 142526 RMD160 5938b2186b7ef84890d4a6aebb9aeb3bf272e609 SHA1 e41249abb9f68ac0ebf92c080276499bd22daa94 SHA256 f81e6a84f016dcecdee67067d6c0bc85f3184baa6c127cc406cc00e88a45bec2 DIST openrc-0.3.0.tar.bz2 145599 RMD160 ca45de6f222060a24542663fff343b84b870e72b SHA1 2fcac5cb7586b407714700b8325b8c3d705aa2cd SHA256 857a038dc123ae67bff7afee3137a292e03f0b7a3999fd9f150f6a75119cdd1a -DIST openrc-0.4.0.tar.bz2 144297 RMD160 e41e9d75e104bd04fa64291f9b520235ea4c6fbc SHA1 5dc4fbc45363234a0f4ea3ede5beb3af8273a381 SHA256 1aa7210e7c52c6eb2398de359e852713f46e303ec8b8e748cdbb0cf75725ee76 +DIST openrc-0.4.1.tar.bz2 144429 RMD160 86510cb298eaa8f5f8cef4569e4df903650935de SHA1 1e56096b02a91ae7f455765f3334dfa8cc887f97 SHA256 0b6de456b1f5398089f8d4f805dcee427dced4d6245dfe1427b1994c2d2fa16b EBUILD openrc-0.2.5.ebuild 8991 RMD160 89376a36c44922f594ca3f17987bc152b827e322 SHA1 1521ceeb8773144cfae6c9884521c4ade1118995 SHA256 fbcaec71cb268f5e44f0649126d2a828d58a4b1b365da36dfa52235d1fe6ef0d EBUILD openrc-0.3.0-r1.ebuild 8994 RMD160 a99e81fc96df6d8d52eda840b9f678ec0dc1f064 SHA1 aaf7ed0502251f82fde1f2dfbf3ef060d401bf0c SHA256 cb23fbcd586af6dbff1f9a78ee442c4f6c46df25b097cc6819b3e99f98fdce6d -EBUILD openrc-0.4.0.ebuild 9445 RMD160 acab225197311296a365916e5ee3b7ca341d2737 SHA1 323b1e1df36c01d61ddb0dd8c7bb5b4852e5df94 SHA256 650f22743c662aecebe35ed73528f35fd97f5862cab6c2bb09da48b56e7e0438 +EBUILD openrc-0.4.1-r2.ebuild 9445 RMD160 acab225197311296a365916e5ee3b7ca341d2737 SHA1 323b1e1df36c01d61ddb0dd8c7bb5b4852e5df94 SHA256 650f22743c662aecebe35ed73528f35fd97f5862cab6c2bb09da48b56e7e0438 diff --git a/sys-apps/openrc/files/0.4.0/0001-msg-style.patch b/sys-apps/openrc/files/0.4.1/0001-msg-style.patch index ab3559e..ab3559e 100644 --- a/sys-apps/openrc/files/0.4.0/0001-msg-style.patch +++ b/sys-apps/openrc/files/0.4.1/0001-msg-style.patch diff --git a/sys-apps/openrc/files/0.4.0/0002-useful-functions.patch b/sys-apps/openrc/files/0.4.1/0002-useful-functions.patch index a307386..a307386 100644 --- a/sys-apps/openrc/files/0.4.0/0002-useful-functions.patch +++ b/sys-apps/openrc/files/0.4.1/0002-useful-functions.patch diff --git a/sys-apps/openrc/files/0.4.0/0003-KV.patch b/sys-apps/openrc/files/0.4.1/0003-KV.patch index 8ab646f..8ab646f 100644 --- a/sys-apps/openrc/files/0.4.0/0003-KV.patch +++ b/sys-apps/openrc/files/0.4.1/0003-KV.patch diff --git a/sys-apps/openrc/files/0.4.1/0004-s-s-d-retry.patch b/sys-apps/openrc/files/0.4.1/0004-s-s-d-retry.patch new file mode 100644 index 0000000..c207c46 --- /dev/null +++ b/sys-apps/openrc/files/0.4.1/0004-s-s-d-retry.patch @@ -0,0 +1,54 @@ +Index: /trunk/src/rc/start-stop-daemon.c +=================================================================== +--- /trunk/src/rc/start-stop-daemon.c (revision 1453) ++++ /trunk/src/rc/start-stop-daemon.c (revision 1460) +@@ -627,4 +627,5 @@ + char *name = NULL; + char *pidfile = NULL; ++ char *retry = NULL; + int sig = 0; + int nicelevel = 0; +@@ -695,5 +696,5 @@ + + case 'R': /* --retry <schedule>|<timeout> */ +- parse_schedule(optarg, sig); ++ retry = optarg; + break; + +@@ -854,5 +855,7 @@ + *--argv = exec; + +- if (stop || sig) { ++ if (stop || sig != 0) { ++ if (sig == 0) ++ sig = SIGTERM; + if (!*argv && !pidfile && !name && !uid) + eerrorx("%s: --stop needs --exec, --pidfile," +@@ -877,4 +880,5 @@ + " with --background", applet); + } ++ + /* Expand ~ */ + if (ch_dir && *ch_dir == '~') +@@ -956,14 +960,14 @@ + + if (stop || sig) { +- if (!sig) ++ if (sig == 0) + sig = SIGTERM; + if (!stop) + oknodo = true; +- if (!TAILQ_FIRST(&schedule)) { +- if (test || oknodo) +- parse_schedule("0", sig); +- else +- parse_schedule(NULL, sig); +- } ++ if (retry) ++ parse_schedule(retry, sig); ++ else if (test || oknodo) ++ parse_schedule("0", sig); ++ else ++ parse_schedule(NULL, sig); + i = run_stop_schedule(exec, (const char *const *)margv, + pidfile, uid, quiet, verbose, test); diff --git a/sys-apps/openrc/files/0.4.1/0005-init-script-novserver.patch b/sys-apps/openrc/files/0.4.1/0005-init-script-novserver.patch new file mode 100644 index 0000000..91e14b6 --- /dev/null +++ b/sys-apps/openrc/files/0.4.1/0005-init-script-novserver.patch @@ -0,0 +1,25 @@ +Index: init.d/dmesg.in +=================================================================== +--- init.d/dmesg.in (revision 1465) ++++ init.d/dmesg.in (working copy) +@@ -7,6 +7,7 @@ + depend() + { + before dev modules ++ keyword novserver + } + + start() +Index: init.d/sysfs.in +=================================================================== +--- init.d/sysfs.in (revision 1465) ++++ init.d/sysfs.in (working copy) +@@ -6,7 +6,7 @@ + + depend() + { +- keyword noprefix ++ keyword noprefix novserver + } + + mount_sys() diff --git a/sys-apps/openrc/files/0.4.1/0006-openrc-utime.patch b/sys-apps/openrc/files/0.4.1/0006-openrc-utime.patch new file mode 100644 index 0000000..c0546f5 --- /dev/null +++ b/sys-apps/openrc/files/0.4.1/0006-openrc-utime.patch @@ -0,0 +1,510 @@ +Index: init.d/savecache.in +=================================================================== +--- init.d/savecache.in (revision 1474) ++++ init.d/savecache.in (working copy) +@@ -1,11 +1,18 @@ + #!@PREFIX@/sbin/runscript +-# Copyright 2007-2008 Roy Marples <roy@marples.name> ++# Copyright 2007-2009 Roy Marples <roy@marples.name> + # All rights reserved. Released under the 2-clause BSD license. + + description="Saves the caches OpenRC uses to non volatile storage" + + start() + { ++ if [ -e "${RC_SVCDIR}"/clock-skewed ]; then ++ ewarn "WARNING: clock skew detected!" ++ if ! yesno "savecache_skewed"; then ++ eerror "Not saving deptree cache" ++ return 1 ++ fi ++ fi + ebegin "Saving dependency cache" + if [ ! -d "${RC_LIBDIR}"/cache ]; then + rm -rf "${RC_LIBDIR}"/cache +Index: src/rc/rc-depend.c +=================================================================== +--- src/rc/rc-depend.c (revision 1474) ++++ src/rc/rc-depend.c (working copy) +@@ -4,7 +4,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -54,8 +54,10 @@ + int retval; + int serrno = errno; + int merrno; ++ time_t t; + +- if (rc_deptree_update_needed()) { ++ t = 0; ++ if (rc_deptree_update_needed(&t)) { + /* Test if we have permission to update the deptree */ + fd = open(RC_DEPTREE_CACHE, O_WRONLY); + merrno = errno; +@@ -67,7 +69,7 @@ + if (regen) + *regen = 1; + ebegin("Caching service dependencies"); +- retval = rc_deptree_update(); ++ retval = rc_deptree_update(&t); + eend (retval ? 0 : -1, "Failed to update the dependency tree"); + } + return rc_deptree_load(); +@@ -142,7 +144,7 @@ + + if (update) { + ebegin("Caching service dependencies"); +- update = rc_deptree_update(); ++ update = rc_deptree_update(NULL); + eend(update ? 0 : -1, "%s: %s", applet, strerror(errno)); + if (!update) + eerrorx("Failed to update the dependency tree"); +Index: src/rc/rc.c +=================================================================== +--- src/rc/rc.c (revision 1474) ++++ src/rc/rc.c (working copy) +@@ -9,7 +9,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -946,6 +946,8 @@ + /* Load our deptree */ + if ((deptree = _rc_deptree_load(®en)) == NULL) + eerrorx("failed to load deptree"); ++ if (exists(RC_DEPTREE_SKEWED)) ++ ewarn("WARNING: clock skew detected!"); + + /* Clean the failed services state dir */ + clean_failed(); +Index: src/rc/rc-applets.c +=================================================================== +--- src/rc/rc-applets.c (revision 1474) ++++ src/rc/rc-applets.c (working copy) +@@ -7,7 +7,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -451,7 +451,7 @@ + if (argc < 3) + exit (EXIT_FAILURE); + while (i < argc) { +- if (!rc_newer_than(argv[1], argv[i++])) ++ if (!rc_newer_than(argv[1], argv[i++], NULL)) + exit(EXIT_SUCCESS); + } + exit(EXIT_FAILURE); +@@ -461,7 +461,7 @@ + if (argc < 3) + exit (EXIT_FAILURE); + while (i < argc) { +- if (!rc_newer_than(argv[1], argv[i++])) ++ if (!rc_newer_than(argv[1], argv[i++], NULL)) + exit(EXIT_FAILURE); + } + exit(EXIT_SUCCESS); +Index: src/includes/rc-misc.h +=================================================================== +--- src/includes/rc-misc.h (revision 1474) ++++ src/includes/rc-misc.h (working copy) +@@ -4,7 +4,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -41,6 +41,7 @@ + #define RC_LEVEL_DEFAULT "default" + + #define RC_DEPTREE_CACHE RC_SVCDIR "/deptree" ++#define RC_DEPTREE_SKEWED RC_SVCDIR "/clock-skewed" + #define RC_KRUNLEVEL RC_SVCDIR "/krunlevel" + #define RC_STARTING RC_SVCDIR "/rc.starting" + #define RC_STOPPING RC_SVCDIR "/rc.stopping" +Index: src/librc/rc.h.in +=================================================================== +--- src/librc/rc.h.in (revision 1474) ++++ src/librc/rc.h.in (working copy) +@@ -1,5 +1,5 @@ + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -304,25 +304,31 @@ + + /*! Check to see if source is newer than target. + * If target is a directory then we traverse it and it's children. ++ * time_t returns the time of the newest file found if newer. + * @return true if source is newer than target, otherwise false */ +-bool rc_newer_than(const char *, const char *); ++bool rc_newer_than(const char *, const char *, time_t *); + +-/*! Check to see if source is newer than target. ++/*! Check to see if source is older than target. + * If target is a directory then we traverse it and it's children. +-* @return true if source is newer than target, otherwise false */ +-bool rc_older_than(const char *, const char *); ++ * time_t returns the time of the oldest file found if older. ++* @return true if source is older than target, otherwise false */ ++bool rc_older_than(const char *, const char *, time_t *); + + /*! Update the cached dependency tree if it's older than any init script, + * its configuration file or an external configuration file the init script + * has specified. ++ * time_t returns the time of the newest file that the dependency tree ++ * will be checked against. + * @return true if successful, otherwise false */ +-bool rc_deptree_update(void); ++bool rc_deptree_update(const time_t *); + + /*! Check if the cached dependency tree is older than any init script, + * its configuration file or an external configuration file the init script + * has specified. ++ * time_t returns the time of the newest file that the dependency tree ++ * will be checked against. + * @return true if it needs updating, otherwise false */ +-bool rc_deptree_update_needed(void); ++bool rc_deptree_update_needed(time_t *); + + /*! Load the cached dependency tree and return a pointer to it. + * This pointer should be freed with rc_deptree_free when done. +Index: src/librc/librc.h +=================================================================== +--- src/librc/librc.h (revision 1474) ++++ src/librc/librc.h (working copy) +@@ -4,7 +4,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -56,6 +56,7 @@ + #include <strings.h> + #include <time.h> + #include <unistd.h> ++#include <utime.h> + + #ifdef BSD + #include <sys/param.h> +Index: src/librc/librc-depend.c +=================================================================== +--- src/librc/librc-depend.c (revision 1474) ++++ src/librc/librc-depend.c (working copy) +@@ -4,7 +4,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -544,7 +544,7 @@ + librc_hidden_def(rc_deptree_order) + + static bool +-mtime_check(const char *source, const char *target, bool newer) ++mtime_check(const char *source, const char *target, bool newer, time_t *rel) + { + struct stat buf; + time_t mtime; +@@ -564,17 +564,29 @@ + return true; + + if (newer) { +- if (mtime < buf.st_mtime) +- return false; ++ if (mtime < buf.st_mtime) { ++ retval = false; ++ if (rel != NULL) { ++ if (*rel < buf.st_mtime) ++ *rel = buf.st_mtime; ++ } else ++ return retval; ++ } + } else { +- if (mtime > buf.st_mtime) +- return false; ++ if (mtime > buf.st_mtime) { ++ retval = false; ++ if (rel != NULL) { ++ if (*rel > buf.st_mtime) ++ *rel = buf.st_mtime; ++ } else ++ return retval; ++ } + } + + /* If not a dir then reset errno */ + if (!(dp = opendir(target))) { + errno = serrno; +- return true; ++ return retval; + } + + /* Check all the entries in the dir */ +@@ -582,26 +594,28 @@ + if (d->d_name[0] == '.') + continue; + snprintf(path, sizeof(path), "%s/%s", target, d->d_name); +- retval = mtime_check(source, path, newer); +- if (!retval) +- break; ++ if (!mtime_check(source, path, newer, rel)) { ++ retval = false; ++ if (rel == NULL) ++ break; ++ } + } + closedir(dp); + return retval; + } + + bool +-rc_newer_than(const char *source, const char *target) ++rc_newer_than(const char *source, const char *target, time_t *newest) + { + +- return mtime_check(source, target, true); ++ return mtime_check(source, target, true, newest); + } + librc_hidden_def(rc_newer_than) + + bool +-rc_older_than(const char *source, const char *target) ++rc_older_than(const char *source, const char *target, time_t *oldest) + { +- return mtime_check(source, target, false); ++ return mtime_check(source, target, false, oldest); + } + librc_hidden_def(rc_older_than) + +@@ -638,7 +652,7 @@ + }; + + bool +-rc_deptree_update_needed(void) ++rc_deptree_update_needed(time_t *newest) + { + bool newer = false; + RC_STRINGLIST *config; +@@ -652,31 +666,39 @@ + + /* Quick test to see if anything we use has changed and we have + * data in our deptree */ +- if (!existss(RC_DEPTREE_CACHE) || +- !rc_newer_than(RC_DEPTREE_CACHE, RC_INITDIR) || +- !rc_newer_than(RC_DEPTREE_CACHE, RC_CONFDIR) || ++ if (!existss(RC_DEPTREE_CACHE)) ++ return true; ++ if (!rc_newer_than(RC_DEPTREE_CACHE, RC_INITDIR, newest)) ++ newer = true; ++ if (!rc_newer_than(RC_DEPTREE_CACHE, RC_CONFDIR, newest)) ++ newer = true; + #ifdef RC_PKG_INITDIR +- !rc_newer_than(RC_DEPTREE_CACHE, RC_PKG_INITDIR) || ++ if (!rc_newer_than(RC_DEPTREE_CACHE, RC_PKG_INITDIR, newest)) ++ newer = true; + #endif + #ifdef RC_PKG_CONFDIR +- !rc_newer_than(RC_DEPTREE_CACHE, RC_PKG_CONFDIR) || ++ if (!rc_newer_than(RC_DEPTREE_CACHE, RC_PKG_CONFDIR, newest)) ++ newer = true; + #endif + #ifdef RC_LOCAL_INITDIR +- !rc_newer_than(RC_DEPTREE_CACHE, RC_LOCAL_INITDIR) || ++ if (!rc_newer_than(RC_DEPTREE_CACHE, RC_LOCAL_INITDIR, newest)) ++ newer = true; + #endif + #ifdef RC_LOCAL_CONFDIR +- !rc_newer_than(RC_DEPTREE_CACHE, RC_LOCAL_CONFDIR) || ++ if (!rc_newer_than(RC_DEPTREE_CACHE, RC_LOCAL_CONFDIR, newest)) ++ newer = true; + #endif +- !rc_newer_than(RC_DEPTREE_CACHE, "/etc/rc.conf")) +- return true; ++ if (!rc_newer_than(RC_DEPTREE_CACHE, "/etc/rc.conf", newest)) ++ newer = true; + + /* Some init scripts dependencies change depending on config files + * outside of baselayout, like syslog-ng, so we check those too. */ + config = rc_config_list(RC_DEPCONFIG); + TAILQ_FOREACH(s, config, entries) { +- if (!rc_newer_than(RC_DEPTREE_CACHE, s->value)) { ++ if (!rc_newer_than(RC_DEPTREE_CACHE, s->value, newest)) { + newer = true; +- break; ++ if (newest == NULL) ++ break; + } + } + rc_stringlist_free(config); +@@ -694,7 +716,7 @@ + Phase 6 saves the depinfo object to disk + */ + bool +-rc_deptree_update(void) ++rc_deptree_update(const time_t *newest) + { + FILE *fp; + RC_DEPTREE *deptree, *providers; +@@ -708,6 +730,8 @@ + size_t i, k, l; + bool retval = true; + const char *sys = rc_sys(); ++ struct stat buf; ++ struct utimbuf utimbuf; + + /* Some init scripts need RC_LIBDIR to source stuff + Ideally we should be setting our full env instead */ +@@ -958,6 +982,24 @@ + i++; + } + fclose(fp); ++ ++ if (newest) { ++ stat(RC_DEPTREE_CACHE, &buf); ++ if (buf.st_mtime < *newest) { ++ fprintf(stderr, "Clock skew detected!\n" ++ "Adjusting mtime of `" RC_DEPTREE_CACHE ++ "' to %s", ctime(newest)); ++ fp = fopen(RC_DEPTREE_SKEWED, "w"); ++ if (fp != NULL) ++ fclose(fp); ++ utimbuf.actime = *newest; ++ utimbuf.modtime = *newest; ++ utime(RC_DEPTREE_CACHE, &utimbuf); ++ } else { ++ if (exists(RC_DEPTREE_SKEWED)) ++ unlink(RC_DEPTREE_SKEWED); ++ } ++ } + } else { + fprintf(stderr, "fopen `%s': %s\n", + RC_DEPTREE_CACHE, strerror(errno)); +Index: man/rc-update.8 +=================================================================== +--- man/rc-update.8 (revision 1474) ++++ man/rc-update.8 (working copy) +@@ -1,4 +1,4 @@ +-.\" Copyright 2007-2008 Roy Marples ++.\" Copyright 2007-2009 Roy Marples + .\" All rights reserved + .\" + .\" Redistribution and use in source and binary forms, with or without +@@ -22,7 +22,7 @@ + .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + .\" SUCH DAMAGE. + .\" +-.Dd Jan 15, 2008 ++.Dd Jan 10, 2009 + .Dt RC-UPDATE 8 SMM + .Os OpenRC + .Sh NAME +@@ -38,6 +38,7 @@ + .Ar service + .Op Ar runlevel ... + .Nm ++.Op Fl u , -update + .Op Fl v , -verbose + .Ar show + .Op Ar runlevel ... +@@ -53,7 +54,7 @@ + directories. They must also conform to the OpenRC runscript standard. + .Pp + .Bl -tag -width "Fl a , -delete service" +-.It Fl a , -add Ar service ++.It Ar add Ar service + Add the + .Ar service + to the +@@ -72,6 +73,10 @@ + runlevels to show, then only those will be included in the output. + .It Fl v , -verbose + Show all services. ++.It Fl u , -update ++Forces an update of the dependency tree cache. ++This may be needed in the even of clock skew (a file in /etc is newer than the ++system clock). + .El + .Sh SEE ALSO + .Xr rc 8 , + +Index: src/rc/rc-update.c +=================================================================== +--- src/rc/rc-update.c~ 2008-12-23 10:45:41.000000000 +0000 ++++ src/rc/rc-update.c 2009-01-12 13:05:05.473806298 +0000 +@@ -4,7 +4,7 @@ + */ + + /* +- * Copyright 2007-2008 Roy Marples <roy@marples.name> ++ * Copyright 2007-2009 Roy Marples <roy@marples.name> + * All rights reserved + + * Redistribution and use in source and binary forms, with or without +@@ -135,11 +135,13 @@ + "Usage: rc-update [options] add service <runlevel>\n" \ + " rc-update [options] del service <runlevel>\n" \ + " rc-update [options] show" +-#define getoptstring getoptstring_COMMON ++#define getoptstring "u" getoptstring_COMMON + static const struct option longopts[] = { ++ { "update", 0, NULL, 'u' }, + longopts_COMMON + }; + static const char * const longopts_help[] = { ++ "Force an update of the dependency tree", + longopts_help_COMMON + }; + #include "_usage.c" +@@ -155,7 +157,7 @@ + char *service = NULL; + char *p; + int action = 0; +- bool verbose = false; ++ bool verbose = false, update; + int opt; + int retval = EXIT_FAILURE; + int num_updated = 0; +@@ -163,8 +165,15 @@ + int ret; + + while ((opt = getopt_long(argc, argv, getoptstring, +- longopts, (int *) 0)) != -1) ++ longopts, (int *)0)) != -1) + switch (opt) { ++ case 'u': ++ ebegin("Caching service dependencies"); ++ update = rc_deptree_update(NULL); ++ eend(update ? 0 : -1, "%s: %s", applet, strerror(errno)); ++ if (!update) ++ eerrorx("Failed to update the dependency tree"); ++ return 0; + case_RC_COMMON_GETOPT + } + + diff --git a/sys-apps/openrc/openrc-0.4.0.ebuild b/sys-apps/openrc/openrc-0.4.1-r2.ebuild index 8e7f36d..8e7f36d 100644 --- a/sys-apps/openrc/openrc-0.4.0.ebuild +++ b/sys-apps/openrc/openrc-0.4.1-r2.ebuild |