failure of rpm build
Faheem Mitha
faheem at email.unc.edu
Wed Sep 20 19:20:59 CEST 2000
Dear Arla people,
I have been trying to build an arla rpm on SuSE 6.2. I found a spec file
which seems to be the least Redhat like of all the spec files I have
seen. It was buried inside the conf directory in the source 0.33.1
distribution. I have made a minor change to the following to conform with
SuSE:
#mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/sbin/init.d
cp xfs/linux/bin/arla $RPM_BUILD_ROOT/sbin/init.d/arla
chmod 555 $RPM_BUILD_ROOT/sbin/init.d/arla
(it originally installed $RPM_BUILD_ROOT/etc/rc.d/init.d in
$RPM_BUILD_ROOT/etc/rc.d/init.d). Otherwise, I have left it
untouched.
Now, when I try to build the rpm (naturally, I do not do this under root),
the build exits with the following error message:
Can someone tell me what is going on, and how to fix it? I am not even
sure what the install script is trying to do. Needless to say, I really,
really don't want to build the rpm as root.
I am now going to go take a look at the latest source.
Best regards, Faheem Mitha
###########################################################################
done
cd bin && make -w install
make[3]: Entering directory
`/usr/src/packages/BUILD/arla-0.33.1/xfs/linux/bin'
../../../mkinstalldirs /var/tmp/arla-0.33.1-1-root/usr/arla/bin
PROG_BIN='startarla'; for x in $PROG_BIN; do \
f=`echo $x | sed 's,x,x,'`; \
/usr/bin/ginstall -c $x /var/tmp/arla-0.33.1-1-root/usr/arla/bin/$f; \
done
INIT_BIN='arla'; for x in $INIT_BIN; do \
f=`echo $x | sed 's,x,x,'`; \
if test -d /etc/rc.d/init.d ;then \
DIR=/etc/rc.d/init.d ; \
elif test -d /etc/init.d ;then \
DIR=/etc/init.d ; \
else \
DIR=//etc/arla ;\
../../../mkinstalldirs $DIR ; \
fi ; \
if test ! -f $DIR/$f; then \
/usr/bin/ginstall -c $x $DIR/$f; \
fi ; \
/usr/bin/ginstall -c $x $DIR/$f.default; \
done
/usr/bin/ginstall: /etc/rc.d/init.d/arla: Permission denied
/usr/bin/ginstall: /etc/rc.d/init.d/arla.default: Permission denied
make[3]: *** [install] Error 1
make[3]: Leaving directory
`/usr/src/packages/BUILD/arla-0.33.1/xfs/linux/bin'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/src/packages/BUILD/arla-0.33.1/xfs/linux'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/usr/src/packages/BUILD/arla-0.33.1/xfs'
make: *** [install] Error 1
Bad exit status from /var/tmp/rpm-tmp.71583 (%install)
Process rpm exited abnormally with code 1
############################################################################
(spec file I am using)
**************************************************************************
#
# $Id: arla.spec.in,v 1.2 2000/01/26 15:31:39 lha Exp $
#
# A spec file for build a arla rpm
#
# Build both smp and up modules for the current kernel
#
# Puts the configurationfiles in /etc/arla
#
# Note: it doesn't create the ThisCell file you have to
# do that yourself.
#
#
%define version 0.33.1
%define prefix /usr/arla
Summary: A free AFS clone
Name: arla
Version: %{version}
Release: 1
Copyright: BSD
Source: arla-%{version}.tar.gz
Group: System Environment/Daemons
Distribution: Arla
Vendor: KTH
URL: http://www.stacken.kth.se/projekt/arla/
BuildRoot: /var/tmp/arla-%{version}-%{release}-root
Prefix: %{prefix}
Provides: arla
Requires: krb4
%description
A free implementation of AFS
%changelog
* Thu Jan 21 2000 <lha at s3.kth.se>
Added to distribution
* Thu Jan 21 2000 <lha at s3.kth.se>
arla 0.30
* Thu Dec 16 1999 <lha at s3.kth.se>
arla 0.29.2
* Mon Dec 13 1999 <lha at s3.kth.se>
arla 0.29.1
* Thu Nov 25 1999 <lha at s3.kth.se>
arla 0.28
* Mon Nov 8 1999 <lha at s3.kth.se>
Build a up and smp module, don't install ThisCell its up to the
admin to do right, patch startarla to find what module to use.
Do relocateable. Added krb4 requirement.
* Fri Nov 5 1999 <lha at s3.kth.se>
First spec with a ChangeLog-entry
%prep
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
%setup
%build
rm -rf ${RPM_BUILD_ROOT}
mkdir ${RPM_BUILD_ROOT}
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --sysconfdir=/etc/arla
make
cd xfs/linux
make clean
CPPFLAGS="-D__BOOT_KERNEL_SMP=1 -D__BOOT_KERNEL_UP=0" make
mv xfs.o xfs.smp.o.save
make clean
CPPFLAGS="-D__BOOT_KERNEL_SMP=0 -D__BOOT_KERNEL_UP=1" make
mv xfs.o xfs.up.o.save
echo "dummy file, to be removed later" > xfs.o
mv xfs.up.o.save xfs.up.o
mv xfs.smp.o.save xfs.smp.o
%install
mkdir ${RPM_BUILD_ROOT}/etc
make prefix=$RPM_BUILD_ROOT%{prefix} install
rm $RPM_BUILD_ROOT%{prefix}/bin/xfs.o
KERNEL_VERSION=$(uname -r | sed 's/smp$//')
cp xfs/linux/xfs.{smp,up}.o $RPM_BUILD_ROOT%{prefix}/bin
mkdir -p $RPM_BUILD_ROOT/lib/modules/${KERNEL_VERSION}/fs
cp xfs/linux/xfs.up.o \
$RPM_BUILD_ROOT/lib/modules/${KERNEL_VERSION}/fs/xfs.o
mkdir -p $RPM_BUILD_ROOT/lib/modules/${KERNEL_VERSION}smp/fs
cp xfs/linux/xfs.smp.o \
$RPM_BUILD_ROOT/lib/modules/${KERNEL_VERSION}smp/fs/xfs.o
#mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/sbin/init.d
cp xfs/linux/bin/arla $RPM_BUILD_ROOT/sbin/init.d/arla
chmod 555 $RPM_BUILD_ROOT/sbin/init.d/arla
cp xfs/linux/libgetcwd.so $RPM_BUILD_ROOT%{prefix}/lib
chmod 555 $RPM_BUILD_ROOT%{prefix}/lib/libgetcwd.so
%post
depmod -a
%files
%doc README NEWS ChangeLog
%config /etc/arla/CellServDB
%config /etc/arla/arla.conf
%config /etc/arla/SuidCells
%{prefix}/bin
%{prefix}/lib
%{prefix}/include
%{prefix}/cache
/etc/rc.d/init.d
/lib/modules
More information about the Arla-drinkers
mailing list