All pastes #937067 Raw Edit

Unbenannt

public text v1 · immutable
·published 2008-03-10 20:35 UTC
rendered paste body
Name:         partimage
Version:      0.6.7
Release:      1.0
License:      GPL
Group:        Productivity/Archiving/Backup
Url:          http://www.partimage.org/
Requires:     newt openssl
Source:       partimage-%version.tar.bz2
BuildRoot:    %_tmppath/%name-%version-build
BuildRequires: libstdc++-devel zlib-devel lzo-devel newt-devel openssl-devel libmcrypt-devel gcc-c++ slang-devel
Summary:      Save and restore partition images
PreReq(post): /usr/sbin/useradd

%description
Partition Image is a Linux utility which saves partitions in the
ext2fs, reiserfs, hpfs, jpf, xfs, fat16, and fat32 formats an image
file. Only used blocks are copied to save the space and to increase the
speed. The image file can be compressed, in gzip, or bzip2 formats, and
can be splitted into small files to be copied on floppies (1,44 MB,
ZIP, ...) or CDRs.

Partition Image will only copy data from the used portions of the
partition. For speed and efficiency, free blocks are not written to the
image file. This is unlike the 'dd' command, which also copies empty
blocks.

Then, the partition can be restored if there is a problem on the
partition (file system error,virus, error in data, ...), from the image
file. It can also be used to install many identical PCs with the same
hardware. You just have to install an only PC, and you can copy the
linux partitions to all others.

Be careful, this is an alpha version. Then, there can be bugs, and
changes in the data format between differents versions. Don't backup
important data with it, and use the same version to save and to restore
the same image file. Please, report all bugs to the author.

See /usr/share/doc/packages/partimage/html for help.


Authors:
--------
 - Francois Dupoux <fdupoux@partimage.org>
 - Franck Ladurelle <ladurelf@partimage.org>

%package daemon
Group:        Productivity/Archiving/Backup
Summary:      Network daemon for serving partition images created with partimage

%description daemon
A network daemon partimage can connect to to get partition images from
or to save partition images to.

For more information about partimage see description of partimage.

NOTE: To use partimage-daemon you have to create an ssl certificate
first. Use /usr/share/doc/packages/partimage-daemon/make-certificate.sh
to do so.


Authors:
--------
 - Francois Dupoux <fdupoux@partimage.org>
 - Franck Ladurelle <ladurelf@partimage.org>

%define partimage_home /var/lib/partimage
%debug_package

%prep
%setup -q
%{?suse_update_config:%{suse_update_config -f }}

%build
#Fix for config.rpath error
#%__cp /usr/share/gettext/config.rpath .;
./autogen.sh;
%configure --with-log-dir=%_localstatedir/log;
%__make %{?jobs:-j%jobs};

%install
#%__rm -Rf %buildroot;
#%__mkdir %buildroot;
#%__make install DESTDIR=%buildroot;
%makeinstall
%__install -dm 755 %buildroot%partimage_home;
%__install -dm 755 %buildroot%_sysconfdir/partimaged;
#%__mkdir_p %buildroot%_sysconfdir/init.d/partimaged;
#%__install -Dm 755 %_sourcedir/partimaged %buildroot%_sysconfdir/init.d/partimaged;
%__install -Dm 755 %_sourcedir/partimaged %buildroot%_sysconfdir/init.d/partimaged;
touch %buildroot/%_sysconfdir/partimaged/partimagedusers;

# fedora noobs
%__mkdir_p %buildroot/%_docdir;
%__mv %buildroot/%_datadir/doc/partimage %buildroot/%_docdir;
%__mkdir_p %buildroot/%_docdir/partimage-daemon;
%__cp -r %buildroot/%_docdir/partimage/* %buildroot/%_docdir/partimage-daemon;


%pre daemon
/usr/sbin/useradd -r -d "%partimage_home" -s /bin/false -c "PartImage Daemon User" -g root partimag 2>/dev/null || :;

%post daemon
openssl req -newkey rsa:4096 -x509 -nodes -sha1 -days 3560 -subj '/C=/ST=/L=/CN=PartImage-daemon' -keyout %_sysconfdir/partimaged/partimaged.key -out %_sysconfdir/partimaged/partimaged.cert;
%__chown partimag %_sysconfdir/partimaged/partimaged.*
%__chmod 400 %_sysconfdir/partimaged/partimaged.key
%__chmod 444 %_sysconfdir/partimaged/partimaged.cert

%postun daemon
%__rm -Rf %_sysconfdir/partimaged
userdel partimag

%clean
test "%buildroot" != "/" && %__rm -rf %buildroot

%files
%defattr(-,root,root)
%doc %_docdir/partimage
%_sbindir/partimage
%_datadir/locale/*/*/*.mo

%files daemon
%defattr(-,root,root)
%doc %_docdir/partimage-daemon
#%dir %_sysconfdir/partimaged
%attr(600,partimag,root) %config(noreplace) %_sysconfdir/partimaged/partimagedusers
%attr(755,partimag,root) %dir %partimage_home
%_sbindir/partimaged
%attr(0755,root,root) %config %_sysconfdir/init.d/partimaged;