summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-support/daemontools
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 10:05:37 -0700
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-22 21:26:31 -0400
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-support/daemontools
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadtalos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.gz
talos-openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.zip
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/daemontools')
-rw-r--r--meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-Fix-QA-Issue.patch26
-rw-r--r--meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-native-Fix-a-warning.patch26
-rw-r--r--meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-error.h-include-errno.h-instead-of-extern-int.diff25
-rw-r--r--meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff47
-rw-r--r--meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch45
-rw-r--r--meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb51
6 files changed, 220 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-Fix-QA-Issue.patch b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-Fix-QA-Issue.patch
new file mode 100644
index 000000000..30e37cb1d
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-Fix-QA-Issue.patch
@@ -0,0 +1,26 @@
+From a86c4209da695909424db0c9108592194a3094b7 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Sat, 6 Aug 2016 00:47:37 +0900
+Subject: [PATCH] daemontools: Fix QA Issue
+
+To fix the QA Issues as following:
+
+ERROR: daemontools-0.76-r0 do_package_qa: QA Issue: No GNU_HASH in the elf binary: '/build-poky/tmp/work/i586-poky-linux/daemontools/0.76-r0/packages-split/daemontools/usr/bin/tai64nlocal'
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ src/conf-ld | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/conf-ld b/src/conf-ld
+index 2a44210..c7e7755 100644
+--- a/src/conf-ld
++++ b/src/conf-ld
+@@ -1,3 +1,3 @@
+-${CC}
++${CC} ${LDFLAGS}
+
+ This will be used to link .o files into an executable.
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-native-Fix-a-warning.patch b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-native-Fix-a-warning.patch
new file mode 100644
index 000000000..8d9577d5f
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-daemontools-native-Fix-a-warning.patch
@@ -0,0 +1,26 @@
+From a43a3327ccd4b06a3bcf0c87d518a97c6b39ac02 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@cn.fujitsu.com>
+Date: Sat, 6 Aug 2016 02:09:53 +0900
+Subject: [PATCH] daemontools: Fix a warning
+
+To fix the warning as following:
+
+WARNING: daemontools-native-0.76-r0 do_populate_sysroot: File '/build-poky/tmp/sysroots/x86_64-linux/usr/bin/chkshsgr' from daemontools-native was already stripped, this will prevent future debugging!
+
+Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
+---
+ src/conf-ld | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/conf-ld b/src/conf-ld
+index 59a0de7..1d0518a 100644
+--- a/src/conf-ld
++++ b/src/conf-ld
+@@ -1,3 +1,3 @@
+-gcc -s
++gcc
+
+ This will be used to link .o files into an executable.
+--
+2.7.4
+
diff --git a/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-error.h-include-errno.h-instead-of-extern-int.diff b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-error.h-include-errno.h-instead-of-extern-int.diff
new file mode 100644
index 000000000..ce1959782
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0001-error.h-include-errno.h-instead-of-extern-int.diff
@@ -0,0 +1,25 @@
+From d3e7651e2f2492dd1031d09a99713644b604cab5 Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Wed, 12 Dec 2007 13:44:15 +0000
+Subject: [PATCH] error.h: '#include <errno.h>' instead of 'extern int errno;'
+
+---
+ daemontools-0.76/src/error.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git daemontools-0.76.orig/src/error.h daemontools-0.76/src/error.h
+index 086fb55..f7e8273 100644
+--- daemontools-0.76.orig/src/error.h
++++ daemontools-0.76/src/error.h
+@@ -3,7 +3,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
+--
+1.5.4.2
+
diff --git a/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff
new file mode 100644
index 000000000..73dce9072
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff
@@ -0,0 +1,47 @@
+From 7ee585cab1d5b68f804a5601a66ae87799c8a7c3 Mon Sep 17 00:00:00 2001
+From: Gerrit Pape <pape@smarden.org>
+Date: Sun, 24 Feb 2008 10:54:26 +0000
+Subject: [PATCH] supervise.c: ./supervise may be a symlink, if it's dangling, create link target
+
+---
+ daemontools-0.76/src/supervise.c | 17 ++++++++++++++++-
+ 1 files changed, 16 insertions(+), 1 deletions(-)
+
+diff --git daemontools-0.76.orig/src/supervise.c daemontools-0.76/src/supervise.c
+index 2482ad2..f43cabf 100644
+--- daemontools-0.76.orig/src/supervise.c
++++ daemontools-0.76/src/supervise.c
+@@ -208,6 +208,8 @@ void doit(void)
+ int main(int argc,char **argv)
+ {
+ struct stat st;
++ int r;
++ char buf[256];
+
+ dir = argv[1];
+ if (!dir || argv[2])
+@@ -232,7 +234,20 @@ int main(int argc,char **argv)
+ if (errno != error_noent)
+ strerr_die4sys(111,FATAL,"unable to stat ",dir,"/down: ");
+
+- mkdir("supervise",0700);
++ if (mkdir("supervise",0700) == -1) {
++ if ((r = readlink("supervise", buf, 256)) != -1) {
++ if (r == 256) {
++ errno = EOVERFLOW;
++ strerr_die1sys(111,"unable to readlink ./supervise: ");
++ }
++ buf[r] = 0;
++ mkdir(buf, 0700);
++ }
++ else {
++ if ((errno != ENOENT) && (errno != EINVAL))
++ strerr_die1sys(111, "unable to readlink ./supervise: ");
++ }
++ }
+ fdlock = open_append("supervise/lock");
+ if ((fdlock == -1) || (lock_exnb(fdlock) == -1))
+ strerr_die4sys(111,FATAL,"unable to acquire ",dir,"/supervise/lock: ");
+--
+1.5.4.2
+
diff --git a/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch
new file mode 100644
index 000000000..f164c2d10
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools/cross-compile.patch
@@ -0,0 +1,45 @@
+make sure it can be compiled for cross target
+
+1. never try to compile target binary by native gcc
+2. target's chkshsgr doesn't work on native.
+3. it's wrong to do target tests on native.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+diff -Nurp daemontools-0.76.orig/src/conf-cc daemontools-0.76/src/conf-cc
+--- daemontools-0.76.orig/src/conf-cc 2001-07-13 00:49:49.000000000 +0800
++++ daemontools-0.76/src/conf-cc 2014-11-26 09:34:38.828812162 +0800
+@@ -1,3 +1,3 @@
+-gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
++${CC} -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
+
+ This will be used to compile .c files.
+diff -Nurp daemontools-0.76.orig/src/conf-ld daemontools-0.76/src/conf-ld
+--- daemontools-0.76.orig/src/conf-ld 2001-07-13 00:49:49.000000000 +0800
++++ daemontools-0.76/src/conf-ld 2014-11-26 09:34:49.880811730 +0800
+@@ -1,3 +1,3 @@
+-gcc -s
++${CC}
+
+ This will be used to link .o files into an executable.
+diff -Nurp daemontools-0.76.orig/src/Makefile daemontools-0.76/src/Makefile
+--- daemontools-0.76.orig/src/Makefile 2001-07-13 00:49:49.000000000 +0800
++++ daemontools-0.76/src/Makefile 2014-11-26 09:38:47.120802459 +0800
+@@ -165,7 +165,7 @@ hassgprm.h: choose compile hassgprm.h1 h
+
+ hasshsgr.h: chkshsgr choose compile hasshsgr.h1 hasshsgr.h2 load \
+ tryshsgr.c warn-shsgr
+- ./chkshsgr || ( cat warn-shsgr; exit 1 )
++ chkshsgr || ( cat warn-shsgr; exit 1 )
+ ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
+
+ haswaitp.h: choose compile haswaitp.h1 haswaitp.h2 load trywaitp.c
+@@ -265,7 +265,7 @@ readproctitle.o: compile error.h readpro
+ rts: envdir envuidgid fghack matchtest multilog pgrphack \
+ readproctitle rts.tests setlock setuidgid softlimit supervise svc \
+ svok svscan svscanboot svstat tai64n tai64nlocal
+- env - /bin/sh rts.tests 2>&1 | cat -v > rts
++ echo "Warning: We can not run test on cross target."
+
+ scan_ulong.o: compile scan.h scan_ulong.c
+ ./compile scan_ulong.c
diff --git a/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
new file mode 100644
index 000000000..84e9bca0e
--- /dev/null
+++ b/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
@@ -0,0 +1,51 @@
+SUMMARY = "DJB daemontools"
+HOMEPAGE = "http://cr.yp.to/daemontools.html"
+DESCRIPTION = "supervise monitors a service. It starts the service and restarts the \
+service if it dies. The companion svc program stops, pauses, or restarts \
+the service on sysadmin request. The svstat program prints a one-line \
+status report. \
+multilog saves error messages to one or more logs. It optionally timestamps \
+each line and, for each log, includes or excludes lines matching specified \
+patterns. It automatically rotates logs to limit the amount of disk space \
+used. If the disk fills up, it pauses and tries again, without losing any \
+data."
+
+SECTION = "System/Servers"
+
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/PD;md5=b3597d12946881e13cb3b548d1173851"
+LICENSE = "PD"
+
+SRC_URI = "http://cr.yp.to/daemontools/${BPN}-${PV}.tar.gz \
+ file://0001-error.h-include-errno.h-instead-of-extern-int.diff \
+ file://0002-supervise.c-.-supervise-may-be-a-symlink-if-it-s-da.diff "
+
+SRC_URI_append_class-target = "file://cross-compile.patch \
+ file://0001-daemontools-Fix-QA-Issue.patch "
+
+SRC_URI_append_class-native = "file://0001-daemontools-native-Fix-a-warning.patch "
+
+SRC_URI[md5sum] = "1871af2453d6e464034968a0fbcb2bfc"
+SRC_URI[sha256sum] = "a55535012b2be7a52dcd9eccabb9a198b13be50d0384143bd3b32b8710df4c1f"
+
+S = "${WORKDIR}/admin/${BPN}-${PV}"
+
+DEPENDS += "daemontools-native"
+DEPENDS_class-native = ""
+
+do_compile() {
+ ./package/compile
+}
+
+do_install() {
+ install -d ${D}/${bindir}
+}
+
+do_install_append_class-native() {
+ install -m 755 ${S}/compile/chkshsgr ${D}/${bindir}
+}
+
+do_install_append_class-target() {
+ install -m755 ${S}/command/* ${D}/${bindir}
+}
+
+BBCLASSEXTEND = "native"
OpenPOWER on IntegriCloud