]> git.pld-linux.org Git - packages/BackupPC.git/blobdiff - BackupPC.spec
- adapterized (sorted %verify attrs)
[packages/BackupPC.git] / BackupPC.spec
index bf7414dd81ca720b84115cd67f9ed4171ca9b2f8..f094b625aaaa0a52c8a1a1d08c56aea9335738ce 100644 (file)
@@ -1,13 +1,11 @@
 
 # - now path in browser is  http://localhost/cgi/BackupPC/BackupPC_Admin
 # TODO:
+# - polish translation in SOURCE/backuppc-pl.pm
 # - patch for service user - now is static backuppc
 # - patch at user and gid/uid user - http://sourceforge.net/mailarchive/forum.php?thread_id=6201024&forum_id=17540
 # - compliant to FHS - http://sourceforge.net/mailarchive/forum.php?thread_id=5602342&forum_id=17540 - directory /var/log/backuppc
 # - change or/and add Requires for  --bin-path sendmail=%{_sbindir}/sendmail
-# - ping not working --bin-path ping=/bin/ping
-# - add patch for encoding web page in iso-8859-2 or utf-8
-# - add patch for error "Unable to open /usr/bin/../doc/BackupPC.html"
 # - correct config file
 
 %define                BPCuser         http
 Summary:       A high-performance, enterprise-grade system for backing up PCs
 Summary(pl):   Wysoko wydajny, profesjonalnej klasy system do kopii zapasowych z PC
 Name:          backuppc
-Version:       2.1.1
-Release:       0.2
+Version:       2.1.2
+Release:       2
 License:       GPL
 Group:         Networking/Utilities
 Source0:       http://dl.sourceforge.net/backuppc/BackupPC-%{version}.tar.gz
-# Source0-md5: fadbce1c3d4679dffc98514e48ed7917
+# Source0-md5: 72fc0f09084f44c42ba5d22451cfe29b
 Source1:       %{name}_apache.conf
 Source2:       %{name}_htaccess
 Source3:       %{name}-pl.pm
 Patch0:                %{name}-usernotexist.patch
+Patch1:                %{name}-pathtodocs.patch
 URL:           http://backuppc.sourceforge.net/
 BuildRequires: perl-Compress-Zlib
 BuildRequires: perl-Digest-MD5
-BuildRequires: perl-base
 BuildRequires: perl-devel >= 1:5.6.0
-BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: rpm-perlprov
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: sed >= 4.0
-Requires:      apache
-Requires:      perl-File-RsyncP
+Requires:      apache >= 2.0
+Requires:      apache(mod_auth)
 Requires:      apache-mod_perl
+Requires:      par2cmdline
+Requires:      perl-Archive-Zip
+Requires:      perl-Compress-Bzip2
+Requires:      perl-Compress-Zlib
+Requires:      perl-File-RsyncP >= 0.52
+Requires:      rsync
 Requires:      samba-client
 Requires:      sperl
 Requires:      tar > 1.13
@@ -51,25 +56,24 @@ BackupPC is disk based and not tape based. This particularity allows
 features not found in any other backup solution:
 - Clever pooling scheme minimizes disk storage and disk I/O. Identical
   files across multiple backups of the same or different PC are stored
-  only once (using hard links), resulting in substantial savings in
-  disk storage and disk writes.
+  only once (using hard links), resulting in substantial savings in disk
+  storage and disk writes.
 - Optional compression provides additional reductions in storage. CPU
   impact of compression is low since only new files (those not already
   in the pool) need to be compressed.
 - A powerful http/cgi user interface allows administrators to view log
-  files, configuration, current status and allows users to initiate
-  and cancel backups and browse and restore files from backups very
-  quickly.
+  files, configuration, current status and allows users to initiate and
+  cancel backups and browse and restore files from backups very quickly.
 - No client-side software is needed. On WinXX the SMB protocol is
-  used. On Linux or unix clients, rsync or tar (over ssh/rsh/NFS) can
-  be used.
+  used. On Linux or unix clients, rsync or tar (over ssh/rsh/NFS) can be
+  used.
 - Flexible restore options. Single files can be downloaded from any
   backup directly from the CGI interface. Zip or Tar archives for
   selected files or directories can also be downloaded from the CGI
   interface.
 - BackupPC supports mobile environments where laptops are only
-  intermittently connected to the network and have dynamic IP
-  addresses (DHCP).
+  intermittently connected to the network and have dynamic IP addresses
+  (DHCP).
 - Flexible configuration parameters allow multiple backups to be
   performed in parallel.
 - and more to discover in the manual...
@@ -86,16 +90,16 @@ zapasowych:
   Obci±¿enie procesora jest ma³e, poniewa¿ tylko nowe pliki musz± byæ
   kompresowane.
 - Potê¿ny interfejs u¿ytkownika HTTP/CGI pozwala administratorom
-  przegl±daæ pliki logów, konfiguracjê i aktualny stan oraz
-  u¿ytkownikom rozpoczynaæ lub przerywaæ tworzenie kopii oraz szybko
-  przegl±daæ i odtwarzaæ pliki z kopii zapasowych.
+  przegl±daæ pliki logów, konfiguracjê i aktualny stan oraz u¿ytkownikom
+  rozpoczynaæ lub przerywaæ tworzenie kopii oraz szybko przegl±daæ i
+  odtwarzaæ pliki z kopii zapasowych.
 - Nie jest wymagane oprogramowanie po stronie klienta. Na WinXX
   u¿ywany jest protokó³ SMB lub rsync (specjalnie przygotowana wersja
   pod cygwinem). Na klientach linuksowych lub uniksowych mo¿na u¿ywaæ
   rsynca lub tara (po ssh/rsh/NFS).
 - Dostêpne s± elastyczne opcje odzyskiwania. Mo¿na ¶ci±gaæ pojedyncze
-  pliki z kopii bezpo¶rednio z interfejsu CGI. Tak¿e archiwa zip lub
-  tar z wybranymi plikami lub katalogami mog± byæ ¶ci±gane z poziomu
+  pliki z kopii bezpo¶rednio z interfejsu CGI. Tak¿e archiwa zip lub tar
+  z wybranymi plikami lub katalogami mog± byæ ¶ci±gane z poziomu
   interfejsu CGI.
 - BackupPC obs³uguje ¶rodowiska przeno¶ne, gdzie laptopy s± pod³±czane
   do sieci tylko z przerwami i maj± dynamiczne adresy IP (z DHCP).
@@ -106,6 +110,7 @@ zapasowych:
 %prep
 %setup -q -n BackupPC-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 sed -i -e 's#!/bin/perl#!%{__perl}#' configure.pl
@@ -138,6 +143,7 @@ install -d          $RPM_BUILD_ROOT/etc/{rc.d/init.d,httpd/httpd.conf} \
        --bin-path df=/bin/df \
        --bin-path ssh=%{_bindir}/ssh \
        --bin-path sendmail=%{_sbindir}/sendmail \
+       --bin-path par2=%{_bindir}/par \
        --bin-path hostname=/bin/hostname \
        --bin-path split=%{_bindir}/split \
        --bin-path cat=/bin/cat \
@@ -189,25 +195,14 @@ cd $RPM_BUILD_ROOT%{_datadir}/%{name}/www/html
 ln -sf %{_sysconfdir}/%{name}/BackupPC_stnd.css BackupPC_stnd.css
 
 
+%if 0
+
 %pre
-# Add the "backuppc" user and group
-#if [ -n "`/usr/bin/getgid %{BPCgroup}`" ]; then
-#      if [ "`/usr/bin/getgid %{BPCgroup}`" != "150" ]; then
-#              echo "Error: group %{BPCgroup} doesn't have gid=150. Correct this before installing %{name}." 1>&2
-#              exit 1
-#      fi
-#else
-#      /usr/sbin/groupadd -g 150 %{BPCgroup}
-#fi
-#if [ -n "`/bin/id -u %{BPCuser} 2>/dev/null`" ]; then
-#      if [ "`/bin/id -u %{BPCuser}`" != 150 ]; then
-#              echo "Error: user %{BPCuser} doesn't have uid=150. Correct this before installing %{name}." 1>&2
-#              exit 1
-#      fi
-#else
-#      /usr/sbin/useradd -c "system user for %{name}" -u 150 \
-#              -d /home/services/BackupPC -s /bin/false -g %{BPCgroup} %{BPCuser} 1>&2
-#fi
+# Add the "backuppc" user and "http" group
+%groupadd -g 150 %{BPCgroup}
+%useradd -c "system user for %{name}" -u 150 -d /var/lib/backuppc -s /bin/false -g %{BPCgroup} %{BPCuser}
+%endif
+
 %preun
 if [ "$1" = "0" ]; then
        if [ -f /var/lock/subsys/backuppc ]; then
@@ -218,7 +213,8 @@ fi
 
 
 %post
-if ![ -f /etc/backuppc/password ]; then
+if [ ! -f /etc/backuppc/password ]; then
+# FIXME? $PASS variable cames from?
        openssl rand -base64 6 > $PASS
        /usr/bin/htpasswd -cb /etc/backuppc/password admin $PASS
        echo "Your web pasword is: $PASS ."
@@ -228,7 +224,7 @@ fi
 if [ -f /var/lock/subsys/backuppc ]; then
        /etc/rc.d/init.d/backuppc restart
 else
-       echo "Run \"/etc/rc.d/init.d/backuppc start\" to start BackupPC." 
+       echo "Run \"/etc/rc.d/init.d/backuppc start\" to start BackupPC."
 fi
 
 %postun
@@ -252,7 +248,7 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_datadir}/%{name}/www/html
 %dir %{_datadir}/%{name}/www/cgi-bin
 %{_datadir}/%{name}/www/html/*.gif
-%config(noreplace) %verify(not md5 size mtime) %{_datadir}/%{name}/www/html/BackupPC_stnd.css
+%config(noreplace) %verify(not md5 mtime size) %{_datadir}/%{name}/www/html/BackupPC_stnd.css
 %dir %{_libdir}/BackupPC
 %{_libdir}/BackupPC/Attrib.pm
 %{_libdir}/BackupPC/FileZIO.pm
@@ -278,9 +274,8 @@ rm -rf $RPM_BUILD_ROOT
 %dir %attr(750,%{BPCuser},%{BPCgroup}) %{_var}/lib/%{name}/trash
 %dir %attr(755,%{BPCuser},%{BPCgroup}) %{_var}/lib/%{name}/conf
 %dir %attr(750,%{BPCuser},%{BPCgroup}) %{_var}/log/%{name}
-%attr(750,root,root) /etc/rc.d/init.d/backuppc
+%attr(754,root,root) /etc/rc.d/init.d/backuppc
 %{_sysconfdir}/httpd/httpd.conf/93_backuppc.conf
 %dir %{_sysconfdir}/%{name}
-%config(noreplace) %verify(not md5 size mtime) %attr(644,%{BPCuser},%{BPCgroup})  %{_sysconfdir}/%{name}/*
-#%config(noreplace) %verify(not md5 size mtime) %attr(644,%{BPCuser},%{BPCgroup}) %{_var}/lib/%{name}/conf
+%config(noreplace) %verify(not md5 mtime size) %attr(644,%{BPCuser},%{BPCgroup})  %{_sysconfdir}/%{name}/*
 %{_mandir}/man8/backuppc*
This page took 0.114531 seconds and 4 git commands to generate.