* [Buildroot] [PATCHv4 1/4] dhcp: update dhclient-script
2014-11-27 17:00 [Buildroot] [PATCHv4 0/4] SystemV init without busybox series Gustavo Zacarias
@ 2014-11-27 17:00 ` Gustavo Zacarias
2014-11-28 11:36 ` Peter Korsgaard
2014-11-27 17:00 ` [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown Gustavo Zacarias
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Gustavo Zacarias @ 2014-11-27 17:00 UTC (permalink / raw)
To: buildroot
The previous no-op dhclient-script is useless and in fact can lead
users to believe things will work.
dhclient-script is supposed to, among many other things, bring the
interface up for dhclient to pump an address, set the interface
address, set resolv.conf appropiately and set the default gateway.
It's a complex script since it has to deal with a lot of details so
let's just use the best fit which is the OpenWRT one since it uses the
"legacy" tools (ifconfig, route, ...) which can be easily provided by
busybox and/or net-tools.
There are newer and more feature-complete versions around but they
require full iproute2 ip and wouldn't fit as well with the busybox-only
approach.
License: likely GPLv2+
Source:
http://git.openwrt.org/?p=packages.git;a=blob;f=net/isc-dhcp/files/dhclient-script;h=4afebc0ad20ebac51c5baae5ed01c6713e3a0fd0;hb=HEAD
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/dhcp/dhclient-script | 284 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 283 insertions(+), 1 deletion(-)
diff --git a/package/dhcp/dhclient-script b/package/dhcp/dhclient-script
index 5566aca..cb292b6 100755
--- a/package/dhcp/dhclient-script
+++ b/package/dhcp/dhclient-script
@@ -1,2 +1,284 @@
#!/bin/sh
-# empty dhclient-script to keep dhclient from complaining
+
+# dhclient-script from OpenWRT project
+# http://git.openwrt.org/?p=packages.git;a=blob;f=net/isc-dhcp/files/dhclient-script;h=4afebc0ad20ebac51c5baae5ed01c6713e3a0fd0;hb=HEAD
+
+make_resolv_conf() {
+ if [ x"$new_domain_name_servers" != x ]; then
+ cat /dev/null > /etc/resolv.conf.dhclient
+ chmod 644 /etc/resolv.conf.dhclient
+ if [ x"$new_domain_search" != x ]; then
+ echo search $new_domain_search >> /etc/resolv.conf.dhclient
+ elif [ x"$new_domain_name" != x ]; then
+ # Note that the DHCP 'Domain Name Option' is really just a domain
+ # name, and that this practice of using the domain name option as
+ # a search path is both nonstandard and deprecated.
+ echo search $new_domain_name >> /etc/resolv.conf.dhclient
+ fi
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf.dhclient
+ done
+
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
+ cat /dev/null > /etc/resolv.conf.dhclient6
+ chmod 644 /etc/resolv.conf.dhclient6
+
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+ echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
+ fi
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
+ done
+ fi
+
+ # if both v4 and v6 clients are running, concatenate results
+ cat /etc/resolv.conf.* > /etc/resolv.conf
+}
+
+# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+exit_with_hooks() {
+ exit_status=$1
+ if [ -f /etc/dhclient-exit-hooks ]; then
+ . /etc/dhclient-exit-hooks
+ fi
+# probably should do something with exit status of the local script
+ exit $exit_status
+}
+
+# Invoke the local dhcp client enter hooks, if they exist.
+if [ -f /etc/dhclient-enter-hooks ]; then
+ exit_status=0
+ . /etc/dhclient-enter-hooks
+ # allow the local script to abort processing of this state
+ # local script must set exit_status variable to nonzero.
+ if [ $exit_status -ne 0 ]; then
+ exit $exit_status
+ fi
+fi
+
+###
+### DHCPv4 Handlers
+###
+
+if [ x$new_broadcast_address != x ]; then
+ new_broadcast_arg="broadcast $new_broadcast_address"
+fi
+if [ x$new_subnet_mask != x ]; then
+ new_subnet_arg="netmask $new_subnet_mask"
+fi
+if [ x$alias_subnet_mask != x ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+fi
+
+if [ x$reason = xMEDIUM ]; then
+ # Linux doesn't do mediums (ok, ok, media).
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xPREINIT ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Bring down alias interface. Its routes will disappear too.
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ ifconfig $interface 0.0.0.0 up
+
+ # We need to give the kernel some time to get the interface up.
+ sleep 1
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
+ [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
+ current_hostname=`hostname`
+ if [ x$current_hostname = x ] || \
+ [ x$current_hostname = x$old_host_name ]; then
+ if [ x$current_hostname = x ] || \
+ [ x$new_host_name != x$old_host_name ]; then
+ hostname $new_host_name
+ fi
+ fi
+
+ if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \
+ [ x$alias_ip_address != x$old_ip_address ]; then
+ # Possible new alias. Remove old alias.
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then
+ # IP address changed. Bringing down the interface will delete all routes,
+ # and clear the ARP cache.
+ ifconfig $interface 0.0.0.0 down
+
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
+ [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
+
+ ifconfig $interface $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router dev $interface
+ fi
+ route add default gw $router
+ done
+ fi
+ if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
+ then
+ ifconfig $interface:0- 0.0.0.0
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address $interface:0
+ fi
+ make_resolv_conf
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
+ if [ x$alias_ip_address != x ]; then
+ # Turn off alias interface.
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ if [ x$old_ip_address != x ]; then
+ # Shut down interface, which will delete routes and clear arp cache.
+ ifconfig $interface 0.0.0.0 down
+ fi
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address $interface:0
+ fi
+
+ # remove v4 dns configuration for this interface
+ rm /etc/resolv.conf.dhclient
+ cat /etc/resolv.conf.* > /etc/resolv.conf
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xTIMEOUT ]; then
+ if [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0- 0.0.0.0
+ fi
+ ifconfig $interface $new_ip_address $new_subnet_arg \
+ $new_broadcast_arg
+ set $new_routers
+ if ping -q -c 1 $1; then
+ if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+ ifconfig $interface:0 $alias_ip_address $alias_subnet_arg
+ route add -host $alias_ip_address dev $interface:0
+ fi
+ for router in $new_routers; do
+ if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
+ route add -host $router dev $interface
+ fi
+ route add default gw $router
+ done
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+ ifconfig $interface 0.0.0.0 down
+ exit_with_hooks 1
+fi
+
+###
+### DHCPv6 Handlers
+###
+
+if [ x$reason = xPREINIT6 ]; then
+ # Ensure interface is up.
+ ifconfig ${interface} up
+
+ # Remove any stale addresses from aborted clients.
+ ip -f inet6 addr flush dev ${interface} scope global
+
+ exit_with_hooks 0
+fi
+
+if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then
+ echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix}
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xBOUND6 ]; then
+ if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
+
+ # Check for nameserver options.
+ make_resolv_conf
+
+### <<
+ # Set up softwire tunnel
+ if [ x${new_dhcp6_softwire} != x ] ; then
+ /etc/init.d/dhclient stop
+ ifconfig ${interface} 0.0.0.0
+ ip -6 tunnel add tun0 mode ipip6 \
+ remote ${new_dhcp6_softwire} \
+ local ${new_ip6_address} \
+ dev ${interface} encaplimit none
+ ip link set tun0 up
+ ip route add default dev tun0
+ fi
+### >>
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then
+ if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen}
+
+ # Make sure nothing has moved around on us.
+
+ # Nameservers/domains/etc.
+ if [ "x${new_dhcp6_name_servers}" != "x${old_dhcp6_name_servers}" ] ||
+ [ "x${new_dhcp6_domain_search}" != "x${old_dhcp6_domain_search}" ] ; then
+ make_resolv_conf
+ fi
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xDEPREF6 ]; then
+ if [ x${new_ip6_address} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ # Busybox ifconfig has no way to communicate this to the kernel, so ignore it
+
+ exit_with_hooks 0
+fi
+
+if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ]; then
+ if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then
+ exit_with_hooks 2;
+ fi
+
+ ifconfig ${interface} del ${old_ip6_address}/${old_ip6_prefixlen}
+
+ # remove v6 dns configuration for this interface
+ rm /etc/resolv.conf.dhclient6
+ cat /etc/resolv.conf.* > /etc/resolv.conf
+
+### <<
+ # Tear down softwire tunnel
+ if [ x${old_dhcp6_softwire} != x ] ; then
+ ip link set tun0 down
+ ip tunnel del tun0
+ fi
+### >>
+
+ exit_with_hooks 0
+fi
+
+exit_with_hooks 0
--
2.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown
2014-11-27 17:00 [Buildroot] [PATCHv4 0/4] SystemV init without busybox series Gustavo Zacarias
2014-11-27 17:00 ` [Buildroot] [PATCHv4 1/4] dhcp: update dhclient-script Gustavo Zacarias
@ 2014-11-27 17:00 ` Gustavo Zacarias
2014-11-29 13:20 ` Károly Kasza
2015-01-12 22:04 ` Thomas Petazzoni
2014-11-27 17:00 ` [Buildroot] [PATCHv4 3/4] ifupdown: new package Gustavo Zacarias
2014-11-27 17:00 ` [Buildroot] [PATCHv4 4/4] start-stop-daemon: " Gustavo Zacarias
3 siblings, 2 replies; 12+ messages in thread
From: Gustavo Zacarias @ 2014-11-27 17:00 UTC (permalink / raw)
To: buildroot
Make the S40network script create the /run/network directory for the
debian variant of ifupdown which uses it as a lock directory.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
system/skeleton/etc/init.d/S40network | 3 +++
1 file changed, 3 insertions(+)
diff --git a/system/skeleton/etc/init.d/S40network b/system/skeleton/etc/init.d/S40network
index e69e613..bfdd491 100755
--- a/system/skeleton/etc/init.d/S40network
+++ b/system/skeleton/etc/init.d/S40network
@@ -3,6 +3,9 @@
# Start the network....
#
+# Debian ifupdown needs the /run/network lock directory
+mkdir -p /run/network
+
case "$1" in
start)
echo "Starting network..."
--
2.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown
2014-11-27 17:00 ` [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown Gustavo Zacarias
@ 2014-11-29 13:20 ` Károly Kasza
2015-01-12 22:04 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Károly Kasza @ 2014-11-29 13:20 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, Nov 27, 2014 at 6:00 PM, Gustavo Zacarias <gustavo@zacarias.com.ar>
wrote:
> Make the S40network script create the /run/network directory for the
> debian variant of ifupdown which uses it as a lock directory.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> system/skeleton/etc/init.d/S40network | 3 +++
> 1 file changed, 3 insertions(+)
>
Tested-by: Karoly Kasza <kaszak@gmail.com>
Reviewed-by: Karoly Kasza <kaszak@gmail.com>
Tested with next branch, x86_64 arch in QEMU and VMW, internal toolchain
GCC 4.9.2, Linux 3.17.x, SysV init and a lot of utilities, like OpenSSH.
Regards,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141129/e45d943e/attachment.html>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown
2014-11-27 17:00 ` [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown Gustavo Zacarias
2014-11-29 13:20 ` Károly Kasza
@ 2015-01-12 22:04 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-01-12 22:04 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Thu, 27 Nov 2014 14:00:28 -0300, Gustavo Zacarias wrote:
> Make the S40network script create the /run/network directory for the
> debian variant of ifupdown which uses it as a lock directory.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> system/skeleton/etc/init.d/S40network | 3 +++
> 1 file changed, 3 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCHv4 3/4] ifupdown: new package
2014-11-27 17:00 [Buildroot] [PATCHv4 0/4] SystemV init without busybox series Gustavo Zacarias
2014-11-27 17:00 ` [Buildroot] [PATCHv4 1/4] dhcp: update dhclient-script Gustavo Zacarias
2014-11-27 17:00 ` [Buildroot] [PATCHv4 2/4] skeleton/S40network: tweak for debian ifupdown Gustavo Zacarias
@ 2014-11-27 17:00 ` Gustavo Zacarias
2014-11-29 13:20 ` Károly Kasza
2015-01-12 22:04 ` Thomas Petazzoni
2014-11-27 17:00 ` [Buildroot] [PATCHv4 4/4] start-stop-daemon: " Gustavo Zacarias
3 siblings, 2 replies; 12+ messages in thread
From: Gustavo Zacarias @ 2014-11-27 17:00 UTC (permalink / raw)
To: buildroot
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/Config.in | 3 +++
.../ifupdown/0001-dont-use-dpkg-architecture.patch | 17 ++++++++++++++
package/ifupdown/Config.in | 17 ++++++++++++++
package/ifupdown/ifupdown.hash | 2 ++
package/ifupdown/ifupdown.mk | 26 ++++++++++++++++++++++
5 files changed, 65 insertions(+)
create mode 100644 package/ifupdown/0001-dont-use-dpkg-architecture.patch
create mode 100644 package/ifupdown/Config.in
create mode 100644 package/ifupdown/ifupdown.hash
create mode 100644 package/ifupdown/ifupdown.mk
diff --git a/package/Config.in b/package/Config.in
index ab4ab6b..ae365f0 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/ifupdown/0001-dont-use-dpkg-architecture.patch b/package/ifupdown/0001-dont-use-dpkg-architecture.patch
new file mode 100644
index 0000000..bb5c58f
--- /dev/null
+++ b/package/ifupdown/0001-dont-use-dpkg-architecture.patch
@@ -0,0 +1,17 @@
+Drop the need for dpkg-architecture, we only build for linux.
+Thanks to K?roly Kasza for catching this one.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura ifupdown.orig/defn2c.pl ifupdown/defn2c.pl
+--- ifupdown.orig/defn2c.pl 2014-11-18 16:39:28.878772655 -0300
++++ ifupdown/defn2c.pl 2014-11-18 16:43:41.120456676 -0300
+@@ -2,7 +2,7 @@
+
+ use strict;
+
+-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`;
++my $DEB_HOST_ARCH_OS = "linux";
+
+ $DEB_HOST_ARCH_OS =~ s/\n//;
+
diff --git a/package/ifupdown/Config.in b/package/ifupdown/Config.in
new file mode 100644
index 0000000..10cf2be
--- /dev/null
+++ b/package/ifupdown/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_IFUPDOWN
+ bool "ifupdown"
+ depends on BR2_USE_MMU # fork()
+ # Default/our uclibc lacks wordexp()
+ depends on !BR2_TOOLCHAIN_USES_UCLIBC
+ # 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
+
+comment "ifupdown needs an (e)glibc or musl toolchain"
+ depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_USES_UCLIBC
diff --git a/package/ifupdown/ifupdown.hash b/package/ifupdown/ifupdown.hash
new file mode 100644
index 0000000..f0c314b
--- /dev/null
+++ b/package/ifupdown/ifupdown.hash
@@ -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
diff --git a/package/ifupdown/ifupdown.mk b/package/ifupdown/ifupdown.mk
new file mode 100644
index 0000000..5c78eed
--- /dev/null
+++ b/package/ifupdown/ifupdown.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# 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
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS) -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \
+ -C $(@D)
+endef
+
+# install doesn't overwrite
+define IFUPDOWN_INSTALL_TARGET_CMDS
+ $(RM) $(TARGET_DIR)/sbin/{ifdown,ifquery}
+ $(TARGET_MAKE_ENV) $(MAKE) BASEDIR=$(TARGET_DIR) -C $(@D) install
+endef
+
+$(eval $(generic-package))
--
2.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCHv4 3/4] ifupdown: new package
2014-11-27 17:00 ` [Buildroot] [PATCHv4 3/4] ifupdown: new package Gustavo Zacarias
@ 2014-11-29 13:20 ` Károly Kasza
2015-01-12 22:04 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Károly Kasza @ 2014-11-29 13:20 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, Nov 27, 2014 at 6:00 PM, Gustavo Zacarias <gustavo@zacarias.com.ar>
wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/Config.in | 3 +++
> .../ifupdown/0001-dont-use-dpkg-architecture.patch | 17 ++++++++++++++
> package/ifupdown/Config.in | 17 ++++++++++++++
> package/ifupdown/ifupdown.hash | 2 ++
> package/ifupdown/ifupdown.mk | 26
> ++++++++++++++++++++++
> 5 files changed, 65 insertions(+)
> create mode 100644 package/ifupdown/0001-dont-use-dpkg-architecture.patch
> create mode 100644 package/ifupdown/Config.in
> create mode 100644 package/ifupdown/ifupdown.hash
> create mode 100644 package/ifupdown/ifupdown.mk
>
Tested-by: Karoly Kasza <kaszak@gmail.com>
Reviewed-by: Karoly Kasza <kaszak@gmail.com>
Tested with next branch, x86_64 arch in QEMU and VMW, internal toolchain
GCC 4.9.2, Linux 3.17.x, SysV init and a lot of utilities, like OpenSSH.
Regards,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141129/b420b3c1/attachment.html>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCHv4 3/4] ifupdown: new package
2014-11-27 17:00 ` [Buildroot] [PATCHv4 3/4] ifupdown: new package Gustavo Zacarias
2014-11-29 13:20 ` Károly Kasza
@ 2015-01-12 22:04 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-01-12 22:04 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Thu, 27 Nov 2014 14:00:29 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/Config.in | 3 +++
> .../ifupdown/0001-dont-use-dpkg-architecture.patch | 17 ++++++++++++++
> package/ifupdown/Config.in | 17 ++++++++++++++
> package/ifupdown/ifupdown.hash | 2 ++
> package/ifupdown/ifupdown.mk | 26 ++++++++++++++++++++++
> 5 files changed, 65 insertions(+)
> create mode 100644 package/ifupdown/0001-dont-use-dpkg-architecture.patch
> create mode 100644 package/ifupdown/Config.in
> create mode 100644 package/ifupdown/ifupdown.hash
> create mode 100644 package/ifupdown/ifupdown.mk
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCHv4 4/4] start-stop-daemon: new package
2014-11-27 17:00 [Buildroot] [PATCHv4 0/4] SystemV init without busybox series Gustavo Zacarias
` (2 preceding siblings ...)
2014-11-27 17:00 ` [Buildroot] [PATCHv4 3/4] ifupdown: new package Gustavo Zacarias
@ 2014-11-27 17:00 ` Gustavo Zacarias
2014-11-29 13:20 ` Károly Kasza
2015-01-12 22:05 ` Thomas Petazzoni
3 siblings, 2 replies; 12+ messages in thread
From: Gustavo Zacarias @ 2014-11-27 17:00 UTC (permalink / raw)
To: buildroot
We don't use the 1.17.x series because it has issues when
cross-compiling.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
package/Config.in | 3 ++
.../0001-add-uclibc-alias-and-musl.patch | 42 ++++++++++++++++++++++
package/start-stop-daemon/Config.in | 8 +++++
package/start-stop-daemon/start-stop-daemon.hash | 2 ++
package/start-stop-daemon/start-stop-daemon.mk | 36 +++++++++++++++++++
5 files changed, 91 insertions(+)
create mode 100644 package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch
create mode 100644 package/start-stop-daemon/Config.in
create mode 100644 package/start-stop-daemon/start-stop-daemon.hash
create mode 100644 package/start-stop-daemon/start-stop-daemon.mk
diff --git a/package/Config.in b/package/Config.in
index ae365f0..ceda11d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1230,6 +1230,9 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/rsyslog/Config.in"
endif
source "package/smack/Config.in"
+if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
+ source "package/start-stop-daemon/Config.in"
+endif
source "package/supervisor/Config.in"
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/sysklogd/Config.in"
diff --git a/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch
new file mode 100644
index 0000000..0b726d4
--- /dev/null
+++ b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch
@@ -0,0 +1,42 @@
+Make linux-uclibcgnueabi an alias for linux-uclibceabi since it's
+what we use in buildroot toolchains.
+Also add support for musl libc which is a backport from 1.17.x with
+a slight tweak for musleabi (non-hf).
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura dpkg-1.16.15.orig/ostable dpkg-1.16.15/ostable
+--- dpkg-1.16.15.orig/ostable 2014-11-07 08:09:07.358304926 -0300
++++ dpkg-1.16.15/ostable 2014-11-07 09:35:06.158580079 -0300
+@@ -14,8 +14,10 @@
+ # system part of the output of the GNU config.guess script.
+ #
+ # <Debian name> <GNU name> <config.guess regex>
+-uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi
++uclibceabi-linux linux-uclibceabi linux[^-]*-uclibc.*eabi
+ uclibc-linux linux-uclibc linux[^-]*-uclibc
++musleabihf-linux linux-musleabihf linux[^-]*-musleabihf
++musl-linux linux-musl linux[^-]*-musl[^-]*
+ gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf
+ gnueabi-linux linux-gnueabi linux[^-]*-gnueabi
+ gnuabin32-linux linux-gnuabin32 linux[^-]*-gnuabin32
+@@ -33,6 +35,6 @@
+ bsd-netbsd netbsd netbsd[^-]*
+ bsd-openbsd openbsd openbsd[^-]*
+ sysv-solaris solaris solaris[^-]*
+-uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibceabi
++uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibc.*eabi
+ uclibc-uclinux uclinux-uclibc uclinux[^-]*(-uclibc.*)?
+ tos-mint mint mint[^-]*
+diff -Nura dpkg-1.16.15.orig/triplettable dpkg-1.16.15/triplettable
+--- dpkg-1.16.15.orig/triplettable 2014-11-07 08:09:07.345304482 -0300
++++ dpkg-1.16.15/triplettable 2014-11-07 09:35:29.098364036 -0300
+@@ -5,6 +5,8 @@
+ # <Debian triplet> <Debian arch>
+ uclibceabi-linux-arm uclibc-linux-armel
+ uclibc-linux-<cpu> uclibc-linux-<cpu>
++musleabihf-linux-arm musl-linux-armhf
++musl-linux-<cpu> musl-linux-<cpu>
+ gnueabihf-linux-arm armhf
+ gnueabi-linux-arm armel
+ gnuabin32-linux-mips64el mipsn32el
diff --git a/package/start-stop-daemon/Config.in b/package/start-stop-daemon/Config.in
new file mode 100644
index 0000000..7d8eb34
--- /dev/null
+++ b/package/start-stop-daemon/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_START_STOP_DAEMON
+ bool "start-stop-daemon"
+ depends on BR2_USE_MMU # fork()
+ help
+ start-stop-daemon is used to control the creation and termination
+ of system-level processes.
+
+ https://tracker.debian.org/pkg/dpkg
diff --git a/package/start-stop-daemon/start-stop-daemon.hash b/package/start-stop-daemon/start-stop-daemon.hash
new file mode 100644
index 0000000..e3ab29f
--- /dev/null
+++ b/package/start-stop-daemon/start-stop-daemon.hash
@@ -0,0 +1,2 @@
+# From http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.16.15.dsc
+sha256 92bca9901ba2d9300be42f6de8dbea59b8367a918a2abeeb47d2176c9cf86b55 dpkg_1.16.15.tar.xz
diff --git a/package/start-stop-daemon/start-stop-daemon.mk b/package/start-stop-daemon/start-stop-daemon.mk
new file mode 100644
index 0000000..4e7a0da
--- /dev/null
+++ b/package/start-stop-daemon/start-stop-daemon.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# start-stop-daemon
+#
+################################################################################
+
+# Debian start-stop-daemon is part of dpkg. Since start-stop-daemon is the only
+# interesting tool in it, we call the buildroot package start-stop-daemon.
+
+START_STOP_DAEMON_VERSION = 1.16.15
+START_STOP_DAEMON_SOURCE = dpkg_$(START_STOP_DAEMON_VERSION).tar.xz
+START_STOP_DAEMON_SITE = http://snapshot.debian.org/archive/debian/20140616T044945Z/pool/main/d/dpkg
+START_STOP_DAEMON_CONF_OPTS = \
+ --disable-dselect \
+ --disable-update-alternatives \
+ --disable-install-info \
+ --exec-prefix=/
+START_STOP_DAEMON_CONF_ENV = \
+ dpkg_cv_va_copy=yes \
+ dpkg_cv_c99_snprintf=yes
+START_STOP_DAEMON_DEPENDENCIES = host-pkgconf \
+ $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+START_STOP_DAEMON_LICENSE = Public Domain
+START_STOP_DAEMON_LICENSE_FILES = utils/start-stop-daemon.c
+
+define START_STOP_DAEMON_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib/compat
+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/utils
+endef
+
+define START_STOP_DAEMON_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 -D $(@D)/utils/start-stop-daemon \
+ $(TARGET_DIR)/sbin/start-stop-daemon
+endef
+
+$(eval $(autotools-package))
--
2.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread* [Buildroot] [PATCHv4 4/4] start-stop-daemon: new package
2014-11-27 17:00 ` [Buildroot] [PATCHv4 4/4] start-stop-daemon: " Gustavo Zacarias
@ 2014-11-29 13:20 ` Károly Kasza
2015-01-12 22:05 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Károly Kasza @ 2014-11-29 13:20 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, Nov 27, 2014 at 6:00 PM, Gustavo Zacarias <gustavo@zacarias.com.ar>
wrote:
> We don't use the 1.17.x series because it has issues when
> cross-compiling.
>
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> package/Config.in | 3 ++
> .../0001-add-uclibc-alias-and-musl.patch | 42
> ++++++++++++++++++++++
> package/start-stop-daemon/Config.in | 8 +++++
> package/start-stop-daemon/start-stop-daemon.hash | 2 ++
> package/start-stop-daemon/start-stop-daemon.mk | 36
> +++++++++++++++++++
> 5 files changed, 91 insertions(+)
> create mode 100644
> package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch
> create mode 100644 package/start-stop-daemon/Config.in
> create mode 100644 package/start-stop-daemon/start-stop-daemon.hash
> create mode 100644 package/start-stop-daemon/start-stop-daemon.mk
>
>
Tested-by: Karoly Kasza <kaszak@gmail.com>
Reviewed-by: Karoly Kasza <kaszak@gmail.com>
Tested with next branch, x86_64 arch in QEMU and VMW, internal toolchain
GCC 4.9.2, Linux 3.17.x, SysV init and a lot of utilities, like OpenSSH.
Regards,
Karoly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141129/544be6d8/attachment.html>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCHv4 4/4] start-stop-daemon: new package
2014-11-27 17:00 ` [Buildroot] [PATCHv4 4/4] start-stop-daemon: " Gustavo Zacarias
2014-11-29 13:20 ` Károly Kasza
@ 2015-01-12 22:05 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2015-01-12 22:05 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Thu, 27 Nov 2014 14:00:30 -0300, Gustavo Zacarias wrote:
> +START_STOP_DAEMON_LICENSE = Public Domain
> +START_STOP_DAEMON_LICENSE_FILES = utils/start-stop-daemon.c
While start-stop-daemon.c itself is under the Public Domain, it is
linked against the compat library in lib/compat, which is under GPLv2+.
So I've changed the license to GPLv2+ and the license file to COPYING,
and applied.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread