diff mbox series

[v3,1/2] xfsprogs: fix permissions on files installed by libtoolize

Message ID 20241002103624.1323492-2-aalbersh@redhat.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Minor fixes for xfsprogs | expand

Commit Message

Andrey Albershteyn Oct. 2, 2024, 10:36 a.m. UTC
Libtoolize installs some set of AUX files from its system package.
Not all distributions have the same permissions set on these files.
For example, read-only libtoolize system package will copy those
files without write permissions. This causes build to fail as next
line copies ./include/install-sh over ./install-sh which is not
writable.

Fix this by setting permission explicitly on files copied by
libtoolize.

Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Darrick J. Wong Oct. 2, 2024, 10:54 p.m. UTC | #1
On Wed, Oct 02, 2024 at 12:36:23PM +0200, Andrey Albershteyn wrote:
> Libtoolize installs some set of AUX files from its system package.
> Not all distributions have the same permissions set on these files.
> For example, read-only libtoolize system package will copy those
> files without write permissions. This causes build to fail as next
> line copies ./include/install-sh over ./install-sh which is not
> writable.
> 
> Fix this by setting permission explicitly on files copied by
> libtoolize.
> 
> Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com>
> ---
>  Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 4e768526c6fe..11cace1112e6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -109,6 +109,8 @@ endif
>  
>  configure: configure.ac
>  	libtoolize -c -i -f
> +	chmod 755 config.guess config.sub install-sh
> +	chmod 644 ltmain.sh m4/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4

Probably better to write these out explicitly instead of relying on
shell globbing to pick up the m4/ files, but otherwise

Looks ok,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

>  	cp include/install-sh .
>  	aclocal -I m4
>  	autoconf
> -- 
> 2.44.1
> 
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 4e768526c6fe..11cace1112e6 100644
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,8 @@  endif
 
 configure: configure.ac
 	libtoolize -c -i -f
+	chmod 755 config.guess config.sub install-sh
+	chmod 644 ltmain.sh m4/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4
 	cp include/install-sh .
 	aclocal -I m4
 	autoconf