Merge branch 'master' into staging

Conflicts (simple):
	pkgs/development/lisp-modules/clwrapper/setup-hook.sh
This commit is contained in:
Vladimír Čunát
2014-11-14 14:28:23 +01:00
151 changed files with 6654 additions and 1254 deletions

View File

@@ -318,9 +318,6 @@ with stdenv.lib;
${optionalString (!stdenv.is64bit) ''
HIGHMEM64G? y # We need 64 GB (PAE) support for Xen guest support.
''}
${optionalString stdenv.is64bit ''
INTEL_IOMMU_DEFAULT_ON y
''}
${optionalString (versionAtLeast version "3.9" && stdenv.is64bit) ''
VFIO_PCI_VGA y
''}

View File

@@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
preConfigure = ''
export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml
substituteInPlace doc/rootfs/Makefile.am --replace '@LXCROOTFSMOUNT@' '$out/lib/lxc/rootfs'
substituteInPlace configure.ac --replace '$sysconfdir/' '/etc/'
substituteInPlace configure.ac --replace '$${sysconfdir}/' '/etc/'
'';
configureFlags = [

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Version=@version@
Encoding=UTF-8
Name=@description@
Type=Application
Exec=@exec@
X-KDE-autostart-phase=1
GenericName[en_US]=

View File

@@ -0,0 +1,197 @@
{ stdenv, lib, requireFile, makeWrapper, substituteAll, p7zip
, gawk, utillinux, xorg, glib, dbus_glib, zlib
, kernel ? null, libsOnly ? false
}:
assert (!libsOnly) -> kernel != null;
let xorgFullVer = (builtins.parseDrvName xorg.xorgserver.name).version;
xorgVer = lib.concatStringsSep "." (lib.take 2 (lib.splitString "." xorgFullVer));
x64 = if stdenv.system == "x86_64-linux" then true
else if stdenv.system == "i686-linux" then false
else abort "Parallels Tools for Linux only support {x86-64,i686}-linux targets";
# We autostart user services by ourselves, because prlcc uses hardcoded paths.
autostart = [ { exec = "prlcc";
description = "Parallels Control Center";
}
{ exec = "prldhd";
description = "Parallels Control Center"; # not a mistake
}
{ exec = "prl_wmouse_d";
description = "Parallels Walking Mouse Daemon";
}
{ exec = "prlcp";
description = "Parallels CopyPaste Tool";
}
{ exec = "prlsga";
description = "Parallels Shared Guest Applications Tool";
}
{ exec = "prlshprof";
description = "Parallels Shared Profile Tool";
}
];
in
stdenv.mkDerivation rec {
version = "10.0.2.27712";
name = "prl-tools-${version}";
src = requireFile rec {
name = "prl-tools-lin.iso";
sha256 = "07960jvyv7gihjlg922znjm6db6l6bd23x9mg6ympwibzf2mylmx";
message = ''
Please, place Parallel Tools for Linux image into Nix store
using either
nix-store --add-fixed sha256 ${name}
or
nix-prefetch-url file://path/to/${name}
'';
};
# also maybe python2 to generate xorg.conf
nativeBuildInputs = [ p7zip ] ++ lib.optionals (!libsOnly) [ makeWrapper ];
inherit libsOnly;
unpackPhase = ''
7z x $src
export sourceRoot=.
if test -z "$libsOnly"; then
( cd kmods; tar -xaf prl_mod.tar.gz )
fi
( cd tools; tar -xaf prltools${if x64 then ".x64" else ""}.tar.gz )
'';
kernelVersion = if libsOnly then "" else (builtins.parseDrvName kernel.name).version;
kernelDir = if libsOnly then "" else "${kernel.dev}/lib/modules/${kernelVersion}";
scriptPath = lib.concatStringsSep ":" (lib.optionals (!libsOnly) [ "${utillinux}/bin" "${gawk}/bin" ]);
buildPhase = ''
if test -z "$libsOnly"; then
( # kernel modules
cd kmods
make -f Makefile.kmods \
KSRC=$kernelDir/source \
HEADERS_CHECK_DIR=$kernelDir/source \
KERNEL_DIR=$kernelDir/build \
SRC=$kernelDir/build \
KVER=$kernelVersion
)
# Xorg config (maybe would be useful for other versions)
#python2 installer/xserver-config.py xorg ${xorgVer} /dev/null parallels.conf
fi
'';
libPath = with xorg;
stdenv.lib.makeLibraryPath ([ stdenv.gcc.gcc libXrandr libXext libX11 libXcomposite libXinerama ]
++ lib.optionals (!libsOnly) [ libXi glib dbus_glib zlib ]);
desktops = map (x: substituteAll ({
src = ./autostart.desktop;
name = x.exec + ".desktop";
version = version;
} // x)) autostart;
installPhase = ''
if test -z "$libsOnly"; then
( # kernel modules
cd kmods
mkdir -p $out/lib/modules/${kernelVersion}/extra
cp prl_eth/pvmnet/prl_eth.ko $out/lib/modules/${kernelVersion}/extra
cp prl_tg/Toolgate/Guest/Linux/prl_tg/prl_tg.ko $out/lib/modules/${kernelVersion}/extra
cp prl_fs/SharedFolders/Guest/Linux/prl_fs/prl_fs.ko $out/lib/modules/${kernelVersion}/extra
cp prl_fs_freeze/Snapshot/Guest/Linux/prl_freeze/prl_fs_freeze.ko $out/lib/modules/${kernelVersion}/extra
)
fi
( # tools
cd tools
mkdir -p $out/lib
if test -z "$libsOnly"; then
# install binaries
for i in bin/* sbin/prl_nettool sbin/prl_snapshot; do
install -Dm755 $i $out/$i
done
# other binaries
for i in xorg.7.1/usr/bin/*; do
cp $i $out/bin
done
for i in $out/bin/* $out/sbin/*; do
patchelf \
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$out/lib:$libPath" \
$i
done
mkdir -p $out/bin
install -Dm755 ../installer/prlfsmountd.sh $out/sbin/prlfsmountd
wrapProgram $out/sbin/prlfsmountd \
--prefix PATH ':' "$scriptPath"
for i in lib/*.a; do
cp $i $out/lib
done
for i in xorg.7.1/usr/lib/libprl_wmouse_watcher.*; do
cp $i $out/lib
done
mkdir -p $out/lib/udev/rules.d
for i in *.rules; do
sed 's,/bin/bash,${stdenv.shell},g' $i > $out/lib/udev/rules.d/$i
done
mkdir -p $out/share/autostart
for i in $desktops; do
cat $i | sed "s,^Exec=,Exec=$out/bin/," > $out/share/autostart/$(basename $i)
done
(
cd xorg.${xorgVer}
# Install the X modules.
(
cd x-server/modules
for i in */*; do
install -Dm755 $i $out/lib/xorg/modules/$i
done
)
(
cd usr/lib
libGLXname=$(echo libglx.so*)
install -Dm755 $libGLXname $out/lib/xorg/modules/extensions/$libGLXname
ln -s $libGLXname $out/lib/xorg/modules/extensions/libglx.so
ln -s $libGLXname $out/lib/xorg/modules/extensions/libglx.so.1
)
)
fi
for i in xorg.7.1/usr/lib/libGL.*; do
cp $i $out/lib
done
cd $out
find -name \*.so\* -type f -exec \
patchelf --set-rpath "$out/lib:$libPath" {} \;
cd lib
libGLname=$(echo libGL.so*)
ln -s $libGLname libGL.so
ln -s $libGLname libGL.so.1
)
'';
dontStrip = true;
dontPatchELF = true;
meta = with stdenv.lib; {
description = "Parallels Tools for Linux guests";
homepage = http://parallels.com;
platforms = platforms.linux;
license = licenses.unfree;
# I was making this package blindly and requesting testing from the real user,
# so I can't even test it by myself and won't provide future updates.
maintainers = with maintainers; [ abbradar ];
};
}

View File

@@ -3,11 +3,11 @@
, ncurses, pkgconfig, randrproto, xorgserver, xproto, udev, libXinerama, pixman }:
stdenv.mkDerivation rec {
name = "xf86-input-wacom-0.26.99.1";
name = "xf86-input-wacom-0.27.0";
src = fetchurl {
url = "mirror://sourceforge/linuxwacom/${name}.tar.bz2";
sha256 = "00sclpsmimqfr79zkm8lvkd0b80x62rmcflbv558zy479bnsazav";
sha256 = "0hpc0waa91d34h2fw1sjhxzn2xya51627jrps9rw4a2zb5hh6a6i";
};
buildInputs = [ inputproto libX11 libXext libXi libXrandr libXrender

View File

@@ -8,7 +8,11 @@ stdenv.mkDerivation {
sha256 = "06rrip9fxn13x6qnyp6br68r9pcygb95lld25hnnj88m2vagvg19";
};
patches = [ ./mount_zfs_prefix.patch ./nix-build.patch ];
patches = [
./mount_zfs_prefix.patch
./nix-build.patch # Remove in >=0.6.4
./remove-lock-checks.patch # Remove in >=0.6.4
];
buildInputs = [ spl perl autoconf automake libtool zlib libuuid coreutils ];
@@ -16,34 +20,53 @@ stdenv.mkDerivation {
NIX_CFLAGS_LINK = "-lgcc_s";
preConfigure = ''
./autogen.sh
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount"
substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb"
substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d"
substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d"
substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount"
substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb"
./autogen.sh
'';
configureFlags = [
"--disable-systemd"
"--enable-systemd"
"--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
"--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"--with-spl=${spl}/libexec/spl"
"--with-dracutdir=$(out)/lib/dracut"
"--with-udevdir=$(out)/lib/udev"
"--with-systemdunitdir=$(out)/etc/systemd/system"
"--with-systemdpresetdir=$(out)/etc/systemd/system-preset"
"--sysconfdir=/etc"
"--localstatedir=/var"
];
enableParallelBuilding = true;
# Remove provided services as they are buggy
postInstall = ''
rm $out/etc/systemd/system/zfs-import-*.service
sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/*
for i in $out/etc/systemd/system/*; do
substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target"
done
'';
meta = {
description = "ZFS Filesystem Linux Kernel module";
longDescription = ''
ZFS is a filesystem that combines a logical volume manager with a
Copy-On-Write filesystem with data integrity detection and repair,
snapshotting, cloning, block devices, deduplication, and more.
snapshotting, cloning, block devices, deduplication, and more.
'';
homepage = http://zfsonlinux.org/;
license = stdenv.lib.licenses.cddl;

View File

@@ -17,28 +17,47 @@ stdenv.mkDerivation {
NIX_CFLAGS_LINK = "-lgcc_s";
preConfigure = ''
./autogen.sh
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount"
substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb"
substituteInPlace ./config/user-systemd.m4 --replace "/usr/lib/modules-load.d" "$out/etc/modules-load.d"
substituteInPlace ./config/zfs-build.m4 --replace "\$sysconfdir/init.d" "$out/etc/init.d"
substituteInPlace ./etc/zfs/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
substituteInPlace ./cmd/zed/Makefile.am --replace "\$(sysconfdir)" "$out/etc"
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "umount -t zfs" "${utillinux}/bin/umount -t zfs"
substituteInPlace ./module/zfs/zfs_ctldir.c --replace "mount -t zfs" "${utillinux}/bin/mount -t zfs"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/umount" "${utillinux}/bin/umount"
substituteInPlace ./lib/libzfs/libzfs_mount.c --replace "/bin/mount" "${utillinux}/bin/mount"
substituteInPlace ./udev/rules.d/* --replace "/lib/udev/vdev_id" "$out/lib/udev/vdev_id"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/ztest" "$out/sbin/ztest"
substituteInPlace ./cmd/ztest/ztest.c --replace "/usr/sbin/zdb" "$out/sbin/zdb"
./autogen.sh
'';
configureFlags = [
"--disable-systemd"
"--enable-systemd"
"--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
"--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"--with-spl=${spl_git}/libexec/spl"
"--with-dracutdir=$(out)/lib/dracut"
"--with-udevdir=$(out)/lib/udev"
"--with-systemdunitdir=$(out)/etc/systemd/system"
"--with-systemdpresetdir=$(out)/etc/systemd/system-preset"
"--sysconfdir=/etc"
"--localstatedir=/var"
];
enableParallelBuilding = true;
# Remove provided services as they are buggy
postInstall = ''
rm $out/etc/systemd/system/zfs-import-*.service
sed -i '/zfs-import-scan.service/d' $out/etc/systemd/system/*
for i in $out/etc/systemd/system/*; do
substituteInPlace $i --replace "zfs-import-cache.service" "zfs-import.target"
done
'';
meta = {
description = "ZFS Filesystem Linux Kernel module";
longDescription = ''

View File

@@ -0,0 +1,64 @@
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
index 33f9e0e..2f55e56 100644
--- a/module/zfs/zfs_vnops.c
+++ b/module/zfs/zfs_vnops.c
@@ -474,15 +474,6 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
}
/*
- * Check for mandatory locks
- */
- if (mandatory_lock(ip) &&
- !lock_may_read(ip, uio->uio_loffset, uio->uio_resid)) {
- ZFS_EXIT(zsb);
- return (SET_ERROR(EAGAIN));
- }
-
- /*
* If we're in FRSYNC mode, sync out this znode before reading it.
*/
if (ioflag & FRSYNC || zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
@@ -651,15 +642,6 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
}
/*
- * Check for mandatory locks before calling zfs_range_lock()
- * in order to prevent a deadlock with locks set via fcntl().
- */
- if (mandatory_lock(ip) && !lock_may_write(ip, woff, n)) {
- ZFS_EXIT(zsb);
- return (SET_ERROR(EAGAIN));
- }
-
- /*
* Pre-fault the pages to ensure slow (eg NFS) pages
* don't hold up txg.
* Skip this if uio contains loaned arc_buf.
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
index 90dbfd3..f02c021 100644
--- a/module/zfs/zfs_znode.c
+++ b/module/zfs/zfs_znode.c
@@ -1546,7 +1546,6 @@ zfs_trunc(znode_t *zp, uint64_t end)
int
zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
{
- struct inode *ip = ZTOI(zp);
dmu_tx_t *tx;
zfs_sb_t *zsb = ZTOZSB(zp);
zilog_t *zilog = zsb->z_log;
@@ -1567,15 +1566,6 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
goto out;
}
- /*
- * Check for any locks in the region to be freed.
- */
- if (ip->i_flock && mandatory_lock(ip)) {
- uint64_t length = (len ? len : zp->z_size - off);
- if (!lock_may_write(ip, off, length))
- return (SET_ERROR(EAGAIN));
- }
-
if (len == 0) {
error = zfs_trunc(zp, off);
} else {