mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
* Remove AUFS1, it's obsolete and we don't use it anymore.
svn path=/nixpkgs/trunk/; revision=30321
This commit is contained in:
parent
169d5c3214
commit
756df1fb12
3 changed files with 0 additions and 178 deletions
|
@ -1,133 +0,0 @@
|
|||
Debian patch for aufs on 2.6.29
|
||||
|
||||
---
|
||||
|
||||
Add support for Kernel 2.6.29.
|
||||
|
||||
Changes we are affected by:
|
||||
1. dentry_open() receives a new argument for passing the cred
|
||||
2. current->fsuid is now current_fsuid()
|
||||
3. disable security_inode_* calls, as they are not exported normally. Enable
|
||||
them only if CONFIG_AUFS_SEC_PERM_PATCH is defined
|
||||
--- a/fs/aufs25/export.c
|
||||
+++ b/fs/aufs25/export.c
|
||||
@@ -384,7 +384,11 @@ static struct dentry *au_lkup_by_ino(str
|
||||
if (nsi_lock)
|
||||
si_read_unlock(parent->d_sb);
|
||||
path_get(path);
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
file = dentry_open(parent, path->mnt, au_dir_roflags);
|
||||
+ #else
|
||||
+ file = dentry_open(parent, path->mnt, au_dir_roflags, current_cred());
|
||||
+ #endif
|
||||
dentry = (void *)file;
|
||||
if (IS_ERR(file))
|
||||
goto out;
|
||||
--- a/fs/aufs25/file.c
|
||||
+++ b/fs/aufs25/file.c
|
||||
@@ -98,8 +98,13 @@ struct file *au_h_open(struct dentry *de
|
||||
h_file = NULL;
|
||||
if (file && au_test_nfs(h_dentry->d_sb))
|
||||
h_file = au_h_intent(dentry, bindex, file);
|
||||
- if (!h_file)
|
||||
+ if (!h_file) {
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags);
|
||||
+ #else
|
||||
+ h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags, current_cred());
|
||||
+ #endif
|
||||
+ }
|
||||
|
||||
/*
|
||||
* a dirty trick for handling FMODE_EXEC and deny_write_access().
|
||||
--- a/fs/aufs25/inode.c
|
||||
+++ b/fs/aufs25/inode.c
|
||||
@@ -405,7 +405,11 @@ int au_test_ro(struct super_block *sb, a
|
||||
|
||||
int au_test_h_perm(struct inode *h_inode, int mask, int dlgt)
|
||||
{
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
if (!current->fsuid)
|
||||
+ #else
|
||||
+ if (!current_fsuid())
|
||||
+ #endif
|
||||
return 0;
|
||||
/* todo: fake nameidata? */
|
||||
return vfsub_permission(h_inode, mask, NULL, dlgt);
|
||||
--- a/fs/aufs25/whout.c
|
||||
+++ b/fs/aufs25/whout.c
|
||||
@@ -274,9 +274,15 @@ static int do_unlink_wh(struct au_hinode
|
||||
* forces superio when the dir has a sticky bit.
|
||||
* this may be a violation of unix fs semantics.
|
||||
*/
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
vfsub_args_init(&vargs, &ign, dlgt,
|
||||
(h_dir->i_mode & S_ISVTX)
|
||||
&& wh_dentry->d_inode->i_uid != current->fsuid);
|
||||
+ #else
|
||||
+ vfsub_args_init(&vargs, &ign, dlgt,
|
||||
+ (h_dir->i_mode & S_ISVTX)
|
||||
+ && wh_dentry->d_inode->i_uid != current_fsuid());
|
||||
+ #endif
|
||||
vfsub_ign_hinode(&vargs, IN_DELETE, hdir);
|
||||
err = vfsub_unlink(h_dir, wh_dentry, &vargs);
|
||||
AuTraceErr(err);
|
||||
@@ -625,7 +631,11 @@ static void reinit_br_wh(void *arg)
|
||||
struct vfsub_args vargs;
|
||||
|
||||
AuTraceEnter();
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
AuDebugOn(current->fsuid);
|
||||
+ #else
|
||||
+ AuDebugOn(current_fsuid());
|
||||
+ #endif
|
||||
|
||||
err = 0;
|
||||
wbr = a->br->br_wbr;
|
||||
--- a/fs/aufs25/xino.c
|
||||
+++ b/fs/aufs25/xino.c
|
||||
@@ -620,8 +620,13 @@ struct file *au_xino_create2(struct supe
|
||||
AuErr("%.*s create err %d\n", AuLNPair(name), err);
|
||||
goto out_dput;
|
||||
}
|
||||
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt),
|
||||
O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE);
|
||||
+ #else
|
||||
+ file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt),
|
||||
+ O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE, current_cred());
|
||||
+ #endif
|
||||
if (IS_ERR(file)) {
|
||||
AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file));
|
||||
goto out_dput;
|
||||
--- a/fs/aufs25/i_op.c
|
||||
+++ b/fs/aufs25/i_op.c
|
||||
@@ -61,7 +61,7 @@ static int h_permission(struct inode *h_
|
||||
AuTraceErr(err);
|
||||
}
|
||||
|
||||
-#if 1 /* todo: export? */
|
||||
+#ifdef CONFIG_AUFS_SEC_PERM_PATCH
|
||||
if (!err)
|
||||
err = au_security_inode_permission(h_inode, mask, NULL,
|
||||
dlgt);
|
||||
@@ -221,7 +221,7 @@ static int h_permission(struct inode *h_
|
||||
AuTraceErr(err);
|
||||
}
|
||||
|
||||
-#if 1 /* todo: export? */
|
||||
+#ifdef CONFIG_AUFS_SEC_PERM_PATCH
|
||||
if (!err)
|
||||
err = au_security_inode_permission(h_inode, mask, fake_nd,
|
||||
dlgt);
|
||||
--- a/fs/aufs25/inode.h
|
||||
+++ b/fs/aufs25/inode.h
|
||||
@@ -148,7 +148,7 @@ int aufs_rename(struct inode *src_dir, s
|
||||
/* dlgt.c */
|
||||
int au_security_inode_permission(struct inode *h_inode, int mask,
|
||||
struct nameidata *fake_nd, int dlgt);
|
||||
-#else
|
||||
+#elif defined(CONFIG_AUFS_SEC_PERM_PATCH)
|
||||
static inline
|
||||
int au_security_inode_permission(struct inode *h_inode, int mask,
|
||||
struct nameidata *fake_nd, int dlgt)
|
|
@ -1,43 +0,0 @@
|
|||
{ stdenv, fetchurl, kernel }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "aufs-20090414-${kernel.version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://nixos.org/tarballs/aufs-20090414.tar.bz2;
|
||||
sha256 = "1jhf3kccx0m84frlgx2d0ysn1c4272dgci59dsk7vsfrf7yik526";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
kernelVersion=$(cd ${kernel}/lib/modules && ls)
|
||||
kernelBuild=$(echo ${kernel}/lib/modules/$kernelVersion/source)
|
||||
tar xvfj ${kernel.src}
|
||||
kernelSource=$(echo $(pwd)/linux-*)
|
||||
cp -prd $kernelBuild/* $kernelSource
|
||||
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$PWD/include"
|
||||
|
||||
make KDIR=$kernelSource -f local.mk
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
cp util/aulchown $out/bin
|
||||
|
||||
ensureDir $out/share/man/man5
|
||||
cp util/aufs.5 $out/share/man/man5
|
||||
|
||||
ensureDir $out/lib/modules/$kernelVersion/misc
|
||||
cp aufs.ko $out/lib/modules/$kernelVersion/misc
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Debian patch to build AUFS on 2.6.29+
|
||||
./debian-2.6.29.diff
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Another Unionfs implementation for Linux";
|
||||
homepage = http://aufs.sourceforge.net/;
|
||||
};
|
||||
}
|
|
@ -5638,8 +5638,6 @@ let
|
|||
|
||||
ati_drivers_x11 = callPackage ../os-specific/linux/ati-drivers { };
|
||||
|
||||
aufs = callPackage ../os-specific/linux/aufs { };
|
||||
|
||||
aufs2 = if kernel.features ? aufs2 then
|
||||
callPackage ../os-specific/linux/aufs2 { }
|
||||
else null;
|
||||
|
|
Loading…
Reference in a new issue