All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libtool: Make libltdl a separate package
@ 2018-11-11 15:06 Alexander Sverdlin
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add syslinux installer host package Alexander Sverdlin
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

This will save megabytes on the target filesystem if target packages only
require libltdl part of libtool.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/Config.in                |  1 +
 package/libltdl/Config.in        | 10 ++++++++++
 package/libltdl/libltdl.hash     |  2 ++
 package/libltdl/libltdl.mk       | 18 ++++++++++++++++++
 package/libtool/libtool.mk       |  1 +
 package/pulseaudio/Config.in     |  2 +-
 package/pulseaudio/pulseaudio.mk |  2 +-
 7 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 package/libltdl/Config.in
 create mode 100644 package/libltdl/libltdl.hash
 create mode 100644 package/libltdl/libltdl.mk

diff --git a/package/Config.in b/package/Config.in
index b60e7700ad..d136ab1f15 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1648,6 +1648,7 @@ menu "Other"
 	source "package/libite/Config.in"
 	source "package/liblinear/Config.in"
 	source "package/libloki/Config.in"
+	source "package/libltdl/Config.in"
 	source "package/libnpth/Config.in"
 	source "package/libnspr/Config.in"
 	source "package/libpfm4/Config.in"
diff --git a/package/libltdl/Config.in b/package/libltdl/Config.in
new file mode 100644
index 0000000000..e45dc5f15f
--- /dev/null
+++ b/package/libltdl/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LIBLTDL
+	bool "libltdl"
+	help
+	  Library that hides the complexity of using shared/static
+	  libraries on different platforms behind a consistent, portable
+	  interface.
+
+	  This is only runtime part of libtool: libltdl.
+
+	  http://www.gnu.org/software/libtool/
diff --git a/package/libltdl/libltdl.hash b/package/libltdl/libltdl.hash
new file mode 100644
index 0000000000..baaac61232
--- /dev/null
+++ b/package/libltdl/libltdl.hash
@@ -0,0 +1,2 @@
+# Locally calculated after checking pgp signature
+sha256	7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f	libtool-2.4.6.tar.xz
diff --git a/package/libltdl/libltdl.mk b/package/libltdl/libltdl.mk
new file mode 100644
index 0000000000..6c9fc0bc49
--- /dev/null
+++ b/package/libltdl/libltdl.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# libltdl
+#
+################################################################################
+
+# Same sources as libtool
+LIBLTDL_SOURCE = $(LIBTOOL_SOURCE)
+LIBLTDL_SITE = $(LIBTOOL_SITE)
+LIBLTDL_SUBDIR = libltdl
+LIBLTDL_INSTALL_STAGING = YES
+LIBLTDL_CONF_OPTS = --enable-ltdl-install
+LIBLTDL_DEPENDENCIES = host-m4
+LIBLTDL_LICENSE = LGPLv2.1
+LIBLTDL_LICENSE_FILES = $(LIBLTDL_SUBDIR)/COPYING.LIB
+LIBLTDL_PRE_CONFIGURE_HOOKS += LIBTOOL_AVOID_AUTORECONF_HOOK
+
+$(eval $(autotools-package))
diff --git a/package/libtool/libtool.mk b/package/libtool/libtool.mk
index bf97ee12b5..b9d492d1b5 100644
--- a/package/libtool/libtool.mk
+++ b/package/libtool/libtool.mk
@@ -9,6 +9,7 @@ LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz
 LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool
 LIBTOOL_INSTALL_STAGING = YES
 LIBTOOL_CONF_ENV = HELP2MAN=true
+LIBTOOL_CONF_OPTS = --disable-ltdl-install
 LIBTOOL_DEPENDENCIES = host-m4
 HOST_LIBTOOL_DEPENDENCIES = host-m4
 LIBTOOL_LICENSE = GPL-2.0+
diff --git a/package/pulseaudio/Config.in b/package/pulseaudio/Config.in
index 6600006a60..5fa0f67d2c 100644
--- a/package/pulseaudio/Config.in
+++ b/package/pulseaudio/Config.in
@@ -14,7 +14,7 @@ config BR2_PACKAGE_PULSEAUDIO
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_LIBTOOL
+	select BR2_PACKAGE_LIBLTDL
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_PULSEAUDIO_ENABLE_ATOMIC
 	select BR2_PACKAGE_SPEEX
diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index d1c35654cf..626f73309d 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -16,7 +16,7 @@ PULSEAUDIO_CONF_OPTS = \
 	--disable-manpages
 
 PULSEAUDIO_DEPENDENCIES = \
-	host-pkgconf libtool libsndfile speex host-intltool \
+	host-pkgconf libltdl libsndfile speex host-intltool \
 	$(if $(BR2_PACKAGE_LIBGLIB2),libglib2) \
 	$(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
 	$(if $(BR2_PACKAGE_DBUS),dbus) \
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] Add syslinux installer host package
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
@ 2018-11-11 15:06 ` Alexander Sverdlin
  2018-11-11 20:33   ` Thomas Petazzoni
  2018-11-11 15:06 ` [Buildroot] [PATCH] linux-tools: Add liblockdep Alexander Sverdlin
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

Add host installer for syslinux bootloader which allows to pre-install
syslinux in the generated firmware images. BR2_ROOTFS_POST_IMAGE_SCRIPT
can do something like this:

	${HOST_DIR}/usr/bin/syslinux -d /syslinux/ -i ${IMGFILE}

if the rest of syslinux is installed under /syslinux inside the firmware
image.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/Config.in.host                    |  1 +
 package/syslinux-installer/Config.in.host |  7 +++++++
 package/syslinux-installer/syslinux.mk    | 25 +++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/syslinux-installer/Config.in.host
 create mode 100644 package/syslinux-installer/syslinux.mk

diff --git a/package/Config.in.host b/package/Config.in.host
index 16b474fc9d..24a51d0e79 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -59,6 +59,7 @@ menu "Host utilities"
 	source "package/squashfs/Config.in.host"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/swig/Config.in.host"
+	source "package/syslinux-installer/Config.in.host"
 	source "package/tegrarcm/Config.in.host"
 	source "package/ti-cgt-pru/Config.in.host"
 	source "package/uboot-tools/Config.in.host"
diff --git a/package/syslinux-installer/Config.in.host b/package/syslinux-installer/Config.in.host
new file mode 100644
index 0000000000..d82e7f00d7
--- /dev/null
+++ b/package/syslinux-installer/Config.in.host
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_SYSLINUX_INSTALLER
+	bool "host syslinux installer"
+	depends on BR2_TARGET_SYSLINUX
+	help
+	  Host installer for syslinux bootloader
+
+	  http://syslinux.org
diff --git a/package/syslinux-installer/syslinux.mk b/package/syslinux-installer/syslinux.mk
new file mode 100644
index 0000000000..cbcf49d47a
--- /dev/null
+++ b/package/syslinux-installer/syslinux.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# host syslinux installer
+#
+################################################################################
+
+SYSLINUX_INSTALLER_VERSION = $(SYSLINUX_VERSION)
+SYSLINUX_INSTALLER_SOURCE = $(SYSLINUX_SOURCE)
+SYSLINUX_INSTALLER_SITE = $(SYSLINUX_SITE)
+
+SYSLINUX_INSTALLER_LICENSE = $(SYSLINUX_LICENSE)
+SYSLINUX_INSTALLER_LICENSE_FILES = $(SYSLINUX_LICENSE_FILES)
+
+HOST_SYSLINUX_INSTALLER_DEPENDENCIES = syslinux
+
+define HOST_SYSLINUX_INSTALLER_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) \
+		-C $(@D) installer
+endef
+
+define HOST_SYSLINUX_INSTALLER_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/bios/mtools/syslinux $(HOST_DIR)/usr/bin/syslinux
+endef
+
+$(eval $(host-generic-package))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] linux-tools: Add liblockdep
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add syslinux installer host package Alexander Sverdlin
@ 2018-11-11 15:06 ` Alexander Sverdlin
  2018-11-11 21:53   ` Thomas Petazzoni
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add mini-snmpd package Alexander Sverdlin
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/linux-tools/Config.in                | 13 ++++++++
 package/linux-tools/linux-tool-liblockdep.mk | 34 ++++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 package/linux-tools/linux-tool-liblockdep.mk

diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in
index 349dc6bf0d..63b48cfa80 100644
--- a/package/linux-tools/Config.in
+++ b/package/linux-tools/Config.in
@@ -34,6 +34,19 @@ config BR2_PACKAGE_LINUX_TOOLS_IIO
 
 	  These tools are available only from kernel version 4.7.
 
+config BR2_PACKAGE_LINUX_TOOLS_LIBLOCKDEP
+	bool "liblockdep"
+	help
+	  liblockdep is a tiny wrapper built around kernel/lockdep.c.
+	  The aim is to provide the same functionality the kernel gets
+	  from lockdep to userspace.
+
+	  The bulk of the code here is the LD_PRELOAD support which
+	  provides users an easy way to test their code without having
+	  to integrate liblockdep into said code.
+
+	  http://lwn.net/Articles/536363/
+
 config BR2_PACKAGE_LINUX_TOOLS_PERF
 	bool "perf"
 	select BR2_PACKAGE_LINUX_TOOLS
diff --git a/package/linux-tools/linux-tool-liblockdep.mk b/package/linux-tools/linux-tool-liblockdep.mk
new file mode 100644
index 0000000000..63c6fa3500
--- /dev/null
+++ b/package/linux-tools/linux-tool-liblockdep.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# liblockdep
+#
+################################################################################
+
+LINUX_TOOLS += liblockdep
+
+LIBLOCKDEP_MAKE_FLAGS = \
+	$(LINUX_MAKE_FLAGS) \
+	prefix=/usr
+
+define LIBLOCKDEP_BUILD_CMDS
+	$(Q)if test ! -f $(@D)/tools/lib/lockdep/Makefile ; then \
+		echo "Your kernel version is too old and does not have the liblockdep." ; \
+		echo "At least kernel 4.1 must be used." ; \
+		exit 1 ; \
+	fi
+
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBLOCKDEP_MAKE_FLAGS) -C $(@D)/tools \
+		liblockdep
+endef
+
+define LIBLOCKDEP_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBLOCKDEP_MAKE_FLAGS) -C $(@D)/tools \
+		DESTDIR=$(STAGING_DIR) \
+		liblockdep_install
+endef
+
+define LIBLOCKDEP_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBLOCKDEP_MAKE_FLAGS) -C $(@D)/tools \
+		DESTDIR=$(TARGET_DIR) \
+		liblockdep_install
+endef
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] Add mini-snmpd package
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add syslinux installer host package Alexander Sverdlin
  2018-11-11 15:06 ` [Buildroot] [PATCH] linux-tools: Add liblockdep Alexander Sverdlin
@ 2018-11-11 15:06 ` Alexander Sverdlin
  2018-11-13 21:52   ` Thomas Petazzoni
  2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Add systemd service Alexander Sverdlin
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

Mini SNMPd is a minimal implementation targeted at small or embedded UNIX
systems with limited resources.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---

Note:
check-package issues "Signed-off-by" warnings on the .patch files, but
that's how they present in the original repository.

 package/Config.in                             |  1 +
 ...d-zero-byte-before-unsigned-integers.patch | 29 +++++++++++++++++++
 ...igned-integers-to-have-an-extra-byte.patch | 26 +++++++++++++++++
 package/mini-snmpd/Config.in                  |  7 +++++
 package/mini-snmpd/mini-snmpd.mk              | 21 ++++++++++++++
 package/mini-snmpd/mini-snmpd.service         | 12 ++++++++
 6 files changed, 96 insertions(+)
 create mode 100644 package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch
 create mode 100644 package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch
 create mode 100644 package/mini-snmpd/Config.in
 create mode 100644 package/mini-snmpd/mini-snmpd.mk
 create mode 100644 package/mini-snmpd/mini-snmpd.service

diff --git a/package/Config.in b/package/Config.in
index d136ab1f15..c9450cd033 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1886,6 +1886,7 @@ menu "Networking applications"
 	source "package/macchanger/Config.in"
 	source "package/memcached/Config.in"
 	source "package/mii-diag/Config.in"
+	source "package/mini-snmpd/Config.in"
 	source "package/minidlna/Config.in"
 	source "package/minissdpd/Config.in"
 	source "package/mjpg-streamer/Config.in"
diff --git a/package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch b/package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch
new file mode 100644
index 0000000000..990d5bb9b7
--- /dev/null
+++ b/package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch
@@ -0,0 +1,29 @@
+From 949ae648bf7c654b8fae607a0988bfa672607156 Mon Sep 17 00:00:00 2001
+From: Patrick Rauscher <prauscher@prauscher.de>
+Date: Fri, 18 Aug 2017 17:31:23 +0200
+Subject: [PATCH] Prepend zero-byte before unsigned integers
+
+fixes #8
+---
+ mib.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/mib.c b/mib.c
+index 7d2e513..a9ffbe2 100644
+--- a/mib.c
++++ b/mib.c
+@@ -207,6 +207,11 @@ static int encode_unsigned(data_t *data, int type, unsigned int ticks_value)
+ 	else
+ 		length = 1;
+ 
++	/* check if the integer could be interpreted negative during a signed decode and prepend a zero-byte if necessary */
++	if ((ticks_value >> (8 * (length - 1))) & 0x80) {
++		length++;
++	}
++
+ 	*buffer++ = type;
+ 	*buffer++ = length;
+ 	while (length--)
+-- 
+2.13.2
+
diff --git a/package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch b/package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch
new file mode 100644
index 0000000000..d1b18050a5
--- /dev/null
+++ b/package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch
@@ -0,0 +1,26 @@
+From 556c8a406c9e08dd9444222e072f7eb9c82a81e8 Mon Sep 17 00:00:00 2001
+From: Patrick Rauscher <prauscher@prauscher.de>
+Date: Fri, 18 Aug 2017 17:44:32 +0200
+Subject: [PATCH] mib.c: allow unsigned integers to have an extra byte
+
+The extra byte can be needed when encoding huge unsigned numbers (i.e. 0x80000000 or higher). In this case, during encoding we need an extra byte to make sure clients decoding as signed int do not get negative numbers. For further details, see commit 949ae648
+---
+ mib.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mib.c b/mib.c
+index a9ffbe2..83cc20d 100644
+--- a/mib.c
++++ b/mib.c
+@@ -372,7 +372,7 @@ static int data_alloc(data_t *data, int type)
+ 		case BER_TYPE_COUNTER:
+ 		case BER_TYPE_GAUGE:
+ 		case BER_TYPE_TIME_TICKS:
+-			data->max_length = sizeof(unsigned int) + 2;
++			data->max_length = sizeof(unsigned int) + 3;
+ 			data->encoded_length = 0;
+ 			data->buffer = allocate(data->max_length);
+ 			break;
+-- 
+2.13.2
+
diff --git a/package/mini-snmpd/Config.in b/package/mini-snmpd/Config.in
new file mode 100644
index 0000000000..1f61cddbcf
--- /dev/null
+++ b/package/mini-snmpd/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_MINI_SNMPD
+	bool "mini-snmpd"
+	help
+	  Mini SNMPd is a minimal implementation targeted at small or
+	  embedded UNIX systems with limited resources
+
+	  http://troglobit.com/mini-snmpd.html
diff --git a/package/mini-snmpd/mini-snmpd.mk b/package/mini-snmpd/mini-snmpd.mk
new file mode 100644
index 0000000000..ebcbcce1ce
--- /dev/null
+++ b/package/mini-snmpd/mini-snmpd.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# mini-snmpd
+#
+################################################################################
+
+MINI_SNMPD_VERSION = v1.4
+MINI_SNMPD_SITE = $(call github,troglobit,mini-snmpd,$(MINI_SNMPD_VERSION))
+MINI_SNMPD_LICENSE = GPL-2.0
+MINI_SNMPD_LICENSE_FILES = COPYING
+MINI_SNMPD_AUTORECONF = YES
+
+define MINI_SNMPD_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 package/mini-snmpd/mini-snmpd.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/mini-snmpd.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/mini-snmpd.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mini-snmpd.service
+endef
+
+$(eval $(autotools-package))
diff --git a/package/mini-snmpd/mini-snmpd.service b/package/mini-snmpd/mini-snmpd.service
new file mode 100644
index 0000000000..8a15585e6e
--- /dev/null
+++ b/package/mini-snmpd/mini-snmpd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Mini SNMP Daemon
+StartLimitIntervalSec=0
+
+[Service]
+Environment='COMMUNITY=public'
+ExecStart=/sbin/mini_snmpd -a -n -c ${COMMUNITY} $EXTRA_PARAMS
+Restart=always
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] acpid: Add systemd service
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
                   ` (2 preceding siblings ...)
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add mini-snmpd package Alexander Sverdlin
@ 2018-11-11 15:06 ` Alexander Sverdlin
  2018-11-11 20:46   ` Thomas Petazzoni
  2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Make bundled event files optional Alexander Sverdlin
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

This one is based on Archlinux's service file.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/acpid/acpid.mk      | 8 ++++++++
 package/acpid/acpid.service | 9 +++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 package/acpid/acpid.service

diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk
index 48fe005e5e..c5ed3bfbeb 100644
--- a/package/acpid/acpid.mk
+++ b/package/acpid/acpid.mk
@@ -10,6 +10,14 @@ ACPID_SITE = http://downloads.sourceforge.net/project/acpid2
 ACPID_LICENSE = GPL-2.0+
 ACPID_LICENSE_FILES = COPYING
 
+define ACPID_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0755 package/acpid/acpid.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/acpid.service
+	mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants
+	ln -sf /usr/lib/systemd/system/acpid.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/acpid.service
+endef
+
 define ACPID_INSTALL_INIT_SYSV
 	$(INSTALL) -D -m 0755 package/acpid/S02acpid \
 		$(TARGET_DIR)/etc/init.d/S02acpid
diff --git a/package/acpid/acpid.service b/package/acpid/acpid.service
new file mode 100644
index 0000000000..5252b52f5f
--- /dev/null
+++ b/package/acpid/acpid.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=ACPI event daemon
+Documentation=man:acpid(8)
+
+[Service]
+ExecStart=/usr/sbin/acpid --foreground --netlink
+
+[Install]
+WantedBy=multi-user.target
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] acpid: Make bundled event files optional
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
                   ` (3 preceding siblings ...)
  2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Add systemd service Alexander Sverdlin
@ 2018-11-11 15:06 ` Alexander Sverdlin
  2018-11-11 20:50   ` Thomas Petazzoni
  2018-11-11 15:06 ` [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true Alexander Sverdlin
  2018-11-11 21:17 ` [Buildroot] [PATCH] libtool: Make libltdl a separate package Thomas Petazzoni
  6 siblings, 1 reply; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

On one hand the preinstalled /etc/acpi/events/powerbtn is not part of
acpid, one other hand others might want to implement more complicated logic
on power button. Therefore, make it optional.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/acpid/Config.in | 10 ++++++++++
 package/acpid/acpid.mk  |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/package/acpid/Config.in b/package/acpid/Config.in
index 0c8ecf2473..f6fb0ae1fc 100644
--- a/package/acpid/Config.in
+++ b/package/acpid/Config.in
@@ -9,3 +9,13 @@ config BR2_PACKAGE_ACPID
 	  specific events.
 
 	  http://sourceforge.net/projects/acpid2/
+
+if BR2_PACKAGE_ACPID
+
+config BR2_PACKAGE_ACPID_SUPPLEMENTARY
+	bool "Supplementary event handlers"
+	default y
+	help
+	  Install additional event handlers such as power button handler
+
+endif
diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk
index c5ed3bfbeb..21bed5c220 100644
--- a/package/acpid/acpid.mk
+++ b/package/acpid/acpid.mk
@@ -35,6 +35,8 @@ define ACPID_SET_EVENTS
 		>$(TARGET_DIR)/etc/acpi/events/powerbtn
 endef
 
+ifeq ($(BR2_PACKAGE_ACPID_SUPPLEMENTARY),y)
 ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS
+endif
 
 $(eval $(autotools-package))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
                   ` (4 preceding siblings ...)
  2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Make bundled event files optional Alexander Sverdlin
@ 2018-11-11 15:06 ` Alexander Sverdlin
  2018-11-11 16:34   ` Yann E. MORIN
  2018-11-11 20:55   ` Thomas Petazzoni
  2018-11-11 21:17 ` [Buildroot] [PATCH] libtool: Make libltdl a separate package Thomas Petazzoni
  6 siblings, 2 replies; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 15:06 UTC (permalink / raw)
  To: buildroot

bison-based build of systemd runs couple of checks on the structure of the
*host* system which will incorrectly configure systemd if build host
configuration doesn't match Buildroot target.

One can also find the following in the NEWS file:

* A new -Dsplit-bin= build configuration switch may be used to specify
  whether bin and sbin directories are merged, or if they should be
  included separately in $PATH and various listings of executable
  directories. The build configuration scripts will try to autodetect
  the proper values of -Dsplit-usr= and -Dsplit-bin= based on build
  system, but distributions are encouraged to configure this
  explicitly.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 package/systemd/systemd.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 4813496670..ecbf7e97ff 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -29,6 +29,8 @@ SYSTEMD_CONF_OPTS += \
 	-Dldconfig=false \
 	-Ddefault-dnssec=no \
 	-Dtests=false \
+	-Dsplit-bin=true \
+	-Dsplit-usr=false \
 	-Dsystem-uid-max=999 \
 	-Dsystem-gid-max=999 \
 	-Dtelinit-path=$(TARGET_DIR)/sbin/telinit \
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true
  2018-11-11 15:06 ` [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true Alexander Sverdlin
@ 2018-11-11 16:34   ` Yann E. MORIN
  2018-11-11 20:55   ` Thomas Petazzoni
  1 sibling, 0 replies; 25+ messages in thread
From: Yann E. MORIN @ 2018-11-11 16:34 UTC (permalink / raw)
  To: buildroot

Alexander, All,

On 2018-11-11 16:06 +0100, Alexander Sverdlin spake thusly:
> bison-based build of systemd runs couple of checks on the structure of the
> *host* system which will incorrectly configure systemd if build host
> configuration doesn't match Buildroot target.
> 
> One can also find the following in the NEWS file:
> 
> * A new -Dsplit-bin= build configuration switch may be used to specify
>   whether bin and sbin directories are merged, or if they should be
>   included separately in $PATH and various listings of executable
>   directories. The build configuration scripts will try to autodetect
>   the proper values of -Dsplit-usr= and -Dsplit-bin= based on build
>   system, but distributions are encouraged to configure this
>   explicitly.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  package/systemd/systemd.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
> index 4813496670..ecbf7e97ff 100644
> --- a/package/systemd/systemd.mk
> +++ b/package/systemd/systemd.mk
> @@ -29,6 +29,8 @@ SYSTEMD_CONF_OPTS += \
>  	-Dldconfig=false \
>  	-Ddefault-dnssec=no \
>  	-Dtests=false \
> +	-Dsplit-bin=true \
> +	-Dsplit-usr=false \
>  	-Dsystem-uid-max=999 \
>  	-Dsystem-gid-max=999 \
>  	-Dtelinit-path=$(TARGET_DIR)/sbin/telinit \
> -- 
> 2.19.1
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] Add syslinux installer host package
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add syslinux installer host package Alexander Sverdlin
@ 2018-11-11 20:33   ` Thomas Petazzoni
  2018-11-12  0:03     ` Carlos Santos
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-11 20:33 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for this contribution! I'm adding Carlos Santos, who also uses
syslinux.

On Sun, 11 Nov 2018 16:06:47 +0100, Alexander Sverdlin wrote:
> Add host installer for syslinux bootloader which allows to pre-install
> syslinux in the generated firmware images. BR2_ROOTFS_POST_IMAGE_SCRIPT
> can do something like this:
> 
> 	${HOST_DIR}/usr/bin/syslinux -d /syslinux/ -i ${IMGFILE}
> 
> if the rest of syslinux is installed under /syslinux inside the firmware
> image.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
>  package/Config.in.host                    |  1 +
>  package/syslinux-installer/Config.in.host |  7 +++++++
>  package/syslinux-installer/syslinux.mk    | 25 +++++++++++++++++++++++

Instead of making a separate package for this, what about adding a host
variant of the existing syslinux package ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] acpid: Add systemd service
  2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Add systemd service Alexander Sverdlin
@ 2018-11-11 20:46   ` Thomas Petazzoni
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-11 20:46 UTC (permalink / raw)
  To: buildroot

Hello Alexander,

Thanks for this contribution!

On Sun, 11 Nov 2018 16:06:50 +0100, Alexander Sverdlin wrote:

> +define ACPID_INSTALL_INIT_SYSTEMD
> +	$(INSTALL) -D -m 0755 package/acpid/acpid.service \
> +		$(TARGET_DIR)/usr/lib/systemd/system/acpid.service
> +	mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants
> +	ln -sf /usr/lib/systemd/system/acpid.service \
> +		$(TARGET_DIR)/usr/lib/systemd/system/multi-user.target.wants/acpid.service

We normally create the link under /etc, and use a relative path for the
target of the symlink, i.e like this:

define DHCPCD_INSTALL_INIT_SYSTEMD
        $(INSTALL) -D -m 0644 package/dhcpcd/dhcpcd.service \
                $(TARGET_DIR)/usr/lib/systemd/system/dhcpcd.service
        mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
        ln -sf ../../../../usr/lib/systemd/system/dhcpcd.service \
                $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpcd.service
endef

Could you adjust your patch accordingly ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] acpid: Make bundled event files optional
  2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Make bundled event files optional Alexander Sverdlin
@ 2018-11-11 20:50   ` Thomas Petazzoni
  2018-11-11 23:36     ` Carlos Santos
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-11 20:50 UTC (permalink / raw)
  To: buildroot

Hello Alexander,

Adding in Cc: Carlos Santos, who recently tweakedthe powerbtn script
logic.

On Sun, 11 Nov 2018 16:06:51 +0100, Alexander Sverdlin wrote:
> On one hand the preinstalled /etc/acpi/events/powerbtn is not part of
> acpid, one other hand others might want to implement more complicated logic
> on power button. Therefore, make it optional.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

On the other hand, it makes quite a bit of sense to have some kind of
default/minimal behavior for this, which can easily be overridden in a
post-build script / root filesystem overlay.

To me, this is a little bit like "let's make the installation of the
OpenSSH server configuration file optional, because the default doesn't
suite me".

> +if BR2_PACKAGE_ACPID
> +
> +config BR2_PACKAGE_ACPID_SUPPLEMENTARY

If anything, the name of the option should be revisited, because
"supplementary" is quite vague.

But overall, I'm not really convinced that we need to change anything
here, I believe the current behavior is OK.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true
  2018-11-11 15:06 ` [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true Alexander Sverdlin
  2018-11-11 16:34   ` Yann E. MORIN
@ 2018-11-11 20:55   ` Thomas Petazzoni
  2018-11-11 23:41     ` Alexander Sverdlin
                       ` (2 more replies)
  1 sibling, 3 replies; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-11 20:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 11 Nov 2018 16:06:52 +0100, Alexander Sverdlin wrote:
> bison-based build of systemd runs couple of checks on the structure of the

I assume you wanted to say "meson-based build" and not "bison-based
build". I've fixed that and applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] libtool: Make libltdl a separate package
  2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
                   ` (5 preceding siblings ...)
  2018-11-11 15:06 ` [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true Alexander Sverdlin
@ 2018-11-11 21:17 ` Thomas Petazzoni
  2018-11-11 22:15   ` Arnout Vandecappelle
  6 siblings, 1 reply; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-11 21:17 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 11 Nov 2018 16:06:46 +0100, Alexander Sverdlin wrote:
> This will save megabytes on the target filesystem if target packages only
> require libltdl part of libtool.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

Thanks for this patch!

In fact, I don't think we need the full libtool on the target at all,
so perhaps we should just change the existing libtool package in its
target variant to only install libltdl ?

I see the following packages that have a dependency on target libtool:

 - clamav
 - nut
 - pulseaudio
 - unixodbc

and all of them seem to have this dependency solely for libltdl.

Peter, Yann, Arnout, thoughts ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] linux-tools: Add liblockdep
  2018-11-11 15:06 ` [Buildroot] [PATCH] linux-tools: Add liblockdep Alexander Sverdlin
@ 2018-11-11 21:53   ` Thomas Petazzoni
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-11 21:53 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for this patch, unfortunately, I encountered a number of issues
while testing it, and I have some review comments. See below.

On Sun, 11 Nov 2018 16:06:48 +0100, Alexander Sverdlin wrote:
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
>  package/linux-tools/Config.in                | 13 ++++++++
>  package/linux-tools/linux-tool-liblockdep.mk | 34 ++++++++++++++++++++

This file should be named linux-tool-liblockdep.mk.in, to follow the
pattern of other files in the same folder.

> +config BR2_PACKAGE_LINUX_TOOLS_LIBLOCKDEP

You need a:

	# <execinfo.h>
	depends on BR2_TOOLCHAIN_USES_GLIBC

because the liblockdep source code uses <execinfo.h>, which is only
provided by glibc.

Also, you forgot:

	select BR2_PACKAGE_LINUX_TOOLS

and therefore if only liblockdep is selected in linux-tools, the
linux-tools package is not built at all.

> +	bool "liblockdep"
> +	help
> +	  liblockdep is a tiny wrapper built around kernel/lockdep.c.
> +	  The aim is to provide the same functionality the kernel gets
> +	  from lockdep to userspace.
> +
> +	  The bulk of the code here is the LD_PRELOAD support which
> +	  provides users an easy way to test their code without having
> +	  to integrate liblockdep into said code.
> +
> +	  http://lwn.net/Articles/536363/

And therefore, you need:

comment "liblockdep needs a toolchain w/ glibc"
	depends on !BR2_TOOLCHAIN_USES_GLIBC

> +LIBLOCKDEP_MAKE_FLAGS = \

We are not very consistent between the different .mk.in files, but I
think I'd prefer to see this variable named LIBLOCKDEP_MAKE_OPTS.

> +define LIBLOCKDEP_BUILD_CMDS
> +	$(Q)if test ! -f $(@D)/tools/lib/lockdep/Makefile ; then \

It clearly doesn't work with $(@D) here, you need to use $(LINUX_DIR)
everywhere.

But even with this fixed, I get:

  CC       lockdep.o
In file included from lockdep.c:8:0:
../../../kernel/locking/lockdep.c:49:10: fatal error: linux/jhash.h: No such file or directory
 #include <linux/jhash.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
mv: cannot stat './.lockdep.o.tmp': No such file or directory

When building with Linux 4.9.

Could you have a look at those issues, and send an updated version ?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] libtool: Make libltdl a separate package
  2018-11-11 21:17 ` [Buildroot] [PATCH] libtool: Make libltdl a separate package Thomas Petazzoni
@ 2018-11-11 22:15   ` Arnout Vandecappelle
  2018-11-12  8:06     ` Yann E. MORIN
  0 siblings, 1 reply; 25+ messages in thread
From: Arnout Vandecappelle @ 2018-11-11 22:15 UTC (permalink / raw)
  To: buildroot



On 11/11/2018 22:17, Thomas Petazzoni wrote:
> Hello,
> 
> On Sun, 11 Nov 2018 16:06:46 +0100, Alexander Sverdlin wrote:
>> This will save megabytes on the target filesystem if target packages only
>> require libltdl part of libtool.
>>
>> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> 
> Thanks for this patch!
> 
> In fact, I don't think we need the full libtool on the target at all,
> so perhaps we should just change the existing libtool package in its
> target variant to only install libltdl ?
> 
> I see the following packages that have a dependency on target libtool:
> 
>  - clamav
>  - nut
>  - pulseaudio
>  - unixodbc
> 
> and all of them seem to have this dependency solely for libltdl.
> 
> Peter, Yann, Arnout, thoughts ?

 I agree. If anybody needs the rest of libtool, then we can add an option like
BR2_PACKAGE_LIBTOOL_FULL or _TOOLS or something like that, similar to e.g.
libcurl (where BTW curl was originally a separate package but we merged it).

 Regards,
 Arnout

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] acpid: Make bundled event files optional
  2018-11-11 20:50   ` Thomas Petazzoni
@ 2018-11-11 23:36     ` Carlos Santos
  0 siblings, 0 replies; 25+ messages in thread
From: Carlos Santos @ 2018-11-11 23:36 UTC (permalink / raw)
  To: buildroot



----- Original Message -----
> From: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
> To: "Alexander Sverdlin" <alexander.sverdlin@gmail.com>
> Cc: "buildroot" <buildroot@buildroot.org>, "DATACOM" <casantos@datacom.com.br>
> Sent: Domingo, 11 de novembro de 2018 18:50:16
> Subject: Re: [Buildroot] [PATCH] acpid: Make bundled event files optional

> Hello Alexander,
> 
> Adding in Cc: Carlos Santos, who recently tweakedthe powerbtn script
> logic.
> 
> On Sun, 11 Nov 2018 16:06:51 +0100, Alexander Sverdlin wrote:
>> On one hand the preinstalled /etc/acpi/events/powerbtn is not part of
>> acpid, one other hand others might want to implement more complicated logic
>> on power button. Therefore, make it optional.
>> 
>> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> 
> On the other hand, it makes quite a bit of sense to have some kind of
> default/minimal behavior for this, which can easily be overridden in a
> post-build script / root filesystem overlay.

Exactly.

> To me, this is a little bit like "let's make the installation of the
> OpenSSH server configuration file optional, because the default doesn't
> suite me".
> 
>> +if BR2_PACKAGE_ACPID
>> +
>> +config BR2_PACKAGE_ACPID_SUPPLEMENTARY
> 
> If anything, the name of the option should be revisited, because
> "supplementary" is quite vague.
> 
> But overall, I'm not really convinced that we need to change anything
> here, I believe the current behavior is OK.

I'm not 100% against this change because it makes the installation of
the powerbtn script optional but leaves the option chosen by default,
so it does not change the current behavior.

Power button handling, however, is a very basic behavior that I'm a bit
afraid of making optional.

-- 
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true
  2018-11-11 20:55   ` Thomas Petazzoni
@ 2018-11-11 23:41     ` Alexander Sverdlin
  2018-11-12  8:08     ` Yann E. MORIN
  2018-11-13 22:19     ` Alexander Sverdlin
  2 siblings, 0 replies; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-11 23:41 UTC (permalink / raw)
  To: buildroot

Hello!

On 11/11/2018 21:55, Thomas Petazzoni wrote:
>> bison-based build of systemd runs couple of checks on the structure of the
> I assume you wanted to say "meson-based build" and not "bison-based

Exactly, thanks!

> build". I've fixed that and applied to master. Thanks!

--
Alexander.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] Add syslinux installer host package
  2018-11-11 20:33   ` Thomas Petazzoni
@ 2018-11-12  0:03     ` Carlos Santos
  0 siblings, 0 replies; 25+ messages in thread
From: Carlos Santos @ 2018-11-12  0:03 UTC (permalink / raw)
  To: buildroot

> From: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
> To: "Alexander Sverdlin" <alexander.sverdlin@gmail.com>
> Cc: "buildroot" <buildroot@buildroot.org>, "Carlos Santos" <casantos@datacom.ind.br>
> Sent: Domingo, 11 de novembro de 2018 18:33:16
> Subject: Re: [Buildroot] [PATCH] Add syslinux installer host package

> Hello,
> 
> Thanks for this contribution! I'm adding Carlos Santos, who also uses
> syslinux.
> 
> On Sun, 11 Nov 2018 16:06:47 +0100, Alexander Sverdlin wrote:
>> Add host installer for syslinux bootloader which allows to pre-install
>> syslinux in the generated firmware images. BR2_ROOTFS_POST_IMAGE_SCRIPT
>> can do something like this:
>> 
>> 	${HOST_DIR}/usr/bin/syslinux -d /syslinux/ -i ${IMGFILE}
>> 
>> if the rest of syslinux is installed under /syslinux inside the firmware
>> image.
>> 
>> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
>> ---
>>  package/Config.in.host                    |  1 +
>>  package/syslinux-installer/Config.in.host |  7 +++++++
>>  package/syslinux-installer/syslinux.mk    | 25 +++++++++++++++++++++++
> 
> Instead of making a separate package for this, what about adding a host
> variant of the existing syslinux package ?

host-sylinux makes sense. The package would not build syslinux for the
host, just the installer, but this would not be a real problem, since
host packages are meant to be tools used to generate the target system. 

-- 
Carlos Santos (Casantos) - DATACOM, P&D
?Marched towards the enemy, spear upright, armed with the certainty
that only the ignorant can have.? ? Epitaph of a volunteer

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] libtool: Make libltdl a separate package
  2018-11-11 22:15   ` Arnout Vandecappelle
@ 2018-11-12  8:06     ` Yann E. MORIN
  2018-11-22 19:02       ` Alexander Sverdlin
  0 siblings, 1 reply; 25+ messages in thread
From: Yann E. MORIN @ 2018-11-12  8:06 UTC (permalink / raw)
  To: buildroot

Thomas, Alexander, Arnout, All,

On 2018-11-11 23:15 +0100, Arnout Vandecappelle spake thusly:
> On 11/11/2018 22:17, Thomas Petazzoni wrote:
> > On Sun, 11 Nov 2018 16:06:46 +0100, Alexander Sverdlin wrote:
> >> This will save megabytes on the target filesystem if target packages only
> >> require libltdl part of libtool.
> > In fact, I don't think we need the full libtool on the target at all,
> > so perhaps we should just change the existing libtool package in its
> > target variant to only install libltdl ?
[--SNIP--]
>  I agree. If anybody needs the rest of libtool, then we can add an option like
> BR2_PACKAGE_LIBTOOL_FULL or _TOOLS or something like that,

Agreed.

> similar to e.g.
> libcurl (where BTW curl was originally a separate package but we merged it).

Exceot that, because of that legacy, curl is a bad example, as the
option is badly named.

A better exaple would be libcap (_TOOLS) or gnutls (_UTILS).

I would favour the _TOOLS suffix, even though we have both in tree.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true
  2018-11-11 20:55   ` Thomas Petazzoni
  2018-11-11 23:41     ` Alexander Sverdlin
@ 2018-11-12  8:08     ` Yann E. MORIN
  2018-11-13 22:19     ` Alexander Sverdlin
  2 siblings, 0 replies; 25+ messages in thread
From: Yann E. MORIN @ 2018-11-12  8:08 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2018-11-11 21:55 +0100, Thomas Petazzoni spake thusly:
> On Sun, 11 Nov 2018 16:06:52 +0100, Alexander Sverdlin wrote:
> > bison-based build of systemd runs couple of checks on the structure of the
> I assume you wanted to say "meson-based build" and not "bison-based
> build". I've fixed that and applied to master. Thanks!

I acked the patch becasue I read 'bison', but I saw 'meson', as it was
so obvious...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] Add mini-snmpd package
  2018-11-11 15:06 ` [Buildroot] [PATCH] Add mini-snmpd package Alexander Sverdlin
@ 2018-11-13 21:52   ` Thomas Petazzoni
  2018-11-22 17:55     ` Alexander Sverdlin
  0 siblings, 1 reply; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-13 21:52 UTC (permalink / raw)
  To: buildroot

Hello,

Thanks for this contribution! It looks mostly good, I really only have
some minor comments, see below.

The first nit is that the commit title should be:

	package/mini-snmpd: new package

On Sun, 11 Nov 2018 16:06:49 +0100, Alexander Sverdlin wrote:
> Mini SNMPd is a minimal implementation targeted at small or embedded UNIX
> systems with limited resources.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> 
> Note:
> check-package issues "Signed-off-by" warnings on the .patch files, but
> that's how they present in the original repository.

Still, we need *your* SoB added to the patches, so that's why
check-package complains: there should always be at least one SoB in the
patches, the one of the person who added the patch into Buildroot.

> 
>  package/Config.in                             |  1 +
>  ...d-zero-byte-before-unsigned-integers.patch | 29 +++++++++++++++++++
>  ...igned-integers-to-have-an-extra-byte.patch | 26 +++++++++++++++++
>  package/mini-snmpd/Config.in                  |  7 +++++
>  package/mini-snmpd/mini-snmpd.mk              | 21 ++++++++++++++
>  package/mini-snmpd/mini-snmpd.service         | 12 ++++++++
>  6 files changed, 96 insertions(+)

Please add an entry to the DEVELOPERS file.

> diff --git a/package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch b/package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch
> new file mode 100644
> index 0000000000..990d5bb9b7
> --- /dev/null
> +++ b/package/mini-snmpd/0001-Prepend-zero-byte-before-unsigned-integers.patch
> @@ -0,0 +1,29 @@
> +From 949ae648bf7c654b8fae607a0988bfa672607156 Mon Sep 17 00:00:00 2001
> +From: Patrick Rauscher <prauscher@prauscher.de>
> +Date: Fri, 18 Aug 2017 17:31:23 +0200
> +Subject: [PATCH] Prepend zero-byte before unsigned integers
> +
> +fixes #8

We need your SoB here.

> diff --git a/package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch b/package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch
> new file mode 100644
> index 0000000000..d1b18050a5
> --- /dev/null
> +++ b/package/mini-snmpd/0002-mib.c-allow-unsigned-integers-to-have-an-extra-byte.patch
> @@ -0,0 +1,26 @@
> +From 556c8a406c9e08dd9444222e072f7eb9c82a81e8 Mon Sep 17 00:00:00 2001
> +From: Patrick Rauscher <prauscher@prauscher.de>
> +Date: Fri, 18 Aug 2017 17:44:32 +0200
> +Subject: [PATCH] mib.c: allow unsigned integers to have an extra byte
> +
> +The extra byte can be needed when encoding huge unsigned numbers (i.e. 0x80000000 or higher). In this case, during encoding we need an extra byte to make sure clients decoding as signed int do not get negative numbers. For further details, see commit 949ae648

And here.

> diff --git a/package/mini-snmpd/Config.in b/package/mini-snmpd/Config.in
> new file mode 100644
> index 0000000000..1f61cddbcf
> --- /dev/null
> +++ b/package/mini-snmpd/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_MINI_SNMPD
> +	bool "mini-snmpd"
> +	help
> +	  Mini SNMPd is a minimal implementation targeted at small or
> +	  embedded UNIX systems with limited resources
> +
> +	  http://troglobit.com/mini-snmpd.html

Just curious, did you test the build of this package
with ./utils/test-pkg ? It would be useful to do so.

> diff --git a/package/mini-snmpd/mini-snmpd.mk b/package/mini-snmpd/mini-snmpd.mk
> new file mode 100644
> index 0000000000..ebcbcce1ce
> --- /dev/null
> +++ b/package/mini-snmpd/mini-snmpd.mk
> @@ -0,0 +1,21 @@
> +################################################################################
> +#
> +# mini-snmpd
> +#
> +################################################################################
> +
> +MINI_SNMPD_VERSION = v1.4
> +MINI_SNMPD_SITE = $(call github,troglobit,mini-snmpd,$(MINI_SNMPD_VERSION))
> +MINI_SNMPD_LICENSE = GPL-2.0
> +MINI_SNMPD_LICENSE_FILES = COPYING
> +MINI_SNMPD_AUTORECONF = YES

mini-snmpd has an optional dependency on libconfuse, when --with-config
is passed, or by default. So, you should either pass --without-config
and not bother with this dependency, or handle it explicitly with
something like this:

ifeq ($(BR2_PACKAGE_LIBCONFUSE),y)
MINI_SNMPD_DEPENDENCIES += host-pkgconf libconfuse
MINI_SNMPD_CONF_OPTS += --with-config
else
MINI_SNMPD_CONF_OPTS += --without-config
endif

Could you fix those various small details and send an updated version?

Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true
  2018-11-11 20:55   ` Thomas Petazzoni
  2018-11-11 23:41     ` Alexander Sverdlin
  2018-11-12  8:08     ` Yann E. MORIN
@ 2018-11-13 22:19     ` Alexander Sverdlin
  2 siblings, 0 replies; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-13 22:19 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On 11/11/2018 21:55, Thomas Petazzoni wrote:
>> bison-based build of systemd runs couple of checks on the structure of the
> I assume you wanted to say "meson-based build" and not "bison-based
> build". I've fixed that and applied to master. Thanks!

this commit BTW fixes 7684637bf6 ("systemd: bump to v239")
(broken PATH env passed to all services started by systemd),
so it can go to 2018.08.x...

--
Best regards,
Alexander.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] Add mini-snmpd package
  2018-11-13 21:52   ` Thomas Petazzoni
@ 2018-11-22 17:55     ` Alexander Sverdlin
  0 siblings, 0 replies; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-22 17:55 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On 13/11/2018 22:52, Thomas Petazzoni wrote:
> mini-snmpd has an optional dependency on libconfuse, when --with-config
> is passed, or by default. So, you should either pass --without-config
> and not bother with this dependency, or handle it explicitly with
> something like this:
> 
> ifeq ($(BR2_PACKAGE_LIBCONFUSE),y)
> MINI_SNMPD_DEPENDENCIES += host-pkgconf libconfuse
> MINI_SNMPD_CONF_OPTS += --with-config
> else
> MINI_SNMPD_CONF_OPTS += --without-config
> endif

I believe, we can ignore this for now until the new feature with config file is released.
Current latest release package (1.4) doesn't have such an option.

But thanks for heads-up, one updating the version should not forget to add the
above handling.

--
Alex.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] libtool: Make libltdl a separate package
  2018-11-12  8:06     ` Yann E. MORIN
@ 2018-11-22 19:02       ` Alexander Sverdlin
  2018-11-23  8:04         ` Thomas Petazzoni
  0 siblings, 1 reply; 25+ messages in thread
From: Alexander Sverdlin @ 2018-11-22 19:02 UTC (permalink / raw)
  To: buildroot

Hello Yann, Arnout, Thomas,

On 12/11/2018 09:06, Yann E. MORIN wrote:
> On 2018-11-11 23:15 +0100, Arnout Vandecappelle spake thusly:
>> On 11/11/2018 22:17, Thomas Petazzoni wrote:
>>> On Sun, 11 Nov 2018 16:06:46 +0100, Alexander Sverdlin wrote:
>>>> This will save megabytes on the target filesystem if target packages only
>>>> require libltdl part of libtool.
>>> In fact, I don't think we need the full libtool on the target at all,
>>> so perhaps we should just change the existing libtool package in its
>>> target variant to only install libltdl ?
> [--SNIP--]
>>  I agree. If anybody needs the rest of libtool, then we can add an option like
>> BR2_PACKAGE_LIBTOOL_FULL or _TOOLS or something like that,
> Agreed.
> 
>> similar to e.g.
>> libcurl (where BTW curl was originally a separate package but we merged it).
> Exceot that, because of that legacy, curl is a bad example, as the
> option is badly named.
> 
> A better exaple would be libcap (_TOOLS) or gnutls (_UTILS).
> 
> I would favour the _TOOLS suffix, even though we have both in tree.

But it seems that HOST_LIBTOOL package is widely used and it would look awkward
for me if we would build completely different stuff for LIBTOOL and HOST_LIBTOOL
package variants.

I'd rather go with LIBTOOL_RUNTIME package (or indeed LIBLTDL?), I can merge it into
libtool.mk and make all 4 target packages depend on it instead of full libtool.

What are your thoughts?

--
Alexander.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Buildroot] [PATCH] libtool: Make libltdl a separate package
  2018-11-22 19:02       ` Alexander Sverdlin
@ 2018-11-23  8:04         ` Thomas Petazzoni
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Petazzoni @ 2018-11-23  8:04 UTC (permalink / raw)
  To: buildroot

Hello Alexander,

On Thu, 22 Nov 2018 20:02:33 +0100, Alexander Sverdlin wrote:

> But it seems that HOST_LIBTOOL package is widely used and it would look awkward
> for me if we would build completely different stuff for LIBTOOL and HOST_LIBTOOL
> package variants.

We already do that for a few packages, where the host and target
variant don't install the same stuff. libglib2 is an example that comes
to mind for example, but there are others.

> I'd rather go with LIBTOOL_RUNTIME package (or indeed LIBLTDL?), I can merge it into
> libtool.mk and make all 4 target packages depend on it instead of full libtool.
> 
> What are your thoughts?

I think we really want what we suggested initially, i.e the target
libtool package only install libltdl.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-11-23  8:04 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-11 15:06 [Buildroot] [PATCH] libtool: Make libltdl a separate package Alexander Sverdlin
2018-11-11 15:06 ` [Buildroot] [PATCH] Add syslinux installer host package Alexander Sverdlin
2018-11-11 20:33   ` Thomas Petazzoni
2018-11-12  0:03     ` Carlos Santos
2018-11-11 15:06 ` [Buildroot] [PATCH] linux-tools: Add liblockdep Alexander Sverdlin
2018-11-11 21:53   ` Thomas Petazzoni
2018-11-11 15:06 ` [Buildroot] [PATCH] Add mini-snmpd package Alexander Sverdlin
2018-11-13 21:52   ` Thomas Petazzoni
2018-11-22 17:55     ` Alexander Sverdlin
2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Add systemd service Alexander Sverdlin
2018-11-11 20:46   ` Thomas Petazzoni
2018-11-11 15:06 ` [Buildroot] [PATCH] acpid: Make bundled event files optional Alexander Sverdlin
2018-11-11 20:50   ` Thomas Petazzoni
2018-11-11 23:36     ` Carlos Santos
2018-11-11 15:06 ` [Buildroot] [PATCH] systemd: Explicitly configure split-usr=false and split-bin=true Alexander Sverdlin
2018-11-11 16:34   ` Yann E. MORIN
2018-11-11 20:55   ` Thomas Petazzoni
2018-11-11 23:41     ` Alexander Sverdlin
2018-11-12  8:08     ` Yann E. MORIN
2018-11-13 22:19     ` Alexander Sverdlin
2018-11-11 21:17 ` [Buildroot] [PATCH] libtool: Make libltdl a separate package Thomas Petazzoni
2018-11-11 22:15   ` Arnout Vandecappelle
2018-11-12  8:06     ` Yann E. MORIN
2018-11-22 19:02       ` Alexander Sverdlin
2018-11-23  8:04         ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.