Added zfs 0.6.5.11 packages.
This commit is contained in:
parent
8918359313
commit
766d0065af
3
sys-fs/zfs-kmod/Manifest
Normal file
3
sys-fs/zfs-kmod/Manifest
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3e4812c05839d49d0cd877b756185c91b2609986f91939fbfda322809ddefc8ff9207fe076db03e0038e585ea2 SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451
|
||||||
|
EBUILD zfs-kmod-0.6.5.11.ebuild 3969 BLAKE2B 151cfd7f84b8a427ea4ae8b190da018ee5f2d6ce789f0124e9bc76b84bbf540942d1a7a07a3a4cac774efbbc2f7741d7f68b54a4196f19e6350933024b9aa423 SHA512 c2c6ccfe19616395a854651edf0a956c26c2737a0efefd7677eb873ac1c9fe92190f33e90a1e32629b2396020b8ecc33105ccd97b0a26407665efb7e1ff2bf46
|
||||||
|
MISC metadata.xml 554 BLAKE2B 3f2673ca745f69a68210ee7e14ef93037285807fb174aad38913c9478ce4f38459cb000ad46f9b6b37a62f3f13287fba9f646bdf55a3c6126704082ecb6294e6 SHA512 c5dbcf5b795510abbe6c6dbea53ea6b9a438f0b2b8f7af28ae3ec9d8816d51c6ee22938bfe7d222d5b451065b57447064fba59e93a9621f1132e3d27ef8d385b
|
18
sys-fs/zfs-kmod/metadata.xml
Normal file
18
sys-fs/zfs-kmod/metadata.xml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>ryao@gentoo.org</email>
|
||||||
|
<name>Richard Yao</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>fearedbliss@gentoo.org</email>
|
||||||
|
<name>Jonathan Vasquez</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="rootfs">Install zfs-shutdown script to support exporting a pool containing rootfs</flag>
|
||||||
|
</use>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">zfsonlinux/zfs</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
143
sys-fs/zfs-kmod/zfs-kmod-0.6.5.11.ebuild
Normal file
143
sys-fs/zfs-kmod/zfs-kmod-0.6.5.11.ebuild
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="5"
|
||||||
|
|
||||||
|
if [ ${PV} == "9999" ]; then
|
||||||
|
AUTOTOOLS_AUTORECONF="1"
|
||||||
|
EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
|
||||||
|
inherit git-r3
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
|
||||||
|
S="${WORKDIR}/zfs-${PV}"
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
|
||||||
|
|
||||||
|
DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
|
||||||
|
HOMEPAGE="http://zfsonlinux.org/"
|
||||||
|
|
||||||
|
LICENSE="CDDL debug? ( GPL-2+ )"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="custom-cflags debug +rootfs"
|
||||||
|
RESTRICT="debug? ( strip ) test"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
=sys-kernel/spl-${PV}*
|
||||||
|
dev-lang/perl
|
||||||
|
virtual/awk
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="${DEPEND}
|
||||||
|
!sys-fs/zfs-fuse
|
||||||
|
"
|
||||||
|
|
||||||
|
AT_M4DIR="config"
|
||||||
|
AUTOTOOLS_IN_SOURCE_BUILD="1"
|
||||||
|
|
||||||
|
DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
linux-info_pkg_setup
|
||||||
|
CONFIG_CHECK="
|
||||||
|
!DEBUG_LOCK_ALLOC
|
||||||
|
!CONFIG_REISER4_FS
|
||||||
|
EFI_PARTITION
|
||||||
|
IOSCHED_NOOP
|
||||||
|
MODULES
|
||||||
|
!PAX_KERNEXEC_PLUGIN_METHOD_OR
|
||||||
|
ZLIB_DEFLATE
|
||||||
|
ZLIB_INFLATE
|
||||||
|
"
|
||||||
|
|
||||||
|
use debug && CONFIG_CHECK="${CONFIG_CHECK}
|
||||||
|
FRAME_POINTER
|
||||||
|
DEBUG_INFO
|
||||||
|
!DEBUG_INFO_REDUCED
|
||||||
|
"
|
||||||
|
|
||||||
|
use rootfs && \
|
||||||
|
CONFIG_CHECK="${CONFIG_CHECK}
|
||||||
|
BLK_DEV_INITRD
|
||||||
|
DEVTMPFS
|
||||||
|
"
|
||||||
|
|
||||||
|
kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
|
||||||
|
|
||||||
|
check_extra_config
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Remove GPLv2-licensed ZPIOS unless we are debugging
|
||||||
|
use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
|
||||||
|
|
||||||
|
# Set module revision number
|
||||||
|
[ ${PV} != "9999" ] && \
|
||||||
|
{ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
|
||||||
|
|
||||||
|
autotools-utils_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
|
||||||
|
use custom-cflags || strip-flags
|
||||||
|
filter-ldflags -Wl,*
|
||||||
|
|
||||||
|
set_arch_to_kernel
|
||||||
|
local myeconfargs=(${myeconfargs}
|
||||||
|
--bindir="${EPREFIX}/bin"
|
||||||
|
--sbindir="${EPREFIX}/sbin"
|
||||||
|
--with-config=kernel
|
||||||
|
--with-linux="${KV_DIR}"
|
||||||
|
--with-linux-obj="${KV_OUT_DIR}"
|
||||||
|
--with-spl="${EROOT}usr/src/${SPL_PATH}"
|
||||||
|
--with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
|
||||||
|
$(use_enable debug)
|
||||||
|
)
|
||||||
|
|
||||||
|
autotools-utils_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
linux-mod_pkg_postinst
|
||||||
|
|
||||||
|
# Remove old modules
|
||||||
|
if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
|
||||||
|
then
|
||||||
|
ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
|
||||||
|
ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
|
||||||
|
ewarn "Automatically removing old modules to avoid problems."
|
||||||
|
rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
|
||||||
|
rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use x86 || use arm
|
||||||
|
then
|
||||||
|
ewarn "32-bit kernels will likely require increasing vmalloc to"
|
||||||
|
ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
|
||||||
|
fi
|
||||||
|
|
||||||
|
ewarn "This version of ZFSOnLinux includes support for new feature flags"
|
||||||
|
ewarn "that are incompatible with previous versions. GRUB2 support for"
|
||||||
|
ewarn "/boot with the new feature flags is not yet available."
|
||||||
|
ewarn "Do *NOT* upgrade root pools to use the new feature flags."
|
||||||
|
ewarn "Any new pools will be created with the new feature flags by default"
|
||||||
|
ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
|
||||||
|
ewarn "create a newpool that is backward compatible wih GRUB2, use "
|
||||||
|
ewarn
|
||||||
|
ewarn "zpool create -d -o feature@async_destroy=enabled "
|
||||||
|
ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
|
||||||
|
ewarn " -o feature@spacemap_histogram=enabled"
|
||||||
|
ewarn " -o feature@enabled_txg=enabled "
|
||||||
|
ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
|
||||||
|
ewarn " ..."
|
||||||
|
ewarn
|
||||||
|
ewarn "GRUB2 support will be updated as soon as either the GRUB2"
|
||||||
|
ewarn "developers do a tag or the Gentoo developers find time to backport"
|
||||||
|
ewarn "support from GRUB2 HEAD."
|
||||||
|
}
|
6
sys-fs/zfs/Manifest
Normal file
6
sys-fs/zfs/Manifest
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
AUX bash-completion-r1 11310 BLAKE2B f6c105fef1737d4be0e76967fdec62aa52fa7665bfc1e9aa4c944dd6442d64d7d31b8af54f92f5db25542f968ecf83da46db8c2a8f978577526bf9f90d8bccf3 SHA512 03be521e2c646196766d5fd049f241cb97f290abf0409881ea6ba709934984deda402c8513009e62a5787e0648023b55c040e5f99baef27709e81c3bc9c8f56e
|
||||||
|
AUX zfs-init.sh.in 582 BLAKE2B 27e5c1aff398c42178b3d7c005e91a1f8f3afa303a22e49c93a2cd7134016a8d07d68483126d60e46ed4ff5cbaeb87f050e9c9fb5bff5352d5dc32b4d94db7b4 SHA512 bed7eae5f902f13489241782d3d560b53a5a3258de492763b7b25783ca9417975afb9000f68f58be5c2057e1db50a569374ed0ff572140aa65e401e20e646461
|
||||||
|
AUX zfs.service.in 335 BLAKE2B a18ad1d70975df98cfb7b5196ad17b7197d5eb59cac2ccb3b9243f111c6c882c3480eb6396e347eac91670e3a67d7f122953d6fa82ec61a6467163b788b31858 SHA512 7a167b389723e5f55fea6956e5546e46c89ebf3e2d1c25f6b56c357e6d3ffc765226549d78cdeb79b4dc90c798ec6326a13996215b40eb49179376e32c3c3287
|
||||||
|
DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3e4812c05839d49d0cd877b756185c91b2609986f91939fbfda322809ddefc8ff9207fe076db03e0038e585ea2 SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451
|
||||||
|
EBUILD zfs-0.6.5.11-r2.ebuild 5958 BLAKE2B 7444a03cff632b6f3697660e223e85f3b1557e393560577f4222dec067fd09e7220ecc77d51df147428ad01c530075b438dd4a4587c8d5a060c93ec577cf4272 SHA512 a9be79d36d5dbd739d875c7879b50bd66d95ea4c5a94f0170cdd7aef4e474f62521897e0232a2fee436477cfb1fdfaa9d0bccbd85be8f680eec3dab305e8b385
|
||||||
|
MISC metadata.xml 754 BLAKE2B 7fc8a5badf77174cc9d31bb1e83da53d910a18884897287bc3666066edcfc03ec6331c09cb7ff02767e14b17df03eddba74549feea61dd044c21a4133f4aa763 SHA512 647ffa3857be38b2aed7462d26bbb1d3ea50fc53068b6d973514fdbadf7164421dd2025165a592855b86a03754d968d36e503dcfafc99e3ed75ee7db3f62df3a
|
391
sys-fs/zfs/files/bash-completion-r1
Normal file
391
sys-fs/zfs/files/bash-completion-r1
Normal file
|
@ -0,0 +1,391 @@
|
||||||
|
# Copyright (c) 2013, Aneurin Price <aneurin.price@gmail.com>
|
||||||
|
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
#if [[ -w /dev/zfs ]]; then
|
||||||
|
__ZFS_CMD="zfs"
|
||||||
|
__ZPOOL_CMD="zpool"
|
||||||
|
#else
|
||||||
|
# __ZFS_CMD="sudo zfs"
|
||||||
|
# __ZPOOL_CMD="sudo zpool"
|
||||||
|
#fi
|
||||||
|
|
||||||
|
__zfs_get_commands()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD 2>&1 | awk '/^\t[a-z]/ {print $1}' | cut -f1 -d '|' | uniq
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_get_properties()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all name space
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_get_editable_properties()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD get 2>&1 | awk '$2 == "YES" {print $1"="}'
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_get_inheritable_properties()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD get 2>&1 | awk '$3 == "YES" {print $1}'
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_list_datasets()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD list -H -o name -t filesystem,volume
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_list_filesystems()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD list -H -o name -t filesystem
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_match_snapshot()
|
||||||
|
{
|
||||||
|
local base_dataset=${cur%@*}
|
||||||
|
if [[ $base_dataset != $cur ]]
|
||||||
|
then
|
||||||
|
$__ZFS_CMD list -H -o name -t snapshot -d 1 $base_dataset
|
||||||
|
else
|
||||||
|
$__ZFS_CMD list -H -o name -t filesystem,volume | awk '{print $1"@"}'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_match_explicit_snapshot()
|
||||||
|
{
|
||||||
|
local base_dataset=${cur%@*}
|
||||||
|
if [[ $base_dataset != $cur ]]
|
||||||
|
then
|
||||||
|
$__ZFS_CMD list -H -o name -t snapshot -d 1 $base_dataset
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_match_multiple_snapshots()
|
||||||
|
{
|
||||||
|
local existing_opts=$(expr "$cur" : '\(.*\)[%,]')
|
||||||
|
if [[ $existing_opts ]]
|
||||||
|
then
|
||||||
|
local base_dataset=${cur%@*}
|
||||||
|
if [[ $base_dataset != $cur ]]
|
||||||
|
then
|
||||||
|
local cur=${cur##*,}
|
||||||
|
if [[ $cur =~ ^%|%.*% ]]
|
||||||
|
then
|
||||||
|
# correct range syntax is start%end
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
local range_start=$(expr "$cur" : '\(.*%\)')
|
||||||
|
$__ZFS_CMD list -H -o name -t snapshot -d 1 $base_dataset | sed 's$.*@$'$range_start'$g'
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
__zfs_match_explicit_snapshot; __zfs_list_datasets
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_list_volumes()
|
||||||
|
{
|
||||||
|
$__ZFS_CMD list -H -o name -t volume
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_argument_chosen()
|
||||||
|
{
|
||||||
|
local word property
|
||||||
|
for word in $(seq $((COMP_CWORD-1)) -1 2)
|
||||||
|
do
|
||||||
|
local prev="${COMP_WORDS[$word]}"
|
||||||
|
if [[ ${COMP_WORDS[$word-1]} != -[tos] ]]
|
||||||
|
then
|
||||||
|
if [[ "$prev" == [^,]*,* ]] || [[ "$prev" == *[@:]* ]]
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
for property in $@
|
||||||
|
do
|
||||||
|
if [[ $prev == "$property" ]]
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_complete_ordered_arguments()
|
||||||
|
{
|
||||||
|
local list1=$1
|
||||||
|
local list2=$2
|
||||||
|
local cur=$3
|
||||||
|
local extra=$4
|
||||||
|
if __zfs_argument_chosen $list1
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$list2 $extra" -- "$cur"))
|
||||||
|
else
|
||||||
|
COMPREPLY=($(compgen -W "$list1 $extra" -- "$cur"))
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_complete_multiple_options()
|
||||||
|
{
|
||||||
|
local options=$1
|
||||||
|
local cur=$2
|
||||||
|
|
||||||
|
COMPREPLY=($(compgen -W "$options" -- "${cur##*,}"))
|
||||||
|
local existing_opts=$(expr "$cur" : '\(.*,\)')
|
||||||
|
if [[ $existing_opts ]]
|
||||||
|
then
|
||||||
|
COMPREPLY=( "${COMPREPLY[@]/#/${existing_opts}}" )
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_complete_switch()
|
||||||
|
{
|
||||||
|
local options=$1
|
||||||
|
if [[ ${cur:0:1} == - ]]
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "-{$options}" -- "$cur"))
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__zfs_complete()
|
||||||
|
{
|
||||||
|
local cur prev cmd cmds
|
||||||
|
COMPREPLY=()
|
||||||
|
# Don't split on colon
|
||||||
|
_get_comp_words_by_ref -n : -c cur -p prev -w COMP_WORDS -i COMP_CWORD
|
||||||
|
cmd="${COMP_WORDS[1]}"
|
||||||
|
|
||||||
|
if [[ ${prev##*/} == zfs ]]
|
||||||
|
then
|
||||||
|
cmds=$(__zfs_get_commands)
|
||||||
|
COMPREPLY=($(compgen -W "$cmds -?" -- "$cur"))
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${cmd}" in
|
||||||
|
clone)
|
||||||
|
case "${prev}" in
|
||||||
|
-o)
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_get_editable_properties)" -- "$cur"))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ! __zfs_complete_switch "o,p"
|
||||||
|
then
|
||||||
|
if __zfs_argument_chosen
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_list_datasets)" -- "$cur"))
|
||||||
|
else
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
get)
|
||||||
|
case "${prev}" in
|
||||||
|
-d)
|
||||||
|
COMPREPLY=($(compgen -W "" -- "$cur"))
|
||||||
|
;;
|
||||||
|
-t)
|
||||||
|
__zfs_complete_multiple_options "filesystem volume snapshot all" "$cur"
|
||||||
|
;;
|
||||||
|
-s)
|
||||||
|
__zfs_complete_multiple_options "local default inherited temporary none" "$cur"
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
__zfs_complete_multiple_options "name property value source received all" "$cur"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ! __zfs_complete_switch "H,r,p,d,o,t,s"
|
||||||
|
then
|
||||||
|
if __zfs_argument_chosen $(__zfs_get_properties)
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur"))
|
||||||
|
else
|
||||||
|
__zfs_complete_multiple_options "$(__zfs_get_properties)" "$cur"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
inherit)
|
||||||
|
if ! __zfs_complete_switch "r"
|
||||||
|
then
|
||||||
|
__zfs_complete_ordered_arguments "$(__zfs_get_inheritable_properties)" "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" $cur
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
list)
|
||||||
|
case "${prev}" in
|
||||||
|
-d)
|
||||||
|
COMPREPLY=($(compgen -W "" -- "$cur"))
|
||||||
|
;;
|
||||||
|
-t)
|
||||||
|
__zfs_complete_multiple_options "filesystem volume snapshot all" "$cur"
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
__zfs_complete_multiple_options "$(__zfs_get_properties)" "$cur"
|
||||||
|
;;
|
||||||
|
-s|-S)
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_get_properties)" -- "$cur"))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ! __zfs_complete_switch "H,r,d,o,t,s,S"
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur"))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
promote)
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur"))
|
||||||
|
;;
|
||||||
|
rollback)
|
||||||
|
if ! __zfs_complete_switch "r,R,f"
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
send)
|
||||||
|
if ! __zfs_complete_switch "d,n,P,p,R,v,i,I"
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_match_snapshot)" -- "$cur"))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
snapshot)
|
||||||
|
case "${prev}" in
|
||||||
|
-o)
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_get_editable_properties)" -- "$cur"))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ! __zfs_complete_switch "o,r"
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_list_datasets | awk '{print $1"@"}')" -- "$cur"))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
set)
|
||||||
|
__zfs_complete_ordered_arguments "$(__zfs_get_editable_properties)" "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" $cur
|
||||||
|
;;
|
||||||
|
upgrade)
|
||||||
|
case "${prev}" in
|
||||||
|
-a|-V|-v)
|
||||||
|
COMPREPLY=($(compgen -W "" -- "$cur"))
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if ! __zfs_complete_switch "a,V,v,r"
|
||||||
|
then
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur"))
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
destroy)
|
||||||
|
if ! __zfs_complete_switch "d,f,n,p,R,r,v"
|
||||||
|
then
|
||||||
|
__zfs_complete_multiple_options "$(__zfs_match_multiple_snapshots)" $cur
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=($(compgen -W "$(__zfs_match_explicit_snapshot) $(__zfs_list_datasets)" -- "$cur"))
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
__ltrim_colon_completions "$cur"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
__zpool_get_commands()
|
||||||
|
{
|
||||||
|
$__ZPOOL_CMD 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq
|
||||||
|
}
|
||||||
|
|
||||||
|
__zpool_get_properties()
|
||||||
|
{
|
||||||
|
$__ZPOOL_CMD get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all
|
||||||
|
}
|
||||||
|
|
||||||
|
__zpool_get_editable_properties()
|
||||||
|
{
|
||||||
|
$__ZPOOL_CMD get 2>&1 | awk '$2 == "YES" {print $1"="}'
|
||||||
|
}
|
||||||
|
|
||||||
|
__zpool_list_pools()
|
||||||
|
{
|
||||||
|
$__ZPOOL_CMD list -H -o name
|
||||||
|
}
|
||||||
|
|
||||||
|
__zpool_complete()
|
||||||
|
{
|
||||||
|
local cur prev cmd cmds
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
cmd="${COMP_WORDS[1]}"
|
||||||
|
|
||||||
|
if [[ ${prev##*/} == zpool ]]
|
||||||
|
then
|
||||||
|
cmds=$(__zpool_get_commands)
|
||||||
|
COMPREPLY=($(compgen -W "$cmds" -- "$cur"))
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "${cmd}" in
|
||||||
|
get)
|
||||||
|
__zfs_complete_ordered_arguments "$(__zpool_get_properties)" "$(__zpool_list_pools)" $cur
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
import)
|
||||||
|
if [[ $prev == -d ]]
|
||||||
|
then
|
||||||
|
_filedir -d
|
||||||
|
else
|
||||||
|
COMPREPLY=($(compgen -W "$(__zpool_list_pools) -d" -- "$cur"))
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
set)
|
||||||
|
__zfs_complete_ordered_arguments "$(__zpool_get_editable_properties)" "$(__zpool_list_pools)" $cur
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
add|attach|clear|create|detach|offline|online|remove|replace)
|
||||||
|
local pools="$(__zpool_list_pools)"
|
||||||
|
if __zfs_argument_chosen $pools
|
||||||
|
then
|
||||||
|
_filedir
|
||||||
|
else
|
||||||
|
COMPREPLY=($(compgen -W "$pools" -- "$cur"))
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=($(compgen -W "$(__zpool_list_pools)" -- "$cur"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F __zfs_complete zfs
|
||||||
|
complete -F __zpool_complete zpool
|
29
sys-fs/zfs/files/zfs-init.sh.in
Normal file
29
sys-fs/zfs/files/zfs-init.sh.in
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
ZFS="@sbindir@/zfs"
|
||||||
|
ZPOOL="@sbindir@/zpool"
|
||||||
|
ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
|
||||||
|
|
||||||
|
if [ -f "${ZPOOL_CACHE}" ]; then
|
||||||
|
"${ZPOOL}" import -c "${ZPOOL_CACHE}" -aN 2>/dev/null
|
||||||
|
if [ "${?}" != "0" ]; then
|
||||||
|
echo "Failed to import not-yet imported pools." >&2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Mounting ZFS filesystems"
|
||||||
|
"${ZFS}" mount -a
|
||||||
|
if [ "${?}" != "0" ]; then
|
||||||
|
echo "Failed to mount ZFS filesystems." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Exporting ZFS filesystems"
|
||||||
|
"${ZFS}" share -a
|
||||||
|
if [ "${?}" != "0" ]; then
|
||||||
|
echo "Failed to export ZFS filesystems." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
16
sys-fs/zfs/files/zfs.service.in
Normal file
16
sys-fs/zfs/files/zfs.service.in
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ZFS filesystems setup
|
||||||
|
Before=network.target
|
||||||
|
After=systemd-udev-settle.target local-fs.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStartPre=-/sbin/modprobe zfs
|
||||||
|
ExecStartPre=/usr/bin/test -c /dev/zfs
|
||||||
|
ExecStart=/usr/libexec/zfs-init.sh
|
||||||
|
ExecStop=@sbindir@/zfs umount -a
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
20
sys-fs/zfs/metadata.xml
Normal file
20
sys-fs/zfs/metadata.xml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>ryao@gentoo.org</email>
|
||||||
|
<name>Richard Yao</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>fearedbliss@gentoo.org</email>
|
||||||
|
<name>Jonathan Vasquez</name>
|
||||||
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="kernel-builtin">Disable dependency on sys-fs/zfs-kmod under the assumption that ZFS is part of the kernel source tree</flag>
|
||||||
|
<flag name="rootfs">Enable dependencies required for booting off a pool containing a rootfs</flag>
|
||||||
|
<flag name="test-suite">Install regression test suite</flag>
|
||||||
|
</use>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">zfsonlinux/zfs</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
209
sys-fs/zfs/zfs-0.6.5.11-r2.ebuild
Normal file
209
sys-fs/zfs/zfs-0.6.5.11-r2.ebuild
Normal file
|
@ -0,0 +1,209 @@
|
||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="5"
|
||||||
|
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
|
||||||
|
|
||||||
|
if [ ${PV} == "9999" ] ; then
|
||||||
|
inherit git-r3 linux-mod
|
||||||
|
AUTOTOOLS_AUTORECONF="1"
|
||||||
|
EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/zfsonlinux/${PN}/releases/download/${P}/${P}.tar.gz"
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
inherit autotools-utils bash-completion-r1 flag-o-matic linux-info python-r1 systemd toolchain-funcs udev
|
||||||
|
|
||||||
|
DESCRIPTION="Userland utilities for ZFS Linux kernel module"
|
||||||
|
HOMEPAGE="http://zfsonlinux.org/"
|
||||||
|
|
||||||
|
LICENSE="BSD-2 CDDL MIT"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="custom-cflags debug kernel-builtin +rootfs test-suite static-libs"
|
||||||
|
RESTRICT="test"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
net-libs/libtirpc
|
||||||
|
sys-apps/util-linux[static-libs?]
|
||||||
|
sys-libs/zlib[static-libs(+)?]
|
||||||
|
virtual/awk
|
||||||
|
"
|
||||||
|
DEPEND="${COMMON_DEPEND}
|
||||||
|
virtual/pkgconfig
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="${COMMON_DEPEND}
|
||||||
|
!=sys-apps/grep-2.13*
|
||||||
|
!kernel-builtin? ( =sys-fs/zfs-kmod-${PV}* )
|
||||||
|
!sys-fs/zfs-fuse
|
||||||
|
!prefix? ( virtual/udev )
|
||||||
|
test-suite? (
|
||||||
|
sys-apps/util-linux
|
||||||
|
sys-devel/bc
|
||||||
|
sys-block/parted
|
||||||
|
sys-fs/lsscsi
|
||||||
|
sys-fs/mdadm
|
||||||
|
sys-process/procps
|
||||||
|
virtual/modutils
|
||||||
|
)
|
||||||
|
rootfs? (
|
||||||
|
app-arch/cpio
|
||||||
|
app-misc/pax-utils
|
||||||
|
!<sys-boot/grub-2.00-r2:2
|
||||||
|
)
|
||||||
|
sys-fs/udev-init-scripts
|
||||||
|
"
|
||||||
|
|
||||||
|
AT_M4DIR="config"
|
||||||
|
AUTOTOOLS_IN_SOURCE_BUILD="1"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
if use kernel_linux && use test-suite; then
|
||||||
|
linux-info_pkg_setup
|
||||||
|
if ! linux_config_exists; then
|
||||||
|
ewarn "Cannot check the linux kernel configuration."
|
||||||
|
else
|
||||||
|
# recheck that we don't have usblp to collide with libusb
|
||||||
|
if use test-suite; then
|
||||||
|
if linux_chkconfig_present BLK_DEV_LOOP; then
|
||||||
|
eerror "The ZFS test suite requires loop device support enabled."
|
||||||
|
eerror "Please enable it:"
|
||||||
|
eerror " CONFIG_BLK_DEV_LOOP=y"
|
||||||
|
eerror "in /usr/src/linux/.config or"
|
||||||
|
eerror " Device Drivers --->"
|
||||||
|
eerror " Block devices --->"
|
||||||
|
eerror " [ ] Loopback device support"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Update paths
|
||||||
|
sed -e "s|/sbin/lsmod|/bin/lsmod|" \
|
||||||
|
-e "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" \
|
||||||
|
-e "s|/sbin/parted|/usr/sbin/parted|" \
|
||||||
|
-i scripts/common.sh.in
|
||||||
|
|
||||||
|
autotools-utils_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
use custom-cflags || strip-flags
|
||||||
|
local myeconfargs=(
|
||||||
|
--bindir="${EPREFIX}/bin"
|
||||||
|
--sbindir="${EPREFIX}/sbin"
|
||||||
|
--with-config=user
|
||||||
|
--with-dracutdir="${EPREFIX}/usr/lib/dracut"
|
||||||
|
--with-linux="${KV_DIR}"
|
||||||
|
--with-linux-obj="${KV_OUT_DIR}"
|
||||||
|
--with-udevdir="$(get_udevdir)"
|
||||||
|
--with-blkid
|
||||||
|
--with-systemdunitdir="$(systemd_get_systemunitdir)"
|
||||||
|
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
|
||||||
|
$(use_enable debug)
|
||||||
|
)
|
||||||
|
autotools-utils_src_configure
|
||||||
|
|
||||||
|
# prepare systemd unit and helper script
|
||||||
|
cat "${FILESDIR}/zfs.service.in" | \
|
||||||
|
sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
|
||||||
|
-e "s:@sysconfdir@:${EPREFIX}/etc:g" \
|
||||||
|
> "${T}/zfs.service" || die
|
||||||
|
cat "${FILESDIR}/zfs-init.sh.in" | \
|
||||||
|
sed -e "s:@sbindir@:${EPREFIX}/sbin:g" \
|
||||||
|
-e "s:@sysconfdir@:${EPREFIX}/etc:g" \
|
||||||
|
> "${T}/zfs-init.sh" || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
autotools-utils_src_install
|
||||||
|
gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core
|
||||||
|
use test-suite || rm -rf "${ED}usr/share/zfs"
|
||||||
|
|
||||||
|
newbashcomp "${FILESDIR}/bash-completion-r1" zfs
|
||||||
|
bashcomp_alias zfs zpool
|
||||||
|
|
||||||
|
exeinto /usr/libexec
|
||||||
|
doexe "${T}/zfs-init.sh"
|
||||||
|
systemd_dounit "${T}/zfs.service"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
if ! use kernel-builtin && [ ${PV} = "9999" ]
|
||||||
|
then
|
||||||
|
einfo "Adding ${P} to the module database to ensure that the"
|
||||||
|
einfo "kernel modules and userland utilities stay in sync."
|
||||||
|
update_moduledb
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "${EROOT}etc/runlevels/boot/zfs" ]
|
||||||
|
then
|
||||||
|
einfo 'The zfs boot script has been split into the zfs-import,'
|
||||||
|
einfo 'zfs-mount and zfs-share scripts.'
|
||||||
|
einfo
|
||||||
|
einfo 'You had the zfs script in your boot runlevel. For your'
|
||||||
|
einfo 'convenience, it has been automatically removed and the three'
|
||||||
|
einfo 'scripts that replace it have been configured to start.'
|
||||||
|
einfo 'The zfs-import and zfs-mount scripts have been added to the boot'
|
||||||
|
einfo 'runlevel while the zfs-share script is in the default runlevel.'
|
||||||
|
|
||||||
|
rm "${EROOT}etc/runlevels/boot/zfs"
|
||||||
|
ln -snf "${EROOT}etc/init.d/zfs-import" \
|
||||||
|
"${EROOT}etc/runlevels/boot/zfs-import"
|
||||||
|
ln -snf "${EROOT}etc/init.d/zfs-mount" \
|
||||||
|
"${EROOT}etc/runlevels/boot/zfs-mount"
|
||||||
|
ln -snf "${EROOT}etc/init.d/zfs-share" \
|
||||||
|
"${EROOT}etc/runlevels/default/zfs-share"
|
||||||
|
else
|
||||||
|
[ -e "${EROOT}etc/runlevels/boot/zfs-import" ] || \
|
||||||
|
einfo "You should add zfs-import to the boot runlevel."
|
||||||
|
[ -e "${EROOT}etc/runlevels/boot/zfs-mount" ] || \
|
||||||
|
einfo "You should add zfs-mount to the boot runlevel."
|
||||||
|
[ -e "${EROOT}etc/runlevels/default/zfs-share" ] || \
|
||||||
|
einfo "You should add zfs-share to the default runlevel."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "${EROOT}etc/runlevels/default/zed" ]
|
||||||
|
then
|
||||||
|
einfo 'The downstream OpenRC zed script has replaced by the upstream'
|
||||||
|
einfo 'OpenRC zfs-zed script.'
|
||||||
|
einfo
|
||||||
|
einfo 'You had the zed script in your default runlevel. For your'
|
||||||
|
einfo 'convenience, it has been automatically removed and the zfs-zed'
|
||||||
|
einfo 'script that replaced it has been configured to start.'
|
||||||
|
|
||||||
|
rm "${EROOT}etc/runlevels/boot/zed"
|
||||||
|
ln -snf "${EROOT}etc/init.d/zfs-sed" \
|
||||||
|
"${EROOT}etc/runlevels/default/zfs-zed"
|
||||||
|
else
|
||||||
|
[ -e "${EROOT}etc/runlevels/default/zfs-zed" ] || \
|
||||||
|
einfo "You should add zfs-zed to the default runlevel."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "${EROOT}etc/runlevels/shutdown/zfs-shutdown" ]
|
||||||
|
then
|
||||||
|
einfo "The zfs-shutdown script is obsolete. Removing it from runlevel."
|
||||||
|
rm "${EROOT}etc/runlevels/shutdown/zfs-shutdown"
|
||||||
|
fi
|
||||||
|
|
||||||
|
systemd_reenable zfs-zed.service
|
||||||
|
systemd_reenable zfs-import-cache.service
|
||||||
|
systemd_reenable zfs-import-scan.service
|
||||||
|
systemd_reenable zfs-mount.service
|
||||||
|
systemd_reenable zfs-share.service
|
||||||
|
systemd_reenable zfs-import.target
|
||||||
|
systemd_reenable zfs.target
|
||||||
|
systemd_reenable zfs.service
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm() {
|
||||||
|
if ! use kernel-builtin && [ ${PV} = "9999" ]
|
||||||
|
then
|
||||||
|
remove_moduledb
|
||||||
|
fi
|
||||||
|
}
|
3
sys-kernel/spl/Manifest
Normal file
3
sys-kernel/spl/Manifest
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
DIST spl-0.6.5.11.tar.gz 531710 BLAKE2B e89cb5a023d3f4b3949a385100b56e01c5fd0ff4448bc175f8463a84b74d1d8f1fcf669c2e4b73f2ec3326653594106ebfa3e66987e49a9cd029355bbb317990 SHA512 eae1641a0d528cb9182deccd309625e13abf3db88ba1cbb54947055b23d1f94b62c045f939d5e952784f19719eea5fdf85d65c5abd22b9db167ea7780bc55722
|
||||||
|
EBUILD spl-0.6.5.11.ebuild 2602 BLAKE2B 73d09514a4c84c551ab5585b4953373e1513fd75e5f427a7ae51cfdae2fb52c4c85ad7195878c131baf31ef2d978d20e7359bca7e54b1d88ba0f36b8db67b5f2 SHA512 bf5e47912dbb131a8d27cf2ac8aa2cc40859f239db693302e4a352e5784834fde4d12b986d45fbb1a446cd4eb67cb7e86dcd42672d874f6d0c5a0089e52c1e4b
|
||||||
|
MISC metadata.xml 436 BLAKE2B df6b2b25107b10b62618306f09e48f4337315792390c58392f73b270466f4927209dba0d8d1f1d8b8f65f345bce077a7b738f240f077a0eb26c23353673d412f SHA512 1b867378bde3ac034a7fbdc84e47b77b570ecf7a7688b0dc47950de7ea6601284c8101600928ddb7725f7a09ecc73eb01bdf646b0ecca250029e3063a4427ca8
|
15
sys-kernel/spl/metadata.xml
Normal file
15
sys-kernel/spl/metadata.xml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>ryao@gentoo.org</email>
|
||||||
|
<name>Richard Yao</name>
|
||||||
|
</maintainer>
|
||||||
|
<maintainer type="person">
|
||||||
|
<email>fearedbliss@gentoo.org</email>
|
||||||
|
<name>Jonathan Vasquez</name>
|
||||||
|
</maintainer>
|
||||||
|
<upstream>
|
||||||
|
<remote-id type="github">zfsonlinux/spl</remote-id>
|
||||||
|
</upstream>
|
||||||
|
</pkgmetadata>
|
109
sys-kernel/spl/spl-0.6.5.11.ebuild
Normal file
109
sys-kernel/spl/spl-0.6.5.11.ebuild
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI="5"
|
||||||
|
|
||||||
|
if [[ ${PV} == "9999" ]] ; then
|
||||||
|
AUTOTOOLS_AUTORECONF="1"
|
||||||
|
EGIT_REPO_URI="https://github.com/zfsonlinux/${PN}.git"
|
||||||
|
inherit git-r3
|
||||||
|
else
|
||||||
|
SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/${P}.tar.gz"
|
||||||
|
KEYWORDS="amd64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
inherit flag-o-matic linux-info linux-mod autotools-utils
|
||||||
|
|
||||||
|
DESCRIPTION="The Solaris Porting Layer provides many of the Solaris kernel APIs"
|
||||||
|
HOMEPAGE="http://zfsonlinux.org/"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
IUSE="custom-cflags debug"
|
||||||
|
RESTRICT="debug? ( strip ) test"
|
||||||
|
|
||||||
|
COMMON_DEPEND="
|
||||||
|
dev-lang/perl
|
||||||
|
virtual/awk"
|
||||||
|
|
||||||
|
DEPEND="${COMMON_DEPEND}"
|
||||||
|
|
||||||
|
RDEPEND="${COMMON_DEPEND}
|
||||||
|
!sys-devel/spl"
|
||||||
|
|
||||||
|
AT_M4DIR="config"
|
||||||
|
AUTOTOOLS_IN_SOURCE_BUILD="1"
|
||||||
|
DOCS=( AUTHORS DISCLAIMER )
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
linux-info_pkg_setup
|
||||||
|
CONFIG_CHECK="
|
||||||
|
!DEBUG_LOCK_ALLOC
|
||||||
|
!CONFIG_REISER4_FS
|
||||||
|
MODULES
|
||||||
|
KALLSYMS
|
||||||
|
!PAX_KERNEXEC_PLUGIN_METHOD_OR
|
||||||
|
!PAX_SIZE_OVERFLOW
|
||||||
|
ZLIB_DEFLATE
|
||||||
|
ZLIB_INFLATE
|
||||||
|
"
|
||||||
|
|
||||||
|
use debug && CONFIG_CHECK="${CONFIG_CHECK}
|
||||||
|
FRAME_POINTER
|
||||||
|
DEBUG_INFO
|
||||||
|
!DEBUG_INFO_REDUCED
|
||||||
|
"
|
||||||
|
|
||||||
|
kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
|
||||||
|
|
||||||
|
check_extra_config
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Workaround for hard coded path
|
||||||
|
sed -i "s|/sbin/lsmod|/bin/lsmod|" "${S}/scripts/check.sh" || \
|
||||||
|
die "Cannot patch check.sh"
|
||||||
|
|
||||||
|
# splat is unnecessary unless we are debugging
|
||||||
|
use debug || { sed -e 's/^subdir-m += splat$//' -i "${S}/module/Makefile.in" || die ; }
|
||||||
|
|
||||||
|
# Set module revision number
|
||||||
|
[ ${PV} != "9999" ] && \
|
||||||
|
{ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
|
||||||
|
|
||||||
|
autotools-utils_src_prepare
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
use custom-cflags || strip-flags
|
||||||
|
filter-ldflags -Wl,*
|
||||||
|
|
||||||
|
set_arch_to_kernel
|
||||||
|
local myeconfargs=(
|
||||||
|
--bindir="${EPREFIX}/bin"
|
||||||
|
--sbindir="${EPREFIX}/sbin"
|
||||||
|
--with-config=all
|
||||||
|
--with-linux="${KV_DIR}"
|
||||||
|
--with-linux-obj="${KV_OUT_DIR}"
|
||||||
|
$(use_enable debug)
|
||||||
|
)
|
||||||
|
autotools-utils_src_configure
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
linux-mod_pkg_postinst
|
||||||
|
|
||||||
|
# Remove old modules
|
||||||
|
if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/spl" ]
|
||||||
|
then
|
||||||
|
ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/spl"
|
||||||
|
ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/spl"
|
||||||
|
ewarn "Automatically removing old modules to avoid problems."
|
||||||
|
rm -r "${EROOT}lib/modules/${KV_FULL}/addon/spl" || die "Cannot remove modules"
|
||||||
|
rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Reference in a new issue