Skip to contentSkip to conversation

systemV init without busybox series

RFC PATCH New Gustavo Zacarias 5 participants 22 messages Nov 6, 2014 – Nov 7, 2014

lore
Share & tools
lore
#0 lore raw

cover systemV init without busybox series

This is a RFC patch series that enables busybox-less systemV systems to be built.
It contains fixes that enable it to work seamlessly, some new packages and a couple of non essential/related bumps.

The series is still missing start-stop-daemon which is contained in the dpkg upstream package which begs the question, should we ship it as dpkg (with the side consequences and expectations) or name it start-stop-daemon and install just that? (option 2 is what i've got done at the moment, that's my choice, but be free and vote).

It's also missing documentation on the recommended packages for a normal boot to take place without any errors or warnings for a default busybox skeleton.

* debianutils provides run-parts for ifupdown
* ifupdown provides ifup/ifdown

Gustavo Zacarias (7):
skeleton/S40network: tweak for debian ifupdown
package/uclibc: enable wordexp
dhcpcd: install binary to /sbin
dhcpcd: bump to version 6.6.0
dash: bump to 0.5.8-2
debianutils: new package
ifupdown: new package

 package/Config.in                     |  4 ++++
 package/dash/dash.hash                |  4 ++--
 package/dash/dash.mk                  |  4 ++--
 package/debianutils/Config.in         |  7 +++++++
 package/debianutils/debianutils.hash  |  2 ++
 package/debianutils/debianutils.mk    | 14 ++++++++++++++
 package/dhcpcd/dhcpcd.hash            |  2 ++
 package/dhcpcd/dhcpcd.mk              |  4 ++--
 package/ifupdown/Config.in            | 11 +++++++++++
 package/ifupdown/ifupdown.hash        |  2 ++
 package/ifupdown/ifupdown.mk          | 28 ++++++++++++++++++++++++++++
 package/uclibc/uClibc-0.9.31.config   |  2 +-
 package/uclibc/uClibc-0.9.33.config   |  2 +-
 package/uclibc/uClibc-snapshot.config |  2 +-
 system/skeleton/etc/init.d/S40network |  3 +++
 15 files changed, 82 insertions(+), 9 deletions(-)
 create mode 100644 package/debianutils/Config.in
 create mode 100644 package/debianutils/debianutils.hash
 create mode 100644 package/debianutils/debianutils.mk
 create mode 100644 package/dhcpcd/dhcpcd.hash
 create mode 100644 package/ifupdown/Config.in
 create mode 100644 package/ifupdown/ifupdown.hash
 create mode 100644 package/ifupdown/ifupdown.mk
Signature · 1 line
2.0.4
#1 lore raw

PATCH 1/7 skeleton/S40network: tweak for debian ifupdown

Make the S40network script create the /run/network directory for the debian variant of ifupdown which uses it as a lock directory.

---
 system/skeleton/etc/init.d/S40network | 3 +++
 1 file changed, 3 insertions(+)
system/skeleton/etc/init.d/S40network +3 -0
index e69e613..4317d14 100755
@@ -3,6 +3,9 @@
 # Start the network....
 #
 
+# Debian ifupdown needs the /run/network lock directory
+[ -h /sbin/ifup ] || mkdir -p /run/network
+
 case "$1" in
   start)
  	echo "Starting network..."
Signature · 1 line
2.0.4
#2 lore raw

PATCH 2/7 package/uclibc: enable wordexp

In reply to Gustavo Zacarias

It's required by Debian ifupdown.
+13 KB for ARM.

---
 package/uclibc/uClibc-0.9.31.config   | 2 +-
 package/uclibc/uClibc-0.9.33.config   | 2 +-
 package/uclibc/uClibc-snapshot.config | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
package/uclibc/uClibc-0.9.31.config +1 -1
index 76772e8..12db6b2 100644
@@ -190,7 +190,7 @@ UCLIBC_HAS_REGEX=y
 # UCLIBC_HAS_REGEX_OLD is not set
 UCLIBC_HAS_FNMATCH=y
 # UCLIBC_HAS_FNMATCH_OLD is not set
-# UCLIBC_HAS_WORDEXP is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 UCLIBC_HAS_GLOB=y
package/uclibc/uClibc-0.9.33.config +1 -1
index 1b07d4a..9db13d1 100644
@@ -226,7 +226,7 @@ UCLIBC_HAS_REGEX=y
 # UCLIBC_HAS_REGEX_OLD is not set
 UCLIBC_HAS_FNMATCH=y
 # UCLIBC_HAS_FNMATCH_OLD is not set
-# UCLIBC_HAS_WORDEXP is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 # UCLIBC_HAS_FTS is not set
package/uclibc/uClibc-snapshot.config +1 -1
index ffc1535..e38bdc3 100644
@@ -231,7 +231,7 @@ UCLIBC_HAS_REGEX=y
 # UCLIBC_HAS_REGEX_OLD is not set
 UCLIBC_HAS_FNMATCH=y
 # UCLIBC_HAS_FNMATCH_OLD is not set
-# UCLIBC_HAS_WORDEXP is not set
+UCLIBC_HAS_WORDEXP=y
 UCLIBC_HAS_NFTW=y
 UCLIBC_HAS_FTW=y
 # UCLIBC_HAS_FTS is not set
Signature · 1 line
2.0.4
#3 lore raw

PATCH 2/7 package/uclibc: enable wordexp

Dear Gustavo Zacarias,

Quoted 2 lines · Gustavo Zacarias

It's required by Debian ifupdown.
+13 KB for ARM.

Does Debian ifupdown fails to build? If it does, then we'll have zillions of build failures with all the prebuilt uClibc toolchains that don't have wordexp enabled :/

Thomas

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

PATCH 2/7 package/uclibc: enable wordexp

Quoted 3 lines · Thomas Petazzoni

Does Debian ifupdown fails to build? If it does, then we'll have zillions of build failures with all the prebuilt uClibc toolchains that don't have wordexp enabled :/

Yes, that's true.
The series is RFC, i can add an exception for external toolchains, or alternatively just disable this for uClibc in general - after all enabling all the big versions is bloaty enough.
Regards.

#5 lore raw

PATCH 2/7 package/uclibc: enable wordexp

Dear Gustavo Zacarias,

Quoted 4 lines · Gustavo Zacarias

Yes, that's true.
The series is RFC, i can add an exception for external toolchains, or alternatively just disable this for uClibc in general - after all enabling all the big versions is bloaty enough.

I just had a look at ifupdown source code, and wordexp() is pretty central in the code, not sure we can easily replace it with something else without significantly patching the stuff.

I don't really have a good answer here. Maybe as you suggest disabling ifupdown entirely for uClibc toolchains? I've also checked Crosstool-NG, and all its default uClibc configuration files have wordexp disabled, so both Buildroot pre-built toolchains predating the wordexp addition and all Crosstool-NG uClibc toolchain would be affected by the problem.

Thomas

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

PATCH 2/7 package/uclibc: enable wordexp

Quoted 10 lines · Thomas Petazzoni

I just had a look at ifupdown source code, and wordexp() is pretty central in the code, not sure we can easily replace it with something else without significantly patching the stuff.

I don't really have a good answer here. Maybe as you suggest disabling ifupdown entirely for uClibc toolchains? I've also checked Crosstool-NG, and all its default uClibc configuration files have wordexp disabled, so both Buildroot pre-built toolchains predating the wordexp addition and all Crosstool-NG uClibc toolchain would be affected by the problem.

Yes it's valid since it's bloat-land anyway, i'll wait for more feedback but i'm inclined to just do that for v2.
And most of these standalone tools aren't happy with nommu anyway which would be the only incentive to stick with uClibc.
Regards.

#7 lore raw

PATCH 3/7 dhcpcd: install binary to /sbin

In reply to Gustavo Zacarias

Debian ifupdown expects dhcpcd to be in /sbin rather than /usr/sbin

---
 package/dhcpcd/dhcpcd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dhcpcd/dhcpcd.mk +1 -1
index f4b821a..60ac129 100644
@@ -37,7 +37,7 @@ endef
 
 define DHCPCD_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0755 $(@D)/dhcpcd \
-		$(TARGET_DIR)/usr/sbin/dhcpcd
+		$(TARGET_DIR)/sbin/dhcpcd
 	$(INSTALL) -D -m 0644 $(@D)/dhcpcd.conf \
 		$(TARGET_DIR)/etc/dhcpcd.conf
 	$(INSTALL) -D -m 0755 $(@D)/dhcpcd-run-hooks \
Signature · 1 line
2.0.4
#8 lore raw

PATCH 3/7 dhcpcd: install binary to /sbin

Dear Gustavo Zacarias,

Quoted 13 lines · Gustavo Zacarias

Debian ifupdown expects dhcpcd to be in /sbin rather than /usr/sbin

---
 package/dhcpcd/dhcpcd.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/dhcpcd/dhcpcd.mk +0 -0
index f4b821a..60ac129 100644

package/dhcpcd/dhcpcd.mk endef · line 43

Quoted 8 lines
package/dhcpcd/dhcpcd.mk +1 -1
@@ -37,7 +37,7 @@ endef
 
 define DHCPCD_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0755 $(@D)/dhcpcd \
-		$(TARGET_DIR)/usr/sbin/dhcpcd
+		$(TARGET_DIR)/sbin/dhcpcd
 	$(INSTALL) -D -m 0644 $(@D)/dhcpcd.conf \
 		$(TARGET_DIR)/etc/dhcpcd.conf
 	$(INSTALL) -D -m 0755 $(@D)/dhcpcd-run-hooks \

Compile test on MIPS architecture plus checking the files are installed in target and have been built for the right architecture:

$ file output/target/sbin/dhcpcd
output/target/sbin/dhcpcd: ELF 32-bit MSB executable, MIPS, MIPS32 rel2
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.16, with unknown capability 0x41000000 = 0xf676e75, with unknown
capability 0x10000 = 0x70403, stripped

Best regards,

Signature · 5 lines
Vicente Olivert Riera
Graduate Software Engineer, MIPS Processor IP
Imagination Technologies Limited
t: +44 (0)113 2429814
www.imgtec.com
#9 lore raw

PATCH 4/7 dhcpcd: bump to version 6.6.0

In reply to Gustavo Zacarias

Also add hash file.

---
 package/dhcpcd/dhcpcd.hash | 2 ++
 package/dhcpcd/dhcpcd.mk   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
 create mode 100644 package/dhcpcd/dhcpcd.hash
package/dhcpcd/dhcpcd.hash new file +2 -0
new file mode 100644
index 0000000..fd64ebe
@@ -0,0 +1,2 @@
+# Locally calculated from download (no sig, hash)
+sha256	16b94272cbb9ca22cb74c4421ee745f56850121613f6256587adb4e988c17fd0	dhcpcd-6.6.0.tar.bz2
package/dhcpcd/dhcpcd.mk +1 -1
index 60ac129..fe3c8d2 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-DHCPCD_VERSION = 6.4.7
+DHCPCD_VERSION = 6.6.0
 DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.bz2
 DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd
 DHCPCD_DEPENDENCIES = host-pkgconf
Signature · 1 line
2.0.4
#10 lore raw

PATCH 4/7 dhcpcd: bump to version 6.6.0

Dear Gustavo Zacarias,

Quoted 23 lines · Gustavo Zacarias

Also add hash file.

---
 package/dhcpcd/dhcpcd.hash | 2 ++
 package/dhcpcd/dhcpcd.mk   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
 create mode 100644 package/dhcpcd/dhcpcd.hash
package/dhcpcd/dhcpcd.hash new file +2 -0
new file mode 100644
index 0000000..fd64ebe
@@ -0,0 +1,2 @@
+# Locally calculated from download (no sig, hash)
+sha256	16b94272cbb9ca22cb74c4421ee745f56850121613f6256587adb4e988c17fd0	dhcpcd-6.6.0.tar.bz2
package/dhcpcd/dhcpcd.mk +0 -0
index 60ac129..fe3c8d2 100644

package/dhcpcd/dhcpcd.mk line 10

Quoted 8 lines
package/dhcpcd/dhcpcd.mk +1 -1
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-DHCPCD_VERSION = 6.4.7
+DHCPCD_VERSION = 6.6.0
 DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.bz2
 DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd
 DHCPCD_DEPENDENCIES = host-pkgconf

Compile test on MIPS architecture plus checking the files are installed in target and have been built for the right architecture:

$ file output/target/sbin/dhcpcd
output/target/sbin/dhcpcd: ELF 32-bit MSB executable, MIPS, MIPS32 rel2
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.16, with unknown capability 0x41000000 = 0xf676e75, with unknown
capability 0x10000 = 0x70403, stripped

Best regards,

Signature · 5 lines
Vicente Olivert Riera
Graduate Software Engineer, MIPS Processor IP
Imagination Technologies Limited
t: +44 (0)113 2429814
www.imgtec.com
#11 lore raw

PATCH 5/7 dash: bump to 0.5.8-2

In reply to Gustavo Zacarias
---
 package/dash/dash.hash | 4 ++--
 package/dash/dash.mk   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
package/dash/dash.hash +2 -2
index 0198cd8..c4e60a4 100644
@@ -1,3 +1,3 @@
-# From http://ftp.debian.org/debian/pool/main/d/dash/dash_0.5.8-1.dsc
+# From http://ftp.debian.org/debian/pool/main/d/dash/dash_0.5.8-2.dsc
 sha256	c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f	dash_0.5.8.orig.tar.gz
-sha256	d751769cc1ef8b825a177e782f1cd3e35bde7c268107fa4febf8d235e12c64d9	dash_0.5.8-1.diff.gz
+sha256	00168a934864c26cae9a51367fe7ea013ece2d4844ff8bd6893fc00a8fa7b38c	dash_0.5.8-2.diff.gz
package/dash/dash.mk +2 -2
index ed8525c..13169d1 100644
@@ -6,8 +6,8 @@
 
 DASH_VERSION = 0.5.8
 DASH_SOURCE = dash_$(DASH_VERSION).orig.tar.gz
-DASH_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/d/dash
-DASH_PATCH = dash_$(DASH_VERSION)-1.diff.gz
+DASH_SITE = http://snapshot.debian.org/archive/debian/20141022T163236Z/pool/main/d/dash
+DASH_PATCH = dash_$(DASH_VERSION)-2.diff.gz
 DASH_LICENSE = BSD-3c, GPLv2+ (mksignames.c)
 DASH_LICENSE_FILES = COPYING
 
Signature · 1 line
2.0.4
#12 lore raw

PATCH 6/7 debianutils: new package

In reply to Gustavo Zacarias
---
 package/Config.in                    |  1 +
 package/debianutils/Config.in        |  7 +++++++
 package/debianutils/debianutils.hash |  2 ++
 package/debianutils/debianutils.mk   | 14 ++++++++++++++
 4 files changed, 24 insertions(+)
 create mode 100644 package/debianutils/Config.in
 create mode 100644 package/debianutils/debianutils.hash
 create mode 100644 package/debianutils/debianutils.mk
package/Config.in +1 -0
index 0dbb788..278134d 100644
@@ -1199,6 +1199,7 @@ endif
 	source "package/cpuload/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/dcron/Config.in"
+	source "package/debianutils/Config.in"
 endif
 	source "package/dsp-tools/Config.in"
 	source "package/ftop/Config.in"
package/debianutils/Config.in new file +7 -0
new file mode 100644
index 0000000..f865868
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_DEBIANUTILS
+	bool "debianutils"
+	depends on BR2_USE_MMU # fork()
+	help
+	  Miscellaneous utilities specific to Debian.
+
+	  https://tracker.debian.org/pkg/debianutils
package/debianutils/debianutils.hash new file +2 -0
new file mode 100644
index 0000000..089dd42
@@ -0,0 +1,2 @@
+# From http://ftp.de.debian.org/debian/pool/main/d/debianutils/debianutils_4.4.dsc
+sha256	190850cdd6b5302e0a1ba1aaed1bc7074d67d3bd8d04c613f242f7145afa53a6	debianutils_4.4.tar.gz
package/debianutils/debianutils.mk new file +14 -0
new file mode 100644
index 0000000..43d7cf3
@@ -0,0 +1,14 @@
+################################################################################
+#
+# debianutils
+#
+################################################################################
+
+DEBIANUTILS_VERSION = 4.4
+DEBIANUTILS_SOURCE = debianutils_$(DEBIANUTILS_VERSION).tar.gz
+DEBIANUTILS_SITE = http://snapshot.debian.org/archive/debian/20130728T034252Z/pool/main/d/debianutils
+DEBIANUTILS_CONF_OPTS = --exec-prefix=/
+DEBIANUTILS_LICENSE = GPLv2+, SMAIL (savelog)
+DEBIANUTILS_LICENSE_FILES = debian/copyright
+
+$(eval $(autotools-package))
Signature · 1 line
2.0.4
#13 lore raw

PATCH 7/7 ifupdown: new package

In reply to Gustavo Zacarias
---
 package/Config.in              |  3 +++
 package/ifupdown/Config.in     | 11 +++++++++++
 package/ifupdown/ifupdown.hash |  2 ++
 package/ifupdown/ifupdown.mk   | 28 ++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 100644 package/ifupdown/Config.in
 create mode 100644 package/ifupdown/ifupdown.hash
 create mode 100644 package/ifupdown/ifupdown.mk
package/Config.in +3 -0
index 278134d..8f3cc3c 100644
@@ -1014,6 +1014,9 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/ifplugd/Config.in"
 endif
 	source "package/iftop/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+	source "package/ifupdown/Config.in"
+endif
 	source "package/igh-ethercat/Config.in"
 	source "package/igmpproxy/Config.in"
 	source "package/inadyn/Config.in"
package/ifupdown/Config.in new file +11 -0
new file mode 100644
index 0000000..ab552e0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IFUPDOWN
+	bool "ifupdown"
+	depends on BR2_USE_MMU # fork()
+	# runtime for ip binary
+	select BR2_PACKAGE_IPROUTE2 if !BR2_PACKAGE_BUSYBOX
+	# runtime for run-parts
+	select BR2_PACKAGE_DEBIANUTILS if !BR2_PACKAGE_BUSYBOX
+	help
+	  High level tools to configure network interfaces.
+
+	  https://tracker.debian.org/pkg/ifupdown
package/ifupdown/ifupdown.hash new file +2 -0
new file mode 100644
index 0000000..f0c314b
@@ -0,0 +1,2 @@
+# From http://ftp.de.debian.org/debian/pool/main/i/ifupdown/ifupdown_0.7.49.dsc
+sha256	5d07c73610ff90393c7273e2af9003eeb1825fc88144ae5ed11a5517547d0f58	ifupdown_0.7.49.tar.xz
package/ifupdown/ifupdown.mk new file +28 -0
new file mode 100644
index 0000000..3b50d67
@@ -0,0 +1,28 @@
+################################################################################
+#
+# ifupdown
+#
+################################################################################
+
+IFUPDOWN_VERSION = 0.7.49
+IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz
+IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20140923T221921Z/pool/main/i/ifupdown
+IFUPDOWN_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+IFUPDOWN_LICENSE = GPLv2+
+IFUPDOWN_LICENSE_FILES = COPYING
+
+define IFUPDOWN_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" \
+		CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
+		-C $(@D)
+endef
+
+define IFUPDOWN_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 $(@D)/ifup $(TARGET_DIR)/sbin/ifup
+	$(INSTALL) -m 0755 -D $(@D)/settle-dad.sh \
+		$(TARGET_DIR)/lib/ifupdown/settle-dad.sh
+	ln -sf ifup $(TARGET_DIR)/sbin/ifdown
+	ln -sf ifup $(TARGET_DIR)/sbin/ifquery
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.0.4
#14 lore raw

PATCH 7/7 ifupdown: new package

Gustavo

Quoted 67 lines · Gustavo Zacarias
---
 package/Config.in              |  3 +++
 package/ifupdown/Config.in     | 11 +++++++++++
 package/ifupdown/ifupdown.hash |  2 ++
 package/ifupdown/ifupdown.mk   | 28 ++++++++++++++++++++++++++++
 4 files changed, 44 insertions(+)
 create mode 100644 package/ifupdown/Config.in
 create mode 100644 package/ifupdown/ifupdown.hash
 create mode 100644 package/ifupdown/ifupdown.mk
package/Config.in +3 -0
index 278134d..8f3cc3c 100644
@@ -1014,6 +1014,9 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
        source "package/ifplugd/Config.in"
 endif
        source "package/iftop/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+       source "package/ifupdown/Config.in"
+endif
        source "package/igh-ethercat/Config.in"
        source "package/igmpproxy/Config.in"
        source "package/inadyn/Config.in"
package/ifupdown/Config.in new file +11 -0
new file mode 100644
index 0000000..ab552e0
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_IFUPDOWN
+       bool "ifupdown"
+       depends on BR2_USE_MMU # fork()
+       # runtime for ip binary
+       select BR2_PACKAGE_IPROUTE2 if !BR2_PACKAGE_BUSYBOX
+       # runtime for run-parts
+       select BR2_PACKAGE_DEBIANUTILS if !BR2_PACKAGE_BUSYBOX
+       help
+         High level tools to configure network interfaces.
+
+         https://tracker.debian.org/pkg/ifupdown
package/ifupdown/ifupdown.hash new file +2 -0
new file mode 100644
index 0000000..f0c314b
@@ -0,0 +1,2 @@
+# From http://ftp.de.debian.org/debian/pool/main/i/ifupdown/ifupdown_0.7.49.dsc
+sha256 5d07c73610ff90393c7273e2af9003eeb1825fc88144ae5ed11a5517547d0f58        ifupdown_0.7.49.tar.xz
package/ifupdown/ifupdown.mk new file +11 -0
new file mode 100644
index 0000000..3b50d67
@@ -0,0 +1,28 @@
+################################################################################
+#
+# ifupdown
+#
+################################################################################
+
+IFUPDOWN_VERSION = 0.7.49
+IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz
+IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20140923T221921Z/pool/main/i/ifupdown
+IFUPDOWN_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+IFUPDOWN_LICENSE = GPLv2+

package/ifupdown/ifupdown.mk line 21

Quoted 10 lines
package/ifupdown/ifupdown.mk new file +10 -0
+IFUPDOWN_LICENSE_FILES = COPYING
+
+define IFUPDOWN_BUILD_CMDS
+       $(MAKE) CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" \
+               CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
+               -C $(@D)
+endef
+
+define IFUPDOWN_INSTALL_TARGET_CMDS
+       $(INSTALL) -m 0755 $(@D)/ifup $(TARGET_DIR)/sbin/ifup

No -D?

package/ifupdown/ifupdown.mk line 26

Quoted 5 lines
package/ifupdown/ifupdown.mk new file +5 -0
+       $(INSTALL) -m 0755 -D $(@D)/settle-dad.sh \
+               $(TARGET_DIR)/lib/ifupdown/settle-dad.sh
+       ln -sf ifup $(TARGET_DIR)/sbin/ifdown
+       ln -sf ifup $(TARGET_DIR)/sbin/ifquery
+endef

If you patched Makefile's "ln: commands to have -f, then this would be equivalent to:

define IFUPDOWN_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) BASEDIR=$(TARGET_DIR) install endef

Which might be more immune to changes in created files?

Just as an FYI .... I made an ifupdown.mk myself about six months ago, but ended up not needing it. Compared to what you have here, I had done some extra stuff for compatibility with BusyBox ifupdown:

- In CFLAGS in BUILD_CMDS, I added: -D'RUN_DIR="\"/var/run/\""'
- In inet.defn, I replaced all the "/run" with "/var/run"
- In main.c, I added "-f" option - ifupdown currently only accepts "--force"
- in execute.c, I dropped the "--verbose" from run-parts

But perhaps BusyBox compatibility is not a goal here ...

Danomi -

Quoted 9 lines
package/ifupdown/ifupdown.mk new file +2 -1
+
+$(eval $(generic-package))
--

2.0.4

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

#15 lore raw

PATCH 7/7 ifupdown: new package

Quoted 4 lines · Danomi Manchego

package/ifupdown/ifupdown.mk line 21

Quoted 2 lines
package/ifupdown/ifupdown.mk new file +2 -0
+define IFUPDOWN_INSTALL_TARGET_CMDS
+       $(INSTALL) -m 0755 $(@D)/ifup $(TARGET_DIR)/sbin/ifup

No -D?

/sbin is part of the basic (FHS) skeleton dirs, there's no need. It's not the common practice, but it's skipped in some packages for those dirs.

Quoted 6 lines

package/ifupdown/ifupdown.mk line 26

Quoted 5 lines
package/ifupdown/ifupdown.mk new file +5 -0
+       $(INSTALL) -m 0755 -D $(@D)/settle-dad.sh \
+               $(TARGET_DIR)/lib/ifupdown/settle-dad.sh
+       ln -sf ifup $(TARGET_DIR)/sbin/ifdown
+       ln -sf ifup $(TARGET_DIR)/sbin/ifquery
+endef
Quoted 8 lines

If you patched Makefile's "ln: commands to have -f, then this would be equivalent to:

define IFUPDOWN_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) BASEDIR=$(TARGET_DIR) install endef

Which might be more immune to changes in created files?

I try to avoid patching unless it's really necessary.
Having generic install cmds is nice, but patches i think are lower priority than custom INSTALL cmds unless it's something big like a dozen files and directories of course.
Besides a patch can need reworking for a new version if things changed in the Makefile.

Quoted 10 lines

Just as an FYI .... I made an ifupdown.mk myself about six months ago, but ended up not needing it. Compared to what you have here, I had done some extra stuff for compatibility with BusyBox ifupdown:

- In CFLAGS in BUILD_CMDS, I added: -D'RUN_DIR="\"/var/run/\""'
- In inet.defn, I replaced all the "/run" with "/var/run"
- In main.c, I added "-f" option - ifupdown currently only accepts "--force"
- in execute.c, I dropped the "--verbose" from run-parts

But perhaps BusyBox compatibility is not a goal here ...

Sorry, FHS again... /run is the recommended running info directory, we shouldn't try to avoid it. In fact we should strive to move everything out of /var/run IMHO.

Regards.

#16 lore raw

PATCH 7/7 ifupdown: new package

In reply to Gustavo Zacarias

Dear Gustavo Zacarias,

package/ifupdown/ifupdown.mk line 16

Quoted 10 lines · Gustavo Zacarias
package/ifupdown/ifupdown.mk new file +10 -0
+IFUPDOWN_VERSION = 0.7.49
+IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz
+IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20140923T221921Z/pool/main/i/ifupdown
+IFUPDOWN_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+IFUPDOWN_LICENSE = GPLv2+
+IFUPDOWN_LICENSE_FILES = COPYING
+
+define IFUPDOWN_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" \
+		CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \

What about:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
		CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
		-C $(@D)

package/ifupdown/ifupdown.mk line 21

Quoted 2 lines
package/ifupdown/ifupdown.mk new file +2 -0
+define IFUPDOWN_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 $(@D)/ifup $(TARGET_DIR)/sbin/ifup

-D missing

package/ifupdown/ifupdown.mk line 23

Quoted 2 lines
package/ifupdown/ifupdown.mk new file +2 -0
+	$(INSTALL) -m 0755 -D $(@D)/settle-dad.sh \
+		$(TARGET_DIR)/lib/ifupdown/settle-dad.sh

Ditto.

Thomas

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

PATCH 7/7 ifupdown: new package

Quoted 6 lines · Thomas Petazzoni

What about:

	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
		CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
		-C $(@D)

Yes works as well.

Quoted 3 lines

package/ifupdown/ifupdown.mk line 21

Quoted 1 line
package/ifupdown/ifupdown.mk new file +1 -0
+	$(INSTALL) -m 0755 $(@D)/ifup $(TARGET_DIR)/sbin/ifup

-D missing

Do we want to enforce -D for skeleton/fhs dirs?
Because there are many sinners out there already.
(and i do vaguely recall someone telling me a long time ago that it was redundant and to drop it).

Quoted 4 lines

package/ifupdown/ifupdown.mk line 23

Quoted 2 lines
package/ifupdown/ifupdown.mk new file +2 -0
+	$(INSTALL) -m 0755 -D $(@D)/settle-dad.sh \
+		$(TARGET_DIR)/lib/ifupdown/settle-dad.sh

Ditto.

No, take another look, otherwise it wouldn't even install :) Regards.

#18 lore raw

cover systemV init without busybox series

In reply to Gustavo Zacarias

Dear Gustavo Zacarias,

Quoted 5 lines · Gustavo Zacarias

The series is still missing start-stop-daemon which is contained in the dpkg upstream package which begs the question, should we ship it as dpkg (with the side consequences and expectations) or name it start-stop-daemon and install just that? (option 2 is what i've got done at the moment, that's my choice, but be free and vote).

Have you seen "[PATCH] start-stop-daemon: new package" already submitted by Karoly Kasza a few days ago?

Thomas

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

cover systemV init without busybox series

Quoted 2 lines · Thomas Petazzoni

Have you seen "[PATCH] start-stop-daemon: new package" already submitted by Karoly Kasza a few days ago?

I didn't notice it before, just seen it, this series was made about two weeks ago.
That's one way to do it, but it's a bit hackish.
In my version of the package i download the dpkg tarball (downloads ain't expensive these days and it isn't some super big tarball either), configure stripping almost everything and just build/install start-stop-daemon, everything without any nasting patching. I didn't send it because i want feedback on naming, for all intents and purposes it's just a start-stop-daemon package even though it downloads the dpkg tarball.
Dpkg tools can be built from what i've seen but the build time & footprint will be far bigger, and i think it will send a wrong message/expectations.
Regards.

#20 lore raw

cover systemV init without busybox series

Hello guys,

first, I'm happy that somebody else has the more/less same aim as me: to make Buildroot able to create a more full Linux experience. I think there are still some fundamental Linux tools' full versions are missing, like shadow-utils to make Busybox circumventable, but that's another story.

Regarding start-stop-daemon: I think that while downloading, configuring and compiling dpkg is a more straight solution to get st-st-d, it's a bit unnecessary to just get one .c file to produce one simple binary. For this patch, I mostly used package/cache-calibrator as a template, which basically does the exact same method.

Also, I think patching may still be needed for st-st-d for uClibc compatibility, as uClibc tend not to have the O_NOFOLLOW preprocessor macro declared in fcntl.h if __USE_GNU is not defined - and I think dpkg configure does not define that?

Best regards,
Karoly

Quoted 25 lines · Gustavo Zacarias
Quoted 2 lines · Thomas Petazzoni

Have you seen "[PATCH] start-stop-daemon: new package" already submitted by Karoly Kasza a few days ago?

I didn't notice it before, just seen it, this series was made about two weeks ago.
That's one way to do it, but it's a bit hackish.
In my version of the package i download the dpkg tarball (downloads ain't expensive these days and it isn't some super big tarball either), configure stripping almost everything and just build/install start-stop-daemon, everything without any nasting patching. I didn't send it because i want feedback on naming, for all intents and purposes it's just a start-stop-daemon package even though it downloads the dpkg tarball.
Dpkg tools can be built from what i've seen but the build time & footprint will be far bigger, and i think it will send a wrong message/expectations.
Regards.

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

Signature · 5 lines
?dv,
KK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141107/e6ab2bcc/attachment.html>
#21 lore raw

cover systemV init without busybox series

Quoted 1 line · K?roly Kasza

Hello guys,

Hello.

Quoted 5 lines

first, I'm happy that somebody else has the more/less same aim as me: to make Buildroot able to create a more full Linux experience. I think there are still some fundamental Linux tools' full versions are missing, like shadow-utils to make Busybox circumventable, but that's another story.

My objective for this is differnet, somewhat less ambitious, which is to get the option of SysV-init without busybox in a workable/clean state, otherwise why are we given an option that's broken?

Quoted 5 lines

Regarding start-stop-daemon: I think that while downloading, configuring and compiling dpkg is a more straight solution to get st-st-d, it's a bit unnecessary to just get one .c file to produce one simple binary. For this patch, I mostly used package/cache-calibrator as a template, which basically does the exact same method.

In general i try to make things clean and without patches if possible since it helps future version bumps where patches might not apply cleanly. Also the policy in general is to make patches upstreamable which isn't the case.
But ultimately it's not my decision and i'm doing a "dirty trick" (so to speak) in that i'm using a very full package as a small one. You're doing the same, just in another way.
So my dilemma and reason not to send the dpkg/start-stop-daemon package is that, well, should be ship it with the small and lean trick or do so as dpkg with unrealistic expectations this will bring from some users?

Quoted 4 lines

Also, I think patching may still be needed for st-st-d for uClibc compatibility, as uClibc tend not to have the O_NOFOLLOW preprocessor macro declared in fcntl.h if __USE_GNU is not defined - and I think dpkg configure does not define that?

That's because you're stripping everything out, that's taken care of in autotools and lib/compat, see, there's a reason for it :) Regards.