summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-07-07 22:53:12 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-07-07 22:53:12 +0000
commit357b87524e09bc971d7b513b2f7efd64726918c3 (patch)
tree96a273165e729d1d85dcd9b90544823cb69a10e5 /sys-block/partimage
parentAdd missing Manifest entries for redmine-0.9.5.ebuild and redmine-0.9.5.tar.gz. (diff)
downloadgentoo-2-357b87524e09bc971d7b513b2f7efd64726918c3.tar.gz
gentoo-2-357b87524e09bc971d7b513b2f7efd64726918c3.tar.bz2
gentoo-2-357b87524e09bc971d7b513b2f7efd64726918c3.zip
Version bump.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-block/partimage')
-rw-r--r--sys-block/partimage/ChangeLog8
-rw-r--r--sys-block/partimage/files/partimage-0.6.8-destdir.patch11
-rw-r--r--sys-block/partimage/partimage-0.6.8.ebuild137
3 files changed, 155 insertions, 1 deletions
diff --git a/sys-block/partimage/ChangeLog b/sys-block/partimage/ChangeLog
index edfd567e0540..6e20fe90c8ab 100644
--- a/sys-block/partimage/ChangeLog
+++ b/sys-block/partimage/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-block/partimage
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/ChangeLog,v 1.42 2010/06/02 06:24:04 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/ChangeLog,v 1.43 2010/07/07 22:53:12 ssuominen Exp $
+
+*partimage-0.6.8 (07 Jul 2010)
+
+ 07 Jul 2010; Samuli Suominen <ssuominen@gentoo.org>
+ +partimage-0.6.8.ebuild, +files/partimage-0.6.8-destdir.patch:
+ Version bump.
02 Jun 2010; Torsten Veller <tove@gentoo.org> metadata.xml:
Remove xmerlin from metadata.xml (#69210)
diff --git a/sys-block/partimage/files/partimage-0.6.8-destdir.patch b/sys-block/partimage/files/partimage-0.6.8-destdir.patch
new file mode 100644
index 000000000000..12eb8c43c5a6
--- /dev/null
+++ b/sys-block/partimage/files/partimage-0.6.8-destdir.patch
@@ -0,0 +1,11 @@
+--- Makefile.am
++++ Makefile.am
+@@ -48,7 +48,7 @@
+ $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+ echo -n "#add only users allowed to " >> \
+ $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+- echo "connect partimaged" >> ${sysconfdir}/partimaged/partimagedusers ;\
++ echo "connect partimaged" >> $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+ echo "# (only one login per line)" >> \
+ $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
+ echo "" >> $(DESTDIR)${sysconfdir}/partimaged/partimagedusers ;\
diff --git a/sys-block/partimage/partimage-0.6.8.ebuild b/sys-block/partimage/partimage-0.6.8.ebuild
new file mode 100644
index 000000000000..1138133557dd
--- /dev/null
+++ b/sys-block/partimage/partimage-0.6.8.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/partimage-0.6.8.ebuild,v 1.1 2010/07/07 22:53:12 ssuominen Exp $
+
+EAPI=3
+inherit autotools eutils flag-o-matic pam
+
+DESCRIPTION="Console-based application to efficiently save raw partition data to an image file"
+HOMEPAGE="http://www.partimage.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="nls pam ssl static"
+
+LIBS_DEPEND="app-arch/bzip2
+ >=dev-libs/newt-0.52
+ >=sys-libs/slang-2
+ sys-libs/zlib
+ ssl? ( dev-libs/openssl )"
+PAM_DEPEND="!static? ( pam? ( virtual/pam ) )"
+RDEPEND="${PAM_DEPEND}
+ !static? ( ${LIBS_DEPEND} )"
+DEPEND="${PAM_DEPEND}
+ ${LIBS_DEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ enewgroup partimag 91
+ enewuser partimag 91 -1 /var/log/partimage partimag
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-destdir.patch
+ eautoreconf
+}
+
+src_configure() {
+ # XXX: Do we still need these?
+ filter-flags -fno-exceptions
+ use ppc && append-flags -fsigned-char
+
+ local myconf
+ if use pam && ! use static; then
+ myconf="--enable-pam"
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --sysconfdir="${EPREFIX}"/etc \
+ $(use_enable nls) \
+ --disable-dependency-tracking \
+ $(use_enable ssl) \
+ --disable-pam \
+ $(use_enable static all-static) \
+ --with-log-dir="${EPREFIX}"/var/log/partimage \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc BOOT-ROOT.txt FORMAT FUTURE THANKS
+ prepalldocs
+
+ keepdir /var/log/partimage
+
+ insinto /etc/partimaged
+ doins "${FILESDIR}"/servercert.cnf || die
+
+ newinitd "${FILESDIR}"/partimaged.init partimaged || die
+ newconfd "${FILESDIR}"/partimaged.conf partimaged || die
+
+ if use pam; then
+ newpamd "${FILESDIR}"/partimaged.pam partimaged || die
+ fi
+}
+
+confdir=${ROOT}etc/partimaged
+privkey=${confdir}/partimaged.key
+cnf=${confdir}/servercert.cnf
+csr=${confdir}/partimaged.csr
+cert=${confdir}/partimaged.cert
+
+pkg_config() {
+ if use ssl; then
+ ewarn "Please customize /etc/partimaged/servercert.cnf before you continue!"
+ ewarn "Press Ctrl-C to break now for it, or press enter to continue."
+ read
+ if [ ! -f ${privkey} ]; then
+ einfo "Generating unencrypted private key: ${privkey}"
+ openssl genrsa -out ${privkey} 1024 || die "Failed!"
+ else
+ einfo "Private key already exists: ${privkey}"
+ fi
+ if [ ! -f ${csr} ]; then
+ einfo "Generating certificate request: ${csr}"
+ openssl req -new -x509 -outform PEM -out ${csr} -key ${privkey} -config ${cnf} || die "Failed!"
+ else
+ einfo "Certificate request already exists: ${csr}"
+ fi
+ if [ ! -f ${cert} ]; then
+ einfo "Generating self-signed certificate: ${cert}"
+ openssl x509 -in ${csr} -out ${cert} -signkey ${privkey} || die "Failed!"
+ else
+ einfo "Self-signed certifcate already exists: ${cert}"
+ fi
+ einfo "Setting permissions"
+ partimagesslperms || die "Failed!"
+ einfo "Done"
+ else
+ einfo "SSL is disabled, not building certificates"
+ fi
+}
+
+partimagesslperms() {
+ local ret=0
+ chmod 600 ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown partimag:0 ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chmod 644 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown root:0 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ return $ret
+}
+
+pkg_postinst() {
+ if use ssl; then
+ einfo "To create the required SSL certificates, please do:"
+ einfo "emerge --config =${PF}"
+ partimagesslperms
+ return 0
+ fi
+ chown partimag:0 "${ROOT}"etc/partimaged/partimagedusers || die
+}