diff options
Diffstat (limited to 'dev-util/monotone')
-rw-r--r-- | dev-util/monotone/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/monotone/files/digest-monotone-0.16 | 2 | ||||
-rw-r--r-- | dev-util/monotone/files/digest-monotone-0.18 | 2 | ||||
-rw-r--r-- | dev-util/monotone/files/digest-monotone-0.19 | 2 | ||||
-rw-r--r-- | dev-util/monotone/files/digest-monotone-0.29 | 3 | ||||
-rw-r--r-- | dev-util/monotone/files/hooks.lua | 4 | ||||
-rw-r--r-- | dev-util/monotone/files/monotone.confd | 26 | ||||
-rwxr-xr-x | dev-util/monotone/files/monotone.initd | 80 | ||||
-rw-r--r-- | dev-util/monotone/files/read-permissions | 7 | ||||
-rw-r--r-- | dev-util/monotone/files/write-permissions | 2 | ||||
-rw-r--r-- | dev-util/monotone/monotone-0.29.ebuild | 111 |
11 files changed, 249 insertions, 1 deletions
diff --git a/dev-util/monotone/ChangeLog b/dev-util/monotone/ChangeLog index 155ac9ccc8b0..0c89514c597e 100644 --- a/dev-util/monotone/ChangeLog +++ b/dev-util/monotone/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-util/monotone # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/monotone/ChangeLog,v 1.26 2006/07/12 14:13:21 kugelfang Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/monotone/ChangeLog,v 1.27 2006/09/04 13:33:52 dragonheart Exp $ + +*monotone-0.29 (04 Sep 2006) + + 04 Sep 2006; Daniel Black <dragonheart@gentoo.org> +files/hooks.lua, + +files/monotone.confd, +files/monotone.initd, +files/read-permissions, + +files/write-permissions, +monotone-0.29.ebuild: + version bump as per bug #131044. Thanks to the many many many people who + have endured my slowness and contributed to the concoction that is this + ebuild and scripts 12 Jul 2006; Danny van Dyk <kugelfang@gentoo.org> monotone-0.16.ebuild: QA: Added doc to IUSE. diff --git a/dev-util/monotone/files/digest-monotone-0.16 b/dev-util/monotone/files/digest-monotone-0.16 index 2ed7e567a983..fb7bd42c158f 100644 --- a/dev-util/monotone/files/digest-monotone-0.16 +++ b/dev-util/monotone/files/digest-monotone-0.16 @@ -1 +1,3 @@ MD5 66fe3f50a8fe621afc8f355b25201ecb monotone-0.16.tar.gz 3438625 +RMD160 cf59d85d24b6428888a533b07ffcf372ea4ab0fb monotone-0.16.tar.gz 3438625 +SHA256 103eebcbeafb36c3bd21941ea29a09511c2159ab02976ab01343a98b51f96f71 monotone-0.16.tar.gz 3438625 diff --git a/dev-util/monotone/files/digest-monotone-0.18 b/dev-util/monotone/files/digest-monotone-0.18 index 98e2dbdb8cae..81d558ed2f75 100644 --- a/dev-util/monotone/files/digest-monotone-0.18 +++ b/dev-util/monotone/files/digest-monotone-0.18 @@ -1 +1,3 @@ MD5 16a8f0cce9d219311d75e2b913d0fabc monotone-0.18.tar.gz 3989250 +RMD160 293b194b11aa9e846ea699fd85e5d2243764363c monotone-0.18.tar.gz 3989250 +SHA256 4f4b03e3bc3201a33e0f4dca6cbe3acdfb7f20b22bcf46fa8d58abf80e223342 monotone-0.18.tar.gz 3989250 diff --git a/dev-util/monotone/files/digest-monotone-0.19 b/dev-util/monotone/files/digest-monotone-0.19 index f4794e1f3f0b..7bb0e20170b6 100644 --- a/dev-util/monotone/files/digest-monotone-0.19 +++ b/dev-util/monotone/files/digest-monotone-0.19 @@ -1 +1,3 @@ MD5 aa549380068613dc04ef5d084bec1b1f monotone-0.19.tar.gz 4796447 +RMD160 9bcc5f9a5d03b452f49e4d6dacda682e1f3f6a64 monotone-0.19.tar.gz 4796447 +SHA256 974eba10318244e24d334bdd42c838c88b66cd3b77ce7c370b22187a4204a672 monotone-0.19.tar.gz 4796447 diff --git a/dev-util/monotone/files/digest-monotone-0.29 b/dev-util/monotone/files/digest-monotone-0.29 new file mode 100644 index 000000000000..04e9c342d918 --- /dev/null +++ b/dev-util/monotone/files/digest-monotone-0.29 @@ -0,0 +1,3 @@ +MD5 2261177af47621902c97719b94756994 monotone-0.29.tar.gz 4544609 +RMD160 00222f51b8888e1388fe6c0a29e9168eeafcf859 monotone-0.29.tar.gz 4544609 +SHA256 9ccda631303c96a2d6101ee1cfbc320de2de0ecb4e6503b573e29933ce68512d monotone-0.29.tar.gz 4544609 diff --git a/dev-util/monotone/files/hooks.lua b/dev-util/monotone/files/hooks.lua new file mode 100644 index 000000000000..bbdb0042a5f6 --- /dev/null +++ b/dev-util/monotone/files/hooks.lua @@ -0,0 +1,4 @@ +-- Add custom hooks after the following line. It includes the identification +-- needed to start the server. + +include(get_confdir() .. "/passphrase.lua") diff --git a/dev-util/monotone/files/monotone.confd b/dev-util/monotone/files/monotone.confd new file mode 100644 index 000000000000..acac7d54cb52 --- /dev/null +++ b/dev-util/monotone/files/monotone.confd @@ -0,0 +1,26 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/monotone/files/monotone.confd,v 1.1 2006/09/04 13:33:52 dragonheart Exp $ + +# The commented variables in this file are the defaults that are used + +# in the init-script. You don't need to uncomment them except to +# customize them to different values. + +# Location of the served database +#MTN_DB="/var/lib/monotone/default.mtn" + +# Server identification +#MTN_KEY="monotone@`hostname --fqdn`" +#MTN_PWD="" + +# User and group as which to run monotone +#MTN_USER="monotone" +#MTN_GROUP="monotone" + +# The address and or port (ADDRESS[:PORT]) monotone should listen on +#MTN_ADDRESS=0.0.0.0 + +# Advanced options +#MTN_CONFDIR=/etc/monotone +#MTN_KEYDIR=/var/lib/monotone/keys diff --git a/dev-util/monotone/files/monotone.initd b/dev-util/monotone/files/monotone.initd new file mode 100755 index 000000000000..f31ad1c74f01 --- /dev/null +++ b/dev-util/monotone/files/monotone.initd @@ -0,0 +1,80 @@ +#!/sbin/runscript +# Copyright 2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/dev-util/monotone/files/monotone.initd,v 1.1 2006/09/04 13:33:52 dragonheart Exp $ + +opts="import" + +depend() { + need net +} + +# Substitute common default values +MTN_KEY=${MTN_KEY:-monotone@`hostname --fqdn`} +MTN_CONFDIR=${MTN_CONFDIR:-/etc/monotone} +MTN_COMMON="--norc --confdir=${MTN_CONFDIR} \ + --keydir=${MTN_KEYDIR:-/var/lib/monotone/keys} \ + --db=${MTN_DB:-/var/lib/monotone/default.mtn} \ + --rcfile=${MTN_CONFDIR}/hooks.lua --log=/var/log/monotone/monotone.log" + #--dump=$ERRORLOG +MTN_PIDFILE="/var/run/monotone/monotone.pid" + +dbexists() { + # Create the database if it doesn't exist + if [ ! -e ${MTN_DB:-/var/lib/monotone/default.mtn} ]; then + ebegin "Creating monotone database" + start-stop-daemon --start \ + --chuid ${MTN_USER:-monotone}:${MTN_GROUP:-monotone} \ + --exec /usr/bin/mtn -- ${MTN_COMMON} db init + eend $? + fi + if [ ! -e ${MTN_KEYDIR:-/var/lib/monotone/keys}/${MTN_KEY} ]; then + ebegin "Creating monotone server keypair" + export MTN_PWD=${RANDOM} + yes "${MTN_PWD}" | \ + start-stop-daemon --start \ + --chuid ${MTN_USER:-monotone}:${MTN_GROUP:-monotone} \ + --exec /usr/bin/mtn -- ${MTN_COMMON} genkey ${MTN_KEY} + + eend $? + # Update the password lua hook + cat > ${MTN_CONFDIR}/passphrase.lua <<EOF +-- This file is automaticaly generated by the init scripts. +-- If you want to add custom hooks, edit ${MTN_CONFDIR}/hooks.lua +-- If you want to change the settings, please edit /etc/conf.d/monotone + +function get_passphrase(identity) + if (identity == "${MTN_KEY}") then + return "${MTN_PWD}" + end + return false +end +EOF + fi +} + +start() { + dbexists + + ebegin "Starting monotone server" + start-stop-daemon --start --background \ + --chuid ${MTN_USER:-monotone}:${MTN_GROUP:-monotone} \ + --exec /usr/bin/mtn -- ${MTN_COMMON} --pid-file=${MTN_PIDFILE} \ + --key=${MTN_KEY} --bind=${MTN_ADDRESS:-0.0.0.0} serve "*" + eend $? +} + +stop() { + ebegin "Stopping monotone server" + start-stop-daemon --stop --quiet --pidfile ${MTN_PIDFILE} + eend $? +} + +import() { + dbexists + + # Read packets into the database + einfo "Importing packets to monotone database" + cat | /usr/bin/mtn ${MTN_COMMON} read + eend $? +} diff --git a/dev-util/monotone/files/read-permissions b/dev-util/monotone/files/read-permissions new file mode 100644 index 000000000000..d08200aa0059 --- /dev/null +++ b/dev-util/monotone/files/read-permissions @@ -0,0 +1,7 @@ +pattern "net.example.project.{private,security}*" +allow "joe@example.net" +allow "jim@example.net" + +comment "everyone can read these branches" +pattern "net.example.{public,project}*" +allow "*" diff --git a/dev-util/monotone/files/write-permissions b/dev-util/monotone/files/write-permissions new file mode 100644 index 000000000000..1b138c7fc6c0 --- /dev/null +++ b/dev-util/monotone/files/write-permissions @@ -0,0 +1,2 @@ +joe@example.net +jim@example.net diff --git a/dev-util/monotone/monotone-0.29.ebuild b/dev-util/monotone/monotone-0.29.ebuild new file mode 100644 index 000000000000..9b9b37619ad7 --- /dev/null +++ b/dev-util/monotone/monotone-0.29.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/monotone/monotone-0.29.ebuild,v 1.1 2006/09/04 13:33:52 dragonheart Exp $ + +inherit elisp-common flag-o-matic bash-completion eutils + +DESCRIPTION="Monotone Distributed Version Control System" +HOMEPAGE="http://www.venge.net/monotone/" +SRC_URI="http://www.venge.net/${PN}/downloads/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="1" +KEYWORDS="~amd64 ~ia64 ~ppc ~x86" + +IUSE="doc emacs ipv6 nls" + +RDEPEND=">=dev-libs/boost-1.32.1 + sys-libs/zlib + emacs? ( virtual/emacs )" + +DEPEND="${RDEPEND} + >=sys-devel/gcc-3.2 + nls? ( >=sys-devel/gettext-0.11.5 ) + doc? ( sys-apps/texinfo )" + + +pkg_setup() { + enewgroup monotone + enewuser monotone -1 -1 /var/lib/monotone monotone +} + +src_compile() { + local myconf="$(use_enable nls) \ + $(use_enable ipv6)" + + # more aggressive optimizations cause trouble with the crypto library + strip-flags + append-flags $(test-flags -fno-stack-protector-all -fno-stack-protector) + append-flags -fno-strict-aliasing -fno-omit-frame-pointer + + econf ${myconf} || die "configure failed" + emake || die "Compilation failed" + + if use doc; then + make html || die 'html compilation failed' + fi + + use emacs && elisp-compile contrib/*.el +} + +src_test() { + make check || die "self test failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "Installation failed" + + mv "${D}"/usr/share/doc/"${PN}" "${D}"/usr/share/doc/"${PF}" + + dobashcompletion contrib/monotone.bash_completion + + if use doc; then + dohtml -r html/* + dohtml -r figures + fi + + if use emacs; then + elisp-install ${PN} contrib/*.{el,elc} + elisp-site-file-install "${FILESDIR}"/30monotone-gentoo.el + fi + + dodoc ABOUT-NLS AUTHORS ChangeLog NEWS README* UPGRADE + docinto contrib + dodoc contrib/* + newconfd "${FILESDIR}"/monotone.confd monotone + newinitd "${FILESDIR}"/monotone.initd monotone + + insinto /etc/monotone ; + newins "${FILESDIR}"/hooks.lua hooks.lua + newins "${FILESDIR}"/read-permissions read-permissions + newins "${FILESDIR}"/write-permissions write-permissions + + keepdir /var/lib/monotone/keys/ /var/log/montone /var/run/montone + fowners monotone:monotone /var/lib/monotone /var/lib/monotone/keys/ \ + /var/log/monotone /var/run/montone +} + +pkg_postinst() { + use emacs && elisp-site-regen + bash-completion_pkg_postinst + + einfo + einfo "For details and instructions to upgrade from previous versions," + einfo "please read /usr/share/doc/${PF}/UPGRADE.gz" + einfo + einfo " 1. edit /etc/conf.d/monotone" + einfo " 2. import the first keys to enable access with" + einfo " env HOME=${homedir} mtn pubkey me@example.net | /etc/init.d/monotone import" + einfo " Thereafter, those with write permission can add other keys via" + einfo " netsync with 'monotone push --key-to-push=IDENT' and then IDENT" + einfo " can be used in the read-permission and write-permission files." + einfo " 3. adjust permisions in /etc/monotone/read-permissions" + einfo " and /etc/monotone/write-permissions" + einfo " 4. start the daemon: /etc/init.d/monotone start" + einfo " 5. make persistent: rc-update add monotone default" + einfo +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |