Commit 08a10117 authored by Vitaly Lipatov's avatar Vitaly Lipatov Committed by Automatic Converter

1.48a-alt7

- fix build on 2.6.22 kernels - fix scripts for Debian/Ubuntu
parent e6b70e9c
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
Name: linux-cifs Name: linux-cifs
Version: 1.48a Version: 1.48a
%define relnum 3 %define relnum 7
Summary: Advanced Common Internet File System for Linux with Etersoft extension Summary: Advanced Common Internet File System for Linux with Etersoft extension
...@@ -108,6 +108,28 @@ MAN_DIR=%buildroot%_mandir/ INIT_DIR=%buildroot%_initdir/ SBIN_DIR=%buildroot%_s ...@@ -108,6 +108,28 @@ MAN_DIR=%buildroot%_mandir/ INIT_DIR=%buildroot%_initdir/ SBIN_DIR=%buildroot%_s
/usr/src/%name/ /usr/src/%name/
%changelog %changelog
* Fri Jul 27 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt7
- fix build on 2.6.22 kernels
- fix scripts for Debian/Ubuntu
* Tue Jun 26 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt6
- WINE@Etersoft 1.0.7 bugfix release
- some start script fixes, install manually build first
- fix build for kernels in symlinked build dir
- fix build on ASP Linux 2.6.9-55 kernels
* Tue Jun 19 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt5
- WINE@Etersoft 1.0.7 release
- fix build on ALT ovz-smp
- fix build with 2.6.9 and older kernel
- fix build on ALT Linux 2.4
- fix caching after oplock break (eterbug #477)
- fix build with 2.6.18 on CentOS/5 and Fedora
* Sun Jun 17 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt4
- WINE@Etersoft 1.0.7 rc1
- script fixes
* Thu Jun 14 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt3 * Thu Jun 14 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt3
- WINE@Etersoft 1.0.7 beta - WINE@Etersoft 1.0.7 beta
- fix inode revalidate for read requests - fix inode revalidate for read requests
......
/functions.sh/1.1/Sat Jun 9 18:28:40 2007// /functions.sh/1.1/Sat Jun 9 18:28:40 2007//
/kernel_src.list/1.1/Fri Jun 8 11:05:01 2007// /kernel_src.list/1.1/Fri Jun 8 11:05:01 2007//
/linux-cifs.outformat/1.1/Sat Jun 9 19:27:46 2007//
/linux-cifs.release.sh/1.1/Sat Jun 9 18:26:48 2007//
/linux-cifs_depmod.sh/1.1/Fri Mar 16 18:14:13 2007// /linux-cifs_depmod.sh/1.1/Fri Mar 16 18:14:13 2007//
/linux-cifs.spec/1.11/Tue Jun 12 22:09:52 2007// /buildmodule.sh/1.13/Sat Jun 23 07:18:55 2007//
/linux-cifs-shared.patch/1.16/Thu Jun 14 14:54:53 2007// D/gentoo////
/build.sh/1.16/Thu Jun 14 14:55:14 2007// /build.sh/1.23/Tue Jul 3 06:26:08 2007//
/buildmodule.sh/1.8/Thu Jun 14 14:54:48 2007// /TODO/1.6/Tue Jul 3 06:12:36 2007//
/TODO/1.2/Thu Jun 14 14:55:23 2007// /linux-cifs.outformat/1.3/Fri Jul 27 11:55:53 2007//
/linux-cifs.init/1.14/Thu Jun 14 16:23:52 2007// /linux-cifs-shared.patch/1.29/Fri Jul 27 16:25:24 2007//
D /linux-cifs.spec/1.21/Fri Jul 27 16:41:33 2007//
/linux-cifs.init/1.27/Fri Aug 31 18:21:27 2007//
/linux-cifs.release.sh/1.2/Fri Jul 27 11:58:40 2007//
+ KERNSRC, + Сделать проверку наличия компилятора gcc
? + Сделать свою сборку на каждое ядро?
Проверять в wine, что модуль - наш?
Что делать с -e - посмотреть, как устроено в Ubuntu
Сделать вывод открытых файлов со статусом на стороне клиента через файл в /proc
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
. ./functions.sh . ./functions.sh
echo "All kernel build script. (c) 2007 Etersoft. $Id: build.sh,v 1.16 2007/06/14 14:55:14 lav Exp $" echo "All kernel build script. (c) 2007 Etersoft. $Id: build.sh,v 1.23 2007/07/03 06:26:08 lav Exp $"
PACKNAME=linux-cifs PACKNAME=linux-cifs
get_src_dir || fatal "Distro $($DISTR_VENDOR -e) is not supported yet" get_src_dir || fatal "Distro $($DISTR_VENDOR -e) is not supported yet"
...@@ -47,7 +47,7 @@ install -m644 $BUILDDIR/* $SBIN_DIR/../src/linux-cifs/ || exit 1 ...@@ -47,7 +47,7 @@ install -m644 $BUILDDIR/* $SBIN_DIR/../src/linux-cifs/ || exit 1
install -m644 buildmodule.sh $SBIN_DIR/../src/linux-cifs/ || exit 1 install -m644 buildmodule.sh $SBIN_DIR/../src/linux-cifs/ || exit 1
for KERNEL_SOURCE in `echo $BASE_KERNEL_SOURCES_DIR` ; do for KERNEL_SOURCE in `echo $BASE_KERNEL_SOURCES_DIR` ; do
[ -L $KERNEL_SOURCE ] && continue [ -L $KERNEL_SOURCE ] && [ `basename $KERNEL_SOURCE` != "build" ] && continue
#[ -f $KERNEL_SOURCE/Makefile ] || continue #[ -f $KERNEL_SOURCE/Makefile ] || continue
# .config in Linux 2.6 only? # .config in Linux 2.6 only?
[ -f $KERNEL_SOURCE/.config ] || continue [ -f $KERNEL_SOURCE/.config ] || continue
...@@ -66,7 +66,6 @@ for KERNEL_SOURCE in `echo $BASE_KERNEL_SOURCES_DIR` ; do ...@@ -66,7 +66,6 @@ for KERNEL_SOURCE in `echo $BASE_KERNEL_SOURCES_DIR` ; do
BUILTLIST="$BUILTLIST $KERNELVERSION" BUILTLIST="$BUILTLIST $KERNELVERSION"
KERVER=$(echo $KERNELVERSION | cut -b 1-3) KERVER=$(echo $KERNELVERSION | cut -b 1-3)
# Clean, build and check # Clean, build and check
make $USEGCC -C $KERNEL_SOURCE here=$BUILDDIR SUBDIRS=$BUILDDIR clean make $USEGCC -C $KERNEL_SOURCE here=$BUILDDIR SUBDIRS=$BUILDDIR clean
make $USEGCC -C $KERNEL_SOURCE here=$BUILDDIR SUBDIRS=$BUILDDIR modules $MAKESMP make $USEGCC -C $KERNEL_SOURCE here=$BUILDDIR SUBDIRS=$BUILDDIR modules $MAKESMP
...@@ -85,11 +84,12 @@ for KERNEL_SOURCE in `echo $BASE_KERNEL_SOURCES_DIR` ; do ...@@ -85,11 +84,12 @@ for KERNEL_SOURCE in `echo $BASE_KERNEL_SOURCES_DIR` ; do
BUILTLIST="$BUILTLIST---DONE" BUILTLIST="$BUILTLIST---DONE"
done done
#cd - #cd -
test -z "$BUILTLIST" && fatal "build nothing" # Lav: We can has package without binary modules
#test -z "$BUILTLIST" && fatal "build nothing"
echo echo
echo "========================================================================" echo "========================================================================"
echo "CIFS Linux kernel module built for follow kernels (marked as ---DONE):" echo "CIFS Linux kernel module built for follow kernels (marked as ---DONE):"
for i in $BUILTLIST ; do echo -e "\t$i" ; done for i in $BUILTLIST ; do echo " $i" ; done
echo echo
mkdir -p $SBIN_DIR $INIT_DIR mkdir -p $SBIN_DIR $INIT_DIR
#install -m755 linux-cifs_depmod.sh $INSTALL_MOD_PATH/$PACKNAME/ #install -m755 linux-cifs_depmod.sh $INSTALL_MOD_PATH/$PACKNAME/
......
#!/bin/sh #!/bin/sh
# 2007 (c) Etersoft http://etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# GNU Public License
# Build kernel module in installed system # Build kernel module in installed system
...@@ -28,9 +31,9 @@ if [ ! -f $KERNSRC/include/linux/version.h ]; then ...@@ -28,9 +31,9 @@ if [ ! -f $KERNSRC/include/linux/version.h ]; then
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-devel-XXXX for FCx / ASP Linux kernel-XXXX-devel for FCx / ASP Linux
kernel-source-stripped-XXXX for Mandriva 2007 kernel-source-stripped-XXXX for Mandriva 2007
linux-headers 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
...@@ -40,7 +43,19 @@ EOF ...@@ -40,7 +43,19 @@ EOF
fi fi
# set GCC version if needed # set GCC version if needed
test -f $KERNSRC/gcc_version.inc && . $KERNSRC/gcc_version.inc && echo "We in ALT Linux, use GCC $GCC_VERSION" && export USEGCC="CC=gcc-$GCC_VERSION" if [ -f $KERNSRC/gcc_version.inc ] ; then
. $KERNSRC/gcc_version.inc
echo "We in ALT Linux, use GCC $GCC_VERSION"
export GCCNAME=gcc-$GCC_VERSION
export USEGCC="CC=$GCCNAME"
else
export GCCNAME=gcc
fi
if ! which $GCCNAME ; then
echo "GCC compiler have not found. Please install gcc package."
exit 1
fi
# Clean, build and check # Clean, build and check
rm -f $BUILDDIR/$MODULENAME rm -f $BUILDDIR/$MODULENAME
......
D/linux-cifs////
/release_port.sh/1.1/Wed Jun 27 09:02:40 2007//
wine-etersoft-public/linux-cifs/gentoo
/linux-cifs-1.48a.ebuild/1.5/Wed Jun 27 18:06:00 2007//
D
wine-etersoft-public/linux-cifs/gentoo/linux-cifs
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
inherit eutils flag-o-matic multilib
DESCRIPTION="Advanced Common Internet File System for Linux with Etersoft extension"
HOMEPAGE="http://etersoft.ru/wine"
CIFSVER=1.48a
WINENUMVERSION=current
SRC_URI="ftp://updates.etersoft.ru/pub/Etersoft/WINE@Etersoft-$WINENUMVERSION/sources/tarball/${P}.tar.bz2
ftp://updates.etersoft.ru/pub/Etersoft/WINE@Etersoft-$WINENUMVERSION/sources/tarball/cifs-$CIFSVER.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE=""
RESTRICT="test" #72375
RDEPEND=">=sys-kernel/linux-headers-2.6"
# this will not build as 64bit code
#export ABI=x86
src_unpack() {
unpack ${A}
cd "${WORKDIR}/${P}" || die
mv ../cifs-bld-tmp ./ || die
patch -s -p1 -d cifs-bld-tmp/fs/cifs <linux-cifs-shared.patch || die
}
config_cache() {
local h ans="no"
use $1 && ans="yes"
shift
for h in "$@" ; do
[[ ${h} == *.h ]] \
&& h=header_${h} \
|| h=lib_${h}
export ac_cv_${h//[:\/.]/_}=${ans}
done
}
src_compile() {
export LDCONFIG=/bin/true
strip-flags
true
}
src_install() {
MAN_DIR=${D}/usr/man/ INIT_DIR=${D}/etc/init.d/ SBIN_DIR=${D}/usr/sbin/ INSTALL_MOD_PATH=${D}/lib/modules/ ./build.sh || die
true
}
pkg_postinst() {
einfo "Use /etc/init.d/linux-cifs build for build kernel module"
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>wine</herd>
<longdescription>
Wine is an Open Source implementation of the Windows API on top of X and Unix.
Think of Wine as a compatibility layer for running Windows programs. Wine does not require Microsoft Windows, as it is a completely free alternative implementation of the Windows API consisting of 100% non-Microsoft code, however Wine can optionally use native Windows DLLs if they are available. Wine provides both a development toolkit for porting Windows source code to Unix as well as a program loader, allowing many unmodified Windows programs to run on x86-based Unixes, including Linux, FreeBSD, and Solaris.
</longdescription>
</pkgmetadata>
#!/bin/sh
. /etc/rpm/etersoft-build-functions
WORKDIR=/home/builder/Projects/eterbuild/functions
PORTNAME=linux-cifs
test -f $WORKDIR/config.in && . $WORKDIR/config.in
#check_key
update_from_cvs
WINENUMVERSION=current
TARNAME=gentoo-$PORTNAME.tar.bz2
TARPATH=$WINEPUB_PATH-$WINENUMVERSION/sources/$TARNAME
echo "Creating $TARPATH"
tar cvfj $TARPATH $PORTNAME/* --exclude CVS
...@@ -373,9 +373,21 @@ Force revalidate for inode ...@@ -373,9 +373,21 @@ Force revalidate for inode
.write = do_sync_write, .write = do_sync_write,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
.readv = generic_file_readv, .readv = generic_file_readv,
@@ -989,6 +1002,10 @@
to server still is disconnected since oplock
already released by the server in that case */
if(pTcon->tidStatus != CifsNeedReconnect) {
+ /* PV: disable caching if oplock missed */
+ CIFS_I(inode)->clientCanCacheRead = FALSE;
+ CIFS_I(inode)->clientCanCacheAll = FALSE;
+
rc = CIFSSMBLock(0, pTcon, netfid,
0 /* len */ , 0 /* offset */, 0,
0, LOCKING_ANDX_OPLOCK_RELEASE,
--- cifs/inode.c 2007-06-12 22:05:31 +0400 --- cifs/inode.c 2007-06-12 22:05:31 +0400
+++ cifs/inode.c 2007-06-14 16:03:51 +0400 +++ cifs/inode.c 2007-06-14 21:42:57 +0400
@@ -1027,7 +1027,7 @@ @@ -1027,7 +1027,7 @@
direntry->d_inode->i_count.counter, direntry, direntry->d_inode->i_count.counter, direntry,
direntry->d_time, jiffies)); direntry->d_time, jiffies));
...@@ -385,14 +397,16 @@ Force revalidate for inode ...@@ -385,14 +397,16 @@ Force revalidate for inode
/* was set to zero previously to force revalidate */ /* was set to zero previously to force revalidate */
} else if (time_before(jiffies, cifsInode->time + HZ) && } else if (time_before(jiffies, cifsInode->time + HZ) &&
lookupCacheEnabled) { lookupCacheEnabled) {
@@ -1070,17 +1070,17 @@ @@ -1069,18 +1069,18 @@
/* if not oplocked, we invalidate inode pages if mtime or file size
had changed on server */ had changed on server */
if (timespec_equal(&local_mtime,&direntry->d_inode->i_mtime) && - if (timespec_equal(&local_mtime,&direntry->d_inode->i_mtime) &&
- (local_size == direntry->d_inode->i_size)) { - (local_size == direntry->d_inode->i_size)) {
- cFYI(1, ("cifs_revalidate - inode unchanged")); - cFYI(1, ("cifs_revalidate - inode unchanged"));
+ (local_size == direntry->d_inode->i_size) && + if (!cifsInode->needForceInvalidate &&
+ !cifsInode->needForceInvalidate ) { + timespec_equal(&local_mtime,&direntry->d_inode->i_mtime) &&
+ (local_size == direntry->d_inode->i_size) ) {
+ cFYI(1, ("***************************** cifs_revalidate - inode unchanged")); + cFYI(1, ("***************************** cifs_revalidate - inode unchanged"));
} else { } else {
/* file may have changed on server */ /* file may have changed on server */
...@@ -407,8 +421,12 @@ Force revalidate for inode ...@@ -407,8 +421,12 @@ Force revalidate for inode
} }
/* can not grab this sem since kernel filesys locking documentation /* can not grab this sem since kernel filesys locking documentation
@@ -1101,8 +1101,13 @@ @@ -1099,10 +1099,17 @@
/* if(S_ISDIR(direntry->d_inode->i_mode))
shrink_dcache_parent(direntry); */
if (S_ISREG(direntry->d_inode->i_mode)) { if (S_ISREG(direntry->d_inode->i_mode)) {
+ /* (pv): filemap_fdatawait
+ . */
if (direntry->d_inode->i_mapping) if (direntry->d_inode->i_mapping)
filemap_fdatawait(direntry->d_inode->i_mapping); filemap_fdatawait(direntry->d_inode->i_mapping);
+ +
...@@ -434,3 +452,191 @@ Force revalidate for inode ...@@ -434,3 +452,191 @@ Force revalidate for inode
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
struct inode vfs_inode; struct inode vfs_inode;
#endif #endif
Correct build for ovz-kernels
, utsname,
--- cifs/connect.c 2007-06-17 22:44:40 +0400
+++ cifs/connect.c 2007-06-17 23:01:57 +0400
@@ -39,6 +39,7 @@
#endif
#include <asm/uaccess.h>
#include <asm/processor.h>
+#include <linux/autoconf.h>
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsproto.h"
@@ -826,7 +827,7 @@
separator[1] = 0;
memset(vol->source_rfc1001_name,0x20,15);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
for(i=0;i < strnlen(utsname()->nodename,15);i++) {
/* does not have to be a perfect mapping since the field is
informational, only used for servers that do not support
@@ -2248,7 +2249,7 @@
32, nls_codepage);
bcc_ptr += 2 * bytes_returned;
bytes_returned =
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
cifs_strtoUCS((__le16 *)bcc_ptr, utsname()->release,
32, nls_codepage);
@@ -2281,7 +2282,7 @@
}
strcpy(bcc_ptr, "Linux version ");
bcc_ptr += strlen("Linux version ");
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
strcpy(bcc_ptr, utsname()->release);
bcc_ptr += strlen(utsname()->release) + 1;
#else
@@ -2551,7 +2552,7 @@
32, nls_codepage);
bcc_ptr += 2 * bytes_returned;
bytes_returned =
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
cifs_strtoUCS((__le16 *)bcc_ptr, utsname()->release, 32,
nls_codepage);
@@ -2574,7 +2575,7 @@
} else { /* ASCII */
strcpy(bcc_ptr, "Linux version ");
bcc_ptr += strlen("Linux version ");
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
strcpy(bcc_ptr, utsname()->release);
bcc_ptr += strlen(utsname()->release) + 1;
#else
@@ -2954,7 +2955,7 @@
bcc_ptr += 2 * bytes_returned;
bytes_returned =
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release, 32,
nls_codepage);
#else
@@ -3011,7 +3012,7 @@
strcpy(bcc_ptr, "Linux version ");
bcc_ptr += strlen("Linux version ");
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
strcpy(bcc_ptr, utsname()->release);
bcc_ptr += strlen(utsname()->release) + 1;
#else
--- cifs/sess.c.orig 2007-06-17 22:44:45 +0400
+++ cifs/sess.c 2007-06-17 23:02:33 +0400
@@ -30,6 +30,7 @@
#include "ntlmssp.h"
#include "nterr.h"
#include <linux/utsname.h>
+#include <linux/autoconf.h>
extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8,
unsigned char *p24);
@@ -117,7 +118,7 @@
bytes_ret = cifs_strtoUCS((__le16 *)bcc_ptr, "Linux version ", 32,
nls_cp);
bcc_ptr += 2 * bytes_ret;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
bytes_ret = cifs_strtoUCS((__le16 *) bcc_ptr, utsname()->release,
32, nls_cp);
#else
@@ -167,7 +168,7 @@
strcpy(bcc_ptr, "Linux version ");
bcc_ptr += strlen("Linux version ");
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18) || defined CONFIG_VE
strcpy(bcc_ptr, utsname()->release);
bcc_ptr += strlen(utsname()->release) + 1;
#else
Fix compiling for 2.6.9 and older
--- cifs/inode.c.orig 2007-06-12 22:05:31 +0400
+++ cifs/inode.c 2007-06-18 23:18:59 +0400
@@ -1178,7 +1185,11 @@
goto out_truncate;
do_expand:
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
+#else
+ limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
+#endif
if (limit != RLIM_INFINITY && offset > limit) {
spin_unlock(&inode->i_lock);
goto out_sig;
Fin compiling for 2.6.18 in Fedora 7 and CentOS 5
--- cifs/cifsfs.c.orig 2007-06-19 00:05:21 +0400
+++ cifs/cifsfs.c 2007-06-20 23:13:10 +0400
@@ -294,7 +294,7 @@
file data or metadata */
cifs_inode->clientCanCacheRead = FALSE;
cifs_inode->clientCanCacheAll = FALSE;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
#endif
cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
--- cifs/asn1.c.orig 2007-06-22 22:53:02 +0400
+++ cifs/asn1.c 2007-06-22 22:53:05 +0400
@@ -26,7 +26,7 @@
#include "cifsglob.h"
#include "cifs_debug.h"
#include "cifsproto.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
#include <linux/config.h>
#endif
--- cifs-smp-o/cifsfs.c 2007-06-05 12:26:04 +0400
+++ cifs/cifsfs.c 2007-07-03 11:40:34 +0400
@@ -184,7 +184,7 @@
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
-void * kzalloc(size_t size, unsigned flgs)
+void * kzalloc(size_t size, int flgs)
{
void * buf;
buf = kmalloc(size, flgs);
--- cifs-smp-o/cifsproto.h 2007-05-17 15:54:32 +0400
+++ cifs/cifsproto.h 2007-07-03 11:40:19 +0400
@@ -366,6 +366,6 @@
extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon,
const int netfid, __u64 * pExtAttrBits, __u64 *pMask);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
-extern void * kzalloc(size_t size, unsigned flgs);
+extern void * kzalloc(size_t size, int flgs);
#endif
#endif /* _CIFSPROTO_H */
2.6.22 ?
--- cifs/cifsfs.c.orig 2007-04-05 02:11:56 +0400
+++ cifs/cifsfs.c 2007-07-27 20:23:34 +0400
@@ -782,11 +782,8 @@
{
struct cifsInodeInfo *cifsi = inode;
- if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
- SLAB_CTOR_CONSTRUCTOR) {
- inode_init_once(&cifsi->vfs_inode);
- INIT_LIST_HEAD(&cifsi->lockList);
- }
+ inode_init_once(&cifsi->vfs_inode);
+ INIT_LIST_HEAD(&cifsi->lockList);
}
static int
...@@ -15,7 +15,8 @@ MODULENAME=cifs ...@@ -15,7 +15,8 @@ MODULENAME=cifs
# current module or manually built # current module or manually built
DEFMODULEPATH=/lib/modules/linux-cifs/$(uname -r)/$MODULENAME.ko DEFMODULEPATH=/lib/modules/linux-cifs/$(uname -r)/$MODULENAME.ko
MANMODULEPATH=/lib/modules/linux-cifs/$MODULENAME.ko MANMODULEPATH=/lib/modules/linux-cifs/$MODULENAME.ko
[ -r "$DEFMODULEPATH" ] || DEFMODULEPATH=$MANMODULEPATH # use manually build if exists
[ -r "$MANMODULEPATH" ] && DEFMODULEPATH=$MANMODULEPATH
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/linux-cifs.outformat
...@@ -30,6 +31,7 @@ else ...@@ -30,6 +31,7 @@ else
SETCOLOR_NORMAL(){ :; } SETCOLOR_NORMAL(){ :; }
fi fi
# TODO: use printf?
success() success()
{ {
MOVE_TO_COL MOVE_TO_COL
...@@ -37,7 +39,7 @@ success() ...@@ -37,7 +39,7 @@ success()
SETCOLOR_SUCCESS SETCOLOR_SUCCESS
echo -n 'DONE' echo -n 'DONE'
SETCOLOR_NORMAL SETCOLOR_NORMAL
echo -e ' ]\r' echo ' ]'
} }
failure() failure()
...@@ -47,7 +49,7 @@ failure() ...@@ -47,7 +49,7 @@ failure()
SETCOLOR_FAILURE SETCOLOR_FAILURE
echo -n 'FAILED' echo -n 'FAILED'
SETCOLOR_NORMAL SETCOLOR_NORMAL
echo -e ']\r' echo ']'
} }
passed() passed()
...@@ -57,7 +59,7 @@ passed() ...@@ -57,7 +59,7 @@ passed()
SETCOLOR_WARNING SETCOLOR_WARNING
echo -n 'PASSED' echo -n 'PASSED'
SETCOLOR_NORMAL SETCOLOR_NORMAL
echo -e ']\r' echo ']'
} }
get_pid() get_pid()
...@@ -82,23 +84,43 @@ is_moduled() ...@@ -82,23 +84,43 @@ is_moduled()
lsmod | grep $MODULENAME > /dev/null lsmod | grep $MODULENAME > /dev/null
} }
umount_cifs()
{
WASCIFS=
if mount | grep cifs 2>/dev/null ; then
WASCIFS=1
fi
echo -n "Unmounting CIFS resources... "
umount -t cifs -a || { failure ; return ; }
}
mount_cifs()
{
echo -n "Mounting CIFS resources... "
mount -t cifs -a || { failure ; return ; }
}
load_module() load_module()
{ {
local i local i
if is_moduled ; then if is_moduled ; then
#test -r /proc/fs/cifs/Etersoft && { passed ; return ; } #test -r /proc/fs/cifs/Etersoft && { passed ; return ; }
umount_cifs
echo -n "Removing CIFS kernel module... " echo -n "Removing CIFS kernel module... "
rmmod $MODULENAME || { failure ; return ; } rmmod $MODULENAME || { failure ; return ; }
fi fi
# Preload module dependencies # Preload module dependencies
modprobe nls_base || { echo -n "nls_base is not loaded" ; failure ; } modprobe nls_base 2>/dev/null
# kernel depends
# || { echo -n "nls_base is not loaded" ; failure ; }
echo -n "Loading CIFS kernel module... " echo -n "Loading CIFS kernel module... "
if [ -r "$DEFMODULEPATH" ] ; then if [ -r "$DEFMODULEPATH" ] ; then
insmod $DEFMODULEPATH && { echo -n -e "\n\tinsmod $DEFMODULEPATH" ; success ; return ; } insmod $DEFMODULEPATH && { echo ; echo -n " insmod $DEFMODULEPATH" ; success ; return ; }
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,\nyou can try compile it with 'service linux-cifs build' command." echo -n "$MODULENAME from Etersoft is not found,"
echo -n "you can try compile it with 'service linux-cifs build' command."
failure failure
} }
...@@ -106,11 +128,12 @@ start() ...@@ -106,11 +128,12 @@ start()
{ {
load_module load_module
if is_moduled ; then if is_moduled ; then
test -r /proc/fs/cifs/Etersoft || { echo -n "Check CIFS for Etersoft extensions... " ; failure ; return ; } test -r /proc/fs/cifs/Etersoft 2>/dev/null || { echo -n "Check CIFS for Etersoft extensions... " ; failure ; return ; }
echo -n "Enable Etersoft extensions for CIFS..." echo -n "Enable Etersoft extensions for CIFS..."
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
else else
failure failure
fi fi
...@@ -119,8 +142,9 @@ start() ...@@ -119,8 +142,9 @@ start()
stop() stop()
{ {
echo -n "Unloading CIFS kernel module... " echo -n "Unloading CIFS kernel module... "
umount_cifs
is_moduled || { passed ; return ; } is_moduled || { passed ; return ; }
rmmod $MODULENAME || { failure ; return ; } rmmod $MODULENAME || { failure ; echo "You have to umount all CIFS resources."; return ; }
success success
} }
...@@ -129,28 +153,25 @@ status() ...@@ -129,28 +153,25 @@ status()
{ {
local PRECOMP local PRECOMP
echo "CIFS module status:" echo "CIFS module status:"
if [ "$DEFMODULEPATH" = "$MANMODULEPATH" ] ; then # FIXME
PRECOMP="manually built" #if [ "$DEFMODULEPATH" = "$MANMODULEPATH" ] ; then
else # PRECOMP="manually built"
PRECOMP="precompiled" #else
fi # PRECOMP="precompiled"
#fi
if is_moduled ; then if is_moduled ; then
echo -e "\tkernel 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 ; }
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` = "1" && success || failure test "`cat /proc/fs/cifs/Etersoft 2>/dev/null`" = "1" && success || failure
echo -n "Linux extensions for CIFS disabled..." echo -n "Unix extensions for CIFS disabled..."
test `cat /proc/fs/cifs/LinuxExtensionsEnabled` = "1" && failure || success test "`cat /proc/fs/cifs/LinuxExtensionsEnabled 2>/dev/null`" = "1" && failure || success
else else
echo -e "\tkernel module $MODULENAME is not loaded ($PRECOMP)" echo " kernel module $MODULENAME is not loaded ($PRECOMP)"
fi fi
} }
restart()
{
stop
start
}
case "$1" in case "$1" in
start) start)
start start
...@@ -159,11 +180,12 @@ case "$1" in ...@@ -159,11 +180,12 @@ case "$1" in
stop stop
;; ;;
restart) restart)
restart stop
start
;; ;;
build) build)
cd /usr/src/linux-cifs cd /usr/src/linux-cifs
bash buildmodule.sh sh buildmodule.sh
;; ;;
status) status)
status status
...@@ -172,7 +194,8 @@ case "$1" in ...@@ -172,7 +194,8 @@ case "$1" in
# remove manual built module # remove manual built module
rm -f $MANMODULEPATH rm -f $MANMODULEPATH
if [ "`cat /proc/fs/cifs/Etersoft 2>/dev/null`" = "1" ] ; then if [ "`cat /proc/fs/cifs/Etersoft 2>/dev/null`" = "1" ] ; then
restart stop
start
else else
echo -n "Etersoft CIFS module..." && passed echo -n "Etersoft CIFS module..." && passed
fi fi
......
#!/bin/sh #!/bin/sh
# Output formatting functions. # Output formatting functions.
# $Id: linux-cifs.outformat,v 1.1 2007/06/09 19:27:46 lav Exp $ # $Id: linux-cifs.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>.
......
...@@ -23,7 +23,7 @@ build_rpms_name $SPECNAME ...@@ -23,7 +23,7 @@ build_rpms_name $SPECNAME
test -z "$BASENAME" && fatal "BASENAME is empty" test -z "$BASENAME" && fatal "BASENAME is empty"
#NAMEVER=$BASENAME-$VERSION #NAMEVER=$BASENAME-$VERSION
rpmbb $SPECNAME || fatal "Can't build" #rpmbb $SPECNAME || fatal "Can't build"
if [ -n "$WINEPUB_PATH" -a $USER = "lav" ] ; then if [ -n "$WINEPUB_PATH" -a $USER = "lav" ] ; then
# Path to local publishing # Path to local publishing
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
Name: linux-cifs Name: linux-cifs
Version: 1.48a Version: 1.48a
%define relnum 2 %define relnum 7
Summary: Advanced Common Internet File System for Linux with Etersoft extension Summary: Advanced Common Internet File System for Linux with Etersoft extension
...@@ -108,6 +108,33 @@ MAN_DIR=%buildroot%_mandir/ INIT_DIR=%buildroot%_initdir/ SBIN_DIR=%buildroot%_s ...@@ -108,6 +108,33 @@ MAN_DIR=%buildroot%_mandir/ INIT_DIR=%buildroot%_initdir/ SBIN_DIR=%buildroot%_s
/usr/src/%name/ /usr/src/%name/
%changelog %changelog
* Fri Jul 27 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt7
- fix build on 2.6.22 kernels
- fix scripts for Debian/Ubuntu
* Tue Jun 26 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt6
- WINE@Etersoft 1.0.7 bugfix release
- some start script fixes, install manually build first
- fix build for kernels in symlinked build dir
- fix build on ASP Linux 2.6.9-55 kernels
* Tue Jun 19 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt5
- WINE@Etersoft 1.0.7 release
- fix build on ALT ovz-smp
- fix build with 2.6.9 and older kernel
- fix build on ALT Linux 2.4
- fix caching after oplock break (eterbug #477)
- fix build with 2.6.18 on CentOS/5 and Fedora
* Sun Jun 17 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt4
- WINE@Etersoft 1.0.7 rc1
- script fixes
* Thu Jun 14 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt3
- WINE@Etersoft 1.0.7 beta
- fix inode revalidate for read requests
- fix build module scripts
* Tue Jun 12 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt2 * Tue Jun 12 2007 Vitaly Lipatov <lav@altlinux.ru> 1.48a-alt2
- WINE@Etersoft 1.0.7 alpha - WINE@Etersoft 1.0.7 alpha
......
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