Skip to contentSkip to conversation

package/haveged: add systemd units

PATCH New Steven Noonan 3 participants 5 messages Mar 19, 2015 – Jun 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/haveged: add systemd units

---
 package/haveged/haveged.mk      |  8 ++++++++
 package/haveged/haveged.service | 10 ++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 package/haveged/haveged.service
package/haveged/haveged.mk +8 -0
index 88d85cd..c68f766 100644
@@ -14,4 +14,12 @@ define HAVEGED_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S21haveged
 endef
 
+define HAVEGED_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 package/haveged/haveged.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/haveged.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -fs /usr/lib/systemd/system/haveged.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/haveged.service
+endef
+
 $(eval $(autotools-package))
package/haveged/haveged.service new file +10 -0
new file mode 100644
index 0000000..d87fe5b
@@ -0,0 +1,10 @@
+[Unit]
+Description=Entropy Harvesting Daemon
+Documentation=man:haveged(8)
+
+[Service]
+ExecStart=/usr/bin/haveged -F -w 1024 -v 1
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
2.3.3
#1 lore raw

PATCH 1/1 package/libpthsem: correctly handle --{en, dis}able-debug arguments on configure

The pthsem package was incorrectly handling --{en,dis}able-debug. If either of the two were provided, it always assumed that meant that debugging should be enabled, which resulted in *extremely* noisy debug logging (e.g. this can be observed by generating a GPG keypair).

This patch makes pthsem handle the argument correctly.

---
 .../0002-fix-configure-disable-debug.patch         | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 package/libpthsem/0002-fix-configure-disable-debug.patch
package/libpthsem/0002-fix-configure-disable-debug.patch new file +54 -0
new file mode 100644
index 0000000..512291e
@@ -0,0 +1,54 @@
+The existing pthsem configure script incorrectly handles the enable-debug and
+disable-debug arguments. The inside of the AC_ARG_ENABLE conditional indicates
+whether or not the value was explicitly defined by the user, not that it was
+enabled. The value of "$enableval" should be checked in order for it to work.
+
+Source: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Package-Options.html
+
+Signed-off-by: Steven Noonan <[email protected]>
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 03b42de..a5b3f98 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -344,7 +344,21 @@ AC_DEFUN(AC_CHECK_DEBUGGING,[dnl
+ AC_ARG_ENABLE(debug,dnl
+ [  --enable-debug          build for debugging (default=no)],
+ [dnl
+-if test ".$ac_cv_prog_gcc" = ".yes"; then
++case "${enableval}" in
++yes)
++  msg="enabled" ;;
++no)
++  msg="disabled" ;;
++esac
++],[
++msg="disabled"
++])dnl
++AC_MSG_CHECKING(for compilation debug mode)
++AC_MSG_RESULT([$msg])
++if test ".$msg" = .enabled; then
++  AC_DEFINE(PTH_DEBUG, 1, [define to enable Pth debugging])
++  enable_shared=no
++  if test ".$ac_cv_prog_gcc" = ".yes"; then
+     case $PLATFORM in
+         *-*-freebsd*|*-*-solaris* ) CFLAGS="$CFLAGS -pedantic" ;;
+     esac
+@@ -354,16 +368,7 @@ if test ".$ac_cv_prog_gcc" = ".yes"; then
+     AC_COMPILER_OPTION(wmore, -W<xxx>, $WMORE, CFLAGS="$CFLAGS $WMORE")
+     AC_COMPILER_OPTION(wnolonglong, -Wno-long-long, -Wno-long-long, CFLAGS="$CFLAGS -Wno-long-long")
+     AC_COMPILER_OPTION(fnostrictaliasing, -fno-strict-aliasing, -fno-strict-aliasing, CFLAGS="$CFLAGS -fno-strict-aliasing")
+-fi
+-msg="enabled"
+-AC_DEFINE(PTH_DEBUG, 1, [define to enable Pth debugging])
+-],[
+-msg="disabled"
+-])dnl
+-AC_MSG_CHECKING(for compilation debug mode)
+-AC_MSG_RESULT([$msg])
+-if test ".$msg" = .enabled; then
+-    enable_shared=no
++  fi
+ fi
+ ])
+ 
Signature · 1 line
2.3.3
#2 lore raw

PATCH 1/1 package/libpthsem: correctly handle --{en, dis}able-debug arguments on configure

Dear Steven Noonan,

Quoted 5 lines · Steven Noonan

The pthsem package was incorrectly handling --{en,dis}able-debug. If either of the two were provided, it always assumed that meant that debugging should be enabled, which resulted in *extremely* noisy debug logging (e.g. this can be observed by generating a GPG keypair).

Quoted 7 lines

This patch makes pthsem handle the argument correctly.

---
 .../0002-fix-configure-disable-debug.patch         | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 package/libpthsem/0002-fix-configure-disable-debug.patch

We are no longer passing --enable-debug / --disable-debug to packages, so I believe this patch is no longer necessary. I've marked it as "Rejected" in our patch tracking system. If you think it is still needed, to do hesitate to switch it back to the "New" state (or ask us to do so if you don't have a patchwork account).

For reference, the URL of the patch in patchwork is:

	http://patchwork.ozlabs.org/patch/452271/

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/1 package/haveged: add systemd units

In reply to Steven Noonan
Quoted 47 lines · Steven Noonan
---
 package/haveged/haveged.mk      |  8 ++++++++
 package/haveged/haveged.service | 10 ++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 package/haveged/haveged.service
package/haveged/haveged.mk +8 -0
index 88d85cd..c68f766 100644
@@ -14,4 +14,12 @@ define HAVEGED_INSTALL_INIT_SYSV
                $(TARGET_DIR)/etc/init.d/S21haveged
 endef
 
+define HAVEGED_INSTALL_INIT_SYSTEMD
+       $(INSTALL) -D -m 644 package/haveged/haveged.service \
+               $(TARGET_DIR)/usr/lib/systemd/system/haveged.service
+       mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+       ln -fs /usr/lib/systemd/system/haveged.service \
+               $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/haveged.service
+endef
+
 $(eval $(autotools-package))
package/haveged/haveged.service new file +10 -1
new file mode 100644
index 0000000..d87fe5b
@@ -0,0 +1,10 @@
+[Unit]
+Description=Entropy Harvesting Daemon
+Documentation=man:haveged(8)
+
+[Service]
+ExecStart=/usr/bin/haveged -F -w 1024 -v 1
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target
--

2.3.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH 1/1 package/haveged: add systemd units

In reply to Steven Noonan

Dear Steven Noonan,

Quoted 6 lines · Steven Noonan
---
 package/haveged/haveged.mk      |  8 ++++++++
 package/haveged/haveged.service | 10 ++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 package/haveged/haveged.service

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com