diff options
author | Christian Zoffoli <xmerlin@gentoo.org> | 2005-01-16 15:30:56 +0000 |
---|---|---|
committer | Christian Zoffoli <xmerlin@gentoo.org> | 2005-01-16 15:30:56 +0000 |
commit | 858c5ff3a542e9aea5f5ce0b9cff7732e75d284c (patch) | |
tree | 4a850cb6d036adf5c8df4d34894aaf3e4e90f08c /sys-apps/partimage | |
parent | Stable on hppa. (Manifest recommit) (diff) | |
download | gentoo-2-858c5ff3a542e9aea5f5ce0b9cff7732e75d284c.tar.gz gentoo-2-858c5ff3a542e9aea5f5ce0b9cff7732e75d284c.tar.bz2 gentoo-2-858c5ff3a542e9aea5f5ce0b9cff7732e75d284c.zip |
Update Copyright years, fixed bugs #69231,#59873, added swift@gentoo.org init script and conf, added man pages, added partimagedusers.5, added
partimage-0.6.4-r2 with a massive cleanup.
Diffstat (limited to 'sys-apps/partimage')
-rw-r--r-- | sys-apps/partimage/ChangeLog | 23 | ||||
-rw-r--r-- | sys-apps/partimage/Manifest | 18 | ||||
-rw-r--r-- | sys-apps/partimage/files/digest-partimage-0.6.4-r2 | 1 | ||||
-rw-r--r-- | sys-apps/partimage/files/partimage-0.6.4-chown.patch | 38 | ||||
-rw-r--r-- | sys-apps/partimage/files/partimage-0.6.4-fixserverargs.diff | 11 | ||||
-rw-r--r-- | sys-apps/partimage/files/partimage-0.6.4-not_install_info.patch | 29 | ||||
-rw-r--r-- | sys-apps/partimage/files/partimaged.conf | 10 | ||||
-rw-r--r-- | sys-apps/partimage/files/partimaged.init | 29 | ||||
-rw-r--r-- | sys-apps/partimage/files/partimagedusers.5 | 48 | ||||
-rw-r--r-- | sys-apps/partimage/metadata.xml | 7 | ||||
-rw-r--r-- | sys-apps/partimage/partimage-0.6.2.ebuild | 10 | ||||
-rw-r--r-- | sys-apps/partimage/partimage-0.6.4-r1.ebuild | 15 | ||||
-rw-r--r-- | sys-apps/partimage/partimage-0.6.4-r2.ebuild | 138 | ||||
-rw-r--r-- | sys-apps/partimage/partimage-0.6.4.ebuild | 11 |
14 files changed, 372 insertions, 16 deletions
diff --git a/sys-apps/partimage/ChangeLog b/sys-apps/partimage/ChangeLog index bec97b66de8b..7cdc420b2b7c 100644 --- a/sys-apps/partimage/ChangeLog +++ b/sys-apps/partimage/ChangeLog @@ -1,6 +1,25 @@ # ChangeLog for sys-apps/partimage -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/ChangeLog,v 1.13 2004/10/28 19:17:43 blubb Exp $ +# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/ChangeLog,v 1.14 2005/01/16 15:30:56 xmerlin Exp $ + +*partimage-0.6.4-r2 (16 Jan 2005) + + 16 Jan 2005; Christian Zoffoli <xmerlin@gentoo.org> metadata.xml, + +files/partimage-0.6.4-chown.patch, + +files/partimage-0.6.4-fixserverargs.diff, + +files/partimage-0.6.4-not_install_info.patch, +files/partimaged.conf, + +files/partimaged.init, +files/partimagedusers.5, partimage-0.6.2.ebuild, + partimage-0.6.4-r1.ebuild, +partimage-0.6.4-r2.ebuild, + partimage-0.6.4.ebuild: + massive cleanup in partimage-0.6.4-r2.ebuild, merged swift@gentoo.org patch to + fix -d flag in partimaged (bug #65717). + + 16 Jan 2005; Christian Zoffoli <xmerlin@gentoo.org> metadata.xml, + +files/partimage.1, +files/partimaged.8, +files/partimaged.conf, + +files/partimaged.init, +files/partimagedusers.5, partimage-0.6.2.ebuild, + partimage-0.6.4-r1.ebuild, partimage-0.6.4.ebuild: + added init script and conf file posted by Sven Vermeulen <swift@gentoo.org> + (bug #59873). added man pages partimage.1 partimaged.8 partimagedusers.5 28 Oct 2004; Simon Stelling <blubb@gentoo.org> partimage-0.6.2.ebuild, partimage-0.6.4-r1.ebuild, partimage-0.6.4.ebuild: diff --git a/sys-apps/partimage/Manifest b/sys-apps/partimage/Manifest index 1862defb2ea7..1c412dcbbbbc 100644 --- a/sys-apps/partimage/Manifest +++ b/sys-apps/partimage/Manifest @@ -1,10 +1,18 @@ -MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 c56dd7234dac3308d7ecd9bcbb75fdf3 partimage-0.6.2.ebuild 1440 -MD5 c6a6c1c540180a6e0438f6ece0d9411c partimage-0.6.4.ebuild 3869 -MD5 481a4ce98d92f3b30172a006fbb559b3 ChangeLog 2348 -MD5 7a6a82185c98dd517558628135d6e6cc partimage-0.6.4-r1.ebuild 4197 +MD5 2ee82c9ca89ec88e553b8f222596157b ChangeLog 3294 +MD5 6b4c83400b7b7a44afb53e1a7ac388af metadata.xml 300 +MD5 13ae63490e017cedbb0aabf107dceed5 partimage-0.6.2.ebuild 1680 +MD5 89e061f4960b675618f317509031ef11 partimage-0.6.4-r1.ebuild 4495 +MD5 9a2f3e2897729fde2d9e3f478d38af2b partimage-0.6.4.ebuild 4160 +MD5 64b231034bc7219d5ffcf873f0c93fb4 partimage-0.6.4-r2.ebuild 3804 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 MD5 7954fdb6067557fdd593a66ecae93ab3 files/partimage-0.6.4-nodumbpermchecks.diff 817 MD5 e723db4854081a8495b84f4b27ff813a files/servercert.cnf 1099 +MD5 c563e57bf67bb321afe40cc8439f3340 files/partimaged.conf 318 +MD5 b100581e24c9caadad53c49a0054c2d2 files/partimaged.init 650 +MD5 938ecb802f7e26ff8df88404f0648c7c files/partimagedusers.5 1263 +MD5 eb53aad37dc8ae6ed131a1502989446a files/partimage-0.6.4-fixserverargs.diff 366 +MD5 3bbd1e2fc0dd50034c600d01d08e8997 files/digest-partimage-0.6.4-r2 68 +MD5 8fea14f38734fb0bbf6239671f5fff4b files/partimage-0.6.4-chown.patch 1660 +MD5 58c44cd013afb15de340039a5de24b60 files/partimage-0.6.4-not_install_info.patch 1200 diff --git a/sys-apps/partimage/files/digest-partimage-0.6.4-r2 b/sys-apps/partimage/files/digest-partimage-0.6.4-r2 new file mode 100644 index 000000000000..f525923985b4 --- /dev/null +++ b/sys-apps/partimage/files/digest-partimage-0.6.4-r2 @@ -0,0 +1 @@ +MD5 ee56df4a6be1f78f53dc48454655aa8a partimage-0.6.4.tar.bz2 654707 diff --git a/sys-apps/partimage/files/partimage-0.6.4-chown.patch b/sys-apps/partimage/files/partimage-0.6.4-chown.patch new file mode 100644 index 000000000000..49fa01483478 --- /dev/null +++ b/sys-apps/partimage/files/partimage-0.6.4-chown.patch @@ -0,0 +1,38 @@ +--- partimage-0.6.2/Makefile.am.orig 2002-11-25 06:08:36.000000000 -0500 ++++ partimage-0.6.2/Makefile.am 2002-11-25 06:08:58.000000000 -0500 +@@ -23,8 +23,6 @@ + rm ${sysconfdir}/partimaged/partimaged.csr ;\ + chmod 600 ${sysconfdir}/partimaged/partimaged.key ;\ + chmod 600 ${sysconfdir}/partimaged/partimaged.cert ;\ +- chown partimag.root ${sysconfdir}/partimaged/partimaged.key ;\ +- chown partimag.root ${sysconfdir}/partimaged/partimaged.cert ;\ + else \ + echo "SSL disabled, no certificate will be generated." ;\ + fi +@@ -57,7 +55,6 @@ + echo "#sample # user 'sample' is allowed to connect partimaged" >> \ + ${sysconfdir}/partimaged/partimagedusers ;\ + chmod 600 ${sysconfdir}/partimaged/partimagedusers ;\ +- chown partimag.root ${sysconfdir}/partimaged/partimagedusers ;\ + fi + + $(mkinstalldirs) ${infodir} +--- partimage-0.6.2/Makefile.in.orig 2002-11-25 06:15:31.000000000 -0500 ++++ partimage-0.6.2/Makefile.in 2002-11-25 06:15:58.000000000 -0500 +@@ -651,8 +651,6 @@ + rm ${sysconfdir}/partimaged/partimaged.csr ;\ + chmod 600 ${sysconfdir}/partimaged/partimaged.key ;\ + chmod 600 ${sysconfdir}/partimaged/partimaged.cert ;\ +- chown partimag.root ${sysconfdir}/partimaged/partimaged.key ;\ +- chown partimag.root ${sysconfdir}/partimaged/partimaged.cert ;\ + else \ + echo "SSL disabled, no certificate will be generated." ;\ + fi +@@ -684,7 +682,6 @@ + echo "#sample # user 'sample' is allowed to connect partimaged" >> \ + ${sysconfdir}/partimaged/partimagedusers ;\ + chmod 600 ${sysconfdir}/partimaged/partimagedusers ;\ +- chown partimag.root ${sysconfdir}/partimaged/partimagedusers ;\ + fi + + $(mkinstalldirs) ${infodir} diff --git a/sys-apps/partimage/files/partimage-0.6.4-fixserverargs.diff b/sys-apps/partimage/files/partimage-0.6.4-fixserverargs.diff new file mode 100644 index 000000000000..bd04502a93b3 --- /dev/null +++ b/sys-apps/partimage/files/partimage-0.6.4-fixserverargs.diff @@ -0,0 +1,11 @@ +--- partimage-0.6.4/src/server/partimaged-main.cpp.chris 2005-01-16 16:10:23.273973792 +0100 ++++ partimage-0.6.4/src/server/partimaged-main.cpp 2005-01-16 16:10:48.750100832 +0100 +@@ -78,7 +78,7 @@ + }; + #endif //HAVE_GETOPT_H + +-static char optstring[]="ip:hvDdr:g:L"; ++static char optstring[]="ip:hvDd:r:g:L"; + + bool g_bSigKill = false; + bool g_bSigInt = false; diff --git a/sys-apps/partimage/files/partimage-0.6.4-not_install_info.patch b/sys-apps/partimage/files/partimage-0.6.4-not_install_info.patch new file mode 100644 index 000000000000..7abe47bbf43f --- /dev/null +++ b/sys-apps/partimage/files/partimage-0.6.4-not_install_info.patch @@ -0,0 +1,29 @@ +--- partimage-0.6.4/Makefile.in.chris 2005-01-14 01:32:01.000000000 +0100 ++++ partimage-0.6.4/Makefile.in 2005-01-14 01:33:01.483820264 +0100 +@@ -685,16 +685,16 @@ + chmod 600 ${sysconfdir}/partimaged/partimagedusers ;\ + fi + +- $(mkinstalldirs) ${infodir} +- $(INSTALL_DATA) AUTHORS ${infodir}/AUTHORS +- $(INSTALL_DATA) BUGS ${infodir}/BUGS +- $(INSTALL_DATA) COPYING ${infodir}/COPYING +- $(INSTALL_DATA) ChangeLog ${infodir}/ChangeLog +- $(INSTALL_DATA) INSTALL ${infodir}/INSTALL +- $(INSTALL_DATA) README ${infodir}/README +- $(INSTALL_DATA) README.partimaged ${infodir}/README.partimaged +- $(INSTALL_DATA) TODO ${infodir}/TODO +- $(INSTALL_DATA) partimage.lsm ${infodir}/partimage.lsm ++ #$(mkinstalldirs) ${infodir} ++ #$(INSTALL_DATA) AUTHORS ${infodir}/AUTHORS ++ #$(INSTALL_DATA) BUGS ${infodir}/BUGS ++ #$(INSTALL_DATA) COPYING ${infodir}/COPYING ++ #$(INSTALL_DATA) ChangeLog ${infodir}/ChangeLog ++ #$(INSTALL_DATA) INSTALL ${infodir}/INSTALL ++ #$(INSTALL_DATA) README ${infodir}/README ++ #$(INSTALL_DATA) README.partimaged ${infodir}/README.partimaged ++ #$(INSTALL_DATA) TODO ${infodir}/TODO ++ #$(INSTALL_DATA) partimage.lsm ${infodir}/partimage.lsm + + uninstall-local: + -rm -f ${infodir}/AUTHORS diff --git a/sys-apps/partimage/files/partimaged.conf b/sys-apps/partimage/files/partimaged.conf new file mode 100644 index 000000000000..898d1912501a --- /dev/null +++ b/sys-apps/partimage/files/partimaged.conf @@ -0,0 +1,10 @@ +# Copyright 2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/files/partimaged.conf,v 1.1 2005/01/16 15:30:56 xmerlin Exp $ + +# You can define the following optional arguments: +# -d <dest> Destination directory for the backup images +# -pX Server port +# -r <dest> Chroot directory for improved security + +#PARTIMAGED_OPTS="" diff --git a/sys-apps/partimage/files/partimaged.init b/sys-apps/partimage/files/partimaged.init new file mode 100644 index 000000000000..c1a160914f03 --- /dev/null +++ b/sys-apps/partimage/files/partimaged.init @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/files/partimaged.init,v 1.1 2005/01/16 15:30:56 xmerlin Exp $ + +PARTIMAGED="/usr/sbin/partimaged" + +failed_startup() { + eerror "The PartImage daemon did not start up correctly." + eerror "Perhaps you compiled it with SSL support but forgot to run the ebuild config?" + return 1 +} + +depend() { + need net +} + +start() { + ebegin "Starting partimaged" + start-stop-daemon --start --quiet --exec ${PARTIMAGED} \ + -- ${PARTIMAGED_OPTS} --daemon &> /dev/null + eend $? || failed_startup +} + +stop() { + ebegin "Stopping partimaged" + start-stop-daemon --stop --exec ${PARTIMAGED} + eend $? +} diff --git a/sys-apps/partimage/files/partimagedusers.5 b/sys-apps/partimage/files/partimagedusers.5 new file mode 100644 index 000000000000..502312506202 --- /dev/null +++ b/sys-apps/partimage/files/partimagedusers.5 @@ -0,0 +1,48 @@ +.\" +.\" Copyright (c) 2001 Partition Image Team +.\" All rights reserved. +.\" +.\" Permission is granted to copy, distribute and/or modify this +.\" document under the terms of the GNU Free Documentation License, +.\" Version 1.1 or any later version published by the Free Software +.\" Foundation; with no Invariant Sections, with no Front-Cover Texts, and +.\" with no Back-Cover Texts. A copy of the license is included in top of +.\" package. +.\" +.TH partimagedusers 5 "23 June 2001" +.UC 5 +.SH NAME +partimagedusers \- list of allowed users. +.SH DESCRIPTION +The +.B partimagedusers +file +lists all allowed users to connect partimaged. This file must belong to user \ + "partimag" and must have permissions -rw------- or -r-------. +.PP +The configuration file consists of a set of lines. +All empty lines will be ignored. +Comments begin with a #, and everything on the line after them are ignored. +.PP +Put all allowed to connect partimaged users on the remaining lines, one +login per line. +.SH EXAMPLE +.LP +.PD .1v +.RS +.nf +# +# Sample users list for partimaged +# We only allow user2 and user6 to connect partimaged +# from partimage +user2 +user6 +# end of list +.PD +.SH "SEE ALSO" +.BR partimage(1) , +.BR partimaged(8) +.SH AUTHOR +.nf +Franck Ladurelle <ladurelf@partimage.org> + diff --git a/sys-apps/partimage/metadata.xml b/sys-apps/partimage/metadata.xml index 96a2d586367d..65335d039e66 100644 --- a/sys-apps/partimage/metadata.xml +++ b/sys-apps/partimage/metadata.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>base-system</herd> + <herd>base-system</herd> + <maintainer> + <email>xmerlin@gentoo.org</email> + <name>Christian Zoffoli</name> + </maintainer> + <longdescription></longdescription> </pkgmetadata> diff --git a/sys-apps/partimage/partimage-0.6.2.ebuild b/sys-apps/partimage/partimage-0.6.2.ebuild index b6df731ee80f..90cd13cd0a55 100644 --- a/sys-apps/partimage/partimage-0.6.2.ebuild +++ b/sys-apps/partimage/partimage-0.6.2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.2.ebuild,v 1.16 2004/10/28 19:17:43 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.2.ebuild,v 1.17 2005/01/16 15:30:56 xmerlin Exp $ inherit gnuconfig @@ -53,4 +53,10 @@ src_install() { localedir=${D}/usr/share/locale \ gettextsrcdir=${D}/usr/share/gettext/po \ install || 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 } diff --git a/sys-apps/partimage/partimage-0.6.4-r1.ebuild b/sys-apps/partimage/partimage-0.6.4-r1.ebuild index 66a5f260f149..d71d7220734c 100644 --- a/sys-apps/partimage/partimage-0.6.4-r1.ebuild +++ b/sys-apps/partimage/partimage-0.6.4-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.4-r1.ebuild,v 1.6 2004/10/28 19:17:43 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.4-r1.ebuild,v 1.7 2005/01/16 15:30:56 xmerlin Exp $ inherit gnuconfig eutils @@ -38,9 +38,10 @@ pkg_setup() { src_unpack() { unpack ${A} - # we can do better security ourselves - epatch ${FILESDIR}/${P}-nodumbpermchecks.diff cd ${S} + # we can do better security ourselves + epatch ${FILESDIR}/${P}-nodumbpermchecks.diff || die + epatch ${FILESDIR}/${P}-fixserverargs.diff || die # 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 @@ -82,6 +83,12 @@ src_install() { keepdir /var/log/partimage insinto /etc/partimaged doins ${FILESDIR}/servercert.cnf + + # 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 } # vars for SSL stuff diff --git a/sys-apps/partimage/partimage-0.6.4-r2.ebuild b/sys-apps/partimage/partimage-0.6.4-r2.ebuild new file mode 100644 index 000000000000..391f03a7477c --- /dev/null +++ b/sys-apps/partimage/partimage-0.6.4-r2.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.4-r2.ebuild,v 1.1 2005/01/16 15:30:56 xmerlin Exp $ + +inherit gnuconfig eutils + +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" +IUSE="ssl nologin nls" + +DEPEND="${RDEPEND} sys-devel/autoconf" + +RDEPEND="virtual/libc + >=sys-libs/zlib-1.1.4 + >=dev-libs/lzo-1.08 + >=dev-libs/newt-0.50.35-r1 + app-arch/bzip2 + >=sys-libs/slang-1.4.5-r2 + nls? ( sys-devel/gettext ) + ssl? ( >=dev-libs/openssl-0.9.6g )" + +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 +} + +src_compile() { + local myconf + use nologin && myconf="${myconf} --disable-login" + + econf \ + ${myconf} \ + `use_enable ssl` \ + `use_enable nls`|| die "econf failed" + + emake || die +} + +src_install() { + einstall \ + MKINSTALLDIRS=/usr/share/automake-1.8/mkinstalldirs || 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 +} + +# 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 +}
\ No newline at end of file diff --git a/sys-apps/partimage/partimage-0.6.4.ebuild b/sys-apps/partimage/partimage-0.6.4.ebuild index 07066ccaee39..ac3b5756db2f 100644 --- a/sys-apps/partimage/partimage-0.6.4.ebuild +++ b/sys-apps/partimage/partimage-0.6.4.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # 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.8 2004/10/28 19:17:43 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/partimage/partimage-0.6.4.ebuild,v 1.9 2005/01/16 15:30:56 xmerlin Exp $ inherit gnuconfig eutils @@ -39,6 +39,7 @@ pkg_setup() { src_unpack() { unpack ${A} cd ${S} + epatch ${FILESDIR}/${P}-fixserverargs.diff || die # 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 @@ -80,6 +81,12 @@ src_install() { keepdir /var/log/partimage insinto /etc/partimaged doins ${FILESDIR}/servercert.cnf + + # 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 } pkg_config() { |