summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-11-24 01:08:06 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-11-24 01:08:06 +0000
commit3ed2a2791abef854c934d5487d5de0c293b9acd6 (patch)
tree29414230976ddcbcf73e9889bc5ffe3321770589 /dev-util/git
parentBump (diff)
downloadgentoo-2-3ed2a2791abef854c934d5487d5de0c293b9acd6.tar.gz
gentoo-2-3ed2a2791abef854c934d5487d5de0c293b9acd6.tar.bz2
gentoo-2-3ed2a2791abef854c934d5487d5de0c293b9acd6.zip
Fix bug #235393 for Emacs users. Fix bug #238351 for running the standalone init.d more safely as non-root and include the pidfile. Bug #247487, cvsserver now needs the Perl stuff. Bug #248446, fix htmldir support.
(Portage version: 2.2_rc14/cvs/Linux 2.6.28-rc5-00117-g7f0f598 x86_64)
Diffstat (limited to 'dev-util/git')
-rw-r--r--dev-util/git/ChangeLog12
-rw-r--r--dev-util/git/files/20081123-git-1.6.0.4-noperl-cvsserver.patch20
-rw-r--r--dev-util/git/files/50git-gentoo.el13
-rw-r--r--dev-util/git/files/git-daemon.confd13
-rw-r--r--dev-util/git/files/git-daemon.initd10
-rw-r--r--dev-util/git/git-1.6.0.4-r1.ebuild300
6 files changed, 361 insertions, 7 deletions
diff --git a/dev-util/git/ChangeLog b/dev-util/git/ChangeLog
index 400af1ef6031..9d08048c6152 100644
--- a/dev-util/git/ChangeLog
+++ b/dev-util/git/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for dev-util/git
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.299 2008/11/18 11:05:51 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/git/ChangeLog,v 1.300 2008/11/24 01:08:06 robbat2 Exp $
+
+*git-1.6.0.4-r1 (24 Nov 2008)
+
+ 24 Nov 2008; Robin H. Johnson <robbat2@gentoo.org> +files/50git-gentoo.el,
+ +files/20081123-git-1.6.0.4-noperl-cvsserver.patch,
+ files/git-daemon.confd, files/git-daemon.initd, +git-1.6.0.4-r1.ebuild:
+ Fix bug #235393 for Emacs users. Fix bug #238351 for running the
+ standalone init.d more safely as non-root and include the pidfile. Bug
+ #247487, cvsserver now needs the Perl stuff. Bug #248446, fix htmldir
+ support.
*git-1.6.0.4 (18 Nov 2008)
diff --git a/dev-util/git/files/20081123-git-1.6.0.4-noperl-cvsserver.patch b/dev-util/git/files/20081123-git-1.6.0.4-noperl-cvsserver.patch
new file mode 100644
index 000000000000..3412584576c5
--- /dev/null
+++ b/dev-util/git/files/20081123-git-1.6.0.4-noperl-cvsserver.patch
@@ -0,0 +1,20 @@
+# Patch for Gentoo bug #247487
+
+# git-cvsserver is not present when NO_PERL is set in Makefile which breaks
+# install target...
+
+--- git-1.6.0.4/Makefile
++++ git-1.6.0.4/Makefile
+@@ -1376,10 +1376,11 @@
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
+ $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+ $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
+- $(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X git-cvsserver '$(DESTDIR_SQ)$(bindir_SQ)'
++ $(INSTALL) git$X git-upload-pack$X git-receive-pack$X git-upload-archive$X git-shell$X '$(DESTDIR_SQ)$(bindir_SQ)'
+ $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
+ ifndef NO_PERL
+ $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
++ $(INSTALL) git-cvsserver '$(DESTDIR_SQ)$(bindir_SQ)'
+ endif
+ ifndef NO_TCLTK
+ $(MAKE) -C gitk-git install
diff --git a/dev-util/git/files/50git-gentoo.el b/dev-util/git/files/50git-gentoo.el
new file mode 100644
index 000000000000..42edd7714f07
--- /dev/null
+++ b/dev-util/git/files/50git-gentoo.el
@@ -0,0 +1,13 @@
+
+;;; dev-util/git site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'git-status "git" "Entry point into git-status mode." t)
+;;(autoload 'git-blame-mode "git-blame"
+;; "Minor mode for incremental blame for Git." t)
+
+;; GNU Emacs >=22.2 already includes vc-git.el.
+;; Enable the following only if Emacs has no GIT support.
+(unless (fboundp 'vc-git-registered)
+ (add-to-list 'load-path "@SITELISP@/compat")
+ (add-to-list 'vc-handled-backends 'GIT))
diff --git a/dev-util/git/files/git-daemon.confd b/dev-util/git/files/git-daemon.confd
index ace9cbd85bfd..75b421680c80 100644
--- a/dev-util/git/files/git-daemon.confd
+++ b/dev-util/git/files/git-daemon.confd
@@ -1,12 +1,19 @@
# conf.d file for git-daemon
#
# Please check man 1 git-daemon for more information about the options
-# git-daemon accepts.
+# git-daemon accepts. You MUST edit this to include your repositories you wish
+# to serve.
#
-# Meaningful options are:
+# Some of the meaningful options are:
# --syslog --- Enables syslog logging
# --verbose --- Enables verbose logging
# --export-all --- Exports all repositories
# --port=XXXX --- Starts in port XXXX instead of 9418
#
-GITDAEMON_OPTS="--syslog"
+GITDAEMON_OPTS="--syslog /var/git"
+
+# To run an anonymous git safely, the following user should be able to only
+# read your Git repositories. It should not able able to write to anywhere on
+# your system, esp. not the repositories.
+GIT_USER="nobody"
+GIT_GROUP="nobody"
diff --git a/dev-util/git/files/git-daemon.initd b/dev-util/git/files/git-daemon.initd
index 60ccba02d2d9..07650ea6ff9b 100644
--- a/dev-util/git/files/git-daemon.initd
+++ b/dev-util/git/files/git-daemon.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/git/files/git-daemon.initd,v 1.3 2008/09/16 17:52:15 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/git/files/git-daemon.initd,v 1.4 2008/11/24 01:08:06 robbat2 Exp $
depend() {
need net
@@ -11,12 +11,16 @@ depend() {
start() {
ebegin "Starting git-daemon"
start-stop-daemon --start --quiet --background \
- --exec /usr/bin/git -- daemon ${GITDAEMON_OPTS}
+ --exec /usr/bin/git/git -- daemon \
+ --pid-file=/var/run/git-daemon.pid \
+ --user=${GIT_USER} --group=${GIT_GROUP} \
+ ${GITDAEMON_OPTS}
eend $?
}
stop() {
ebegin "Stopping git-daemon"
- start-stop-daemon --stop --quiet --name git-daemon
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/git-daemon.pid
eend $?
}
diff --git a/dev-util/git/git-1.6.0.4-r1.ebuild b/dev-util/git/git-1.6.0.4-r1.ebuild
new file mode 100644
index 000000000000..be0923c3d20f
--- /dev/null
+++ b/dev-util/git/git-1.6.0.4-r1.ebuild
@@ -0,0 +1,300 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/git/git-1.6.0.4-r1.ebuild,v 1.1 2008/11/24 01:08:06 robbat2 Exp $
+
+inherit toolchain-funcs eutils elisp-common perl-module bash-completion
+
+MY_PV="${PV/_rc/.rc}"
+MY_P="${PN}-${MY_PV}"
+
+DOC_VER=${MY_PV}
+
+DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
+HOMEPAGE="http://git.or.cz/"
+SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2
+ mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2
+ doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="curl cgi doc emacs gtk iconv mozsha1 perl ppcsha1 tk threads webdav xinetd cvs subversion vim-syntax"
+
+DEPEND="
+ !app-misc/git
+ dev-libs/openssl
+ sys-libs/zlib
+ app-arch/cpio
+ perl? ( dev-lang/perl )
+ tk? ( dev-lang/tk )
+ curl? (
+ net-misc/curl
+ webdav? ( dev-libs/expat )
+ )
+ emacs? ( virtual/emacs )"
+
+RDEPEND="${DEPEND}
+ perl? ( dev-perl/Error
+ dev-perl/Net-SMTP-SSL
+ dev-perl/Authen-SASL
+ cgi? ( virtual/perl-CGI )
+ cvs? ( >=dev-util/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
+ subversion? ( dev-util/subversion dev-perl/libwww-perl dev-perl/TermReadKey )
+ )
+ gtk? ( >=dev-python/pygtk-2.8 )"
+
+SITEFILE=50${PN}-gentoo.el
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if ! use perl ; then
+ use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
+ use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
+ use subversion && ewarn "git-svn needs USE=perl, it won't work"
+ fi
+ if use webdav && ! use curl ; then
+ ewarn "USE=webdav needs USE=curl. Ignoring"
+ fi
+}
+
+# This is needed because for some obscure reasons future calls to make don't
+# pick up these exports if we export them in src_unpack()
+exportmakeopts() {
+ local myopts
+
+ if use mozsha1 ; then
+ myopts="${myopts} MOZILLA_SHA1=YesPlease"
+ elif use ppcsha1 ; then
+ myopts="${myopts} PPC_SHA1=YesPlease"
+ fi
+
+ if use curl ; then
+ use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
+ else
+ myopts="${myopts} NO_CURL=YesPlease"
+ fi
+
+ use iconv || myopts="${myopts} NO_ICONV=YesPlease"
+ use tk || myopts="${myopts} NO_TCLTK=YesPlease"
+ use perl || myopts="${myopts} NO_PERL=YesPlease"
+ use threads && myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
+ use subversion || myopts="${myopts} NO_SVN_TESTS=YesPlease"
+
+ export MY_MAKEOPTS="${myopts}"
+}
+
+src_unpack() {
+ unpack ${MY_P}.tar.bz2
+ cd "${S}"
+ unpack ${PN}-manpages-${DOC_VER}.tar.bz2
+ use doc && \
+ cd "${S}"/Documentation && \
+ unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2
+ cd "${S}"
+
+ epatch "${FILESDIR}"/20080626-git-1.5.6.1-noperl.patch
+ epatch "${FILESDIR}"/20081123-git-1.6.0.4-noperl-cvsserver.patch
+
+ sed -i \
+ -e "s:^\(CFLAGS =\).*$:\1 ${CFLAGS} -Wall:" \
+ -e "s:^\(LDFLAGS =\).*$:\1 ${LDFLAGS}:" \
+ -e "s:^\(CC = \).*$:\1$(tc-getCC):" \
+ -e "s:^\(AR = \).*$:\1$(tc-getAR):" \
+ Makefile || die "sed failed"
+
+ exportmakeopts
+}
+
+src_compile() {
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ htmldir=/usr/share/doc/${PF}/html \
+ || die "make failed"
+
+ if use emacs ; then
+ elisp-compile contrib/emacs/{,vc-}git.el || die "emacs modules failed"
+ fi
+ if use perl && use cgi ; then
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ htmldir=/usr/share/doc/${PF}/html \
+ gitweb/gitweb.cgi || die "make gitweb/gitweb.cgi failed"
+ fi
+}
+
+src_install() {
+ emake ${MY_MAKEOPTS} \
+ DESTDIR="${D}" \
+ prefix=/usr \
+ htmldir=/usr/share/doc/${PF}/html \
+ install || \
+ die "make install failed"
+
+ doman man?/*
+
+ dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
+ use doc && dodir /usr/share/doc/${PF}/html
+ for d in / /howto/ /technical/ ; do
+ docinto ${d}
+ dodoc Documentation${d}*.txt
+ use doc && dohtml -p ${d} Documentation${d}*.html
+ done
+ docinto /
+
+ dobashcompletion contrib/completion/git-completion.bash ${PN}
+
+ if use emacs ; then
+ elisp-install ${PN} contrib/emacs/git.{el,elc} || die
+ elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
+ # don't add automatically to the load-path, so the sitefile
+ # can do a conditional loading
+ touch "${D}${SITELISP}/${PN}/compat/.nosearch"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+ fi
+
+ if use gtk ; then
+ dobin "${S}"/contrib/gitview/gitview
+ dodoc "${S}"/contrib/gitview/gitview.txt
+ fi
+
+ dobin contrib/fast-import/git-p4
+ dodoc contrib/fast-import/git-p4.txt
+ newbin contrib/fast-import/import-tars.perl import-tars
+
+ if use vim-syntax ; then
+ insinto /usr/share/vim/vimfiles/syntax/
+ doins contrib/vim/syntax/gitcommit.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ newins "${FILESDIR}"/vim-ftdetect-gitcommit.vim gitcommit.vim
+ fi
+
+ dodir /usr/share/${PN}/contrib
+ # The following are excluded:
+ # svnimport - use git-svn
+ # p4import - excluded because fast-import has a better one
+ # examples - these are stuff that is not used in Git anymore actually
+ # patches - stuff the Git guys made to go upstream to other places
+ for i in continuous fast-import hg-to-git \
+ hooks remotes2config.sh stats \
+ workdir convert-objects blameview ; do
+ cp -rf \
+ "${S}"/contrib/${i} \
+ "${D}"/usr/share/${PN}/contrib \
+ || die "Failed contrib ${i}"
+ done
+
+ if use perl && use cgi ; then
+ dodir /usr/share/${PN}/gitweb
+ insinto /usr/share/${PN}/gitweb
+ doins "${S}"/gitweb/gitweb.cgi
+ doins "${S}"/gitweb/gitweb.css
+ doins "${S}"/gitweb/git-{favicon,logo}.png
+
+ # Make sure it can run
+ fperms 0755 /usr/share/${PN}/gitweb/gitweb.cgi
+
+ # INSTALL discusses configuration issues, not just installation
+ docinto /
+ newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
+ newdoc "${S}"/gitweb/README README.gitweb
+ fi
+ if ! use subversion ; then
+ rm -f "${D}"/usr/libexec/git-core/git-svn \
+ "${D}"/usr/share/man/man1/git-svn.1*
+ fi
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/git-daemon.xinetd git-daemon
+ fi
+
+ newinitd "${FILESDIR}"/git-daemon.initd git-daemon
+ newconfd "${FILESDIR}"/git-daemon.confd git-daemon
+
+ fixlocalpod
+}
+
+src_test() {
+ local disabled=""
+ local tests_cvs="t9200-git-cvsexportcommit.sh \
+ t9400-git-cvsserver-server.sh \
+ t9600-cvsimport.sh"
+ local tests_perl="t5502-quickfetch.sh \
+ t5512-ls-remote.sh \
+ t5520-pull.sh"
+
+ # Unzip is used only for the testcase code, not by any normal parts of Git.
+ if ! has_version app-arch/unzip ; then
+ einfo "Disabling tar-tree tests"
+ disabled="${disabled} t5000-tar-tree.sh"
+ fi
+
+ cvs=0
+ use cvs && let cvs=$cvs+1
+ if ! has userpriv "${FEATURES}"; then
+ if [[ $cvs -eq 1 ]]; then
+ ewarn "Skipping CVS tests because CVS does not work as root!"
+ ewarn "You should retest with FEATURES=userpriv!"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ # Bug #225601 - t0004 is not suitable for root perm
+ # Bug #219839 - t1004 is not suitable for root perm
+ disabled="${disabled} t0004-unwritable.sh t1004-read-tree-m-u-wf.sh"
+ else
+ [[ $cvs -gt 0 ]] && \
+ has_version dev-util/cvs && \
+ let cvs=$cvs+1
+ [[ $cvs -gt 0 ]] && \
+ built_with_use dev-util/cvs server && \
+ let cvs=$cvs+1
+ if [[ $cvs -lt 3 ]]; then
+ einfo "Disabling CVS tests (needs dev-util/cvs[USE=server])"
+ disabled="${disabled} ${tests_cvs}"
+ fi
+ fi
+
+ if ! use perl ; then
+ einfo "Disabling tests that need Perl"
+ disabled="${disabled} ${tests_perl}"
+ fi
+
+ # Reset all previously disabled tests
+ cd "${S}/t"
+ for i in *.sh.DISABLED ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
+ done
+ einfo "Disabled tests:"
+ for i in ${disabled} ; do
+ [[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
+ done
+ cd "${S}"
+ # Now run the tests
+ einfo "Start test run"
+ emake ${MY_MAKEOPTS} DESTDIR="${D}" prefix=/usr test || die "tests failed"
+}
+
+showpkgdeps() {
+ local pkg=$1
+ shift
+ elog " $(printf "%-17s:" ${pkg}) ${@}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ if use subversion && ! built_with_use dev-util/subversion perl ; then
+ ewarn "You must build dev-util/subversion with USE=perl"
+ ewarn "to get the full functionality of git-svn!"
+ fi
+ elog "These additional scripts need some dependencies:"
+ echo
+ showpkgdeps git-quiltimport "dev-util/quilt"
+ showpkgdeps git-instaweb \
+ "|| ( www-servers/lighttpd www-servers/apache )"
+ echo
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}