X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=packaging%2Fdeb%2Frules;h=dbad5031f9fda4379b6d150d0a88d2906a5b9cf6;hb=96f35b20267e8b1a1c846d476f27fcd330e0b018;hp=4f786779e323e8f930a2d0b4fb38b68eb1be678c;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/packaging/deb/rules b/packaging/deb/rules index 4f78677..dbad503 100755 --- a/packaging/deb/rules +++ b/packaging/deb/rules @@ -8,7 +8,7 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -AMVER=2.6.0 +AMVER=2.6.1p2 # These are variables that the user can override. They get used in various # places during configure, build, and install. @@ -22,8 +22,12 @@ MANDIR=$(PREFIX)/share/man DOCDIR=$(PREFIX)/share/doc SYSCONFDIR=/etc LOCALSTATEDIR=/var -AMHOMEDIR=$(LOCALSTATEDIR)/lib/amanda +AMANDAHOMEDIR=$(LOCALSTATEDIR)/lib/amanda LOGDIR=$(LOCALSTATEDIR)/log/amanda +# Extract the perl site_lib directory. This is used to install amanda's perl +# libs. If configure finds a different install or you specify a different path using +# --with-amperldir= make sure you change this variable as well. +PERLSITELIB=$(shell perl -V:installsitelib|sed -e"s:installsitelib='/::;s:'\;::") AMANDAUSER=amandabackup AMANDAGROUP=disk WITHOUT_SERVER="False" @@ -56,10 +60,9 @@ build-stamp: /sbin/dump /usr/bin/smbclient --libexecdir=$(LIBEXECDIR) \ --enable-shared \ --sysconfdir=$(SYSCONFDIR) \ - --localstatedir=$(LOCALSTATEDIR)\ - --with-star=/bin/star \ - --with-gnutar=/bin/tar \ - --with-gnutar-listdir=$(AMHOMEDIR)/gnutar-lists \ + --localstatedir=$(LOCALSTATEDIR) \ + --with-amdatadir=$(AMANDAHOMEDIR) \ + --with-gnutar-listdir=$(AMANDAHOMEDIR)/gnutar-lists \ --with-index-server=localhost \ --with-tape-server=localhost \ --with-user=$(AMANDAUSER) \ @@ -79,6 +82,13 @@ build-stamp: /sbin/dump /usr/bin/smbclient --enable-s3-device \ --disable-installperms touch missing + # There's probably a better way to do this. Preinst and postrm are the + # same for client and server, but we leave room for differences by just + # appending here. + cat $(shell pwd)/debian/preinst >> $(shell pwd)/debian/amanda-backup-client.preinst + cat $(shell pwd)/debian/preinst >> $(shell pwd)/debian/amanda-backup-server.preinst + cat $(shell pwd)/debian/postrm >> $(shell pwd)/debian/amanda-backup-client.postrm + cat $(shell pwd)/debian/postrm >> $(shell pwd)/debian/amanda-backup-server.postrm make touch build-stamp @@ -119,32 +129,35 @@ binary-arch: build dh_installchangelogs -v >> $(log) 2>&1 echo "---->dh_installdebconf: " >> $(log) dh_installdebconf -v >> $(log) 2>&1 - echo `pwd` >> $(log) - echo "---->dh_install -v: " >> $(log) + # Here's how we get the perl modules installed into sitelib + echo $(PERLSITELIB)/* >> debian/amanda-backup-server.install + echo "---->dh_install -v --fail-missing: " >> $(log) dh_install -v --sourcedir=debian/amanda-common >> $(log) 2>&1 echo "---->dh_strip: " >> $(log) dh_strip >> $(log) 2>&1 echo "---->dh_compress: " >> $(log) dh_compress >> $(log) 2>&1 - echo "---->dh_movefiles: " >> $(log) - dh_movefiles --sourcedir=debian/amanda-common >> $(log) 2>&1 echo "---->dh_fixperms: " >> $(log) dh_fixperms -v >> $(log) 2>&1 # fix perms manually chown -R $(AMANDAUSER):$(AMANDAGROUP) debian/*/var/lib/* #chmod -R u=rwX,g=rwX,o-rwx debian/*/var/lib/* - chown -R $(AMANDAUSER):$(AMANDAGROUP) $(server)/$(LOGDIR) + chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(LOGDIR) $(server)/$(LOGDIR) #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(LOGDIR) - chown -R $(AMANDAUSER):$(AMANDAGROUP) $(server)/$(SYSCONFDIR)/amanda + chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(SYSCONFDIR)/amanda $(server)/$(SYSCONFDIR)/amanda #chmod -R u=rwX,g=rwX,o-rwx $(server)/$(SYSCONFDIR)/amanda - chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMHOMEDIR)/gnutar-lists - chmod -R u=rwX,g=rwX,o-rwx $(client)/$(AMHOMEDIR)/gnutar-lists + chown -R $(AMANDAUSER):$(AMANDAGROUP) $(client)/$(AMANDAHOMEDIR)/gnutar-lists $(server)/$(AMANDAHOMEDIR)/gnutar-lists + chmod -R u=rwX,g=rwX,o-rwx $(client)/$(AMANDAHOMEDIR)/gnutar-lists $(server)/$(AMANDAHOMEDIR)/gnutar-lists # .. setuid chown root:disk \ + $(client)/$(AMLIBEXECDIR)/application/amgtar \ + $(client)/$(AMLIBEXECDIR)/application/amstar \ $(client)/$(AMLIBEXECDIR)/killpgrp \ $(client)/$(AMLIBEXECDIR)/rundump \ $(client)/$(AMLIBEXECDIR)/runtar \ $(client)/$(AMLIBEXECDIR)/calcsize \ + $(server)/$(AMLIBEXECDIR)/application/amgtar \ + $(server)/$(AMLIBEXECDIR)/application/amstar \ $(server)/$(AMLIBEXECDIR)/killpgrp \ $(server)/$(AMLIBEXECDIR)/rundump \ $(server)/$(AMLIBEXECDIR)/runtar \ @@ -153,10 +166,14 @@ binary-arch: build $(server)/$(AMLIBEXECDIR)/planner \ $(server)/usr/sbin/amcheck chmod u=srwx,g=rx,o=r \ + $(client)/$(AMLIBEXECDIR)/application/amgtar \ + $(client)/$(AMLIBEXECDIR)/application/amstar \ $(client)$(AMLIBEXECDIR)/killpgrp \ $(client)$(AMLIBEXECDIR)/rundump \ $(client)$(AMLIBEXECDIR)/runtar \ $(client)$(AMLIBEXECDIR)/calcsize \ + $(server)/$(AMLIBEXECDIR)/application/amgtar \ + $(server)/$(AMLIBEXECDIR)/application/amstar \ $(server)$(AMLIBEXECDIR)/killpgrp \ $(server)$(AMLIBEXECDIR)/rundump \ $(server)$(AMLIBEXECDIR)/runtar \ @@ -164,8 +181,8 @@ binary-arch: build $(server)$(AMLIBEXECDIR)/dumper \ $(server)$(AMLIBEXECDIR)/planner \ $(server)/usr/sbin/amcheck - echo "Amanda version $(AMVER)" > $(server)/$(AMHOMEDIR)/amanda-release - echo "Amanda version $(AMVER)" > $(client)/$(AMHOMEDIR)/amanda-release + echo "Amanda version $(AMVER)" > $(server)/$(AMANDAHOMEDIR)/amanda-release + echo "Amanda version $(AMVER)" > $(client)/$(AMANDAHOMEDIR)/amanda-release install -o root -g root -m 0644 debian/amanda-backup-client.lintian \ $(client)/usr/share/lintian/overrides/amanda-backup-client #install -o root -g root -m 0644 debian/amanda-common.lintian \ @@ -174,6 +191,7 @@ binary-arch: build $(server)/usr/share/lintian/overrides/amanda-backup-server dh_makeshlibs >> $(log) 2>&1 dh_installdeb >> $(log) 2>&1 + dh_perl >> $(log) 2>&1 dh_shlibdeps -l"debian/$(r)/usr/lib:debian/$(client)/usr/lib:debian/$(server)/usr/lib" >> $(log) 2>&1 # strip out the non-versioned amanda-common references, we need # the versioned ones in the control file and dupes are ugly...