summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2005-07-29 22:16:08 +0000
committerDaniel Black <dragonheart@gentoo.org>2005-07-29 22:16:08 +0000
commit50eed75bf9855e31bce760de6e75d653f7695101 (patch)
tree69f6fbd19c5c31241a844773f6d397dceb2d56d9 /sys-block
parentbug 83325 (diff)
downloadhistorical-50eed75bf9855e31bce760de6e75d653f7695101.tar.gz
historical-50eed75bf9855e31bce760de6e75d653f7695101.tar.bz2
historical-50eed75bf9855e31bce760de6e75d653f7695101.zip
added pam and static use flags
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/partimage/ChangeLog8
-rw-r--r--sys-block/partimage/Manifest12
-rw-r--r--sys-block/partimage/files/digest-partimage-0.6.4-r41
-rw-r--r--sys-block/partimage/partimage-0.6.4-r4.ebuild168
4 files changed, 183 insertions, 6 deletions
diff --git a/sys-block/partimage/ChangeLog b/sys-block/partimage/ChangeLog
index 04b6428d3d19..8416611a6871 100644
--- a/sys-block/partimage/ChangeLog
+++ b/sys-block/partimage/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-block/partimage
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/ChangeLog,v 1.10 2005/04/27 01:16:50 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/ChangeLog,v 1.11 2005/07/29 22:16:08 dragonheart Exp $
+
+*partimage-0.6.4-r4 (29 Jul 2005)
+
+ 29 Jul 2005; Daniel Black <dragonheart@gentoo.org>
+ +partimage-0.6.4-r4.ebuild:
+ added pam and static use flags
27 Apr 2005; Gustavo Zacarias <gustavoz@gentoo.org>
partimage-0.6.4-r3.ebuild:
diff --git a/sys-block/partimage/Manifest b/sys-block/partimage/Manifest
index 5145432cfbb0..4e18bcd8bbe1 100644
--- a/sys-block/partimage/Manifest
+++ b/sys-block/partimage/Manifest
@@ -1,13 +1,14 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 9fe444300204a1a6813e3a29759a0f3e ChangeLog 5260
+MD5 c1414147751538378942f7a866446a26 ChangeLog 5415
MD5 6b4c83400b7b7a44afb53e1a7ac388af metadata.xml 300
MD5 0823991ecf05c5fb37561fc3996200a5 partimage-0.6.2.ebuild 1682
MD5 3274833ce702b2312325db17559d9ff1 partimage-0.6.4-r1.ebuild 4498
MD5 5acbb77377c5c50366acdaafe5eb6099 partimage-0.6.4-r2.ebuild 3957
MD5 d86d932f33956374c79b9ce3524c118d partimage-0.6.4.ebuild 4163
MD5 2c94c67ee76a5f7c85215ef29628102a partimage-0.6.4-r3.ebuild 4201
+MD5 829b43d6fb303aedf0c6736c51ae4400 partimage-0.6.4-r4.ebuild 4791
MD5 6fd04332b7f640a2aa71f208d2bd2dc8 files/digest-partimage-0.6.2 68
MD5 3bbd1e2fc0dd50034c600d01d08e8997 files/digest-partimage-0.6.4 68
MD5 3bbd1e2fc0dd50034c600d01d08e8997 files/digest-partimage-0.6.4-r1 68
@@ -25,10 +26,11 @@ MD5 60b6a720fc1d32cb9325428d7aeb49c2 files/partimage-0.6.4-LP64-fixes.patch 1773
MD5 d4ac3ff2ae9e3225c14bbb1fc1373df9 files/partimage-0.6.4-fflush-before-re-read-partition-table.patch 401
MD5 a4cd05177b2b00d6e1b2d426ff9736eb files/partimage-0.6.4-lib64.patch 2102
MD5 5e328f1bb041b6b49957186d5598f3c1 files/partimage-0.6.4-save_all_and_rest_all_actions.patch 10301
+MD5 3bbd1e2fc0dd50034c600d01d08e8997 files/digest-partimage-0.6.4-r4 68
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1-ecc0.1.6 (GNU/Linux)
+Version: GnuPG v1.4.1 (GNU/Linux)
-iD8DBQFCbugJKRy60XGEcJIRAmWEAJwIxVgEuWMCCmLFHLUbRJHCJqa1ygCfT6dq
-zFg8PHEqYieQSrA8WnLV8bE=
-=ArKO
+iD8DBQFC6qq1mdTrptrqvGERAvXaAKCJq2tUn475Ht/NibZpJ2L6ZbD2CQCgnBLY
+4MvSjOUtB5ZYJVATclcmpms=
+=j3aQ
-----END PGP SIGNATURE-----
diff --git a/sys-block/partimage/files/digest-partimage-0.6.4-r4 b/sys-block/partimage/files/digest-partimage-0.6.4-r4
new file mode 100644
index 000000000000..f525923985b4
--- /dev/null
+++ b/sys-block/partimage/files/digest-partimage-0.6.4-r4
@@ -0,0 +1 @@
+MD5 ee56df4a6be1f78f53dc48454655aa8a partimage-0.6.4.tar.bz2 654707
diff --git a/sys-block/partimage/partimage-0.6.4-r4.ebuild b/sys-block/partimage/partimage-0.6.4-r4.ebuild
new file mode 100644
index 000000000000..be14bfa5dd42
--- /dev/null
+++ b/sys-block/partimage/partimage-0.6.4-r4.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/partimage-0.6.4-r4.ebuild,v 1.1 2005/07/29 22:16:08 dragonheart Exp $
+
+inherit eutils flag-o-matic pam
+
+DESCRIPTION="Console-based application to efficiently save raw partition data to an image file. Optional encryption/compression support."
+HOMEPAGE="http://www.partimage.org/"
+SRC_URI="mirror://sourceforge/partimage/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc"
+IUSE="ssl nologin nls pam static"
+
+DEPEND="virtual/libc
+ >=sys-libs/zlib-1.1.4
+ >=dev-libs/lzo-1.08
+ >=dev-libs/newt-0.51.6
+ app-arch/bzip2
+ >=sys-libs/slang-1.4.5-r2
+ nls? ( sys-devel/gettext )
+ ssl? ( >=dev-libs/openssl-0.9.6g )
+ sys-devel/autoconf"
+
+RDEPEND="!static? ( virtual/libc
+ >=sys-libs/zlib-1.1.4
+ >=dev-libs/lzo-1.08
+ >=dev-libs/newt-0.51.6
+ app-arch/bzip2
+ >=sys-libs/slang-1.4.5-r2
+ nls? ( sys-devel/gettext )
+ ssl? ( >=dev-libs/openssl-0.9.6g )
+ pam? ( virtual/pam )
+ )"
+
+PARTIMAG_GROUP_GID=91
+PARTIMAG_USER_UID=91
+PARTIMAG_GROUP_NAME=partimag
+PARTIMAG_USER_NAME=partimag
+PARTIMAG_USER_SH=/bin/false
+PARTIMAG_USER_HOMEDIR=/var/log/partimage
+PARTIMAG_USER_GROUPS=partimag
+
+pkg_setup() {
+ # Now add users if needed
+ enewgroup ${PARTIMAG_GROUP_NAME} ${PARTIMAG_GROUP_GID}
+ enewuser ${PARTIMAG_USER_NAME} ${PARTIMAG_USER_UID} ${PARTIMAG_USER_SH} ${PARTIMAG_USER_HOMEDIR} ${PARTIMAG_USER_GROUPS}
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # we can do better security ourselves
+ epatch ${FILESDIR}/${P}-nodumbpermchecks.diff || die
+ epatch ${FILESDIR}/${P}-chown.patch || die
+ epatch ${FILESDIR}/${P}-not_install_info.patch || die
+ epatch ${FILESDIR}/${P}-fixserverargs.diff || die
+ epatch ${FILESDIR}/${P}-lib64.patch || die
+ epatch ${FILESDIR}/${P}-fflush-before-re-read-partition-table.patch || die
+ epatch ${FILESDIR}/${P}-LP64-fixes.patch || die
+ epatch ${FILESDIR}/${P}-save_all_and_rest_all_actions.patch || die
+}
+
+src_compile() {
+ filter-flags -fno-exceptions
+
+ local myconf
+ use nologin && myconf="${myconf} --disable-login"
+ if use static
+ then
+ use pam && ewarn "pam and static compilation are mutually exclusive - using static and ignoring pam"
+ else
+ myconf="${myconf} `use_enable pam`"
+ fi
+ econf \
+ ${myconf} \
+ `use_enable ssl` \
+ `use_enable nls` \
+ `use_enable static all-static` \
+ || die "econf failed"
+
+ emake || die "make failed"
+ if use pam
+ then
+ make pamfile || die "couldn't create pam file"
+ fi
+}
+
+src_install() {
+ emake DESTDIR=${D} \
+ MKINSTALLDIRS=/usr/share/automake-1.8/mkinstalldirs install || die
+
+ keepdir /var/log/partimage
+
+ insinto /etc/partimaged; doins ${FILESDIR}/servercert.cnf || die
+
+ # init.d / conf.d
+ exeinto /etc/init.d ; newexe ${FILESDIR}/${PN}d.init ${PN}d || die
+ insinto /etc/conf.d ; newins ${FILESDIR}/${PN}d.conf ${PN}d || die
+
+ doman debian/partimage.1 debian/partimaged.8 ${FILESDIR}/partimagedusers.5 || die
+ dodoc AUTHORS BUGS COPYING ChangeLog INSTALL README* TODO partimage.lsm
+
+ # pam
+ newpamd partimaged.pam partimaged
+}
+
+# vars for SSL stuff
+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:root ${privkey} 2>/dev/null
+ ret=$((${ret}+$?))
+ chmod 644 ${cert} ${csr} 2>/dev/null
+ ret=$((${ret}+$?))
+ chown root:root ${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 "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ # force a permmissions fixup
+ partimagesslperms
+ return 0
+ fi
+}