Skip to content

Commit 2712650

Browse files
committed
make install: ressource files should have 644 as permissions. Closes: #8638
1 parent 08299c0 commit 2712650

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

GNUmakefile

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,14 @@ distclean: clean
381381
ifeq ($(MANPAGES),y)
382382
manpages: build-coreutils
383383
mkdir -p $(BUILDDIR)/man/
384-
$(foreach prog, $(INSTALLEES), \
384+
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
385385
$(BUILDDIR)/coreutils manpage $(prog) > $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(newline) \
386386
)
387387

388388
install-manpages: manpages
389389
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
390-
$(foreach prog, $(INSTALLEES), \
391-
$(INSTALL) $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(DESTDIR)$(DATAROOTDIR)/man/man1/ $(newline) \
390+
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
391+
$(INSTALL) -m 644 $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(DESTDIR)$(DATAROOTDIR)/man/man1/ $(newline) \
392392
)
393393
else
394394
install-manpages:
@@ -397,7 +397,7 @@ endif
397397
ifeq ($(COMPLETIONS),y)
398398
completions: build-coreutils
399399
mkdir -p $(BUILDDIR)/completions/zsh $(BUILDDIR)/completions/bash $(BUILDDIR)/completions/fish
400-
$(foreach prog, $(INSTALLEES), \
400+
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
401401
$(BUILDDIR)/coreutils completion $(prog) zsh > $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(newline) \
402402
$(BUILDDIR)/coreutils completion $(prog) bash > $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(newline) \
403403
$(BUILDDIR)/coreutils completion $(prog) fish > $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(newline) \
@@ -407,10 +407,10 @@ install-completions: completions
407407
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
408408
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
409409
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
410-
$(foreach prog, $(INSTALLEES), \
411-
$(INSTALL) $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/ $(newline) \
412-
$(INSTALL) $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/ $(newline) \
413-
$(INSTALL) $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/ $(newline) \
410+
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
411+
$(INSTALL) -m 644 $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/ $(newline) \
412+
$(INSTALL) -m 644 $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/ $(newline) \
413+
$(INSTALL) -m 644 $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/ $(newline) \
414414
)
415415
else
416416
install-completions:
@@ -422,7 +422,7 @@ locales:
422422
@if [ -d "$(BASEDIR)/src/uucore/locales" ]; then \
423423
mkdir -p "$(BUILDDIR)/locales/uucore"; \
424424
for locale_file in "$(BASEDIR)"/src/uucore/locales/*.ftl; do \
425-
$(INSTALL) -v "$$locale_file" "$(BUILDDIR)/locales/uucore/"; \
425+
$(INSTALL) -m 644 -v "$$locale_file" "$(BUILDDIR)/locales/uucore/"; \
426426
done; \
427427
fi; \
428428
# Copy utility-specific locales
@@ -431,7 +431,7 @@ locales:
431431
mkdir -p "$(BUILDDIR)/locales/$$prog"; \
432432
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
433433
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
434-
$(INSTALL) -v "$$locale_file" "$(BUILDDIR)/locales/$$prog/"; \
434+
$(INSTALL) -m 644 -v "$$locale_file" "$(BUILDDIR)/locales/$$prog/"; \
435435
fi; \
436436
done; \
437437
fi; \
@@ -444,7 +444,7 @@ install-locales:
444444
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog"; \
445445
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
446446
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
447-
$(INSTALL) -v "$$locale_file" "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog/"; \
447+
$(INSTALL) -m 644 -v "$$locale_file" "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog/"; \
448448
fi; \
449449
done; \
450450
fi; \
@@ -460,16 +460,16 @@ ifneq ($(OS),Windows_NT)
460460
$(INSTALL) -m 755 $(BUILDDIR)/deps/libstdbuf* $(DESTDIR)$(LIBSTDBUF_DIR)/
461461
endif
462462
ifeq (${MULTICALL}, y)
463-
$(INSTALL) $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
463+
$(INSTALL) -m 755 $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils
464464
$(foreach prog, $(filter-out coreutils, $(INSTALLEES)), \
465465
cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)$(prog) $(newline) \
466466
)
467467
$(if $(findstring test,$(INSTALLEES)), cd $(INSTALLDIR_BIN) && ln -fs $(PROG_PREFIX)coreutils $(PROG_PREFIX)[)
468468
else
469469
$(foreach prog, $(INSTALLEES), \
470-
$(INSTALL) $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog) $(newline) \
470+
$(INSTALL) -m 755 $(BUILDDIR)/$(prog) $(INSTALLDIR_BIN)/$(PROG_PREFIX)$(prog) $(newline) \
471471
)
472-
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
472+
$(if $(findstring test,$(INSTALLEES)), $(INSTALL) -m 755 $(BUILDDIR)/test $(INSTALLDIR_BIN)/$(PROG_PREFIX)[)
473473
endif
474474

475475
uninstall:

0 commit comments

Comments
 (0)