rpms/partimage/devel README.partimage.html, NONE, 1.1 import.log, NONE, 1.1 partimage-0.6.7-gcc43.patch, NONE, 1.1 partimage.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Paulo Roma Cavalcanti roma at fedoraproject.org
Thu Dec 4 01:19:42 UTC 2008


Author: roma

Update of /cvs/pkgs/rpms/partimage/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22327/devel

Modified Files:
	.cvsignore sources 
Added Files:
	README.partimage.html import.log partimage-0.6.7-gcc43.patch 
	partimage.spec 
Log Message:
Initial partimage build.



--- NEW FILE README.partimage.html ---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt" lang="pt"><head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>How to Backup Partitions</title>

<!--=========================================================================-->
<A NAME=srcd></A>
<HR>
<h3>SystemRescueCd and Partimage</h3>
<p> <a href="http://www.sysresccd.org/Main_Page">System Rescue CD</a> 
is a live distribution with several tools for repairing file systems. 
It can be used through a <a href="http://www.sysresccd.org/Online-Manual-EN">CD-Rom</a>,
a pen-drive, or a floppy. 
In the case of a pendrive,
boot from a USB device must be <b>on</b> in the 
<a href="http://en.wikipedia.org/wiki/BIOS">BIOS</a>. Furthermore, in some mobos,
it is necessary to access the BIOS with the pendrive plugged in, select the tab <b>Boot ->
Hard Disk Drives</b>, and set the pendrive to be the <b>1st drive</b>. In any case,
the pendrive must be made <a href="http://linux.web.psi.ch/livecd/usbdisk.html">bootable</a>.
</p><p>
During the boot, SystemRescueCd detects the hardware and allows the choice of
the keyboard type. If the computer is on a network, just type <br>
<b>net-setup eth0</b> from the command-line,
and configure the network.
<p></p>
For creating partitions, <b>run_qtparted</b> used to start 
<a href="http://qtparted.sourceforge.net/">QtParted</a>.
Newer versions, however, are shipping <a href="http://gparted.sourceforge.net">gparted</a>, instead. 
In this case, <b>xinit</b> has to be run before calling gparted, because
it only works in graphical mode.
It is possible then to delete, create, or format partitions. It is never too much
to remind people to <u>backup</u> important data before any attempt to modify partitions.
There is always the risk of messing the 
<a href="http://ata-atapi.com/hiwtab.html">partition table</a>, 
although, in general, this does not happen.
<p></p>
<a href="http://www.partimage.org/Partimage-manual">Partimage</a>
can be used for backing up a partition, and its usage is straightforward. 
Just highlight the partition to be saved, choose a name for its backup,
and optionally another machine on the network, running a partimage server,
to receive the image. In the server, the file <b>/etc/sysconfig/partimaged</b>
should contain options like this:
</p><p>
OPTIONS="--port=4025 --nologin --dest /your_image_dir/images"
</p><p>
The client must always be run as <b>root</b>, and it can optionally use a password
for accessing the server. 
However, the client must have been compiled with "login" enabled, in this case. 
In fact, the client compilation options, and the server options, must match,
e.g., ssl and login. Otherwise, a "version mismatch" error occurs. 

Should your client use "login", the users allowed to connect to the server must
be listed in the file <b>/etc/partimaged/partimagedusers</b>, one per line.
If, besides using login, pam support is also enabled, the authentication
is done based on a db4 database created by the script 
<b>/usr/share/partimaged/partimaged-passwd</b>. The database entries
are pairs of (user,password). Please, read <b>man partimaged-passwd</b> for
getting all the options on how to add/delete users from the database.

</p><p>
For using the ssl capability, the certificates have to be created by running
<b>/usr/share/partimaged/create_certificates.sh</b>. The file 
<b>/etc/partimaged/partimage-certs.cnf</b> can be customized, in order to change
information, such as, Country, State and Location.
The client supplied with SystemRescueCd is not compiled with ssl or login 
enabled. However, for security reasons, the partimage package was created 
with pam and login enabled.
Please, note that, for disabling login in the server, it is enough to add 
the option <b>--nologin</b> to its configuration file, and <u>restart</u> the server.
To check which compilation options have been chosen, just type <b>partimaged -i</b>.

</p><p>
Another point is that the client and server architectures must be the same.
Therefore, if you use a CD with a 32 bit client, the server must be 
a 32 bit version too, even if it is running on a 64 bit platform. 

</p><p>
The backup files should be named using mnemonics easy to remember, such as,
boot-hostname-Fx or root-hostname-Fx. There is also an option to break
the image in parts, so they fit on a CD. Generally, 690MB is a good choice, 
which will produce root-hostname-Fx.000, root-hostname-Fx.001, etc...
If you do not want to save the image on another computer, 
then just mount another partition on the same computer to receive the image.
</p><p>
To restore a backup, just do the reverse, highlight the partition to be restored, 
and type the name of the first file of the backup: <b>root-hostname-Fx.000</b>.
<p></p>
Remember that the size of the partition to be restored must be 
<u>greater or equal</u> than the size of the saved partition. 
If it is greater, then the corresponding file system
should be enlarged to occupy all of the available space. For an 
<a href="http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/ch-ext3.html">ext3</a>
file system, use:
<p></p>
<b>e2fsck</b> -f /dev/sdan <br>
<b>resize2fs</b> -f /dev/sdan  
<p></p>
The enlargement of the size of the file system can be done at any time later, 
and it is not mandatory (but the excess is lost, otherwise).
</p>
</body></html>


--- NEW FILE import.log ---
partimage-0_6_7-5_fc8:HEAD:partimage-0.6.7-5.fc8.src.rpm:1228353414

partimage-0.6.7-gcc43.patch:

--- NEW FILE partimage-0.6.7-gcc43.patch ---
diff -Naurp partimage-0.6.7-orig/src/shared/net.h partimage-0.6.7/src/shared/net.h
--- partimage-0.6.7-orig/src/shared/net.h	2008-02-03 15:57:55.000000000 -0600
+++ partimage-0.6.7/src/shared/net.h	2008-07-16 20:04:02.000000000 -0600
@@ -28,7 +28,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
-#include <iostream.h>
+#include <iostream>
 #include <pthread.h>
 
 #include "pathnames.h"
diff -Naurp partimage-0.6.7-orig/src/server/partimaged.cpp partimage-0.6.7/src/server/partimaged.cpp
--- partimage-0.6.7-orig/src/server/partimaged.cpp	2008-02-03 15:57:53.000000000 -0600
+++ partimage-0.6.7/src/server/partimaged.cpp	2008-07-16 20:10:04.000000000 -0600
@@ -22,7 +22,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <iostream.h>
+#include <iostream>
 
 #include "net.h"
 #include "netserver.h"
diff -Naurp partimage-0.6.7-orig/src/server/partimaged-main.cpp partimage-0.6.7/src/server/partimaged-main.cpp
--- partimage-0.6.7-orig/src/server/partimaged-main.cpp	2008-02-03 15:57:53.000000000 -0600
+++ partimage-0.6.7/src/server/partimaged-main.cpp	2008-07-16 20:10:45.000000000 -0600
@@ -27,7 +27,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <iostream.h>
+#include <iostream>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <signal.h>


--- NEW FILE partimage.spec ---
%bcond_without login
%bcond_without pam
%bcond_with ssl

%define image_place  %{_localstatedir}/partimaged

%if %{with login}
%define lstat enabled
%else
%define lstat disabled
%endif

Summary: Partition imaging utility, much like Ghost
Name:    partimage
Version: 0.6.7
Release: 5%{?dist}
License: GPLv2+
Group:   Applications/System
URL:     http://www.partimage.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
Source1: %{name}-man.tar.gz
Source2: %{name}-scripts.tar.gz
Source3: README.partimage.html
# Changes include <iostream.h> for include <iostream> (gcc-c++ 4.3)
Patch0:  partimage-0.6.7-gcc43.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext
BuildRequires: autoconf 
BuildRequires: bzip2-devel
BuildRequires: libmcrypt-devel 
BuildRequires: newt-devel 
BuildRequires: parted-devel
BuildRequires: zlib-devel
%{?with_pam:BuildRequires: pam-devel}
%{?with_ssl:BuildRequires: openssl-devel}

%{?with_pam:Requires: compat-db}
Requires(post):   chkconfig /sbin/service
Requires(postun): chkconfig /usr/sbin/userdel
Requires(preun):  chkconfig /sbin/service
Requires(pre):    /usr/sbin/useradd

%description
Partimage is a Linux/UNIX partition imaging utility,
which saves partitions, having a supported filesystem, to an image file.
Partimage will only copy data from the used portions of the partition.
The image file can be compressed with gzip or bzip2 to save space, 
and can be split into multiple files to be copied on CDs/DVDs.

Partimage was compiled with login %{lstat}, 
and supporting the following filesystems:

  ext2fs, ext3fs, fat, fat16, fat32, hfs, hpfs, jfs,
  ntfs, reiserfs, reiserfs-3.5, reiserfs-3.6, ufs, xfs.

%package server
Summary: Server daemon for remote imaging, much like Ghost
Group: System Environment/Daemons

%description server
Partimage is a Linux/UNIX partition imaging utility,
which saves partitions, having a supported filesystem, to an image file.
Partitions can be saved across the network, by using the partimage 
network support, or using Samba / NFS. 

This package contains the server daemon for remote imaging.

%prep
%setup -q -a1 -a2
%patch0 -p1 -b .gcc43
for i in ./TODO ./README ./ChangeLog ./THANKS ./README.partimaged; do
        iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
        mv "${i}_" "$i"
done

# Disable chowning of files
%{__perl} -pi.orig -e 's|^\tchown partimag:root.*$|\\|' Makefile.in

# Fix mkinstalldirs during 'make install' in po/
%{__perl} -pi.orig -e 's|^(mkinstalldirs) = .+$|$1 = %{__mkdir_p}|' po/Makefile.in.in

%{__cat} <<EOF >partimaged.sysconfig
# See partimaged --help for more information on these options.
#
# NOTE: The client has always to be run as root.
# For the server being able to authenticate, the client has to be compiled 
# with login enabled. Otherwise, a "version mismatch" error occurs.
# Use --nologin, and restart partimaged, to disable login.
#
%if %{with login}
OPTIONS="--port=4025 --dest %{image_place}"
%else
OPTIONS="--port=4025 --nologin --dest %{image_place}"
%endif
EOF

%if %{with pam}
%{__cat} <<EOF >partimaged.pam
#%PAM-1.0

# Log access to partimaged
auth     required     pam_warn.so

# partimaged user database
auth     sufficient   pam_userdb.so db=%{_sysconfdir}/partimaged/passwd

# Only allow local users listed in partimagedusers to connect to partimaged
auth     required     pam_listfile.so onerr=fail item=user sense=allow file=%{_sysconfdir}/partimaged/partimagedusers

# partimaged user database
account  sufficient   pam_userdb.so debug db=%{_sysconfdir}/partimaged/passwd
EOF
%endif

%{__cat} <<EOF >partimaged.logrotate
%{_localstatedir}/log/partimaged/partimage*.log {
        missingok
        copytruncate
        notifempty
}
EOF

%build

%configure \
        --program-prefix="%{?_program_prefix}" \
        --with-log-dir="%{_localstatedir}/log/partimaged" \
        --with-xinerama \
        %{!?with_ssl:--disable-ssl} \
        %{!?with_login:--disable-login} \
        %{?with_pam:--enable-pam} \
        --enable-gui-text \
        --enable-gui-newt \
        --enable-gui-qt
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%makeinstall
%find_lang %{name}

%{__install} -Dp -m0755 partimaged.init.d %{buildroot}%{_initrddir}/partimaged
%{__install} -Dp -m0644 partimaged.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/partimaged
%{__install} -Dp -m0644 partimaged.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/partimaged

%{__install} -d -m0755 %{buildroot}%{_localstatedir}/log/partimaged
touch %{buildroot}%{_localstatedir}/log/partimaged/partimaged.log

%{__install} -d -m0755 %{buildroot}%{image_place}
%{__install} -Dp -m0644 partimage.1 %{buildroot}%{_mandir}/man1/partimage.1
%{__install} -Dp -m0644 partimaged.8 %{buildroot}%{_mandir}/man8/partimaged.8
%{__install} -Dp -m0644 partimagedusers.5 %{buildroot}%{_mandir}/man5/partimagedusers.5

%{__install} -Dp -m0644 partimage-certs.cnf %{buildroot}%{_sysconfdir}/partimaged/partimage-certs.cnf
%{__install} -Dp -m0744 partimage-create_certificates.sh %{buildroot}%{_datadir}/partimaged/create_certificates.sh
%{__install} -Dp -m0644 %{SOURCE3} %{_builddir}/%{name}-%{version}

%if %{with pam}
%{__install} -Dp -m0644 partimaged.pam %{buildroot}%{_sysconfdir}/pam.d/partimaged
%{__install} -Dp -m0644 partimaged-passwd.8 %{buildroot}%{_mandir}/man8/partimaged-passwd.8
%{__install} -Dp -m0744 partimaged-passwd %{buildroot}%{_datadir}/partimaged/partimaged-passwd
%endif


%pre server
/usr/sbin/useradd -M -r -s /sbin/nologin -d %{image_place} \
            -c "Partition imaging utility" partimag > /dev/null 2>&1 || :

%post server
if [ $1 -eq 1 ]; then
        /sbin/chkconfig --add partimaged
fi
/sbin/service partimaged condrestart &>/dev/null || :

%preun server
if [ $1 -eq 0 ]; then
        /sbin/service partimaged stop &>/dev/null || :
        /sbin/chkconfig --del partimaged
fi

%postun server
if [ "$1" -ge "1" ]; then
        /sbin/service partimaged condrestart &>/dev/null || :
fi
if [ $1 -eq 0 ] ; then
        /usr/sbin/userdel partimag >/dev/null 2>&1 || :
fi

%clean
%{__rm} -rf %{buildroot}

%files -f %{name}.lang
%defattr(-, root, root, 0755)
%doc AUTHORS BOOT* BUGS ChangeLog COPYING FUTURE README* THANKS TODO
%{_sbindir}/partimage
%{_mandir}/man1/partimage.1*
%exclude %{_docdir}/partimage

%files server
%defattr(-, root, root, 0755)
%doc AUTHORS BOOT* BUGS ChangeLog COPYING FUTURE README* THANKS TODO
%{_initrddir}/partimaged
%config(noreplace) %{_sysconfdir}/logrotate.d/partimaged
%config(noreplace) %{_sysconfdir}/sysconfig/partimaged
%dir %{_datadir}/partimaged
%if %{with pam}
%config(noreplace) %{_sysconfdir}/pam.d/partimaged
%{_datadir}/partimaged/partimaged-passwd
%{_mandir}/man8/partimaged-passwd.8*
%endif
%{_sysconfdir}/partimaged/partimage-certs.cnf
%{_datadir}/partimaged/create_certificates.sh
%{_mandir}/man8/partimaged.8*
%{_mandir}/man5/partimagedusers.5*
%{_sbindir}/partimaged
%ghost %{_localstatedir}/log/partimaged/partimaged.log

%defattr(-, partimag, partimag, 0755)
%config(noreplace) %{_sysconfdir}/partimaged/
%dir %{_localstatedir}/log/partimaged
%dir %{image_place}

%changelog
* Mon Dec 02 2008 Paulo Roma <roma at lcg.ufrj.br> - 0.6.7-5
- Owning %%{_datadir}/partimaged.
- Corrected Source URL.
- Removed macro home.
- Changed script permissions to 0744.
- Removed unneeded usermod.
- Deleted the created user in the %%postun section.

* Mon Dec 01 2008 Paulo Roma <roma at lcg.ufrj.br> - 0.6.7-4
- Changed default build to login and pam enabled.
- Added short explanation on how to use partimaged-passwd.

* Wed Nov 26 2008 Paulo Roma <roma at lcg.ufrj.br> - 0.6.7-3
- Added README.partimage.html
- Added BR zlib-devel.
- Added Requires compat-db for pam support.

* Wed Feb 06 2008 Paulo Roma <roma at lcg.ufrj.br> - 0.6.7-2
- Converted files to utf8.
- Patched for gcc-4.3.
- Added missing man pages.
- Using Source1 for creating %%{_initrddir}/partimaged
- Changed license.
- Created %%{image_place}.
- Conditional login, pam and ssl support.
- Changed pam.warn.so for pam_warn.so
- Added certificate generation and password script creation. 

* Wed Feb 06 2008 Paulo Roma <roma at lcg.ufrj.br> - 0.6.7-1
- Updated to release 0.6.7.
- Using find lang.
- Removed %%exclude %%{_infodir}

* Thu Aug 16 2007 Dag Wieers <dag at wieers.com> - 0.6.6-1
- Updated to release 0.6.6.

* Mon Dec 18 2006 Dag Wieers <dag at wieers.com> - 0.6.5-1
- Updated to release 0.6.5.

* Sat Mar 06 2004 Dag Wieers <dag at wieers.com> - 0.6.4-1
- Updated to release 0.6.4.

* Tue Jul 31 2003 Dag Wieers <dag at wieers.com> - 0.6.2-1
- Added seperate server package.

* Wed Jul 30 2003 Dag Wieers <dag at wieers.com> - 0.6.2-0
- Initial package. (using DAR)


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/partimage/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	4 Dec 2008 00:46:43 -0000	1.1
+++ .cvsignore	4 Dec 2008 01:19:12 -0000	1.2
@@ -0,0 +1,3 @@
+partimage-0.6.7.tar.bz2
+partimage-man.tar.gz
+partimage-scripts.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/partimage/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	4 Dec 2008 00:46:43 -0000	1.1
+++ sources	4 Dec 2008 01:19:12 -0000	1.2
@@ -0,0 +1,3 @@
+1c13530b43ea5c368c1c2fd0ab36bddb  partimage-0.6.7.tar.bz2
+2ca176278ca1dbe52d74f70812a693ab  partimage-man.tar.gz
+77e47a3cdd7d804ab7efae19143b23ec  partimage-scripts.tar.gz




More information about the fedora-extras-commits mailing list