diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-11-19 19:36:33 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-11-19 19:36:33 +0000 |
commit | 8d28e7764d1d8f3128b5a344a4d5f14c961464ba (patch) | |
tree | 6bb9eb20106082ce78b116832cde51e9a1b4eee1 /sys-block | |
parent | Automated update of use.local.desc (diff) | |
download | gentoo-2-8d28e7764d1d8f3128b5a344a4d5f14c961464ba.tar.gz gentoo-2-8d28e7764d1d8f3128b5a344a4d5f14c961464ba.tar.bz2 gentoo-2-8d28e7764d1d8f3128b5a344a4d5f14c961464ba.zip |
Version bump (bug #330159), with fixes for PAM (bug #261686) and init script. Remove man pages that we no longer install.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'sys-block')
-rw-r--r-- | sys-block/partimage/ChangeLog | 10 | ||||
-rw-r--r-- | sys-block/partimage/files/partimage.1 | 177 | ||||
-rw-r--r-- | sys-block/partimage/files/partimaged.8 | 58 | ||||
-rw-r--r-- | sys-block/partimage/files/partimaged.init.2 | 29 | ||||
-rw-r--r-- | sys-block/partimage/files/partimaged.pam.2 | 7 | ||||
-rw-r--r-- | sys-block/partimage/files/partimagedusers.5 | 48 | ||||
-rw-r--r-- | sys-block/partimage/partimage-0.6.9.ebuild | 137 |
7 files changed, 182 insertions, 284 deletions
diff --git a/sys-block/partimage/ChangeLog b/sys-block/partimage/ChangeLog index f503f0806757..c12efca8c8a9 100644 --- a/sys-block/partimage/ChangeLog +++ b/sys-block/partimage/ChangeLog @@ -1,6 +1,14 @@ # 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.48 2010/08/11 21:00:19 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/ChangeLog,v 1.49 2010/11/19 19:36:33 flameeyes Exp $ + +*partimage-0.6.9 (19 Nov 2010) + + 19 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org> + +partimage-0.6.9.ebuild, +files/partimaged.init.2, +files/partimaged.pam.2, + -files/partimage.1, -files/partimaged.8, -files/partimagedusers.5: + Version bump (bug #330159), with fixes for PAM (bug #261686) and init script. + Remove man pages that we no longer install. 11 Aug 2010; Joseph Jezak <josejx@gentoo.org> partimage-0.6.8.ebuild: Marked ppc stable for bug #159556. diff --git a/sys-block/partimage/files/partimage.1 b/sys-block/partimage/files/partimage.1 deleted file mode 100644 index 3d2c84676363..000000000000 --- a/sys-block/partimage/files/partimage.1 +++ /dev/null @@ -1,177 +0,0 @@ -.\" -.\" 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. -.\" -.TH partimage 1 "24 June 2001" -.UC 1 -.SH NAME -partimage \- back up and restore disk partitions -.SH SYNOPSIS -.B partimage -.RB [ " \-bcdehimMnoSvwy " ] -.RB [ \-B\ 'pattern\ response\ string' ] -.RB [ \-z\ compresslevel ] -.RB [ \-V\ volumesize ] -.RB [ \-f\ actionatend ] -.RB [ \-s\ server ] -.RB [ \-p\ port ] -.RB [ \-a\ mountoptions ] -.RB [ \-g\ loglevel ] -[ -.I "save" -.I "device" -.I "image_file" -] -.br -.B partimage -.RB [ " \-bcdehimMnoSvwy " ] -.RB [ \-B\ 'pattern\ response\ string' ] -.RB [ \-z\ compresslevel ] -.RB [ \-V\ volumesize ] -.RB [ \-f\ actionatend ] -.RB [ \-s\ server ] -.RB [ \-p\ port ] -.RB [ \-a\ mountoptions ] -.RB [ \-g\ loglevel ] -[ -.I "restore" -.I "device" -.I "image_file/'stdin'" -] -.br -.B partimage -[ -.I "restmbr" -.I "image_file" -] -.br -.B partimage -[ -.I "imginfo" -.I "image_file" -] -.SH DESCRIPTION -\fIpartimage\fR backs up disk partitions into image files and restores them. -.SH OPTIONS -.TP -.B \-z val, --compress val -Set image file compression level: -.br -val=0: don't compress: very fast but very big image file -.br -val=1: compress using gzip: fast and small image file (default) -.br -val=2: compress using bzip2: very slow and very small image file -.TP -.B \-c, --nocheck -Don't check the partition before saving. -.TP -.B \-o, --overwrite -Overwrite the existing image file without confirmation. -.TP -.B \-d, --nodesc -Don't ask any description for the image file. -.TP -.B \-V vol, --volume vol -Split image into multiple volumes files. vol will be the size in KB of volumes. -.TP -.B \-w, --waitvol -Wait for a confirmation after each volume change. -.TP -.B \-e, --erase -Erase empty blocks on restore with zero bytes. -.TP -.B \-m, --allowmnt -Don't fail if the partition is mounted. Dangerous! -.TP -.B \-M, --nombr -Don't create a backup of the MBR (Mast Boot Record) in the image file. -.TP -.B \-h, --help -Show help. -.TP -.B \-v, --version -Show version. -.TP -.B \-f action, --finish action -Action to do if finished successfully: -.br -action=0: wait (do nothing) -.br -action=1: halt (power off the computer) -.br -action=2: reboot (restart the computer) -.br -action=3: quit -.TP -.B \-b, --batch -batch mode: the GUI won't wait for an user action. -.TP -.B \-B 'pattern response string', --fully-batch 'pattern response string' -full batch mode: the GUI is not being displayed. Rather status messages -are displayed as normal text. -The pattern response string has the following format: -.br -.B \'<glob-pattern>=<response-value>;...\' -.br -where the glob pattern is matched against the string -.B <window-title>/<message-text> -of the message dialogue box to be displayed. For dialog boxes with -buttons in the window, the <response> must be the exact button text. -The pattern response string usually needs to be quoted as above. -.TP -.B \-y, --nosync -Don't synchronize the disks at the end of the operation. Dangerous! -.TP -.B \-s addr, --server addr -Give partimaged server's ip address. -.TP -.B \-p port, --port port -Give partimaged server's listening port. -.TP -.B \-g debuglevel, --debug debuglevel -Set the debug level to debuglevel (defaults to 1). -.TP -.B \-n, --nossl -Disable SSL in network mode. -.TP -.B \-S, --simulate -Simulation of restoration mode. -.TP -.B \-a str, --automnt str -Automatic mount with X options. Read the doc for more details. - -.SH EXAMPLE -partimage -z1 -o -d save /dev/hda12 /mnt/backup/redhat-6.2.partimg.gz -.br -partimage -z1 -om save /dev/hda9 /mnt/backup/win95-osr2.partimg.gz -.br -partimage restore /dev/hda13 /mnt/backup/suse-6.4.partimg -.br -cat debian.partimg.000 debian.partimg.001 | partimage restore /dev/hda1 stdin -.br -partimage restmbr /mnt/backup/debian-potato-2.2.partimg.bz2 -.br -partimage imginfo /mnt/backup/debian-potato-2.2.partimg.bz2 -.SH SEE ALSO -.BR partimaged(8) -.SH DIAGNOSTICS -You can read options set at compile time running 'partimage -i'. -.PP -When using batchmode, exit status is normaly 0. -.SH CAVEATS -For now, only ext2fs, FAT16, FAT32, NTFS, HPFS, JFS, XFS, reiserfs are supported. -.PP -FAT12 will never be supported. -.SH BUGS -Refer to BUGS file to read them. -.SH AUTHOR -.nf -Franck Ladurelle <ladurelf@partimage.org> - diff --git a/sys-block/partimage/files/partimaged.8 b/sys-block/partimage/files/partimaged.8 deleted file mode 100644 index 8e21ffe3213c..000000000000 --- a/sys-block/partimage/files/partimaged.8 +++ /dev/null @@ -1,58 +0,0 @@ -.\" -.\" 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. -.\" -.TH partimaged 8 "24 June 2001" -.UC 1 -.SH NAME -partimaged \- backups/restores partitions server -.SH SYNOPSIS -.B partimaged -.RB [ " \-Dhnv " ] -.RB [ \-r\ directory ] -.RB [ \-p\ port ] -.RB [ \-g\ loglevel ] -.SH DESCRIPTION -.B partimaged -can be used to use partimage on network. Run partimaged on the computer where -you want to save imagefiles and run partimage on stations you want to backup. -.SH OPTIONS -.TP -.B \-D --daemon -Start server in daemon mode. -.TP -.B \-h --help -show help -.TP -.B \-v --version -show version -.TP -.B \-p port --port port -Give server's listening port. -.TP -.B \-d directory --dest directory -Directory where the images will be stored. -.TP -.B \-g debuglevel --debug debuglevel -Set the debug level to debuglevel (defaults to 1). -.TP -.B \-r dir --chroot dir -Use chroot to improve security. -.SH SEE ALSO -.BR partimage(1) , -.BR partimagedusers(5) -.SH DIAGNOSTICS -You can read options set at compile time running 'partimage -i'. -.SH BUGS -Refer to BUGS file to read them. -.SH AUTHOR -.nf -Franck Ladurelle <ladurelf@partimage.org> - - diff --git a/sys-block/partimage/files/partimaged.init.2 b/sys-block/partimage/files/partimaged.init.2 new file mode 100644 index 000000000000..707454d6b328 --- /dev/null +++ b/sys-block/partimage/files/partimaged.init.2 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 2005-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-block/partimage/files/partimaged.init.2,v 1.1 2010/11/19 19:36:33 flameeyes 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 --exec ${PARTIMAGED} \ + -- ${PARTIMAGED_OPTS} --daemon + eend $? || failed_startup +} + +stop() { + ebegin "Stopping partimaged" + start-stop-daemon --stop --exec ${PARTIMAGED} + eend $? +} diff --git a/sys-block/partimage/files/partimaged.pam.2 b/sys-block/partimage/files/partimaged.pam.2 new file mode 100644 index 000000000000..9ed5507a74f9 --- /dev/null +++ b/sys-block/partimage/files/partimaged.pam.2 @@ -0,0 +1,7 @@ +# PAM config file for Partimaged + +auth required pam_listfile.so onerr=fail item=user sense=allow file=/etc/partimaged/partimagedusers +auth optional pam_warn.so +auth include system-auth +account include system-auth +session include system-auth diff --git a/sys-block/partimage/files/partimagedusers.5 b/sys-block/partimage/files/partimagedusers.5 deleted file mode 100644 index 502312506202..000000000000 --- a/sys-block/partimage/files/partimagedusers.5 +++ /dev/null @@ -1,48 +0,0 @@ -.\" -.\" 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-block/partimage/partimage-0.6.9.ebuild b/sys-block/partimage/partimage-0.6.9.ebuild new file mode 100644 index 000000000000..c818f31e8718 --- /dev/null +++ b/sys-block/partimage/partimage-0.6.9.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.9.ebuild,v 1.1 2010/11/19 19:36:33 flameeyes Exp $ + +EAPI=3 +inherit 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 nologin 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/lib/partimage partimag +} + +src_configure() { + # XXX: Do we still need these? + filter-flags -fno-exceptions + use ppc && append-flags -fsigned-char + + local myconf + + use nologin && myconf="${myconf} --disable-login" + + if use pam && ! use static; then + myconf="${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 + + keepdir /var/lib/partimage + keepdir /var/log/partimage + + newinitd "${FILESDIR}"/partimaged.init.2 partimaged || die + newconfd "${FILESDIR}"/partimaged.conf partimaged || die + + if use ssl; then + insinto /etc/partimaged + doins "${FILESDIR}"/servercert.cnf || die + fi + + if use pam; then + newpamd "${FILESDIR}"/partimaged.pam.2 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 +} |