Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-06-02 Thread Filipe Brandenburger
On Tue, Jun 2, 2015 at 7:24 AM, Daniel Mack  wrote:
>> I could create a PR in systemd-devs GitHub if you'd like, otherwise
>> feel free to just push it straight upstream if you prefer.
>
> Nope, let's try to get used to the new workflow. Just create the PR :)

Good call... we were actually missing two patches, the second one was
yours replacing the /usr/lib cases with &rootprefix...

GitHub PR is here:
https://github.com/systemd/systemd/pull/39

Michael Biebl, I wanted to cc you on the GitHub PR but didn't find you
there, feel free to cc yourself by following that URL. In particular,
take a look at your commit which I adapted to include the .m4 file
from autoconf-archive.

Cheers,
Filipe
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-06-02 Thread Daniel Mack
On 06/02/2015 03:50 PM, Filipe Brandenburger wrote:
> Hi Daniel,
> 
> On Tue, Jun 2, 2015 at 3:04 AM, Daniel Mack  wrote:
>> On 06/02/2015 11:25 AM, Martin Pitt wrote:
>>> FTR, this works fine here, using --with-rootprefix= (to avoid the
>>> extra slashes). This spawned a long thread and multiple followup
>>> patches, and TBH I lost track which patches got proposed and which are
>>> superseded; but this one looks good to me. Thank you!
>>
>> Michael came up with a nicer approach to sanitize all path arguments to
>> configure and strip trailing slashes before the Makefile variables are
>> substituted. I think we should go for that. I'll collect patches and
>> prepare a pull request later.
> 
> This is the one patch which does path AX_NORMALIZE_PATH that we're
> still missing:
> https://github.com/systemd/systemd/commit/d10b3a45b17403ce8a52680703b03888ebee0769
> 
> I resent Michael's original patch but including the import of the
> latest ax_normalize_path.m4 from autoconf-archive.
> 
> I also tested it with a few combinations including --with-rootpath=/
> and it worked fine.
> 
> I could create a PR in systemd-devs GitHub if you'd like, otherwise
> feel free to just push it straight upstream if you prefer.

Nope, let's try to get used to the new workflow. Just create the PR :)


Thanks,
Daniel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-06-02 Thread Filipe Brandenburger
Hi Daniel,

On Tue, Jun 2, 2015 at 3:04 AM, Daniel Mack  wrote:
> On 06/02/2015 11:25 AM, Martin Pitt wrote:
>> FTR, this works fine here, using --with-rootprefix= (to avoid the
>> extra slashes). This spawned a long thread and multiple followup
>> patches, and TBH I lost track which patches got proposed and which are
>> superseded; but this one looks good to me. Thank you!
>
> Michael came up with a nicer approach to sanitize all path arguments to
> configure and strip trailing slashes before the Makefile variables are
> substituted. I think we should go for that. I'll collect patches and
> prepare a pull request later.

This is the one patch which does path AX_NORMALIZE_PATH that we're
still missing:
https://github.com/systemd/systemd/commit/d10b3a45b17403ce8a52680703b03888ebee0769

I resent Michael's original patch but including the import of the
latest ax_normalize_path.m4 from autoconf-archive.

I also tested it with a few combinations including --with-rootpath=/
and it worked fine.

I could create a PR in systemd-devs GitHub if you'd like, otherwise
feel free to just push it straight upstream if you prefer.

Cheers,
Filipe
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-06-02 Thread Daniel Mack
On 06/02/2015 11:25 AM, Martin Pitt wrote:
> Daniel Mack [2015-05-29 11:05 +0200]:
>> Could you try the attached patch?
>>
>> I had to introduce a new entity in custom-entites.ent, because with
>> "--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
>> the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".
>>
>> That is solved with a subsitiution in Makefile.am now, which cleans up
>> all double slashes in custom-entites.ent.
> 
> FTR, this works fine here, using --with-rootprefix= (to avoid the
> extra slashes). This spawned a long thread and multiple followup
> patches, and TBH I lost track which patches got proposed and which are
> superseded; but this one looks good to me. Thank you!

Michael came up with a nicer approach to sanitize all path arguments to
configure and strip trailing slashes before the Makefile variables are
substituted. I think we should go for that. I'll collect patches and
prepare a pull request later.


Thanks,
Daniel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-06-02 Thread Martin Pitt
Hello Daniel,

Daniel Mack [2015-05-29 11:05 +0200]:
> Could you try the attached patch?
> 
> I had to introduce a new entity in custom-entites.ent, because with
> "--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
> the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".
> 
> That is solved with a subsitiution in Makefile.am now, which cleans up
> all double slashes in custom-entites.ent.

FTR, this works fine here, using --with-rootprefix= (to avoid the
extra slashes). This spawned a long thread and multiple followup
patches, and TBH I lost track which patches got proposed and which are
superseded; but this one looks good to me. Thank you!

Martin
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-29 Thread Daniel Mack
On 05/29/2015 07:37 PM, Filipe Brandenburger wrote:
> I haven't tested it, but I do have a few comments.
> 
> First, why not use "rootlibdir" instead of "rootprefixlibdir"?

Because $(rootlibdir) resolves to /usr/lib64 on my system.

[...]

> On Fri, May 29, 2015 at 2:05 AM, Daniel Mack  wrote:
>> I had to introduce a new entity in custom-entites.ent, because with
>> "--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
>> the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".
> 
> Debian is already using --with-rootprefix= (an empty string) exactly
> for that reason.
> http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules#n16

Interesting, thanks for the pointer.

> If rootprefix=/, there would be also problems with rootbindir=//bin
> and other such definitions getting double slashes.
> 
> Having said that, I do agree that it would be nice to handle
> --with-rootprefix=/ correctly without creating double slashes, but I
> think it would be preferrable to handle that in general and not for
> the specific case of /lib.

Yes, the subst logic I added replaces _all_ leading double slashes, and
hence avoids touching URLs with "http://";.

> Perhaps just remove any trailing slashes from rootprefix in
> configure.ac instead before generating the Makefile? That would also
> handle cases like --with-rootprefix=/usr/ to still generate /usr/bin
> and /usr/lib correctly.

Yes, that's actually better, you're right. I'll post a patch for this.


Thanks,
Daniel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-29 Thread Filipe Brandenburger
Hi Daniel,

I haven't tested it, but I do have a few comments.

First, why not use "rootlibdir" instead of "rootprefixlibdir"? There's
already similar "rootbindir" and "rootlibexecdir" defined there, so I
think we could stick to the same convention.

From a few lines down in Makefile.am:

  # And these are the special ones for /
  rootprefix=@rootprefix@
  rootbindir=$(rootprefix)/bin
  rootlibexecdir=$(rootprefix)/lib/systemd

On Fri, May 29, 2015 at 2:05 AM, Daniel Mack  wrote:
> I had to introduce a new entity in custom-entites.ent, because with
> "--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
> the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".

Debian is already using --with-rootprefix= (an empty string) exactly
for that reason.
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules#n16

If rootprefix=/, there would be also problems with rootbindir=//bin
and other such definitions getting double slashes.

Having said that, I do agree that it would be nice to handle
--with-rootprefix=/ correctly without creating double slashes, but I
think it would be preferrable to handle that in general and not for
the specific case of /lib.

Perhaps just remove any trailing slashes from rootprefix in
configure.ac instead before generating the Makefile? That would also
handle cases like --with-rootprefix=/usr/ to still generate /usr/bin
and /usr/lib correctly.

In any case, handling trailing slashes/double slashes could come on a
separate patch. As pointed out, the problem with it already exists and
Debian is working around it by setting rootprefix to an empty string,
so it's not really strictly required for the rootlibdir patch itself.

I'd be glad to test a new patchset that addresses these suggestions.

Cheers,
Filipe
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-29 Thread Lennart Poettering
On Fri, 29.05.15 11:05, Daniel Mack (dan...@zonque.org) wrote:

> On 05/29/2015 05:18 AM, Michael Biebl wrote:
> > 2015-05-28 19:47 GMT+02:00 Filipe Brandenburger :
> >> We're actually still missing a small part of it (A sentence like
> >> "Files in /etc have the highest priority, files in /run take
> >> precedence over files with the same name in */usr/lib*." in files like
> >> hwdb.xml, the last /usr/lib won't get fixed) but it requires new
> >> variables. I'm leaning towards introducing a rootsysconfdir=/etc and
> >> rootlibdir=$(rootprefix)/lib (we already have a rootbindir) so I'll
> >> follow up with a patch doing that.
> >>
> >> Though having the first patchset in certainly helps.
> > 
> > Indeed. I just ran my small shell script which I used to generate the
> > original diff over current git head.
> > The only occurences which it still replaces can be found at [1].
> > It's like you said, the override bits which are still missing.
> > Otherwise it looks fine.
> 
> Could you try the attached patch?
> 
> I had to introduce a new entity in custom-entites.ent, because with
> "--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
> the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".
> 
> That is solved with a subsitiution in Makefile.am now, which cleans up
> all double slashes in custom-entites.ent.

Patch looks fine to me. Didn't test it though, Michael, Filipe or
Martin should probably try that...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-29 Thread Lennart Poettering
On Thu, 28.05.15 10:47, Filipe Brandenburger (filbran...@google.com) wrote:

> On Thu, May 28, 2015 at 10:44 AM, Michael Biebl  wrote:
> > 2015-05-28 19:41 GMT+02:00 Martin Pitt :
> >> \o/ Many thanks Filipe, that's great! Biggest patch gone :)
> >
> > A huge thanks from me as well to everyone involved!
> 
> Lennart: Thanks for applying it.
> 
> Martin and Michael: You're welcome, glad to help!
> 
> We're actually still missing a small part of it (A sentence like
> "Files in /etc have the highest priority, files in /run take
> precedence over files with the same name in */usr/lib*." in files like
> hwdb.xml, the last /usr/lib won't get fixed) but it requires new
> variables. I'm leaning towards introducing a rootsysconfdir=/etc and
> rootlibdir=$(rootprefix)/lib (we already have a rootbindir) so I'll
> follow up with a patch doing that.

In these cases we actually end up looking in both /usr/lib and /lib
usually (with exceptions). Hence be careful if you want to correct
this in the man pages.

I'd prefer not to document both paths if both are supported
simultaneously, distros and users should be pushed to only consider
one of the two even if we read from both.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-29 Thread Daniel Mack
On 05/29/2015 05:18 AM, Michael Biebl wrote:
> 2015-05-28 19:47 GMT+02:00 Filipe Brandenburger :
>> We're actually still missing a small part of it (A sentence like
>> "Files in /etc have the highest priority, files in /run take
>> precedence over files with the same name in */usr/lib*." in files like
>> hwdb.xml, the last /usr/lib won't get fixed) but it requires new
>> variables. I'm leaning towards introducing a rootsysconfdir=/etc and
>> rootlibdir=$(rootprefix)/lib (we already have a rootbindir) so I'll
>> follow up with a patch doing that.
>>
>> Though having the first patchset in certainly helps.
> 
> Indeed. I just ran my small shell script which I used to generate the
> original diff over current git head.
> The only occurences which it still replaces can be found at [1].
> It's like you said, the override bits which are still missing.
> Otherwise it looks fine.

Could you try the attached patch?

I had to introduce a new entity in custom-entites.ent, because with
"--with-rootprefix=/", "&rootprefix;/lib" resolves to "//lib", and with
the default behaviour of configure, "&rootprefix;lib" becomes "/usrlib".

That is solved with a subsitiution in Makefile.am now, which cleans up
all double slashes in custom-entites.ent.


Thanks,
Daniel

From f60d5707246d3a1ce8bcb11f3874ef696425a446 Mon Sep 17 00:00:00 2001
From: Daniel Mack 
Date: Fri, 29 May 2015 10:53:35 +0200
Subject: [PATCH] Makefile, man: replace hard-coded /usr/lib

Replace some /usr/lib occurences in man/ with a new &rootprefixlibdir;
entity, and define it in Makefile.am.

Also make sure to avoid leading double slashes in path names in
custom-entities.ent, which otherwise occur with

  ./configure --enable-split-usr --with-rootprefix=/
---
 Makefile.am | 4 +++-
 man/hwdb.xml| 4 ++--
 man/systemd.link.xml| 4 ++--
 man/systemd.netdev.xml  | 4 ++--
 man/systemd.network.xml | 4 ++--
 man/udev.xml| 4 ++--
 6 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e4a8616..cf3742c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,6 +105,7 @@ systemsleepdir=$(rootlibexecdir)/system-sleep
 systemunitdir=$(rootprefix)/lib/systemd/system
 systempresetdir=$(rootprefix)/lib/systemd/system-preset
 udevlibexecdir=$(rootprefix)/lib/udev
+rootprefixlibdir=$(rootprefix)/lib
 udevhomedir=$(udevlibexecdir)
 udevrulesdir=$(udevlibexecdir)/rules.d
 udevhwdbdir=$(udevlibexecdir)/hwdb.d
@@ -6500,6 +6501,7 @@ substitutions = \
'|includedir=$(includedir)|' \
'|VERSION=$(VERSION)|' \
'|rootprefix=$(rootprefix)|' \
+   '|rootprefixlibdir=$(rootprefixlibdir)|' \
'|udevlibexecdir=$(udevlibexecdir)|' \
'|SUSHELL=$(SUSHELL)|' \
'|SULOGIN=$(SULOGIN)|' \
@@ -6605,7 +6607,7 @@ if ENABLE_MANPAGES
 man/custom-entities.ent: configure.ac
 	$(AM_V_GEN)$(MKDIR_P) $(dir $@)
 	$(AM_V_GEN)(echo '' && \
-	 printf '$(subst '|,\n,$(substitutions') \
+	 printf '$(subst '|,\n,$(subst =//,=/,$(substitutions)') \
 	 > $@ # '
 
 DISTCLEANFILES += \
diff --git a/man/hwdb.xml b/man/hwdb.xml
index b3602ac..60763e2 100644
--- a/man/hwdb.xml
+++ b/man/hwdb.xml
@@ -50,10 +50,10 @@
   regardless of the directories in which they live. However, files with
   identical filenames replace each other. Files in /etc
   have the highest priority, files in /run take precedence
-  over files with the same name in /usr/lib. This can be
+  over files with the same name in &rootprefixlibdir;. This can be
   used to override a system-supplied hwdb file with a local file if needed;
   a symlink in /etc with the same name as a hwdb file in
-  /usr/lib, pointing to /dev/null,
+  &rootprefixlibdir;, pointing to /dev/null,
   disables the hwdb file entirely. hwdb files must have the extension
   .hwdb; other extensions are ignored.
 
diff --git a/man/systemd.link.xml b/man/systemd.link.xml
index 75cf6e1..001df38 100644
--- a/man/systemd.link.xml
+++ b/man/systemd.link.xml
@@ -70,10 +70,10 @@
 However, files with identical filenames replace each other. Files
 in /etc have the highest priority, files in
 /run take precedence over files with the same
-name in /usr/lib. This can be used to
+name in &rootprefixlibdir;. This can be used to
 override a system-supplied link file with a local file if needed;
 a symlink in /etc with the same name as a
-link file in /usr/lib, pointing to
+link file in &rootprefixlibdir;, pointing to
 /dev/null, disables the link file
 entirely.
 
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index 6cd77ab..618693f 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -81,10 +81,10 @@
 identical filenames replace each other. Files in
 /etc have the highest priority, files in
 /run take precedence over files with the same
-name in /usr/lib. This can be used to
+name in &rootprefixlibdir;. This can be used to
 override a 

Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-28 Thread Michael Biebl
2015-05-28 19:47 GMT+02:00 Filipe Brandenburger :
> We're actually still missing a small part of it (A sentence like
> "Files in /etc have the highest priority, files in /run take
> precedence over files with the same name in */usr/lib*." in files like
> hwdb.xml, the last /usr/lib won't get fixed) but it requires new
> variables. I'm leaning towards introducing a rootsysconfdir=/etc and
> rootlibdir=$(rootprefix)/lib (we already have a rootbindir) so I'll
> follow up with a patch doing that.
>
> Though having the first patchset in certainly helps.

Indeed. I just ran my small shell script which I used to generate the
original diff over current git head.
The only occurences which it still replaces can be found at [1].
It's like you said, the override bits which are still missing.
Otherwise it looks fine.

Michael


[1] http://paste.debian.net/186665/
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-28 Thread Filipe Brandenburger
On Thu, May 28, 2015 at 10:44 AM, Michael Biebl  wrote:
> 2015-05-28 19:41 GMT+02:00 Martin Pitt :
>> \o/ Many thanks Filipe, that's great! Biggest patch gone :)
>
> A huge thanks from me as well to everyone involved!

Lennart: Thanks for applying it.

Martin and Michael: You're welcome, glad to help!

We're actually still missing a small part of it (A sentence like
"Files in /etc have the highest priority, files in /run take
precedence over files with the same name in */usr/lib*." in files like
hwdb.xml, the last /usr/lib won't get fixed) but it requires new
variables. I'm leaning towards introducing a rootsysconfdir=/etc and
rootlibdir=$(rootprefix)/lib (we already have a rootbindir) so I'll
follow up with a patch doing that.

Though having the first patchset in certainly helps.

Cheers!
Filipe
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-28 Thread Michael Biebl
2015-05-28 19:41 GMT+02:00 Martin Pitt :
>> > I hope that's helpful!
>>
>> Applied both!
>
> \o/ Many thanks Filipe, that's great! Biggest patch gone :)

A huge thanks from me as well to everyone involved!


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-28 Thread Martin Pitt
Hey Filipe,

Lennart Poettering [2015-05-28 19:35 +0200]:
> On Wed, 27.05.15 02:38, Filipe Brandenburger (filbran...@google.com) wrote:
> 
> > As suggested by Martin Pitt, for better support of distros with non-merged 
> > /usr.
> > 
> > This doesn't get us 100% there but I'd say it gets us much closer.
> > 
> > I think we still need a new variable for /etc/udev (similar to 
> > &pkgsysconfdir;
> > which is /etc/systemd) though that is not really critical for non-merged 
> > /usr.
> > 
> > There are also some general explanations (in files man/hwdb.xml, 
> > man/udev.xml
> > and man/systemd.{link,netdev,network}.xml) which talk of how files in /etc
> > override those in /usr/lib but we don't really have a great variable for
> > /usr/lib or /lib vs. /etc, so I'd like to think a little further on how to
> > solve that particular one...
> > 
> > I hope that's helpful!
> 
> Applied both!

\o/ Many thanks Filipe, that's great! Biggest patch gone :)

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-28 Thread Lennart Poettering
On Wed, 27.05.15 02:38, Filipe Brandenburger (filbran...@google.com) wrote:

> As suggested by Martin Pitt, for better support of distros with non-merged 
> /usr.
> 
> This doesn't get us 100% there but I'd say it gets us much closer.
> 
> I think we still need a new variable for /etc/udev (similar to &pkgsysconfdir;
> which is /etc/systemd) though that is not really critical for non-merged /usr.
> 
> There are also some general explanations (in files man/hwdb.xml, man/udev.xml
> and man/systemd.{link,netdev,network}.xml) which talk of how files in /etc
> override those in /usr/lib but we don't really have a great variable for
> /usr/lib or /lib vs. /etc, so I'd like to think a little further on how to
> solve that particular one...
> 
> I hope that's helpful!

Applied both!

Thanks!

> 
> Cheers,
> Filipe
> 
> 
> Filipe Brandenburger (2):
>   man: generate configured paths in manpages
>   man: use configured path for mount and umount binaries in manpages
> 
>  Makefile.am  |  2 ++
>  man/binfmt.d.xml |  5 -
>  man/bootchart.conf.xml   | 17 +---
>  man/bootctl.xml  |  5 -
>  man/bootup.xml   |  5 -
>  man/busctl.xml   |  5 -
>  man/coredump.conf.xml| 11 ++
>  man/coredumpctl.xml  |  5 -
>  man/crypttab.xml |  5 -
>  man/daemon.xml   |  5 -
>  man/file-hierarchy.xml   |  5 -
>  man/halt.xml |  5 -
>  man/hostname.xml |  5 -
>  man/hostnamectl.xml  |  5 -
>  man/hwdb.xml |  9 ++---
>  man/journal-remote.conf.xml  | 11 ++
>  man/journalctl.xml   |  5 -
>  man/journald.conf.xml| 11 ++
>  man/kernel-command-line.xml  |  5 -
>  man/kernel-install.xml   |  5 -
>  man/less-variables.xml   |  5 -
>  man/libsystemd-pkgconfig.xml |  5 -
>  man/locale.conf.xml  |  5 -
>  man/localectl.xml|  5 -
>  man/localtime.xml|  5 -
>  man/loginctl.xml |  5 -
>  man/logind.conf.xml  | 11 ++
>  man/machine-id.xml   |  5 -
>  man/machine-info.xml |  5 -
>  man/machinectl.xml   |  9 ++---
>  man/modules-load.d.xml   |  5 -
>  man/networkctl.xml   |  5 -
>  man/nss-myhostname.xml   |  5 -
>  man/nss-mymachines.xml   |  5 -
>  man/os-release.xml   |  5 -
>  man/pam_systemd.xml  |  5 -
>  man/resolved.conf.xml| 11 ++
>  man/runlevel.xml |  5 -
>  man/sd-daemon.xml|  5 -
>  man/sd-id128.xml |  5 -
>  man/sd-journal.xml   |  5 -
>  man/sd-login.xml |  5 -
>  man/sd_booted.xml|  5 -
>  man/sd_bus_creds_get_pid.xml |  5 -
>  man/sd_bus_creds_new_from_pid.xml|  5 -
>  man/sd_bus_default.xml   |  5 -
>  man/sd_bus_error.xml |  5 -
>  man/sd_bus_message_append.xml|  5 -
>  man/sd_bus_message_append_array.xml  |  5 -
>  man/sd_bus_message_append_basic.xml  |  5 -
>  man/sd_bus_message_append_string_memfd.xml   |  5 -
>  man/sd_bus_message_append_strv.xml   |  5 -
>  man/sd_bus_message_get_cookie.xml|  5 -
>  man/sd_bus_message_get_monotonic_usec.xml|  5 -
>  man/sd_bus_negotiate_fds.xml |  5 -
>  man/sd_bus_new.xml   |  5 -
>  man/sd_bus_path_encode.xml   |  5 -
>  man/sd_bus_request_name.xml  |  5 -
>  man/sd_event_add_child.xml   |  5 -
>  man/sd_event_add_defer.xml   |  5 -
>  man/sd_event_add_signal.xml  |  5 -
>  man/sd_event_add_time.xml|  5 -
>  man/sd_event_get_fd.xml  |  5 -
>  man/sd_event_new.xml |  5 -
>  man/sd_event_run.xml |  5 -
>  man/sd_event_set_name.xml|  5 -
>  man/sd_event_wait.xml|  5 -
>  man/sd_get_seats.xml 

Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-27 Thread Filipe Brandenburger
Hi,

On Wed, May 27, 2015 at 6:04 AM, Lennart Poettering
 wrote:
> Hmm, any chance we can somehow define those entities without having to
> add
>
>  
>  %entities;
>  ]>
>
> To each file? Can't we tell xsltproc about this via some command line
> switch or so?

I don't think that's possible, in part I believe because XML wants the
documents to be completely described by their doctype and having
external "magic" includes would break that promise.

In particular, two man pages were using this exact same snippet before
my patch: systemd.generator.xml and systemd.unit.xml (though the
latter didn't seem to use any of the named entities at that point...)

Cheers,
Filipe
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-27 Thread Daniel Mack
On 05/27/2015 03:04 PM, Lennart Poettering wrote:
> Hmm, any chance we can somehow define those entities without having to
> add 
> 
>  
>  %entities;
>  ]>
> 
> To each file? Can't we tell xsltproc about this via some command line
> switch or so?
> 
> This is in a way similar to how we use gcc's "-include config.h"
> switch rather than really write "#include " in each source
> file...

I've looked for some way to do this, but haven't found a nice solution
yet. The problem is that the full XML tag is:

http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [
   
   %entities;
]>

So that !ENTITY tag needs to live inside the !DOCTYPE tag, which is not
something you can achieve with a command line switch AFAICS.

We could maybe add some hack to the xsl we feed xsltproc with, but
frankly, the above is the common way of including files to define own
entities, so it'd consider that more readable, even though it's a bit
more boilerplate.


Daniel

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-27 Thread Lennart Poettering
On Wed, 27.05.15 02:38, Filipe Brandenburger (filbran...@google.com) wrote:

> As suggested by Martin Pitt, for better support of distros with non-merged 
> /usr.
> 
> This doesn't get us 100% there but I'd say it gets us much closer.

Hmm, any chance we can somehow define those entities without having to
add 

 
 %entities;
 ]>

To each file? Can't we tell xsltproc about this via some command line
switch or so?

This is in a way similar to how we use gcc's "-include config.h"
switch rather than really write "#include " in each source
file...

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 0/2] Using XML entities for paths in manpages

2015-05-27 Thread Filipe Brandenburger
As suggested by Martin Pitt, for better support of distros with non-merged /usr.

This doesn't get us 100% there but I'd say it gets us much closer.

I think we still need a new variable for /etc/udev (similar to &pkgsysconfdir;
which is /etc/systemd) though that is not really critical for non-merged /usr.

There are also some general explanations (in files man/hwdb.xml, man/udev.xml
and man/systemd.{link,netdev,network}.xml) which talk of how files in /etc
override those in /usr/lib but we don't really have a great variable for
/usr/lib or /lib vs. /etc, so I'd like to think a little further on how to
solve that particular one...

I hope that's helpful!

Cheers,
Filipe


Filipe Brandenburger (2):
  man: generate configured paths in manpages
  man: use configured path for mount and umount binaries in manpages

 Makefile.am  |  2 ++
 man/binfmt.d.xml |  5 -
 man/bootchart.conf.xml   | 17 +---
 man/bootctl.xml  |  5 -
 man/bootup.xml   |  5 -
 man/busctl.xml   |  5 -
 man/coredump.conf.xml| 11 ++
 man/coredumpctl.xml  |  5 -
 man/crypttab.xml |  5 -
 man/daemon.xml   |  5 -
 man/file-hierarchy.xml   |  5 -
 man/halt.xml |  5 -
 man/hostname.xml |  5 -
 man/hostnamectl.xml  |  5 -
 man/hwdb.xml |  9 ++---
 man/journal-remote.conf.xml  | 11 ++
 man/journalctl.xml   |  5 -
 man/journald.conf.xml| 11 ++
 man/kernel-command-line.xml  |  5 -
 man/kernel-install.xml   |  5 -
 man/less-variables.xml   |  5 -
 man/libsystemd-pkgconfig.xml |  5 -
 man/locale.conf.xml  |  5 -
 man/localectl.xml|  5 -
 man/localtime.xml|  5 -
 man/loginctl.xml |  5 -
 man/logind.conf.xml  | 11 ++
 man/machine-id.xml   |  5 -
 man/machine-info.xml |  5 -
 man/machinectl.xml   |  9 ++---
 man/modules-load.d.xml   |  5 -
 man/networkctl.xml   |  5 -
 man/nss-myhostname.xml   |  5 -
 man/nss-mymachines.xml   |  5 -
 man/os-release.xml   |  5 -
 man/pam_systemd.xml  |  5 -
 man/resolved.conf.xml| 11 ++
 man/runlevel.xml |  5 -
 man/sd-daemon.xml|  5 -
 man/sd-id128.xml |  5 -
 man/sd-journal.xml   |  5 -
 man/sd-login.xml |  5 -
 man/sd_booted.xml|  5 -
 man/sd_bus_creds_get_pid.xml |  5 -
 man/sd_bus_creds_new_from_pid.xml|  5 -
 man/sd_bus_default.xml   |  5 -
 man/sd_bus_error.xml |  5 -
 man/sd_bus_message_append.xml|  5 -
 man/sd_bus_message_append_array.xml  |  5 -
 man/sd_bus_message_append_basic.xml  |  5 -
 man/sd_bus_message_append_string_memfd.xml   |  5 -
 man/sd_bus_message_append_strv.xml   |  5 -
 man/sd_bus_message_get_cookie.xml|  5 -
 man/sd_bus_message_get_monotonic_usec.xml|  5 -
 man/sd_bus_negotiate_fds.xml |  5 -
 man/sd_bus_new.xml   |  5 -
 man/sd_bus_path_encode.xml   |  5 -
 man/sd_bus_request_name.xml  |  5 -
 man/sd_event_add_child.xml   |  5 -
 man/sd_event_add_defer.xml   |  5 -
 man/sd_event_add_signal.xml  |  5 -
 man/sd_event_add_time.xml|  5 -
 man/sd_event_get_fd.xml  |  5 -
 man/sd_event_new.xml |  5 -
 man/sd_event_run.xml |  5 -
 man/sd_event_set_name.xml|  5 -
 man/sd_event_wait.xml|  5 -
 man/sd_get_seats.xml |  5 -
 man/sd_id128_get_machine.xml |  5 -
 man/sd_id128_randomize.xml   |  5 -
 man/sd_id128_to_string.xml   |  5 -
 man/sd_is_fifo.xml   |  5 -
 man/sd_journal_add_match.xml