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
71b74214
Commit
71b74214
authored
Mar 04, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drop dkms checking hell
parent
1ea96f55
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
68 deletions
+52
-68
etercifs.spec
etercifs.spec
+1
-0
buildmodule.sh
etercifs/buildmodule.sh
+3
-35
checkmodule.sh
etercifs/checkmodule.sh
+37
-0
etercifs
etercifs/etercifs
+8
-13
etercifs-build
etercifs/etercifs-build
+2
-15
functions.sh
etercifs/functions.sh
+1
-5
No files found.
etercifs.spec
View file @
71b74214
...
...
@@ -76,6 +76,7 @@ EOF
%__subst "s|@INITDIR@|%_initdir|g" etercifs.service
install -D -m644 buildmodule.sh %buildroot%_datadir/%name/buildmodule.sh
install -D -m644 checkmodule.sh %buildroot%_datadir/%name/checkmodule.sh
install -D -m644 functions.sh %buildroot%_datadir/%name/functions.sh
install -D -m755 %name-build %buildroot%_sbindir/%name-build
...
...
etercifs/buildmodule.sh
View file @
71b74214
#!/bin/sh
# 2007-2010 (c) Etersoft http://etersoft.ru
# 2007-2010
, 2017
(c) Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# modified: Konstantin Baev <kipruss@etersoft.ru>
# GNU Public License
...
...
@@ -10,47 +10,15 @@
.
./functions.sh
if
[
$TESTBUILD
-ne
1
]
;
then
if
[
$DKMSBUILD
-eq
1
]
;
then
detect_host_kernel
detect_host_kernel
if
[
-r
$SRC_DIR
/dkms.conf
]
&&
[
`
which dkms 2>/dev/null
`
]
;
then
echo
echo
"Building
$MODULENAME
$MODULEVERSION
for
$KERNELVERSION
Linux kernel with dkms"
dkms_build_module
else
detect_host_kernel
echo
echo
"Building
$MODULENAME
$MODULEVERSION
for
$KERNELVERSION
Linux kernel (headers in
$KERNSRC
)"
compile_module
install_module
fi
else
echo
echo
"====================================================================="
echo
"Check build etercifs module for all found kernels"
BUILTLIST
=
for
LM
in
`
ls
/lib/modules
`
;
do
KERNSRC
=
`
readlink
/lib/modules/
$LM
/build
`
if
[
$KERNSRC
]
;
then
[
-L
$KERNSRC
]
&&
continue
[
-f
$KERNSRC
/.config
]
||
continue
echo
"---------------------------------------------------------------------"
detect_kernel
if
[
-z
"
$KERNELVERSION
"
]
;
then
echo
"Can't detect kernel version in
$KERNSRC
"
else
echo
"Build for
$KERNSRC
(detected as
$KERNELVERSION
)"
BUILTLIST
=
"
$BUILTLIST
$KERNELVERSION
"
compile_module
check_build_module
fi
fi
done
echo
"====================================================================="
echo
"CIFS Linux kernel module
$MODULENAME
$MODULEVERSION
built for follow kernels (marked as ---DONE or ---FAILURE):"
echo
"---------------------------------------------------------------------"
for
i
in
$BUILTLIST
;
do
echo
"
$i
"
;
done
echo
"====================================================================="
fi
exit
0
etercifs/checkmodule.sh
0 → 100644
View file @
71b74214
#!/bin/sh
# 2007-2010, 2017 (c) Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# modified: Konstantin Baev <kipruss@etersoft.ru>
# GNU Public License
.
./functions.sh
echo
echo
"====================================================================="
echo
"Check build etercifs module for all found kernels"
BUILTLIST
=
for
LM
in
`
ls
/lib/modules
`
;
do
KERNSRC
=
`
readlink
/lib/modules/
$LM
/build
`
if
[
$KERNSRC
]
;
then
[
-L
$KERNSRC
]
&&
continue
[
-f
$KERNSRC
/.config
]
||
continue
echo
"---------------------------------------------------------------------"
detect_kernel
if
[
-z
"
$KERNELVERSION
"
]
;
then
echo
"Can't detect kernel version in
$KERNSRC
"
else
echo
"Build for
$KERNSRC
(detected as
$KERNELVERSION
)"
BUILTLIST
=
"
$BUILTLIST
$KERNELVERSION
"
compile_module
check_build_module
fi
fi
done
echo
"====================================================================="
echo
"CIFS Linux kernel module
$MODULENAME
$MODULEVERSION
built for follow kernels (marked as ---DONE or ---FAILURE):"
echo
"---------------------------------------------------------------------"
for
i
in
$BUILTLIST
;
do
echo
"
$i
"
;
done
echo
"====================================================================="
exit
0
etercifs/etercifs
View file @
71b74214
...
...
@@ -41,8 +41,7 @@ else
fatal
"Not found configuration file
$CONFIGFILE
"
fi
[
-n
"
$BUILT
"
]
||
BUILT
=
0
[
-n
"
$DKMS
"
]
||
DKMS
=
1
BUILT
=
0
ORIGMODULENAME
=
cifs
...
...
@@ -216,7 +215,6 @@ load_module()
echo
-n
"trying to compile it..."
if
[
$BUILT
-ne
1
]
;
then
build_module
BUILT
=
1
start
fi
}
...
...
@@ -290,19 +288,15 @@ status()
build_module
()
{
if
[
-r
$SRC_DIR
/dkms.conf
]
&&
[
`
which dkms 2>/dev/null
`
]
&&
[
$DKMS
-eq
1
]
;
then
cd
$DATADIR
DKMSBUILD
=
1 sh buildmodule.sh
else
cd
$DATADIR
sh buildmodule.sh
fi
cd
@DATADIR@
sh buildmodule.sh
||
return
BUILT
=
1
}
test_build_module
()
{
cd
$DATADIR
TESTBUILD
=
1 sh build
module.sh
cd
@DATADIR@
sh check
module.sh
}
case
"
$1
"
in
...
...
@@ -324,7 +318,8 @@ case "$1" in
build
)
build_module
;;
testbuild
)
testbuild|checkbuild
)
# See https://bugs.etersoft.ru/show_bug.cgi?id=2782
test_build_module
;;
status
)
...
...
etercifs/etercifs-build
View file @
71b74214
...
...
@@ -4,18 +4,5 @@
# Pavel Shilovsky <piastry@etersoft.ru>
# 2006, 2007, 2008, 2009, 2010, 2013 Public domain
PACKAGEINFO
=
@DATADIR@/package.conf
if
[
-f
"
$PACKAGEINFO
"
]
;
then
.
$PACKAGEINFO
else
"Not found package information file
$PACKAGEINFO
"
fi
if
[
-r
$SRC_DIR
/dkms.conf
]
&&
[
`
which dkms 2>/dev/null
`
]
;
then
cd
$DATADIR
DKMSBUILD
=
1 sh buildmodule.sh
else
cd
$DATADIR
sh buildmodule.sh
fi
cd
@DATADIR@
sh buildmodule.sh
etercifs/functions.sh
View file @
71b74214
...
...
@@ -21,8 +21,6 @@ else
fatal
"Not found configuration file
$CONFIGFILE
"
fi
[
-n
"
$TESTBUILD
"
]
||
TESTBUILD
=
0
[
-n
"
$DKMSBUILD
"
]
||
DKMSBUILD
=
0
fatal
()
{
...
...
@@ -337,9 +335,7 @@ set_gcc()
{
if
[
-f
$KERNSRC
/gcc_version.inc
]
;
then
.
$KERNSRC
/gcc_version.inc
if
[
$TESTBUILD
-ne
1
]
;
then
echo
"Use GCC
$GCC_VERSION
"
fi
echo
"Use GCC
$GCC_VERSION
"
export
GCCNAME
=
gcc-
$GCC_VERSION
export
USEGCC
=
"CC=
$GCCNAME
"
else
...
...
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