Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
d9a4c6ce
Commit
d9a4c6ce
authored
Sep 01, 2008
by
Konstantin Baev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no more compiled module etercifs.ko in rpm, just install scripts and src
parent
6b4d62ac
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
111 deletions
+44
-111
.gitignore
.gitignore
+4
-1
linux-cifs.spec
linux-cifs.spec
+27
-2
build.sh
linux-cifs/build.sh
+2
-89
functions.sh
linux-cifs/functions.sh
+9
-0
kernel_src.list
linux-cifs/kernel_src.list
+2
-19
No files found.
.gitignore
View file @
d9a4c6ce
kernel-source-etercifs-2.6.23.spec
linux-cifs.spec~
linux-cifs/test.sh
linux-cifs/kernel_src.list_old
linux-cifs/build.sh_old
linux-cifs.spec
View file @
d9a4c6ce
...
...
@@ -56,6 +56,11 @@ BuildRequires: kernel-headers-modules-std-smp
AutoReq: no
%endif
Requires: kernel-source-etercifs-legacy
Requires: kernel-source-etercifs-2.6.23
Requires: kernel-source-etercifs-2.6.24
Requires: kernel-source-etercifs-2.6.25
%define module_dir /lib/modules/%name
ExclusiveOS: Linux
...
...
@@ -121,15 +126,35 @@ This package has Etersoft's patches for WINE@Etersoft sharing access support.
%install
mkdir -p %kernel_srcdir
cp %SOURCE1 %kernel_srcdir/%src_package_name-%src_package_version.tar.bz2
for N in `seq 18 22`
do
ln -s %kernel_src/%src_package_name-%src_package_version.tar.bz2 %kernel_srcdir/kernel-source-etercifs-2.6.$N-%src_package_version.tar.bz2
done
mkdir -p %buildroot%_datadir/%name
install -m644 buildmodule.sh %buildroot%_datadir/%name/buildmodule.sh
mkdir -p %buildroot%_initdir
sed -e "s|@SRC_DIR@|%_datadir/%name|g" < %name.init > %name.init.repl
install -m755 %name.init.repl %buildroot%_initdir/%name
install -m755 %name.outformat %buildroot%_initdir/%name.outformat
%files
%_datadir/%name/buildmodule.sh
%_initdir/%name
%_initdir/%name.outformat
%files -n %src_package_name
%attr(0644,root,root) %kernel_src/%src_package_name-%src_package_version.tar.bz2
%kernel_src/kernel-source-etercifs-2.6.??-%src_package_version.tar.bz2
%changelog
* Thu Aug 28 2008 Konstantin Baev <kipruss@altlinux.org> 1:1.0-alt1
- fix build on Fedora 8 (2.6.18-53)
* Mon Sep 01 2008 Konstantin Baev <kipruss@altlinux.org> 1:1.0-alt1
- sources changed - now it's with Etersoft patches
- source directory renamed to cifs
- sources will be packaged in separate kernel-source package,
named kernel-source-etercifs-legacy-1.50c
- no more compiled module etercifs.ko in rpm, just install scripts and src
* Thu Jan 31 2008 Vitaly Lipatov <lav@altlinux.ru> 1.50c-alt4
- fix build on Fedora 8 (2.6.18-53)
...
...
linux-cifs/build.sh
View file @
d9a4c6ce
...
...
@@ -3,99 +3,12 @@
# Author: Vitaly Lipatov <lav@etersoft.ru>
# GNU Public License
# Build kernel modules for all kernel and all platforms
.
./functions.sh
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
get_src_dir
||
fatal
"Distro
$(
$DISTR_VENDOR
-e
)
is not supported yet"
[
-n
"
$BUILDDIR
"
]
||
BUILDDIR
=
`
pwd
`
/new-cifs-backport
BUILTLIST
=
# SMP build
[
-z
"
$RPM_BUILD_NCPUS
"
]
&&
RPM_BUILD_NCPUS
=
`
/usr/bin/getconf _NPROCESSORS_ONLN
`
[
"
$RPM_BUILD_NCPUS
"
-gt
1
]
&&
MAKESMP
=
"-j
$RPM_BUILD_NCPUS
"
||
MAKESMP
=
""
# Heuristic
detect_kernel
()
{
# Detect kernel version
if
[
-f
$KERNEL_SOURCE
/.kernelrelease
]
;
then
KERNELVERSION
=
`
head
-n
1
$KERNEL_SOURCE
/.kernelrelease
`
elif
[
-f
$KERNEL_SOURCE
/include/config/kernel.release
]
;
then
KERNELVERSION
=
`
head
-n
1
$KERNEL_SOURCE
/include/config/kernel.release
`
elif
[
-f
$KERNEL_SOURCE
/include/linux/version.h
]
;
then
KERNELVERSION
=
`
head
-n
1
$KERNEL_SOURCE
/include/linux/version.h |
grep
UTS_RELEASE |
cut
-d
" "
-f
3 |
sed
-e
's|"||g'
`
fi
if
[
-z
"
$KERNELVERSION
"
]
;
then
head
-n
5
$KERNEL_SOURCE
/Makefile |
sed
-e
"s| ||g"
>
get_version
.
./get_version
KERNELVERSION
=
$VERSION
.
$PATCHLEVEL
.
$SUBLEVEL$EXTRAVERSION
# Hack for strange SUSE 10.2
if
[
-z
"
$EXTRAVERSION
"
]
;
then
KERNELVERSION
=
`
grep
KERNELSRC
$KERNEL_SOURCE
/Makefile |
head
-n
1 |
sed
-e
"s|.*linux-||g"
`
[
-n
"
$KERNELVERSION
"
]
&&
KERNELVERSION
=
$KERNELVERSION
-
`
basename
$KERNEL_SOURCE
`
fi
fi
}
[
-z
"
$DESTDIR$SRC_DIR
"
]
&&
exit
1
echo
"Install sources to
$DESTDIR
/
$SRC_DIR
"
install
-m755
-d
$DESTDIR
/
$SRC_DIR
install
-m644
$BUILDDIR
/
*
$DESTDIR
/
$SRC_DIR
||
exit
1
install
-m644
buildmodule.sh
$DESTDIR
/
$SRC_DIR
||
exit
1
for
KERNEL_SOURCE
in
`
echo
$BASE_KERNEL_SOURCES_DIR
`
;
do
[
-L
$KERNEL_SOURCE
]
&&
[
`
basename
$KERNEL_SOURCE
`
!=
"build"
]
&&
continue
#[ -f $KERNEL_SOURCE/Makefile ] || continue
# .config in Linux 2.6 only?
[
-f
$KERNEL_SOURCE
/.config
]
||
continue
echo
echo
"================================================================="
# set GCC version if needed
test
-f
$KERNEL_SOURCE
/gcc_version.inc
&&
.
$KERNEL_SOURCE
/gcc_version.inc
&&
echo
"Use GCC
$GCC_VERSION
"
&&
export
USEGCC
=
"CC=gcc-
$GCC_VERSION
"
#make CC=gcc$GCC_VERSION KERNSRC=$KERNEL_SOURCE kernel$KERNEL_VERSION
detect_kernel
echo
"Build for
$KERNEL_SOURCE
(detected as
$KERNELVERSION
)"
if
[
-z
"
$KERNELVERSION
"
]
;
then
fatal
"Can't detect kernel version in
$KERNEL_SOURCE
"
fi
BUILTLIST
=
"
$BUILTLIST
$KERNELVERSION
"
KERVER
=
$(
echo
$KERNELVERSION
|
cut
-b
1-3
)
# Clean, build and check
make
$USEGCC
-C
$KERNEL_SOURCE
here
=
$BUILDDIR
SUBDIRS
=
$BUILDDIR
clean
make
$USEGCC
-C
$KERNEL_SOURCE
here
=
$BUILDDIR
SUBDIRS
=
$BUILDDIR
modules
$MAKESMP
#[ "$KERVER" = "2.4" ] && MODULENAME=$(echo $MODULENAME.o) || MODULENAME=$(echo $MODULENAME.?o)
[
"
$KERVER
"
=
"2.4"
]
&&
MODULEFILENAME
=
$MODULEFILENAME
.o
||
MODULEFILENAME
=
$MODULENAME
.ko
test
-r
"
$BUILDDIR
/
$MODULEFILENAME
"
||
{
echo
"can't locate built module
$MODULEFILENAME
, continue"
;
continue
;
}
#echo "$KERNELVERSION $MODULENAME to $INSTALL_MOD_PATH"
strip
--strip-debug
--discard-all
$BUILDDIR
/
$MODULEFILENAME
mkdir
-p
$INSTALL_MOD_PATH
/
$KERNELVERSION
/kernel/fs/cifs
||
fatal
"broken path"
cp
-fv
$BUILDDIR
/
$MODULEFILENAME
$INSTALL_MOD_PATH
/
$KERNELVERSION
/kernel/fs/cifs
||
fatal
"copy error"
# copy last as default
#cp -f $BUILDDIR/$MODULENAME $INSTALL_MOD_PATH/$PACKNAME/
#make -C $KERNEL_SOURCE here=`pwd`/ SUBDIRS=`pwd`/ modules_install
BUILTLIST
=
"
$BUILTLIST
---DONE"
done
#cd -
# Lav: We can has package without binary modules
#test -z "$BUILTLIST" && fatal "build nothing"
echo
echo
"========================================================================"
echo
"CIFS Linux kernel module built for follow kernels (marked as ---DONE):"
for
i
in
$BUILTLIST
;
do
echo
"
$i
"
;
done
echo
mkdir
-p
$SBIN_DIR
$INIT_DIR
#install -m755 linux-cifs_depmod.sh $INSTALL_MOD_PATH/$PACKNAME/
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
...
...
linux-cifs/functions.sh
View file @
d9a4c6ce
...
...
@@ -30,6 +30,15 @@ get_src_dir()
[
-z
"
$BASE_KERNEL_SOURCES_DIR
"
]
&&
return
1
return
0
}
exit_handler
()
{
local
rc
=
$?
trap
- EXIT
[
-z
"
$tmpdir
"
]
||
rm
-rf
--
"
$tmpdir
"
exit
$rc
}
# :
#/lib/modules/$(shell uname -r)/build
...
...
linux-cifs/kernel_src.list
View file @
d9a4c6ce
Generic /usr/src/*
ALTLinux /usr/src/*
ASPLinux /usr/src/kernels/*
ASPLinux/10 /lib/modules/*/build
RedHat /usr/src/kernels/*
RHEL /usr/src/kernels/*
CentOS /usr/src/kernels/*
LinuxXP /usr/src/kernels/*
Scientific /usr/src/kernels/*
FedoraCore /usr/src/kernels/*
Debian /usr/src/*
Ubuntu /usr/src/*
SUSE /usr/src/linux-*/*/*
NLD /usr/src/linux-*/*/*
MOPSLinux /usr/src/*
Slackware /usr/src/*
Mandriva /usr/src/*
Gentoo /usr/src/*
Generic /usr/src/kernel/sources/*
ALTLinux /usr/src/kernel/sources/*
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment