cannot create directory `/var/spool/burp': Permission denied

Hello,

I try to get burp (Backup software) to build on OBS.

Works fine for OpenSUSE, but fails for CentOS.

Has anyone a clue why the same build file fails for CentOS, because of:

77s] mkdir: cannot create directory `/var/spool/burp’: Permission denied

Thanks for any advice,
Thomas


   39s] + export FFLAGS
   39s] + ./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i386-redhat-linux --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc/burp --with-openssl --disable-static --with-tcp-wrappers
   39s] checking for true... /bin/true

   67s] Configuration on Wed Oct 10 11:24:34 UTC 2012:
   67s] 
   67s]    Host:            i686-redhat-linux-gnu -- unknown 
   67s]    Burp version:        Burp 1.3.16
   67s]    Source code location:    .
   67s]    Install binaries:        /usr/sbin
   67s]    Install config files:    /etc/burp
   67s]    Man directory:        /usr/share/man
   67s]    C Compiler:            gcc
   67s]    C++ Compiler:        g++
   67s]    Compiler flags:         -O2 -g -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing -fno-exceptions -fno-rtti
   67s]    Linker flags:         
   67s]    Libraries:            
   67s]    Static:            
   67s] 
   67s]    ncurses:            yes
   67s]    openssl:            yes
   67s]    zlib:            yes
   67s]    librsync:            yes
   67s]    acl:                yes
   67s]    xattr:            yes
   67s]    ipv6:            yes
   67s] 


   76s] Linking burp ...
   76s] /usr/src/redhat/BUILD/burp/libtool --silent --tag=CXX --mode=link g++   -o burp acl.o asyncio.o attribs.o auth_server.o auth_client.o autoupgrade_client.o autoupgrade_server.o backup_phase1_client.o backup_phase2_client.o backup_phase1_server.o backup_phase2_server.o backup_phase3_server.o backup_phase4_server.o base64.o berrno.o bfile.o ca_client.o ca_server.o client.o client_vss.o conf.o counter.o current_backups_server.o dpth.o extrameta.o find.o forkchild.o handy.o incexc_recv.o incexc_send.o list_client.o list_server.o lock.o log.o msg.o prepend.o prog.o regexp.o restore_client.o restore_server.o rs_buf.o sbuf.o server.o ssl.o status_client_ncurses.o status_server.o strlist.o xattr.o zlibio.o \
   76s]        -lacl            -lm  \
   76s]        -lwrap  -lssl -lcrypto -lrsync -lz -lncurses -lcrypt
   76s] Linking bedup ...
   76s] /usr/src/redhat/BUILD/burp/libtool --silent --tag=CXX --mode=link g++   -o bedup bedup.o conf.o lock.o log.o prepend.o regexp.o strlist.o \
   76s]        -lacl            -lm  \
   76s]        -lwrap  -lssl -lcrypto -lrsync -lz -lncurses -lcrypt
   77s] ==== Make of burp is good ====
   77s]  
   77s] make[1]: Leaving directory `/usr/src/redhat/BUILD/burp/src'
   77s] ==>Entering directory /usr/src/redhat/BUILD/burp/manpages
   77s] make[1]: Entering directory `/usr/src/redhat/BUILD/burp/manpages'
   77s] make[1]: Nothing to be done for `all'.
   77s] make[1]: Leaving directory `/usr/src/redhat/BUILD/burp/manpages'
   77s] + exit 0
   77s] Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.43014
   77s] + umask 022
   77s] + cd /usr/src/redhat/BUILD
   77s] + cd burp
   77s] + make prefix=/var/tmp/build-burp-1.3.16/usr exec_prefix=/var/tmp/build-burp-1.3.16/usr bindir=/var/tmp/build-burp-1.3.16/usr/bin sbindir=/var/tmp/build-burp-1.3.16/usr/sbin sysconfdir=/var/tmp/build-burp-1.3.16/etc datadir=/var/tmp/build-burp-1.3.16/usr/share includedir=/var/tmp/build-burp-1.3.16/usr/include libdir=/var/tmp/build-burp-1.3.16/usr/lib libexecdir=/var/tmp/build-burp-1.3.16/usr/libexec localstatedir=/var/tmp/build-burp-1.3.16/var sharedstatedir=/var/tmp/build-burp-1.3.16/usr/com mandir=/var/tmp/build-burp-1.3.16/usr/share/man infodir=/var/tmp/build-burp-1.3.16/usr/share/info install
   77s] ./autoconf/mkinstalldirs /var/tmp/build-burp-1.3.16/usr/sbin
   77s] mkdir -p -- /var/tmp/build-burp-1.3.16/usr/sbin
   77s] ./autoconf/mkinstalldirs /var/tmp/build-burp-1.3.16/etc
   77s] mkdir -p -- /var/tmp/build-burp-1.3.16/etc
   77s] ./autoconf/mkinstalldirs /var/tmp/build-burp-1.3.16/etc/CA-client
   77s] mkdir -p -- /var/tmp/build-burp-1.3.16/etc/CA-client
   77s] ./autoconf/mkinstalldirs /var/run
   77s] ./autoconf/mkinstalldirs /var/spool/burp
   77s] mkdir -p -- /var/spool/burp
   77s] mkdir: cannot create directory `/var/spool/burp': Permission denied
   77s] make: *** [installdirs] Error 1
   77s] error: Bad exit status from /var/tmp/rpm-tmp.43014 (%install)
   77s] 
   77s] 
   77s] RPM build errors:
   77s]     Bad exit status from /var/tmp/rpm-tmp.43014 (%install)
   81s]    60.922497] Power down.

Found in Makefile.in


installdirs:
        $(MKDIR) $(DESTDIR)$(sbindir)
        $(MKDIR) $(DESTDIR)$(sysconfdir)
        $(MKDIR) $(DESTDIR)$(sysconfdir)/CA-client
        $(MKDIR) $(DESTDIR)/var/run
        $(MKDIR) $(DESTDIR)/var/spool/burp

So the Makefile wants to create /var/spool/burp - but the compile user does not have root permissions?

How to fix that to be able to compile as non-root?

That is the question …

Hi
You probably need to add the buildroot for centos in the install, eg;


make DESTDIR=%{buildroot} install


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 1 day 15:05, 3 users, load average: 0.09, 0.07, 0.10
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

[QUOTE=malcolmlewis;2494879]Hi
You probably need to add the buildroot for centos in the install, eg;


make DESTDIR=%{buildroot} install

yes, that could be solution.

The only question is, how to do it the right/standard way.

The spec file states:


     52 %install
     53 %makeinstall

and %makeinstall is defined per default on CentOS as

%{
  /usr/bin/make \
        prefix=/usr \
        exec_prefix=/usr \
        bindir=/usr/bin \
        sbindir=/usr/sbin \
        sysconfdir=/etc \
        datadir=/usr/share \
        includedir=/usr/include \
        libdir=/usr/lib \
        libexecdir=/usr/libexec \
        localstatedir=/var \
        sharedstatedir=/usr/com \
        mandir=/usr/share/man \
        infodir=/usr/share/info \
  install}

Just overwrite %makeinstall in the SPEC file if os = CentOs?

Hi
No, it will work for openSUSE as well, something in the configure is
not setting DESTDIR, there are two macro’s use %make_install and see
how that goes.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 1 day 15:56, 3 users, load average: 0.13, 0.20, 0.21
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Unfurtunately %make_install is not available with CentOS

107s] + %make_install
107s] /var/tmp/rpm-tmp.38648: line 25: fg: no job control
107s] error: Bad exit status from /var/tmp/rpm-tmp.38648 (%install)

Exchanged

%makeinstall

with


make DESTDIR=%{buildroot} install

Now it builds fine for SuSE and CentOS.

Thanks again.