Skip to contentSkip to conversation

sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc

PATCH In review [email protected] 3 participants 4 messages Sep 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysklogd.inc: add syslogd.8 to ALTERNATIVE_${PN}-doc

From: Mark Hatle <[email protected]>

Other recipes, such as meta-networking inetutils may also provide a man page for syslogd.8. Use the alternatives mechanism to select the man page to display.

This is a partial revert of commit:
988aad01b20c18a8850db0ad6dc547525d94116c

---
 meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-extended/sysklogd/sysklogd.inc +5 -1
index fc4e67c..c932b20 100644
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
                     file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
                    "
 
-inherit update-rc.d systemd
+inherit update-rc.d update-alternatives systemd
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
@@ -58,6 +58,10 @@ do_install () {
 
 FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
 
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN}-doc = "syslogd.8"
+ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8"
+
 pkg_prerm_${PN} () {
 	if test "x$D" = "x"; then
 	if test "$1" = "upgrade" -o "$1" = "remove"; then
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · On Thu, 2018-09-27 at 13:22 +0800, [email protected] wrote:

From: Mark Hatle <[email protected]>

Other recipes, such as meta-networking inetutils may also provide a man page for syslogd.8. Use the alternatives mechanism to select the man page to display.

Quoted 8 lines

This is a partial revert of commit:
988aad01b20c18a8850db0ad6dc547525d94116c

---
 meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

I'm not sure I like the sound of this. Why would it provide a man page but not the actual tool itself?

At the very least this needs a better explanation but I'm not sure it sounds correct or is something we want to encourage.

Cheers,

Richard

#2 lore raw
Quoted 17 lines · On 9/27/18 4:36 AM, [email protected] wrote:
Quoted 7 lines · On Thu, 2018-09-27 at 13:22 +0800, [email protected] wrote:

From: Mark Hatle <[email protected]>

Other recipes, such as meta-networking inetutils may also provide a man page for syslogd.8. Use the alternatives mechanism to select the man page to display.

Quoted 8 lines

This is a partial revert of commit:
988aad01b20c18a8850db0ad6dc547525d94116c

---
 meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 5 lines

I'm not sure I like the sound of this. Why would it provide a man page but not the actual tool itself?

At the very least this needs a better explanation but I'm not sure it sounds correct or is something we want to encourage.

The syslogd 'tool' is provided by both recipes in their respective 'runtime' packages. In the inet case, it is inetutils-syslogd, which has an appropriate RCONFLICTS with the syslogd version. So only one or the other will be installed. This is the conflict resolution the original commit of "988aad01b20c18a8850db0ad6dc547525d94116c" was referring to.

HOWEVER, both syslogd and inetutils each only have a singular 'doc' package. (As do most packages it seems.) Since this is the case, there and syslogd and inetutils (not syslogd part) is requested for this configuration -- AND --- doc-pkgs are configured in, you get an error of conflicting files.

Thus a partial revert of the prior work enabled documentation to be installed correctly.

Now does the documentation match whichever package was installed, maybe not... but this isn't a big deal as it turns out, since most syslogd share a common set of arguments and those are the things a run-time user would query from the man pages.

The only alternative is to start spliting up the docs into their relevant subpackages, as we have the runtime items. But this then complicates the doc-pkgs processing and related...

--Mark

Quoted 4 lines

Cheers,

Richard

#3 lore raw
Quoted 40 lines · Mark Hatle
Quoted 17 lines · On 9/27/18 4:36 AM, [email protected] wrote:
Quoted 7 lines · On Thu, 2018-09-27 at 13:22 +0800, [email protected] wrote:

From: Mark Hatle <[email protected]>

Other recipes, such as meta-networking inetutils may also provide a man page for syslogd.8. Use the alternatives mechanism to select the man page to display.

Quoted 8 lines

This is a partial revert of commit:
988aad01b20c18a8850db0ad6dc547525d94116c

---
 meta/recipes-extended/sysklogd/sysklogd.inc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Quoted 7 lines

I'm not sure I like the sound of this. Why would it provide a man page
but not the actual tool itself?

At the very least this needs a better explanation but I'm not sure it
sounds correct or is something we want to encourage.

The syslogd 'tool' is provided by both recipes in their respective 'runtime' packages. In the inet case, it is inetutils-syslogd, which has an appropriate RCONFLICTS with the syslogd version. So only one or the other will be installed. This is the conflict resolution the original commit of "988aad01b20c18a8850db0ad6dc547525d94116c" was referring to.

HOWEVER, both syslogd and inetutils each only have a singular 'doc' package. (As do most packages it seems.) Since this is the case, there and syslogd and inetutils (not syslogd part) is requested for this configuration -- AND --- doc-pkgs are configured in, you get an error of conflicting files.

Thus a partial revert of the prior work enabled documentation to be installed correctly.

Quoted 8 lines

Now does the documentation match whichever package was installed, maybe not... but this isn't a big deal as it turns out, since most syslogd share a common set of arguments and those are the things a run-time user would query from the man pages.

The only alternative is to start spliting up the docs into their relevant subpackages, as we have the runtime items. But this then complicates the doc-pkgs processing and related...

This makes much more sense with more information. Could someone rewrite the commit message please?

Cheers,

Richard