From 355adfc9f6bd3713ba733aae38e5a35545948026 Mon Sep 17 00:00:00 2001 From: Nagy Karoly Gabriel Date: Thu, 15 Mar 2012 16:17:52 +0100 Subject: [PATCH] ecn-node: enhanced target logic and made more vserver friendly --- busybox.config | 16 ++++++++++++++++ config.in | 2 ++ parse-config | 19 ++++++++++++++++++- pkg_conf/busybox.conf | 15 +++++++++++++++ pkg_conf/runit.conf | 24 ++++++++++++++++++++++++ pkgsel.d/core-userspace.all | 1 + 6 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 busybox.config create mode 100644 pkg_conf/busybox.conf create mode 100644 pkg_conf/runit.conf diff --git a/busybox.config b/busybox.config new file mode 100644 index 0000000..e1d3378 --- /dev/null +++ b/busybox.config @@ -0,0 +1,16 @@ +# Core Features +# +X CONFIG_FEATURE_PRESERVE_HARDLINKS + +# sysvinit +# +X CONFIG_LAST +X CONFIG_SULOGIN +X CONFIG_MESG +X CONFIG_WALL +X CONFIG_KILLALL5 +X CONFIG_PIDOF + +# needed by killall5 +X CONFIG_KILL + diff --git a/config.in b/config.in index 7f7533f..0ba2149 100644 --- a/config.in +++ b/config.in @@ -14,6 +14,8 @@ #Description: ECN base node +const SDECFG_TRG_ECN ${target:-$SDECFG_TARGET} + for x in OPT=size MULTILIB=0 \ LIBC=glibc INIT=runit \ ; do diff --git a/parse-config b/parse-config index e162d6b..e477c9d 100644 --- a/parse-config +++ b/parse-config @@ -12,6 +12,23 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- +ecn_apply_pkg_conf() { + [ ! -f "$1"/pkg_conf/$pkg.conf ] || . "$1"/pkg_conf/$pkg.conf +} + +# append target specific patch files +ecn_append_patchfiles() { + for x in "$1"/pkg_patch/$pkg/*.patch + do + [ ! -f $x ] || var_append patchfiles ' ' $x + done +} + +ecndir=$base/target/$SDECFG_TRG_ECN +ecn_apply_pkg_conf "$ecndir" +ecn_append_patchfiles "$ecndir" +unset ecndir + echo_status "Just minimal documentation files will be flisted" ecn_flist_just_minimal_docs() { sed -i -e '/\.\(html\|pdf\|ps\|tex\)$/d;' \ @@ -19,5 +36,5 @@ echo_status "Just minimal documentation files will be flisted" -e "/.*\/share\/\(doc\|gtk-doc\).*\/html\/.*/d;" \ $builddir/flist.txt } - hook_add postflist 5 "ecn_flist_just_minimal_docs" +hook_add postflist 5 "ecn_flist_just_minimal_docs" diff --git a/pkg_conf/busybox.conf b/pkg_conf/busybox.conf new file mode 100644 index 0000000..55c8603 --- /dev/null +++ b/pkg_conf/busybox.conf @@ -0,0 +1,15 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: target/ecn-node/pkg_conf/busybox.conf +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + +var_append conffiles ' ' "$base/target/$SDECFG_TRG_ECN/busybox.config" diff --git a/pkg_conf/runit.conf b/pkg_conf/runit.conf new file mode 100644 index 0000000..8df6a99 --- /dev/null +++ b/pkg_conf/runit.conf @@ -0,0 +1,24 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: target/ecn-node/pkg_conf/runit.conf +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. A copy of the +# GNU General Public License can be found in the file COPYING. +# --- SDE-COPYRIGHT-NOTE-END --- + + +vserver_cleanup() { + rm -rf $root/$sysconfdir/getty-* + rm -f $pkg_djb_servicedir/getty-* + rm -f $root/$sysconfdir/1.d/01system + rm -f $root/$sysconfdir/3.d/99system +} + +hook_add postmake 9 'vserver_cleanup' + diff --git a/pkgsel.d/core-userspace.all b/pkgsel.d/core-userspace.all index e7ee298..9836c5d 100644 --- a/pkgsel.d/core-userspace.all +++ b/pkgsel.d/core-userspace.all @@ -21,6 +21,7 @@ X bash X bcron X coreutils X util-linux +X busybox X mine X stone X socklog