Skip to contentSkip to conversation

monkey: new v1.5.1 release.

PATCH In review Eduardo Silva 2 participants 13 messages Jul 12, 2014 – Aug 7, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 monkey: new v1.5.1 release.

This patch add the minor release fix of Monkey HTTP Server v1.5.1. It fixes some problems when switching user when started as root.

monkey/yocto: 941ce3a55496d42164164877735db6c8def63265

---
 .../recipes-httpd/monkey/files/monkey.init         | 34 ++++++++++++++++++++++
 .../recipes-httpd/monkey/files/monkey.service      | 12 ++++++++
 .../monkey/{monkey_1.5.0.bb => monkey_1.5.1.bb}    | 25 ++++++++++++----
 3 files changed, 65 insertions(+), 6 deletions(-)
 create mode 100644 meta-webserver/recipes-httpd/monkey/files/monkey.init
 create mode 100644 meta-webserver/recipes-httpd/monkey/files/monkey.service
 rename meta-webserver/recipes-httpd/monkey/{monkey_1.5.0.bb => monkey_1.5.1.bb} (59%)
meta-webserver/recipes-httpd/monkey/files/monkey.init new file +34 -0
new file mode 100644
index 0000000..40b2118
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/monkey
+NAME=monkey
+DESC="Monkey HTTP Server"
+OPTS="--daemon"
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start -x "$DAEMON" -- $OPTS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --stop -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon --stop -x "$DAEMON"
+	sleep 1
+	start-stop-daemon --start -x "$DAEMON" -- $OPTS
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
meta-webserver/recipes-httpd/monkey/files/monkey.service new file +12 -0
new file mode 100644
index 0000000..f9aa57f
@@ -0,0 +1,12 @@
+[Unit]
+Description=Monkey HTTP Server
+After=network.target remote-fs.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/monkey --daemon
+PIDFile=/var/run/monkey.pid.2001
+TimeoutSec=10
+
+[Install]
+WantedBy=multi-user.target
meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +19 -6
similarity index 59%
rename from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
rename to meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
index 6fa1b77..7d0239e 100644
@@ -7,22 +7,24 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
 
 SECTION = "net"
 
-SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz"
-SRC_URI[md5sum] = "9123fc371334621fde1c060ab17adcd3"
-SRC_URI[sha256sum] = "f7a5e4839822750930a723f63a4edbf700e0fb8299a4b3637bd8bab5b1d098a7"
+SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \
+           file://monkey.service \
+           file://monkey.init"
+
+SRC_URI[md5sum] = "2fe04135728f5c3a86c3a412059e0da3"
+SRC_URI[sha256sum] = "28dfc5e57bbcd305727e7af6a1a0587868db1c1286498757bfeb72edddf457e7"
 
 EXTRA_OECONF = " \
              --plugdir=${libdir}/monkey/ \
              --logdir=${localstatedir}/log/monkey/ \
              --pidfile=${localstatedir}/run/monkey.pid \
              --default-user=www-data \
-             --datadir= ${localstatedir}/www/monkey/ \
+             --datadir=${localstatedir}/www/monkey/ \
              --sysconfdir=${sysconfdir}/monkey/ \
              --enable-plugins=* \
              --disable-plugins=polarssl \
              --debug \
-             --malloc-libc \
-"
+             --malloc-libc"
 
 inherit autotools-brokensep pkgconfig update-rc.d systemd
 
@@ -34,3 +36,14 @@ SYSTEMD_SERVICE_${PN} = "monkey.service"
 FILES_${PN} += "${localstatedir}/www/monkey/"
 
 CONFFILES_${PN} = "${sysconfdir}/monkey/"
+
+do_install_append() {
+
+    mkdir -p ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
+
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system
+    fi
+}
Signature · 1 line
1.9.1
#1 lore raw

additional notes on this patch:

- tested with Sato image with systemd
- tested with Sato image with common init.d sript.

Quoted 141 lines · Eduardo Silva

This patch add the minor release fix of Monkey HTTP Server v1.5.1. It fixes some problems when switching user when started as root.

monkey/yocto: 941ce3a55496d42164164877735db6c8def63265

---
 .../recipes-httpd/monkey/files/monkey.init         | 34
++++++++++++++++++++++
 .../recipes-httpd/monkey/files/monkey.service      | 12 ++++++++
 .../monkey/{monkey_1.5.0.bb => monkey_1.5.1.bb}    | 25 ++++++++++++----
 3 files changed, 65 insertions(+), 6 deletions(-)
 create mode 100644 meta-webserver/recipes-httpd/monkey/files/monkey.init
 create mode 100644
meta-webserver/recipes-httpd/monkey/files/monkey.service
 rename meta-webserver/recipes-httpd/monkey/{monkey_1.5.0.bb =>

monkey_1.5.1.bb} (59%)

meta-webserver/recipes-httpd/monkey/files/monkey.init new file +34 -0
new file mode 100644
index 0000000..40b2118
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/monkey
+NAME=monkey
+DESC="Monkey HTTP Server"
+OPTS="--daemon"
+
+case "$1" in
+  start)
+       echo -n "Starting $DESC: "
+       start-stop-daemon --start -x "$DAEMON" -- $OPTS
+       echo "$NAME."
+       ;;
+  stop)
+       echo -n "Stopping $DESC: "
+       start-stop-daemon --stop -x "$DAEMON"
+       echo "$NAME."
+       ;;
+  restart|force-reload)
+       echo -n "Restarting $DESC: "
+       start-stop-daemon --stop -x "$DAEMON"
+       sleep 1
+       start-stop-daemon --start -x "$DAEMON" -- $OPTS
+       echo "$NAME."
+       ;;
+  *)
+       N=/etc/init.d/$NAME
+       echo "Usage: $N {start|stop|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
meta-webserver/recipes-httpd/monkey/files/monkey.service new file +12 -0
new file mode 100644
index 0000000..f9aa57f
@@ -0,0 +1,12 @@
+[Unit]
+Description=Monkey HTTP Server
+After=network.target remote-fs.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/monkey --daemon
+PIDFile=/var/run/monkey.pid.2001
+TimeoutSec=10
+
+[Install]
+WantedBy=multi-user.target
meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +0 -0
similarity index 59%
rename from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
rename to meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
index 6fa1b77..7d0239e 100644
@@ -7,22 +7,24 @@ LIC_FILES_CHKSUM =

"file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"

SECTION = "net"

meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +0 -3
-SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz"
-SRC_URI[md5sum] = "9123fc371334621fde1c060ab17adcd3"
-SRC_URI[sha256sum] =

"f7a5e4839822750930a723f63a4edbf700e0fb8299a4b3637bd8bab5b1d098a7"

meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +6 -0
+SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \
+           file://monkey.service \
+           file://monkey.init"
+
+SRC_URI[md5sum] = "2fe04135728f5c3a86c3a412059e0da3"
+SRC_URI[sha256sum] =

"28dfc5e57bbcd305727e7af6a1a0587868db1c1286498757bfeb72edddf457e7"

 EXTRA_OECONF = " \
              --plugdir=${libdir}/monkey/ \
              --logdir=${localstatedir}/log/monkey/ \
              --pidfile=${localstatedir}/run/monkey.pid \
              --default-user=www-data \
meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +9 -3
-             --datadir= ${localstatedir}/www/monkey/ \
+             --datadir=${localstatedir}/www/monkey/ \
              --sysconfdir=${sysconfdir}/monkey/ \
              --enable-plugins=* \
              --disable-plugins=polarssl \
              --debug \
-             --malloc-libc \
-"
+             --malloc-libc"
 
 inherit autotools-brokensep pkgconfig update-rc.d systemd
@@ -34,3 +36,14 @@ SYSTEMD_SERVICE_${PN} = "monkey.service"
 FILES_${PN} += "${localstatedir}/www/monkey/"
 
 CONFFILES_${PN} = "${sysconfdir}/monkey/"
+
+do_install_append() {
+
+    mkdir -p ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
+
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};

then

meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +2 -0
+        install -d ${D}${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/monkey.service

${D}/${systemd_unitdir}/system

meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +2 -1
+    fi
+}
--

1.9.1

Signature · 2 lines
Eduardo Silva
Monkey Software
#2 lore raw
In reply to Eduardo Silva
Quoted 116 lines · Eduardo Silva

This patch add the minor release fix of Monkey HTTP Server v1.5.1. It fixes some problems when switching user when started as root.

monkey/yocto: 941ce3a55496d42164164877735db6c8def63265

---
 .../recipes-httpd/monkey/files/monkey.init         | 34 ++++++++++++++++++++++
 .../recipes-httpd/monkey/files/monkey.service      | 12 ++++++++
 .../monkey/{monkey_1.5.0.bb => monkey_1.5.1.bb}    | 25 ++++++++++++----
 3 files changed, 65 insertions(+), 6 deletions(-)
 create mode 100644 meta-webserver/recipes-httpd/monkey/files/monkey.init
 create mode 100644 meta-webserver/recipes-httpd/monkey/files/monkey.service
 rename meta-webserver/recipes-httpd/monkey/{monkey_1.5.0.bb => monkey_1.5.1.bb} (59%)
meta-webserver/recipes-httpd/monkey/files/monkey.init new file +34 -0
new file mode 100644
index 0000000..40b2118
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/monkey
+NAME=monkey
+DESC="Monkey HTTP Server"
+OPTS="--daemon"
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start -x "$DAEMON" -- $OPTS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --stop -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon --stop -x "$DAEMON"
+	sleep 1
+	start-stop-daemon --start -x "$DAEMON" -- $OPTS
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
meta-webserver/recipes-httpd/monkey/files/monkey.service new file +12 -0
new file mode 100644
index 0000000..f9aa57f
@@ -0,0 +1,12 @@
+[Unit]
+Description=Monkey HTTP Server
+After=network.target remote-fs.target
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/monkey --daemon
+PIDFile=/var/run/monkey.pid.2001
+TimeoutSec=10
+
+[Install]
+WantedBy=multi-user.target
meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +9 -6
similarity index 59%
rename from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
rename to meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
index 6fa1b77..7d0239e 100644
@@ -7,22 +7,24 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
 
 SECTION = "net"
 
-SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz"
-SRC_URI[md5sum] = "9123fc371334621fde1c060ab17adcd3"
-SRC_URI[sha256sum] = "f7a5e4839822750930a723f63a4edbf700e0fb8299a4b3637bd8bab5b1d098a7"
+SRC_URI = "http://monkey-project.com/releases/1.5/monkey-${PV}.tar.gz \
+           file://monkey.service \
+           file://monkey.init"
+
+SRC_URI[md5sum] = "2fe04135728f5c3a86c3a412059e0da3"
+SRC_URI[sha256sum] = "28dfc5e57bbcd305727e7af6a1a0587868db1c1286498757bfeb72edddf457e7"
 
 EXTRA_OECONF = " \
              --plugdir=${libdir}/monkey/ \
              --logdir=${localstatedir}/log/monkey/ \
              --pidfile=${localstatedir}/run/monkey.pid \
              --default-user=www-data \
-             --datadir= ${localstatedir}/www/monkey/ \
+             --datadir=${localstatedir}/www/monkey/ \
              --sysconfdir=${sysconfdir}/monkey/ \
              --enable-plugins=* \
              --disable-plugins=polarssl \
              --debug \
-             --malloc-libc \
-"
+             --malloc-libc"
 
 inherit autotools-brokensep pkgconfig update-rc.d systemd
 
@@ -34,3 +36,14 @@ SYSTEMD_SERVICE_${PN} = "monkey.service"
 FILES_${PN} += "${localstatedir}/www/monkey/"
 
 CONFFILES_${PN} = "${sysconfdir}/monkey/"
+

meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb SYSTEMD_SERVICE_${PN} = "monkey.service" · line 49

Quoted 10 lines
meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb renamed from meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb +10 -0
+do_install_append() {
+
+    mkdir -p ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
+
+    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+        install -d ${D}${systemd_unitdir}/system
+        install -m 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system
+    fi
+}

Now it failed with:

| NOTE: Not creating empty archive for monkey-locale-1.5.1-r0.2
| *** Error: CONTROL/conffiles mentions conffile /etc/monkey/ which does not exist
| 
| opkg-build: Please fix the above errors and try again.

I guess it's because sysvinit script was removed by update-rc.d.bbclass and then nothing was left in /etc/monkey

Quoted 8 lines
Signature · 7 lines
1.9.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw
Quoted 13 lines

Now it failed with:

| NOTE: Not creating empty archive for monkey-locale-1.5.1-r0.2 | *** Error: CONTROL/conffiles mentions conffile /etc/monkey/ which does not exist
|
| opkg-build: Please fix the above errors and try again.

I guess it's because sysvinit script was removed by update-rc.d.bbclass and then nothing was left in /etc/monkey

thanks for the report. Which specific build options did you use (and image) ?, i would like to be able to reproduce that problem locally, not sure why my tests passed.

best

Signature · 2 lines
Eduardo Silva
Monkey Software
#4 lore raw
Quoted 9 lines · Eduardo Silva
Quoted 9 lines

Now it failed with:

| NOTE: Not creating empty archive for monkey-locale-1.5.1-r0.2 | *** Error: CONTROL/conffiles mentions conffile /etc/monkey/ which does not exist
|
| opkg-build: Please fix the above errors and try again.

Quoted 7 lines
Quoted 4 lines

I guess it's because sysvinit script was removed by update-rc.d.bbclass and then nothing was left in /etc/monkey

thanks for the report. Which specific build options did you use (and image) ?, i would like to be able to reproduce that problem locally, not sure why my tests passed.

world builds as described on
http://www.openembedded.org/wiki/Bitbake_World_Status

probably the most important difference is:

# use systemd
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#5 lore raw

Hi Martin,

I was trying to reproduce the problem that you faced but here it worked fine. My local.conf looks like this:

--
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" MACHINE ??= "qemux86"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm" EXTRA_IMAGE_FEATURES = "debug-tweaks" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop"

BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K"

PACKAGECONFIG_pn-qemu-native = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"

INHERIT += ""

IMAGE_INSTALL_append = " monkey dropbear"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
--

a fresh build of 'bitbake -k core-image-sato' worked with the following .bb:

    b40e6ecaed2b10ba9c9aba4f128b029a  monkey_1.5.1.bb

before the test i make sure to clean the monkey stuff with 'bitbake -c cleanall monkey'. Do you see any difference between your system and mine ?, i am very interested into reproduce the problem you detected.

best

Quoted 42 lines · Martin Jansa
Quoted 5 lines · Eduardo Silva
Quoted 5 lines

Now it failed with:

| NOTE: Not creating empty archive for monkey-locale-1.5.1-r0.2 | *** Error: CONTROL/conffiles mentions conffile /etc/monkey/ which

does

Quoted 5 lines
Quoted 5 lines

not exist
|
| opkg-build: Please fix the above errors and try again.

I guess it's because sysvinit script was removed by

update-rc.d.bbclass and

Quoted 4 lines
Quoted 3 lines

then nothing was left in /etc/monkey

thanks for the report. Which specific build options did you use (and

image)

Quoted 1 line

?, i would like to be able to reproduce that problem locally, not sure

why

Quoted 1 line

my tests passed.

world builds as described on
http://www.openembedded.org/wiki/Bitbake_World_Status

probably the most important difference is:

# use systemd
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""

--
Martin 'JaMa' Jansa jabber: [email protected]

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 2 lines
Eduardo Silva
Monkey Software
#6 lore raw
Quoted 34 lines · Eduardo Silva

Hi Martin,

I was trying to reproduce the problem that you faced but here it worked fine. My local.conf looks like this:

--
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" MACHINE ??= "qemux86"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm" EXTRA_IMAGE_FEATURES = "debug-tweaks" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop"

BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K"

PACKAGECONFIG_pn-qemu-native = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"

INHERIT += ""

IMAGE_INSTALL_append = " monkey dropbear"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
--

Quoted 7 lines

a fresh build of 'bitbake -k core-image-sato' worked with the following .bb:

    b40e6ecaed2b10ba9c9aba4f128b029a  monkey_1.5.1.bb

before the test i make sure to clean the monkey stuff with 'bitbake -c cleanall monkey'. Do you see any difference between your system and mine ?, i am very interested into reproduce the problem you detected.

Please see rm_sysvinit_initddir function in systemd.bbclass

My builds are using "distroless" setup, if you're using poky then it's possible that there is still sysvinit added in your DISTRO_FEATURES somewhere (check bitbake -e monkay) so the sysv init script isn't removed in the end for you.

Thanks

Quoted 55 lines
Quoted 42 lines · Martin Jansa
Quoted 5 lines · Eduardo Silva
Quoted 5 lines

Now it failed with:

| NOTE: Not creating empty archive for monkey-locale-1.5.1-r0.2 | *** Error: CONTROL/conffiles mentions conffile /etc/monkey/ which

does

Quoted 5 lines
Quoted 5 lines

not exist
|
| opkg-build: Please fix the above errors and try again.

I guess it's because sysvinit script was removed by

update-rc.d.bbclass and

Quoted 4 lines
Quoted 3 lines

then nothing was left in /etc/monkey

thanks for the report. Which specific build options did you use (and

image)

Quoted 1 line

?, i would like to be able to reproduce that problem locally, not sure

why

Quoted 1 line

my tests passed.

world builds as described on
http://www.openembedded.org/wiki/Bitbake_World_Status

probably the most important difference is:

# use systemd
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""

--
Martin 'JaMa' Jansa jabber: [email protected]

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 7 lines
Eduardo Silva
Monkey Software
-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#7 lore raw
Quoted 43 lines · Martin Jansa
Quoted 34 lines · Eduardo Silva

Hi Martin,

I was trying to reproduce the problem that you faced but here it worked fine. My local.conf looks like this:

--
BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}" PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" MACHINE ??= "qemux86"
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm" EXTRA_IMAGE_FEATURES = "debug-tweaks" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop"

BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K"

PACKAGECONFIG_pn-qemu-native = "sdl"
ASSUME_PROVIDED += "libsdl-native"
CONF_VERSION = "1"

INHERIT += ""

IMAGE_INSTALL_append = " monkey dropbear"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
--

Quoted 7 lines

a fresh build of 'bitbake -k core-image-sato' worked with the following .bb:

    b40e6ecaed2b10ba9c9aba4f128b029a  monkey_1.5.1.bb

before the test i make sure to clean the monkey stuff with 'bitbake -c cleanall monkey'. Do you see any difference between your system and mine ?, i am very interested into reproduce the problem you detected.

Quoted 6 lines

Please see rm_sysvinit_initddir function in systemd.bbclass

My builds are using "distroless" setup, if you're using poky then it's possible that there is still sysvinit added in your DISTRO_FEATURES somewhere (check bitbake -e monkay) so the sysv init script isn't removed in the end for you.

I've just noticed that CONFFILES is set to
${sysconfdir}/monkey/

so it's not caused by missing init.d script but whole ${sysconfdir}/monkey/ is empty in PN, can you check what's installed there in your builds?

It's either not installed when some dependency is missing or it's included in different package in my build (knowing which file to look for would help).

Thanks

Quoted 60 lines

Thanks

Quoted 55 lines
Quoted 42 lines · Martin Jansa
Quoted 5 lines · Eduardo Silva
Quoted 5 lines

Now it failed with:

| NOTE: Not creating empty archive for monkey-locale-1.5.1-r0.2 | *** Error: CONTROL/conffiles mentions conffile /etc/monkey/ which

does

Quoted 5 lines
Quoted 5 lines

not exist
|
| opkg-build: Please fix the above errors and try again.

I guess it's because sysvinit script was removed by

update-rc.d.bbclass and

Quoted 4 lines
Quoted 3 lines

then nothing was left in /etc/monkey

thanks for the report. Which specific build options did you use (and

image)

Quoted 1 line

?, i would like to be able to reproduce that problem locally, not sure

why

Quoted 1 line

my tests passed.

world builds as described on
http://www.openembedded.org/wiki/Bitbake_World_Status

probably the most important difference is:

# use systemd
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""

--
Martin 'JaMa' Jansa jabber: [email protected]

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 7 lines
Eduardo Silva
Monkey Software
-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#8 lore raw

hi Martin,

Quoted 8 lines
Quoted 4 lines

My builds are using "distroless" setup, if you're using poky then it's possible that there is still sysvinit added in your DISTRO_FEATURES somewhere (check bitbake -e monkay) so the sysv init script isn't removed in the end for you.

I've just noticed that CONFFILES is set to
${sysconfdir}/monkey/

Quoted 9 lines

so it's not caused by missing init.d script but whole ${sysconfdir}/monkey/ is empty in PN, can you check what's installed there in your builds?

It's either not installed when some dependency is missing or it's included in different package in my build (knowing which file to look for would help).

thanks for tracking this. In my build using Poky i get installed the following files:

root@qemux86:~# find /etc/monkey/
/etc/monkey/
/etc/monkey/sites
/etc/monkey/sites/default
/etc/monkey/plugins.load
/etc/monkey/monkey.conf
/etc/monkey/monkey.mime
/etc/monkey/plugins
/etc/monkey/plugins/fastcgi
/etc/monkey/plugins/fastcgi/fastcgi.conf
/etc/monkey/plugins/logger
/etc/monkey/plugins/logger/logger.conf
/etc/monkey/plugins/mandril
/etc/monkey/plugins/mandril/mandril.conf
/etc/monkey/plugins/dirlisting
/etc/monkey/plugins/dirlisting/dirhtml.conf
/etc/monkey/plugins/dirlisting/themes
/etc/monkey/plugins/dirlisting/themes/guineo
/etc/monkey/plugins/dirlisting/themes/guineo/entry.theme
/etc/monkey/plugins/dirlisting/themes/guineo/footer.theme
/etc/monkey/plugins/dirlisting/themes/guineo/header.theme
/etc/monkey/plugins/cgi
/etc/monkey/plugins/cgi/cgi.conf
/etc/monkey/plugins/auth
/etc/monkey/plugins/auth/monkey.users
/etc/monkey/plugins/auth/README
/etc/monkey/plugins/proxy_reverse
/etc/monkey/plugins/proxy_reverse/proxy_reverse.conf
/etc/monkey/plugins/cheetah
/etc/monkey/plugins/cheetah/cheetah.conf

if you need any extra info let me know,

best

#9 lore raw

Directories in CONFFILES Was: [meta-webserver][PATCHv4] monkey: new v1.5.1 release.

Quoted 15 lines · Eduardo Silva

hi Martin,

Quoted 12 lines
Quoted 4 lines

My builds are using "distroless" setup, if you're using poky then it's possible that there is still sysvinit added in your DISTRO_FEATURES somewhere (check bitbake -e monkay) so the sysv init script isn't removed in the end for you.

I've just noticed that CONFFILES is set to
${sysconfdir}/monkey/

so it's not caused by missing init.d script but whole ${sysconfdir}/monkey/ is empty in PN, can you check what's installed there in your builds?

Quoted 7 lines
Quoted 5 lines

It's either not installed when some dependency is missing or it's included in different package in my build (knowing which file to look for would help).

thanks for tracking this. In my build using Poky i get installed the following files:

I think I've finally found the root cause of this

The problem is that ${sysconfdir}/monkey/ is directory and ipk backend doesn't support directories in conffiles.

This is snipped from opkg-utils/opkg-build:

if [ -f $CONTROL/conffiles ]; then
for cf in cat $CONTROL/conffiles; do
if [ ! -f ./$cf ]; then
echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2 PKG_ERROR=1
fi
done
fi

+ Ross because of following commit in oe-core

Ross, I assume you didn't use os.path.isfile, because RPM supports directories in conffiles, but maybe you had plans for opkg-utils?

Do you have patch somewhere to extend opkg-utils to allow directories in CONFFILES? Fix for this opkg-build check seems trivial, but I haven't check how opkg will handle this on target.

commit fb87edc881009cf4d582cd95c248884551fe07fe

Author: Ross Burton <[email protected]>
Date:   Tue Feb 5 21:12:50 2013 +0000

package_ipk: check CONFFILES exist before adding them to metadata

opkg-build verifies that conffiles exist, so verify that the specified files actually exist before writing them to conffiles.

This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.

meta/classes/package_ipk.bbclass +2 -1
index d735051..e5e76ef 100644
@@ -440,7 +440,8 @@ python do_package_ipk () {
                 bb.utils.unlockfile(lf)
                 raise bb.build.FuncFailed("unable to open conffiles for writing.")
             for f in conffiles_str.split():
-                conffiles.write('%s\n' % f)
+                if os.path.exists(oe.path.join(root, f)):
+                    conffiles.write('%s\n' % f)
             conffiles.close()
 
         os.chdir(basedir)

Eduardo, temporary work around is either list all CONFFILEs separately or drop CONFFILES (like I did for world builds)

Quoted 39 lines
root@qemux86:~# find /etc/monkey/
/etc/monkey/
/etc/monkey/sites
/etc/monkey/sites/default
/etc/monkey/plugins.load
/etc/monkey/monkey.conf
/etc/monkey/monkey.mime
/etc/monkey/plugins
/etc/monkey/plugins/fastcgi
/etc/monkey/plugins/fastcgi/fastcgi.conf
/etc/monkey/plugins/logger
/etc/monkey/plugins/logger/logger.conf
/etc/monkey/plugins/mandril
/etc/monkey/plugins/mandril/mandril.conf
/etc/monkey/plugins/dirlisting
/etc/monkey/plugins/dirlisting/dirhtml.conf
/etc/monkey/plugins/dirlisting/themes
/etc/monkey/plugins/dirlisting/themes/guineo
/etc/monkey/plugins/dirlisting/themes/guineo/entry.theme
/etc/monkey/plugins/dirlisting/themes/guineo/footer.theme
/etc/monkey/plugins/dirlisting/themes/guineo/header.theme
/etc/monkey/plugins/cgi
/etc/monkey/plugins/cgi/cgi.conf
/etc/monkey/plugins/auth
/etc/monkey/plugins/auth/monkey.users
/etc/monkey/plugins/auth/README
/etc/monkey/plugins/proxy_reverse
/etc/monkey/plugins/proxy_reverse/proxy_reverse.conf
/etc/monkey/plugins/cheetah
/etc/monkey/plugins/cheetah/cheetah.conf

if you need any extra info let me know,

best

Signature · 4 lines
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#10 lore raw
In reply to Eduardo Silva

Hi Martin,

Is this something OE specific or something in your own environment ?

best

Quoted 59 lines · Eduardo Silva

hi Martin,

Quoted 8 lines
Quoted 4 lines

My builds are using "distroless" setup, if you're using poky then it's possible that there is still sysvinit added in your DISTRO_FEATURES somewhere (check bitbake -e monkay) so the sysv init script isn't removed in the end for you.

I've just noticed that CONFFILES is set to
${sysconfdir}/monkey/

Quoted 9 lines

so it's not caused by missing init.d script but whole ${sysconfdir}/monkey/ is empty in PN, can you check what's installed there in your builds?

It's either not installed when some dependency is missing or it's included in different package in my build (knowing which file to look for would help).

thanks for tracking this. In my build using Poky i get installed the following files:

root@qemux86:~# find /etc/monkey/
/etc/monkey/
/etc/monkey/sites
/etc/monkey/sites/default
/etc/monkey/plugins.load
/etc/monkey/monkey.conf
/etc/monkey/monkey.mime
/etc/monkey/plugins
/etc/monkey/plugins/fastcgi
/etc/monkey/plugins/fastcgi/fastcgi.conf
/etc/monkey/plugins/logger
/etc/monkey/plugins/logger/logger.conf
/etc/monkey/plugins/mandril
/etc/monkey/plugins/mandril/mandril.conf
/etc/monkey/plugins/dirlisting
/etc/monkey/plugins/dirlisting/dirhtml.conf
/etc/monkey/plugins/dirlisting/themes
/etc/monkey/plugins/dirlisting/themes/guineo
/etc/monkey/plugins/dirlisting/themes/guineo/entry.theme
/etc/monkey/plugins/dirlisting/themes/guineo/footer.theme
/etc/monkey/plugins/dirlisting/themes/guineo/header.theme
/etc/monkey/plugins/cgi
/etc/monkey/plugins/cgi/cgi.conf
/etc/monkey/plugins/auth
/etc/monkey/plugins/auth/monkey.users
/etc/monkey/plugins/auth/README
/etc/monkey/plugins/proxy_reverse
/etc/monkey/plugins/proxy_reverse/proxy_reverse.conf
/etc/monkey/plugins/cheetah
/etc/monkey/plugins/cheetah/cheetah.conf

if you need any extra info let me know,

best

Signature · 2 lines
Eduardo Silva
Monkey Software
#11 lore raw
Quoted 1 line · Eduardo Silva

Hi Martin,

Hi,

Quoted 1 line

Is this something OE specific or something in your own environment ?

It's IPK specific, see my last reply in this thread with explanation:
"Directories in CONFFILES Was: [oe] [meta-webserver][PATCHv4] monkey:
new v1.5.1 release."

Quoted 75 lines

best

Quoted 59 lines · Eduardo Silva

hi Martin,

Quoted 8 lines
Quoted 4 lines

My builds are using "distroless" setup, if you're using poky then it's possible that there is still sysvinit added in your DISTRO_FEATURES somewhere (check bitbake -e monkay) so the sysv init script isn't removed in the end for you.

I've just noticed that CONFFILES is set to
${sysconfdir}/monkey/

Quoted 9 lines

so it's not caused by missing init.d script but whole ${sysconfdir}/monkey/ is empty in PN, can you check what's installed there in your builds?

It's either not installed when some dependency is missing or it's included in different package in my build (knowing which file to look for would help).

thanks for tracking this. In my build using Poky i get installed the following files:

root@qemux86:~# find /etc/monkey/
/etc/monkey/
/etc/monkey/sites
/etc/monkey/sites/default
/etc/monkey/plugins.load
/etc/monkey/monkey.conf
/etc/monkey/monkey.mime
/etc/monkey/plugins
/etc/monkey/plugins/fastcgi
/etc/monkey/plugins/fastcgi/fastcgi.conf
/etc/monkey/plugins/logger
/etc/monkey/plugins/logger/logger.conf
/etc/monkey/plugins/mandril
/etc/monkey/plugins/mandril/mandril.conf
/etc/monkey/plugins/dirlisting
/etc/monkey/plugins/dirlisting/dirhtml.conf
/etc/monkey/plugins/dirlisting/themes
/etc/monkey/plugins/dirlisting/themes/guineo
/etc/monkey/plugins/dirlisting/themes/guineo/entry.theme
/etc/monkey/plugins/dirlisting/themes/guineo/footer.theme
/etc/monkey/plugins/dirlisting/themes/guineo/header.theme
/etc/monkey/plugins/cgi
/etc/monkey/plugins/cgi/cgi.conf
/etc/monkey/plugins/auth
/etc/monkey/plugins/auth/monkey.users
/etc/monkey/plugins/auth/README
/etc/monkey/plugins/proxy_reverse
/etc/monkey/plugins/proxy_reverse/proxy_reverse.conf
/etc/monkey/plugins/cheetah
/etc/monkey/plugins/cheetah/cheetah.conf

if you need any extra info let me know,

best

Signature · 7 lines
Eduardo Silva
Monkey Software
-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#12 lore raw
Quoted 8 lines

hing OE specific or something in your own environment ?

It's IPK specific, see my last reply in this thread with explanation:
"Directories in CONFFILES Was: [oe] [meta-webserver][PATCHv4] monkey:
new v1.5.1 release."

thanks.

All changes will come in the bb file for v1.5.2 release.

Signature · 2 lines
Eduardo Silva
Monkey Software