]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Merge tag 'upstream/0.6.5.8'
authorAron Xu <aron@debian.org>
Sat, 17 Sep 2016 16:59:03 +0000 (00:59 +0800)
committerAron Xu <aron@debian.org>
Sat, 17 Sep 2016 16:59:03 +0000 (00:59 +0800)
Upstream version 0.6.5.8

24 files changed:
debian/README.Source [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/control.in [new file with mode: 0644]
debian/control.modules.in [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dkms [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/source/format [new file with mode: 0644]
debian/source/options [new file with mode: 0644]
debian/spl-dkms.install [new file with mode: 0644]
debian/spl-dkms.lintian-overrides [new file with mode: 0644]
debian/spl-dkms.postinst [new file with mode: 0644]
debian/spl-modules-_KVERS_-di.dirs.in [new file with mode: 0644]
debian/spl-modules-_KVERS_-di.install.in [new file with mode: 0644]
debian/spl-modules-_KVERS_.dirs.in [new file with mode: 0644]
debian/spl-modules-_KVERS_.install.in [new file with mode: 0644]
debian/spl-modules-_KVERS_.postinst.in [new file with mode: 0644]
debian/spl-modules-_KVERS_.postrm.in [new file with mode: 0644]
debian/spl.install [new file with mode: 0644]
debian/tests/control [new file with mode: 0644]
debian/tests/dkms-test [new file with mode: 0755]
debian/watch [new file with mode: 0644]

diff --git a/debian/README.Source b/debian/README.Source
new file mode 100644 (file)
index 0000000..295f5e8
--- /dev/null
@@ -0,0 +1,23 @@
+spl-linux for Debian
+
+Using DKMS is the recommended way of installing this kernel
+module, however if you do have the need of building deb/udeb
+packages containing the binary kernel module, here is the way.
+Be careful when proceed with this way, as your attention is 
+required when kernel ABI get changed on target system that this
+module needs to be rebuilt and it needs to replace the originally
+installed package with this newly built one on target system.
+
+You may first install all required build dependency on a machine
+that runs the very same kernel as on your target system, then
+execute following command at the top level directory of the
+decompressed debian source package. Do not install the generated 
+package with kernels that have different configuration, which is
+not supported and likely to break things.
+
+  * deb packages:
+    fakeroot debian/rules override_dh_binary-modules
+  * udeb packages:
+    fakeroot debian/rules override_dh_binary-modules-udeb
+
+ -- Aron Xu <aron@debian.org>  Sun, 14 July 2013 04:00:12 +0800
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..5802ae0
--- /dev/null
@@ -0,0 +1,82 @@
+spl-linux (0.6.5.7-1) unstable; urgency=medium
+
+  * Imported Upstream version 0.6.5.7
+
+ -- Aron Xu <aron@debian.org>  Wed, 25 May 2016 12:17:05 +0800
+
+spl-linux (0.6.5.6-2) unstable; urgency=medium
+
+  * Add license names to entries missing it.
+  * Added autopkgtest using code from Ubuntu using dkms >= 2.2.0.3-3~.
+
+ -- Petter Reinholdtsen <pere@hungry.com>  Thu, 28 Apr 2016 20:21:29 +0800
+
+spl-linux (0.6.5.6-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Aron Xu <aron@debian.org>  Thu, 24 Mar 2016 07:14:47 +0800
+
+spl-linux (0.6.5.5-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Aron Xu <aron@debian.org>  Sun, 20 Mar 2016 22:50:26 +0800
+
+spl-linux (0.6.5.4-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Aron Xu <aron@debian.org>  Sun, 10 Jan 2016 20:13:15 +0800
+
+spl-linux (0.6.5.3-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Aron Xu <aron@debian.org>  Thu, 05 Nov 2015 21:08:25 +0800
+
+spl-linux (0.6.5.2-1) unstable; urgency=medium
+
+  * Imported Upstream version 0.6.5.2
+  * Add conflicts to splat (Closes: #769147)
+
+ -- Aron Xu <aron@debian.org>  Tue, 13 Oct 2015 15:26:33 +0100
+
+spl-linux (0.6.4.2-1) experimental; urgency=medium
+
+  * New upstream release.
+
+ -- Aron Xu <aron@debian.org>  Thu, 13 Aug 2015 19:58:26 +0800
+
+spl-linux (0.6.4.1-1) experimental; urgency=medium
+
+  * New upstream release.
+
+ -- Aron Xu <aron@debian.org>  Sun, 17 May 2015 05:47:51 +0800
+
+spl-linux (0.6.2-2) experimental; urgency=low
+
+  * Add file and libc-dev to Depends of spl-dkms (Closes: #717565).
+
+ -- Aron Xu <aron@debian.org>  Sun, 25 Aug 2013 02:02:15 +0800
+
+spl-linux (0.6.2-1) experimental; urgency=low
+
+  * New upstream release.
+
+ -- Aron Xu <aron@debian.org>  Sat, 24 Aug 2013 14:30:25 +0800
+
+spl-linux (0.6.1-2) experimental; urgency=low
+
+  * Add license info for scripts/kmodtool
+  * Add linux 3.10 compatibility patch from upstream. (Closes: #717565)
+  * Add facility to build udeb and binary modules, thanks Turbo Fredriksson
+    for the work.
+
+ -- Aron Xu <aron@debian.org>  Mon, 29 Jul 2013 16:04:24 +0800
+
+spl-linux (0.6.1-1) experimental; urgency=low
+
+  * Initial Release (Closes: #686453)
+
+ -- Aron Xu <aron@debian.org>  Tue, 02 Apr 2013 01:03:05 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..c412f9c
--- /dev/null
@@ -0,0 +1,59 @@
+Source: spl-linux
+Section: kernel
+Priority: optional
+Maintainer: Debian ZFS on Linux maintainers <pkg-zfsonlinux-devel@lists.alioth.debian.org>
+Uploaders: Aron Xu <aron@debian.org>,
+           Carlos Alberto Lopez Perez <clopez@igalia.com>
+Build-Depends: autoconf,
+               autogen,
+               automake,
+               autotools-dev,
+               debhelper (>= 9),
+               dkms (>> 2.2.0.2-1~),
+               libtool
+Standards-Version: 3.9.8
+Homepage: http://www.zfsonlinux.org/
+Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
+
+Package: spl-dkms
+Architecture: all
+Depends: dkms (>> 2.1.1.2-5), file, libc-dev, lsb-release, ${misc:Depends}
+Recommends: spl (>= ${source:Upstream-Version})
+Provides: spl-modules
+Description: Solaris Porting Layer kernel modules for Linux
+ The Solaris Porting Layer (SPL) is a Linux kernel module which provides
+ many of the Solaris kernel APIs. This shim layer makes it possible to
+ run Solaris kernel code in the Linux kernel with relatively minimal
+ modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
+ module which provides a testing harness for the SPL module.
+ .
+ SPL can be particularly useful when you want to track upstream Illumos
+ (or any other OpenSolaris fork) development closely and don't want the
+ overhead of maintaining a large patch which converts Solaris primitives
+ to Linux primitives.
+ .
+ This package contains the source code for the SPL and SPLAT Linux kernel
+ modules, which can be used with DKMS, so that local kernel modules are
+ automatically built and installed every time the kernel packages are
+ upgraded.
+
+Package: spl
+Architecture: linux-any
+Conflicts: spl-dev, splat
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Recommends: spl-modules | spl-dkms
+Description: Solaris Porting Layer user-space utilities for Linux
+ The Solaris Porting Layer (SPL) is a Linux kernel module which provides
+ many of the Solaris kernel APIs. This shim layer makes it possible to
+ run Solaris kernel code in the Linux kernel with relatively minimal
+ modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
+ module which provides a testing harness for the SPL module.
+ .
+ SPL can be particularly useful when you want to track upstream Illumos
+ (or any other OpenSolaris fork) development closely and don't want the
+ overhead of maintaining a large patch which converts Solaris primitives
+ to Linux primitives.
+ .
+ This package includes the user space utilities needed to test and debug
+ the SPL and SPLAT kernel modules.
diff --git a/debian/control.in b/debian/control.in
new file mode 100644 (file)
index 0000000..51c1318
--- /dev/null
@@ -0,0 +1,59 @@
+Source: spl-linux
+Section: kernel
+Priority: optional
+Maintainer: Debian ZFS on Linux maintainers <pkg-zfsonlinux-devel@lists.alioth.debian.org>
+Uploaders: Aron Xu <aron@debian.org>,
+           Carlos Alberto Lopez Perez <clopez@igalia.com>
+Build-Depends: autoconf,
+               autogen,
+               automake,
+               autotools-dev,
+               debhelper (>= 9),
+               dkms (>> 2.2.0.2-1~),
+               libtool
+Standards-Version: 3.9.6
+Homepage: http://www.zfsonlinux.org/
+Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
+
+Package: spl-dkms
+Architecture: all
+Depends: dkms (>> 2.1.1.2-5), file, libc-dev, lsb-release, ${misc:Depends}
+Recommends: spl (>= ${source:Upstream-Version})
+Provides: spl-modules
+Description: Solaris Porting Layer kernel modules for Linux
+ The Solaris Porting Layer (SPL) is a Linux kernel module which provides
+ many of the Solaris kernel APIs. This shim layer makes it possible to
+ run Solaris kernel code in the Linux kernel with relatively minimal
+ modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
+ module which provides a testing harness for the SPL module.
+ .
+ SPL can be particularly useful when you want to track upstream Illumos
+ (or any other OpenSolaris fork) development closely and don't want the
+ overhead of maintaining a large patch which converts Solaris primitives
+ to Linux primitives.
+ .
+ This package contains the source code for the SPL and SPLAT Linux kernel
+ modules, which can be used with DKMS, so that local kernel modules are
+ automatically built and installed every time the kernel packages are
+ upgraded.
+
+Package: spl
+Architecture: linux-any
+Conflicts: spl-dev, splat
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Recommends: spl-modules | spl-dkms
+Description: Solaris Porting Layer user-space utilities for Linux
+ The Solaris Porting Layer (SPL) is a Linux kernel module which provides
+ many of the Solaris kernel APIs. This shim layer makes it possible to
+ run Solaris kernel code in the Linux kernel with relatively minimal
+ modification. The Solaris Porting LAyer Tests (SPLAT) is a Linux kernel
+ module which provides a testing harness for the SPL module.
+ .
+ SPL can be particularly useful when you want to track upstream Illumos
+ (or any other OpenSolaris fork) development closely and don't want the
+ overhead of maintaining a large patch which converts Solaris primitives
+ to Linux primitives.
+ .
+ This package includes the user space utilities needed to test and debug
+ the SPL and SPLAT kernel modules.
diff --git a/debian/control.modules.in b/debian/control.modules.in
new file mode 100644 (file)
index 0000000..a63f45e
--- /dev/null
@@ -0,0 +1,51 @@
+Source: spl-linux
+Section: kernel
+Priority: extra
+Maintainer: Debian ZFS on Linux maintainers <pkg-zfsonlinux-devel@lists.alioth.debian.org>
+Build-Depends: autotools-dev,
+ autoconf,
+ autogen,
+ automake,
+ debhelper (>= 7.4),
+ dkms (>> 2.1.1.2-5),
+ libtool,
+ linux-headers-_KVERS_-common,
+ linux-headers-_KVERS_
+Standards-Version: 3.9.6
+Homepage: http://www.zfsonlinux.org/
+Vcs-Git: git://anonscm.debian.org/pkg-zfsonlinux/spl.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-zfsonlinux/spl.git
+
+Package: spl-modules-_KVERS_
+Architecture: _ARCH_
+Provides: spl-modules
+Depends: linux-image-_KVERS_
+Recommends: spl (>= ${source:Upstream-Version})
+Description: Solaris Porting Layer kernel modules for Linux (kernel _KVERS_)
+ The Solaris Porting Layer (SPL) is a Linux kernel module which provides
+ many of the Solaris kernel APIs. This shim layer makes it possible to
+ run Solaris kernel code in the Linux kernel with relatively minimal
+ modification.
+ .
+ This package contains the compiled kernel module for _KVERS_
+ .
+ If you have compiled your own kernel, you will most likely need to build
+ your own spl-modules. The spl-source package has been
+ provided for use with the Debian kernel-package utility to produce a 
+ version of spl-module for your kernel.
+
+Package: spl-modules-_KVERS_-di
+Package-Type: udeb
+Provides: spl-modules-_KVERS_-udeb
+Section: debian-installer
+Architecture: _ARCH_
+Depends: ${shlibs:Depends}, ${misc:Depends}, zlib-modules-_KVERS_-di
+Description: Solaris Porting Layer kernel modules for Linux (debian-installar version for kernel _KVERS_)
+ The Solaris Porting Layer (SPL) is a Linux kernel module which provides
+ many of the Solaris kernel APIs. This shim layer makes it possible to
+ run Solaris kernel code in the Linux kernel with relatively minimal
+ modification.
+ .
+ This package contains the compiled kernel module for _KVERS_
+ .
+ This is a minimal package for use in debian-installer.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..2317360
--- /dev/null
@@ -0,0 +1,189 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Solaris Porting Layer for Linux
+Upstream-Contact: Brian Behlendorf <behlendorf1@llnl.gov>
+Source: https://github.com/zfsonlinux/spl/
+Disclaimer:
+ This work was produced at the Lawrence Livermore National Laboratory
+ (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between
+ the U.S. Department of Energy (DOE) and Lawrence Livermore National
+ Security, LLC (LLNS) for the operation of LLNL.
+ .
+ This work was prepared as an account of work sponsored by an agency of
+ the United States Government.  Neither the United States Government nor
+ Lawrence Livermore National Security, LLC nor any of their employees,
+ makes any warranty, express or implied, or assumes any liability or
+ responsibility for the accuracy, completeness, or usefulness of any
+ information, apparatus, product, or process disclosed, or represents
+ that its use would not infringe privately-owned rights.
+ .
+ Reference herein to any specific commercial products, process, or
+ services by trade name, trademark, manufacturer or otherwise does
+ not necessarily constitute or imply its endorsement, recommendation,
+ or favoring by the United States Government or Lawrence Livermore
+ National Security, LLC.  The views and opinions of authors expressed
+ herein do not necessarily state or reflect those of the Untied States
+ Government or Lawrence Livermore National Security, LLC, and shall
+ not be used for advertising or product endorsement purposes.
+
+Files: *
+Copyright: Lawrence Livermore National Security, LLC.
+ The Regents of the University of California
+License: GPL-2+
+
+Files: config/config.guess
+Copyright: Free Software Foundation, Inc.
+License: GPL-2+
+
+Files: config/config.sub
+Copyright: Free Software Foundation, Inc.
+License: GPL-2+
+
+Files: config/deb.am
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: config/depcomp
+Copyright: Free Software Foundation, Inc.
+License: GPL-2+
+
+Files: config/install-sh
+Copyright: 1994 X Consortium
+License: X11-install-sh
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to
+ deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+ TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ .
+ Except as contained in this notice, the name of the X Consortium shall not
+ be used in advertising or otherwise to promote the sale, use or other deal-
+ ings in this Software without prior written authorization from the X Consor-
+ tium.
+
+Files: config/ltmain.sh
+Copyright: Free Software Foundation, Inc.
+License: GPL-2+
+
+Files: config/missing
+Copyright: Free Software Foundation, Inc.
+License: GPL-2+
+
+Files: config/tgz.am
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: debian/*
+Copyright: Darik Horn <dajhorn@vanadac.com>
+ Carlos Alberto Lopez Perez <clopez@igalia.com>
+ Aron Xu <aron@debian.org>
+License: GPL-2+
+
+Files: include/linux/zlib_compat.h
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: include/rpc/xdr.h
+Copyright: Sun Microsystems, Inc.
+License: GPL-2+
+
+Files: include/sys/extdirent.h
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: include/sys/fcntl.h
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: include/sys/idmap.h
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: include/sys/tsd.h
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: include/sys/zmod.h
+Copyright: Jean-loup Gailly
+ Mark Adler
+License: zmod
+ This software is provided 'as-is', without any express or implied
+ warranty.  In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ .
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ .
+ 3. This notice may not be removed or altered from any source distribution.
+
+Files: module/spl/spl-tsd.c
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: module/spl/spl-xdr.c
+Copyright: Sun Microsystems, Inc.
+License: GPL-2+
+
+Files: module/splat/splat-linux.c
+Copyright: Lawrence Livermore National Security, LLC.
+License: GPL-2+
+
+Files: scripts/kmodtool
+Copyright: 2003-2012 Ville Skyttä <ville.skytta@iki.fi>
+ Thorsten Leemhuis <fedora@leemhuis.info>
+ Nicolas Chauvet <kwizart@gmail.com>
+License: BSD-like
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+ .
+ The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+ .
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along with
+ this package; if not, write to the Free Software Foundation, Inc., 51 Franklin
+ St, Fifth Floor, Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public License version 2
+ can be found in the file /usr/share/common-licenses/GPL-2.
diff --git a/debian/dkms b/debian/dkms
new file mode 100644 (file)
index 0000000..b349ded
--- /dev/null
@@ -0,0 +1,35 @@
+AUTOINSTALL="yes"
+PACKAGE_NAME="spl"
+PACKAGE_VERSION="#MODULE_VERSION#"
+PRE_BUILD="configure
+  --prefix=/usr
+  --with-config=kernel
+  --with-linux=$(case `lsb_release -is` in
+                   (Debian)
+                     if [ -e ${kernel_source_dir/%build/source} ]
+                     then
+                       echo ${kernel_source_dir/%build/source}
+                     else
+                       # This is a kpkg exception for Proxmox 2.0
+                      echo ${kernel_source_dir}
+                     fi
+                     ;;
+                   (*)
+                     echo ${kernel_source_dir}
+                     ;;
+                 esac)
+  --with-linux-obj=${kernel_source_dir}
+"
+POST_INSTALL="cp
+  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/spl_config.h
+  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build/module/Module.symvers
+  ${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/${kernelver}/${arch}/
+"
+REMAKE_INITRD="no"
+MAKE[0]="make"
+BUILT_MODULE_NAME[0]="spl"
+BUILT_MODULE_LOCATION[0]="module/spl/"
+DEST_MODULE_LOCATION[0]="/extra/spl/spl"
+BUILT_MODULE_NAME[1]="splat"
+BUILT_MODULE_LOCATION[1]="module/splat/"
+DEST_MODULE_LOCATION[1]="/extra/splat/splat"
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..81c0e43
--- /dev/null
@@ -0,0 +1,131 @@
+#!/usr/bin/make -f
+
+NAME := $(shell awk '$$1 == "Name:" { print $$2; }' META)
+VERSION := $(shell dpkg-parsechangelog \
+  | awk '$$1 == "Version:" { print $$2; }' | cut -d- -f1)
+
+DKMSFILES := module include config spl.release.in autogen.sh \
+               META AUTHORS DISCLAIMER
+
+ifndef DEB_HOST_ARCH
+DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
+endif
+
+ifndef KVERS
+KVERS=$(shell uname -r)
+endif
+
+non_epoch_version=$(shell echo $(KVERS) | perl -pe 's/^\d+://')
+PACKAGE=spl
+pmodules = $(PACKAGE)-modules-$(non_epoch_version)
+
+%:
+       dh $@ --with dkms
+
+override_dh_auto_configure:
+       @cp debian/control.in debian/control
+
+       @# Embed the downstream version in the module.
+       @sed -e 's/^Version:.*/Version:      $(VERSION)/' -i.orig META
+
+       @# Create the makefiles and configure script.
+       ./autogen.sh
+
+       @# Build the userland, but don't build the kernel modules.
+       ./configure --prefix=/usr --with-config=user \
+               --disable-debug-kmem
+
+override_dh_auto_test:
+       # scripts/check.sh tries insmod and rmmod, so it cannot
+       # run in an unprivileged build environment.
+
+override_dh_auto_install:
+       @# Install the utilities.
+       $(MAKE) install DESTDIR='$(CURDIR)/debian/tmp'
+
+       @# Get a bare copy of the source code.
+       @# This creates the $(CURDIR)/$(NAME)-$(VERSION)/ tree.
+       $(MAKE) distdir
+
+       # Install the DKMS source.
+       @# We only want the files needed to build the modules
+       mkdir -p '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'
+       $(foreach file,$(DKMSFILES),mv '$(CURDIR)/$(NAME)-$(VERSION)/$(file)' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)' || exit 1;)
+       @# Hellish awk line:
+       @#  * Deletes from configure.ac the parts not needed for building the kernel module
+       @#     * It deletes from inside AC_CONFIG_FILES([]) everything except:
+       @#        (Makefile$|include/|module/|*.release$)
+       @#  * Takes care of spaces and tabs
+       awk '/^AC_CONFIG_FILES\(\[/,/^\]\)/ { if ($$0 !~ /^(AC_CONFIG_FILES\(\[([ \t]+)?$$|\]\)([ \t]+)?$$|([ \t]+)?(include\/|module\/|Makefile([ \t]+)?$$|spl\.release([ \t]+)?$$))/){next} } {print}' \
+               '$(CURDIR)/$(NAME)-$(VERSION)/configure.ac' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/configure.ac'
+       @# Set "SUBDIRS = module include" for CONFIG_KERNEL and remove SUBDIRS for all other configs.
+       sed '1,/CONFIG_KERNEL/s/SUBDIRS.*=.*//g;s/SUBDIRS.*=.*/SUBDIRS = module include/g;' \
+               '$(CURDIR)/$(NAME)-$(VERSION)/Makefile.am' > '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
+       @# Sanity test
+       grep -q 'SUBDIRS = module include' '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/Makefile.am'
+       @# Run autogen on the stripped source tree
+       cd '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)'; ./autogen.sh
+       rm -fr '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/autom4te.cache'
+
+       @# This shunt allows DKMS to install the Module.symvers and spl_config.h
+       @# files to the ${dkms_tree} area through the POST_INSTALL directive.
+       echo '#!/bin/sh'  >'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
+       echo 'cp "$$@"'  >>'$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
+       chmod 755 '$(CURDIR)/debian/tmp/usr/src/$(NAME)-$(VERSION)/cp'
+
+override_dh_dkms:
+       dh_dkms -V $(VERSION)
+
+override_dh_auto_clean:
+       dh_auto_clean
+       @if test -e META.orig; then mv META.orig META; fi
+       cp debian/control.in debian/control
+
+# ------------
+
+override_dh_prep-deb-files:
+       for templ in $(wildcard $(CURDIR)/debian/*_KVERS_*.in); do \
+               sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ;  s/_ARCH_/$(DEB_HOST_ARCH)/g' \
+               < $$templ > `echo $$templ | sed -e 's/_KVERS_/$(KVERS)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g ; s/\.in$$//'` ; \
+       done
+       sed -e 's/##KVERS##/$(KVERS)/g ; s/#KVERS#/$(KVERS)/g ; s/_KVERS_/$(KVERS)/g ; s/##KDREV##/$(KDREV)/g ; s/#KDREV#/$(KDREV)/g ; s/_KDREV_/$(KDREV)/g ; s/_ARCH_/$(DEB_HOST_ARCH)/g' \
+       < debian/control.modules.in > debian/control
+
+override_dh_configure_modules: override_dh_configure_modules_stamp
+override_dh_configure_modules_stamp:
+       ./configure --with-config=kernel --with-linux=$(KSRC) \
+               --with-linux-obj=$(KOBJ) \
+               --disable-debug-kmem
+       touch override_dh_configure_modules_stamp
+
+override_dh_binary-modules-udeb: override_dh_prep-deb-files override_dh_configure_modules
+       dh_testdir
+       dh_testroot
+       dh_prep
+
+       $(MAKE) -C $(CURDIR)/module modules
+
+       dh_installdirs -p${pmodules}-di
+       dh_install -p${pmodules}-di
+       dh_gencontrol -p${pmodules}-di
+
+       dh_builddeb -p${pmodules}-di
+
+override_dh_binary-modules: override_dh_prep-deb-files override_dh_configure_modules
+       dh_testdir
+       dh_testroot
+       dh_prep
+
+       $(MAKE) -C $(CURDIR)/module modules
+
+       dh_installdocs -p${pmodules}
+       dh_install -p${pmodules}
+       dh_installchangelogs -p${pmodules}
+       dh_compress -p${pmodules}
+       dh_strip -p${pmodules}
+       dh_fixperms -p${pmodules}
+       dh_installdeb -p${pmodules}
+       dh_gencontrol -p${pmodules}
+       dh_md5sums -p${pmodules}
+
+       dh_builddeb -p${pmodules}
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644 (file)
index 0000000..707e48b
--- /dev/null
@@ -0,0 +1 @@
+extend-diff-ignore='.*'
diff --git a/debian/spl-dkms.install b/debian/spl-dkms.install
new file mode 100644 (file)
index 0000000..d11e682
--- /dev/null
@@ -0,0 +1,3 @@
+usr/src
+usr/src/spl-*/AUTHORS  usr/share/doc/spl-dkms/
+usr/src/spl-*/DISCLAIMER       usr/share/doc/spl-dkms/
diff --git a/debian/spl-dkms.lintian-overrides b/debian/spl-dkms.lintian-overrides
new file mode 100644 (file)
index 0000000..94e8472
--- /dev/null
@@ -0,0 +1 @@
+spl-dkms: command-with-path-in-maintainer-script
diff --git a/debian/spl-dkms.postinst b/debian/spl-dkms.postinst
new file mode 100644 (file)
index 0000000..10683a4
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+set -e
+# The hostname and hostid of the last system to access a ZFS pool are stored in
+# the ZFS pool itself.  A pool is foreign if, during `zpool import`, the
+# current hostname and hostid are different than the stored values thereof.
+#
+# The hostid on Solaris is intrinsic, but is not on Linux (see #595790), so the
+# spl kernel module invokes /usr/bin/hostid from the userland in its initialization
+# routine.
+#
+# /usr/bin/hostid will return the 4 first bytes of the file /etc/hostid.
+# If this file is not present or contains less than 4 bytes, then /usr/bin/hostid
+# will return the bytes of the IP address of $(hostname) flipped, or zero if
+# such IP couldn't be obtained
+#
+# This means that things like a DHCP lease change can affect the hostid.
+#
+# Therefore the only way of having a stable hostid is to define it on /etc/hostid.
+# This postinst helper will check if we already have the hostid stabilized by
+# checking the existence of the file /etc/hostid to be 4 bytes at least.
+# If this file don't already exists on our system or has less than 4 bytes, then
+# we will stabilize our current hostid by writing its value to /etc/hostid
+
+if [ ! -f /etc/hostid ] || [ $(stat -c %s /etc/hostid) -lt 4 ] ; then
+
+       # Write our current hostid to /etc/hostid
+       HOSTID=$(hostid)
+       AA=$(echo $HOSTID | cut -b 1,2)
+       BB=$(echo $HOSTID | cut -b 3,4)
+       CC=$(echo $HOSTID | cut -b 5,6)
+       DD=$(echo $HOSTID | cut -b 7,8)
+
+       # Big Endian
+       if echo | gcc -E -dM - | grep -q "__BYTE_ORDER__.*__ORDER_BIG_ENDIAN__"; then
+               # Invoke the printf from coreutils. shell builtin lacks the byte format.
+               /usr/bin/printf "\x$AA\x$BB\x$CC\x$DD" >/etc/hostid
+       else
+       # Little Endian
+               /usr/bin/printf "\x$DD\x$CC\x$BB\x$AA" >/etc/hostid
+       fi
+fi
+
+#DEBHELPER#
diff --git a/debian/spl-modules-_KVERS_-di.dirs.in b/debian/spl-modules-_KVERS_-di.dirs.in
new file mode 100644 (file)
index 0000000..b37016e
--- /dev/null
@@ -0,0 +1,2 @@
+lib/modules/_KVERS_/extra/spl
+lib/modules/_KVERS_/extra/splat
diff --git a/debian/spl-modules-_KVERS_-di.install.in b/debian/spl-modules-_KVERS_-di.install.in
new file mode 100644 (file)
index 0000000..946e3f2
--- /dev/null
@@ -0,0 +1,2 @@
+module/spl/spl.ko      lib/modules/_KVERS_/extra/spl/
+module/splat/splat.ko  lib/modules/_KVERS_/extra/splat/
diff --git a/debian/spl-modules-_KVERS_.dirs.in b/debian/spl-modules-_KVERS_.dirs.in
new file mode 100644 (file)
index 0000000..b37016e
--- /dev/null
@@ -0,0 +1,2 @@
+lib/modules/_KVERS_/extra/spl
+lib/modules/_KVERS_/extra/splat
diff --git a/debian/spl-modules-_KVERS_.install.in b/debian/spl-modules-_KVERS_.install.in
new file mode 100644 (file)
index 0000000..946e3f2
--- /dev/null
@@ -0,0 +1,2 @@
+module/spl/spl.ko      lib/modules/_KVERS_/extra/spl/
+module/splat/splat.ko  lib/modules/_KVERS_/extra/splat/
diff --git a/debian/spl-modules-_KVERS_.postinst.in b/debian/spl-modules-_KVERS_.postinst.in
new file mode 100644 (file)
index 0000000..a795753
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/sh
+set -e
+# The hostname and hostid of the last system to access a ZFS pool are stored in
+# the ZFS pool itself.  A pool is foreign if, during `zpool import`, the
+# current hostname and hostid are different than the stored values thereof.
+#
+# The hostid on Solaris is intrinsic, but is not on Linux (see #595790), so the
+# spl kernel module invokes /usr/bin/hostid from the userland in its initialization
+# routine.
+#
+# /usr/bin/hostid will return the 4 first bytes of the file /etc/hostid.
+# If this file is not present or contains less than 4 bytes, then /usr/bin/hostid
+# will return the bytes of the IP address of $(hostname) flipped, or zero if
+# such IP couldn't be obtained
+#
+# This means that things like a DHCP lease change can affect the hostid.
+#
+# Therefore the only way of having a stable hostid is to define it on /etc/hostid.
+# This postinst helper will check if we already have the hostid stabilized by
+# checking the existence of the file /etc/hostid to be 4 bytes at least.
+# If this file don't already exists on our system or has less than 4 bytes, then
+# we will stabilize our current hostid by writing its value to /etc/hostid
+
+# Run depmod first
+depmod
+
+# Deal with hostid issue as usual
+if [ ! -f /etc/hostid ] || [ $(stat -c %s /etc/hostid) -lt 4 ] ; then
+
+       # Write our current hostid to /etc/hostid
+       HOSTID=$(hostid)
+       AA=$(echo $HOSTID | cut -b 1,2)
+       BB=$(echo $HOSTID | cut -b 3,4)
+       CC=$(echo $HOSTID | cut -b 5,6)
+       DD=$(echo $HOSTID | cut -b 7,8)
+
+       # Big Endian
+       if echo | gcc -E -dM - | grep -q "__BYTE_ORDER__.*__ORDER_BIG_ENDIAN__"; then
+               # Invoke the printf from coreutils. shell builtin lacks the byte format.
+               /usr/bin/printf "\x$AA\x$BB\x$CC\x$DD" >/etc/hostid
+       else
+       # Little Endian
+               /usr/bin/printf "\x$DD\x$CC\x$BB\x$AA" >/etc/hostid
+       fi
+fi
+
+#DEBHELPER#
diff --git a/debian/spl-modules-_KVERS_.postrm.in b/debian/spl-modules-_KVERS_.postrm.in
new file mode 100644 (file)
index 0000000..2a2fc4b
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+# Run depmod after module uninstallation.
+depmod
+
+#DEBHELPER#
diff --git a/debian/spl.install b/debian/spl.install
new file mode 100644 (file)
index 0000000..236670a
--- /dev/null
@@ -0,0 +1 @@
+usr/sbin
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644 (file)
index 0000000..f6e24e0
--- /dev/null
@@ -0,0 +1,3 @@
+Tests: dkms-test
+Restrictions: needs-root, allow-stderr
+Depends: dkms
diff --git a/debian/tests/dkms-test b/debian/tests/dkms-test
new file mode 100755 (executable)
index 0000000..a48a3b2
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+cat <<EOF >/usr/local/bin/dkms
+#!/bin/sh
+set -e
+/usr/sbin/dkms --force "\$@"
+EOF
+chmod +x /usr/local/bin/dkms
+
+/usr/lib/dkms/dkms-autopkgtest
+
+rm --force /usr/local/bin/dkms
diff --git a/debian/watch b/debian/watch
new file mode 100644 (file)
index 0000000..d6e8d88
--- /dev/null
@@ -0,0 +1,2 @@
+version=3
+http://zfsonlinux.org/ .*spl-([\d\.]+)\.tar\.gz$