[PATCH] openrc: Make init scripts executable on install

Michal Privoznik posted 1 patch 2 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/287149738fc9709a53f67551e9210060aa06d79d.1644942411.git.mprivozn@redhat.com
src/meson.build | 1 +
1 file changed, 1 insertion(+)
[PATCH] openrc: Make init scripts executable on install
Posted by Michal Privoznik 2 years, 2 months ago
When installing openrc init scripts, we take whatever mode the
generated files are in an copy them under /etc/init.d/. This is
not ideal, because those files are not executable and they should
be.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/250
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/meson.build b/src/meson.build
index 3890df7124..b2d951d36c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -848,6 +848,7 @@ if conf.has('WITH_LIBVIRTD')
       install_data(
         init_file,
         install_dir: sysconfdir / 'init.d',
+        install_mode: 'rwxr-xr-x',
         rename: [ init['name'] ],
       )
 
-- 
2.34.1

Re: [PATCH] openrc: Make init scripts executable on install
Posted by Ani Sinha 2 years, 2 months ago
On Tue, Feb 15, 2022 at 21:57 Michal Privoznik <mprivozn@redhat.com> wrote:

> When installing openrc init scripts, we take whatever mode the
> generated files are in an copy them under /etc/init.d/. This is
> not ideal, because those files are not executable and they should
> be.
>
> Resolves: https://gitlab.com/libvirt/libvirt/-/issues/250
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>


Reviewed-by: Ani Sinha <ani@anisinha.ca>


> ---
>  src/meson.build | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/meson.build b/src/meson.build
> index 3890df7124..b2d951d36c 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -848,6 +848,7 @@ if conf.has('WITH_LIBVIRTD')
>        install_data(
>          init_file,
>          install_dir: sysconfdir / 'init.d',
> +        install_mode: 'rwxr-xr-x',
>          rename: [ init['name'] ],
>        )
>
> --
> 2.34.1
>
>
Re: [PATCH] openrc: Make init scripts executable on install
Posted by Andrea Bolognani 2 years, 2 months ago
On Tue, Feb 15, 2022 at 05:26:51PM +0100, Michal Privoznik wrote:
> When installing openrc init scripts, we take whatever mode the
> generated files are in an copy them under /etc/init.d/. This is
> not ideal, because those files are not executable and they should
> be.
>
> Resolves: https://gitlab.com/libvirt/libvirt/-/issues/250
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/meson.build | 1 +
>  1 file changed, 1 insertion(+)

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

-- 
Andrea Bolognani / Red Hat / Virtualization