You are not logged in.

#1 2005-01-13 18:05:58

carl
Member
From: Denmark
Registered: 2004-02-21
Posts: 31
Website

error PKGBUILD

HI!
I´m new to Arch and have some problems with compiling a new kernel with ABS.

I copy " logo_lin_224.ppm" "sys-uselib-fix.patch" from /var/abs/kernels/kernel26-scsi to /var/abs/local
And copy "kconfig26" from /boot to  /var/abs/local
But when I do makepkg I get these errors

[root@dronning local]# makepkg
./PKGBUILD: line 13: /var/abs/local/kconfig26: Permission denied
==> Making package: kernel26-scsi  (Thu Jan 13 18:45:36 CET 2005)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Using local copy of linux-2.6.10.tar.bz2
==> WARNING: MD5sums are missing or incomplete.  Cannot verify source integrity.==> Extracting Sources...
==>     tar --use-compress-program=bzip2 -xf linux-2.6.10.tar.bz2
==> Starting build()...
cat: ../config: No such file or directory

What is wrong :?:

My PKGBUILD

###### Give the kernel a unique name (for multiple builds - can be empty)
_kerrev=custom1

###### Choose generic name, version, and release. updated later for $_kerrev
pkgname=kernel26-scsi
pkgver=2.6.10
pkgrel=2
pkgdesc="Custom Linux Kernel and modules"
url="http://www.kernel.org"
depends=('module-init-tools')
###### Add a default config file and any patches to be applied to source array
source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2)
config= /var/abs/local/kconfig26
###### Add md5 checksums here:
#md5sums=()

getvar() {
old=$(cat Makefile | grep "^$1")
echo $(echo ${old/"$1 ="/} | sed -e "s/[ ]*(.*)[ ]*/1/g")
return 0
}

build() {
cd $startdir/src/linux-$pkgver

###### apply patches here
# patch -p1 < ../patch1 #model

#get rid of i in i686 in default config
carch=`echo $CARCH | sed 's|i||'`
cat ../config | sed "s|#CARCH#|$carch|g" >./.config

###### Choose one of the following configuration types
###### Use first option for config in source array
#yes "" | make config
#make oldconfig || return 1
make menuconfig
#make xconfig
#make gconfig

##### No user changes below here
# save the configuration with today's date
cp ./.config ../../NEWCONFIG-$(date +%b%d)

# set EXTRAVERSION to create unique /lib/modules/ subdirectories
_ker_extraversion=$(getvar "EXTRAVERSION")

# update EXTRAVERSION in the Makefile by adding our _kerrev
_oldline=$(cat Makefile | grep "^EXTRAVERSION")
if [ $_kerrev != "" ]; then
_ker_extraversion="$_ker_extraversion-$_kerrev"
cat Makefile | sed "s|$_oldline|EXTRAVERSION = $_ker_extraversion|" > tmpMake
mv tmpMake Makefile
fi

_kerrev=$_ker_extraversion
kerver=$(getvar "VERSION").$(getvar "PATCHLEVEL").$(getvar "SUBLEVEL")

# update the package information from the kernel Makefile
# (just in case the Makefile changed during a patch)
pkgver=$kerver$(echo $_kerrev | sed -e 's/-/./g')
pkgdesc="Custom Linux Kernel and modules version: $kerver revision: $_kerrev / package ver: $pkgver build: $pkgrel"

# changing the package name
# removing patches versions from the revision string
_t=$(echo $_kerrev | sed -e "s/^..[0-9]*//g")
# _t=$(echo $_t | sed -e "s/^-rc[0-9]?*//g")
# _suf contains the suffix identifying the kernel (it has the versions removed from it)
_suf=$(echo $_t | sed -e "s/[0-9]*-/-/g")
pkgname=kernel26$_suf

echo "Package name: $pkgname"
echo "Package ver: $pkgver"
echo "Package desc: $pkgdesc"
sleep 5

make clean bzImage modules || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
# create unique names in /boot/
cp System.map $startdir/pkg/boot/System.map26$_suf
cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26$_suf

install -D -m644 Makefile $startdir/pkg/usr/src/linux-$kerver/Makefile
install -D -m644 .config $startdir/pkg/usr/src/linux-$kerver/.config
install -D -m644 .config $startdir/pkg/boot/kconfig26$_suf
mkdir -p $startdir/pkg/usr/src/linux-$kerver/include
mkdir -p $startdir/pkg/usr/src/linux-$kerver/arch/i386/kernel
for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do
cp -a include/$i $startdir/pkg/usr/src/linux-$kerver/include/
done
# copy files necessary for later builds, like nvidia and vmware
cp -a scripts $startdir/pkg/usr/src/linux-$kerver/
mkdir -p $startdir/pkg/usr/src/linux-$kerver/.tmp_versions
cp arch/i386/Makefile $startdir/pkg/usr/src/linux-$kerver/arch/i386/
cp arch/i386/kernel/asm-offsets.s $startdir/pkg/usr/src/linux-$kerver/arch/i386/kernel/
# copy in Kconfig files
for i in `find . -name "Kconfig*"`; do
mkdir -p $startdir/pkg/usr/src/linux-$kerver/`echo $i | sed 's|/Kconfig.*||'`
cp $i $startdir/pkg/usr/src/linux-$kerver/$i
done
cd $startdir/pkg/usr/src/linux-$kerver/include && ln -s asm-i386 asm
chown -R root.root $startdir/pkg/usr/src/linux-$kerver
# create a unique subdirectory under /usr/src/
cd $startdir/pkg/usr/src
mv linux-$kerver linux-$kerver$_kerrev
cd $startdir/pkg/lib/modules/$kerver$_kerrev &&
(rm -f build; ln -sf /usr/src/linux-$kerver$_kerrev build)
}

Offline

#2 2005-01-13 18:30:08

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: error PKGBUILD

rename kconfig26 to "config" - the package needs a file named "config" for the configuration

Offline

#3 2005-01-13 18:54:52

carl
Member
From: Denmark
Registered: 2004-02-21
Posts: 31
Website

Re: error PKGBUILD

the sane problem

[root@dronning local]# makepkg
./PKGBUILD: line 13: /var/abs/local/config: Permission denied
==> Making package: kernel26-scsi  (Thu Jan 13 19:49:46 CET 2005)
==> Checking Runtime Dependencies...
==> Checking Buildtime Dependencies...
==> Retrieving Sources...
==>     Using local copy of linux-2.6.10.tar.bz2
==> WARNING: MD5sums are missing or incomplete.  Cannot verify source integrity.==> Extracting Sources...
==>     tar --use-compress-program=bzip2 -xf linux-2.6.10.tar.bz2
==> Starting build()...
cat: ../config: No such file or directory

[root@dronning local]# ls -l
-rw-r--r--  1 root root  50129 2005-01-13 13:07 config

Are the permessions on the file right

Offline

#4 2005-01-13 20:07:25

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: error PKGBUILD

You could extract the kernel source and use menuconfig to set up the configuration and then just copy the .config file to just config inside the /var/abs/local/kernel26-scsi directory. The config file must be in the same directory as PKGBUILD.

Why don't you start over and do something like:

 # cp -a /var/abs/kernels/kernel26-scsi /var/abs/local 

Offline

#5 2005-01-13 20:40:35

carl
Member
From: Denmark
Registered: 2004-02-21
Posts: 31
Website

Re: error PKGBUILD

I am going to take a look at it tomorrow. I have been working on it for about 12 hours now, and I´m tired now and now I´m going to bed. If somebody have some ideas or solutions to solve the problem, then please send them along.

Offline

Board footer

Powered by FluxBB