zfs: we no longer need our fork

This commit is contained in:
Zero_Chaos 2012-11-30 04:20:52 +00:00
parent 2b65f6fa42
commit 56012fe0e8
6 changed files with 0 additions and 540 deletions

View file

@ -1,7 +0,0 @@
AUX bash-completion 6203 SHA256 15e742477fad0104871fc055b6ce9bf803540070e47fa515ea7ca3c1a401f831 SHA512 e7ccb7179c4c455c496daab192099d7553674b9505801e25a2ea8c67a1b4de15d68ac99b2c3347c1f3454f88ede7694f08da61c5d061f0577bb1594ca4a90f12 WHIRLPOOL 79dfdc9c80a707f6bb39bea51ec451c16b821886ce3e84c73a249313d991cf8019f0647b0fe439754fc1ad08cb294bf4c245955fdc4af30286a8afd61dba21ba
AUX linuxrc 225 SHA256 69c5f407ae20a5e3000dc6389f8c75ee97e11c353489a00cb619134b103bf538 SHA512 b8f311a9ac9008d4f3b30bb2b7ac0144aec6029245ddb50a32fe0b485c9df96db23569d30de502d31d944588513107e6144b535249b704b90b586a2593dd5200 WHIRLPOOL 9de672c9b2a44fa5daab5c48d988465797a1b6fdb5431366969a0172e733b4933bac6ca256977331862e9410c474431b26cf50658fbac1d9b3282e65bf3f83e2
AUX zfs-shutdown 1452 SHA256 bc65bf8f0432fd0267020ae5a049046d6f0e0fc953e1757a942b52f8024dfcc1 SHA512 9c87dddc65826f1072764deb57d162ee5a813f0f38feb0e1ce424dedd8e776e97387cea0805ad3671778493b7787841175167c2154f8796cb642abd436063550 WHIRLPOOL 54c7e98b2d96222250800c15b6aaf581b034661e4d1d32166f8352dce8cae2d958344949e9b6740f061dc5c158e55858a21dc97f8f35f59a2b9fcc0390120c71
DIST zfs-0.6.0-rc11.tar.gz 2099538 SHA256 4701f9d32d3475650068d0c07b968f0de443103d73db315b4f328c296cd6a073 SHA512 4bd2fc3cd5eb89f64b7b92a16e416edb245b0a9b90b5e1aa3bd1560c7d568322de03fdb40ede2d8417b0b642bbf70a1e804d51e4537babbfa9c767271b701138 WHIRLPOOL c56034028fd7c21f516ceb268cc25eeedd129a2a7cb8c1615f43982a86bb4400e80ab74159c4fc5d24a79610e2c0935f54cbc33c447751f29cecec882bfef89e
DIST zfs-0.6.0-rc12.tar.gz 2150456 SHA256 3eb85e4028480e9dd56e29eca0a4e71565c1501f0159c80a1b1ff961b6f137d6 SHA512 55f0d9ea9f085d78a4929250949449ec4329a71c00ecd6fe76322716b64dc1152d93a23bb8b18e4ba7e1fbd6110b170366763f730c1e5006998aee3870e3635e WHIRLPOOL ea8fbe2edb2e0029affed261916d10ef350129c496b71064d34749b805d83c1531d886a55802839bb4226e298719f708f6816ee5411626b431b1d506bbf10232
EBUILD zfs-0.6.0_rc11.ebuild 2648 SHA256 f57a49a3cd49d20e44ee1bafc858d751f96161ec88d688e4084032c4d5bb8011 SHA512 b01e13fd2ab15baa80bb779fa7987a1a34e0179c1704296f46420452d02f6d00b8f09e5652143b90704e7c14c368091474bcc2ea10456be3c4ffc9721b81d465 WHIRLPOOL fbb967b8bd78745268591f4e24580224ca114a3491e2dab7a42ccfaa519a4ba1b1cdfb5ae2380b30a4682707755c59165ae431b249bd9288959bee9e361d17a3
EBUILD zfs-0.6.0_rc12-r1.ebuild 2652 SHA256 c84d991eb36001639d5d3211962a516dfc9804b700540a9f2ba7a2ad2f5aeff8 SHA512 57b3d57a252b8e71a66e636438f32d2dd807c718ed3971fd294b718145635089e6f444ab88d49cf258a13d5b4e721b8a0eece11e3bc8dcf92bc0dad5ac685902 WHIRLPOOL 54ed7864434b0642714390a490c45a6ac575b51f781b88f21cdbf1e50b459b6a5d7c0080d315ca333610f3a07e744a19e4f14faba88d5df176f48a28002b0851

View file

@ -1,232 +0,0 @@
# Copyright (c) 2010, 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.
__zfs_get_commands()
{
zfs 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq
}
__zfs_get_properties()
{
zfs get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all
}
__zfs_get_editable_properties()
{
zfs get 2>&1 | awk '$2 == "YES" {printf("%s=\n", $1)}'
}
__zfs_get_inheritable_properties()
{
zfs get 2>&1 | awk '$3 == "YES" {print $1}'
}
__zfs_list_datasets()
{
zfs list -H -o name
}
__zfs_list_filesystems()
{
zfs list -H -o name -t filesystem
}
__zfs_list_snapshots()
{
zfs list -H -o name -t snapshot
}
__zfs_list_volumes()
{
zfs list -H -o name -t volume
}
__zfs_argument_chosen()
{
for word in $(seq $((COMP_CWORD-1)) -1 2)
do
local prev="${COMP_WORDS[$word]}"
for property in $@
do
if [ "x$prev" = "x$property" ]
then
return 0
fi
done
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()
{
local cur prev cmd cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd="${COMP_WORDS[1]}"
cmds=$(__zfs_get_commands)
if [ "${prev##*/}" = "zfs" ]
then
COMPREPLY=($(compgen -W "$cmds -?" -- "$cur"))
return 0
fi
case "${cmd}" in
clone)
__zfs_complete_ordered_arguments "$(__zfs_list_snapshots)" "$(__zfs_list_filesystems) $(__zfs_list_volumes)" $cur
return 0
;;
get)
__zfs_complete_ordered_arguments "$(__zfs_get_properties)" "$(__zfs_list_datasets)" "$cur" "-H -r -p"
return 0
;;
inherit)
__zfs_complete_ordered_arguments "$(__zfs_get_inheritable_properties)" "$(__zfs_list_datasets)" $cur
return 0
;;
list)
if [ "x$prev" = "x-o" ]
then
COMPREPLY=($(compgen -W "$(__zfs_get_properties)" -- "${cur##*,}"))
local existing_opts=$(expr "$cur" : '\(.*,\)')
if [ ! "x$existing_opts" = "x" ]
then
COMPREPLY=( "${COMPREPLY[@]/#/${existing_opts}}" )
fi
else
COMPREPLY=($(compgen -W "$(__zfs_list_datasets) -H -r -o" -- "$cur"))
fi
return 0
;;
promote)
COMPREPLY=($(compgen -W "$(__zfs_list_filesystems)" -- "$cur"))
return 0
;;
rollback|send)
COMPREPLY=($(compgen -W "$(__zfs_list_snapshots)" -- "$cur"))
return 0
;;
snapshot)
COMPREPLY=($(compgen -W "$(__zfs_list_filesystems) $(__zfs_list_volumes)" -- "$cur"))
return 0
;;
set)
__zfs_complete_ordered_arguments "$(__zfs_get_editable_properties)" "$(__zfs_list_filesystems) $(__zfs_list_volumes)" $cur
return 0
;;
*)
COMPREPLY=($(compgen -W "$(__zfs_list_datasets)" -- "$cur"))
return 0
;;
esac
}
__zpool_get_commands()
{
zpool 2>&1 | awk '/^\t[a-z]/ {print $1}' | uniq
}
__zpool_get_properties()
{
zpool get 2>&1 | awk '$2 == "YES" || $2 == "NO" {print $1}'; echo all
}
__zpool_get_editable_properties()
{
zpool get 2>&1 | awk '$2 == "YES" {printf("%s=\n", $1)}'
}
__zpool_list_pools()
{
zpool 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]}"
cmds=$(__zpool_get_commands)
if [ "${prev##*/}" = "zpool" ]
then
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 [ "x$prev" = "x-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 -o filenames -F __zpool_complete zpool

View file

@ -1,18 +0,0 @@
#!/bin/sh
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
j=0
for i in $(cat /movefs)
do
mkdir "/${j}"
mount --move "${i}" "/${j}"
j=$(expr $j + 1)
done
zfs umount -a
for i in $(zpool list -H -o name)
do
zpool export "$i"
done;

View file

@ -1,64 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Released under the 2-clause BSD license.
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/files/zfs-shutdown,v 1.2 2012/11/29 05:19:12 ryao Exp $
description="Export ZFS Root Filesystem"
copy_binaries() {
local destdir=$1
shift
lddtree "$@" \
| tr ')(' '\n' \
| awk '/=>/{ if($3 ~ /^\//){print $3}}' \
| sort \
| uniq \
| cpio -p --make-directories --dereference --quiet $destdir
}
depend()
{
need mount-ro
keyword -prefix -openvz -vserver -lxc
}
start()
{
ROOTFSTYPE=$(df -TP / | awk 'NR>1{print $2}')
TMPDIR='/dev/pivot_root'
MOVEFS=$(df -TP -x zfs | awk 'NR>2{print $7}')
# Make sure that we are dealing with zfs
if test "${ROOTFSTYPE}" = "zfs"
then
eerror "rootfs is not zfs"
return 1
fi
# Construct new rootfs
mkdir -p "${TMPDIR}"
mount -t tmpfs none ${TMPDIR}
mkdir "${TMPDIR}/oldroot" "${TMPDIR}/dev"
mknod -m 660 "${TMPDIR}/dev/null" c 1 3
mknod -m 660 "${TMPDIR}/dev/zfs" c 10 59
# Make tmpfs root filesystem
copy_binaries ${TMPDIR} $(which chroot sh cat mount mkdir zfs zpool)
# Make directories for temporary mounts
for i in $(seq $(echo "$MOVEFS" | wc -w)); do mkdir "${TMPDIR}/${i}"; done;
# Pass temporary mount information to chroot
echo "$MOVEFS" > "${TMPDIR}/movefs"
# Copy shutdown script
cp /usr/share/zfs/linuxrc "${TMPDIR}/linuxrc"
# Pivot into new root
cd "${TMPDIR}"
pivot_root . oldroot
exec chroot . /linuxrc
}

View file

@ -1,109 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-0.6.0_rc11.ebuild,v 1.1 2012/09/18 22:33:46 ryao Exp $
EAPI="4"
AT_M4DIR="config"
AUTOTOOLS_AUTORECONF="1"
AUTOTOOLS_IN_SOURCE_BUILD="1"
inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils
if [ ${PV} == "9999" ] ; then
inherit git-2
EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
else
inherit eutils versionator
MY_PV=$(replace_version_separator 3 '-')
SRC_URI="https://github.com/downloads/zfsonlinux/${PN}/${PN}-${MY_PV}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
KEYWORDS="~amd64"
fi
DESCRIPTION="Userland utilities for ZFS Linux kernel module"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="BSD-2 CDDL MIT"
SLOT="0"
IUSE="custom-cflags kernel-builtin +rootfs test-suite static-libs"
RESTRICT="test"
COMMON_DEPEND="
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
"
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? ( sys-fs/udev )
test-suite? (
sys-apps/gawk
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
)
"
src_prepare() {
# Workaround for hard coded path
sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/common.sh.in || die
# Workaround rename
sed -i "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" scripts/common.sh.in || die
autotools-utils_src_prepare
}
src_configure() {
use custom-cflags || strip-flags
local myeconfargs=(
--bindir="${EPREFIX}/bin"
--sbindir="${EPREFIX}/sbin"
--with-config=user
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
)
autotools-utils_src_configure
}
src_install() {
autotools-utils_src_install
gen_usr_ldscript -a uutil nvpair zpool zfs
rm -rf "${ED}usr/share/dracut"
use test-suite || rm -rf "${ED}usr/libexec"
if use rootfs
then
doinitd "${FILESDIR}/zfs-shutdown"
exeinto /usr/share/zfs
doexe "${FILESDIR}/linuxrc"
fi
newbashcomp "${FILESDIR}/bash-completion" zfs
}
pkg_postinst() {
[ -e "${EROOT}/etc/runlevels/boot/zfs" ] \
|| ewarn 'You should add zfs to the boot runlevel.'
use rootfs && ([ -e "${EROOT}/etc/runlevels/shutdown/zfs-shutdown" ] \
|| ewarn 'You should add zfs-shutdown to the shutdown runlevel.')
#systems not running zfs yet cannot build genkernel w/o this
touch "${EROOT}"/etc/zfs/zpool.cache
}

View file

@ -1,110 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-0.6.0_rc12-r1.ebuild,v 1.1 2012/11/29 05:19:12 ryao Exp $
EAPI="4"
AT_M4DIR="config"
AUTOTOOLS_AUTORECONF="1"
AUTOTOOLS_IN_SOURCE_BUILD="1"
inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils
if [ ${PV} == "9999" ] ; then
inherit git-2
EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
else
inherit eutils versionator
MY_PV=$(replace_version_separator 3 '-')
SRC_URI="https://github.com/downloads/zfsonlinux/${PN}/${PN}-${MY_PV}.tar.gz"
S="${WORKDIR}/${PN}-${MY_PV}"
KEYWORDS="~amd64"
fi
DESCRIPTION="Userland utilities for ZFS Linux kernel module"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="BSD-2 CDDL MIT"
SLOT="0"
IUSE="custom-cflags kernel-builtin +rootfs test-suite static-libs"
RESTRICT="test"
COMMON_DEPEND="
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
"
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? ( sys-fs/udev )
test-suite? (
sys-apps/gawk
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
)
"
src_prepare() {
# Workaround for hard coded path
sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/common.sh.in || die
# Workaround rename
sed -i "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" scripts/common.sh.in || die
autotools-utils_src_prepare
}
src_configure() {
use custom-cflags || strip-flags
local myeconfargs=(
--bindir="${EPREFIX}/bin"
--sbindir="${EPREFIX}/sbin"
--with-config=user
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
)
autotools-utils_src_configure
}
src_install() {
autotools-utils_src_install
gen_usr_ldscript -a uutil nvpair zpool zfs
rm -rf "${ED}usr/share/dracut"
use test-suite || rm -rf "${ED}usr/libexec"
if use rootfs
then
doinitd "${FILESDIR}/zfs-shutdown"
exeinto /usr/share/zfs
doexe "${FILESDIR}/linuxrc"
fi
newbashcomp "${FILESDIR}/bash-completion" zfs
}
pkg_postinst() {
[ -e "${EROOT}/etc/runlevels/boot/zfs" ] \
|| ewarn 'You should add zfs to the boot runlevel.'
use rootfs && ([ -e "${EROOT}/etc/runlevels/shutdown/zfs-shutdown" ] \
|| ewarn 'You should add zfs-shutdown to the shutdown runlevel.')
#systems not running zfs yet cannot build genkernel w/o this
touch "${EROOT}"/etc/zfs/zpool.cache
}