Commit ce7294c4 authored by Konstantin Baev's avatar Konstantin Baev

Deleted some files (CVS, patches)

Working to buildmodule...
parent d9a4c6ce
linux-cifs.spec~ linux-cifs.spec~
linux-cifs/test.sh linux-cifs/test.sh
linux-cifs/kernel_src.list_old linux-cifs/kernel_src.list_old
linux-cifs/build.sh_old linux-cifs/buildmodule.sh1
...@@ -132,15 +132,15 @@ do ...@@ -132,15 +132,15 @@ do
done done
mkdir -p %buildroot%_datadir/%name mkdir -p %buildroot%_datadir/%name
install -m644 buildmodule.sh %buildroot%_datadir/%name/buildmodule.sh install -m644 buildmodule.sh functions.sh kernel_src.list %buildroot%_datadir/%name
mkdir -p %buildroot%_initdir mkdir -p %buildroot%_initdir
sed -e "s|@SRC_DIR@|%_datadir/%name|g" < %name.init > %name.init.repl sed -e "s|@DATADIR@|%_datadir/%name|g" < %name.init > %name.init.repl
install -m755 %name.init.repl %buildroot%_initdir/%name install -m755 %name.init.repl %buildroot%_initdir/%name
install -m755 %name.outformat %buildroot%_initdir/%name.outformat install -m755 %name.outformat %buildroot%_initdir/%name.outformat
%files %files
%_datadir/%name/buildmodule.sh %_datadir/%name/*
%_initdir/%name %_initdir/%name
%_initdir/%name.outformat %_initdir/%name.outformat
......
/functions.sh/1.1/Sat Jun 9 18:28:40 2007//
/linux-cifs_depmod.sh/1.1/Fri Mar 16 18:14:13 2007//
D/gentoo////
/linux-cifs.outformat/1.3/Fri Jul 27 11:55:53 2007//
/linux-cifs-shared.patch/1.29/Fri Jul 27 16:25:24 2007//
/linux-cifs-shared-1.50.patch/1.1/Fri Sep 14 12:11:33 2007//
/kernel_src.list/1.2/Fri Dec 7 14:19:41 2007//
/TODO/1.8/Sun Jan 27 15:46:44 2008//
/build.sh/1.26/Sun Jan 27 16:54:11 2008//
/linux-cifs.release.sh/1.4/Sun Jan 27 16:44:57 2008//
/buildmodule.sh/1.15/Sun Jan 27 17:45:53 2008//
/dkms-linux-cifs.spec/1.2/Sun Jan 27 17:58:57 2008//
/linux-cifs.init/1.36/Sun Jan 27 18:00:59 2008//
/linux-cifs-shared-1.50c.patch/1.8/Thu Jan 31 10:49:35 2008//
/linux-cifs.spec/1.29/Thu Jan 31 10:50:25 2008//
wine-etersoft-public/linux-cifs
:ext:cvs.etersoft/var/local/cvsroot
#!/bin/sh
# 2006, 2007, 2008 (c) Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# GNU Public License
echo "All kernel build script. (c) 2007, 2008 Etersoft. $Id: build.sh,v 1.26 2008/01/27 16:54:11 lav Exp $"
PACKNAME=linux-cifs
MODULENAME=etercifs
SRC_DIR=/tmp
mkdir -p $INIT_DIR
sed -e "s|@SRC_DIR@|$SRC_DIR|g" < $PACKNAME.init > $PACKNAME.init.repl
install -m755 -D $PACKNAME.init.repl $INIT_DIR/$PACKNAME
install -m755 $PACKNAME.outformat $INIT_DIR/
exit 0
...@@ -5,10 +5,32 @@ ...@@ -5,10 +5,32 @@
# Build kernel module in installed system # Build kernel module in installed system
. ./functions.sh
echo "====DISTR_VENDOR="$DISTR_VENDOR
tmpdir=
tmpdir="$(mktemp -dt "Etercifs.XXXXXXXX")"
trap exit_handler HUP PIPE INT QUIT TERM EXIT
BUILDDIR="$tmpdir/buildroot"
echo "====BUILDDIR="$BUILDDIR
# Тут мы должны найти соответствующий нашему ядру src,
# распаковать его в $BUILDDIR, и собрать
# При запуске сервиса:
# Проверка, что если ядро обновилось до нашего, но новее - пересобираем
# Проверка, что если ядро обновилось до нового - ругаемся
MODULEFILENAME=etercifs.ko MODULEFILENAME=etercifs.ko
BUILDDIR=$(pwd) # BUILDDIR=$(pwd)
KERNELVERSION=$(uname -r) KERNELVERSION=$(uname -r)
echo "====KERNELVERSION="$KERNELVERSION
# SMP build # SMP build
[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS=`/usr/bin/getconf _NPROCESSORS_ONLN` [ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS=`/usr/bin/getconf _NPROCESSORS_ONLN`
[ "$RPM_BUILD_NCPUS" -gt 1 ] && MAKESMP="-j$RPM_BUILD_NCPUS" || MAKESMP="" [ "$RPM_BUILD_NCPUS" -gt 1 ] && MAKESMP="-j$RPM_BUILD_NCPUS" || MAKESMP=""
...@@ -23,7 +45,10 @@ if [ -z "$INSTALL_MOD_PATH" ]; then ...@@ -23,7 +45,10 @@ if [ -z "$INSTALL_MOD_PATH" ]; then
#INSTALL_MOD_PATH=/lib/modules/linux-cifs #INSTALL_MOD_PATH=/lib/modules/linux-cifs
fi fi
echo echo "====KERNSRC="$KERNSRC
echo "====INSTALL_MOD_PATH="$INSTALL_MOD_PATH
echo
echo "Build for $KERNELVERSION Linux kernel (headers in $KERNSRC)" echo "Build for $KERNELVERSION Linux kernel (headers in $KERNSRC)"
if [ ! -f $KERNSRC/include/linux/version.h ]; then if [ ! -f $KERNSRC/include/linux/version.h ]; then
...@@ -52,23 +77,25 @@ else ...@@ -52,23 +77,25 @@ else
export GCCNAME=gcc export GCCNAME=gcc
fi fi
echo "====GCCNAME="$GCCNAME
if ! which $GCCNAME ; then if ! which $GCCNAME ; then
echo "GCC compiler have not found. Please install gcc package." echo "GCC compiler have not found. Please install gcc package."
exit 1 exit 1
fi fi
# Clean, build and check # # Clean, build and check
rm -f $BUILDDIR/$MODULEFILENAME # rm -f $BUILDDIR/$MODULEFILENAME
make $USEGCC -C $KERNSRC here=$BUILDDIR SUBDIRS=$BUILDDIR clean # make $USEGCC -C $KERNSRC here=$BUILDDIR SUBDIRS=$BUILDDIR clean
make $USEGCC -C $KERNSRC here=$BUILDDIR SUBDIRS=$BUILDDIR modules $MAKESMP # make $USEGCC -C $KERNSRC here=$BUILDDIR SUBDIRS=$BUILDDIR modules $MAKESMP
#
#[ "$KERVER" = "2.4" ] && MODULENAME=$MODULENAME.o || MODULENAME=$MODULENAME.ko # #[ "$KERVER" = "2.4" ] && MODULENAME=$MODULENAME.o || MODULENAME=$MODULENAME.ko
test -r "$BUILDDIR/$MODULEFILENAME" || { echo "can't locate built module $MODULEFILENAME, continue" ; exit 1 ; } # test -r "$BUILDDIR/$MODULEFILENAME" || { echo "can't locate built module $MODULEFILENAME, continue" ; exit 1 ; }
strip --strip-debug --discard-all $BUILDDIR/$MODULEFILENAME # strip --strip-debug --discard-all $BUILDDIR/$MODULEFILENAME
#
echo "Copying built module to $INSTALL_MOD_PATH" # echo "Copying built module to $INSTALL_MOD_PATH"
mkdir -p $INSTALL_MOD_PATH # mkdir -p $INSTALL_MOD_PATH
install -m 644 -o root -g root $BUILDDIR/$MODULEFILENAME $INSTALL_MOD_PATH/ || exit 1 # install -m 644 -o root -g root $BUILDDIR/$MODULEFILENAME $INSTALL_MOD_PATH/ || exit 1
depmod -ae || exit 1 # depmod -ae || exit 1
#echo "$MODULENAME build correctly" # #echo "$MODULENAME build correctly"
exit 0 # exit 0
...@@ -11,7 +11,6 @@ fatal() ...@@ -11,7 +11,6 @@ fatal()
exit 1 exit 1
} }
DISTR_VENDOR=/usr/bin/distr_vendor DISTR_VENDOR=/usr/bin/distr_vendor
test -x $DISTR_VENDOR || fatal "Can't find distr_vendor" test -x $DISTR_VENDOR || fatal "Can't find distr_vendor"
......
...@@ -193,7 +193,7 @@ build_module() ...@@ -193,7 +193,7 @@ build_module()
if [ -r @SRC_DIR/dkms.conf ] ; then if [ -r @SRC_DIR/dkms.conf ] ; then
echo "TODO: use dkms build/install for build" echo "TODO: use dkms build/install for build"
else else
cd @SRC_DIR@ cd @DATADIR@
sh buildmodule.sh sh buildmodule.sh
fi fi
} }
......
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