From: Joe Z. <jz...@us...> - 2003-03-24 05:40:01
|
Update of /cvsroot/bobs/bobs In directory sc8-pr-cvs1:/tmp/cvs-serv31454/bobs Modified Files: INSTALL Makefile.am Makefile.in README TODO configure configure.in Added Files: bobs.spec Log Message: make rpm --- NEW FILE: bobs.spec --- Summary: Browseable Online Backup System (BOBS). Name: bobs Version: 0.5.1 Release: 1 License: GPL Group: Applications/Archiving Source0: http://download.sourceforge.net/bobs/bobs-%{version}.tar.gz URL: http://bobs.sourceforge.net BuildRoot: %{_tmppath}/%{name}-root Requires: sed, php, bash, rsync, portmap Patch0: config.patch Patch1: backup.patch Patch2: check_loop.patch %description Browseable Online Backup System (BOBS) is a complete online backup system. It uses large disks for storing backups and lets users browse the files using a Web browser. It handles some special files like AppleDouble and icon files. %prep %setup -q patch inc/config.php.in config.patch patch cron/backup.php.in backup.patch patch cron/check_loop.in check_loop.patch %build ./configure --prefix=$RPM_BUILD_ROOT %install make install %clean rm -rf $RPM_BUILD_ROOT %post # Install the cron job # Backup crontab, copy back all but check_loop, # then Add check_loop if test -f %{_sysconfdir}/crontab; then \ cp -vp %{_sysconfdir}/crontab %{_sysconfdir}/crontab.bak; \ grep -v current/process/check_loop \ %{_sysconfdir}/crontab.bak > %{_sysconfdir}/crontab; \ echo '0-59/5 * * * * root /var/bobsdata/current/process/check_loop' \ >> %{_sysconfdir}/crontab; \ fi %postun # Uninstall the cron job # Backup crontab and copy back all but check_loop if test -f %{_sysconfdir}/crontab; then \ cp -vp %{_sysconfdir}/crontab %{_sysconfdir}/crontab.bak; \ grep -v current/process/check_loop \ %{_sysconfdir}/crontab.bak > %{_sysconfdir}/crontab; \ fi %preun %files %defattr(-, root, root) %doc AUTHORS COPYING ChangeLog NEWS README TODO /var/www/html/bobs/ /etc/cron.daily/backup.php %defattr(-, %{HTTPDUSER}, root) /var/www/html/bobs/inc/servers /var/bobsdata %changelog * Fri Mar 21 2003 Joe Zacky <jz...@at...> - Make this work with existing install scripts. * Tue Oct 15 2002 Rene Rask <re...@gr...> - Initial RPM release. Index: INSTALL =================================================================== RCS file: /cvsroot/bobs/bobs/INSTALL,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- INSTALL 3 Feb 2003 06:01:47 -0000 1.18 +++ INSTALL 24 Mar 2003 05:39:58 -0000 1.19 @@ -29,8 +29,8 @@ nfs (nfs-utils) rsync ntpd (to keep time syncronized between servers.) -Possibly more. I'll add them when I discover them. samba +Possibly more. I'll add them when I discover them. ::: 2.0 Files Changes were recently made to remove the need for BOBS to reside in @@ -108,6 +108,9 @@ ::: 4.0 Configuration +Note: This section is obsoleted by section "7.0 Easy install", but it +has some useful detailed information. + Edit the file "inc/config.php" to suit your needs. The dirs you define there are base dirs for servers you wish to make backups of. backupdir = a mirror of the remote server @@ -166,6 +169,10 @@ ::: 5.0 Test your setups + +Note: This section is also obsoleted by section "7.0 Easy install", +but it has some useful detailed information. + mount the nfs shares, try to write a file. example of a mount command: mount servername:/home/username /mnt/test @@ -289,30 +296,31 @@ value of the admin_pwd variable. By default, config.php will be in /var/www/html/bobs/inc/config.php. -4. If you want to uninstall bobs, or change your configuration: +4. Bobs is now installed. - Run 'make uninstall' to remove the bobs web pages and delete the + Point your browser to http://your.server.name/bobs/admin.php to + configure your backups. + +5. If you want to uninstall bobs, or change your configuration: + + Run 'make uninstall' from the directory where you extracted + the bobs files to remove the bobs web pages and delete the backup data directories. You can then run ./configure and 'make install' again. - You may run 'make clean' before running ./configure a second time to - ensure the reconfiguration of all options. + You may want to run 'make clean' before running ./configure a + second time to ensure the reconfiguration of all options. - If you have trouble with the ./configure script, you can - rebuild it by running these commands from the bobs distribution - directory: + If you're have trouble with the ./configure script or 'make + install', you can rebuild it by running these commands from the + bobs distribution directory: - make distclean + make maintainer-clean aclocal automake --add-missing autoconf ./configure -5. Bobs is now installed. - - Point your browser to http://localhost/bobs/admin.php to configure - your backup servers. - ::: 8.0 Problems If you're having trouble, read this section. @@ -329,21 +337,36 @@ portmap nfs +Third, you can get support via the forum or mailing list at +http://sourceforge.net/projects/bobs. + + +Q: When I try to restore, the "Check Server" fails. + +A: Make sure the shared directory you're restoring to is writeable. + + ::: 9.0 What gets installed? -/var/bobsdata Directory for backup and configuration data +/var/bobsdata Directory for backup files, a few scripts, and + mount points. /var/www/html/bobs Bobs web pages /etc/crontab A line is added to /etc/crontab that - checks/starts the backup command loop script. + starts the backup command loop script if it's + not already running. 0-59/5 * * * * root /var/bobsdata/current/process/check_loop +/etc/cron.daily/backup.php + This is the script that runs the backups once + per day. + 'make uninstall' and 'make uninstall-all' will remove the files and directories listed above, including the check_loop entry in crontab. -'make uninstall' will not remove any server configurations or backups you -created since installing bobs. But 'make uninstall-all' WILL remove all -the files and directories, including any backups. So only run 'make -uninstall-all' if you want to completely remove bobs and all backups -created by bobs. +'make uninstall' will not remove any server configurations or backups +you created since installing bobs. But 'make uninstall-all' WILL +remove all the files and directories, including any backups. So only +run 'make uninstall-all' if you want to completely remove bobs and all +configurations and backups created by bobs. Index: Makefile.am =================================================================== RCS file: /cvsroot/bobs/bobs/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.am 5 Feb 2003 02:05:21 -0000 1.10 +++ Makefile.am 24 Mar 2003 05:39:58 -0000 1.11 @@ -32,6 +32,9 @@ dist_html_DATA = $(wildcard *.php *.css) +EXTRA_DIST = bobs.spec config.patch backup.patch check_loop.patch \ + FILES LICENSE VERSION + # # Other files to be removed for maintainer (me) # @@ -42,11 +45,25 @@ mkinstalldirs \ missing \ install-sh \ - aclocal.m4 + aclocal.m4 \ + *.patch .PHONY: uninstall-all install-data-local distclean-local uninstall-local \ - installdirs + installdirs rpm + +# +# Need to make patch files before the distribution is built. +# The patches change the directory names in the files from +# /var/tmp/... to the final destination, like /var/bobsdata +# +config.patch: + -diff -uN inc/config.php.in inc/config.php > config.patch + +backup.patch: + -diff -uN cron/backup.php.in cron/backup.php > backup.patch +check_loop.patch: + -diff -uN cron/check_loop.in cron/check_loop > check_loop.patch install-data-local: @@ -65,7 +82,8 @@ # so make the httpd process own the directory if test -n "$(myHTTPDUSER)"; then \ - chown -R $(myHTTPDUSER) $(myBOBSDATA); \ + chown -R $(myHTTPDUSER) $(myBOBSDATA) \ + || echo "** Please run 'chown -R $(myHTTPDUSER) $(myBOBSDATA)'"; \ fi # Remove some other crap for 'make distclean' @@ -75,7 +93,7 @@ -chmod 755 $(PACKAGE)-$(VERSION) -rm -rf $(PACKAGE)-$(VERSION) rm -f $(PACKAGE)-$(VERSION).tar.gz - + -rm -rf rpmdir # # Extra stuff to uninstall # The '-' on '-rmdir' tells 'make' to ignore any error returned by command @@ -94,5 +112,26 @@ rm -rf $(myWEBDIR) rm -rf $(myBOBSDATA) make -f cron/Makefile uninstall-local + +rpm: dist + +# architecture. for example: i386 +RPMARCH = `rpm --showrc | awk '/^build arch/ {print $$4}'` + +# make the rpm directories +RPMDIR = $(PWD)/rpmdir + mkdir -p \ + $(RPMDIR)/BUILD \ + $(RPMDIR)/SPECS \ + $(RPMDIR)/SOURCES \ + $(RPMDIR)/SRPMS \ + $(RPMDIR)/RPMS/$(RPMARCH) +# copy the distribution tar into the rpm source directory + cp -f $(PACKAGE)-$(VERSION).tar.gz $(RPMDIR)/SOURCES + cp -f *.patch $(RPMDIR)/SOURCES + + rpmbuild --clean -ba $(top_srcdir)/$(PACKAGE).spec \ + --define "_topdir $$PWD/rpmdir" \ + --define "HTTPDUSER $(myHTTPDUSER)" ## END Index: Makefile.in =================================================================== RCS file: /cvsroot/bobs/bobs/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.in 5 Feb 2003 02:05:21 -0000 1.7 +++ Makefile.in 24 Mar 2003 05:39:58 -0000 1.8 @@ -101,6 +101,10 @@ # The 'dist_' prefix tells 'make dist' to distribute these files. dist_html_DATA = $(wildcard *.php *.css) +EXTRA_DIST = bobs.spec config.patch backup.patch check_loop.patch \ + FILES LICENSE VERSION + + # # Other files to be removed for maintainer (me) @@ -111,8 +115,15 @@ mkinstalldirs \ missing \ install-sh \ - aclocal.m4 + aclocal.m4 \ + *.patch + +# architecture. for example: i386 +RPMARCH = `rpm --showrc | awk '/^build arch/ {print $$4}'` + +# make the rpm directories +RPMDIR = $(PWD)/rpmdir subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -455,7 +466,21 @@ .PHONY: uninstall-all install-data-local distclean-local uninstall-local \ - installdirs + installdirs rpm + +# +# Need to make patch files before the distribution is built. +# The patches change the directory names in the files from +# /var/tmp/... to the final destination, like /var/bobsdata +# +config.patch: + -diff -uN inc/config.php.in inc/config.php > config.patch + +backup.patch: + -diff -uN cron/backup.php.in cron/backup.php > backup.patch + +check_loop.patch: + -diff -uN cron/check_loop.in cron/check_loop > check_loop.patch install-data-local: @@ -474,7 +499,8 @@ # so make the httpd process own the directory if test -n "$(myHTTPDUSER)"; then \ - chown -R $(myHTTPDUSER) $(myBOBSDATA); \ + chown -R $(myHTTPDUSER) $(myBOBSDATA) \ + || echo "** Please run 'chown -R $(myHTTPDUSER) $(myBOBSDATA)'"; \ fi # Remove some other crap for 'make distclean' @@ -484,7 +510,7 @@ -chmod 755 $(PACKAGE)-$(VERSION) -rm -rf $(PACKAGE)-$(VERSION) rm -f $(PACKAGE)-$(VERSION).tar.gz - + -rm -rf rpmdir # # Extra stuff to uninstall # The '-' on '-rmdir' tells 'make' to ignore any error returned by command @@ -503,6 +529,21 @@ rm -rf $(myWEBDIR) rm -rf $(myBOBSDATA) make -f cron/Makefile uninstall-local + +rpm: dist + mkdir -p \ + $(RPMDIR)/BUILD \ + $(RPMDIR)/SPECS \ + $(RPMDIR)/SOURCES \ + $(RPMDIR)/SRPMS \ + $(RPMDIR)/RPMS/$(RPMARCH) +# copy the distribution tar into the rpm source directory + cp -f $(PACKAGE)-$(VERSION).tar.gz $(RPMDIR)/SOURCES + cp -f *.patch $(RPMDIR)/SOURCES + + rpmbuild --clean -ba $(top_srcdir)/$(PACKAGE).spec \ + --define "_topdir $$PWD/rpmdir" \ + --define "HTTPDUSER $(myHTTPDUSER)" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Index: README =================================================================== RCS file: /cvsroot/bobs/bobs/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README 3 Jun 2002 06:30:35 -0000 1.2 +++ README 24 Mar 2003 05:39:58 -0000 1.3 @@ -6,7 +6,8 @@ BOBS is a backup system that uses harddisks as backup media. -Files are fetched from other computers and stored in dirs. +Files are fetched from other computers and stored in +directories on the computer where bobs is installed. Two types of file stores are used: "Current" is the files from the remote computer as @@ -25,7 +26,7 @@ If a user deletes or corrupts a file and need it restored they can do this by opening a browser (any browser which supports frames should be fine) and pointing it at the -backupserver. +backupserver where bobs is installed. On the backupserver they can login in using a password defined by the admin. For clarity that should be the @@ -49,7 +50,3 @@ Project page: http://sourceforge.net/projects/bobs Forum and help are available at the project page. - - - - Index: TODO =================================================================== RCS file: /cvsroot/bobs/bobs/TODO,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- TODO 3 Feb 2003 05:49:52 -0000 1.10 +++ TODO 24 Mar 2003 05:39:58 -0000 1.11 @@ -39,6 +39,12 @@ Backup directories (/var/bobsdata/) should not be world readable. Encrypt passwords. +Make 'cmdloop' script a service. + Priority: Medium + There's no reason 'check_loop' needs to keep running once 'cmdloop' + has started. Make cmdloop start as a service from the init.d + directory. + ----- WISHLIST ------ (Add anything you would like to see in the future, in detail if possible) Index: configure =================================================================== RCS file: /cvsroot/bobs/bobs/configure,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure 5 Feb 2003 02:05:21 -0000 1.5 +++ configure 24 Mar 2003 05:39:58 -0000 1.6 @@ -2537,18 +2537,9 @@ echo -n " web pages directory = "; eval echo $myWEBDIR echo -n " bobs data directory = "; eval echo $myBOBSDATA echo -n " cron directory = "; eval echo $myCRONDIR +echo -n " crontab directory = "; eval echo $myCRONTABDIR echo " admin password = $myPASS" echo "" echo "*** $WARNCOUNT warning(s)" echo "" -echo "The following is just for testing and will be removed:" -echo "" -echo "prefix: ${prefix}" -echo "sysconfdir: ${sysconfdir}" -echo "myWEBDIR: ${myWEBDIR}" -echo "myrealWEBDIR: ${myrealWEBDIR}" -echo "myBOBSDATA: ${myBOBSDATA}" -echo "myrealBOBSDATA: ${myrealBOBSDATA}" -echo "myCRONDIR: ${myCRONDIR}" -echo "myCRONTABDIR: ${myCRONTABDIR}" Index: configure.in =================================================================== RCS file: /cvsroot/bobs/bobs/configure.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- configure.in 5 Feb 2003 02:05:22 -0000 1.7 +++ configure.in 24 Mar 2003 05:39:58 -0000 1.8 @@ -165,19 +165,20 @@ echo -n " web pages directory = "; eval echo $myWEBDIR echo -n " bobs data directory = "; eval echo $myBOBSDATA echo -n " cron directory = "; eval echo $myCRONDIR +echo -n " crontab directory = "; eval echo $myCRONTABDIR echo " admin password = $myPASS" echo "" echo "*** $WARNCOUNT warning(s)" echo "" -echo "The following is just for testing and will be removed:" -echo "" -echo "prefix: ${prefix}" -echo "sysconfdir: ${sysconfdir}" -echo "myWEBDIR: ${myWEBDIR}" -echo "myrealWEBDIR: ${myrealWEBDIR}" -echo "myBOBSDATA: ${myBOBSDATA}" -echo "myrealBOBSDATA: ${myrealBOBSDATA}" -echo "myCRONDIR: ${myCRONDIR}" -echo "myCRONTABDIR: ${myCRONTABDIR}" +dnl> echo "The following is just for testing and will be removed:" +dnl> echo "" +dnl> echo "prefix: ${prefix}" +dnl> echo "sysconfdir: ${sysconfdir}" +dnl> echo "myWEBDIR: ${myWEBDIR}" +dnl> echo "myrealWEBDIR: ${myrealWEBDIR}" +dnl> echo "myBOBSDATA: ${myBOBSDATA}" +dnl> echo "myrealBOBSDATA: ${myrealBOBSDATA}" +dnl> echo "myCRONDIR: ${myCRONDIR}" +dnl> echo "myCRONTABDIR: ${myCRONTABDIR}" dnl> THE END |