Fix path in makewhatis #160317 by Paul Taylor, make sure #!shebangs arent destroyed...
authorMike Frysinger <vapier@gentoo.org>
Sat, 6 Jan 2007 01:34:35 +0000 (01:34 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 6 Jan 2007 01:34:35 +0000 (01:34 +0000)
Package-Manager: portage-2.1.2_rc4-r6

sys-apps/man/ChangeLog
sys-apps/man/Manifest
sys-apps/man/files/digest-man-1.6e-r1 [new file with mode: 0644]
sys-apps/man/files/makewhatis.cron
sys-apps/man/files/man-1.6e-dont-kill-shebangs.patch [new file with mode: 0644]
sys-apps/man/files/man-1.6e-headers.patch [new file with mode: 0644]
sys-apps/man/man-1.6e-r1.ebuild [new file with mode: 0644]

index 1b4ef0bce0c7fbc8112e05ddad071df4aea9234c..925d944c484137022c63e2fe23e7e06ff27058f1 100644 (file)
@@ -1,6 +1,15 @@
 # ChangeLog for sys-apps/man
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/man/ChangeLog,v 1.105 2006/12/27 16:15:47 vapier Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/man/ChangeLog,v 1.106 2007/01/06 01:34:35 vapier Exp $
+
+*man-1.6e-r1 (06 Jan 2007)
+
+  06 Jan 2007; Mike Frysinger <vapier@gentoo.org>
+  +files/man-1.6e-dont-kill-shebangs.patch, +files/man-1.6e-headers.patch,
+  files/makewhatis.cron, +man-1.6e-r1.ebuild:
+  Fix path in makewhatis #160317 by Paul Taylor, make sure #!shebangs arent
+  destroyed to handle lame root shells #159192 by Gautam Iyer, and include
+  some more headers.
 
   27 Dec 2006; Mike Frysinger <vapier@gentoo.org> man-1.6e.ebuild:
   Move makewhatis to /etc/cron.daily.
index b54b8ba8f0f00d38f6c16ebc4e0ac062388d39e7..d8248e7067b7b348e09322fea896f5b25822212b 100644 (file)
@@ -1,10 +1,10 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-AUX makewhatis.cron 130 RMD160 8d0140b6ffe643b3195665a192ffcbcbb4535233 SHA1 9174c3c08a6d11ac668073d8778f29b84672568f SHA256 9eefb69edfd3bbc2fcea6af4d0f8a207b094b623b40d916b2eb45d2609ad2249
-MD5 8b2016cc778ed4e2570b912c0f420266 files/makewhatis.cron 130
-RMD160 8d0140b6ffe643b3195665a192ffcbcbb4535233 files/makewhatis.cron 130
-SHA256 9eefb69edfd3bbc2fcea6af4d0f8a207b094b623b40d916b2eb45d2609ad2249 files/makewhatis.cron 130
+AUX makewhatis.cron 115 RMD160 166a144a1f876c494e252836fd32142dc52e4b0a SHA1 2c7f9fd209f8c2078751ea877d4e3b09a75475ab SHA256 3e7f377a6c9ecdeff6e85f918993a4af0cf8bb5bcc63bf7a35e6426d50e434a4
+MD5 c5195caaa1f9c9c223773cbcc59ae117 files/makewhatis.cron 115
+RMD160 166a144a1f876c494e252836fd32142dc52e4b0a files/makewhatis.cron 115
+SHA256 3e7f377a6c9ecdeff6e85f918993a4af0cf8bb5bcc63bf7a35e6426d50e434a4 files/makewhatis.cron 115
 AUX man-1.5m-groff-1.18.patch 923 RMD160 44b369bed7d540e704a377851efac385d9bcebb0 SHA1 94859ad8b7066a7eaa263823b573b8542aac8b04 SHA256 2b27c6a9d0804dd8923b24a8355a797ef20f70cf42011078161b6955eee1bec9
 MD5 80f2a25fb0b5692f39a1990527a93271 files/man-1.5m-groff-1.18.patch 923
 RMD160 44b369bed7d540e704a377851efac385d9bcebb0 files/man-1.5m-groff-1.18.patch 923
@@ -49,20 +49,32 @@ AUX man-1.6d-headers.patch 929 RMD160 b56a2858bb075d8d4025791c801909fec89358de S
 MD5 f3188dbe359f6d1e72d97961ae3025fd files/man-1.6d-headers.patch 929
 RMD160 b56a2858bb075d8d4025791c801909fec89358de files/man-1.6d-headers.patch 929
 SHA256 113670cdad5c09f51d3981442a271cbf449b8d737ded3ff63c382b1fed37d687 files/man-1.6d-headers.patch 929
+AUX man-1.6e-dont-kill-shebangs.patch 599 RMD160 3977ba6da44e7902143c65ee07faefc61748f015 SHA1 4c8334a9aa0c35b8503d5c4712ba0b3c7dc42ee4 SHA256 945208a9d73d52e51c9a4930b1c2e289f8bdb79bb9adfdaa51946c6ed135ac2c
+MD5 d1702e9ab510d06220db82ab039a5cc6 files/man-1.6e-dont-kill-shebangs.patch 599
+RMD160 3977ba6da44e7902143c65ee07faefc61748f015 files/man-1.6e-dont-kill-shebangs.patch 599
+SHA256 945208a9d73d52e51c9a4930b1c2e289f8bdb79bb9adfdaa51946c6ed135ac2c files/man-1.6e-dont-kill-shebangs.patch 599
+AUX man-1.6e-headers.patch 241 RMD160 04052f079124c57fcc6b0ebe29a4a62eba39baa4 SHA1 4b421073a2c88ca32bc6d8a448710cc921d0e6cf SHA256 d62108e3baaec771d99226eff07a6f604a8b9afefd25ec596b9817574a638e20
+MD5 c0bb7479f2ae3701f80daaf4aa64d1fb files/man-1.6e-headers.patch 241
+RMD160 04052f079124c57fcc6b0ebe29a4a62eba39baa4 files/man-1.6e-headers.patch 241
+SHA256 d62108e3baaec771d99226eff07a6f604a8b9afefd25ec596b9817574a638e20 files/man-1.6e-headers.patch 241
 DIST man-1.6d.tar.gz 270140 RMD160 2c476a735c211acbb478d604b73a1becb54cb87b SHA1 f83aecdcd922f0cf3515665b8e1e0e2514c99286 SHA256 a6d03bdabe16542a5a51471b5d8e7eaa50ad782577c7b31d9c478382097cf4eb
 DIST man-1.6e.tar.gz 252657 RMD160 486099dc1b34fe86a2c1d19b7c89dc19b9787837 SHA1 7264bda7dd7bf08bdb9dac6ec7734e755ec0a8d1 SHA256 022faf23844eabb3662eabb105836925dd83bedda10271e2450a5bc5b61a5b5f
 EBUILD man-1.6d.ebuild 3271 RMD160 cb2fa2ab59ed3641ac907f3e72597bdb78d6d176 SHA1 8e522d4667e92ce22c500040f12ae5d872fa836c SHA256 4719ecf55025f396ca02c3fe50beda55447db38bcebdbd4700725f5236fb4381
 MD5 5daaa868ed82c817f414f0da0d7484cb man-1.6d.ebuild 3271
 RMD160 cb2fa2ab59ed3641ac907f3e72597bdb78d6d176 man-1.6d.ebuild 3271
 SHA256 4719ecf55025f396ca02c3fe50beda55447db38bcebdbd4700725f5236fb4381 man-1.6d.ebuild 3271
+EBUILD man-1.6e-r1.ebuild 3420 RMD160 f0568ee3e60529ba7321aff66ab6d1757ca74e78 SHA1 26120156dff709571d31067638763e7ff46fc853 SHA256 bf28630af6f87ead248e13bbc006b59da474ee4b73a4fc747e87da22b32ce984
+MD5 c77e1ca5aff91069776584e4d6a75f3f man-1.6e-r1.ebuild 3420
+RMD160 f0568ee3e60529ba7321aff66ab6d1757ca74e78 man-1.6e-r1.ebuild 3420
+SHA256 bf28630af6f87ead248e13bbc006b59da474ee4b73a4fc747e87da22b32ce984 man-1.6e-r1.ebuild 3420
 EBUILD man-1.6e.ebuild 3307 RMD160 b5b9e644e803a87fe26b1c53201b16f9f3edc414 SHA1 67680c0c2f0d1ecac04da84daeb0c850fe4f6931 SHA256 096fcd00f187cb23d96268570c648dcff7a8c09105343a8166f0f2533121c139
 MD5 f19ddc44832adc425f5c0b231f0a6d14 man-1.6e.ebuild 3307
 RMD160 b5b9e644e803a87fe26b1c53201b16f9f3edc414 man-1.6e.ebuild 3307
 SHA256 096fcd00f187cb23d96268570c648dcff7a8c09105343a8166f0f2533121c139 man-1.6e.ebuild 3307
-MISC ChangeLog 14770 RMD160 85aed9d01a595a66109b986418275a2256b784ac SHA1 fbd12b8d6673b0f6e3c4c19a22021328236eb0a1 SHA256 d6f5fe5e90fad4a4a073c4740b7e7d291a9842cb0a292d88f27cb72f2d691bfe
-MD5 ea5772efe735abc73a367eff9652f893 ChangeLog 14770
-RMD160 85aed9d01a595a66109b986418275a2256b784ac ChangeLog 14770
-SHA256 d6f5fe5e90fad4a4a073c4740b7e7d291a9842cb0a292d88f27cb72f2d691bfe ChangeLog 14770
+MISC ChangeLog 15142 RMD160 98d6ef93769278a1473a2813b20573370fb80fd0 SHA1 53e8fa92fc96ed2300d2a31ccc10f921d6d84c1d SHA256 7b5badac07d663531ba42fee62431bf0a19408df108037abb6fcc93b1105f542
+MD5 5c6b2ab7bbb1b22eeecbbb622120f7ab ChangeLog 15142
+RMD160 98d6ef93769278a1473a2813b20573370fb80fd0 ChangeLog 15142
+SHA256 7b5badac07d663531ba42fee62431bf0a19408df108037abb6fcc93b1105f542 ChangeLog 15142
 MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92
 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 metadata.xml 164
@@ -73,10 +85,13 @@ SHA256 3c06b90149690c7de5586cf6a94dd561580b511eb40d33533aa5e9460a42cb47 files/di
 MD5 9260305e16fda8ca7362cceb0cb5ad02 files/digest-man-1.6e 226
 RMD160 9d9e3022e704e8ebbee6ab33f2f6b9357ffb0fe6 files/digest-man-1.6e 226
 SHA256 450b990513ad7cf341ba6ba412d2ba0d380e11daa1f76fc70290fbbe40b88431 files/digest-man-1.6e 226
+MD5 9260305e16fda8ca7362cceb0cb5ad02 files/digest-man-1.6e-r1 226
+RMD160 9d9e3022e704e8ebbee6ab33f2f6b9357ffb0fe6 files/digest-man-1.6e-r1 226
+SHA256 450b990513ad7cf341ba6ba412d2ba0d380e11daa1f76fc70290fbbe40b88431 files/digest-man-1.6e-r1 226
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.6 (GNU/Linux)
+Version: GnuPG v2.0.1 (GNU/Linux)
 
-iD8DBQFFkpxp8bi6rjpTunYRAvgmAKCH3uMomGkSoVRbNwt2MOf4wNQidQCgsuhr
-jaFVFZfnltSPHaioHP5zhIU=
-=vULt
+iD8DBQFFnvy28bi6rjpTunYRAppMAJ46GIUKIvCERpGh+/2knq9W2xVQPwCeJhSm
+EYIxyZ8yiJXpkqkgou6SqXQ=
+=f3Kt
 -----END PGP SIGNATURE-----
diff --git a/sys-apps/man/files/digest-man-1.6e-r1 b/sys-apps/man/files/digest-man-1.6e-r1
new file mode 100644 (file)
index 0000000..69ec127
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 d8187cd756398baefc48ba7d60ff6a8a man-1.6e.tar.gz 252657
+RMD160 486099dc1b34fe86a2c1d19b7c89dc19b9787837 man-1.6e.tar.gz 252657
+SHA256 022faf23844eabb3662eabb105836925dd83bedda10271e2450a5bc5b61a5b5f man-1.6e.tar.gz 252657
index 6bcf1105e5f93d3564067825a326841a0670ea7c..bef5ea6d1e2db719d355b1da6cdedf3659319a8a 100644 (file)
@@ -2,4 +2,4 @@
 # this is part of the man package
 # it updates the search database for manpages
 
-exec /bin/nice /usr/sbin/makewhatis -u
+exec nice makewhatis -u
diff --git a/sys-apps/man/files/man-1.6e-dont-kill-shebangs.patch b/sys-apps/man/files/man-1.6e-dont-kill-shebangs.patch
new file mode 100644 (file)
index 0000000..dbbc243
--- /dev/null
@@ -0,0 +1,25 @@
+http://bugs.gentoo.org/159192
+
+--- configure
++++ configure
+@@ -1250,6 +1250,7 @@
+ allargs='$@'
+ infiles='$infiles'
+ infile='$infile'
++shebang='`sed -n -e 1p $infile.in`'
+ cb='$cb'
+ cs='$cs'
+ ce='$ce'
+@@ -1273,7 +1274,11 @@
+   *.1|*.5|*.8|*.man)
+     cb=$mancomment; cs=$mancomment; ce=$mancomment;;
+   *)
+-    cb="#"; cs="#"; ce="#";;
++    case "$shebang" in
++    '#!'*) cb="$shebang";;
++    *)     cb="#";;
++    esac
++    cs="#"; ce="#";;
+   esac
+   echo "$cb"                                                    > $infile
+   echo "$cs Generated automatically from $infile.in by the"     >> $infile
diff --git a/sys-apps/man/files/man-1.6e-headers.patch b/sys-apps/man/files/man-1.6e-headers.patch
new file mode 100644 (file)
index 0000000..9c6fd6f
--- /dev/null
@@ -0,0 +1,13 @@
+--- gencat/genlib.c
++++ gencat/genlib.c
+@@ -49,10 +49,8 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-#ifdef SYSV
+ #include <sys/types.h>
+ #include <unistd.h>
+-#endif
+ #if !defined(__linux__) && !defined(__FreeBSD__)
+ #include <memory.h>
diff --git a/sys-apps/man/man-1.6e-r1.ebuild b/sys-apps/man/man-1.6e-r1.ebuild
new file mode 100644 (file)
index 0000000..a868bdb
--- /dev/null
@@ -0,0 +1,124 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/man/man-1.6e-r1.ebuild,v 1.1 2007/01/06 01:34:35 vapier Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Standard commands to read man pages"
+HOMEPAGE="http://primates.ximian.com/~flucifredi/man/"
+SRC_URI="http://primates.ximian.com/~flucifredi/man/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="nls"
+
+DEPEND="nls? ( sys-devel/gettext )"
+DEPEND=">=sys-apps/groff-1.18
+       !sys-apps/man-db"
+PROVIDE="virtual/man"
+
+pkg_setup() {
+       enewgroup man 15
+       enewuser man 13 -1 /usr/share/man man
+}
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+
+       # We love to cross-compile
+       epatch "${FILESDIR}"/man-1.6-cross-compile.patch
+
+       # Fix search order in man.conf so that system installed manpages
+       # will be found first ...
+       epatch "${FILESDIR}"/man-1.5p-search-order.patch
+
+       # For groff-1.18 or later we need to call nroff with '-c'
+       epatch "${FILESDIR}"/man-1.5m-groff-1.18.patch
+
+       # makewhatis traverses manpages twice, as default manpath
+       # contains two directories that are symlinked together
+       epatch "${FILESDIR}"/man-1.5p-defmanpath-symlinks.patch
+
+       # add more sections to default search path
+       epatch "${FILESDIR}"/man-1.6b-more-sections.patch
+
+       # cut out symlinked paths #90186
+       epatch "${FILESDIR}"/man-1.6c-cut-duplicate-manpaths.patch
+
+       # Fedora patches
+       epatch "${FILESDIR}"/man-1.5m2-apropos.patch
+
+       # Fixes compilation in FreeBSD wrt #138123
+       epatch "${FILESDIR}"/man-1.6d-fbsd.patch
+
+       epatch "${FILESDIR}"/man-1.6e-dont-kill-shebangs.patch #159192
+       epatch "${FILESDIR}"/man-1.6e-headers.patch
+
+       strip-linguas $(eval $(grep ^LANGUAGES= configure) ; echo ${LANGUAGES//,/ })
+}
+
+src_compile() {
+       tc-export CC BUILD_CC
+
+       local mylang=
+       if use nls ; then
+               if [[ -z ${LINGUAS} ]] ; then
+                       mylang="all"
+               else
+                       mylang="${LINGUAS// /,}"
+               fi
+       else
+               mylang="none"
+       fi
+       ./configure \
+               -confdir=/etc \
+               +sgid +fhs \
+               +lang ${mylang} \
+               || die "configure failed"
+
+       append-ldflags $(bindnow-flags)
+       emake || die "emake failed"
+}
+
+src_install() {
+       emake PREFIX="${D}" install || die "make install failed"
+       dosym man /usr/bin/manpath
+
+       dodoc LSM README* TODO
+
+       # makewhatis only adds man-pages from the last 24hrs
+       exeinto /etc/cron.daily
+       newexe "${FILESDIR}"/makewhatis.cron makewhatis
+
+       keepdir /var/cache/man
+       diropts -m0775 -g man
+       local mansects=$(grep ^MANSECT "${D}"/etc/man.conf | cut -f2-)
+       for x in ${mansects//:/ } ; do
+               keepdir /var/cache/man/cat${x}
+       done
+}
+
+pkg_postinst() {
+       einfo "Forcing sane permissions onto ${ROOT}/var/cache/man (Bug #40322)"
+       chown -R root:man "${ROOT}"/var/cache/man
+       chmod -R g+w "${ROOT}"/var/cache/man
+       [[ -e ${ROOT}/var/cache/man/whatis ]] \
+               && chown root:0 "${ROOT}"/var/cache/man/whatis
+
+       echo
+
+       local f files=$(ls "${ROOT}"/etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+       for f in ${files} ; do
+               [[ ${f} == */etc/cron.daily/makewhatis ]] && continue
+               [[ $(md5sum "${f}") == "8b2016cc778ed4e2570b912c0f420266 "* ]] \
+                       && rm -f "${f}"
+       done
+       files=$(ls "${ROOT}"/etc/cron.{daily,weekly}/makewhatis{,.cron} 2>/dev/null)
+       if [[ ${files/$'\n'} != ${files} ]] ; then
+               ewarn "You have multiple makewhatis cron files installed."
+               ewarn "You might want to delete all but one of these:"
+               ewarn ${files}
+       fi
+}