daemon: new package
PATCH v2 1/1 daemon: new package
---
v2: add target installation (thanks Romain)
--- DEVELOPERS | 1 + package/Config.in | 1 + package/daemon/0001-fix-musl.patch | 18 ++++++++++++++++++ package/daemon/Config.in | 7 +++++++ package/daemon/daemon.hash | 3 +++ package/daemon/daemon.mk | 25 +++++++++++++++++++++++++ 6 files changed, 55 insertions(+) create mode 100644 package/daemon/0001-fix-musl.patch create mode 100644 package/daemon/Config.in create mode 100644 package/daemon/daemon.hash create mode 100644 package/daemon/daemon.mk
DEVELOPERS +1 -0
@@ -140,6 +140,7 @@ F: package/pulseview/ F: package/sigrok-cli/ N: Baruch Siach <[email protected]> +F: package/daemon/ F: package/ebtables/ F: package/openipmi/ F: package/ti-uim/
package/Config.in +1 -0
@@ -1795,6 +1795,7 @@ menu "System tools" source "package/circus/Config.in" source "package/coreutils/Config.in" source "package/cpuload/Config.in" + source "package/daemon/Config.in" source "package/dc3dd/Config.in" source "package/dcron/Config.in" source "package/ddrescue/Config.in"
package/daemon/0001-fix-musl.patch new file +18 -0
@@ -0,0 +1,18 @@ +daemon: fix build with musl + +musl requires the ttydefaults.h to be included explicitly for CEOF. + +Signed-off-by: Baruch Siach <[email protected]> +--- + +diff -Nuar daemon-0.6.4-orig/daemon.c daemon-0.6.4/daemon.c +--- daemon-0.6.4-orig/daemon.c 2010-06-12 16:37:00.000000000 +0300 ++++ daemon-0.6.4/daemon.c 2017-05-01 22:02:17.721413468 +0300 +@@ -665,6 +665,7 @@ + #ifdef _RESTORE_POSIX_SOURCE + #define _POSIX_SOURCE + #endif ++#include <sys/ttydefaults.h> + #include <sys/wait.h> + #include <sys/stat.h> + #include <sys/select.h>
package/daemon/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_DAEMON + bool "daemon" + depends on BR2_USE_MMU # fork() + help + Daemon turns other process into daemons. + + http://www.libslack.org/daemon/
package/daemon/daemon.hash new file +3 -0
@@ -0,0 +1,3 @@ +# md5 from http://www.libslack.org/daemon/; sha256 locally calculated +md5 6cd0a28630a29ac279bc501f39baec66 daemon-0.6.4.tar.gz +sha256 c4b9ea4aa74d55ea618c34f1e02c080ddf368549037cb239ee60c83191035ca1 daemon-0.6.4.tar.gz
package/daemon/daemon.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# daemon +# +################################################################################ + +DAEMON_VERSION = 0.6.4 +DAEMON_SITE = http://libslack.org/daemon/download +DAEMON_LICENSE = GPL-2.0+ +DAEMON_LICENSE_FILES = LICENSE + +define DAEMON_CONFIGURE_CMDS + (cd $(@D); ./config) +endef + +define DAEMON_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define DAEMON_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) \ + install-daemon-bin +endef + +$(eval $(generic-package))
Signature · 1 line
2.11.0
PATCH v2 1/1 daemon: new package
Hi Baruch,
Le 01/05/2017 ? 22:03, Baruch Siach a ?crit :
Quoted 3 lines
Signed-off-by Baruch Siach <[email protected]>---
v2: add target installation (thanks Romain)
You're welcome!
[...]
Quoted 18 lines
package/daemon/daemon.mk new file +12
-0@@ -0,0 +1,25 @@ +################################################################################ +# +# daemon +# +################################################################################ + +DAEMON_VERSION = 0.6.4 +DAEMON_SITE = http://libslack.org/daemon/download +DAEMON_LICENSE = GPL-2.0+ +DAEMON_LICENSE_FILES = LICENSE + +define DAEMON_CONFIGURE_CMDS
package/daemon/daemon.mk line 22
Quoted 10 lines
package/daemon/daemon.mk new file +10
-0+ (cd $(@D); ./config) +endef + +define DAEMON_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define DAEMON_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) \ + install-daemon-bin
There is still an issue with install-daemon-bin target... it try to strip the binary with the strip tool from the host.
This cause a failure:
case "$DEB_BUILD_OPTIONS" in *nostrip*);; *) strip output/target/usr/bin/daemon;; esac
strip: Unable to recognise the format of the input file ? output/target/usr/bin/daemon ?
Add DEB_BUILD_OPTIONS="nostrip" in DAEMON_INSTALL_TARGET_CMDS.
Best regards,
Romain
Quoted 4 lines
package/daemon/daemon.mk new file +3
-0+endef + +$(eval $(generic-package))
PATCH v2 1/1 daemon: new package
In reply to Baruch SiachHi Baruch,
Le 01/05/2017 ? 22:03, Baruch Siach a ?crit :
package/daemon/Config.in line 3
Quoted 13 lines
Signed-off-by Baruch Siach <[email protected]>---
v2: add target installation (thanks Romain)
---new file mode 100644
index 000000000000..30954e77edc7package/daemon/Config.in new file +3
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_DAEMON + bool "daemon" + depends on BR2_USE_MMU # fork()
It also needs thread support:
In file included from libslack/coproc.c:56:0:libslack/std.h:102:21: fatal error: pthread.h: No such file or directory
Best regards,
Romain
Quoted 6 lines
package/daemon/Config.in new file +4
-0+ help + Daemon turns other process into daemons. + + http://www.libslack.org/daemon/
PATCH v2 1/1 daemon: new package
Hi Romain,
Quoted 17 lines · Romain Naour
Le 01/05/2017 ? 22:03, Baruch Siach a ?crit :
package/daemon/Config.in line 3
Quoted 13 lines
Signed-off-by Baruch Siach <[email protected]>---
v2: add target installation (thanks Romain)
---new file mode 100644
index 000000000000..30954e77edc7package/daemon/Config.in new file +3
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_DAEMON + bool "daemon" + depends on BR2_USE_MMU # fork()It also needs thread support:
Quoted 2 lines
In file included from
libslack/coproc.c:56:0:libslack/std.h:102:21: fatal error:pthread.h: No such file or directory
Thanks for your thorough review.
I'll fix and resubmit.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -