diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-freebsd/freebsd-cddl/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-freebsd/freebsd-cddl/files')
10 files changed, 716 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-10.1-underlink.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-10.1-underlink.patch new file mode 100644 index 00000000000..62d53267acd --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-10.1-underlink.patch @@ -0,0 +1,27 @@ +diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile +index cc0f363..065281f 100644 +--- a/cddl/lib/libzfs/Makefile ++++ b/cddl/lib/libzfs/Makefile +@@ -8,7 +8,8 @@ + LIB= zfs + DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ + ${LIBAVL} ${LIBZFS_CORE} +-LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core ++LDADD= -lmd -lpthread -lumem -lutil -lm -lnvpair -lavl -lzfs_core -lgeom -luutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl + + SRCS= deviceid.c \ + fsshare.c \ +diff --git a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile +index 61c4788..4888cc7 100644 +--- a/cddl/lib/libzpool/Makefile ++++ b/cddl/lib/libzpool/Makefile +@@ -61,7 +61,7 @@ LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair + LDFLAGS+= -L${.CURDIR}/../../lib/libumem + + DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} +-LDADD= -lmd -lpthread -lz ++LDADD= -lmd -lpthread -lz -lumem -lavl + + # atomic.S doesn't like profiling. + NO_PROFILE= diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.0-libpaths.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.0-libpaths.patch new file mode 100644 index 00000000000..ad5c83eca3d --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.0-libpaths.patch @@ -0,0 +1,114 @@ +diff -ru cddl.orig/lib/libctf/Makefile cddl/lib/libctf/Makefile +--- cddl.orig/lib/libctf/Makefile 2009-01-24 03:36:33 -0200 ++++ cddl/lib/libctf/Makefile 2009-01-24 03:55:10 -0200 +@@ -4,6 +4,7 @@ + + LIB= ctf + SHLIB_MAJOR= 2 ++LDADD+=-lz + + SRCS= ctf_create.c \ + ctf_decl.c \ +diff -ru cddl.orig/lib/libdtrace/Makefile cddl/lib/libdtrace/Makefile +--- cddl.orig/lib/libdtrace/Makefile 2009-01-24 00:18:47 -0200 ++++ cddl/lib/libdtrace/Makefile 2009-01-24 03:31:06 -0200 +@@ -74,7 +74,7 @@ + .endif + + LFLAGS+=-l +- ++LDADD+=-lz -lproc + YFLAGS+=-d + + CLEANFILES= dt_errtags.c dt_names.c +diff -ru cddl.orig/lib/libzfs/Makefile cddl/lib/libzfs/Makefile +--- cddl.orig/lib/libzfs/Makefile 2008-06-22 10:26:18 -0300 ++++ cddl/lib/libzfs/Makefile 2008-06-22 10:26:26 -0300 +@@ -7,7 +7,8 @@ + + LIB= zfs + DPADD= ${LIBUTIL} +-LDADD= -lutil ++LDADD= -lutil -lgeom -lm -luutil -lumem ++LDFLAGS+= -L${.CURDIR}/../libuutil -L${.CURDIR}/../libumem + + SRCS= deviceid.c \ + mnttab.c \ +diff -ru cddl.orig/lib/libzpool/Makefile cddl/lib/libzpool/Makefile +--- cddl.orig/lib/libzpool/Makefile 2008-06-22 10:35:15 -0300 ++++ cddl/lib/libzpool/Makefile 2008-06-22 10:37:06 -0300 +@@ -42,7 +42,8 @@ + CFLAGS+= -I${.CURDIR}/../../../contrib/opensolaris/lib/libnvpair + + DPADD= ${LIBPTHREAD} ${LIBZ} +-LDADD= -lpthread -lz ++LDADD= -lpthread -lz -lavl -lumem ++LDFLAGS+= -L${.CURDIR}/../libavl -L${.CURDIR}/../libumem + + # atomic.S doesn't like profiling. + NO_PROFILE= +diff -ru cddl.orig/sbin/zfs/Makefile cddl/sbin/zfs/Makefile +--- cddl.orig/sbin/zfs/Makefile 2008-06-22 10:02:30 -0300 ++++ cddl/sbin/zfs/Makefile 2008-06-22 10:14:23 -0300 +@@ -23,5 +23,7 @@ + ${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBUTIL} + LDADD= -lzfs -lgeom -lbsdxml -lsbuf \ + -lm -lnvpair -luutil -lutil ++LDFLAGS+=-L${.CURDIR}/../../lib/libzfs -L${.CURDIR}/../../lib/libnvpair \ ++ -L${.CURDIR}/../../lib/libuutil -L/lib -L/usr/lib + + .include <bsd.prog.mk> +diff -ru cddl.orig/sbin/zpool/Makefile cddl/sbin/zpool/Makefile +--- cddl.orig/sbin/zpool/Makefile 2008-06-22 10:02:30 -0300 ++++ cddl/sbin/zpool/Makefile 2008-06-22 10:14:47 -0300 +@@ -23,5 +23,7 @@ + ${LIBM} ${LIBNVPAIR} ${LIBUUTIL} ${LIBUTIL} + LDADD= -lavl -lzfs -lgeom -lbsdxml -lsbuf \ + -lm -lnvpair -luutil -lutil ++LDFLAGS+=-L${.CURDIR}/../../lib/libzfs -L${.CURDIR}/../../lib/libavl -L/lib -L/usr/lib \ ++ -L${.CURDIR}/../../lib/libnvpair -L${.CURDIR}/../../lib/libuutil + + .include <bsd.prog.mk> +diff -ru cddl.orig/usr.bin/ztest/Makefile cddl/usr.bin/ztest/Makefile +--- cddl.orig/usr.bin/ztest/Makefile 2008-06-22 10:02:30 -0300 ++++ cddl/usr.bin/ztest/Makefile 2008-06-22 10:12:40 -0300 +@@ -18,5 +18,7 @@ + DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ + ${LIBPTHREAD} ${LIBZ} ${LIBAVL} + LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl ++LDFLAGS+=-L${.CURDIR}/../../lib/libnvpair -L${.CURDIR}/../../lib/libumem \ ++ -L${.CURDIR}/../../lib/libzpool -L${.CURDIR}/../../lib/libavl -L/lib -L/usr/lib + + .include <bsd.prog.mk> +diff -ru cddl.orig/usr.bin/Makefile.inc cddl/usr.bin/Makefile.inc +--- cddl.orig/usr.bin/Makefile.inc 2009-01-10 07:21:10 +0000 ++++ cddl/usr.bin/Makefile.inc 2009-01-10 07:18:55 +0000 +@@ -1,5 +1,6 @@ + # $FreeBSD: src/cddl/usr.bin/Makefile.inc,v 1.1.6.1 2008/11/25 02:59:29 kensmith Exp $ + + BINDIR?= /usr/bin ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf + + .include "../Makefile.inc" +--- cddl.orig/usr.sbin/zdb/Makefile 2010-03-11 13:19:48 +0100 ++++ cddl/usr.sbin/zdb/Makefile 2010-03-11 13:20:08 +0100 +@@ -22,6 +22,8 @@ + DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ + ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL} + LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool ++LDFLAGS+=-L${.CURDIR}/../../lib/libnvpair -L${.CURDIR}/../../lib/libumem \ ++ -L${.CURDIR}/../../lib/libzpool -L${.CURDIR}/../../lib/libavl -L${.CURDIR}/../../lib/libuutil -L${.CURDIR}/../../lib/libzfs + + CSTD= c99 + +--- cddl.orig/usr.bin/zinject/Makefile 2010-03-11 13:30:32 +0100 ++++ cddl/usr.bin/zinject/Makefile 2010-03-11 13:33:27 +0100 +@@ -21,5 +21,8 @@ + DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ + ${LIBZFS} ${LIBZPOOL} ${LIBUUTIL} + LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl -L${.CURDIR}/../../lib/libnvpair \ ++ -L${.CURDIR}/../../lib/libumem -L${.CURDIR}/../../lib/libuutil \ ++ -L${.CURDIR}/../../lib/libzfs -L${.CURDIR}/../../lib/libzpool + + .include <bsd.prog.mk> diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.2-libpaths.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.2-libpaths.patch new file mode 100644 index 00000000000..a0e56779047 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-8.2-libpaths.patch @@ -0,0 +1,22 @@ +--- cddl/usr.sbin/dtrace/Makefile.old 2011-07-06 00:09:01.000000000 +0000 ++++ cddl/usr.sbin/dtrace/Makefile 2011-07-06 00:09:48.000000000 +0000 +@@ -24,6 +24,8 @@ + #CFLAGS+= -DNEED_ERRLOC + #YFLAGS+= -d + ++LDFLAGS+= -L${.CURDIR}/../../lib/libdtrace -L${.CURDIR}/../../lib/libctf ++ + DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ + ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBUTIL} ${LIBRTLD_DB} + LDADD= -lpthread -ldtrace -ly -lfl -lproc -lctf -lelf -lz -lutil \ +--- cddl/usr.sbin/lockstat/Makefile.old 2011-07-06 00:10:33.000000000 +0000 ++++ cddl/usr.sbin/lockstat/Makefile 2011-07-06 00:10:57.000000000 +0000 +@@ -23,6 +23,8 @@ + + CFLAGS+= -DNEED_ERRLOC -g + ++LDFLAGS+=-L${.CURDIR}/../../lib/libdtrace -L${.CURDIR}/../../lib/libctf ++ + #YFLAGS+= -d + + DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-bsdxml.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-bsdxml.patch new file mode 100644 index 00000000000..b3d95bb7741 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-bsdxml.patch @@ -0,0 +1,28 @@ +diff -ur cddl.old/sbin/zfs/Makefile cddl/sbin/zfs/Makefile +--- cddl.old/sbin/zfs/Makefile 2011-11-04 10:01:46.000000000 +0000 ++++ cddl/sbin/zfs/Makefile 2011-11-04 10:07:15.000000000 +0000 +@@ -21,8 +21,8 @@ + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs + +-DPADD= ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \ ++DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \ + ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} +-LDADD= -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs ++LDADD= -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs + + .include <bsd.prog.mk> +diff -ur cddl.old/sbin/zpool/Makefile cddl/sbin/zpool/Makefile +--- cddl.old/sbin/zpool/Makefile 2011-11-04 10:01:46.000000000 +0000 ++++ cddl/sbin/zpool/Makefile 2011-11-04 10:06:38.000000000 +0000 +@@ -26,8 +26,8 @@ + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common + +-DPADD= ${LIBAVL} ${LIBBSDXML} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \ ++DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \ + ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} +-LDADD= -lavl -lbsdxml -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs ++LDADD= -lavl -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs + + .include <bsd.prog.mk> diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-libpaths.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-libpaths.patch new file mode 100644 index 00000000000..c81a2c3a9cd --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-libpaths.patch @@ -0,0 +1,167 @@ +diff -upNr a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile +--- a/cddl/lib/libzfs/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/lib/libzfs/Makefile 2012-03-30 19:04:39.904906253 +0000 +@@ -54,4 +54,8 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/cont + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++ + .include <bsd.lib.mk> +diff -upNr a/cddl/lib/libzpool/Makefile b/cddl/lib/libzpool/Makefile +--- a/cddl/lib/libzpool/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/lib/libzpool/Makefile 2012-03-30 19:04:55.839233753 +0000 +@@ -56,6 +56,10 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libpt + CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys + CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++ + DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} + LDADD= -lmd -lpthread -lz -lumem -lnvpair -lavl + +diff -upNr a/cddl/sbin/zfs/Makefile b/cddl/sbin/zfs/Makefile +--- a/cddl/sbin/zfs/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/sbin/zfs/Makefile 2012-03-30 19:05:11.094859502 +0000 +@@ -21,6 +21,11 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs + ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++ + DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} ${LIBUMEM} \ + ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} + LDADD= -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs +diff -upNr a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile +--- a/cddl/sbin/zpool/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/sbin/zpool/Makefile 2012-03-30 19:05:24.830721002 +0000 +@@ -26,6 +26,12 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++ + DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBSBUF} \ + ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS} + LDADD= -lavl -lgeom -lm -lnvpair -lsbuf -lumem -lutil -luutil -lzfs +diff -upNr a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile +--- a/cddl/usr.bin/ctfconvert/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/usr.bin/ctfconvert/Makefile 2012-03-30 19:05:49.454897012 +0000 +@@ -36,6 +36,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ + -I${OPENSOLARIS_SYS_DISTDIR}/uts/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf ++ + DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} + LDADD= -lctf -ldwarf -lelf -lz -lpthread + +diff -upNr a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile +--- a/cddl/usr.bin/ctfmerge/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/usr.bin/ctfmerge/Makefile 2012-03-30 19:06:08.084858412 +0000 +@@ -33,6 +33,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ + -I${OPENSOLARIS_SYS_DISTDIR}/uts/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf ++ + DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} + LDADD= -lctf -ldwarf -lelf -lz -lpthread + +diff -upNr a/cddl/usr.bin/zinject/Makefile b/cddl/usr.bin/zinject/Makefile +--- a/cddl/usr.bin/zinject/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/usr.bin/zinject/Makefile 2012-03-30 19:06:25.084865592 +0000 +@@ -19,6 +19,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++ + DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ + ${LIBZFS} ${LIBZPOOL} + LDADD= -lavl -lgeom -lm -lnvpair -lumem -luutil -lzfs -lzpool +diff -upNr a/cddl/usr.bin/zstreamdump/Makefile b/cddl/usr.bin/zstreamdump/Makefile +--- a/cddl/usr.bin/zstreamdump/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/usr.bin/zstreamdump/Makefile 2012-03-30 19:06:44.544860132 +0000 +@@ -18,6 +18,11 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++ + DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ + ${LIBPTHREAD} ${LIBZ} ${LIBAVL} + LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl +diff -upNr a/cddl/usr.bin/ztest/Makefile b/cddl/usr.bin/ztest/Makefile +--- a/cddl/usr.bin/ztest/Makefile 2012-03-30 18:58:53.174771000 +0000 ++++ b/cddl/usr.bin/ztest/Makefile 2012-03-30 19:06:58.344895642 +0000 +@@ -17,6 +17,11 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++ + DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ + ${LIBPTHREAD} ${LIBZ} ${LIBAVL} + LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl +diff -upNr a/cddl/usr.sbin/zdb/Makefile b/cddl/usr.sbin/zdb/Makefile +--- a/cddl/usr.sbin/zdb/Makefile 2012-03-30 18:58:53.164736000 +0000 ++++ b/cddl/usr.sbin/zdb/Makefile 2012-03-30 19:07:17.454861002 +0000 +@@ -23,6 +23,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++ + DPADD= ${LIBAVL} ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ + ${LIBUUTIL} ${LIBZ} ${LIBZFS} ${LIBZPOOL} + LDADD= -lavl -lgeom -lm -lnvpair -lpthread -lumem -luutil -lz -lzfs -lzpool +--- a/cddl/usr.sbin/dtrace/Makefile.old 2011-07-06 00:09:01.000000000 +0000 ++++ b/cddl/usr.sbin/dtrace/Makefile 2011-07-06 00:09:48.000000000 +0000 +@@ -24,6 +24,8 @@ + #CFLAGS+= -DNEED_ERRLOC + #YFLAGS+= -d + ++LDFLAGS+= -L${.CURDIR}/../../lib/libdtrace -L${.CURDIR}/../../lib/libctf ++ + DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ + ${LIBCTF} ${LIBELF} ${LIBZ} ${LIBUTIL} ${LIBRTLD_DB} + LDADD= -lpthread -ldtrace -ly -lfl -lproc -lctf -lelf -lz -lutil \ +--- a/cddl/usr.sbin/lockstat/Makefile.old 2011-07-06 00:10:33.000000000 +0000 ++++ b/cddl/usr.sbin/lockstat/Makefile 2011-07-06 00:10:57.000000000 +0000 +@@ -23,6 +23,8 @@ + + CFLAGS+= -DNEED_ERRLOC -g + ++LDFLAGS+=-L${.CURDIR}/../../lib/libdtrace -L${.CURDIR}/../../lib/libctf ++ + #YFLAGS+= -d + + DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-underlink.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-underlink.patch new file mode 100644 index 00000000000..ff87d2c6ef9 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.0-underlink.patch @@ -0,0 +1,22 @@ +--- cddl/lib/libzfs/Makefile.old 2011-11-04 10:27:30.000000000 +0000 ++++ cddl/lib/libzfs/Makefile 2011-11-04 10:28:59.000000000 +0000 +@@ -7,7 +7,7 @@ + + LIB= zfs + DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} +-LDADD= -lmd -lpthread -lumem -lutil ++LDADD= -lmd -lpthread -lumem -lutil -luutil -lnvpair -lm -lgeom + + SRCS= deviceid.c \ + fsshare.c \ +--- cddl/lib/libzpool/Makefile.old 2011-11-04 18:22:28.000000000 +0000 ++++ cddl/lib/libzpool/Makefile 2011-11-04 18:24:01.000000000 +0000 +@@ -57,7 +57,7 @@ + CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include + + DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} +-LDADD= -lmd -lpthread -lz ++LDADD= -lmd -lpthread -lz -lumem -lnvpair -lavl + + # atomic.S doesn't like profiling. + NO_PROFILE= diff --git a/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.2-libpaths.patch b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.2-libpaths.patch new file mode 100644 index 00000000000..36eb570af72 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/freebsd-cddl-9.2-libpaths.patch @@ -0,0 +1,220 @@ +diff --git a/lib/libzfs/Makefile b/lib/libzfs/Makefile +index 5b6b47d..c8549b4 100644 +--- a/lib/libzfs/Makefile ++++ b/lib/libzfs/Makefile +@@ -55,6 +55,11 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libnvpair + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common + +diff --git a/lib/libzfs_core/Makefile b/lib/libzfs_core/Makefile +index a470fbc..ae8c649 100644 +--- a/lib/libzfs_core/Makefile ++++ b/lib/libzfs_core/Makefile +@@ -34,4 +34,6 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libuutil/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs_core/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++ + .include <bsd.lib.mk> +diff --git a/lib/libzpool/Makefile b/lib/libzpool/Makefile +index 417c1cc..838cdb5 100644 +--- a/lib/libzpool/Makefile ++++ b/lib/libzpool/Makefile +@@ -56,6 +56,10 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/thread + CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys + CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++ + DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} + LDADD= -lmd -lpthread -lz + +diff --git a/sbin/zfs/Makefile b/sbin/zfs/Makefile +index a49d278..b22442e 100644 +--- a/sbin/zfs/Makefile ++++ b/sbin/zfs/Makefile +@@ -22,6 +22,12 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys + CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs + ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + DPADD= ${LIBGEOM} ${LIBJAIL} ${LIBNVPAIR} ${LIBUMEM} \ + ${LIBUTIL} ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} + LDADD= -lgeom -ljail -lnvpair -lumem -lutil -luutil -lzfs_core -lzfs +diff --git a/sbin/zpool/Makefile b/sbin/zpool/Makefile +index 1884d24..5f06d5f 100644 +--- a/sbin/zpool/Makefile ++++ b/sbin/zpool/Makefile +@@ -26,6 +26,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + DPADD= ${LIBAVL} ${LIBGEOM} ${LIBNVPAIR} \ + ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} + LDADD= -lavl -lgeom -lnvpair -lumem -lutil -luutil -lzfs_core -lzfs +diff --git a/usr.bin/ctfconvert/Makefile b/usr.bin/ctfconvert/Makefile +index 7e4a05a..72327ad 100644 +--- a/usr.bin/ctfconvert/Makefile ++++ b/usr.bin/ctfconvert/Makefile +@@ -36,6 +36,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ + -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ + -I${OPENSOLARIS_SYS_DISTDIR}/uts/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf ++ + DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} + LDADD= -lctf -ldwarf -lelf -lz -lpthread + +diff --git a/usr.bin/ctfmerge/Makefile b/usr.bin/ctfmerge/Makefile +index ba4840e..845d28c 100644 +--- a/usr.bin/ctfmerge/Makefile ++++ b/usr.bin/ctfmerge/Makefile +@@ -33,6 +33,8 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ + -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ + -I${OPENSOLARIS_SYS_DISTDIR}/uts/common + ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf ++ + DPADD= ${LIBCTF} ${LIBDWARF} ${LIBELF} ${LIBZ} ${LIBPTHREAD} + LDADD= -lctf -ldwarf -lelf -lz -lpthread + +diff --git a/usr.bin/zinject/Makefile b/usr.bin/zinject/Makefile +index 8c5c141..3db2b29 100644 +--- a/usr.bin/zinject/Makefile ++++ b/usr.bin/zinject/Makefile +@@ -19,6 +19,14 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common + CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ + ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} + LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs_core -lzfs -lzpool +diff --git a/usr.bin/zstreamdump/Makefile b/usr.bin/zstreamdump/Makefile +index 304ff7c..5f0b00e 100644 +--- a/usr.bin/zstreamdump/Makefile ++++ b/usr.bin/zstreamdump/Makefile +@@ -18,6 +18,11 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common + CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++ + DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ + ${LIBPTHREAD} ${LIBZ} ${LIBAVL} + LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl +diff --git a/usr.bin/ztest/Makefile b/usr.bin/ztest/Makefile +index 965300e..ad40a92 100644 +--- a/usr.bin/ztest/Makefile ++++ b/usr.bin/ztest/Makefile +@@ -18,6 +18,14 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common + CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ + ${LIBPTHREAD} ${LIBAVL} ${LIBZFS_CORE} ${LIBZFS} ${LIBUUTIL} + LDADD= -lgeom -lm -lnvpair -lumem -lzpool -lpthread -lavl -lzfs_core -lzfs \ +diff --git a/usr.sbin/dtrace/Makefile b/usr.sbin/dtrace/Makefile +index 3930f01..4bdbd1a 100644 +--- a/usr.sbin/dtrace/Makefile ++++ b/usr.sbin/dtrace/Makefile +@@ -25,4 +25,7 @@ DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBL} ${LIBPROC} \ + LDADD= -lpthread -ldtrace -ly -ll -lproc -lctf -lelf -lz -lutil \ + -lrtld_db + ++LDFLAGS+= -L${.CURDIR}/../../lib/libdtrace ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf ++ + .include <bsd.prog.mk> +diff --git a/usr.sbin/lockstat/Makefile b/usr.sbin/lockstat/Makefile +index 70515ef..d65e4c3 100644 +--- a/usr.sbin/lockstat/Makefile ++++ b/usr.sbin/lockstat/Makefile +@@ -20,6 +20,9 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ + + CFLAGS+= -DNEED_ERRLOC -g + ++LDFLAGS+= -L${.CURDIR}/../../lib/libdtrace ++LDFLAGS+= -L${.CURDIR}/../../lib/libctf ++ + #YFLAGS+= -d + + DPADD= ${LIBPTHREAD} ${LIBDTRACE} ${LIBY} ${LIBFL} ${LIBPROC} \ +diff --git a/usr.sbin/zdb/Makefile b/usr.sbin/zdb/Makefile +index 8068385..337e324 100644 +--- a/usr.sbin/zdb/Makefile ++++ b/usr.sbin/zdb/Makefile +@@ -23,6 +23,14 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libavl ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ + ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} + LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs_core -lzfs -lzpool +diff --git a/usr.sbin/zhack/Makefile b/usr.sbin/zhack/Makefile +index f09d2d8..fc3d7a4 100644 +--- a/usr.sbin/zhack/Makefile ++++ b/usr.sbin/zhack/Makefile +@@ -22,6 +22,13 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs + CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head + CFLAGS+= -I${.CURDIR}/../../lib/libumem + ++LDFLAGS+= -L${.CURDIR}/../../lib/libnvpair ++LDFLAGS+= -L${.CURDIR}/../../lib/libumem ++LDFLAGS+= -L${.CURDIR}/../../lib/libuutil ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs ++LDFLAGS+= -L${.CURDIR}/../../lib/libzpool ++LDFLAGS+= -L${.CURDIR}/../../lib/libzfs_core ++ + DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ + ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} + LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs_core -lzfs -lzpool diff --git a/sys-freebsd/freebsd-cddl/files/zfs.initd b/sys-freebsd/freebsd-cddl/files/zfs.initd new file mode 100644 index 00000000000..f73bdf00558 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/zfs.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need hostid + before fsck +} + +start() { + einfo "Starting zfs ..." + zfs mount -a + zfs share -a + if [ ! -r /etc/zfs/exports ]; then + touch /etc/zfs/exports + fi +} + +stop() { + einfo "Stopping zfs ..." + zfs unshare -a + zfs unmount -a +} diff --git a/sys-freebsd/freebsd-cddl/files/zvol.initd b/sys-freebsd/freebsd-cddl/files/zvol.initd new file mode 100755 index 00000000000..5a593faec69 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/zvol.initd @@ -0,0 +1,47 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need hostid + before fsck +} + +start() { + einfo "Starting zfs volumes..." + zfs volinit + eend $? + # Enable swap on ZVOLs that have org.freebsd:swap=on. + zfs list -H -o org.freebsd:swap,name -t volume | \ + while read state name; do + case "${state}" in + [oO][nN]) + einfo "Enabling swap on zvol ${name}" + swapon /dev/zvol/${name} + eend $? + ;; + esac + done +} + +stop() { + # Disable what we had enabled before. + zfs list -H -o org.freebsd:swap,name -t volume | \ + while read state name; do + case "${state}" in + [oO][nN]) + einfo "Disabling swap on zvol ${name}" + swapoff /dev/zvol/${name} + eend $? + ;; + esac + done + einfo "Stopping zfs volumes..." + zfs volfini + eend $? +} + +restart() { + : +} diff --git a/sys-freebsd/freebsd-cddl/files/zvol.initd-9.0 b/sys-freebsd/freebsd-cddl/files/zvol.initd-9.0 new file mode 100755 index 00000000000..e80f32437d6 --- /dev/null +++ b/sys-freebsd/freebsd-cddl/files/zvol.initd-9.0 @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need hostid + before fsck +} + +start() { + einfo "Starting zfs volumes..." + eend $? + # Enable swap on ZVOLs that have org.freebsd:swap=on. + zfs list -H -o org.freebsd:swap,name -t volume | \ + while read state name; do + case "${state}" in + [oO][nN]) + einfo "Enabling swap on zvol ${name}" + swapon /dev/zvol/${name} + eend $? + ;; + esac + done +} + +stop() { + # Disable what we had enabled before. + zfs list -H -o org.freebsd:swap,name -t volume | \ + while read state name; do + case "${state}" in + [oO][nN]) + einfo "Disabling swap on zvol ${name}" + swapoff /dev/zvol/${name} + eend $? + ;; + esac + done + einfo "Stopping zfs volumes..." + eend $? +} + +restart() { + : +} |