Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] add insserv to use LSB compliant init scripts and dynamically configure init order
@ 2010-12-05 22:26 heiko at zuerker.org
  2010-12-06 20:09 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: heiko at zuerker.org @ 2010-12-05 22:26 UTC (permalink / raw)
  To: buildroot

From: Heiko Zuerker <smiley73@users.sourceforge.net>


Signed-off-by: Heiko Zuerker <smiley73@users.sourceforge.net>
---
 package/Config.in          |    1 +
 package/insserv/Config.in  |    7 ++++++
 package/insserv/insserv.mk |   45 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100644 package/insserv/Config.in
 create mode 100644 package/insserv/insserv.mk

diff --git a/package/Config.in b/package/Config.in
index 678db20..23636b7 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -469,6 +469,7 @@ endmenu
 menu "System tools"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/bootutils/Config.in"
+source "package/insserv/Config.in"
 source "package/module-init-tools/Config.in"
 source "package/procps/Config.in"
 source "package/psmisc/Config.in"
diff --git a/package/insserv/Config.in b/package/insserv/Config.in
new file mode 100644
index 0000000..1d968dc
--- /dev/null
+++ b/package/insserv/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_INSSERV
+	bool "insserv"
+	help
+	  This small package provides a tool for process controlling
+	  in System V boot scripts.
+	  It works for LSB compliant init scripts.
+	  http://wiki.debian.org/LSBInitScripts
diff --git a/package/insserv/insserv.mk b/package/insserv/insserv.mk
new file mode 100644
index 0000000..20f095d
--- /dev/null
+++ b/package/insserv/insserv.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# insserv
+#
+#############################################################
+INSSERV_VERSION = 1.14.0
+INSSERV_SOURCE = insserv-$(INSSERV_VERSION).tar.bz2
+INSSERV_SITE = ftp://ftp.suse.com/pub/projects/init/
+
+INSSERV_INSTALL_TARGET_OPT = INSTALLROOT=$(TARGET_DIR)
+INSSERV_INSTALL_HOST_OPT = INSTALLROOT=$(HOST_DIR)
+
+#INSSERV_DEPENDENCIES=zlib
+#HOST_INSSERV_DEPENDENCIES=host-zlib
+
+define INSSERV_CONFIGURE_CMDS
+	echo "#!/bin/sh" > $(@D)/tests/common
+	echo "exit 0" >> $(@D)/tests/common
+	chmod +x $(@D)/tests/common
+endef
+
+define HOST_INSSERV_CONFIGURE_CMDS
+	echo "#!/bin/sh" > $(@D)/tests/common
+	echo "exit 0" >> $(@D)/tests/common
+	chmod +x $(@D)/tests/common
+endef
+
+define INSSERV_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" RPM_OPT_FLAGS=-O2 -C $(@D) all
+endef
+
+define HOST_INSSERV_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) all
+endef
+
+define INSSERV_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install 
+endef
+
+define HOST_INSSERV_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) install 
+endef
+
+$(eval $(call GENTARGETS,package,insserv))
+$(eval $(call GENTARGETS,package,insserv,host))
-- 
1.7.3.2

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

* [Buildroot] [PATCH] add insserv to use LSB compliant init scripts and dynamically configure init order
  2010-12-05 22:26 [Buildroot] [PATCH] add insserv to use LSB compliant init scripts and dynamically configure init order heiko at zuerker.org
@ 2010-12-06 20:09 ` Thomas Petazzoni
  2010-12-06 20:29   ` Heiko Zuerker
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2010-12-06 20:09 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun,  5 Dec 2010 16:26:19 -0600
heiko at zuerker.org wrote:

> +config BR2_PACKAGE_INSSERV
> +	bool "insserv"
> +	help
> +	  This small package provides a tool for process controlling
> +	  in System V boot scripts.
> +	  It works for LSB compliant init scripts.
> +	  http://wiki.debian.org/LSBInitScripts

Just curious, how do you use this in the context of Buildroot ?

By default, Buildroot uses Busybox init, which isn't SysV compliant (it
doesn't support runlevels). And how would this interact with the
Buildroot build process ?

> +#INSSERV_DEPENDENCIES=zlib
> +#HOST_INSSERV_DEPENDENCIES=host-zlib

Useful ? Comments ?

> +define INSSERV_CONFIGURE_CMDS
> +	echo "#!/bin/sh" > $(@D)/tests/common
> +	echo "exit 0" >> $(@D)/tests/common
> +	chmod +x $(@D)/tests/common
> +endef
> +
> +define HOST_INSSERV_CONFIGURE_CMDS
> +	echo "#!/bin/sh" > $(@D)/tests/common
> +	echo "exit 0" >> $(@D)/tests/common
> +	chmod +x $(@D)/tests/common
> +endef

Those sound strange. Maybe a short comment above would clarify a bit.

Thanks!

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] add insserv to use LSB compliant init scripts and dynamically configure init order
  2010-12-06 20:09 ` Thomas Petazzoni
@ 2010-12-06 20:29   ` Heiko Zuerker
  0 siblings, 0 replies; 3+ messages in thread
From: Heiko Zuerker @ 2010-12-06 20:29 UTC (permalink / raw)
  To: buildroot

Quoting Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:

> Hello,
>
> On Sun,  5 Dec 2010 16:26:19 -0600
> heiko at zuerker.org wrote:
>
>> +config BR2_PACKAGE_INSSERV
>> +	bool "insserv"
>> +	help
>> +	  This small package provides a tool for process controlling
>> +	  in System V boot scripts.
>> +	  It works for LSB compliant init scripts.
>> +	  http://wiki.debian.org/LSBInitScripts
>
> Just curious, how do you use this in the context of Buildroot ?

I'm currently trying to get buildroot working as a build system for  
Devil-Linux.
Unfortunately I can't go the minimalistic route with most things,  
since I need to stay aligned with the current stable release.

> By default, Buildroot uses Busybox init, which isn't SysV compliant (it
> doesn't support runlevels). And how would this interact with the
> Buildroot build process ?

I call it as part of BR2_ROOTFS_POST_BUILD_SCRIPT, in order to get the  
init scripts ordered initially.
Later we do use insserv during upgrades, to fix any new dependencies.

Insserv works only with BR2_PACKAGE_SYSVINIT, maybe I should add this  
as a dependency.

>> +#INSSERV_DEPENDENCIES=zlib
>> +#HOST_INSSERV_DEPENDENCIES=host-zlib
>
> Useful ? Comments ?

Nope, just me forgetting to clean up my stuff after I copy scripts.

>> +define INSSERV_CONFIGURE_CMDS
>> +	echo "#!/bin/sh" > $(@D)/tests/common
>> +	echo "exit 0" >> $(@D)/tests/common
>> +	chmod +x $(@D)/tests/common
>> +endef
>> +
>> +define HOST_INSSERV_CONFIGURE_CMDS
>> +	echo "#!/bin/sh" > $(@D)/tests/common
>> +	echo "exit 0" >> $(@D)/tests/common
>> +	chmod +x $(@D)/tests/common
>> +endef
>
> Those sound strange. Maybe a short comment above would clarify a bit.

Okay I'll add that.
It's basically just disabling some tests, which would fail otherwise.

> Thanks!

I'm still learning how buildroot works, so my apologies for any  
patches I sent in which need fixing.

-- 

Regards
   Heiko Zuerker
   http://www.devil-linux.org


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

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

end of thread, other threads:[~2010-12-06 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05 22:26 [Buildroot] [PATCH] add insserv to use LSB compliant init scripts and dynamically configure init order heiko at zuerker.org
2010-12-06 20:09 ` Thomas Petazzoni
2010-12-06 20:29   ` Heiko Zuerker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox