* All the syslogs
@ 2010-05-06 6:04 Steffen Sledz
2010-05-06 6:13 ` Koen Kooi
0 siblings, 1 reply; 21+ messages in thread
From: Steffen Sledz @ 2010-05-06 6:04 UTC (permalink / raw)
To: openembedded-devel
Since i added the recipe for rsyslog we have three different
syslog implemenations in OE: (busybox-)syslog, syslog-ng, and
rsyslog.
At the moment syslog-ng and rsyslog have pkg_postinst and pkg_postrm
stages which use update-rc.d to deinstall/reinstall init.d links
for (busybox-)syslog which is default.
This seems to be a bad hack for me. I believe there must be better
solutions for this situation. But I'm not sure which is the preferred.
Is this a case for alternatives? Or something like
DISTRO_SYSLOG_DAEMON? Or something else?
Steffen
--
Steffen Sledz
DResearch Digital Media Systems GmbH
Otto-Schmirgal-Str.3, D-10319 Berlin, Germany
Tel: +49 (30) 515932237 mailto:sledz@DResearch.DE
Fax: +49 (30) 515932299 http://www.DResearch.DE
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 54412;
Ust.-IDNr. DE169013825; WEEE Reg.-Nr. DE 85995642
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-06 6:04 All the syslogs Steffen Sledz
@ 2010-05-06 6:13 ` Koen Kooi
2010-05-07 7:46 ` Steffen Sledz
0 siblings, 1 reply; 21+ messages in thread
From: Koen Kooi @ 2010-05-06 6:13 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06-05-10 08:04, Steffen Sledz wrote:
> Since i added the recipe for rsyslog we have three different
> syslog implemenations in OE: (busybox-)syslog, syslog-ng, and
> rsyslog.
>
> At the moment syslog-ng and rsyslog have pkg_postinst and pkg_postrm
> stages which use update-rc.d to deinstall/reinstall init.d links
> for (busybox-)syslog which is default.
>
> This seems to be a bad hack for me. I believe there must be better
> solutions for this situation. But I'm not sure which is the preferred.
> Is this a case for alternatives? Or something like
> DISTRO_SYSLOG_DAEMON? Or something else?
DISTRO_* is the wrong namespace for that, it's a per-image choice. You
could have a look at using u-a to changing initscripts and binaries.
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFL4l4hMkyGM64RGpERAmQGAKCnBaQCn4e8UJw7I4M+pbIJKVDUPACfa+fR
WHGvccUmsPf+1TDjDjiKtJ0=
=U2rv
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-06 6:13 ` Koen Kooi
@ 2010-05-07 7:46 ` Steffen Sledz
2010-05-07 10:59 ` Steffen Sledz
0 siblings, 1 reply; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 7:46 UTC (permalink / raw)
To: openembedded-devel
Am 06.05.2010 08:13, wrote Koen Kooi:
>> Since i added the recipe for rsyslog we have three different
>> syslog implemenations in OE: (busybox-)syslog, syslog-ng, and
>> rsyslog.
>
>> At the moment syslog-ng and rsyslog have pkg_postinst and pkg_postrm
>> stages which use update-rc.d to deinstall/reinstall init.d links
>> for (busybox-)syslog which is default.
>
>> This seems to be a bad hack for me. I believe there must be better
>> solutions for this situation. But I'm not sure which is the preferred.
>> Is this a case for alternatives? Or something like
>> DISTRO_SYSLOG_DAEMON? Or something else?
>
> DISTRO_* is the wrong namespace for that, it's a per-image choice. You
> could have a look at using u-a to changing initscripts and binaries.
OK, than i'll try to create an u-a setting for all the syslogs (btw: we
have not three but four different ones, there's sysklogd too).
Has anyone combined update-alternatives and update-rc.d for initscripts
before? I'm afraid there are some pitfalls in the naming of the initscript
itself and the symlinks.
Regards,
Steffen
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-07 7:46 ` Steffen Sledz
@ 2010-05-07 10:59 ` Steffen Sledz
2010-05-07 11:09 ` Martin Jansa
0 siblings, 1 reply; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 10:59 UTC (permalink / raw)
To: openembedded-devel
> OK, than i'll try to create an u-a setting for all the syslogs (btw: we
> have not three but four different ones, there's sysklogd too).
>
> Has anyone combined update-alternatives and update-rc.d for initscripts
> before? I'm afraid there are some pitfalls in the naming of the initscript
> itself and the symlinks.
I made some first tests and they confirmed my fears. :(
The recipes look like this:
-------------------->snip<---------------------------
inherit autotools update-rc.d
do_install_append() {
...
install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
}
pkg_postinst_${PN} () {
update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
}
pkg_prerm_${PN} () {
update-alternatives --remove syslog-init syslog.${PN}
}
INITSCRIPT_NAME = "syslog"
-------------------->snip<---------------------------
When opkg installs the packages it wants to run update-rc.d *before*
update-alternatives. This results in an "file does not exist" error. :(
Installing rsyslog (5.5.4-r1.0.5) to root...
Installing busybox-syslog (1.13.2-r24.1.5) to root...
Configuring rsyslog
update-rc.d: /etc/init.d/syslog: file does not exist
update-alternatives: Linking //etc/init.d/syslog to syslog.rsyslog
Any suggestions?
Regards,
Steffen
--
Steffen Sledz
DResearch Digital Media Systems GmbH
Otto-Schmirgal-Str.3, D-10319 Berlin, Germany
Tel: +49 (30) 515932237 mailto:sledz@DResearch.DE
Fax: +49 (30) 515932299 http://www.DResearch.DE
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 54412;
Ust.-IDNr. DE169013825; WEEE Reg.-Nr. DE 85995642
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-07 10:59 ` Steffen Sledz
@ 2010-05-07 11:09 ` Martin Jansa
2010-05-07 13:02 ` Steffen Sledz
0 siblings, 1 reply; 21+ messages in thread
From: Martin Jansa @ 2010-05-07 11:09 UTC (permalink / raw)
To: openembedded-devel
On Fri, May 07, 2010 at 12:59:58PM +0200, Steffen Sledz wrote:
> > OK, than i'll try to create an u-a setting for all the syslogs (btw: we
> > have not three but four different ones, there's sysklogd too).
> >
> > Has anyone combined update-alternatives and update-rc.d for initscripts
> > before? I'm afraid there are some pitfalls in the naming of the initscript
> > itself and the symlinks.
>
> I made some first tests and they confirmed my fears. :(
>
> The recipes look like this:
>
> -------------------->snip<---------------------------
> inherit autotools update-rc.d
>
> do_install_append() {
> ...
> install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
> }
>
> pkg_postinst_${PN} () {
> update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
> }
>
> pkg_prerm_${PN} () {
> update-alternatives --remove syslog-init syslog.${PN}
> }
>
> INITSCRIPT_NAME = "syslog"
> -------------------->snip<---------------------------
>
> When opkg installs the packages it wants to run update-rc.d *before*
> update-alternatives. This results in an "file does not exist" error. :(
>
> Installing rsyslog (5.5.4-r1.0.5) to root...
> Installing busybox-syslog (1.13.2-r24.1.5) to root...
> Configuring rsyslog
> update-rc.d: /etc/init.d/syslog: file does not exist
> update-alternatives: Linking //etc/init.d/syslog to syslog.rsyslog
> Any suggestions?
If there is only one u-a file in recipe you can try
inherit update-alternatives to see if it will generate postinst commands
in right order.
Or in worse case, move update-rc.d logic to your postinst scripts after
setting u-a links.
Regards,
--
uin:136542059 jid:Martin.Jansa@gmail.com
Jansa Martin sip:jamasip@voip.wengo.fr
JaMa
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-07 11:09 ` Martin Jansa
@ 2010-05-07 13:02 ` Steffen Sledz
2010-05-07 13:08 ` Martin Jansa
0 siblings, 1 reply; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 13:02 UTC (permalink / raw)
To: openembedded-devel
Am 07.05.2010 13:09, schrieb Martin Jansa:
>> When opkg installs the packages it wants to run update-rc.d *before*
>> update-alternatives. This results in an "file does not exist" error. :(
>>
>> Installing rsyslog (5.5.4-r1.0.5) to root...
>> Installing busybox-syslog (1.13.2-r24.1.5) to root...
>> Configuring rsyslog
>> update-rc.d: /etc/init.d/syslog: file does not exist
>> update-alternatives: Linking //etc/init.d/syslog to syslog.rsyslog
>> Any suggestions?
>
> If there is only one u-a file in recipe you can try
> inherit update-alternatives to see if it will generate postinst commands
> in right order.
Sorry, sometimes more than one.
> Or in worse case, move update-rc.d logic to your postinst scripts after
> setting u-a links.
Would be a
touch {sysconfdir}/init.d/syslog
in pkg_preinst_${PN} be acceptable? It worked well in my test.
Regards,
Steffen
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-07 13:02 ` Steffen Sledz
@ 2010-05-07 13:08 ` Martin Jansa
2010-05-07 14:04 ` Steffen Sledz
0 siblings, 1 reply; 21+ messages in thread
From: Martin Jansa @ 2010-05-07 13:08 UTC (permalink / raw)
To: openembedded-devel
On Fri, May 07, 2010 at 03:02:16PM +0200, Steffen Sledz wrote:
> Am 07.05.2010 13:09, schrieb Martin Jansa:
> >> When opkg installs the packages it wants to run update-rc.d *before*
> >> update-alternatives. This results in an "file does not exist" error. :(
> >>
> >> Installing rsyslog (5.5.4-r1.0.5) to root...
> >> Installing busybox-syslog (1.13.2-r24.1.5) to root...
> >> Configuring rsyslog
> >> update-rc.d: /etc/init.d/syslog: file does not exist
> >> update-alternatives: Linking //etc/init.d/syslog to syslog.rsyslog
> >> Any suggestions?
> >
> > If there is only one u-a file in recipe you can try
> > inherit update-alternatives to see if it will generate postinst commands
> > in right order.
>
> Sorry, sometimes more than one.
Yeah sort of expected that :/.
> > Or in worse case, move update-rc.d logic to your postinst scripts after
> > setting u-a links.
>
> Would be a
>
> touch {sysconfdir}/init.d/syslog
:) also option, but u-a should at least show warning that link file is
not and link and in worse scenario refuse to replace non-link file with
link to alternative (IIRC the case for u-a-cworth and his variant
included in opkg).
What I had in mind was adding:
update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
after u-a call in postinst and similar
update-rc.d $OPT ${INITSCRIPT_NAME} remove
in postrm, etc.
Regards,
--
uin:136542059 jid:Martin.Jansa@gmail.com
Jansa Martin sip:jamasip@voip.wengo.fr
JaMa
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-07 13:08 ` Martin Jansa
@ 2010-05-07 14:04 ` Steffen Sledz
2010-05-07 14:20 ` [PATCH] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
2010-05-07 14:52 ` All the syslogs Martin Jansa
0 siblings, 2 replies; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 14:04 UTC (permalink / raw)
To: openembedded-devel
>> Would be a
>>
>> touch {sysconfdir}/init.d/syslog
>
> :) also option, but u-a should at least show warning that link file is
> not and link and in worse scenario refuse to replace non-link file with
> link to alternative (IIRC the case for u-a-cworth and his variant
> included in opkg).
>
> What I had in mind was adding:
> update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
> after u-a call in postinst and similar
> update-rc.d $OPT ${INITSCRIPT_NAME} remove
> in postrm, etc.
I would prefer my method because the update-rc.d class does
a bit more than just calling update-rc.d (e.g. stop running
services). And i thing it's not a good idea to duplicate the
whole code.
Regards,
Steffen
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:04 ` Steffen Sledz
@ 2010-05-07 14:20 ` Steffen Sledz
2010-05-07 14:49 ` Martin Jansa
` (2 more replies)
2010-05-07 14:52 ` All the syslogs Martin Jansa
1 sibling, 3 replies; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 14:20 UTC (permalink / raw)
To: openembedded-devel
* u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
* syslog-ng needs to be integrated too!
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
recipes/busybox/busybox.inc | 18 ++++++++++++++++--
recipes/rsyslog/rsyslog.inc | 22 +++++++++++++---------
recipes/sysklogd/sysklogd.inc | 19 +++++++++++++++----
recipes/sysklogd/sysklogd_1.4.1.bb | 2 +-
recipes/sysklogd/sysklogd_1.5.bb | 2 +-
5 files changed, 46 insertions(+), 17 deletions(-)
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 17d8d14..31651d6 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
SECTION = "base"
PRIORITY = "required"
-INC_PR = "r27"
+INC_PR = "r28"
SRC_URI = "\
file://busybox-cron \
@@ -46,7 +46,7 @@ RDEPENDS_${PN} += "${PN}-mountall"
RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
@@ -154,6 +154,20 @@ pkg_prerm_${PN}-mountall () {
update-alternatives --remove default_mountall mountall.${PN}
}
+pkg_preinst_${PN}-syslog () {
+ # this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ touch {sysconfdir}/init.d/syslog
+}
+
+pkg_postinst_${PN}-syslog () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
+}
+
+pkg_prerm_${PN}-syslog () {
+ update-alternatives --remove syslog-init syslog.${PN}
+}
+
pkg_prerm_${PN} () {
# This is so you can make busybox commit suicide - removing busybox with no other packages
# providing its files, this will make update-alternatives work, but the update-rc.d part
diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
index 3e39ba0..6471724 100644
--- a/recipes/rsyslog/rsyslog.inc
+++ b/recipes/rsyslog/rsyslog.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
DEPENDS = "zlib"
HOMEPAGE = "http://www.rsyslog.com/"
LICENSE = "GPLv3"
-INC_PR = "r0"
+INC_PR = "r1"
SRC_URI = "http://download.rsyslog.com/rsyslog/${PN}-${PV}.tar.gz \
file://rsyslog.conf \
@@ -14,19 +14,23 @@ do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -d ${D}/${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/rsyslog
+ install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
}
-pkg_postinst() {
- update-rc.d -f syslog remove
+pkg_preinst_${PN} () {
+ # this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ touch {sysconfdir}/init.d/syslog
}
-pkg_postrm() {
- update-rc.d syslog add 5
+pkg_postinst_${PN} () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove syslog-init syslog.${PN}
}
CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
-INITSCRIPT_NAME = "rsyslog"
-#INITSCRIPT_PARAMS = "defaults 05"
-INITSCRIPT_PARAMS = "remove"
+INITSCRIPT_NAME = "syslog"
diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
index 65da86d..f6b6aab 100644
--- a/recipes/sysklogd/sysklogd.inc
+++ b/recipes/sysklogd/sysklogd.inc
@@ -1,16 +1,17 @@
LICENSE = "GPL"
SECTION = "base"
DESCRIPTION = "The sysklogd package implements two system log daemons."
+INC_PR = "r3"
SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
file://nonrootinstall.patch;patch=1 \
file://sysklogd"
inherit update-rc.d
-INITSCRIPT_NAME = "sysklogd"
-INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
+
+INITSCRIPT_NAME = "syslog"
+
CFLAGS_append = " -DSYSV"
-RCONFLICTS = "busybox-syslog"
do_install () {
install -d ${D}${mandir}/man8 \
@@ -23,14 +24,24 @@ do_install () {
install -d ${D}${sysconfdir}
install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
install -d ${D}${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/sysklogd
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
+}
+
+pkg_preinst_${PN} () {
+ # this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ touch {sysconfdir}/init.d/syslog
}
+
pkg_postinst_${PN} () {
update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100
update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100
}
+
pkg_prerm_${PN} () {
update-alternatives --remove syslogd syslogd.${PN}
update-alternatives --remove klogd klogd.${PN}
+ update-alternatives --remove syslog-init syslog.${PN}
}
diff --git a/recipes/sysklogd/sysklogd_1.4.1.bb b/recipes/sysklogd/sysklogd_1.4.1.bb
index 3d938f5..e02dd3e 100644
--- a/recipes/sysklogd/sysklogd_1.4.1.bb
+++ b/recipes/sysklogd/sysklogd_1.4.1.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r1"
+PR = "${INC_PR}.1"
SRC_URI[md5sum] = "d214aa40beabf7bdb0c9b3c64432c774"
diff --git a/recipes/sysklogd/sysklogd_1.5.bb b/recipes/sysklogd/sysklogd_1.5.bb
index 70e55c3..a015768 100644
--- a/recipes/sysklogd/sysklogd_1.5.bb
+++ b/recipes/sysklogd/sysklogd_1.5.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r2"
+PR = "${INC_PR}.2"
SRC_URI += "file://no-strip-install.patch;patch=1"
--
1.6.4.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:20 ` [PATCH] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
@ 2010-05-07 14:49 ` Martin Jansa
2010-05-07 15:04 ` Steffen Sledz
2010-05-07 14:58 ` Martin Jansa
2010-05-07 15:34 ` [PATCH v2] " Steffen Sledz
2 siblings, 1 reply; 21+ messages in thread
From: Martin Jansa @ 2010-05-07 14:49 UTC (permalink / raw)
To: openembedded-devel
On Fri, May 07, 2010 at 04:20:36PM +0200, Steffen Sledz wrote:
> * u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
> * syslog-ng needs to be integrated too!
>
> Signed-off-by: Steffen Sledz <sledz@dresearch.de>
> ---
> recipes/busybox/busybox.inc | 18 ++++++++++++++++--
> recipes/rsyslog/rsyslog.inc | 22 +++++++++++++---------
> recipes/sysklogd/sysklogd.inc | 19 +++++++++++++++----
> recipes/sysklogd/sysklogd_1.4.1.bb | 2 +-
> recipes/sysklogd/sysklogd_1.5.bb | 2 +-
> 5 files changed, 46 insertions(+), 17 deletions(-)
>
> diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
> index 17d8d14..31651d6 100644
> --- a/recipes/busybox/busybox.inc
> +++ b/recipes/busybox/busybox.inc
> @@ -11,7 +11,7 @@ LICENSE = "GPLv2"
> SECTION = "base"
> PRIORITY = "required"
>
> -INC_PR = "r27"
> +INC_PR = "r28"
>
> SRC_URI = "\
> file://busybox-cron \
> @@ -46,7 +46,7 @@ RDEPENDS_${PN} += "${PN}-mountall"
> RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
>
> FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
> -FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
> +FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
> FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
>
> FILES_${PN} += "${datadir}/udhcpc"
> @@ -154,6 +154,20 @@ pkg_prerm_${PN}-mountall () {
> update-alternatives --remove default_mountall mountall.${PN}
> }
>
> +pkg_preinst_${PN}-syslog () {
> + # this is needed to avoid sysmlink errors,
> + # because update-rc.d runs before pkg_postinst :(
> + touch {sysconfdir}/init.d/syslog
missing $
touch: cannot touch `{sysconfdir}/init.d/syslog': No such file or directory
but even when I add $ here it should fail like
update-alternatives: Error: not linking //usr/bin/time to ../../bin/busybox since //usr/bin/time exists and is not a link
but fails a bit different
Configuring busybox-syslog.
update-rc.d: /etc/init.d/syslog: file does not exist
update-alternatives: Linking //etc/init.d/syslog to syslog.busybox
Removing package busybox-syslog from root...
update-alternatives: removing //etc/init.d/syslog as no more
alternatives exist for it
//usr/lib/opkg/info/busybox-syslog.prerm: line 6: /etc/init.d/syslog:
//not found
ie prerm has same problem as postinst.., genarated fuctions:
postinst
#!/bin/sh
if test "x$D" != "x"; then
OPT="-r $D"
else
OPT="-s"
fi
update-rc.d $OPT syslog defaults
update-alternatives --install /etc/init.d/syslog syslog-init
syslog.busybox 50
postrm
#!/bin/sh
if test "x$D" != "x"; then
OPT="-r $D"
else
OPT=""
fi
if test "$1" = "remove" -o "$1" = "purge"; then
if ! test -e "/etc/init.d/syslog"; then
update-rc.d $OPT syslog remove
fi
fi
preinst
# this is needed to avoid sysmlink errors,
# because update-rc.d runs before pkg_postinst :(
touch /etc/init.d/syslog
prerm
update-alternatives --remove syslog-init syslog.busybox
if test "x$D" = "x"; then
if test "$1" = "upgrade" -o "$1" = "remove"; then
/etc/init.d/syslog stop
fi
fi
> +}
> +
> +pkg_postinst_${PN}-syslog () {
> + update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
> +}
> +
> +pkg_prerm_${PN}-syslog () {
> + update-alternatives --remove syslog-init syslog.${PN}
> +}
> +
> pkg_prerm_${PN} () {
> # This is so you can make busybox commit suicide - removing busybox with no other packages
> # providing its files, this will make update-alternatives work, but the update-rc.d part
> diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
> index 3e39ba0..6471724 100644
> --- a/recipes/rsyslog/rsyslog.inc
> +++ b/recipes/rsyslog/rsyslog.inc
> @@ -2,7 +2,7 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
> DEPENDS = "zlib"
> HOMEPAGE = "http://www.rsyslog.com/"
> LICENSE = "GPLv3"
> -INC_PR = "r0"
> +INC_PR = "r1"
>
> SRC_URI = "http://download.rsyslog.com/rsyslog/${PN}-${PV}.tar.gz \
> file://rsyslog.conf \
> @@ -14,19 +14,23 @@ do_install_append() {
> install -d ${D}/${sysconfdir}/${PN}
> install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
> install -d ${D}/${sysconfdir}/init.d
> - install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/rsyslog
> + install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
> }
>
> -pkg_postinst() {
> - update-rc.d -f syslog remove
> +pkg_preinst_${PN} () {
> + # this is needed to avoid sysmlink errors,
> + # because update-rc.d runs before pkg_postinst :(
> + touch {sysconfdir}/init.d/syslog
> }
>
> -pkg_postrm() {
> - update-rc.d syslog add 5
> +pkg_postinst_${PN} () {
> + update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
> +}
> +
> +pkg_prerm_${PN} () {
> + update-alternatives --remove syslog-init syslog.${PN}
> }
>
> CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
>
> -INITSCRIPT_NAME = "rsyslog"
> -#INITSCRIPT_PARAMS = "defaults 05"
> -INITSCRIPT_PARAMS = "remove"
> +INITSCRIPT_NAME = "syslog"
> diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
> index 65da86d..f6b6aab 100644
> --- a/recipes/sysklogd/sysklogd.inc
> +++ b/recipes/sysklogd/sysklogd.inc
> @@ -1,16 +1,17 @@
> LICENSE = "GPL"
> SECTION = "base"
> DESCRIPTION = "The sysklogd package implements two system log daemons."
> +INC_PR = "r3"
>
> SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
> file://nonrootinstall.patch;patch=1 \
> file://sysklogd"
>
> inherit update-rc.d
> -INITSCRIPT_NAME = "sysklogd"
> -INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
params not needed anymore?
> +
> +INITSCRIPT_NAME = "syslog"
> +
> CFLAGS_append = " -DSYSV"
> -RCONFLICTS = "busybox-syslog"
Regards,
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: All the syslogs
2010-05-07 14:04 ` Steffen Sledz
2010-05-07 14:20 ` [PATCH] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
@ 2010-05-07 14:52 ` Martin Jansa
2010-05-12 12:10 ` [PATCH v3] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
1 sibling, 1 reply; 21+ messages in thread
From: Martin Jansa @ 2010-05-07 14:52 UTC (permalink / raw)
To: openembedded-devel
On Fri, May 07, 2010 at 04:04:37PM +0200, Steffen Sledz wrote:
> >> Would be a
> >>
> >> touch {sysconfdir}/init.d/syslog
> >
> > :) also option, but u-a should at least show warning that link file is
> > not and link and in worse scenario refuse to replace non-link file with
> > link to alternative (IIRC the case for u-a-cworth and his variant
> > included in opkg).
> >
> > What I had in mind was adding:
> > update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
> > after u-a call in postinst and similar
> > update-rc.d $OPT ${INITSCRIPT_NAME} remove
> > in postrm, etc.
>
> I would prefer my method because the update-rc.d class does
> a bit more than just calling update-rc.d (e.g. stop running
> services). And i thing it's not a good idea to duplicate the
> whole code.
I don't like duplicate code too, but maybe you don't need to restart
syslog? And your version doesn't work for u-a from opkg and u-a-cworth
as described in reply to that patch.
> Regards,
Regards,
> Steffen
--
uin:136542059 jid:Martin.Jansa@gmail.com
Jansa Martin sip:jamasip@voip.wengo.fr
JaMa
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:20 ` [PATCH] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
2010-05-07 14:49 ` Martin Jansa
@ 2010-05-07 14:58 ` Martin Jansa
2010-05-07 15:08 ` Steffen Sledz
2010-05-07 15:34 ` [PATCH v2] " Steffen Sledz
2 siblings, 1 reply; 21+ messages in thread
From: Martin Jansa @ 2010-05-07 14:58 UTC (permalink / raw)
To: openembedded-devel
On Fri, May 07, 2010 at 04:20:36PM +0200, Steffen Sledz wrote:
> * u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
> * syslog-ng needs to be integrated too!
>
> Signed-off-by: Steffen Sledz <sledz@dresearch.de>
> ---
> recipes/busybox/busybox.inc | 18 ++++++++++++++++--
> recipes/rsyslog/rsyslog.inc | 22 +++++++++++++---------
> recipes/sysklogd/sysklogd.inc | 19 +++++++++++++++----
> recipes/sysklogd/sysklogd_1.4.1.bb | 2 +-
> recipes/sysklogd/sysklogd_1.5.bb | 2 +-
> 5 files changed, 46 insertions(+), 17 deletions(-)
>
> diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
> index 17d8d14..31651d6 100644
> --- a/recipes/busybox/busybox.inc
> +++ b/recipes/busybox/busybox.inc
> @@ -11,7 +11,7 @@ LICENSE = "GPLv2"
> SECTION = "base"
> PRIORITY = "required"
>
> -INC_PR = "r27"
> +INC_PR = "r28"
>
> SRC_URI = "\
> file://busybox-cron \
> @@ -46,7 +46,7 @@ RDEPENDS_${PN} += "${PN}-mountall"
> RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
>
> FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
> -FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
> +FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
> FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
>
> FILES_${PN} += "${datadir}/udhcpc"
> @@ -154,6 +154,20 @@ pkg_prerm_${PN}-mountall () {
> update-alternatives --remove default_mountall mountall.${PN}
> }
>
> +pkg_preinst_${PN}-syslog () {
> + # this is needed to avoid sysmlink errors,
> + # because update-rc.d runs before pkg_postinst :(
> + touch {sysconfdir}/init.d/syslog
> +}
> +
> +pkg_postinst_${PN}-syslog () {
> + update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
> +}
> +
> +pkg_prerm_${PN}-syslog () {
> + update-alternatives --remove syslog-init syslog.${PN}
> +}
> +
> pkg_prerm_${PN} () {
> # This is so you can make busybox commit suicide - removing busybox with no other packages
> # providing its files, this will make update-alternatives work, but the update-rc.d part
One more issue with this part, partialy explaining what went wrong in
that log. You're not creating syslog.busybox, so real /etc/init.d/syslog
is not packaged and after u-a /etc/init.d/syslog points to non-existing
/etc/init.d/syslog.busybox and that's why update-rc.d says it doesn't
exist.
Regards,
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:49 ` Martin Jansa
@ 2010-05-07 15:04 ` Steffen Sledz
2010-05-10 8:30 ` Martin Jansa
0 siblings, 1 reply; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 15:04 UTC (permalink / raw)
To: openembedded-devel
Am 07.05.2010 16:49, Martin Jansa wrote:
>> +pkg_preinst_${PN}-syslog () {
>> + # this is needed to avoid sysmlink errors,
>> + # because update-rc.d runs before pkg_postinst :(
>> + touch {sysconfdir}/init.d/syslog
>
> missing $
<Grrrr>
> touch: cannot touch `{sysconfdir}/init.d/syslog': No such file or directory
>
> but even when I add $ here it should fail like
> update-alternatives: Error: not linking //usr/bin/time to ../../bin/busybox since //usr/bin/time exists and is not a link
>
> but fails a bit different
>
> Configuring busybox-syslog.
> update-rc.d: /etc/init.d/syslog: file does not exist
> update-alternatives: Linking //etc/init.d/syslog to syslog.busybox
Are you sure that you run the patched version? It looks like
running a version without touch in pkg_preinst.
> ...
>> -INITSCRIPT_NAME = "sysklogd"
>> -INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
>
> params not needed anymore?
Fall back to the defaults like in all the other syslog recipes.
Regards,
Steffen
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:58 ` Martin Jansa
@ 2010-05-07 15:08 ` Steffen Sledz
0 siblings, 0 replies; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 15:08 UTC (permalink / raw)
To: openembedded-devel
Am 07.05.2010 16:58, Martin Jansa wrote:
> One more issue with this part, partialy explaining what went wrong in
> that log. You're not creating syslog.busybox, so real /etc/init.d/syslog
> is not packaged and after u-a /etc/init.d/syslog points to non-existing
> /etc/init.d/syslog.busybox and that's why update-rc.d says it doesn't
> exist.
Forgot a little modification in do_install. Will be fixed in the
next patch version.
Thanx,
Steffen
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:20 ` [PATCH] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
2010-05-07 14:49 ` Martin Jansa
2010-05-07 14:58 ` Martin Jansa
@ 2010-05-07 15:34 ` Steffen Sledz
2 siblings, 0 replies; 21+ messages in thread
From: Steffen Sledz @ 2010-05-07 15:34 UTC (permalink / raw)
To: openembedded-devel
* u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
* syslog-ng needs to be integrated too!
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
recipes/busybox/busybox.inc | 20 +++++++++++++++++---
recipes/rsyslog/rsyslog.inc | 22 +++++++++++++---------
recipes/sysklogd/sysklogd.inc | 19 +++++++++++++++----
recipes/sysklogd/sysklogd_1.4.1.bb | 2 +-
recipes/sysklogd/sysklogd_1.5.bb | 2 +-
5 files changed, 47 insertions(+), 18 deletions(-)
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 17d8d14..33b3811 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
SECTION = "base"
PRIORITY = "required"
-INC_PR = "r27"
+INC_PR = "r28"
SRC_URI = "\
file://busybox-cron \
@@ -46,7 +46,7 @@ RDEPENDS_${PN} += "${PN}-mountall"
RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
@@ -104,7 +104,7 @@ do_install () {
ln -sf busybox ${D}${base_bindir}/sh
if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
fi
if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
@@ -154,6 +154,20 @@ pkg_prerm_${PN}-mountall () {
update-alternatives --remove default_mountall mountall.${PN}
}
+pkg_preinst_${PN}-syslog () {
+ # this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ touch ${sysconfdir}/init.d/syslog
+}
+
+pkg_postinst_${PN}-syslog () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
+}
+
+pkg_prerm_${PN}-syslog () {
+ update-alternatives --remove syslog-init syslog.${PN}
+}
+
pkg_prerm_${PN} () {
# This is so you can make busybox commit suicide - removing busybox with no other packages
# providing its files, this will make update-alternatives work, but the update-rc.d part
diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
index 3e39ba0..d7b81c0 100644
--- a/recipes/rsyslog/rsyslog.inc
+++ b/recipes/rsyslog/rsyslog.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
DEPENDS = "zlib"
HOMEPAGE = "http://www.rsyslog.com/"
LICENSE = "GPLv3"
-INC_PR = "r0"
+INC_PR = "r1"
SRC_URI = "http://download.rsyslog.com/rsyslog/${PN}-${PV}.tar.gz \
file://rsyslog.conf \
@@ -14,19 +14,23 @@ do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -d ${D}/${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/rsyslog
+ install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
}
-pkg_postinst() {
- update-rc.d -f syslog remove
+pkg_preinst_${PN} () {
+ # this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ touch ${sysconfdir}/init.d/syslog
}
-pkg_postrm() {
- update-rc.d syslog add 5
+pkg_postinst_${PN} () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove syslog-init syslog.${PN}
}
CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
-INITSCRIPT_NAME = "rsyslog"
-#INITSCRIPT_PARAMS = "defaults 05"
-INITSCRIPT_PARAMS = "remove"
+INITSCRIPT_NAME = "syslog"
diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
index 65da86d..8720e09 100644
--- a/recipes/sysklogd/sysklogd.inc
+++ b/recipes/sysklogd/sysklogd.inc
@@ -1,16 +1,17 @@
LICENSE = "GPL"
SECTION = "base"
DESCRIPTION = "The sysklogd package implements two system log daemons."
+INC_PR = "r3"
SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
file://nonrootinstall.patch;patch=1 \
file://sysklogd"
inherit update-rc.d
-INITSCRIPT_NAME = "sysklogd"
-INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
+
+INITSCRIPT_NAME = "syslog"
+
CFLAGS_append = " -DSYSV"
-RCONFLICTS = "busybox-syslog"
do_install () {
install -d ${D}${mandir}/man8 \
@@ -23,14 +24,24 @@ do_install () {
install -d ${D}${sysconfdir}
install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
install -d ${D}${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/sysklogd
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
+}
+
+pkg_preinst_${PN} () {
+ # this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ touch ${sysconfdir}/init.d/syslog
}
+
pkg_postinst_${PN} () {
update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100
update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100
}
+
pkg_prerm_${PN} () {
update-alternatives --remove syslogd syslogd.${PN}
update-alternatives --remove klogd klogd.${PN}
+ update-alternatives --remove syslog-init syslog.${PN}
}
diff --git a/recipes/sysklogd/sysklogd_1.4.1.bb b/recipes/sysklogd/sysklogd_1.4.1.bb
index 3d938f5..e02dd3e 100644
--- a/recipes/sysklogd/sysklogd_1.4.1.bb
+++ b/recipes/sysklogd/sysklogd_1.4.1.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r1"
+PR = "${INC_PR}.1"
SRC_URI[md5sum] = "d214aa40beabf7bdb0c9b3c64432c774"
diff --git a/recipes/sysklogd/sysklogd_1.5.bb b/recipes/sysklogd/sysklogd_1.5.bb
index 70e55c3..a015768 100644
--- a/recipes/sysklogd/sysklogd_1.5.bb
+++ b/recipes/sysklogd/sysklogd_1.5.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r2"
+PR = "${INC_PR}.2"
SRC_URI += "file://no-strip-install.patch;patch=1"
--
1.6.4.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 15:04 ` Steffen Sledz
@ 2010-05-10 8:30 ` Martin Jansa
0 siblings, 0 replies; 21+ messages in thread
From: Martin Jansa @ 2010-05-10 8:30 UTC (permalink / raw)
To: openembedded-devel
On Fri, May 07, 2010 at 05:04:27PM +0200, Steffen Sledz wrote:
> > Configuring busybox-syslog.
> > update-rc.d: /etc/init.d/syslog: file does not exist
> > update-alternatives: Linking //etc/init.d/syslog to syslog.busybox
>
> Are you sure that you run the patched version? It looks like
> running a version without touch in pkg_preinst.
Yes I'm sure.
Both reported problems are the same with PATCHv2.
Not sure why now I see also Permission denied (but maybe it was the same with PATCHv1).
SHR root@gojama ~ $ opkg remove busybox-syslog
Removing package busybox-syslog from root...
update-alternatives: removing //etc/init.d/syslog as no more alternatives exist for it
//usr/lib/opkg/info/busybox-syslog.prerm: line 6: /etc/init.d/syslog: Permission denied
Collected errors:
* pkg_run_script: prerm script returned status 126.
SHR root@gojama ~ $ opkg install busybox-syslog
Installing busybox-syslog (1.15.3-r28.1.4) to root...
Downloading http://jama.homelinux.org/org.openembedded.shr/armv4t/busybox-syslog_1.15.3-r28.1.4_armv4t.ipk.
Configuring busybox-syslog.
System startup links for /etc/init.d/syslog already exist.
/usr/sbin/update-rc.d: line 237: /etc/rc5.d/S20syslog: Permission denied
update-alternatives: Error: not linking //etc/init.d/syslog to syslog.busybox since //etc/init.d/syslog exists and is not a link
Collected errors:
* pkg_run_script: postinst script returned status 1.
* opkg_configure: busybox-syslog.postinst returned 1.
>
> > ...
> >> -INITSCRIPT_NAME = "sysklogd"
> >> -INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
> >
> > params not needed anymore?
>
> Fall back to the defaults like in all the other syslog recipes.
OK.
--
uin:136542059 jid:Martin.Jansa@gmail.com
Jansa Martin sip:jamasip@voip.wengo.fr
JaMa
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v3] busybox/syslogs: use update-alternatives for syslog selection
2010-05-07 14:52 ` All the syslogs Martin Jansa
@ 2010-05-12 12:10 ` Steffen Sledz
2010-05-12 12:21 ` Martin Jansa
0 siblings, 1 reply; 21+ messages in thread
From: Steffen Sledz @ 2010-05-12 12:10 UTC (permalink / raw)
To: openembedded-devel
* u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
* syslog-ng needs to be integrated too!
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
recipes/busybox/busybox.inc | 44 +++++++++++++++++++++++++++---
recipes/rsyslog/rsyslog.inc | 48 ++++++++++++++++++++++++++-------
recipes/sysklogd/sysklogd.inc | 52 ++++++++++++++++++++++++++++++++---
recipes/sysklogd/sysklogd_1.4.1.bb | 2 +-
recipes/sysklogd/sysklogd_1.5.bb | 2 +-
5 files changed, 127 insertions(+), 21 deletions(-)
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 17d8d14..7c170fb 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
SECTION = "base"
PRIORITY = "required"
-INC_PR = "r27"
+INC_PR = "r28"
SRC_URI = "\
file://busybox-cron \
@@ -46,12 +46,14 @@ RDEPENDS_${PN} += "${PN}-mountall"
RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
-INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important (see below)
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-udhcpd"
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
@@ -104,7 +106,7 @@ do_install () {
ln -sf busybox ${D}${base_bindir}/sh
if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
fi
if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
@@ -154,6 +156,40 @@ pkg_prerm_${PN}-mountall () {
update-alternatives --remove default_mountall mountall.${PN}
}
+pkg_postinst_${PN}-syslog () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
+}
+
+pkg_prerm_${PN}-syslog () {
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+
+ update-alternatives --remove syslog-init syslog.${PN}
+}
+
+pkg_postrm_${PN}-syslog () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
+}
+
pkg_prerm_${PN} () {
# This is so you can make busybox commit suicide - removing busybox with no other packages
# providing its files, this will make update-alternatives work, but the update-rc.d part
diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
index 3e39ba0..783852b 100644
--- a/recipes/rsyslog/rsyslog.inc
+++ b/recipes/rsyslog/rsyslog.inc
@@ -2,31 +2,59 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
DEPENDS = "zlib"
HOMEPAGE = "http://www.rsyslog.com/"
LICENSE = "GPLv3"
-INC_PR = "r0"
+INC_PR = "r1"
SRC_URI = "http://download.rsyslog.com/rsyslog/${PN}-${PV}.tar.gz \
file://rsyslog.conf \
file://initscript"
-inherit autotools update-rc.d
+
+inherit autotools
do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -d ${D}/${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/rsyslog
+ install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
+}
+
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
}
-pkg_postinst() {
- update-rc.d -f syslog remove
+pkg_prerm_${PN} () {
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+
+ update-alternatives --remove syslog-init syslog.${PN}
}
-pkg_postrm() {
- update-rc.d syslog add 5
+pkg_postrm_${PN} () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
}
CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
-INITSCRIPT_NAME = "rsyslog"
-#INITSCRIPT_PARAMS = "defaults 05"
-INITSCRIPT_PARAMS = "remove"
+INITSCRIPT_NAME = "syslog"
diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
index 65da86d..2118c45 100644
--- a/recipes/sysklogd/sysklogd.inc
+++ b/recipes/sysklogd/sysklogd.inc
@@ -1,16 +1,17 @@
LICENSE = "GPL"
SECTION = "base"
DESCRIPTION = "The sysklogd package implements two system log daemons."
+INC_PR = "r3"
SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
file://nonrootinstall.patch;patch=1 \
file://sysklogd"
-inherit update-rc.d
-INITSCRIPT_NAME = "sysklogd"
-INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important (see below)
+INITSCRIPT_NAME = "syslog"
+
CFLAGS_append = " -DSYSV"
-RCONFLICTS = "busybox-syslog"
do_install () {
install -d ${D}${mandir}/man8 \
@@ -23,14 +24,55 @@ do_install () {
install -d ${D}${sysconfdir}
install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
install -d ${D}${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/sysklogd
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
+}
+
+pkg_preinst_${PN} () {
+ # all this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ if [ -e ${sysconfdir}/init.d/syslog -a ! -L ${sysconfdir}/init.d/syslog ]; then
+ echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old"
+ mv ${sysconfdir}/init.d/syslog ${sysconfdir}/init.d/syslog.old
+ fi
+ if [ ! -e ${sysconfdir}/init.d/syslog ]; then
+ ln -s dummy ${sysconfdir}/init.d/syslog
+ fi
}
+
pkg_postinst_${PN} () {
update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100
update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
}
+
pkg_prerm_${PN} () {
update-alternatives --remove syslogd syslogd.${PN}
update-alternatives --remove klogd klogd.${PN}
+
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+ update-alternatives --remove syslog-init syslog.${PN}
}
+pkg_postrm_${PN} () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
+}
diff --git a/recipes/sysklogd/sysklogd_1.4.1.bb b/recipes/sysklogd/sysklogd_1.4.1.bb
index 3d938f5..e02dd3e 100644
--- a/recipes/sysklogd/sysklogd_1.4.1.bb
+++ b/recipes/sysklogd/sysklogd_1.4.1.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r1"
+PR = "${INC_PR}.1"
SRC_URI[md5sum] = "d214aa40beabf7bdb0c9b3c64432c774"
diff --git a/recipes/sysklogd/sysklogd_1.5.bb b/recipes/sysklogd/sysklogd_1.5.bb
index 70e55c3..a015768 100644
--- a/recipes/sysklogd/sysklogd_1.5.bb
+++ b/recipes/sysklogd/sysklogd_1.5.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r2"
+PR = "${INC_PR}.2"
SRC_URI += "file://no-strip-install.patch;patch=1"
--
1.6.4.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH v3] busybox/syslogs: use update-alternatives for syslog selection
2010-05-12 12:10 ` [PATCH v3] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
@ 2010-05-12 12:21 ` Martin Jansa
2010-05-12 12:50 ` [PATCH v4] " Steffen Sledz
0 siblings, 1 reply; 21+ messages in thread
From: Martin Jansa @ 2010-05-12 12:21 UTC (permalink / raw)
To: openembedded-devel
On Wed, May 12, 2010 at 02:10:36PM +0200, Steffen Sledz wrote:
> * u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
> * syslog-ng needs to be integrated too!
Thanks, looks better now.
> -inherit autotools update-rc.d
> +
> +inherit autotools
then you probably needs to add:
DEPENDS_append = " update-rc.d update-rc.d-native"
RDEPENDS_${PN}_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
> diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
> -inherit update-rc.d
The same as above.
Regards,
--
uin:136542059 jid:Martin.Jansa@gmail.com
Jansa Martin sip:jamasip@voip.wengo.fr
JaMa
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v4] busybox/syslogs: use update-alternatives for syslog selection
2010-05-12 12:21 ` Martin Jansa
@ 2010-05-12 12:50 ` Steffen Sledz
2010-05-13 18:55 ` Sledz, Steffen
2010-05-17 11:11 ` Martin Jansa
0 siblings, 2 replies; 21+ messages in thread
From: Steffen Sledz @ 2010-05-12 12:50 UTC (permalink / raw)
To: openembedded-devel
* u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
* syslog-ng needs to be integrated too!
Signed-off-by: Steffen Sledz <sledz@dresearch.de>
---
recipes/busybox/busybox.inc | 44 ++++++++++++++++++++++++++--
recipes/rsyslog/rsyslog.inc | 50 ++++++++++++++++++++++++++------
recipes/sysklogd/sysklogd.inc | 55 ++++++++++++++++++++++++++++++++---
recipes/sysklogd/sysklogd_1.4.1.bb | 2 +-
recipes/sysklogd/sysklogd_1.5.bb | 2 +-
5 files changed, 132 insertions(+), 21 deletions(-)
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 17d8d14..7c170fb 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
SECTION = "base"
PRIORITY = "required"
-INC_PR = "r27"
+INC_PR = "r28"
SRC_URI = "\
file://busybox-cron \
@@ -46,12 +46,14 @@ RDEPENDS_${PN} += "${PN}-mountall"
RRECOMMENDS_${PN} += "libgcc ${PN}-syslog"
FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
-FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog ${sysconfdir}/syslog.conf"
+FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog.${PN} ${sysconfdir}/syslog.conf"
FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd"
FILES_${PN} += "${datadir}/udhcpc"
-INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-syslog ${PN}-udhcpd"
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important (see below)
+INITSCRIPT_PACKAGES = "${PN}-httpd ${PN}-udhcpd"
INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
INITSCRIPT_NAME_${PN}-syslog = "syslog"
INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
@@ -104,7 +106,7 @@ do_install () {
ln -sf busybox ${D}${base_bindir}/sh
if grep -q "CONFIG_SYSLOGD=y" ${WORKDIR}/defconfig; then
- install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${PN}
install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
fi
if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
@@ -154,6 +156,40 @@ pkg_prerm_${PN}-mountall () {
update-alternatives --remove default_mountall mountall.${PN}
}
+pkg_postinst_${PN}-syslog () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
+}
+
+pkg_prerm_${PN}-syslog () {
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+
+ update-alternatives --remove syslog-init syslog.${PN}
+}
+
+pkg_postrm_${PN}-syslog () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
+}
+
pkg_prerm_${PN} () {
# This is so you can make busybox commit suicide - removing busybox with no other packages
# providing its files, this will make update-alternatives work, but the update-rc.d part
diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc
index 3e39ba0..d94ab34 100644
--- a/recipes/rsyslog/rsyslog.inc
+++ b/recipes/rsyslog/rsyslog.inc
@@ -2,31 +2,61 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd"
DEPENDS = "zlib"
HOMEPAGE = "http://www.rsyslog.com/"
LICENSE = "GPLv3"
-INC_PR = "r0"
+INC_PR = "r1"
SRC_URI = "http://download.rsyslog.com/rsyslog/${PN}-${PV}.tar.gz \
file://rsyslog.conf \
file://initscript"
-inherit autotools update-rc.d
+
+inherit autotools
do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
install -d ${D}/${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/rsyslog
+ install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN}
+}
+
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important
+DEPENDS_append = " update-rc.d update-rc.d-native"
+RDEPENDS_${PN}_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 300
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
}
-pkg_postinst() {
- update-rc.d -f syslog remove
+pkg_prerm_${PN} () {
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+
+ update-alternatives --remove syslog-init syslog.${PN}
}
-pkg_postrm() {
- update-rc.d syslog add 5
+pkg_postrm_${PN} () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
}
CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
-INITSCRIPT_NAME = "rsyslog"
-#INITSCRIPT_PARAMS = "defaults 05"
-INITSCRIPT_PARAMS = "remove"
+INITSCRIPT_NAME = "syslog"
diff --git a/recipes/sysklogd/sysklogd.inc b/recipes/sysklogd/sysklogd.inc
index 65da86d..4017736 100644
--- a/recipes/sysklogd/sysklogd.inc
+++ b/recipes/sysklogd/sysklogd.inc
@@ -1,16 +1,20 @@
LICENSE = "GPL"
SECTION = "base"
DESCRIPTION = "The sysklogd package implements two system log daemons."
+INC_PR = "r3"
SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/sysklogd-${PV}.tar.gz \
file://nonrootinstall.patch;patch=1 \
file://sysklogd"
-inherit update-rc.d
-INITSCRIPT_NAME = "sysklogd"
-INITSCRIPT_PARAMS = "start 39 S 1 2 3 . stop 99 0 6 ."
+# syslog initscript is handled explicitly because order of
+# update-rc.d and update-alternatives is important (see below)
+DEPENDS_append = " update-rc.d update-rc.d-native"
+RDEPENDS_${PN}_append = " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
+
+INITSCRIPT_NAME = "syslog"
+
CFLAGS_append = " -DSYSV"
-RCONFLICTS = "busybox-syslog"
do_install () {
install -d ${D}${mandir}/man8 \
@@ -23,14 +27,55 @@ do_install () {
install -d ${D}${sysconfdir}
install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
install -d ${D}${sysconfdir}/init.d
- install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/sysklogd
+ install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog.${PN}
}
+
+pkg_preinst_${PN} () {
+ # all this is needed to avoid sysmlink errors,
+ # because update-rc.d runs before pkg_postinst :(
+ if [ -e ${sysconfdir}/init.d/syslog -a ! -L ${sysconfdir}/init.d/syslog ]; then
+ echo "WARNING:" "non symlink ${sysconfdir}/init.d/syslog exist -> backup to ${sysconfdir}/init.d/syslog.old"
+ mv ${sysconfdir}/init.d/syslog ${sysconfdir}/init.d/syslog.old
+ fi
+ if [ ! -e ${sysconfdir}/init.d/syslog ]; then
+ ln -s dummy ${sysconfdir}/init.d/syslog
+ fi
+}
+
pkg_postinst_${PN} () {
update-alternatives --install ${base_sbindir}/syslogd syslogd syslogd.${PN} 100
update-alternatives --install ${base_sbindir}/klogd klogd klogd.${PN} 100
+ update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 100
+
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT syslog defaults
}
+
pkg_prerm_${PN} () {
update-alternatives --remove syslogd syslogd.${PN}
update-alternatives --remove klogd klogd.${PN}
+
+ if test "x$D" = "x"; then
+ if test "$1" = "upgrade" -o "$1" = "remove"; then
+ /etc/init.d/syslog stop
+ fi
+ fi
+ update-alternatives --remove syslog-init syslog.${PN}
}
+pkg_postrm_${PN} () {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT=""
+ fi
+ if test "$1" = "remove" -o "$1" = "purge"; then
+ if ! test -e "/etc/init.d/syslog"; then
+ update-rc.d $OPT syslog remove
+ fi
+ fi
+}
diff --git a/recipes/sysklogd/sysklogd_1.4.1.bb b/recipes/sysklogd/sysklogd_1.4.1.bb
index 3d938f5..e02dd3e 100644
--- a/recipes/sysklogd/sysklogd_1.4.1.bb
+++ b/recipes/sysklogd/sysklogd_1.4.1.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r1"
+PR = "${INC_PR}.1"
SRC_URI[md5sum] = "d214aa40beabf7bdb0c9b3c64432c774"
diff --git a/recipes/sysklogd/sysklogd_1.5.bb b/recipes/sysklogd/sysklogd_1.5.bb
index 70e55c3..a015768 100644
--- a/recipes/sysklogd/sysklogd_1.5.bb
+++ b/recipes/sysklogd/sysklogd_1.5.bb
@@ -1,5 +1,5 @@
require sysklogd.inc
-PR = "r2"
+PR = "${INC_PR}.2"
SRC_URI += "file://no-strip-install.patch;patch=1"
--
1.6.4.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH v4] busybox/syslogs: use update-alternatives for syslog selection
2010-05-12 12:50 ` [PATCH v4] " Steffen Sledz
@ 2010-05-13 18:55 ` Sledz, Steffen
2010-05-17 11:11 ` Martin Jansa
1 sibling, 0 replies; 21+ messages in thread
From: Sledz, Steffen @ 2010-05-13 18:55 UTC (permalink / raw)
To: Steffen Sledz, openembedded-devel
Some ACKs for this patch?
Regards,
Steffen
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v4] busybox/syslogs: use update-alternatives for syslog selection
2010-05-12 12:50 ` [PATCH v4] " Steffen Sledz
2010-05-13 18:55 ` Sledz, Steffen
@ 2010-05-17 11:11 ` Martin Jansa
1 sibling, 0 replies; 21+ messages in thread
From: Martin Jansa @ 2010-05-17 11:11 UTC (permalink / raw)
To: openembedded-devel
On Wed, May 12, 2010 at 02:50:04PM +0200, Steffen Sledz wrote:
> * u-a for init scripts of busybox-syslog, sysklogd, and rsyslog
> * syslog-ng needs to be integrated too!
>
> Signed-off-by: Steffen Sledz <sledz@dresearch.de>
This version seems OK to me, tested with busybox-syslog. (Needs INC_PR
increase in busybox.inc to rebase on HEAD).
Acked-by: Martin Jansa <Martin.Jansa@gmail.com>
--
uin:136542059 jid:Martin.Jansa@gmail.com
Jansa Martin sip:jamasip@voip.wengo.fr
JaMa
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2010-05-17 11:15 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 6:04 All the syslogs Steffen Sledz
2010-05-06 6:13 ` Koen Kooi
2010-05-07 7:46 ` Steffen Sledz
2010-05-07 10:59 ` Steffen Sledz
2010-05-07 11:09 ` Martin Jansa
2010-05-07 13:02 ` Steffen Sledz
2010-05-07 13:08 ` Martin Jansa
2010-05-07 14:04 ` Steffen Sledz
2010-05-07 14:20 ` [PATCH] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
2010-05-07 14:49 ` Martin Jansa
2010-05-07 15:04 ` Steffen Sledz
2010-05-10 8:30 ` Martin Jansa
2010-05-07 14:58 ` Martin Jansa
2010-05-07 15:08 ` Steffen Sledz
2010-05-07 15:34 ` [PATCH v2] " Steffen Sledz
2010-05-07 14:52 ` All the syslogs Martin Jansa
2010-05-12 12:10 ` [PATCH v3] busybox/syslogs: use update-alternatives for syslog selection Steffen Sledz
2010-05-12 12:21 ` Martin Jansa
2010-05-12 12:50 ` [PATCH v4] " Steffen Sledz
2010-05-13 18:55 ` Sledz, Steffen
2010-05-17 11:11 ` Martin Jansa
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.