openafs/kernel-source.build-modules.sh
Christof Hanke d3db42d252 - update to latest git branch stable-1_8_x, includes security update 1.8.13
- change version to openafs-1.8.13.g... since the new stable release is 1.8.13 
- remove patch handle_backports.diff, it is now included upstream 
- remove intermediate patches:
  * 03b280649f5e22ed74c217d7c98c3416a2fa9052: Linux-6.10: remove includes for asm/ia32_unistd.h
  * 0f6a3a402f4a66114da9231032bd68cdc4dee7bc: Linux-6.10: Use filemap_alloc_folio when avail
  * 658942f2791fad5e33ec7542158c16dfc66eed39: Linux-6.10: define a wrapper for vmalloc
  * d8b56f21994ce66d8daebb7d69e792f34c1a19ed: afs: avoid empty-body warning
  * 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7: Linux 6.10: Move 'inline' before func return type

OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=129
2024-11-26 08:10:26 +00:00

65 lines
1.8 KiB
Bash

#!/bin/bash
if [ $# != 1 ]; then
echo building a openafs-kernel module for the running kernel
echo Need one of: build build_debug install
exit 1
fi
rootdir=`cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd`
if [ -z "$rootdir" ]; then
echo "failed to determine the dirname of this script"
exit 1
fi
cd "$rootdir"
LOGFILE=libafs_tree/build.log
kernel_flavour=`uname -r | awk -F- '{print $NF}'`
kernel_version=`uname -r | sed "s/-$kernel_flavour//"`
arch=`uname -m`
suse_flavour=`cat /etc/os-release | grep PRETTY_NAME | awk -F '=' '{print $2}'`
suse_version=`cat /etc/os-release | grep VERSION_ID | awk -F '=' '{print $2}'`
echo This SUSE is version $suse_version of flavour $suse_flavour
echo you are running the kernel \"$kernel_version\" of flavour \"$kernel_flavour\" on \"$arch\"
echo all output is saved into $LOGFILE
if [ $1 == "build_debug" ]; then
DEBUG_OPT="--enable-debug-kernel"
fi
if [ $1 == "build" -o $1 == "build_debug" ]; then
cd libafs_tree
echo calling configure...
./configure --with-linux-kernel-headers=/usr/src/linux/ --with-linux-kernel-build=/usr/src/linux-obj/$arch/$kernel_flavour $DEBUG_OPT > build.log 2>&1
if [ $? != 0 ]; then
echo configure failed! See $LOGFILE for details
exit $?
fi
echo calling make
make >> build.log 2>&1
if [ $? != 0 ]; then
echo make failed! See $LOGFILE for details
exit $?
fi
echo
echo build sucessfull!
echo Now run $0 install to install the kernel-modules
exit 0
fi
if [ $1 == "install" ]; then
module_files="afspag.ko libafs.ko"
build_dir=libafs_tree/src/libafs/MODLOAD-$kernel_version-$kernel_flavour-MP/
install_dir=/lib/modules/$kernel_version-$kernel_flavour
echo installing kernel-modules into
for mod in $module_files; do
cp -v $build_dir/$mod $install_dir/$mod
done
/sbin/depmod -a
fi