All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add init scripts and make a link for sendmail
@ 2011-05-11  8:08 Xiaofeng Yan
  2011-05-11  8:08 ` [PATCH 1/3] wq!lsb: Add init-functions to lsb-image Xiaofeng Yan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Xiaofeng Yan @ 2011-05-11  8:08 UTC (permalink / raw)
  To: poky

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

I Add init-functios to lsb-image because LSB Test suite need init scripts.
And I make a link for sendmail because LSB Test Suite need it. 

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: xiaofeng/lsb
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/lsb

Thanks,
    Xiaofeng Yan <xiaofeng.yan@windriver.com>
---


Xiaofeng Yan (3):
  wq!lsb: Add init-functions to lsb-image
  init-functions: Conforming applications may install one or more
    initialization scripts
  lsbsetup: Add link for sendmail

 meta/recipes-extended/lsb/lsb/init-functions   |   32 +++++++++++++++++
 meta/recipes-extended/lsb/lsb/lsb_killproc     |    6 +++
 meta/recipes-extended/lsb/lsb/lsb_log_message  |   27 ++++++++++++++
 meta/recipes-extended/lsb/lsb/lsb_pidofproc    |    6 +++
 meta/recipes-extended/lsb/lsb/lsb_start_daemon |   45 ++++++++++++++++++++++++
 meta/recipes-extended/lsb/lsb_1.4.bb           |   39 +++++++++++++-------
 meta/recipes-extended/lsb/lsbsetup_0.9.bb      |    1 +
 7 files changed, 142 insertions(+), 14 deletions(-)
 create mode 100755 meta/recipes-extended/lsb/lsb/init-functions
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_killproc
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_log_message
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_pidofproc
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_start_daemon



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

* [PATCH 1/3] wq!lsb: Add init-functions to lsb-image
  2011-05-11  8:08 [PATCH 0/3] Add init scripts and make a link for sendmail Xiaofeng Yan
@ 2011-05-11  8:08 ` Xiaofeng Yan
  2011-05-11  8:09 ` [PATCH 2/3] init-functions: Conforming applications may install one or more initialization scripts Xiaofeng Yan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Xiaofeng Yan @ 2011-05-11  8:08 UTC (permalink / raw)
  To: poky

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

init-functions is needed by LSB Test Suite.

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-extended/lsb/lsb_1.4.bb |   39 +++++++++++++++++++++------------
 1 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsb_1.4.bb b/meta/recipes-extended/lsb/lsb_1.4.bb
index 17fb0e7..166ba4c 100644
--- a/meta/recipes-extended/lsb/lsb_1.4.bb
+++ b/meta/recipes-extended/lsb/lsb_1.4.bb
@@ -7,7 +7,13 @@ PR = "r0"
 
 LIC_FILES_CHKSUM = "file://README;md5=12da544b1a3a5a1795a21160b49471cf"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/${PV}/lsb-release-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/lsb/lsb_release/${PV}/lsb-release-${PV}.tar.gz \
+           file://init-functions \
+           file://lsb_killproc \
+           file://lsb_log_message \
+           file://lsb_pidofproc \
+           file://lsb_start_daemon \
+           "
 
 SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
 SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
@@ -18,45 +24,50 @@ do_install(){
 	mkdir -p ${D}/bin
 	mkdir -p ${D}/lib
 	mkdir -p ${D}/etc/lsb-release.d
-	echo -n "LSB_VERSION=\"core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:" > ${D}/etc/lsb-release
+	echo -n "LSB_VERSION=\"core-4.1-noarch:" > ${D}/etc/lsb-release
 	
 	if [ "${TARGET_ARCH}" == "i586" ];then
-		echo -n "core-2.0-ia32:core-3.2-ia32:core-4.0-ia32" >>  ${D}/etc/lsb-release
+		echo -n "core-4.1-ia32" >>  ${D}/etc/lsb-release
 	else
-		echo -n "core-2.0-${TARGET_ARCH}:core-3.2-${TARGET_ARCH}:core-4.0-${TARGET_ARCH}" >>  ${D}/etc/lsb-release
+		echo -n "core-4.1-${TARGET_ARCH}" >>  ${D}/etc/lsb-release
 	fi
 	echo "\"" >> ${D}/etc/lsb-release
 	
 	if [ "${TARGET_ARCH}" == "i586" ];then
 		mkdir -p ${D}/etc/lsb-release.d
-		touch ${D}/etc/lsb-release.d/graphics-2.0-noarch
-		touch ${D}/etc/lsb-release.d/graphics-3.2-noarch
+		touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
 		touch ${D}/etc/lsb-release.d/graphics-${PV}-noarch
 		touch ${D}/etc/lsb-release.d/desktop-${PV}-noarch
-		touch ${D}/etc/lsb-release.d/graphics-2.0-ia32
-		touch ${D}/etc/lsb-release.d/graphics-3.2-ia32
+		touch ${D}/etc/lsb-release.d/graphics-4.1-ia32
 		touch ${D}/etc/lsb-release.d/graphics-${PV}-ia32
 		touch ${D}/etc/lsb-release.d/desktop-${PV}-ia32
 	elif [ "${TARGET_ARCH}" == "x86_64" ];then
-		touch ${D}/etc/lsb-release.d/graphics-2.0-amd64
-		touch ${D}/etc/lsb-release.d/graphics-3.2-amd64
+		touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+		touch ${D}/etc/lsb-release.d/graphics-4.1-amd64
 		touch ${D}/etc/lsb-release.d/graphics-${PV}-amd64
 		touch ${D}/etc/lsb-release.d/desktop-${PV}-amd64
 	fi
 	if [ "${TARGET_ARCH}" = "powerpc" ];then
-		touch ${D}/etc/lsb-release.d/graphics-2.0-ppc32
-		touch ${D}/etc/lsb-release.d/graphics-3.2-ppc32
+		touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+		touch ${D}/etc/lsb-release.d/graphics-4.1-ppc32
 		touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc32
 		touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc32
 	elif [ "${TARGET_ARCH}" = "powerpc64" ];then
-		touch ${D}/etc/lsb-release.d/graphics-2.0-ppc64
-		touch ${D}/etc/lsb-release.d/graphics-3.2-ppc64
+		touch ${D}/etc/lsb-release.d/graphics-4.1-noarch
+		touch ${D}/etc/lsb-release.d/graphics-4.1-ppc64
 		touch ${D}/etc/lsb-release.d/graphics-${PV}-ppc64
 		touch ${D}/etc/lsb-release.d/desktop-${PV}-ppc64
 	fi
 }
 
 do_install_append(){
+       install -d ${D}/etc/core-lsb
+       install -d ${D}/lib/lsb
+       for i in lsb_killproc lsb_log_message lsb_pidofproc lsb_start_daemon
+       do
+           install -m 0755 ${WORKDIR}/${i} ${D}/etc/core-lsb
+       done
+       install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb
        if [ "${TARGET_ARCH}" == "x86_64" ];then
 	       cd ${D}
 	       ln -sf lib lib64
-- 
1.7.0.4



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

* [PATCH 2/3] init-functions: Conforming applications may install one or more initialization scripts
  2011-05-11  8:08 [PATCH 0/3] Add init scripts and make a link for sendmail Xiaofeng Yan
  2011-05-11  8:08 ` [PATCH 1/3] wq!lsb: Add init-functions to lsb-image Xiaofeng Yan
@ 2011-05-11  8:09 ` Xiaofeng Yan
  2011-05-11  8:09 ` [PATCH 3/3] lsbsetup: Add link for sendmail Xiaofeng Yan
  2011-05-11 15:43 ` [PATCH 0/3] Add init scripts and make a " Richard Purdie
  3 siblings, 0 replies; 5+ messages in thread
From: Xiaofeng Yan @ 2011-05-11  8:09 UTC (permalink / raw)
  To: poky

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

LSB Test Suite need init scripts for lsb-image.

During the installer's post-install processing phase the program /usr/lib/lsb/install_initd \
must be called to activate the init script. \
When a software package is removed, /usr/lib/lsb/remove_initd \
must be called to deactivate the init script.

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-extended/lsb/lsb/init-functions   |   32 +++++++++++++++++
 meta/recipes-extended/lsb/lsb/lsb_killproc     |    6 +++
 meta/recipes-extended/lsb/lsb/lsb_log_message  |   27 ++++++++++++++
 meta/recipes-extended/lsb/lsb/lsb_pidofproc    |    6 +++
 meta/recipes-extended/lsb/lsb/lsb_start_daemon |   45 ++++++++++++++++++++++++
 5 files changed, 116 insertions(+), 0 deletions(-)
 create mode 100755 meta/recipes-extended/lsb/lsb/init-functions
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_killproc
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_log_message
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_pidofproc
 create mode 100755 meta/recipes-extended/lsb/lsb/lsb_start_daemon

diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions
new file mode 100755
index 0000000..bf424dd
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/init-functions
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# LSB initscript functions, as defined in the LSB Spec 1.1.0
+#
+# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
+# Updated to the latest LSB 3.1 spec
+# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
+
+start_daemon () {
+	/etc/core-lsb/lsb_start_daemon "$@"
+}
+
+killproc () {
+	/etc/core-lsb/lsb_killproc "$@"
+}
+
+pidofproc () {
+	/etc/core-lsb/lsb_pidofproc "$@"
+}
+
+log_success_msg () {
+	/etc/core-lsb/lsb_log_message success "$@"
+}
+
+log_failure_msg () {
+	/etc/core-lsb/lsb_log_message failure "$@"
+}
+
+log_warning_msg () {
+	/etc/core-lsb/lsb_log_message warning "$@"
+}
+
diff --git a/meta/recipes-extended/lsb/lsb/lsb_killproc b/meta/recipes-extended/lsb/lsb/lsb_killproc
new file mode 100755
index 0000000..e1121e4
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_killproc
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+LSB=LSB-1.1 killproc $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message
new file mode 100755
index 0000000..2995f78
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_log_message
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+ACTION=$1
+shift
+
+case "$ACTION" in
+  success)
+  	echo -n $*
+	success "$*"
+	echo
+	;;
+  failure)
+  	echo -n $*
+	failure "$*"
+	echo
+	;;
+  warning)
+  	echo -n $*
+	warning "$*"
+	echo
+	;;
+  *)
+  	;;
+esac
+exit 0
diff --git a/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
new file mode 100755
index 0000000..ffc17bb
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_pidofproc
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+pidofproc $*
+exit $?
diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
new file mode 100755
index 0000000..05b6371
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/init.d/functions
+
+nice=
+force=
+pidfile=
+user=
+check=
+RETVAL=
+while [ "$1" != "${1##[-+]}" ]; do
+	case $1 in
+	     -f)
+	     	force="--force"
+		shift
+		;;
+	     -n)
+	     	nice=$2
+		shift 2
+		;;
+	     -p)
+		pidfile="--pidfile $2"
+		shift 2
+		;;
+	     -u)
+	        user="--user $2"
+		shift 2
+		;;
+	     -c)
+	        check="--check $2"
+		shift 2
+		;;
+	      *)     
+ 		echo "Unknown Option $1"
+ 		echo "Options are:"
+ 		echo "-f" 
+		echo "-p {pidfile}"
+		echo "-n [+/-nicelevel]"
+		echo "-u {user}"
+		echo "-c {base}"
+	        exit 1;;	
+	esac
+done
+LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
+exit $?
-- 
1.7.0.4



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

* [PATCH 3/3] lsbsetup: Add link for sendmail
  2011-05-11  8:08 [PATCH 0/3] Add init scripts and make a link for sendmail Xiaofeng Yan
  2011-05-11  8:08 ` [PATCH 1/3] wq!lsb: Add init-functions to lsb-image Xiaofeng Yan
  2011-05-11  8:09 ` [PATCH 2/3] init-functions: Conforming applications may install one or more initialization scripts Xiaofeng Yan
@ 2011-05-11  8:09 ` Xiaofeng Yan
  2011-05-11 15:43 ` [PATCH 0/3] Add init scripts and make a " Richard Purdie
  3 siblings, 0 replies; 5+ messages in thread
From: Xiaofeng Yan @ 2011-05-11  8:09 UTC (permalink / raw)
  To: poky

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

Link /sbin/sendmail/ to /usr/lib/sendmail

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/recipes-extended/lsb/lsbsetup_0.9.bb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsbsetup_0.9.bb b/meta/recipes-extended/lsb/lsbsetup_0.9.bb
index 8f7da53..b0d0a3f 100644
--- a/meta/recipes-extended/lsb/lsbsetup_0.9.bb
+++ b/meta/recipes-extended/lsb/lsbsetup_0.9.bb
@@ -17,6 +17,7 @@ do_install() {
         install -d  ${D}/usr/lib/lsb
         ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd
         ln -sf ${base_sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd
+        ln -sf ${base_sbindir}/sendmail ${D}/${libdir}/lsb/sendmail
 }
 
 FILES_${PN} += "${libdir}/lsb"
-- 
1.7.0.4



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

* Re: [PATCH 0/3] Add init scripts and make a link for sendmail
  2011-05-11  8:08 [PATCH 0/3] Add init scripts and make a link for sendmail Xiaofeng Yan
                   ` (2 preceding siblings ...)
  2011-05-11  8:09 ` [PATCH 3/3] lsbsetup: Add link for sendmail Xiaofeng Yan
@ 2011-05-11 15:43 ` Richard Purdie
  3 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2011-05-11 15:43 UTC (permalink / raw)
  To: Xiaofeng Yan; +Cc: poky

On Wed, 2011-05-11 at 16:08 +0800, Xiaofeng Yan wrote:
> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> I Add init-functios to lsb-image because LSB Test suite need init scripts.
> And I make a link for sendmail because LSB Test Suite need it. 
> 
> Pull URL: git://git.pokylinux.org/poky-contrib.git
>   Branch: xiaofeng/lsb
>   Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/lsb
> 
> Thanks,
>     Xiaofeng Yan <xiaofeng.yan@windriver.com>
> ---
> 
> 
> Xiaofeng Yan (3):
>   wq!lsb: Add init-functions to lsb-image
>   init-functions: Conforming applications may install one or more
>     initialization scripts
>   lsbsetup: Add link for sendmail

Merged to master, thanks.

Richard



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

end of thread, other threads:[~2011-05-11 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-11  8:08 [PATCH 0/3] Add init scripts and make a link for sendmail Xiaofeng Yan
2011-05-11  8:08 ` [PATCH 1/3] wq!lsb: Add init-functions to lsb-image Xiaofeng Yan
2011-05-11  8:09 ` [PATCH 2/3] init-functions: Conforming applications may install one or more initialization scripts Xiaofeng Yan
2011-05-11  8:09 ` [PATCH 3/3] lsbsetup: Add link for sendmail Xiaofeng Yan
2011-05-11 15:43 ` [PATCH 0/3] Add init scripts and make a " Richard Purdie

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.