[libvirt] [PATCH] build: fix substitution of RUNSTATEDIR in man pages

Daniel P. Berrangé posted 1 patch 4 years, 6 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20191018143301.22677-1-berrange@redhat.com
src/Makefile.am             | 2 +-
src/locking/Makefile.inc.am | 2 +-
src/logging/Makefile.inc.am | 2 +-
src/remote/Makefile.inc.am  | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
[libvirt] [PATCH] build: fix substitution of RUNSTATEDIR in man pages
Posted by Daniel P. Berrangé 4 years, 6 months ago
When RUNSTATEDIR was introduced

  commit d29c917ef470a25149d1f3787ec494d006549f27
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Tue Aug 20 16:05:12 2019 +0100

    src: honour the RUNSTATEDIR variable in all code

The makefile rules for man pages were accidentally not updated for the
new variablle name.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/Makefile.am             | 2 +-
 src/locking/Makefile.inc.am | 2 +-
 src/logging/Makefile.inc.am | 2 +-
 src/remote/Makefile.inc.am  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 937f5216da..a7c1ad0861 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -725,7 +725,7 @@ endif WITH_LIBVIRTD
 %.8: %.8.in $(top_srcdir)/configure.ac
 	$(AM_V_GEN)sed \
 		-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
-		-e 's|[@]localstatedir[@]|$(localstatedir)|g' \
+		-e 's|[@]runstatedir[@]|$(runstatedir)|g' \
 		< $< > $@-t && \
 	mv $@-t $@
 
diff --git a/src/locking/Makefile.inc.am b/src/locking/Makefile.inc.am
index eccf7c3a4d..a0822f77d4 100644
--- a/src/locking/Makefile.inc.am
+++ b/src/locking/Makefile.inc.am
@@ -280,7 +280,7 @@ virtlockd.8.in: locking/virtlockd.pod
 	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
 	sed \
 		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
-		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
+		-e 's|RUNSTATEDIR|\@runstatedir\@|g' \
 		< $@-t1 > $@-t2 && \
 	rm -f $@-t1 && \
 	mv $@-t2 $@
diff --git a/src/logging/Makefile.inc.am b/src/logging/Makefile.inc.am
index 74e94636a6..6eda40275c 100644
--- a/src/logging/Makefile.inc.am
+++ b/src/logging/Makefile.inc.am
@@ -118,7 +118,7 @@ virtlogd.8.in: logging/virtlogd.pod
 	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
 	sed \
 		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
-		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
+		-e 's|RUNSTATEDIR|\@runstatedir\@|g' \
 		< $@-t1 > $@-t2 && \
 	rm -f $@-t1 && \
 	mv $@-t2 $@
diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am
index 071d19d26a..0f4f1ae8d5 100644
--- a/src/remote/Makefile.inc.am
+++ b/src/remote/Makefile.inc.am
@@ -455,7 +455,7 @@ libvirtd.8.in: remote/libvirtd.pod
 	if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \
 	sed \
 		-e 's|SYSCONFDIR|\@sysconfdir\@|g' \
-		-e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
+		-e 's|RUNSTATEDIR|\@runstatedir\@|g' \
 		< $@-t1 > $@-t2 && \
 	rm -f $@-t1 && \
 	mv $@-t2 $@
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] build: fix substitution of RUNSTATEDIR in man pages
Posted by Pavel Hrdina 4 years, 6 months ago
On Fri, Oct 18, 2019 at 03:33:01PM +0100, Daniel P. Berrangé wrote:
> When RUNSTATEDIR was introduced
> 
>   commit d29c917ef470a25149d1f3787ec494d006549f27
>   Author: Daniel P. Berrangé <berrange@redhat.com>
>   Date:   Tue Aug 20 16:05:12 2019 +0100
> 
>     src: honour the RUNSTATEDIR variable in all code
> 
> The makefile rules for man pages were accidentally not updated for the
> new variablle name.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/Makefile.am             | 2 +-
>  src/locking/Makefile.inc.am | 2 +-
>  src/logging/Makefile.inc.am | 2 +-
>  src/remote/Makefile.inc.am  | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] build: fix substitution of RUNSTATEDIR in man pages
Posted by Andrea Bolognani 4 years, 6 months ago
On Fri, 2019-10-18 at 15:33 +0100, Daniel P. Berrangé wrote:
> When RUNSTATEDIR was introduced
> 
>   commit d29c917ef470a25149d1f3787ec494d006549f27
>   Author: Daniel P. Berrangé <berrange@redhat.com>
>   Date:   Tue Aug 20 16:05:12 2019 +0100
> 
>     src: honour the RUNSTATEDIR variable in all code
> 
> The makefile rules for man pages were accidentally not updated for the
> new variablle name.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/Makefile.am             | 2 +-
>  src/locking/Makefile.inc.am | 2 +-
>  src/logging/Makefile.inc.am | 2 +-
>  src/remote/Makefile.inc.am  | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)

There are a few more instances that should be audited:

  src/util/Makefile.inc.am:               -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
  tools/Makefile.am:          -e 's|[@]localstatedir@|$(localstatedir)|' < $< > $@ \
  tools/Makefile.am:              -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
  tools/Makefile.am:              -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \
  tools/Makefile.am:              -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
  tools/Makefile.am:              -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
  tools/Makefile.am:          -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
  tools/Makefile.am:          -e 's|[@]localstatedir[@]|$(localstatedir)|g' \

At least a couple of the instances in tools/ are clearly unnecessary,
while the one in src/util/ might not be but I haven't investigated in
detail :)

We should really find a way to avoid repeating the same sed(1) line
over and over again... Perhaps the switch to Meson will help in this
regard?

Anyway, the patch itself is fine, so it gets a

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list