Summary: Partition Imager Name: partimage Version: 0.6.2 Release: 1 Copyright: GPL Group: Applications/System Source: ftp://unc.dl.sourceforge.net/sourceforge/partimage/partimage-0.6.2.tar.bz2 URL: http://www.partimage.org/ Distribution: SuSE Linux Packager: Dieter Demerre %description Partition Image is a Linux/UNIX partition imaging utility: it saves all used blocks in a partition to an image file. This image file can be compressed using gzip or bzip2 compression to save space, and even split into multiple files to be copied to movable media such as Zip disks or CD-R. The following partition types are supported: - Ext2FS (the Linux standard) - ReiserFS (a new, powerful journalling file system) - NTFS (Windows NT File System) - FAT16/32 (DOS & Windows file systems) - HPFS (OS/2 File System) This allows you to back up a full Linux/Windows system with a single operation. When problems such as viruses, crashes, or other errors occur, you just have to restore, and after several minutes your system can be restored (boot record and all your files) and fully working. This is also very useful when installing the same software on many machines: just install one of them, create an image, and just restore the image on all other machines. Then, after the first one, each machine installation can take just minutes. Provides: partimage Requires: glibc >= 2.3.2, libgcc >= 3.3, libstdc++ >= 3.3, zlib >= 1.1.4, bzip2 >= 1.0.2, lzo >= 1.08, newt >= 0.50, slang >= 1.4.9, libssl >= 0.9.6, libtool-libs >= 1.5.6, libmcrypt >= 2.5.7 %prep rm -rf $RPM_BUILD_DIR/partimage-0.6.2 bunzip2 -c $RPM_SOURCE_DIR/partimage-0.6.2.tar.bz2 | tar xvf - cd partimage-0.6.2 ./autogen.sh ./configure %build cd partimage-0.6.2 make %install cd partimage-0.6.2 make install %files /usr/local/share/locale/br/LC_MESSAGES/partimage.mo /usr/local/share/locale/da/LC_MESSAGES/partimage.mo /usr/local/share/locale/de/LC_MESSAGES/partimage.mo /usr/local/share/locale/es/LC_MESSAGES/partimage.mo /usr/local/share/locale/fi/LC_MESSAGES/partimage.mo /usr/local/share/locale/fr/LC_MESSAGES/partimage.mo /usr/local/share/locale/gl/LC_MESSAGES/partimage.mo /usr/local/share/locale/it/LC_MESSAGES/partimage.mo /usr/local/share/locale/nl/LC_MESSAGES/partimage.mo /usr/local/share/locale/pl/LC_MESSAGES/partimage.mo /usr/local/share/locale/sk/LC_MESSAGES/partimage.mo /usr/local/sbin/partimage /usr/local/sbin/partimaged /usr/local/info/partimage.lsm %post dir1=/usr/local/etc dir=$dir1/partimaged piufile=$dir/partimagedusers ; if test -f $piufile ; then cp $piufile "$piufile.rpmsave" ; echo "saving current installation in $piufile.rpmsave" ; else for d in $dir1 $dir; do if test ! -d $d; then mkdir $d; fi ; done ; echo "# note: '#' introduces comments" >$piufile ; echo -n "#add only users allowed to " >>$piufile ; echo "connect partimaged" >>$piufile ; echo "# (only one login per line)" >> $piufile ; echo "" >> $piufile ; echo "#sample # user 'sample' is allowed to connect partimaged" >> $piufile ; chmod 600 $piufile ; chown partimag.root $piufile ; fi ; sc=/usr/local/sbin/partimaged_makecert ; touch $sc ; chmod u+x $sc ; echo "#!/bin/bash" >$sc echo "" >>$sc echo "sslprg=/usr/bin/openssl ;">>$sc echo "if test ! -f \$sslprg ; then ">>$sc echo " echo \"SSL disabled, no certificate will be generated.\" ;">>$sc echo "else ">>$sc echo " echo \"generating certificate for partimage/partimaged ssl\" ;">>$sc echo " dir=/usr/local/etc/partimaged ;">>$sc echo " key=\$dir/partimaged.key ;">>$sc echo " cert=\$dir/partimaged.cert ;">>$sc echo " if test -f \$key -a -f \$cert ; then ">>$sc echo " echo \"key and certificate are already present in $dir.\"">>$sc echo " echo \"remove them if needed and execute this script again.\"">>$sc echo " else">>$sc echo " cd \$dir ;">>$sc echo " if test -f \$key ; then ">>$sc echo " mv \$key \$key.rpmsave ; ">>$sc echo " echo \"saving \$key.rpmsave\" ;">>$sc echo " fi ;">>$sc echo " if test -f \$cert ; then ">>$sc echo " mv \$cert \$cert.rpmsave ; ">>$sc echo " echo \"saving \$cert.rpmsave\" ; ">>$sc echo " fi ;">>$sc echo " touch privkey.pem ;">>$sc echo " rm -f privkey.pem ;">>$sc echo " script=\$dir/partimaged.csr ;">>$sc echo " \$sslprg req -new -x509 -outform PEM >\$script ;">>$sc echo " \$sslprg rsa -in privkey.pem -out \$key ;">>$sc echo " rm privkey.pem ;">>$sc echo " \$sslprg x509 -in \$script -out \$cert -signkey \$key ;">>$sc echo " rm \$script ;">>$sc echo " chmod 600 \$key ;">>$sc echo " chown partimag.root \$key ;">>$sc echo " chmod 600 \$cert ;">>$sc echo " chown partimag.root \$dir/partimaged.cert ;">>$sc echo " fi">>$sc echo "fi">>$sc dir=/usr/local/etc/partimaged ; key=$dir/partimaged.key ; cert=$dir/partimaged.cert ; echo ATTENTION! echo "**********" echo "- add users in /usr/local/etc/partimage/partimagaedusers that are allowed" echo "to contact the server (on the server-running system of course)." if test -f $key -a -f $cert ; then echo - ssl-certificates are already present. echo You should remove files in $dir if you want them to be regenerated, echo and then execute $sc. else echo - to generate ssl certificates, execute: $sc fi %postun #!/bin/bash sc=/tmp/rpm.uninstall.$$ ; touch $sc ; chmod u+x $sc ; rm -f /usr/local/sbin/partimaged_makecert ; echo "#!/bin/bash" >$sc echo "dir1=/usr/local/etc ; ">>$sc echo "dir=\$dir1/partimaged ; ">>$sc echo "if test -d \$dir ; then ">>$sc echo " key=\$dir/partimaged.key ; ">>$sc echo " cert=\$dir/partimaged.cert ; ">>$sc echo " users=\$dir/partimagedusers ; ">>$sc echo " for file in \$key \$cert \$users ; do ">>$sc echo " if test -f \$file ; then ">>$sc echo " rm -f \$file ; ">>$sc echo " fi ; ">>$sc echo " if test -f \$file.rpmsave ; then ">>$sc echo " mv \$file.rpmsave \$file ; ">>$sc echo " fi ; ">>$sc echo " done ; ">>$sc echo "fi ">>$sc echo "for d in \$dir \$dir1 ; do ">>$sc echo " if test -d \$d; then ">>$sc echo " if test 2 -eq \`ls -a \$d | wc -l\` ; then ">>$sc echo " rmdir \$d ;">>$sc echo " fi ;">>$sc echo " fi ;">>$sc echo "done ;">>$sc $sc if test ! -f /tmp/rpm.noremovescript.dieter; then rm -f $sc ; fi