Commit f2ef1612613d5689be73e927cfaa28a1f750320b
1 parent
85a3f95a
Override umask on install (fixes #326)
Showing
3 changed files
with
24 additions
and
13 deletions
ChangeLog
| 1 | 2019-06-22 Jay Berkenbilt <ejb@ql.org> | 1 | 2019-06-22 Jay Berkenbilt <ejb@ql.org> |
| 2 | 2 | ||
| 3 | + * The "make install" target explicitly sets a mode rather than | ||
| 4 | + relying the user's umask. Fixes #326. | ||
| 5 | + | ||
| 3 | * When a file has linearization warnings but no errors, qpdf | 6 | * When a file has linearization warnings but no errors, qpdf |
| 4 | --check and --check-linearization now exit with code 3 instead | 7 | --check and --check-linearization now exit with code 3 instead |
| 5 | of 2. Fixes #50. | 8 | of 2. Fixes #50. |
make/libtool.mk
| @@ -107,11 +107,11 @@ endef | @@ -107,11 +107,11 @@ endef | ||
| 107 | # Install target | 107 | # Install target |
| 108 | 108 | ||
| 109 | install: all | 109 | install: all |
| 110 | - ./mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig | ||
| 111 | - ./mkinstalldirs $(DESTDIR)$(bindir) | ||
| 112 | - ./mkinstalldirs $(DESTDIR)$(includedir)/qpdf | ||
| 113 | - ./mkinstalldirs $(DESTDIR)$(docdir) | ||
| 114 | - ./mkinstalldirs $(DESTDIR)$(mandir)/man1 | 110 | + ./mkinstalldirs -m 0755 $(DESTDIR)$(libdir)/pkgconfig |
| 111 | + ./mkinstalldirs -m 0755 $(DESTDIR)$(bindir) | ||
| 112 | + ./mkinstalldirs -m 0755 $(DESTDIR)$(includedir)/qpdf | ||
| 113 | + ./mkinstalldirs -m 0755 $(DESTDIR)$(docdir) | ||
| 114 | + ./mkinstalldirs -m 0755 $(DESTDIR)$(mandir)/man1 | ||
| 115 | $(LIBTOOL) --mode=install ./install-sh \ | 115 | $(LIBTOOL) --mode=install ./install-sh \ |
| 116 | libqpdf/$(OUTPUT_DIR)/libqpdf.la \ | 116 | libqpdf/$(OUTPUT_DIR)/libqpdf.la \ |
| 117 | $(DESTDIR)$(libdir)/libqpdf.la | 117 | $(DESTDIR)$(libdir)/libqpdf.la |
| @@ -122,15 +122,15 @@ install: all | @@ -122,15 +122,15 @@ install: all | ||
| 122 | $(LIBTOOL) --mode=install ./install-sh \ | 122 | $(LIBTOOL) --mode=install ./install-sh \ |
| 123 | zlib-flate/$(OUTPUT_DIR)/zlib-flate \ | 123 | zlib-flate/$(OUTPUT_DIR)/zlib-flate \ |
| 124 | $(DESTDIR)$(bindir)/zlib-flate | 124 | $(DESTDIR)$(bindir)/zlib-flate |
| 125 | - cp qpdf/fix-qdf $(DESTDIR)$(bindir) | ||
| 126 | - cp include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf | ||
| 127 | - cp include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf | ||
| 128 | - cp doc/stylesheet.css $(DESTDIR)$(docdir) | ||
| 129 | - cp libqpdf.pc $(DESTDIR)$(libdir)/pkgconfig | 125 | + ./install-sh -m 0755 qpdf/fix-qdf $(DESTDIR)$(bindir) |
| 126 | + ./install-sh -m 0644 include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf | ||
| 127 | + ./install-sh -m 0644 include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf | ||
| 128 | + ./install-sh -m 0644 doc/stylesheet.css $(DESTDIR)$(docdir) | ||
| 129 | + ./install-sh -m 0644 libqpdf.pc $(DESTDIR)$(libdir)/pkgconfig | ||
| 130 | if [ -f doc/qpdf-manual.html ]; then \ | 130 | if [ -f doc/qpdf-manual.html ]; then \ |
| 131 | - cp doc/qpdf-manual.html $(DESTDIR)$(docdir); \ | 131 | + ./install-sh -m 0644 doc/qpdf-manual.html $(DESTDIR)$(docdir); \ |
| 132 | fi | 132 | fi |
| 133 | if [ -f doc/qpdf-manual.pdf ]; then \ | 133 | if [ -f doc/qpdf-manual.pdf ]; then \ |
| 134 | - cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir); \ | 134 | + ./install-sh -m 0644 doc/qpdf-manual.pdf $(DESTDIR)$(docdir); \ |
| 135 | fi | 135 | fi |
| 136 | - cp doc/*.1 $(DESTDIR)$(mandir)/man1 | 136 | + ./install-sh -m 0644 doc/*.1 $(DESTDIR)$(mandir)/man1 |
manual/qpdf-manual.xml
| @@ -4370,6 +4370,14 @@ print "\n"; | @@ -4370,6 +4370,14 @@ print "\n"; | ||
| 4370 | the library to make this safe. | 4370 | the library to make this safe. |
| 4371 | </para> | 4371 | </para> |
| 4372 | </listitem> | 4372 | </listitem> |
| 4373 | + <listitem> | ||
| 4374 | + <para> | ||
| 4375 | + QPDF's <command>make install</command> target explicitly | ||
| 4376 | + specifies the mode to use when installing files instead of | ||
| 4377 | + relying the user's umask. It was previously doing this for | ||
| 4378 | + some files but not others. | ||
| 4379 | + </para> | ||
| 4380 | + </listitem> | ||
| 4373 | </itemizedlist> | 4381 | </itemizedlist> |
| 4374 | </listitem> | 4382 | </listitem> |
| 4375 | <listitem> | 4383 | <listitem> |