[SM-Discuss] libcap $KVER?

Juuso Alasuutari iuso at sourcemage.org
Sat Aug 18 09:43:14 EDT 2007


On Friday 17 August 2007 16:22:40 Juuso Alasuutari wrote:
> I've had libcap 1.97 fail on I think 3 boxes so far already, but on one it
> succeeded. The reason seems to be that libcap's SOURCE_URL uses a variable
> called KVER containing the major kernel version.
>
> On my other machines `gaze source_urls libcap`
> yields
> "http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-/libcap-1
>.97.tar.bz2", but on the one box that succesfully compiled libcap I
> get
> "http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.6/libca
>p-1.97.tar.bz2". So where is gaze pulling it from?

Ookay I see it. I don't know _why_ I didn't see this line at the beginning of 
libcap DETAILS yesterday, maybe I was too tired. But:

           SPELL=libcap
KVER=$(installed_version linux | cut -c-3)
if [[ $KVER == 2.4 ]];then
         VERSION=1.10
else
         VERSION=1.97
fi
          SOURCE=$SPELL-$VERSION.tar.bz2
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
   
SOURCE_URL[0]=http://www.kernel.org/pub/linux/libs/security/linux-privs/kernel-${KVER}/$SOURCE

As you see, that will fail if the linux spell isn't installed. 
installed_version should be replaced with get_kernel_version.

-- 
        Juuso Alasuutari
[[ Source Mage GNU/Linux ]]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.ibiblio.org/pipermail/sm-discuss/attachments/20070818/ccc07110/attachment.bin 


More information about the SM-Discuss mailing list