Commit 1a50df1c authored by Konstantin Baev's avatar Konstantin Baev

3.0-alt1

- Up version to 2.0 - changed flag in /fs/cifs/file.c - changed package name and service name to etercifs - added Conflicts
parent 2abb42ac
tar.bz2: cifs name=kernel-source-etercifs-legacy-1.50c tar.bz2: cifs name=kernel-source-etercifs-legacy-1.50c
tar.bz2: linux-cifs tar.bz2: etercifs
linux-cifs/test.sh etercifs/test.sh
...@@ -113,7 +113,7 @@ static inline int cifs_get_share_flags(unsigned int flags) ...@@ -113,7 +113,7 @@ static inline int cifs_get_share_flags(unsigned int flags)
{ {
if (!etersoft_flag) if (!etersoft_flag)
return FILE_SHARE_ALL; return FILE_SHARE_ALL;
return ((~(flags>>29))&7); return ((~(flags>>21))&7);
} }
/* all arguments to this function must be checked for validity in caller */ /* all arguments to this function must be checked for validity in caller */
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
%define src_package_name kernel-source-etercifs-legacy %define src_package_name kernel-source-etercifs-legacy
%define src_package_version 1.50c %define src_package_version 1.50c
Name: linux-cifs Name: etercifs
Version: 2.0 Version: 3.0
Release: alt1 Release: alt1
Summary: Advanced Common Internet File System for Linux with Etersoft extension Summary: Advanced Common Internet File System for Linux with Etersoft extension
...@@ -34,7 +34,6 @@ BuildArch: noarch ...@@ -34,7 +34,6 @@ BuildArch: noarch
Source: %name-%version.tar.bz2 Source: %name-%version.tar.bz2
Source1: %src_package_name-%src_package_version.tar.bz2 Source1: %src_package_name-%src_package_version.tar.bz2
#BuildRequires: rpm-build-compat >= 0.97
Requires: rpm-build-compat >= 0.97 Requires: rpm-build-compat >= 0.97
# Spec part for ALT Linux # Spec part for ALT Linux
...@@ -61,10 +60,10 @@ Requires: kernel-source-etercifs-2.6.23 ...@@ -61,10 +60,10 @@ Requires: kernel-source-etercifs-2.6.23
Requires: kernel-source-etercifs-2.6.24 Requires: kernel-source-etercifs-2.6.24
Requires: kernel-source-etercifs-2.6.25 Requires: kernel-source-etercifs-2.6.25
%define module_dir /lib/modules/%name
ExclusiveOS: Linux ExclusiveOS: Linux
Conflicts: linux-cifs
%description %description
The CIFS VFS is a virtual file system for Linux to allow access to The CIFS VFS is a virtual file system for Linux to allow access to
servers and storage appliances compliant with the SNIA CIFS Specification servers and storage appliances compliant with the SNIA CIFS Specification
...@@ -88,14 +87,12 @@ though. ...@@ -88,14 +87,12 @@ though.
This package has Etersoft's patches for WINE@Etersoft sharing access support. This package has Etersoft's patches for WINE@Etersoft sharing access support.
#cifs-bld-tmp/fs/cifs
%define intdir new-cifs-backport
%package -n %src_package_name %package -n %src_package_name
Version: %src_package_version Version: %src_package_version
Summary: Advanced Common Internet File System for Linux with Etersoft extension - module sources Summary: Advanced Common Internet File System for Linux with Etersoft extension - module sources
Group: Development/Kernel Group: Development/Kernel
BuildArch: noarch BuildArch: noarch
Conflicts: kernel-source-linux-cifs-legacy
%description -n %src_package_name %description -n %src_package_name
The CIFS VFS is a virtual file system for Linux to allow access to The CIFS VFS is a virtual file system for Linux to allow access to
...@@ -156,6 +153,12 @@ install -m755 %name.outformat %buildroot%_initdir/%name.outformat ...@@ -156,6 +153,12 @@ install -m755 %name.outformat %buildroot%_initdir/%name.outformat
%kernel_src/kernel-source-etercifs-2.6.??-%src_package_version.tar.bz2 %kernel_src/kernel-source-etercifs-2.6.??-%src_package_version.tar.bz2
%changelog %changelog
* Wed Oct 01 2008 Konstantin Baev <kipruss@altlinux.org> 3.0-alt1
- Up version to 2.0
- changed flag in /fs/cifs/file.c
- changed package name and service name to etercifs
- added Conflicts
* Thu Sep 25 2008 Konstantin Baev <kipruss@altlinux.org> 2.0-alt1 * Thu Sep 25 2008 Konstantin Baev <kipruss@altlinux.org> 2.0-alt1
- Up version to 2.0 - Up version to 2.0
......
#!/bin/sh #!/bin/sh
# 2007 (c) Etersoft http://etersoft.ru # 2007-2008 (c) Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# GNU Public License # GNU Public License
...@@ -40,45 +40,44 @@ BUILDDIR=$tmpdir/${FILENAME%.tar.bz2} ...@@ -40,45 +40,44 @@ BUILDDIR=$tmpdir/${FILENAME%.tar.bz2}
# source and destination directories can be inherited from the environment # source and destination directories can be inherited from the environment
if [ -z "$KERNSRC" ]; then if [ -z "$KERNSRC" ]; then
KERNSRC=/lib/modules/$KERNELVERSION/build KERNSRC=/lib/modules/$KERNELVERSION/build
fi fi
if [ -z "$INSTALL_MOD_PATH" ]; then if [ -z "$INSTALL_MOD_PATH" ]; then
INSTALL_MOD_PATH=/lib/modules/$KERNELVERSION/kernel/fs/cifs INSTALL_MOD_PATH=/lib/modules/$KERNELVERSION/kernel/fs/cifs
#INSTALL_MOD_PATH=/lib/modules/linux-cifs
fi fi
echo 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
cat >&2 <<EOF cat >&2 <<EOF
Error: no kernel headers found at $KERNSRC Error: no kernel headers found at $KERNSRC
Please install package Please install package
kernel-headers-modules-XXXX for ALT Linux kernel-headers-modules-XXXX for ALT Linux
kernel-XXXX-devel for FCx / ASP Linux kernel-XXXX-devel for FCx / ASP Linux
dkms-linux-cifs for Mandriva 2008 dkms-linux-cifs for Mandriva 2008
linux-headers-XXXX for Debian / Ubuntu linux-headers-XXXX for Debian / Ubuntu
kernel-source-XXXX for SuSe kernel-source-XXXX for SuSe
kernel-source-XXXX for Slackware / MOPSLinux kernel-source-XXXX for Slackware / MOPSLinux
or use KERNSRC variable to set correct location or use KERNSRC variable to set correct location
Exiting... Exiting...
EOF EOF
exit 1 exit 1
fi fi
# set GCC version if needed # set GCC version if needed
if [ -f $KERNSRC/gcc_version.inc ] ; then if [ -f $KERNSRC/gcc_version.inc ] ; then
. $KERNSRC/gcc_version.inc . $KERNSRC/gcc_version.inc
echo "We in ALT Linux, use GCC $GCC_VERSION" echo "We in $($DISTR_VENDOR -e), use GCC $GCC_VERSION"
export GCCNAME=gcc-$GCC_VERSION export GCCNAME=gcc-$GCC_VERSION
export USEGCC="CC=$GCCNAME" export USEGCC="CC=$GCCNAME"
else else
export GCCNAME=gcc export GCCNAME=gcc
fi fi
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
...@@ -96,3 +95,4 @@ install -m 644 -o root -g root $BUILDDIR/$MODULEFILENAME $INSTALL_MOD_PATH/ || e ...@@ -96,3 +95,4 @@ install -m 644 -o root -g root $BUILDDIR/$MODULEFILENAME $INSTALL_MOD_PATH/ || e
depmod -ae || exit 1 depmod -ae || exit 1
#echo "$MODULENAME build correctly" #echo "$MODULENAME build correctly"
exit 0 exit 0
#!/bin/sh #!/bin/sh
# #
# linux-cifs CIFS support for Linux kernel # etercifs CIFS support for Linux kernel
# #
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# #
...@@ -23,103 +23,103 @@ MODULENAME=etercifs ...@@ -23,103 +23,103 @@ MODULENAME=etercifs
#MODULEPATH=`echo /lib/modules/$(uname -r)/kernel/fs/cifs/$MODULENAME.*` #MODULEPATH=`echo /lib/modules/$(uname -r)/kernel/fs/cifs/$MODULENAME.*`
OUTFORMAT=/etc/init.d/outformat OUTFORMAT=/etc/init.d/outformat
[ -x $OUTFORMAT ] || OUTFORMAT=/etc/init.d/linux-cifs.outformat [ -x $OUTFORMAT ] || OUTFORMAT=/etc/init.d/etercifs.outformat
if which tput >/dev/null && test -x $OUTFORMAT ; then if which tput >/dev/null && test -x $OUTFORMAT ; then
. $OUTFORMAT . $OUTFORMAT
else else
MOVE_TO_COL(){ :; } MOVE_TO_COL(){ :; }
SETCOLOR_SUCCESS(){ :; } SETCOLOR_SUCCESS(){ :; }
SETCOLOR_FAILURE(){ :; } SETCOLOR_FAILURE(){ :; }
SETCOLOR_WARNING(){ :; } SETCOLOR_WARNING(){ :; }
SETCOLOR_NORMAL(){ :; } SETCOLOR_NORMAL(){ :; }
fi fi
# TODO: use printf? # TODO: use printf?
success() success()
{ {
MOVE_TO_COL MOVE_TO_COL
echo -n '[ ' echo -n '[ '
SETCOLOR_SUCCESS SETCOLOR_SUCCESS
echo -n 'DONE' echo -n 'DONE'
SETCOLOR_NORMAL SETCOLOR_NORMAL
echo ' ]' echo ' ]'
} }
failure() failure()
{ {
MOVE_TO_COL MOVE_TO_COL
echo -n '[' echo -n '['
SETCOLOR_FAILURE SETCOLOR_FAILURE
echo -n 'FAILED' echo -n 'FAILED'
SETCOLOR_NORMAL SETCOLOR_NORMAL
echo ']' echo ']'
} }
passed() passed()
{ {
MOVE_TO_COL MOVE_TO_COL
echo -n '[' echo -n '['
SETCOLOR_WARNING SETCOLOR_WARNING
echo -n 'PASSED' echo -n 'PASSED'
SETCOLOR_NORMAL SETCOLOR_NORMAL
echo ']' echo ']'
} }
get_pid() get_pid()
{ {
# TODO: use pgrep # TODO: use pgrep
PIDOF=/bin/pidof PIDOF=/bin/pidof
if [ -x $PIDOF ] ; then if [ -x $PIDOF ] ; then
dpid=`$PIDOF $1` dpid=`$PIDOF $1`
else else
dpid="$(ps axh | grep $1 | grep -v grep | sed -e 's/ *\(.*\)/\1/' -e 's/ \+/ /g' | grep -v " /bin/sh " | grep -v "^$$ " | cut -f1 -d\ | head -1)" dpid="$(ps axh | grep $1 | grep -v grep | sed -e 's/ *\(.*\)/\1/' -e 's/ \+/ /g' | grep -v " /bin/sh " | grep -v "^$$ " | cut -f1 -d\ | head -1)"
fi fi
return $dpid return $dpid
} }
is_loaded() is_loaded()
{ {
get_pid $1 get_pid $1
test -n "$dpid" test -n "$dpid"
} }
is_moduled() is_moduled()
{ {
lsmod | grep "^$MODULENAME" > /dev/null lsmod | grep "^$MODULENAME" > /dev/null
} }
is_origmoduled() is_origmoduled()
{ {
lsmod | grep "^$ORIGMODULENAME" > /dev/null lsmod | grep "^$ORIGMODULENAME" > /dev/null
} }
umount_cifs() umount_cifs()
{ {
WASCIFS= WASCIFS=
if mount | grep cifs 2>/dev/null ; then if mount | grep cifs 2>/dev/null ; then
WASCIFS=1 WASCIFS=1
fi fi
echo -n "Unmounting CIFS resources... " echo -n "Unmounting CIFS resources... "
umount -t cifs -a || { failure ; return 1; } umount -t cifs -a || { failure ; return 1; }
success success
} }
mount_cifs() mount_cifs()
{ {
echo -n "Mounting CIFS resources... " echo -n "Mounting CIFS resources... "
mount -t cifs -a || { failure ; return 1; } mount -t cifs -a || { failure ; return 1; }
success success
} }
load_module() load_module()
{ {
local i local i
if is_origmoduled ; then if is_origmoduled ; then
#test -r /proc/fs/cifs/Etersoft && { passed ; return ; } #test -r /proc/fs/cifs/Etersoft && { passed ; return ; }
umount_cifs umount_cifs
echo -n "Removing CIFS kernel module... " echo -n "Removing CIFS kernel module... "
$RMMOD $ORIGMODULENAME || { failure ; return ; } $RMMOD $ORIGMODULENAME || { failure ; return ; }
fi fi
# Preload module dependencies # Preload module dependencies
...@@ -133,7 +133,7 @@ load_module() ...@@ -133,7 +133,7 @@ load_module()
# echo -n "Incorrect module. Your system: " ; uname -a ; dmesg | tail -n2 # echo -n "Incorrect module. Your system: " ; uname -a ; dmesg | tail -n2
#fi #fi
echo -n "$MODULENAME from Etersoft is not found," echo -n "$MODULENAME from Etersoft is not found,"
echo -n "you can try compile it with 'service linux-cifs build' command." echo -n "you can try compile it with 'service etercifs build' command."
failure failure
} }
...@@ -146,7 +146,7 @@ start() ...@@ -146,7 +146,7 @@ start()
echo 1 > /proc/fs/cifs/Etersoft && success || failure echo 1 > /proc/fs/cifs/Etersoft && success || failure
echo -n "Disable Linux extensions for CIFS..." echo -n "Disable Linux extensions for CIFS..."
echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled && success || failure echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled && success || failure
test -n "$WASCIFS" && mount_cifs || : test -n "$WASCIFS" && mount_cifs || :
else else
failure failure
fi fi
...@@ -164,41 +164,41 @@ stop() ...@@ -164,41 +164,41 @@ stop()
status() status()
{ {
local PRECOMP local PRECOMP
echo "CIFS module status:" echo "CIFS module status:"
# FIXME # FIXME
#if [ "$DEFMODULEPATH" = "$MANMODULEPATH" ] ; then #if [ "$DEFMODULEPATH" = "$MANMODULEPATH" ] ; then
# PRECOMP="manually built" #PRECOMP="manually built"
#else #else
# PRECOMP="precompiled" #PRECOMP="precompiled"
#fi #fi
if is_origmoduled ; then if is_origmoduled ; then
echo " origin kernel module $ORIGMODULENAME loaded, Etersoft extensions missed" echo " origin kernel module $ORIGMODULENAME loaded, Etersoft extensions missed"
fi fi
if is_moduled ; then if is_moduled ; then
#echo " kernel module $MODULENAME is loaded ($PRECOMP)" #echo " kernel module $MODULENAME is loaded ($PRECOMP)"
test -d /proc/fs/cifs/ 2>/dev/null || { echo -n "Can't locale /proc/fs/cifs... " ; failure ; } test -d /proc/fs/cifs/ 2>/dev/null || { echo -n "Can't locale /proc/fs/cifs... " ; failure ; }
echo " kernel module $MODULENAME is loaded" echo " kernel module $MODULENAME is loaded"
echo -n "Etersoft extensions for CIFS enabled..." echo -n "Etersoft extensions for CIFS enabled..."
test "`cat /proc/fs/cifs/Etersoft 2>/dev/null`" = "1" && success || failure test "`cat /proc/fs/cifs/Etersoft 2>/dev/null`" = "1" && success || failure
echo -n "Unix extensions for CIFS disabled..." echo -n "Unix extensions for CIFS disabled..."
test "`cat /proc/fs/cifs/LinuxExtensionsEnabled 2>/dev/null`" = "1" && failure || success test "`cat /proc/fs/cifs/LinuxExtensionsEnabled 2>/dev/null`" = "1" && failure || success
else else
echo " kernel module $MODULENAME is not loaded" echo " kernel module $MODULENAME is not loaded"
fi fi
} }
build_module() build_module()
{ {
#DKMS=/sbin/dkms #DKMS=/sbin/dkms
# && [ -x $DKMS ] # && [ -x $DKMS ]
# Need name-version for it # Need name-version for it
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 @DATADIR@ cd @DATADIR@
sh buildmodule.sh sh buildmodule.sh
fi fi
} }
case "$1" in case "$1" in
...@@ -213,7 +213,7 @@ case "$1" in ...@@ -213,7 +213,7 @@ case "$1" in
start start
;; ;;
build) build)
build_module build_module
;; ;;
status) status)
status status
...@@ -229,6 +229,6 @@ case "$1" in ...@@ -229,6 +229,6 @@ case "$1" in
fi fi
;; ;;
*) *)
echo "Usage: linux-cifs {start|stop|restart|build|condrestart|condstop|status}" echo "Usage: etercifs {start|stop|restart|build|condrestart|condstop|status}"
esac esac
#!/bin/sh #!/bin/sh
# Output formatting functions. # Output formatting functions.
# $Id: linux-cifs.outformat,v 1.3 2007/07/27 11:55:53 lav Exp $ # $Id: etercifs.outformat,v 1.3 2007/07/27 11:55:53 lav Exp $
# #
# Copyright (C) 2002 Ivan Zakharyaschev <imz@altlinux.ru>. # Copyright (C) 2002 Ivan Zakharyaschev <imz@altlinux.ru>.
# Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>. # Copyright (C) 2002 Dmitry V. Levin <ldv@altlinux.org>.
...@@ -46,53 +46,54 @@ MOVE_TO_COL() ...@@ -46,53 +46,54 @@ MOVE_TO_COL()
# Set 'success' color (currently: green) # Set 'success' color (currently: green)
SETCOLOR_SUCCESS() SETCOLOR_SUCCESS()
{ {
{ {
echo bold echo bold
echo setaf $GREEN echo setaf $GREEN
} |tput -S } |tput -S
} }
# Set 'failure' color (currently: red) # Set 'failure' color (currently: red)
SETCOLOR_FAILURE() SETCOLOR_FAILURE()
{ {
{ {
echo bold echo bold
echo setaf $RED echo setaf $RED
} |tput -S } |tput -S
} }
# Set 'warning' color (currently: yellow) # Set 'warning' color (currently: yellow)
SETCOLOR_WARNING() SETCOLOR_WARNING()
{ {
{ {
echo bold echo bold
echo setaf $YELLOW echo setaf $YELLOW
} |tput -S } |tput -S
} }
# Set 'info' color (currently: cyan) # Set 'info' color (currently: cyan)
SETCOLOR_INFO() SETCOLOR_INFO()
{ {
{ {
echo bold echo bold
echo setaf $CYAN echo setaf $CYAN
} |tput -S } |tput -S
} }
# Set 'banner' color (currently: blue on yellow) # Set 'banner' color (currently: blue on yellow)
SETCOLOR_BANNER() SETCOLOR_BANNER()
{ {
{ {
echo setaf $BLUE echo setaf $BLUE
echo setab $YELLOW echo setab $YELLOW
} |tput -S } |tput -S
} }
# Terminal sequence to reset to the default color. # Terminal sequence to reset to the default color.
SETCOLOR_NORMAL() SETCOLOR_NORMAL()
{ {
{ {
echo op; # set Original color Pair. echo op; # set Original color Pair.
echo sgr0; # turn off all special graphics mode (bold in our case). echo sgr0; # turn off all special graphics mode (bold in our case).
} |tput -S } |tput -S
} }
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
fatal() fatal()
{ {
echo $@ echo $@
exit 1 exit 1
} }
DISTR_VENDOR=/usr/bin/distr_vendor DISTR_VENDOR=/usr/bin/distr_vendor
...@@ -17,33 +17,29 @@ test -x $DISTR_VENDOR || fatal "Can't find distr_vendor" ...@@ -17,33 +17,29 @@ test -x $DISTR_VENDOR || fatal "Can't find distr_vendor"
get_sd() get_sd()
{ {
# BASE_KERNEL_SOURCES_DIR=
BASE_KERNEL_SOURCES_DIR= BASE_KERNEL_SOURCES_DIR=`grep -i $1 kernel_src.list | head -n1 | cut -d" " -f 2 2>/dev/null`
BASE_KERNEL_SOURCES_DIR=`grep -i $1 kernel_src.list | head -n1 | cut -d" " -f 2 2>/dev/null` ETERCIFS_SOURCES_LIST=
# etercifs ETERCIFS_SOURCES_LIST=`grep -i $1 etercifs_src.list | head -n1 | cut -d" " -f 2 2>/dev/null`
ETERCIFS_SOURCES_LIST=
ETERCIFS_SOURCES_LIST=`grep -i $1 etercifs_src.list | head -n1 | cut -d" " -f 2 2>/dev/null`
} }
get_src_dir() get_src_dir()
{ {
# : get_sd `$DISTR_VENDOR -e`
get_sd `$DISTR_VENDOR -e` [ -z "$BASE_KERNEL_SOURCES_DIR" ] && get_sd `$DISTR_VENDOR -d`
[ -z "$BASE_KERNEL_SOURCES_DIR" ] && get_sd `$DISTR_VENDOR -d` [ -z "$BASE_KERNEL_SOURCES_DIR" ] && { echo "Unknown `$DISTR_VENDOR -d`, use Generic" ; get_sd Generic ; }
[ -z "$BASE_KERNEL_SOURCES_DIR" ] && { echo "Unknown `$DISTR_VENDOR -d`, use Generic" ; get_sd Generic ; } [ -z "$BASE_KERNEL_SOURCES_DIR" ] && return 1
[ -z "$BASE_KERNEL_SOURCES_DIR" ] && return 1 return 0
return 0
} }
exit_handler() exit_handler()
{ {
local rc=$? local rc=$?
trap - EXIT trap - EXIT
[ -z "$tmpdir" ] || rm -rf -- "$tmpdir" [ -z "$tmpdir" ] || rm -rf -- "$tmpdir"
exit $rc exit $rc
} }
# :
#/lib/modules/$(shell uname -r)/build #/lib/modules/$(shell uname -r)/build
#fatal "Errror in func" #fatal "Errror in func"
......
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