[libvirt PATCH 3/3] ci: Fix paths shown in the website

Andrea Bolognani posted 3 patches 3 years, 6 months ago
There is a newer version of this series
[libvirt PATCH 3/3] ci: Fix paths shown in the website
Posted by Andrea Bolognani 3 years, 6 months ago
Right now we're setting the prefix to a custom path, which
results in paths like

  /builds/libvirt/libvirt/vroot/etc/libvirt/virtqemud.conf

ending up in the generated HTML. In order to avoid that,
set the prefix and other installation paths to reasonable
default values by passing

  -Dsystem=true

and then take advantage of $DESTDIR support to still be able
to write the HTML files without requiring root privileges.

Reported-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 .gitlab-ci.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6a8b89729f..d5c431dee0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -67,9 +67,9 @@ website:
   before_script:
     - *script_variables
   script:
-    - meson setup build --werror --prefix=$(pwd)/vroot || (cat build/meson-logs/meson-log.txt && exit 1)
-    - ninja -C build install-web
-    - mv vroot/share/doc/libvirt/html/ website
+    - meson setup build --werror -Dsystem=true || (cat build/meson-logs/meson-log.txt && exit 1)
+    - DESTDIR=$(pwd)/install ninja -C build install-web
+    - mv install/usr/share/doc/libvirt/html/ website
   artifacts:
     expose_as: 'Website'
     name: 'website'
-- 
2.35.3
Re: [libvirt PATCH 3/3] ci: Fix paths shown in the website
Posted by Pavel Hrdina 3 years, 6 months ago
On Tue, Jul 19, 2022 at 04:17:45PM +0200, Andrea Bolognani wrote:
> Right now we're setting the prefix to a custom path, which
> results in paths like
> 
>   /builds/libvirt/libvirt/vroot/etc/libvirt/virtqemud.conf
> 
> ending up in the generated HTML. In order to avoid that,
> set the prefix and other installation paths to reasonable
> default values by passing
> 
>   -Dsystem=true
> 
> and then take advantage of $DESTDIR support to still be able
> to write the HTML files without requiring root privileges.
> 
> Reported-by: Martin Kletzander <mkletzan@redhat.com>
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  .gitlab-ci.yml | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>