On Sun, May 26, 2019 at 14:02:18 -0400, Nathan Stratton Treadway wrote:
> On Sun, May 26, 2019 at 11:47:14 -0600, Charles Curley wrote:
> > Having create a set of zmanda debian packages on one debian 9.9 machine,
> > I have copied those to another freshly built machine, and installed
> > them.
> > 
> > I seem to hit a problem with permissions and ownership
> > of /etc/amanda-security.conf.
> > 
> > amcheck wants /etc/amanda-security.conf, but the file is in /etc/amanda,
> > not /etc. That one cannot solve with a symlink. Copy the file instead.
> 
> (This sounds like an Debian-package-build issue; I'll see if I can spot
> an obvious problem in the scripts Chris has been working on.
> 
> You installed the amanda-backup-server package on this new VM, right?)

(Chris,)

Okay, the first part of the problem is that the Makefiles do not take
the --with-security-file setting into account when installing the
amanda-security.conf during the "installation" phase.  

(I haven't actually tried it myself, but I believe this would apply to
all builds, i.e. including non-Debian-package builds.)

I don't know enough about "configure" and friends to know the best way
to make the setting propagate to the install phase, but looks like the
issue is in .../common-src/Makefile, where there is the following
sequence of lines:

  CONFIG_DIR = /etc/amanda
  [...]
  etcamandadir = ${CONFIG_DIR}
  etcamanda_FILE = amanda-security.conf
  etcamanda_DATA = ${etcamanda_FILE}
  [...]

  install-etcamandaDATA: $(etcamanda_DATA)
        @$(NORMAL_INSTALL)
        @list='$(etcamanda_DATA)'; test -n "$(etcamandadir)" || list=; \
        if test -n "$$list"; then \
          echo " $(MKDIR_P) '$(DESTDIR)$(etcamandadir)'"; \
          $(MKDIR_P) "$(DESTDIR)$(etcamandadir)" || exit 1; \
        fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
        while read files; do \
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(etcamandadir)'"; \
          $(INSTALL_DATA) $$files "$(DESTDIR)$(etcamandadir)" || exit
          $$?; \
        done

So, if I follow everything correctly, the problem is that the whole
"install-etcamandaDATA" section of the script is devoted to installing
each file in "${etcamanda_DATA}" files into "${etcamandadir}"... but
actually the only file in that list is amanda-security.conf, the path to
which you are supposed to be able to specify with the
--with-security-file= option....

(Actually, given that .../config/amanda/defaults.m4 puts the file in
SYSCONFDIR by default, it seems like it will be extremely rare that
installing it in $CONFIG_DIR is the correct thing to do...)

Perhaps the whole section can just be switched to install the
"amanda-security.conf" directly to the "./configure"-calculated
"security-file" path?



Anyway, if that isn't going to be easy to fix at the Makefile level, you
may want to implement a short-term fix the Zmanda .deb files to work
around this problem....

The official Debian package works around it by using the line

  etc/amanda/amanda-security.conf etc

in amanda-client.install, rather than the 

  etc/amanda/*

line currently found in both packaging/deb/amanda-backup-*.install
files.

I think making this change in your two files would work okay, too, since
currently it seems the packages do not install any other files in
/etc/amanda (so eliminating the wildcard would not cause any other files
to be skipped):

  $ dpkg-deb -c amanda-backup-server_3.5.1.git.19364c7b-1Debian99_amd64.deb | 
grep /etc/amanda
  drwxrwx--- amandabackup/disk 0 2019-05-15 16:45 ./etc/amanda/
  -rw-rw---- amandabackup/disk 2034 2019-05-15 16:45 
./etc/amanda/amanda-security.conf
  $ dpkg-deb -c amanda-backup-client_3.5.1.git.19364c7b-1Debian99_amd64.deb | 
grep /etc/amanda
  drwxrwx--- amandabackup/disk 0 2019-05-15 16:45 ./etc/amanda/
  -rw-rw---- amandabackup/disk 2034 2019-05-15 16:45 
./etc/amanda/amanda-security.conf



                                                                Nathan


----------------------------------------------------------------------------
Nathan Stratton Treadway  -  [email protected]  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239

Reply via email to