Skip to content

Commit

Permalink
Override umask on install (fixes qpdf#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
jberkenbilt committed Jun 22, 2019
1 parent 887cef9 commit 06e89f2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,5 +1,8 @@
2019-06-22 Jay Berkenbilt <ejb@ql.org>

* The "make install" target explicitly sets a mode rather than
relying the user's umask. Fixes #326.

* When a file has linearization warnings but no errors, qpdf
--check and --check-linearization now exit with code 3 instead
of 2. Fixes #50.
Expand Down
26 changes: 13 additions & 13 deletions make/libtool.mk
Expand Up @@ -107,11 +107,11 @@ endef
# Install target

install: all
./mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
./mkinstalldirs $(DESTDIR)$(bindir)
./mkinstalldirs $(DESTDIR)$(includedir)/qpdf
./mkinstalldirs $(DESTDIR)$(docdir)
./mkinstalldirs $(DESTDIR)$(mandir)/man1
./mkinstalldirs -m 0755 $(DESTDIR)$(libdir)/pkgconfig
./mkinstalldirs -m 0755 $(DESTDIR)$(bindir)
./mkinstalldirs -m 0755 $(DESTDIR)$(includedir)/qpdf
./mkinstalldirs -m 0755 $(DESTDIR)$(docdir)
./mkinstalldirs -m 0755 $(DESTDIR)$(mandir)/man1
$(LIBTOOL) --mode=install ./install-sh \
libqpdf/$(OUTPUT_DIR)/libqpdf.la \
$(DESTDIR)$(libdir)/libqpdf.la
Expand All @@ -122,15 +122,15 @@ install: all
$(LIBTOOL) --mode=install ./install-sh \
zlib-flate/$(OUTPUT_DIR)/zlib-flate \
$(DESTDIR)$(bindir)/zlib-flate
cp qpdf/fix-qdf $(DESTDIR)$(bindir)
cp include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf
cp include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf
cp doc/stylesheet.css $(DESTDIR)$(docdir)
cp libqpdf.pc $(DESTDIR)$(libdir)/pkgconfig
./install-sh -m 0755 qpdf/fix-qdf $(DESTDIR)$(bindir)
./install-sh -m 0644 include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf
./install-sh -m 0644 include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf
./install-sh -m 0644 doc/stylesheet.css $(DESTDIR)$(docdir)
./install-sh -m 0644 libqpdf.pc $(DESTDIR)$(libdir)/pkgconfig
if [ -f doc/qpdf-manual.html ]; then \
cp doc/qpdf-manual.html $(DESTDIR)$(docdir); \
./install-sh -m 0644 doc/qpdf-manual.html $(DESTDIR)$(docdir); \
fi
if [ -f doc/qpdf-manual.pdf ]; then \
cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir); \
./install-sh -m 0644 doc/qpdf-manual.pdf $(DESTDIR)$(docdir); \
fi
cp doc/*.1 $(DESTDIR)$(mandir)/man1
./install-sh -m 0644 doc/*.1 $(DESTDIR)$(mandir)/man1
8 changes: 8 additions & 0 deletions manual/qpdf-manual.xml
Expand Up @@ -4370,6 +4370,14 @@ print "\n";
the library to make this safe.
</para>
</listitem>
<listitem>
<para>
QPDF's <command>make install</command> target explicitly
specifies the mode to use when installing files instead of
relying the user's umask. It was previously doing this for
some files but not others.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
Expand Down

0 comments on commit 06e89f2

Please sign in to comment.