summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-04-25 22:19:00 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-04-25 22:19:00 +0000
commit40bc89cf15675fc3be1e8e9d74b35d7161969441 (patch)
tree7091e5b22dbc7720bcf3da92d0e83458e7b767ab /sys-apps/partimage
parentpartimage - nologin support (diff)
downloadhistorical-40bc89cf15675fc3be1e8e9d74b35d7161969441.tar.gz
historical-40bc89cf15675fc3be1e8e9d74b35d7161969441.tar.bz2
historical-40bc89cf15675fc3be1e8e9d74b35d7161969441.zip
fix bugs #24727, #14687. massive new stuff for the new version to build properly, and a big pkg_config section for SSL certs.
Diffstat (limited to 'sys-apps/partimage')
-rw-r--r--sys-apps/partimage/ChangeLog11
-rw-r--r--sys-apps/partimage/Manifest7
-rw-r--r--sys-apps/partimage/files/digest-partimage-0.6.41
-rw-r--r--sys-apps/partimage/files/servercert.cnf37
-rw-r--r--sys-apps/partimage/partimage-0.6.4.ebuild129
5 files changed, 181 insertions, 4 deletions
diff --git a/sys-apps/partimage/ChangeLog b/sys-apps/partimage/ChangeLog
index 32ca0c37af17..15f50ab75e4b 100644
--- a/sys-apps/partimage/ChangeLog
+++ b/sys-apps/partimage/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-apps/partimage
-# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/ChangeLog,v 1.4 2003/10/28 18:52:14 johnm Exp $
+# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/ChangeLog,v 1.5 2004/04/25 22:19:00 robbat2 Exp $
+
+*partimage-0.6.4 (25 Apr 2004)
+
+ 25 Apr 2004; Robin H. Johnson <robbat2@gentoo.org> partimage-0.6.4.ebuild,
+ files/servercert.cnf:
+ fix bugs #24727, #14687. massive new stuff for the new version to build
+ properly, and a big pkg_config section for SSL certs.
28 Oct 2003; John Mylchreest <johnm@gentoo.org>; partimage-0.6.2.ebuild:
fixing chown issue
diff --git a/sys-apps/partimage/Manifest b/sys-apps/partimage/Manifest
index f3d41e17d344..97f195004a2b 100644
--- a/sys-apps/partimage/Manifest
+++ b/sys-apps/partimage/Manifest
@@ -1,4 +1,7 @@
-MD5 ee2d5b6d18ce9e9797a51b1cb894b64b ChangeLog 1104
+MD5 e067da35ae8f97b9c00726aeef13c73b partimage-0.6.2.ebuild 1449
+MD5 e64517d0c1b0d2036bcac0dc7b9f2b1a partimage-0.6.4.ebuild 3846
+MD5 39fc2cc8bd28489c979ded413bef9086 ChangeLog 1369
MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164
-MD5 ffb2e7a72efcecdeed7c00abfb0b5be4 partimage-0.6.2.ebuild 1450
+MD5 313cc94620be21b4430cfb754517a6f6 files/servercert.cnf 1095
MD5 6fd04332b7f640a2aa71f208d2bd2dc8 files/digest-partimage-0.6.2 68
+MD5 3bbd1e2fc0dd50034c600d01d08e8997 files/digest-partimage-0.6.4 68
diff --git a/sys-apps/partimage/files/digest-partimage-0.6.4 b/sys-apps/partimage/files/digest-partimage-0.6.4
new file mode 100644
index 000000000000..f525923985b4
--- /dev/null
+++ b/sys-apps/partimage/files/digest-partimage-0.6.4
@@ -0,0 +1 @@
+MD5 ee56df4a6be1f78f53dc48454655aa8a partimage-0.6.4.tar.bz2 654707
diff --git a/sys-apps/partimage/files/servercert.cnf b/sys-apps/partimage/files/servercert.cnf
new file mode 100644
index 000000000000..4c1b1fa7d1e7
--- /dev/null
+++ b/sys-apps/partimage/files/servercert.cnf
@@ -0,0 +1,37 @@
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/files/servercert.cnf,v 1.1 2004/04/25 22:19:00 robbat2 Exp $
+# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003
+# This is the openssl config file to generate keys for partimage
+# It is read by mkservercert
+
+[ req ]
+# you can increase this value, but be aware that it will make things much slower
+# this should be a power of 2!
+default_bits = 1024
+# leave the rest of these alone!
+encrypt_key = yes
+distinguished_name = req_dn
+x509_extensions = cert_type
+prompt = no
+
+[ req_dn ]
+# 2-Letter ISO country code
+C=US
+# FULL name of state/province/district
+# NO abbreviations!
+ST=Alabama
+# FULL name of city
+# NO abbreviations!
+L=Mobile
+# Full Name of your organization
+# NO abbreviations!
+O=Foobar Systems
+# Leave this alone unless specifically need to change it!
+OU=Automatically-generated PartImage SSL key
+# This should be a FQDN that resolves to the IP of your server
+CN=localhost
+# This should be the email address for the administrator of the server
+emailAddress=root@localhost
+
+# Leave this alone!
+[ cert_type ]
+nsCertType = server
diff --git a/sys-apps/partimage/partimage-0.6.4.ebuild b/sys-apps/partimage/partimage-0.6.4.ebuild
new file mode 100644
index 000000000000..1fb7a0480b43
--- /dev/null
+++ b/sys-apps/partimage/partimage-0.6.4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.4.ebuild,v 1.1 2004/04/25 22:19:00 robbat2 Exp $
+
+inherit gnuconfig
+
+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 ~amd64"
+IUSE="ssl nologin"
+
+RDEPEND="virtual/glibc
+ >=sys-libs/zlib-1.1.4
+ >=dev-libs/lzo-1.08
+ >=dev-libs/newt-0.50.35-r1
+ >=sys-libs/slang-1.4.5-r2
+ app-arch/bzip2
+ ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+DEPEND="${RDEPEND} sys-devel/autoconf"
+
+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=91
+
+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}
+ # Patch Makefile.am so we can take over some of is install work
+ #patch -p1 < ${FILESDIR}/${PF}-gentoo.patch || die "patch failed"
+ sed '18d' -i configure.ac
+ sed '1iACLOCAL_AMFLAGS = -I macros' -i Makefile.am
+ for i in intl/Makefile.in po/Makefile.in.in; do
+ sed 's/^mkinstalldirs =.*/mkinstalldirs = mkdir -p /g' -i ${i}
+ done
+ sed 's/chown partimag.root/chown partimag:root/g' -i Makefile.am
+ gnuconfig_update
+ automake
+ aclocal
+ autoconf
+}
+
+src_compile() {
+ # SSL is optional
+ local myconf
+ myconf="--cache-file=${S}/config.cache"
+ use ssl || myconf="${myconf} --disable-ssl"
+ use nologin && myconf="${myconf} --disable-login"
+ econf \
+ ${myconf} \
+ --infodir=/usr/share/doc/${PF}
+ cp Makefile Makefile.orig
+ sed -e "s/partimag\.root/root:root/g" Makefile.orig > Makefile
+ emake || die
+}
+
+src_install() {
+ make \
+ prefix=${D}/usr \
+ sysconfdir=${D}/etc \
+ mandir=${D}/usr/share/man \
+ datadir=${D}/usr/share \
+ infodir=${D}/usr/share/doc/${PF} \
+ localedir=${D}/usr/share/locale \
+ gettextsrcdir=${D}/usr/share/gettext/po \
+ install || die
+ keepdir /var/log/partimage
+ insinto /etc/partimaged
+ doins ${FILESDIR}/servercert.cnf
+}
+
+pkg_config() {
+ local dir=${ROOT}etc/partimaged
+ privkey="${dir}/partimaged.key"
+ cnf="${dir}/servercert.cnf"
+ csr="${dir}/partimaged.csr"
+ cert="${dir}/partimaged.cert"
+ 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"
+ chmod 600 ${privkey} || die "Failed!"
+ chown partimag:root ${privkey} || die "Failed!"
+ chmod 644 ${cert} ${csr} || die "Failed!"
+ chown root:root ${cert} ${csr} || die "Failed!"
+ einfo "Done"
+ else
+ einfo "SSL is disabled, not building certificates"
+ fi
+}
+
+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"
+ fi
+}