summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2009-04-18 11:17:17 +0000
committerBenedikt Boehm <hollow@gentoo.org>2009-04-18 11:17:17 +0000
commitc8e24265acaf827347ffef7bc174c3508008c47b (patch)
tree4608608c7def0236f813ea9389457c1900ff1565 /sys-apps/openrc
parentUnmask perl-core/IO-Compress-Bzip2-2.015 and perl-core/Compress-Raw-Bzip2-2.015 (diff)
downloadhistorical-c8e24265acaf827347ffef7bc174c3508008c47b.tar.gz
historical-c8e24265acaf827347ffef7bc174c3508008c47b.tar.bz2
historical-c8e24265acaf827347ffef7bc174c3508008c47b.zip
backport r1523 and r1524 to fix compile on FreeBSD and still provide the system status function in custom hooks
Package-Manager: portage-2.2_rc28/cvs/Linux i686
Diffstat (limited to 'sys-apps/openrc')
-rw-r--r--sys-apps/openrc/ChangeLog7
-rw-r--r--sys-apps/openrc/Manifest4
-rw-r--r--sys-apps/openrc/files/0.4.3/0002-support-custom-status.patch80
3 files changed, 79 insertions, 12 deletions
diff --git a/sys-apps/openrc/ChangeLog b/sys-apps/openrc/ChangeLog
index cd41c0ff3773..a0cf419f3cab 100644
--- a/sys-apps/openrc/ChangeLog
+++ b/sys-apps/openrc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/openrc
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.66 2009/04/18 10:40:17 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/openrc/ChangeLog,v 1.67 2009/04/18 11:17:17 hollow Exp $
+
+ 18 Apr 2009; Benedikt Böhm <hollow@gentoo.org>
+ files/0.4.3/0002-support-custom-status.patch:
+ backport r1523 and r1524 to fix compile on FreeBSD and still provide the
+ system status function in custom hooks
*openrc-0.4.3-r2 (18 Apr 2009)
diff --git a/sys-apps/openrc/Manifest b/sys-apps/openrc/Manifest
index ebf58c67c70b..d8dfe5688e00 100644
--- a/sys-apps/openrc/Manifest
+++ b/sys-apps/openrc/Manifest
@@ -8,7 +8,7 @@ AUX 0.4.2/0002-useful-functions.patch 1803 RMD160 be1963ad7d51deb8ffc96d9ce5d7c5
AUX 0.4.2/0003-KV.patch 2569 RMD160 7ccbca71beba996aedcec5aa1def57a96c008893 SHA1 d3489d7a34f9984b4267819677b5e4549c12fc00 SHA256 dab3a00036718ea99058f362d84a4bac5e9bbd4eff934f1ad1d4da85c8551539
AUX 0.4.2/0004-svn-version.patch 450 RMD160 7e85a0b4e08bd9554749ab384ce61bab4b7ddd21 SHA1 bfcd2eb61affc819f2ecabc420dc9e9c08dc4179 SHA256 f3877a994690912998daae1144a3564eea7a15d841df41af4ca93a37566cce46
AUX 0.4.3/0001-fix-is_older_than.patch 896 RMD160 8e0cf759932312ddab7e6dfc06c0e08c27f94629 SHA1 a3d9d3ab2d47f2f75529bd32a02ad4541b4aef18 SHA256 d047b14b49c7ce5bf53167a6e0b47d7c23830d91eeeb25d9e0df1330f9f1b1ab
-AUX 0.4.3/0002-support-custom-status.patch 4144 RMD160 5c59d542a1950fdcdfe95bc304b14c314018bd17 SHA1 51f552cd8fe551ec09fd7ae89f367b76aeb55dec SHA256 ba52546509ae96c146b9daca3549ef774961c5a88710331675fcf22375ffa8a8
+AUX 0.4.3/0002-support-custom-status.patch 5529 RMD160 b86c26a3f4190dcafc9061e360cac2b45b801fbd SHA1 7e3381e8e13cff93037fe85a9047563348b8aff4 SHA256 f8bbd189054873179d5fa03a50ca513d28efde5888b2b93ffd9de51ed21af362
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
@@ -20,5 +20,5 @@ EBUILD openrc-0.4.2.ebuild 10228 RMD160 769c35cd085c3b45d722321c1d13d35b8c4c7283
EBUILD openrc-0.4.3-r1.ebuild 10401 RMD160 441494782af660a954102d347411d0905d9f2520 SHA1 7826444c7fafd4a20f0feca79449e1fc5dc7f8ed SHA256 8bb06d5f79a3010b2060a75ef7770cd95baf71c6be9c59cda7e7288531c5fa06
EBUILD openrc-0.4.3-r2.ebuild 10462 RMD160 859a50cfa5df320b39caaa6f6436d868850f85f5 SHA1 c86ce35a213a258f9000c26e8b0b741c8ca1d5de SHA256 137c15b63436629b95dff971fc41bfc80c37fbc75d8b6a1df763b6127f8f7a32
EBUILD openrc-9999.ebuild 10129 RMD160 8a832f78324e5d6c72c31dbfcf86b0da2732802b SHA1 00a8eb5b146e24fc0b8ffb8b374cb2d631ad0d2d SHA256 0f2dc2caf6471ee98530b1dd038c2656be660c2d413fc346241bd5f343ace4b7
-MISC ChangeLog 13752 RMD160 be872328f494b7399c7be21ec3180c513068b508 SHA1 220d80aeeb6b9dd617689b07e67ff9c9c1cd5557 SHA256 3a38a6c2f7c3ab6717ff2cf64eecb7666beec250d8a450271dfc33a1864dae31
+MISC ChangeLog 13967 RMD160 84562877f040831cf8d248d4c3eea9f67bcf321f SHA1 1cbe2c107beee782563d7f7d3cd25585ec997808 SHA256 1e6a1d2c1d5c62d913694ac09f564b57f25a0013584b01bbfcc9c45a1be1a1e9
MISC metadata.xml 314 RMD160 ff92ab9cd3f1f3caf25d0be59cf658343d44991c SHA1 d9febb1ce1499c949a2478defda945a3ce716f73 SHA256 4eb82a61b3697027b5ccb1a328a763308c7e090aa23f69fe87b7b7966165fb33
diff --git a/sys-apps/openrc/files/0.4.3/0002-support-custom-status.patch b/sys-apps/openrc/files/0.4.3/0002-support-custom-status.patch
index 97b27bf5f2b9..7459eacdd3db 100644
--- a/sys-apps/openrc/files/0.4.3/0002-support-custom-status.patch
+++ b/sys-apps/openrc/files/0.4.3/0002-support-custom-status.patch
@@ -2,12 +2,13 @@ Index: openrc-0.4.3/sh/runscript.sh.in
===================================================================
--- openrc-0.4.3.orig/sh/runscript.sh.in
+++ openrc-0.4.3/sh/runscript.sh.in
-@@ -45,6 +45,31 @@ describe()
+@@ -45,7 +45,32 @@ describe()
done
}
+-# Template start / stop functions
+# Report status
-+status()
++_status()
+{
+ if service_stopping; then
+ ewarn "status: stopping"
@@ -31,10 +32,23 @@ Index: openrc-0.4.3/sh/runscript.sh.in
+ fi
+}
+
- # Template start / stop functions
++# Template start / stop / status functions
start()
{
-@@ -134,7 +159,7 @@ unset _f
+ [ -n "${command}" ] || return 0
+@@ -85,6 +110,11 @@ stop()
+ eend $? "Failed to stop ${RC_SVCNAME}"
+ }
+
++status()
++{
++ _status
++}
++
+ yesno ${RC_DEBUG} && set -x
+
+ _conf_d=${RC_SERVICE%/*}/../conf.d
+@@ -134,7 +164,7 @@ unset _f
while [ -n "$1" ]; do
# See if we have the required function and run it
@@ -75,7 +89,15 @@ Index: openrc-0.4.3/src/rc/runscript.c
===================================================================
--- openrc-0.4.3.orig/src/rc/runscript.c
+++ openrc-0.4.3/src/rc/runscript.c
-@@ -412,11 +412,10 @@ write_prefix(const char *buffer, size_t
+@@ -34,6 +34,7 @@
+ #include <sys/file.h>
+ #include <sys/param.h>
+ #include <sys/stat.h>
++#include <sys/wait.h>
+
+ #include <ctype.h>
+ #include <dlfcn.h>
+@@ -412,11 +413,10 @@ write_prefix(const char *buffer, size_t
return ret;
}
@@ -89,7 +111,7 @@ Index: openrc-0.4.3/src/rc/runscript.c
struct termios tt;
struct winsize ws;
int i;
-@@ -527,13 +526,13 @@ svc_exec(const char *arg1, const char *a
+@@ -527,13 +527,13 @@ svc_exec(const char *arg1, const char *a
master_tty = -1;
}
@@ -107,7 +129,47 @@ Index: openrc-0.4.3/src/rc/runscript.c
}
static bool
-@@ -881,7 +880,7 @@ svc_start(bool deps)
+@@ -584,39 +584,6 @@ svc_wait(const char *svc)
+ return retval;
+ }
+
+-static RC_SERVICE
+-svc_status(void)
+-{
+- char status[10];
+- int (*e) (const char *fmt, ...) EINFO_PRINTF(1, 2) = einfo;
+- RC_SERVICE state = rc_service_state(service);
+-
+- if (state & RC_SERVICE_STOPPING) {
+- snprintf(status, sizeof(status), "stopping");
+- e = ewarn;
+- } else if (state & RC_SERVICE_STARTING) {
+- snprintf(status, sizeof(status), "starting");
+- e = ewarn;
+- } else if (state & RC_SERVICE_INACTIVE) {
+- snprintf(status, sizeof(status), "inactive");
+- e = ewarn;
+- } else if (state & RC_SERVICE_STARTED) {
+- errno = 0;
+- if (_rc_can_find_pids() &&
+- rc_service_daemons_crashed(service) &&
+- errno != EACCES)
+- {
+- snprintf(status, sizeof(status), "crashed");
+- e = eerror;
+- } else
+- snprintf(status, sizeof(status), "started");
+- } else
+- snprintf(status, sizeof(status), "stopped");
+-
+- e("status: %s", status);
+- return state;
+-}
+-
+ static void
+ make_exclusive(void)
+ {
+@@ -881,7 +848,7 @@ svc_start(bool deps)
setenv("IN_BACKGROUND", ibsave, 1);
hook_out = RC_HOOK_SERVICE_START_DONE;
rc_plugin_run(RC_HOOK_SERVICE_START_NOW, applet);
@@ -116,7 +178,7 @@ Index: openrc-0.4.3/src/rc/runscript.c
if (ibsave)
unsetenv("IN_BACKGROUND");
-@@ -1058,7 +1057,7 @@ svc_stop(bool deps)
+@@ -1058,7 +1025,7 @@ svc_stop(bool deps)
setenv("IN_BACKGROUND", ibsave, 1);
hook_out = RC_HOOK_SERVICE_STOP_DONE;
rc_plugin_run(RC_HOOK_SERVICE_STOP_NOW, applet);
@@ -125,7 +187,7 @@ Index: openrc-0.4.3/src/rc/runscript.c
if (ibsave)
unsetenv("IN_BACKGROUND");
-@@ -1383,10 +1382,10 @@ runscript(int argc, char **argv)
+@@ -1383,10 +1350,10 @@ runscript(int argc, char **argv)
rc_stringlist_free(services);
services = NULL;
} else if (strcmp (optarg, "status") == 0) {