Commit 32faa3ae authored by Konstantin Baev's avatar Konstantin Baev

3.8.0-alt1

- Fix building module with dkms
parent 29a6366c
......@@ -6,7 +6,7 @@
# For build install,
# kernel-headers-modules-XXXX for ALT Linux
# kernel-devel-XXXX for FCx / ASP Linux
# kernel-source-stripped-XXXX for Mandriva 2007
# dkms-etercifs for Mandriva 2009
# linux-headers for Debian / Ubuntu
# kernel-source-XXXX for SuSe
# kernel-source-XXXX for Slackware / MOPSLinux
......@@ -20,8 +20,8 @@
%define src_2_6_27_version 1.54
Name: etercifs
Version: 3.7.0
Release: alt2
Version: 3.8.0
Release: alt1
Summary: Advanced Common Internet File System for Linux with Etersoft extension
......@@ -73,10 +73,14 @@ This package has Etersoft's patches for WINE@Etersoft sharing access support.
mkdir -p %buildroot%_datadir/%name
install -m644 buildmodule.sh %buildroot%_datadir/%name
sed -e "s|@DATADIR@|%_datadir/%name|g" < functions.sh.init > functions.sh.init.repl
sed -e "s|@SRC_DIR@|%_usrsrc/%name-%version|g" < functions.sh.init > functions.sh.init.repl
sed -e "s|@MODULENAME@|%name|g" < functions.sh.init > functions.sh.init.repl
sed -e "s|@MODULEVERSION@|%version|g" < functions.sh.init > functions.sh.init.repl
install -m644 functions.sh.init.repl %buildroot%_datadir/%name/functions.sh
mkdir -p %buildroot%_initdir
sed -e "s|@DATADIR@|%_datadir/%name|g" < %name.init > %name.init.repl
sed -e "s|@SRC_DIR@|%_usrsrc/%name-%version|g" < %name.init > %name.init.repl
install -m755 %name.init.repl %buildroot%_initdir/%name
install -m755 %name.outformat %buildroot%_initdir/%name.outformat
......@@ -106,6 +110,9 @@ cp %SOURCE27 %buildroot/%etercifs_src/%src_package_name-2.6.27-%src_2_6_27_versi
%_initdir/%name.outformat
%changelog
* Thu Nov 06 2008 Konstantin Baev <kipruss@altlinux.org> 3.8.0-alt1
- Fix building module with dkms
* Wed Nov 05 2008 Konstantin Baev <kipruss@altlinux.org> 3.7.0-alt2
- delete last change (building module on installing rpm)
- remove kernel_src.list and distr_vendor
......
......@@ -10,11 +10,18 @@
. ./functions.sh
if [ $TESTBUILD -ne 1 ] ; then
detect_host_kernel
echo
echo "Building for $KERNELVERSION Linux kernel (headers in $KERNSRC)"
compile_module
install_module
if [ $DKMSBUILD -eq 1 ] ; then
detect_host_kernel
echo
echo "Building for $KERNELVERSION Linux kernel with dkms"
dkms_build_module
else
detect_host_kernel
echo
echo "Building for $KERNELVERSION Linux kernel (headers in $KERNSRC)"
compile_module
install_module
fi
else
echo
echo "====================================================================="
......
......@@ -15,6 +15,7 @@
RMMOD=/sbin/rmmod
MODPROBE=/sbin/modprobe
INSMOD=/sbin/insmod
SRC_DIR=@SRC_DIR@
ORIGMODULENAME=cifs
MODULENAME=etercifs
......@@ -158,11 +159,9 @@ status()
build_module()
{
#DKMS=/sbin/dkms
# && [ -x $DKMS ]
# Need name-version for it
if [ -r @SRC_DIR/dkms.conf ] ; then
echo "TODO: use dkms build/install for build"
if [ -r $SRC_DIR/dkms.conf ] ; then
cd @DATADIR@
DKMSBUILD=1 sh buildmodule.sh
else
cd @DATADIR@
sh buildmodule.sh
......
......@@ -7,9 +7,13 @@
# Build kernel modules for all kernel and all platforms
MODULENAME=@MODULENAME@
MODULEVERSION=@MODULEVERSION@
MODULEFILENAME=etercifs.ko
SRC_DIR=@SRC_DIR@
[ -n "$TESTBUILD" ] || TESTBUILD=0
[ -n "$DKMSBUILD" ] || DKMSBUILD=0
fatal()
{
......@@ -126,6 +130,18 @@ set_gcc()
fi
}
dkms_build_module()
{
detect_etercifs_sources
tar -xjf $KERNEL_SOURCE_ETERCIFS -C $SRC_DIR
FILENAME=`basename $KERNEL_SOURCE_ETERCIFS`
DIRNAME=${FILENAME%.tar.bz2}
mv -f $SRC_DIR/$DIRNAME/* $SRC_DIR
rm -rf $SRC_DIR/$DIRNAME
dkms build -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
dkms install -m $MODULENAME -v $MODULEVERSION --rpm_safe_upgrade
}
compile_module()
{
detect_etercifs_sources
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment