From: Martin Langhoff <[EMAIL PROTECTED]> Sort out the server package, tidy up things along the way... --- Makefile.build | 14 ++++++++++++-- Makefile.fedora | 2 +- Makefile.package | 2 +- ds-backup.spec.in | 30 +++++++++++++++++++++++------- server/apache-ds-backup.conf | 6 +++--- 5 files changed, 40 insertions(+), 14 deletions(-)
diff --git a/Makefile.build b/Makefile.build index 78de8d4..1a9af81 100644 --- a/Makefile.build +++ b/Makefile.build @@ -10,8 +10,18 @@ install-client: install-server: install -D -d $(DESTDIR)/usr/bin - install -D server/postprocess.py $(DESTDIR)/usr/bin - + install -D server/ds-postprocess.py $(DESTDIR)/usr/bin + install -D -d $(DESTDIR)/var/www/ds-backup + install -D server/backup-available.py $(DESTDIR)/var/www/ds-backup + install -D server/ds-restore.php $(DESTDIR)/var/www/ds-backup + install -D -m 644 server/incron-ds-backup.conf $(DESTDIR)/etc/incron.d/ds-backup.conf + install -D -m 644 server/apache-ds-backup.conf $(DESTDIR)/etc/httpd/conf.d/050-ds-backup.conf + install -D -d $(DESTDIR)/var/lib/ds-backup + # ownerships are set in the spec file - this execs as nonroot in rpmbuild + install -D -d $(DESTDIR)/var/lib/ds-backup/recentclients + # todo: tighten to group ownership + install -D -d -m 777 $(DESTDIR)/var/lib/ds-backup/completion + install: install-client install-server .PHONY: install-client install-server diff --git a/Makefile.fedora b/Makefile.fedora index eb672a9..915a079 100644 --- a/Makefile.fedora +++ b/Makefile.fedora @@ -83,7 +83,7 @@ $(TARBALL): $(SRCDIR) $(foreach src,$(SOURCES),$(SRCDIR)/$(src)) tar cjf $(TARBALL) -C $(BUILDDIR) $(NV) $(SRPM): $(SPEC) $(TARBALL) - $(RPMBUILD) -bs $(BUILDDIR)/$(PKGNAME).spec + $(RPMBUILD) -bs --nodeps $(BUILDDIR)/$(PKGNAME).spec build: $(SRPM) $(MOCK) -r $(BUILDROOT) --uniqueext=`whoami` --resultdir=$(BUILDDIR) --rebuild $(SRPM) diff --git a/Makefile.package b/Makefile.package index 9ea9dd5..ed65bd4 100644 --- a/Makefile.package +++ b/Makefile.package @@ -2,7 +2,7 @@ PKGNAME = ds-backup COMPLETION = 0.6 RELEASE = 1 -SOURCES = README AUTHORS COPYING Makefile.build client server utils +SOURCES = README AUTHORS COPYING Makefile.build client server ARCH = noarch DIST = olpc diff --git a/ds-backup.spec.in b/ds-backup.spec.in index 97919e1..43ac878 100644 --- a/ds-backup.spec.in +++ b/ds-backup.spec.in @@ -29,18 +29,21 @@ Requires: python Requires: rsync Requires: sugar-datastore Requires: sugar -Requires: cronie +Requires: vixie-cron %package server Summary: OLPC DS backup & restore server Group: Applications/Archiving +Requires: mod_python Requires: python Requires: rsync -Requires: sugar-datastore -Requires: sugar -Requires: cronie +Requires: vixie-cron +Requires: incron +Requires: php +Requires: httpd +BuildRequires: httpd %description client ds-backup-client is a GPL-licensed collection of scripts for backing up and @@ -65,21 +68,34 @@ make -f Makefile.build install DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT +%post server +service httpd restart %files client %defattr(-,root,root,-) %doc README COPYING AUTHORS -%config(noreplace) %{_sysconfdir}/cron.d/ds-backup +%config %{_sysconfdir}/cron.d/ds-backup %{_bindir}/ds-backup.py %{_bindir}/ds-backup.sh %files server %defattr(-,root,root,-) %doc README COPYING AUTHORS -%{_bindir}/postprocess.py - +%config(noreplace) %{_sysconfdir}/httpd/conf.d/050-ds-backup.conf +# incron will mess up with an rpmsave file +# so replace inconditionally +%config %{_sysconfdir}/incron.d/ds-backup.conf +%{_bindir}/ds-postprocess.py +/var/www/ds-backup/backup-available.py +/var/www/ds-backup/ds-restore.php +%attr(700, apache, apache) %dir %{_localstatedir}/lib/ds-backup/recentclients +%attr(777, nobody, nobody) %dir %{_localstatedir}/lib/ds-backup/completion %changelog +* Fri Jul 18 2008 Martin Langhoff <[EMAIL PROTECTED] - 0.7-1.olpc3 +- Updated server package, several fixes. +- Fixed dependencies: cronie->vixie-cron (which cronie provides on F9) + * Mon Jul 06 2008 Michael Stone <[EMAIL PROTECTED]> - 0.6-1.olpc3 - Fix dependencies: crond -> cronie. diff --git a/server/apache-ds-backup.conf b/server/apache-ds-backup.conf index 7f7321a..0c5a14b 100644 --- a/server/apache-ds-backup.conf +++ b/server/apache-ds-backup.conf @@ -7,8 +7,8 @@ # clients check whether they are allowed to # backup now... # -Alias /backup/1 /usr/local/ds-backup/server/backup-available.py -<Directory /usr/local/ds-backup/server/ > +Alias /backup/1 /var/www/ds-backup/backup-available.py +<Directory /var/www/ds-backup/ > AddHandler mod_python .py PythonHandler backup-available ## Enable only in development boxen @@ -18,5 +18,5 @@ Alias /backup/1 /usr/local/ds-backup/server/backup-available.py # # /ds-restore is the per-file interactive restore UI # -Alias /ds-restore /usr/local/ds-backup/server/ds-restore.php +Alias /ds-restore /var/www/ds-backup/ds-restore.php -- 1.5.6.dirty _______________________________________________ Server-devel mailing list Server-devel@lists.laptop.org http://lists.laptop.org/listinfo/server-devel