Patchwork [meta-webserver,PATCHv4] monkey: new v1.5.1 release.

login
register
mail settings
Submitter Eduardo Silva
Date July 12, 2014, 6:37 a.m.
Message ID <1405147077-22498-1-git-send-email-eduardo@monkey.io>
Download mbox | patch
Permalink /patch/75405/
State New, archived
Headers show

Comments

Eduardo Silva - July 12, 2014, 6:37 a.m.
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

Signed-off-by: Eduardo Silva <eduardo@monkey.io>
---
 .../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%)
Eduardo Silva - July 17, 2014, 5:06 p.m.
additional notes on this patch:

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



On Sat, Jul 12, 2014 at 12:37 AM, Eduardo Silva <eduardo@monkey.io> wrote:

> 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
>
> Signed-off-by: Eduardo Silva <eduardo@monkey.io>
> ---
>  .../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%)
>
> diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.init
> b/meta-webserver/recipes-httpd/monkey/files/monkey.init
> new file mode 100644
> index 0000000..40b2118
> --- /dev/null
> +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.init
> @@ -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
> diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.service
> b/meta-webserver/recipes-httpd/monkey/files/monkey.service
> new file mode 100644
> index 0000000..f9aa57f
> --- /dev/null
> +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.service
> @@ -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
> diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
> b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
> 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
> --- a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
> +++ b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
> @@ -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
> +}
> --
> 1.9.1
>
>
Martin Jansa - July 18, 2014, 6:15 p.m.
On Sat, Jul 12, 2014 at 12:37:57AM -0600, Eduardo Silva wrote:
> 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
> 
> Signed-off-by: Eduardo Silva <eduardo@monkey.io>
> ---
>  .../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%)
> 
> diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.init b/meta-webserver/recipes-httpd/monkey/files/monkey.init
> new file mode 100644
> index 0000000..40b2118
> --- /dev/null
> +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.init
> @@ -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
> diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.service b/meta-webserver/recipes-httpd/monkey/files/monkey.service
> new file mode 100644
> index 0000000..f9aa57f
> --- /dev/null
> +++ b/meta-webserver/recipes-httpd/monkey/files/monkey.service
> @@ -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
> diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
> 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
> --- a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
> +++ b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
> @@ -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
> +}

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

> -- 
> 1.9.1
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Eduardo Silva - July 18, 2014, 6:19 p.m.
>
> 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
Martin Jansa - July 18, 2014, 6:27 p.m.
On Fri, Jul 18, 2014 at 12:19:29PM -0600, Eduardo Silva wrote:
> >
> > 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.

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 = ""
Eduardo Silva - July 20, 2014, 9:15 p.m.
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






On Fri, Jul 18, 2014 at 12:27 PM, Martin Jansa <martin.jansa@gmail.com>
wrote:

> On Fri, Jul 18, 2014 at 12:19:29PM -0600, Eduardo Silva wrote:
> > >
> > > 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.
>
> 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: Martin.Jansa@gmail.com
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>
Martin Jansa - July 20, 2014, 9:47 p.m.
On Sun, Jul 20, 2014 at 03:15:00PM -0600, Eduardo Silva wrote:
> 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.

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

> On Fri, Jul 18, 2014 at 12:27 PM, Martin Jansa <martin.jansa@gmail.com>
> wrote:
> 
> > On Fri, Jul 18, 2014 at 12:19:29PM -0600, Eduardo Silva wrote:
> > > >
> > > > 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.
> >
> > 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: Martin.Jansa@gmail.com
> >
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >
> >
> 
> 
> -- 
> Eduardo Silva
> Monkey Software
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Martin Jansa - July 25, 2014, 10:05 a.m.
On Sun, Jul 20, 2014 at 11:47:25PM +0200, Martin Jansa wrote:
> On Sun, Jul 20, 2014 at 03:15:00PM -0600, Eduardo Silva wrote:
> > 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.
> 
> 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

> Thanks
> 
> > On Fri, Jul 18, 2014 at 12:27 PM, Martin Jansa <martin.jansa@gmail.com>
> > wrote:
> > 
> > > On Fri, Jul 18, 2014 at 12:19:29PM -0600, Eduardo Silva wrote:
> > > > >
> > > > > 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.
> > >
> > > 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: Martin.Jansa@gmail.com
> > >
> > > --
> > > _______________________________________________
> > > Openembedded-devel mailing list
> > > Openembedded-devel@lists.openembedded.org
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> > >
> > >
> > 
> > 
> > -- 
> > Eduardo Silva
> > Monkey Software
> > -- 
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Eduardo Silva - July 26, 2014, 3:03 p.m.
hi Martin,


> > 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 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
Eduardo Silva - Aug. 4, 2014, 7:57 p.m.
Hi Martin,

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

best


On Sat, Jul 26, 2014 at 9:03 AM, Eduardo Silva <eduardo@monkey.io> wrote:

> hi Martin,
>
>
>> > 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 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
>
>
Martin Jansa - Aug. 5, 2014, 7:50 a.m.
On Mon, Aug 04, 2014 at 01:57:21PM -0600, Eduardo Silva wrote:
> Hi Martin,

Hi,

> 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."

> best
> 
> 
> On Sat, Jul 26, 2014 at 9:03 AM, Eduardo Silva <eduardo@monkey.io> wrote:
> 
> > hi Martin,
> >
> >
> >> > 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 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
> >
> >
> 
> 
> 
> -- 
> Eduardo Silva
> Monkey Software
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Eduardo Silva - Aug. 7, 2014, 4:51 a.m.
>
> 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.

Patch

diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.init b/meta-webserver/recipes-httpd/monkey/files/monkey.init
new file mode 100644
index 0000000..40b2118
--- /dev/null
+++ b/meta-webserver/recipes-httpd/monkey/files/monkey.init
@@ -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
diff --git a/meta-webserver/recipes-httpd/monkey/files/monkey.service b/meta-webserver/recipes-httpd/monkey/files/monkey.service
new file mode 100644
index 0000000..f9aa57f
--- /dev/null
+++ b/meta-webserver/recipes-httpd/monkey/files/monkey.service
@@ -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
diff --git a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
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
--- a/meta-webserver/recipes-httpd/monkey/monkey_1.5.0.bb
+++ b/meta-webserver/recipes-httpd/monkey/monkey_1.5.1.bb
@@ -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
+}