From: Todd C. Miller Date: Thu, 31 May 2012 20:51:15 +0000 (-0400) Subject: Replace out of date MAN_POSTINSTALL with MANCOMPRESS and MANCOMPRESSEXT X-Git-Tag: SUDO_1_7_10~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a885733e78ae5ba1f2827a4347bbb44c1afdac19;p=sudo Replace out of date MAN_POSTINSTALL with MANCOMPRESS and MANCOMPRESSEXT which can be used to compress the installed manual pages. Compress the man pages for .deb files to appease lintian. --HG-- branch : 1.7 --- diff --git a/Makefile.in b/Makefile.in index af3430bb5..343e078b5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -37,6 +37,8 @@ NROFF = @NROFFPROG@ -Tascii LIBTOOL = @LIBTOOL@ AR=@AR@ RANLIB=@RANLIB@ +MANCOMPRESS = @MANCOMPRESS@ +MANCOMPRESSEXT = @MANCOMPRESSEXT@ # Our install program supports extra flags... INSTALL = $(SHELL) $(srcdir)/install-sh -c @@ -581,13 +583,23 @@ install-doc: install-dirs ChangeLog (cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 $$f $(DESTDIR)$(docdir); done) @LDAP@(cd $(srcdir) && for f in README.LDAP schema.* sudoers2ldif; do $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 $$f $(DESTDIR)$(docdir); done) $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) - @rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu) - ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu) @REPLAY@$(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu) $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu) $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform) @LDAP@$(INSTALL) -O $(install_uid) -G $(install_gid) -m 0444 @mansrcdir@/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform) -@MAN_POSTINSTALL@ + @if test -n "$(MANCOMPRESS)"; then \ + for f in $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/sudoreplay.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform) $(mandirform)/sudoers.ldap.$(mansectform); do \ + if test -f $(DESTDIR)$$f; then \ + echo $(MANCOMPRESS) -f $(DESTDIR)$$f; \ + $(MANCOMPRESS) -f $(DESTDIR)$$f; \ + fi; \ + done; \ + rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)$(MANCOMPRESSEXT); \ + ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)$(MANCOMPRESSEXT) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)$(MANCOMPRESSEXT) + else \ + rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu); \ + ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu) + fi check: @echo nothing to check diff --git a/configure b/configure index 45ea22d12..6a034b96c 100755 --- a/configure +++ b/configure @@ -715,7 +715,8 @@ DEV SUDOERS_GID SUDOERS_UID SUDOERS_MODE -MAN_POSTINSTALL +MANCOMPRESSEXT +MANCOMPRESS MANTYPE AUTH_OBJS OSDEFS @@ -2852,6 +2853,7 @@ $as_echo "$as_me: Configuring Sudo version $PACKAGE_VERSION" >&6;} + # @@ -14062,7 +14064,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext *-*-irix*) OSDEFS="${OSDEFS} -D_BSD_TYPES" if test -z "$NROFFPROG"; then - MAN_POSTINSTALL=' /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)' if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then if test -d /usr/share/catman/local; then mandir="/usr/share/catman/local" @@ -14070,6 +14071,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext mandir="/usr/catman/local" fi fi + # Compress cat pages with pack + MANCOMPRESS='pack' + MANCOMPRESSEXT='.z' else if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then if test -d "/usr/share/man/local"; then diff --git a/configure.in b/configure.in index 7e6492f8c..e88fd826b 100644 --- a/configure.in +++ b/configure.in @@ -30,7 +30,8 @@ AC_SUBST([GETGROUPS_LIB]) AC_SUBST([OSDEFS]) AC_SUBST([AUTH_OBJS]) AC_SUBST([MANTYPE]) -AC_SUBST([MAN_POSTINSTALL]) +AC_SUBST([MANCOMPRESS]) +AC_SUBST([MANCOMPRESSEXT]) AC_SUBST([SUDOERS_MODE]) AC_SUBST([SUDOERS_UID]) AC_SUBST([SUDOERS_GID]) @@ -1660,7 +1661,6 @@ case "$host" in *-*-irix*) OSDEFS="${OSDEFS} -D_BSD_TYPES" if test -z "$NROFFPROG"; then - MAN_POSTINSTALL=' /bin/rm -f $(mandirsu)/sudo.$(mansectsu).z $(mandirsu)/visudo.$(mansectsu).z $(mandirform)/sudoers.$(mansectform).z ; /usr/bin/pack $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform)' if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then if test -d /usr/share/catman/local; then mandir="/usr/share/catman/local" @@ -1668,6 +1668,9 @@ case "$host" in mandir="/usr/catman/local" fi fi + # Compress cat pages with pack + MANCOMPRESS='pack' + MANCOMPRESSEXT='.z' else if test "$prefix" = "/usr/local" -a "$mandir" = '${datarootdir}/man'; then if test -d "/usr/share/man/local"; then diff --git a/mkpkg b/mkpkg index 4e9f3839d..9f4f32835 100755 --- a/mkpkg +++ b/mkpkg @@ -185,6 +185,9 @@ case "$osversion" in ;; deb*|ubu*) prefix=/usr + # Man pages should be compressed in .deb files + export MANCOMPRESS='gzip -9' + export MANCOMPRESSEXT='.gz' # If Ubuntu, add --enable-admin-flag case "$osversion" in ubu*)