summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Villavicencio <the_paya@gentoo.org>2009-01-22 21:06:27 +0000
committerJavier Villavicencio <the_paya@gentoo.org>2009-01-22 21:06:27 +0000
commit229a1f9d4e026cbe2d47737178139bf14ae7adfb (patch)
tree36f692e9af2ad5dc3511b3101ce11ce9adcbfbe5
parentFix bug 256040, we need to run eautoreconf when we sed a .am (diff)
downloadhistorical-229a1f9d4e026cbe2d47737178139bf14ae7adfb.tar.gz
historical-229a1f9d4e026cbe2d47737178139bf14ae7adfb.tar.bz2
historical-229a1f9d4e026cbe2d47737178139bf14ae7adfb.zip
Import of the 7.1 ebuilds from gentoo-bsd overlay.
Package-Manager: portage-2.2_rc23/cvs/FreeBSD i386
-rw-r--r--sys-freebsd/boot0/ChangeLog10
-rw-r--r--sys-freebsd/boot0/boot0-7.1.ebuild37
-rw-r--r--sys-freebsd/boot0/files/boot0-7.0-gentoo.patch131
-rw-r--r--sys-freebsd/freebsd-bin/ChangeLog10
-rw-r--r--sys-freebsd/freebsd-bin/freebsd-bin-7.1.ebuild37
-rw-r--r--sys-freebsd/freebsd-contrib/ChangeLog10
-rw-r--r--sys-freebsd/freebsd-contrib/freebsd-contrib-7.1.ebuild56
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog10
-rw-r--r--sys-freebsd/freebsd-lib/files/freebsd-lib-7.0-CVE-2008-1391.patch11
-rw-r--r--sys-freebsd/freebsd-lib/files/freebsd-lib-7.1-types.h-fix.patch15
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-7.1.ebuild353
-rw-r--r--sys-freebsd/freebsd-lib/metadata.xml4
-rw-r--r--sys-freebsd/freebsd-libexec/ChangeLog13
-rw-r--r--sys-freebsd/freebsd-libexec/files/bootpd.confd6
-rw-r--r--sys-freebsd/freebsd-libexec/files/bootpd.initd7
-rw-r--r--sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.0-libfallback.patch137
-rw-r--r--sys-freebsd/freebsd-libexec/files/ftpd.pamd20
-rw-r--r--sys-freebsd/freebsd-libexec/files/rquotad.xinetd11
-rw-r--r--sys-freebsd/freebsd-libexec/files/rstatd.xinetd11
-rw-r--r--sys-freebsd/freebsd-libexec/files/rusersd.xinetd11
-rw-r--r--sys-freebsd/freebsd-libexec/files/sprayd.xinetd11
-rw-r--r--sys-freebsd/freebsd-libexec/files/walld.xinetd11
-rw-r--r--sys-freebsd/freebsd-libexec/freebsd-libexec-7.1.ebuild74
-rw-r--r--sys-freebsd/freebsd-mk-defs/ChangeLog11
-rw-r--r--sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gentoo.patch332
-rw-r--r--sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gnu.patch121
-rw-r--r--sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-7.1.ebuild42
-rw-r--r--sys-freebsd/freebsd-pam-modules/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-pam-modules/files/README.pamd63
-rw-r--r--sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-7.1.ebuild48
-rw-r--r--sys-freebsd/freebsd-pf/ChangeLog12
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-libevent.patch12
-rw-r--r--sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-pcap_pollution.patch18
-rw-r--r--sys-freebsd/freebsd-pf/files/pf.confd5
-rw-r--r--sys-freebsd/freebsd-pf/freebsd-pf-7.1.ebuild65
-rw-r--r--sys-freebsd/freebsd-rescue/ChangeLog10
-rw-r--r--sys-freebsd/freebsd-rescue/files/freebsd-rescue-7.1-zlib.patch21
-rw-r--r--sys-freebsd/freebsd-rescue/freebsd-rescue-7.1.ebuild51
-rw-r--r--sys-freebsd/freebsd-sbin/ChangeLog9
-rw-r--r--sys-freebsd/freebsd-sbin/files/freebsd-sbin-7.1-zlib.patch21
-rwxr-xr-xsys-freebsd/freebsd-sbin/files/idmapd.initd20
-rw-r--r--sys-freebsd/freebsd-sbin/freebsd-sbin-7.1.ebuild97
-rw-r--r--sys-freebsd/freebsd-share/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-share/freebsd-share-7.1.ebuild82
-rw-r--r--sys-freebsd/freebsd-sources/ChangeLog15
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-gentoo.patch35
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-tmpfs_whiteout_stub.patch44
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-werror.patch27
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-asm.patch139
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-binutils_link.patch37
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-sparc64.patch12
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-subnet-route-pr40133.patch21
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-types.h-fix.patch15
-rw-r--r--sys-freebsd/freebsd-sources/freebsd-sources-7.1.ebuild109
-rw-r--r--sys-freebsd/freebsd-ubin/ChangeLog8
-rw-r--r--sys-freebsd/freebsd-ubin/freebsd-ubin-7.1.ebuild139
-rw-r--r--sys-freebsd/freebsd-usbin/ChangeLog10
-rw-r--r--sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch45
-rw-r--r--sys-freebsd/freebsd-usbin/files/nfs.confd32
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/nfs.initd187
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/rpc.lockd.initd20
-rwxr-xr-xsys-freebsd/freebsd-usbin/files/rpc.statd.initd20
-rw-r--r--sys-freebsd/freebsd-usbin/freebsd-usbin-7.1.ebuild175
-rw-r--r--sys-freebsd/freebsd-usbin/metadata.xml8
64 files changed, 2902 insertions, 248 deletions
diff --git a/sys-freebsd/boot0/ChangeLog b/sys-freebsd/boot0/ChangeLog
index 60d0ad342ea1..96b6a47809f4 100644
--- a/sys-freebsd/boot0/ChangeLog
+++ b/sys-freebsd/boot0/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/boot0
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/ChangeLog,v 1.21 2007/10/16 08:47:02 uberlord Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/ChangeLog,v 1.22 2009/01/22 20:59:52 the_paya Exp $
+
+*boot0-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/boot0-7.0-gentoo.patch, +boot0-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
16 Oct 2007; Roy Marples <uberlord@gentoo.org>
-files/freebsd-sources-6.2-sparc64.patch, boot0-6.2.ebuild:
diff --git a/sys-freebsd/boot0/boot0-7.1.ebuild b/sys-freebsd/boot0/boot0-7.1.ebuild
new file mode 100644
index 000000000000..13545f88d3b3
--- /dev/null
+++ b/sys-freebsd/boot0/boot0-7.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/boot0/boot0-7.1.ebuild,v 1.1 2009/01/22 20:59:52 the_paya Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD's bootloader"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE=""
+
+SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
+
+RDEPEND=""
+DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-lib-${RV}*"
+
+S="${WORKDIR}/sys/boot"
+
+PATCHES="${FILESDIR}/boot0-7.0-gentoo.patch"
+
+src_unpack() {
+ freebsd_src_unpack
+
+ grep -lr --null -- -ffreestanding "${S}" | xargs -0 sed -i -e \
+ "s:-ffreestanding:-ffreestanding $(test-flags -fno-stack-protector -fno-stack-protector-all):g" || die
+ sed -e '/-fomit-frame-pointer/d' -e '/-mno-align-long-strings/d' \
+ -i "${S}"/i386/boot2/Makefile \
+ -i "${S}"/i386/gptboot/Makefile || die
+}
+
+src_install() {
+ dodir /boot/defaults
+
+ mkinstall FILESDIR=/boot || die "mkinstall failed"
+}
diff --git a/sys-freebsd/boot0/files/boot0-7.0-gentoo.patch b/sys-freebsd/boot0/files/boot0-7.0-gentoo.patch
new file mode 100644
index 000000000000..a5830c178f27
--- /dev/null
+++ b/sys-freebsd/boot0/files/boot0-7.0-gentoo.patch
@@ -0,0 +1,131 @@
+diff -ur ../src.orig/sys/boot/efi/libefi/Makefile sys/boot/efi/libefi/Makefile
+--- ../src.orig/sys/boot/efi/libefi/Makefile 2006-11-05 23:03:03.000000000 +0100
++++ sys/boot/efi/libefi/Makefile 2008-03-14 11:15:48.482695423 +0100
+@@ -8,7 +8,7 @@
+
+ CFLAGS+= -I${.CURDIR}/../include
+ CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH:S/amd64/i386/}
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
++CFLAGS+= -I/usr/include/libstand
+
+ # Pick up the bootstrap header for some interface items
+ CFLAGS+= -I${.CURDIR}/../../common
+diff -ur ../src.orig/sys/boot/i386/boot2/Makefile sys/boot/i386/boot2/Makefile
+--- ../src.orig/sys/boot/i386/boot2/Makefile 2007-05-19 07:07:47.000000000 +0200
++++ sys/boot/i386/boot2/Makefile 2008-03-14 11:21:16.247014910 +0100
+@@ -24,7 +24,7 @@
+ -fno-guess-branch-probability \
+ -fomit-frame-pointer \
+ -fno-unit-at-a-time \
+- -mno-align-long-strings \
++ -march=i586 \
+ -mrtd \
+ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \
+ -D${BOOT2_UFS} \
+diff -ur ../src.orig/sys/boot/i386/libfirewire/Makefile sys/boot/i386/libfirewire/Makefile
+--- ../src.orig/sys/boot/i386/libfirewire/Makefile 2007-05-29 16:35:57.000000000 +0200
++++ sys/boot/i386/libfirewire/Makefile 2008-03-14 11:15:48.502696288 +0100
+@@ -10,7 +10,7 @@
+ CFLAGS+= -D_BOOT
+
+ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
++CFLAGS+= -I/usr/include/libstand
+ CFLAGS+= -I${.CURDIR}/../btx/lib
+ CFLAGS+= -I${.CURDIR}/../libi386
+
+diff -ur ../src.orig/sys/boot/i386/libi386/Makefile sys/boot/i386/libi386/Makefile
+--- ../src.orig/sys/boot/i386/libi386/Makefile 2006-04-11 22:11:30.000000000 +0200
++++ sys/boot/i386/libi386/Makefile 2008-03-14 11:15:48.506695959 +0100
+@@ -36,7 +36,7 @@
+ -I${.CURDIR}/../../../contrib/dev/acpica \
+ -I${.CURDIR}/../../.. -I.
+ # the location of libstand
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
++CFLAGS+= -I/usr/include/libstand/
+
+ .if ${MACHINE_ARCH} == "amd64"
+ CLEANFILES+= machine
+diff -ur ../src.orig/sys/boot/ia64/common/Makefile sys/boot/ia64/common/Makefile
+--- ../src.orig/sys/boot/ia64/common/Makefile 2006-11-05 23:03:03.000000000 +0100
++++ sys/boot/ia64/common/Makefile 2008-03-14 11:15:48.486695372 +0100
+@@ -10,7 +10,7 @@
+ CFLAGS+= -I${.CURDIR}/../../efi/include
+ CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
+ CFLAGS+= -I${.CURDIR}/../../..
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
++CFLAGS+= -I/usr/include/libstand
+
+ .if ${MK_FORTH} != "no"
+ BOOT_FORTH= yes
+diff -ur ../src.orig/sys/boot/ia64/efi/Makefile sys/boot/ia64/efi/Makefile
+--- ../src.orig/sys/boot/ia64/efi/Makefile 2006-11-05 23:03:03.000000000 +0100
++++ sys/boot/ia64/efi/Makefile 2008-03-14 11:15:48.490695322 +0100
+@@ -15,7 +15,7 @@
+ CFLAGS+= -I${.CURDIR}/../../efi/include
+ CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
+ CFLAGS+= -I${.CURDIR}/../../..
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
++CFLAGS+= -I/usr/include/libstand
+
+ LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH}
+ LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic
+diff -ur ../src.orig/sys/boot/ia64/ski/Makefile sys/boot/ia64/ski/Makefile
+--- ../src.orig/sys/boot/ia64/ski/Makefile 2006-11-05 23:03:04.000000000 +0100
++++ sys/boot/ia64/ski/Makefile 2008-03-14 11:15:48.494695551 +0100
+@@ -14,7 +14,7 @@
+ CFLAGS+= -I${.CURDIR}/../common
+ CFLAGS+= -I${.CURDIR}/../../common
+ CFLAGS+= -I${.CURDIR}/../../..
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
++CFLAGS+= -I/usr/include/libstand
+
+ LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH}
+ LDFLAGS= -Wl,-T${LDSCRIPT}
+diff -ur ../src.orig/sys/boot/ofw/libofw/Makefile sys/boot/ofw/libofw/Makefile
+--- ../src.orig/sys/boot/ofw/libofw/Makefile 2007-06-17 02:17:15.000000000 +0200
++++ sys/boot/ofw/libofw/Makefile 2008-03-14 11:15:48.478695194 +0100
+@@ -7,7 +7,7 @@
+ ofw_memory.c ofw_module.c ofw_net.c ofw_reboot.c \
+ ofw_time.c openfirm.c
+
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
++CFLAGS+= -I/usr/include/libstand/
+
+ # Pick up the bootstrap header for some interface items
+ CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
+diff -ur ../src.orig/sys/boot/pc98/libpc98/Makefile sys/boot/pc98/libpc98/Makefile
+--- ../src.orig/sys/boot/pc98/libpc98/Makefile 2006-04-11 22:11:30.000000000 +0200
++++ sys/boot/pc98/libpc98/Makefile 2008-03-14 11:15:48.510696188 +0100
+@@ -31,6 +31,6 @@
+ -I${.CURDIR}/../../i386/libi386 \
+ -I${.CURDIR}/../../.. -I.
+ # the location of libstand
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
++CFLAGS+= -I/usr/include/libstand/
+
+ .include <bsd.lib.mk>
+diff -ur ../src.orig/sys/boot/powerpc/loader/Makefile sys/boot/powerpc/loader/Makefile
+--- ../src.orig/sys/boot/powerpc/loader/Makefile 2006-03-17 19:54:36.000000000 +0100
++++ sys/boot/powerpc/loader/Makefile 2008-03-14 11:15:48.515695706 +0100
+@@ -82,7 +82,7 @@
+ CFLAGS+= -I${.CURDIR}/../../ofw/libofw
+
+ # where to get libstand from
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
++CFLAGS+= -I/usr/include/libstand/
+
+ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
+ LDADD= ${LIBFICL} ${LIBOFW} -lstand
+diff -ur ../src.orig/sys/boot/sparc64/loader/Makefile sys/boot/sparc64/loader/Makefile
+--- ../src.orig/sys/boot/sparc64/loader/Makefile 2006-03-17 19:54:36.000000000 +0100
++++ sys/boot/sparc64/loader/Makefile 2008-03-14 11:15:48.498695501 +0100
+@@ -65,7 +65,7 @@
+ CFLAGS+= -I${.CURDIR}/../../ofw/libofw/
+
+ # where to get libstand from
+-CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
++CFLAGS+= -I/usr/include/libstand/
+
+ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND}
+ LDADD= ${LIBFICL} ${LIBOFW} -lstand
diff --git a/sys-freebsd/freebsd-bin/ChangeLog b/sys-freebsd/freebsd-bin/ChangeLog
index a5f97944208f..fc10d9b7339e 100644
--- a/sys-freebsd/freebsd-bin/ChangeLog
+++ b/sys-freebsd/freebsd-bin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-bin
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-bin/ChangeLog,v 1.29 2007/10/02 13:33:19 uberlord Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-bin/ChangeLog,v 1.30 2009/01/22 21:00:42 the_paya Exp $
+
+*freebsd-contrib-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +freebsd-bin-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
02 Oct 2007; Roy Marples <uberlord@gentoo.org>
+files/freebsd-bin-6.2-sh-cclass.patch, freebsd-bin-6.2.ebuild:
diff --git a/sys-freebsd/freebsd-bin/freebsd-bin-7.1.ebuild b/sys-freebsd/freebsd-bin/freebsd-bin-7.1.ebuild
new file mode 100644
index 000000000000..ade940bd0fb5
--- /dev/null
+++ b/sys-freebsd/freebsd-bin/freebsd-bin-7.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-bin/freebsd-bin-7.1.ebuild,v 1.1 2009/01/22 21:00:42 the_paya Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD /bin tools"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="nls"
+
+SRC_URI="mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ dev-libs/libedit
+ sys-libs/ncurses
+ sys-apps/ed
+ !app-admin/realpath"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ >=sys-devel/flex-2.5.31-r2"
+
+S=${WORKDIR}/bin
+
+PATCHES="${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
+
+# csh and tcsh are provided by tcsh package, rmail is sendmail stuff.
+REMOVE_SUBDIRS="csh rmail ed"
+
+pkg_setup() {
+ use nls || mymakeopts="${mymakeopts} NO_NLS= "
+
+ mymakeopts="${mymakeopts} NO_TCSH= NO_SENDMAIL= NO_OPENSSL= NO_CRYPT= NO_RCMDS= "
+}
diff --git a/sys-freebsd/freebsd-contrib/ChangeLog b/sys-freebsd/freebsd-contrib/ChangeLog
index 6bdcc865d85b..a9bd7c532ed2 100644
--- a/sys-freebsd/freebsd-contrib/ChangeLog
+++ b/sys-freebsd/freebsd-contrib/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-contrib
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-contrib/ChangeLog,v 1.23 2007/01/15 21:34:58 drizzt Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-contrib/ChangeLog,v 1.24 2009/01/22 21:01:17 the_paya Exp $
+
+*freebsd-contrib-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +freebsd-contrib-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
*freebsd-contrib-6.2 (15 Jan 2007)
diff --git a/sys-freebsd/freebsd-contrib/freebsd-contrib-7.1.ebuild b/sys-freebsd/freebsd-contrib/freebsd-contrib-7.1.ebuild
new file mode 100644
index 000000000000..83f399c0a15d
--- /dev/null
+++ b/sys-freebsd/freebsd-contrib/freebsd-contrib-7.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-contrib/freebsd-contrib-7.1.ebuild,v 1.1 2009/01/22 21:01:17 the_paya Exp $
+
+inherit bsdmk freebsd flag-o-matic
+
+DESCRIPTION="Contributed sources for FreeBSD."
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+LICENSE="BSD GPL-2 as-is"
+
+IUSE=""
+
+SRC_URI="mirror://gentoo/${GNU}.tar.bz2
+ mirror://gentoo/${P}.tar.bz2"
+
+RDEPEND=""
+DEPEND="=sys-freebsd/freebsd-sources-${RV}*
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+S="${WORKDIR}/gnu"
+
+src_unpack() {
+ echo ">>> Unpacking needed parts of ${GNU}.tar.bz2 to ${WORKDIR}"
+ tar -jxpf "${DISTDIR}/${GNU}.tar.bz2" gnu/lib/libdialog gnu/usr.bin/sort gnu/usr.bin/patch
+ echo ">>> Unpacking needed parts of ${CONTRIB}.tar.bz2 to ${WORKDIR}"
+ tar -jxpf "${DISTDIR}/${CONTRIB}.tar.bz2" contrib/gnu-sort
+
+ freebsd_do_patches
+ freebsd_rename_libraries
+}
+
+src_compile() {
+ cd "${S}/lib/libdialog"
+ freebsd_src_compile
+
+ cd "${S}/usr.bin/sort"
+ freebsd_src_compile
+
+ cd "${S}/usr.bin/patch"
+ freebsd_src_compile
+}
+
+src_install() {
+ use profile || mymakeopts="${mymakeopts} NO_PROFILE= "
+ mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
+
+ cd "${S}/lib/libdialog"
+ mkinstall || die "libdialog install failed"
+
+ cd "${S}/usr.bin/sort"
+ mkinstall DESTDIR="${D}/bin/" || die "libdialog install failed"
+
+ cd "${S}/usr.bin/patch"
+ mkinstall DESTDIR="${D}/usr/bin/" || die "libdialog install failed"
+}
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index b972050e08a7..c261489e64d8 100644
--- a/sys-freebsd/freebsd-lib/ChangeLog
+++ b/sys-freebsd/freebsd-lib/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-freebsd/freebsd-lib
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.62 2009/01/08 17:41:58 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.63 2009/01/22 21:02:31 the_paya Exp $
+
+*freebsd-lib-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-lib-7.0-CVE-2008-1391.patch,
+ +files/freebsd-lib-7.1-types.h-fix.patch, metadata.xml,
+ +freebsd-lib-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
08 Jan 2009; Alexis Ballier <aballier@gentoo.org>
-freebsd-lib-6.2-r2.ebuild, -freebsd-lib-6.2-r3.ebuild:
diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-7.0-CVE-2008-1391.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-7.0-CVE-2008-1391.patch
new file mode 100644
index 000000000000..2b8d401412fc
--- /dev/null
+++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-7.0-CVE-2008-1391.patch
@@ -0,0 +1,11 @@
+--- lib/libc/stdlib/strfmon.c 2008/04/22 13:23:34
++++ lib/libc/stdlib/strfmon.c 2008/04/24 07:49:00
+@@ -65,6 +65,8 @@
+ #define GET_NUMBER(VAR) do { \
+ VAR = 0; \
+ while (isdigit((unsigned char)*fmt)) { \
++ if (VAR > INT_MAX / 10) \
++ goto e2big_error; \
+ VAR *= 10; \
+ VAR += *fmt - '0'; \
+ if (VAR < 0) \
diff --git a/sys-freebsd/freebsd-lib/files/freebsd-lib-7.1-types.h-fix.patch b/sys-freebsd/freebsd-lib/files/freebsd-lib-7.1-types.h-fix.patch
new file mode 100644
index 000000000000..8de5df2d16a6
--- /dev/null
+++ b/sys-freebsd/freebsd-lib/files/freebsd-lib-7.1-types.h-fix.patch
@@ -0,0 +1,15 @@
+Fixes a compile error if XOPEN_SOURCE 600 is defined.
+
+See: http://www.mailinglistarchive.com/freebsd-current@freebsd.org/msg15011.html
+
+--- sys/sys/types.h.orig
++++ sys/sys/types.h
+@@ -46,7 +46,7 @@
+
+ #include <sys/_pthreadtypes.h>
+
+-#if __BSD_VISIBLE
++#ifndef _POSIX_SOURCE
+ typedef unsigned char u_char;
+ typedef unsigned short u_short;
+ typedef unsigned int u_int;
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-7.1.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-7.1.ebuild
new file mode 100644
index 000000000000..7e5814e2482b
--- /dev/null
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-7.1.ebuild
@@ -0,0 +1,353 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-7.1.ebuild,v 1.1 2009/01/22 21:02:31 the_paya Exp $
+
+inherit bsdmk freebsd flag-o-matic toolchain-funcs
+
+DESCRIPTION="FreeBSD's base system libraries"
+SLOT="7.0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="atm bluetooth ssl hesiod ipv6 kerberos nis gpib build bootstrap crosscompile_opts_headers-only"
+
+# Crypto is needed to have an internal OpenSSL header
+# sys is needed for libalias, probably we can just extract that instead of
+# extracting the whole tarball
+SRC_URI="mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${CRYPTO}.tar.bz2
+ mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2
+ nis? ( mirror://gentoo/${USBIN}.tar.bz2 )
+ build? (
+ mirror://gentoo/${SYS}.tar.bz2 )"
+
+if [ "${CATEGORY#*cross-}" = "${CATEGORY}" ]; then
+ RDEPEND="ssl? ( dev-libs/openssl )
+ hesiod? ( net-dns/hesiod )
+ kerberos? ( virtual/krb5 )
+ !sys-freebsd/freebsd-headers"
+ DEPEND="${RDEPEND}
+ >=sys-devel/flex-2.5.31-r2
+ =sys-freebsd/freebsd-sources-${RV}*
+ !bootstrap? ( app-arch/bzip2 )"
+
+ PROVIDE="virtual/libc
+ virtual/os-headers"
+
+else
+ SRC_URI="${SRC_URI}
+ mirror://gentoo/${SYS}.tar.bz2"
+fi
+
+DEPEND="${DEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+S="${WORKDIR}/lib"
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [ "${CTARGET}" = "${CHOST}" -a "${CATEGORY#*cross-}" != "${CATEGORY}" ]; then
+ export CTARGET=${CATEGORY/cross-}
+fi
+
+pkg_setup() {
+ [ -c /dev/zero ] || \
+ die "You forgot to mount /dev; the compiled libc would break."
+
+ if ! use ssl && use kerberos; then
+ eerror "If you want kerberos support you need to enable ssl support, too."
+ fi
+
+ use atm || mymakeopts="${mymakeopts} NO_ATM= "
+ use bluetooth || mymakeopts="${mymakeopts} NO_BLUETOOTH= "
+ use hesiod || mymakeopts="${mymakeopts} NO_HESIOD_LIBC= "
+ use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NO_CRYPT= "
+ use ipv6 || mymakeopts="${mymakeopts} NO_INET6= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+ use gpib || mymakeopts="${mymakeopts} NO_GPIB= "
+
+ mymakeopts="${mymakeopts} NO_OPENSSH= NO_BIND= NO_SENDMAIL= NO_LIBC_R="
+
+ if [ "${CTARGET}" != "${CHOST}" ]; then
+ mymakeopts="${mymakeopts} MACHINE=$(tc-arch-kernel ${CTARGET})"
+ mymakeopts="${mymakeopts} MACHINE_ARCH=$(tc-arch-kernel ${CTARGET})"
+ fi
+}
+
+PATCHES="${FILESDIR}/${PN}-bsdxml.patch
+ ${FILESDIR}/${PN}-6.0-pmc.patch
+ ${FILESDIR}/${PN}-6.0-gccfloat.patch
+ ${FILESDIR}/${PN}-6.0-flex-2.5.31.patch
+ ${FILESDIR}/${PN}-6.1-csu.patch
+ ${FILESDIR}/${PN}-6.2-bluetooth.patch
+ ${FILESDIR}/${PN}-new_as.patch
+ ${FILESDIR}/${PN}-7.0-CVE-2008-1391.patch"
+
+# Here we disable and remove source which we don't need or want
+# In order:
+# - ncurses stuff
+# - archiving libraries (have their own ebuild)
+# - sendmail libraries (they are installed by sendmail)
+# - SNMP library and dependency (have their own ebuilds)
+#
+# The rest are libraries we already have somewhere else because
+# they are contribution.
+# Note: libtelnet is an internal lib used by telnet and telnetd programs
+# as it's not used in freebsd-lib package itself, it's pointless building
+# it here.
+REMOVE_SUBDIRS="ncurses
+ libz libbz2 libarchive \
+ libsm libsmdb libsmutil \
+ libbegemot libbsnmp \
+ libpam libpcap bind libwrap libmagic \
+ libcom_err libtelnet
+ libedit"
+
+src_unpack() {
+ freebsd_src_unpack
+
+ sed -i.bak -e 's:-o/dev/stdout:-t:' "${S}/libc/net/Makefile.inc"
+ sed -i.bak -e 's:histedit.h::' "${WORKDIR}/include/Makefile"
+
+ # Upstream Display Managers default to using VT7
+ # We should make FreeBSD allow this by default
+ local x=
+ for x in "${WORKDIR}"/etc/etc.*/ttys ; do
+ sed -i.bak \
+ -e '/ttyv5[[:space:]]/ a\
+# Display Managers default to VT7.\
+# If you use the xdm init script, keep ttyv6 commented out\
+# unless you force a different VT for the DM being used.' \
+ -e '/^ttyv[678][[:space:]]/ s/^/# /' "${x}" \
+ || die "Failed to sed ${x}"
+ rm "${x}".bak
+ done
+
+ # Don't install the hesiod man page or header
+ rm "${WORKDIR}"/include/hesiod.h || die
+ sed -i.bak -e 's:hesiod.h::' "${WORKDIR}"/include/Makefile || die
+ sed -i.bak -e 's:hesiod.c::' -e 's:hesiod.3::' \
+ "${WORKDIR}"/lib/libc/net/Makefile.inc || die
+
+ # Apply this patch for Gentoo/FreeBSD/SPARC64 to build correctly
+ # from catalyst, then don't do anything else
+ if use build; then
+ cd "${WORKDIR}"
+ # This patch has to be applied on ${WORKDIR}/sys, so we do it here since it
+ # shouldn't be a symlink to /usr/src/sys (which should be already patched)
+ epatch "${FILESDIR}"/${PN}-7.1-types.h-fix.patch
+ # Preinstall includes so we don't use the system's ones.
+ mkdir "${WORKDIR}/include_proper" || die "Couldn't create ${WORKDIR}/include_proper"
+ install_includes "/include_proper"
+ return 0
+ fi
+
+ if [ "${CTARGET}" = "${CHOST}" ]; then
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys" || die "Couldn't make sys symlink!"
+ else
+ sed -i.bak -e "s:/usr/include:/usr/${CTARGET}/usr/include:g" \
+ "${S}/libc/rpc/Makefile.inc" \
+ "${S}/libc/yp/Makefile.inc"
+ fi
+
+ if install --version 2> /dev/null | grep -q GNU; then
+ sed -i.bak -e 's:${INSTALL} -C:${INSTALL}:' "${WORKDIR}/include/Makefile"
+ fi
+
+ # Preinstall includes so we don't use the system's ones.
+ mkdir "${WORKDIR}/include_proper" || die "Couldn't create ${WORKDIR}/include_proper"
+ install_includes "/include_proper"
+
+ # Let arch-specific includes to be found
+ local machine
+ machine=$(tc-arch-kernel ${CTARGET})
+ ln -s "${WORKDIR}/sys/${machine}/include" "${WORKDIR}/include/machine" || \
+ die "Couldn't make ${machine}/include symlink."
+
+ use bootstrap && dummy_mk libstand
+}
+
+src_compile() {
+ cd "${WORKDIR}/include"
+ $(freebsd_get_bmake) CC=$(tc-getCC) || die "make include failed"
+
+ use crosscompile_opts_headers-only && return 0
+
+ # Don't use ssp until properly fixed
+ append-flags $(test-flags -fno-stack-protector -fno-stack-protector-all)
+
+ strip-flags
+ if [ "${CTARGET}" != "${CHOST}" ]; then
+ export YACC='yacc -by'
+ CHOST=${CTARGET} tc-export CC LD CXX
+
+ local machine
+ machine=$(tc-arch-kernel ${CTARGET})
+
+ local csudir
+ if [ -d "${S}/csu/${machine}-elf" ]; then
+ csudir="${S}/csu/${machine}-elf"
+ else
+ csudir="${S}/csu/${machine}"
+ fi
+ cd "${csudir}"
+ $(freebsd_get_bmake) ${mymakeopts} || die "make csu failed"
+
+ append-flags "-isystem /usr/${CTARGET}/usr/include"
+ append-flags "-isystem ${WORKDIR}/lib/libutil"
+ append-flags "-isystem ${WORKDIR}/lib/msun/${machine/i386/i387}"
+ append-flags "-B ${csudir}"
+ append-ldflags "-B ${csudir}"
+
+ cd "${S}/libc"
+ $(freebsd_get_bmake) ${mymakeopts} || die "make libc failed"
+ cd "${S}/msun"
+ $(freebsd_get_bmake) ${mymakeopts} || die "make libc failed"
+ else
+ # Forces to use the local copy of headers as they might be outdated in
+ # the system
+ append-flags "-isystem '${WORKDIR}/include_proper'"
+
+ cd "${S}"
+ NOFLAGSTRIP=yes freebsd_src_compile
+ fi
+}
+
+src_install() {
+ [ "${CTARGET}" = "${CHOST}" ] \
+ && INCLUDEDIR="/usr/include" \
+ || INCLUDEDIR="/usr/${CTARGET}/usr/include"
+ dodir ${INCLUDEDIR}
+ einfo "Installing for ${CTARGET} in ${CHOST}.."
+ install_includes ${INCLUDEDIR}
+
+ # Install math.h when crosscompiling, at this point
+ if [ "${CHOST}" != "${CTARGET}" ]; then
+ insinto "/usr/${CTARGET}/usr/include"
+ doins "${S}/msun/src/math.h"
+ fi
+
+ use crosscompile_opts_headers-only && return 0
+
+ if [ "${CTARGET}" != "${CHOST}" ]; then
+ local csudir
+ if [ -d "${S}/csu/$(tc-arch-kernel ${CTARGET})-elf" ]; then
+ csudir="${S}/csu/$(tc-arch-kernel ${CTARGET})-elf"
+ else
+ csudir="${S}/csu/$(tc-arch-kernel ${CTARGET})"
+ fi
+ cd "${csudir}"
+ $(freebsd_get_bmake) ${mymakeopts} DESTDIR="${D}" install \
+ FILESDIR="/usr/${CTARGET}/usr/lib" LIBDIR="/usr/${CTARGET}/usr/lib" || die "Install csu failed"
+
+ cd "${S}/libc"
+ $(freebsd_get_bmake) ${mymakeopts} DESTDIR="${D}" install NO_MAN= \
+ SHLIBDIR="/usr/${CTARGET}/lib" LIBDIR="/usr/${CTARGET}/usr/lib" || die "Install failed"
+
+ cd "${S}/msun"
+ $(freebsd_get_bmake) ${mymakeopts} DESTDIR="${D}" install NO_MAN= \
+ INCLUDEDIR="/usr/${CTARGET}/usr/include" \
+ SHLIBDIR="/usr/${CTARGET}/lib" LIBDIR="/usr/${CTARGET}/usr/lib" || die "Install failed"
+
+ dosym "usr/include" "/usr/${CTARGET}/sys-include"
+ else
+ cd "${S}"
+ mkinstall || die "Install failed"
+ fi
+
+ # Don't install the rest of the configuration files if crosscompiling
+ if [ "${CTARGET}" != "${CHOST}" ] ; then
+ # This is to get it stripped with the correct tools, otherwise it gets
+ # stripped with the host strip.
+ export CHOST=${CTARGET}
+ return 0
+ fi
+
+ # Add symlinks (-> libthr) for legacy threading libraries, since these are
+ # not built by us (they are disabled in FreeBSD-7 anyway).
+ dosym libthr.a /usr/lib/libpthread.a
+ dosym libthr.so /usr/lib/libpthread.so
+ dosym libthr.a /usr/lib/libc_r.a
+ dosym libthr.so /usr/lib/libc_r.so
+
+ # Add symlink (-> libthr) so previously built binaries still work.
+ dosym libthr.so.3 /lib/libpthread.so.2
+ dosym libthr.so.3 /lib/libc_r.so.6
+
+ # Compatibility symlinks to run FreeBSD 5.x binaries (ABI is mostly
+ # identical, remove when problems will actually happen)
+ dosym /lib/libc.so.7 /usr/lib/libc.so.6
+ dosym /lib/libc.so.6 /usr/lib/libc.so.5
+ dosym /lib/libm.so.4 /usr/lib/libm.so.3
+ dosym /lib/libm.so.5 /usr/lib/libm.so.4
+
+ # install libstand files
+ dodir /usr/include/libstand
+ insinto /usr/include/libstand
+ doins "${S}"/libstand/*.h
+
+ cd "${WORKDIR}/etc/"
+ insinto /etc
+ doins auth.conf nls.alias mac.conf netconfig
+
+ # Install ttys file
+
+ doins "etc.${MACHINE}"/*
+
+ dodir /etc/sandbox.d
+
+ # Generate ldscripts, otherwise bad thigs are supposed to happen
+ gen_usr_ldscript libalias_cuseeme.so libalias_dummy.so libalias_ftp.so \
+ libalias_irc.so libalias_nbt.so libalias_pptp.so libalias_skinny.so \
+ libalias_smedia.so
+ # These show on QA warnings too, however they're pretty much bsd only,
+ # aka, no autotools for them.
+ # libbsdxml.so libcam.so libcrypt.so libdevstat.so libgeom.so \
+ # libipsec.so libipx.so libkiconv.so libkvm.so libmd.so libsbuf.so libufs.so \
+ # libutil.so
+
+ cat - > "${D}"/etc/sandbox.d/00freebsd <<EOF
+# /dev/crypto is used mostly by OpenSSL on *BSD platforms
+# leave it available as packages might use OpenSSL commands
+# during compile or install phase.
+SANDBOX_PREDICT="/dev/crypto"
+EOF
+}
+
+install_includes()
+{
+ local INCLUDEDIR="$1"
+
+ # The idea is to be called from either install or unpack.
+ # During unpack it's required to install them as portage's user.
+ if [[ "${EBUILD_PHASE}" == "install" ]]; then
+ local DESTDIR="${D}"
+ BINOWN="root"
+ BINGRP="wheel"
+ else
+ local DESTDIR="${WORKDIR}"
+ [[ -z "${USER}" ]] && USER="portage"
+ BINOWN="${USER}"
+ [[ -z "${GROUPS}" ]] && GROUPS="portage"
+ BINGRP="${GROUPS}"
+ fi
+
+ # Must exist before we use it.
+ [[ -d "${DESTDIR}${INCLUDEDIR}" ]] || die "dodir or mkdir ${INCLUDEDIR} before using install_includes."
+ cd "${WORKDIR}/include"
+
+ if [[ $(tc-arch-kernel) == "x86_64" ]]; then
+ local MACHINE="amd64"
+ else
+ local MACHINE="$(tc-arch-kernel)"
+ fi
+
+ einfo "Installing includes into ${INCLUDEDIR} as ${BINOWN}:${BINGRP}..."
+ $(freebsd_get_bmake) installincludes \
+ MACHINE=${MACHINE} DESTDIR="${DESTDIR}" \
+ INCLUDEDIR="${INCLUDEDIR}" BINOWN="${BINOWN}" \
+ BINGRP="${BINGRP}" || die "install_includes() failed"
+ einfo "includes installed ok."
+}
diff --git a/sys-freebsd/freebsd-lib/metadata.xml b/sys-freebsd/freebsd-lib/metadata.xml
index 589da8936b9e..04dce7bb5beb 100644
--- a/sys-freebsd/freebsd-lib/metadata.xml
+++ b/sys-freebsd/freebsd-lib/metadata.xml
@@ -3,7 +3,7 @@
<pkgmetadata>
<herd>bsd</herd>
<use>
- <flag name='gpib'>Enable gpib support (TODO improve description)</flag>
- <flag name='hesiod'>Enable hesiod support</flag>
+ <flag name='gpib'>Enable General Purpose Interface Bus support</flag>
+ <flag name='hesiod'>Enable support for net-dns/hesiod</flag>
</use>
</pkgmetadata>
diff --git a/sys-freebsd/freebsd-libexec/ChangeLog b/sys-freebsd/freebsd-libexec/ChangeLog
index c5ef69519df5..832ff2347f3a 100644
--- a/sys-freebsd/freebsd-libexec/ChangeLog
+++ b/sys-freebsd/freebsd-libexec/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-freebsd/freebsd-libexec
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/ChangeLog,v 1.27 2007/10/16 08:54:50 uberlord Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/ChangeLog,v 1.28 2009/01/22 21:02:22 the_paya Exp $
+
+*freebsd-libexec-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-libexec-7.0-libfallback.patch, files/bootpd.confd,
+ files/bootpd.initd, files/ftpd.pamd, +files/rquotad.xinetd,
+ +files/rstatd.xinetd, +files/rusersd.xinetd, +files/sprayd.xinetd,
+ +files/walld.xinetd, +freebsd-libexec-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
16 Oct 2007; Roy Marples <uberlord@gentoo.org>
-files/freebsd-libexec-6.2-sparc64.patch, freebsd-libexec-6.2-r2.ebuild:
diff --git a/sys-freebsd/freebsd-libexec/files/bootpd.confd b/sys-freebsd/freebsd-libexec/files/bootpd.confd
index 1dcd1e1c237c..6d238e4d4853 100644
--- a/sys-freebsd/freebsd-libexec/files/bootpd.confd
+++ b/sys-freebsd/freebsd-libexec/files/bootpd.confd
@@ -1,9 +1,7 @@
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/files/bootpd.confd,v 1.1 2006/11/20 14:27:10 flameeyes Exp $
-
# Configuration file for /etc/init.d/bootpd
# Name of the configuration file for bootpd
-# BOOTPTAB_FILE="/etc/bootptab"
+# bootptab_file="/etc/bootptab"
# Options to pass to bootpd. See bootpd(8).
-# BOOTPD_OPTS=""
+# bootpd_opts=""
diff --git a/sys-freebsd/freebsd-libexec/files/bootpd.initd b/sys-freebsd/freebsd-libexec/files/bootpd.initd
index dc35923a4094..e82563f7690e 100644
--- a/sys-freebsd/freebsd-libexec/files/bootpd.initd
+++ b/sys-freebsd/freebsd-libexec/files/bootpd.initd
@@ -1,14 +1,13 @@
#!/sbin/runscript
-# Copyright 2006 Gentoo Foundation
+# Copyright 2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/files/bootpd.initd,v 1.2 2007/04/06 14:59:47 uberlord Exp $
depend() {
need net
}
start() {
- local bootptab=${BOOTPTAB_FILE:-/etc/bootptab}
+ local bootptab=${bootptab_file:-/etc/bootptab}
if ! [ -f "${bootptab}" ]; then
eerror "Unable to find the bootptab file: ${bootptab}"
@@ -17,7 +16,7 @@ start() {
fi
ebegin "Starting BOOTP server"
- start-stop-daemon --start --exec /usr/libexec/bootpd -- ${BOOTPD_OPTS} ${bootptab}
+ start-stop-daemon --start --exec /usr/libexec/bootpd -- ${bootpd_opts} ${bootptab}
eend $?
}
diff --git a/sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.0-libfallback.patch b/sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.0-libfallback.patch
new file mode 100644
index 000000000000..6269ac4dd239
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/freebsd-libexec-7.0-libfallback.patch
@@ -0,0 +1,137 @@
+--- rtld-elf/rtld.c.orig 2007-04-07 23:17:00 +0000
++++ rtld-elf/rtld.c 2007-04-23 09:42:32 +0000
+@@ -988,6 +988,103 @@
+ return NULL;
+ }
+
++#define MAX_LIBRARIES_HITS 255
++
++struct fill_library_paths_args {
++ const char *name;
++ size_t namelen;
++ char **libraries;
++ size_t *count;
++};
++
++static void *
++fill_library_paths(const char *dir, size_t dirlen, void *param)
++{
++ struct fill_library_paths_args *arg;
++
++ arg = param;
++ if (*(arg->count) > MAX_LIBRARIES_HITS)
++ return (NULL);
++
++ if (*dir == '/' || trust) {
++ arg->libraries[*(arg->count)] = malloc(sizeof(char)*(dirlen + 1 + arg->namelen + 1));
++ strncpy(arg->libraries[*(arg->count)], dir, dirlen);
++ arg->libraries[*(arg->count)][dirlen] = '/';
++ strncpy(arg->libraries[*(arg->count)] + dirlen + 1, arg->name, arg->namelen+1);
++
++ dbg(" Trying \"%s\"\n", arg->libraries[*(arg->count)]);
++ if (access(arg->libraries[*(arg->count)], F_OK) == 0) {
++ *(arg->count) += 1;
++ }
++ }
++ return (NULL);
++}
++
++/**
++ * Find all libraries matching xname for the object refobj (if not null), like
++ * find_library but find all the matching libraries in the paths.
++ *
++ * The returned pointer has to be free()'d (as well as the contained strings)
++ * if it's non-NULL.
++ * The end of the array is found when the pointer gets NULL.
++ */
++static char **find_libraries(const char *xname, const Obj_Entry *refobj)
++{
++ char **libraries;
++ size_t libraries_count;
++ struct fill_library_paths_args arg;
++ char *name;
++
++ if (strchr(xname, '/') != NULL) { /* Hard coded pathname */
++ if (xname[0] != '/' && !trust) {
++ _rtld_error("Absolute pathname required for shared object \"%s\"",
++ xname);
++ return NULL;
++ }
++ libraries = malloc(sizeof(char*)*2);
++ libraries[0] = xstrdup(xname);
++ libraries[1] = NULL;
++ return libraries;
++ }
++
++ if (libmap_disable || (refobj == NULL) ||
++ (name = lm_find(refobj->path, xname)) == NULL)
++ name = (char *)xname;
++
++ dbg(" Searching for \"%s\"", name);
++
++ /* look up at maximum 255 libraries, would be crazy going over that */
++ libraries = malloc(sizeof(char*)*(MAX_LIBRARIES_HITS+1));
++ libraries_count = 0;
++
++ arg.name = name;
++ arg.namelen = strlen(name);
++ arg.libraries = libraries;
++ arg.count = &libraries_count;
++
++ path_enumerate(ld_library_path, fill_library_paths, &arg);
++ if(refobj != NULL)
++ path_enumerate(refobj->rpath, fill_library_paths, &arg);
++ path_enumerate(gethints(), fill_library_paths, &arg);
++ path_enumerate(STANDARD_LIBRARY_PATH, fill_library_paths, &arg);
++
++ libraries[libraries_count] = NULL;
++
++ if(libraries_count == 0) {
++ if(refobj != NULL && refobj->path != NULL) {
++ _rtld_error("Shared object \"%s\" not found, required by \"%s\"",
++ name, basename(refobj->path));
++ } else {
++ _rtld_error("Shared object \"%s\" not found", name);
++ }
++
++ free(libraries);
++ return NULL;
++ }
++
++ return libraries;
++}
++
+ /*
+ * Given a symbol number in a referencing object, find the corresponding
+ * definition of the symbol. Returns a pointer to the symbol, or NULL if
+@@ -1260,7 +1357,29 @@
+ Needed_Entry *needed;
+
+ for (needed = obj->needed; needed != NULL; needed = needed->next) {
+- needed->obj = load_object(obj->strtab + needed->name, obj);
++ const char *name = obj->strtab + needed->name;
++ char **paths = find_libraries(name, obj);
++ char **curpath = paths;
++
++ needed->obj = NULL;
++ if (paths == NULL) {
++ if (ld_tracing)
++ continue;
++ else
++ return -1;
++ }
++
++ while(*curpath) {
++ if (needed->obj == NULL) {
++ needed->obj = load_object(*curpath, NULL);
++ curpath++;
++ continue;
++ }
++ /* Continue, so that we can free the whole lot */
++ free(*curpath);
++ curpath++;
++ }
++ free(paths);
+ if (needed->obj == NULL && !ld_tracing)
+ return -1;
+ }
diff --git a/sys-freebsd/freebsd-libexec/files/ftpd.pamd b/sys-freebsd/freebsd-libexec/files/ftpd.pamd
index d9feb829a549..8e9082373f8f 100644
--- a/sys-freebsd/freebsd-libexec/files/ftpd.pamd
+++ b/sys-freebsd/freebsd-libexec/files/ftpd.pamd
@@ -1,20 +1,8 @@
-#
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/files/ftpd.pamd,v 1.1 2006/04/01 16:43:51 flameeyes Exp $
-#
# PAM configuration for the "ftpd" service
#
-# auth
-auth required pam_nologin.so no_warn
-auth sufficient pam_opie.so no_warn no_fake_prompts
-auth requisite pam_opieaccess.so no_warn allow_local
-#auth sufficient pam_krb5.so no_warn
-#auth sufficient pam_ssh.so no_warn try_first_pass
-auth required pam_unix.so no_warn try_first_pass
-
-# account
-#account required pam_krb5.so
-account required pam_unix.so
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
-# session
-session required pam_permit.so
diff --git a/sys-freebsd/freebsd-libexec/files/rquotad.xinetd b/sys-freebsd/freebsd-libexec/files/rquotad.xinetd
new file mode 100644
index 000000000000..876cd16c53c2
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/rquotad.xinetd
@@ -0,0 +1,11 @@
+service rquotad
+{
+ type = rpc
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/libexec/rpc.rquotad
+ rpc_version = 1
+ disabled = yes
+}
diff --git a/sys-freebsd/freebsd-libexec/files/rstatd.xinetd b/sys-freebsd/freebsd-libexec/files/rstatd.xinetd
new file mode 100644
index 000000000000..ba1b819851eb
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/rstatd.xinetd
@@ -0,0 +1,11 @@
+service rstatd
+{
+ type = rpc
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/libexec/rpc.rstatd
+ rpc_version = 1-3
+ disabled = yes
+}
diff --git a/sys-freebsd/freebsd-libexec/files/rusersd.xinetd b/sys-freebsd/freebsd-libexec/files/rusersd.xinetd
new file mode 100644
index 000000000000..5cbe091881e8
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/rusersd.xinetd
@@ -0,0 +1,11 @@
+service rusersd
+{
+ type = rpc
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/libexec/rpc.rusersd
+ rpc_version = 1-2
+ disabled = yes
+}
diff --git a/sys-freebsd/freebsd-libexec/files/sprayd.xinetd b/sys-freebsd/freebsd-libexec/files/sprayd.xinetd
new file mode 100644
index 000000000000..7be55771ac22
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/sprayd.xinetd
@@ -0,0 +1,11 @@
+service sprayd
+{
+ type = rpc
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/libexec/rpc.sprayd
+ rpc_version = 1
+ disabled = yes
+}
diff --git a/sys-freebsd/freebsd-libexec/files/walld.xinetd b/sys-freebsd/freebsd-libexec/files/walld.xinetd
new file mode 100644
index 000000000000..800b84fa21e6
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/walld.xinetd
@@ -0,0 +1,11 @@
+service walld
+{
+ type = rpc
+ socket_type = dgram
+ protocol = udp
+ wait = yes
+ user = root
+ server = /usr/libexec/rpc.rwalld
+ rpc_version = 1
+ disabled = yes
+}
diff --git a/sys-freebsd/freebsd-libexec/freebsd-libexec-7.1.ebuild b/sys-freebsd/freebsd-libexec/freebsd-libexec-7.1.ebuild
new file mode 100644
index 000000000000..5a041d0af92d
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/freebsd-libexec-7.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/freebsd-libexec-7.1.ebuild,v 1.1 2009/01/22 21:02:22 the_paya Exp $
+
+inherit bsdmk freebsd pam
+
+DESCRIPTION="FreeBSD libexec things"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="pam ssl kerberos ipv6 nis xinetd"
+
+SRC_URI="mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+RDEPEND="${RDEPEND}
+ xinetd? ( sys-apps/xinetd )"
+
+S="${WORKDIR}/libexec"
+
+PATCHES="${FILESDIR}/${PN}-setXid.patch
+ ${FILESDIR}/${PN}-nossp.patch
+ ${FILESDIR}/${PN}-7.0-libfallback.patch"
+
+# Remove sendmail, tcp_wrapper and other useless stuff
+REMOVE_SUBDIRS="smrsh mail.local tcpd telnetd rshd rlogind lukemftpd ftpd"
+
+pkg_setup() {
+ use pam || mymakeopts="${mymakeopts} NO_PAM= "
+ use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NO_CRYPT= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use ipv6 || mymakeopts="${mymakeopts} NO_INET6= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+
+ mymakeopts="${mymakeopts} NO_SENDMAIL= NO_PF= "
+}
+
+src_unpack() {
+ freebsd_src_unpack
+
+ ln -s /usr/include "${WORKDIR}/include"
+}
+
+src_compile() {
+ NOSSP_FLAGS="$(test-flags -fno-stack-protector -fno-stack-protector-all)"
+ export NOSSP_FLAGS
+ freebsd_src_compile
+}
+
+src_install() {
+ freebsd_src_install
+
+ insinto /etc
+ doins "${WORKDIR}/etc/gettytab"
+ newinitd "${FILESDIR}/bootpd.initd" bootpd
+ newconfd "${FILESDIR}/bootpd.confd" bootpd
+
+ if use xinetd; then
+ for rpcd in rstatd rusersd walld rquotad sprayd; do
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}/${rpcd}.xinetd" ${rpcd}
+ done
+ fi
+}
diff --git a/sys-freebsd/freebsd-mk-defs/ChangeLog b/sys-freebsd/freebsd-mk-defs/ChangeLog
index 3e2ec02bd89d..055308e5f171 100644
--- a/sys-freebsd/freebsd-mk-defs/ChangeLog
+++ b/sys-freebsd/freebsd-mk-defs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-freebsd/freebsd-mk-defs
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-mk-defs/ChangeLog,v 1.31 2007/07/02 15:31:54 peper Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-mk-defs/ChangeLog,v 1.32 2009/01/22 21:03:11 the_paya Exp $
+
+*freebsd-mk-defs-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-mk-defs-7.1-gentoo.patch,
+ +files/freebsd-mk-defs-7.1-gnu.patch, +freebsd-mk-defs-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
02 Jul 2007; Piotr Jaroszyński <peper@gentoo.org>
freebsd-mk-defs-6.2.ebuild:
diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gentoo.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gentoo.patch
new file mode 100644
index 000000000000..39f84dea0de4
--- /dev/null
+++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gentoo.patch
@@ -0,0 +1,332 @@
+Index: share/mk/bsd.doc.mk
+===================================================================
+--- share.orig/mk/bsd.doc.mk
++++ share/mk/bsd.doc.mk
+@@ -137,10 +137,12 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${
+ realinstall:
+ .for _dev in ${PRINTERDEVICE:Mhtml}
+ cd ${SRCDIR}; \
++ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
+ .endfor
+ .for _dev in ${PRINTERDEVICE:Nhtml}
++ ${INSTALL} -d ${DESTDIR}${BINDIR}/${VOLUME}
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME}
+ .endfor
+Index: share/mk/bsd.files.mk
+===================================================================
+--- share.orig/mk/bsd.files.mk
++++ share/mk/bsd.files.mk
+@@ -39,6 +39,7 @@ ${group}NAME_${file:T}?= ${file:T}
+ .endif
+ installfiles: _${group}INS_${file:T}
+ _${group}INS_${file:T}: ${file}
++ ${INSTALL} -d ${DESTDIR}${${group}DIR_${.ALLSRC}}/${${group}NAME_${.ALLSRC:T}:H}
+ ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
+ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
+ ${.ALLSRC} \
+@@ -51,10 +52,12 @@ _${group}FILES+= ${file}
+ installfiles: _${group}INS
+ _${group}INS: ${_${group}FILES}
+ .if defined(${group}NAME)
++ ${INSTALL} -d ${DESTDIR}${${group}DIR}/${${group}NAME}
+ ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+ -m ${${group}MODE} ${.ALLSRC} \
+ ${DESTDIR}${${group}DIR}/${${group}NAME}
+ .else
++ ${INSTALL} -d ${DESTDIR}${${group}DIR}
+ ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} \
+ -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ .endif
+Index: share/mk/bsd.incs.mk
+===================================================================
+--- share.orig/mk/bsd.incs.mk
++++ share/mk/bsd.incs.mk
+@@ -41,6 +41,10 @@ ${group}NAME_${header:T}?= ${header:T}
+ .endif
+ installincludes: _${group}INS_${header:T}
+ _${group}INS_${header:T}: ${header}
++
++ ${INSTALL} -d -o ${${group}OWN_${.ALLSRC:T}} \
++ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
++ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
+ ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
+ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
+ ${.ALLSRC} \
+@@ -53,9 +57,11 @@ _${group}INCS+= ${header}
+ installincludes: _${group}INS
+ _${group}INS: ${_${group}INCS}
+ .if defined(${group}NAME)
++ ${INSTALL} -d ${DESTDIR}${${group}DIR}
+ ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
+ .else
++ ${INSTALL} -d ${DESTDIR}${${group}DIR}
+ ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ .endif
+Index: share/mk/bsd.info.mk
+===================================================================
+--- share.orig/mk/bsd.info.mk
++++ share/mk/bsd.info.mk
+@@ -83,6 +83,7 @@ INFO2HTML?= info2html
+ TEX?= tex
+ DVIPS?= dvips
+ DVIPS2ASCII?= dvips2ascii
++INSTALL?= install
+
+ .SUFFIXES: ${ICOMPRESS_EXT} .info .texi .texinfo .dvi .ps .latin1 .html
+
+@@ -144,12 +145,14 @@ ${x:S/$/${ICOMPRESS_EXT}/}: ${x}
+ INSTALLINFODIRS+= ${x:S/$/-install/}
+ ${x:S/$/-install/}:
+ .if !empty(.MAKEFLAGS:M-j)
++ ${INSTALL} -d ${DESTDIR}${INFODIR}/${INFODIRFILE}
+ lockf -k ${DESTDIR}${INFODIR}/${INFODIRFILE} \
+ ${INSTALLINFO} ${INSTALLINFOFLAGS} \
+ --defsection=${INFOSECTION} \
+ --defentry=${INFOENTRY_${x}} \
+ ${x}.info ${DESTDIR}${INFODIR}/${INFODIRFILE}
+ .else
++ ${INSTALL} -d ${DESTDIR}${INFODIR}/${INFODIRFILE}
+ ${INSTALLINFO} ${INSTALLINFOFLAGS} \
+ --defsection=${INFOSECTION} \
+ --defentry=${INFOENTRY_${x}} \
+Index: share/mk/bsd.lib.mk
+===================================================================
+--- share.orig/mk/bsd.lib.mk
++++ share/mk/bsd.lib.mk
+@@ -37,10 +37,6 @@ NO_WERROR=
+ CFLAGS+= ${DEBUG_FLAGS}
+ .endif
+
+-.if !defined(DEBUG_FLAGS)
+-STRIP?= -s
+-.endif
+-
+ .include <bsd.libnames.mk>
+
+ # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries
+@@ -236,14 +232,17 @@ realinstall: _libinstall
+ .ORDER: beforeinstall _libinstall
+ _libinstall:
+ .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
++ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
+ .endif
+ .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
++ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+ ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
+ .endif
+ .if defined(SHLIB_NAME)
++ ${INSTALL} -d ${DESTDIR}${SHLIBDIR}
+ ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
+ ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
+Index: share/mk/bsd.libnames.mk
+===================================================================
+--- share.orig/mk/bsd.libnames.mk
++++ share/mk/bsd.libnames.mk
+@@ -41,7 +41,7 @@ LIBDISK?= ${DESTDIR}${LIBDIR}/libdisk.a
+ LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a
+ LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a
+ LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a
+-LIBFL?= "don't use LIBFL, use LIBL"
++LIBFL?= ${DESTDIR}${LIBDOR}/libfl.a
+ LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a
+ LIBFTPIO?= ${DESTDIR}${LIBDIR}/libftpio.a
+ LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a
+@@ -68,7 +68,7 @@ LIBKEYCAP?= ${DESTDIR}${LIBDIR}/libkeyca
+ LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a
+ LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a
+ LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a
+-LIBL?= ${DESTDIR}${LIBDIR}/libl.a
++LIBL?= ${DESTDIR}${LIBDOR}/libfl.a
+ LIBLN?= "don't use LIBLN, use LIBL"
+ .if ${MK_BIND} != "no"
+ LIBLWRES?= ${DESTDIR}${LIBDIR}/liblwres.a
+Index: share/mk/bsd.man.mk
+===================================================================
+--- share.orig/mk/bsd.man.mk
++++ share/mk/bsd.man.mk
+@@ -165,9 +165,11 @@ _maninstall: ${MAN}
+ .if defined(NO_MANCOMPRESS)
+ .if defined(MANFILTER)
+ .for __page in ${MAN}
++ ${INSTALL} -d ${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}/${page}
+ ${MINSTALL} ${__page:T:S/$/${FILTEXTENSION}/g} \
+ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/${__page}
+ .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
++ ${INSTALL} -d ${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}/${page}
+ ${MINSTALL} ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \
+ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page}
+ .endif
+@@ -181,11 +183,14 @@ _maninstall: ${MAN}
+ esac; \
+ page=$$1; shift; sect=$$1; shift; \
+ d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \
++ ${ECHO} ${INSTALL} -d $${d}; \
++ ${INSTALL} -d $${d}; \
+ ${ECHO} ${MINSTALL} $${page} $${d}; \
+ ${MINSTALL} $${page} $${d}; \
+ done
+ .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
+ .for __page in ${MAN}
++ ${INSTALL} -d ${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page:T}
+ ${MINSTALL} ${__page:T:S/$/${CATEXT}/} \
+ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T}
+ .endfor
+@@ -193,9 +198,11 @@ _maninstall: ${MAN}
+ .endif
+ .else
+ .for __page in ${MAN}
++ ${INSTALL} -d ${DESTDIR}${MANDIR}${page:E}${MANSUBDIR}
+ ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \
+ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}
+ .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
++ ${INSTALL} -d ${DESTDIR}${CATDIR}${page:E}${MANSUBDIR}/${page:T:S/$/${MCOMPRESS_EXT}/}
+ ${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \
+ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/}
+ .endif
+Index: share/mk/bsd.prog.mk
+===================================================================
+--- share.orig/mk/bsd.prog.mk
++++ share/mk/bsd.prog.mk
+@@ -23,10 +23,6 @@ CFLAGS+=${DEBUG_FLAGS}
+ CFLAGS+=${CRUNCH_CFLAGS}
+ .endif
+
+-.if !defined(DEBUG_FLAGS)
+-STRIP?= -s
+-.endif
+-
+ .if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")
+ LDFLAGS+= -static
+ .endif
+@@ -142,9 +138,11 @@ realinstall: _proginstall
+ _proginstall:
+ .if defined(PROG)
+ .if defined(PROGNAME)
++ ${INSTALL} -d ${DESTDIR}${BINDIR}
+ ${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROGNAME}
+ .else
++ ${INSTALL} -d ${DESTDIR}${BINDIR}
+ ${INSTALL} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
+ .endif
+@@ -172,6 +170,7 @@ SCRIPTSGRP_${script:T}?= ${SCRIPTSGRP}
+ SCRIPTSMODE_${script:T}?= ${SCRIPTSMODE}
+ _scriptsinstall: _SCRIPTSINS_${script:T}
+ _SCRIPTSINS_${script:T}: ${script}
++ ${INSTALL} -d ${DESTDIR}${SCRIPTSDIR_${.ALLSRC:T}}
+ ${INSTALL} -o ${SCRIPTSOWN_${.ALLSRC:T}} \
+ -g ${SCRIPTSGRP_${.ALLSRC:T}} -m ${SCRIPTSMODE_${.ALLSRC:T}} \
+ ${.ALLSRC} \
+Index: share/mk/bsd.sys.mk
+===================================================================
+--- share.orig/mk/bsd.sys.mk
++++ share/mk/bsd.sys.mk
+@@ -30,9 +30,6 @@ CFLAGS += -std=${CSTD}
+ . if defined(WARNS)
+ . if ${WARNS} >= 1
+ CWARNFLAGS += -Wsystem-headers
+-. if !defined(NO_WERROR)
+-CWARNFLAGS += -Werror
+-. endif
+ . endif
+ . if ${WARNS} >= 2
+ CWARNFLAGS += -Wall -Wno-format-y2k
+@@ -66,9 +63,6 @@ WFORMAT = 1
+ . if ${WFORMAT} > 0
+ #CWARNFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args
+ CWARNFLAGS += -Wformat=2 -Wno-format-extra-args
+-. if !defined(NO_WERROR)
+-CWARNFLAGS += -Werror
+-. endif
+ . endif
+ . endif
+ .endif
+Index: share/mk/sys.mk
+===================================================================
+--- share.orig/mk/sys.mk
++++ share/mk/sys.mk
+@@ -34,11 +34,11 @@
+ CC ?= c89
+ CFLAGS ?= -O
+ .else
+-CC ?= cc
++CC ?= gcc
+ .if ${MACHINE_ARCH} == "arm"
+-CFLAGS ?= -O -fno-strict-aliasing -pipe
++CFLAGS ?= -pipe
+ .else
+-CFLAGS ?= -O2 -fno-strict-aliasing -pipe
++CFLAGS ?= -pipe
+ .endif
+ .endif
+
+@@ -61,7 +61,7 @@
+ .endif
+ .endif
+
+-CXX ?= c++
++CXX ?= g++
+ CXXFLAGS ?= ${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes:N-Wno-pointer-sign}
+
+ CPP ?= cpp
+@@ -254,12 +254,6 @@ YFLAGS ?= -d
+ ${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET}
+ rm -f ${.PREFIX}.tmp.c
+
+-# FreeBSD build pollution. Hide it in the non-POSIX part of the ifdef.
+-__MAKE_CONF?=/etc/make.conf
+-.if exists(${__MAKE_CONF})
+-.include "${__MAKE_CONF}"
+-.endif
+-
+ # Default executable format
+ # XXX hint for bsd.port.mk
+ OBJFORMAT?= elf
+Index: share/mk/bsd.links.mk
+===================================================================
+--- share.orig/mk/bsd.links.mk
++++ share/mk/bsd.links.mk
+@@ -15,6 +15,8 @@ _installlinks:
+ t=${DESTDIR}$$1; \
+ shift; \
+ ${ECHO} $$t -\> $$l; \
++ d=`dirname $$t`; \
++ test -d $$d || mkdir $$d; \
+ ln -f $$l $$t; \
+ done; true
+ .endif
+@@ -26,6 +28,8 @@ _installlinks:
+ t=${DESTDIR}$$1; \
+ shift; \
+ ${ECHO} $$t -\> $$l; \
++ d=`dirname $$t`; \
++ test -d $$d || mkdir $$d; \
+ ln -fs $$l $$t; \
+ done; true
+ .endif
+Index: share/mk/bsd.own.mk
+===================================================================
+--- share.orig/mk/bsd.own.mk
++++ share/mk/bsd.own.mk
+@@ -166,11 +166,6 @@ DEFAULT_THREAD_LIB?= libthr
+
+ INCLUDEDIR?= /usr/include
+
+-# Common variables
+-.if !defined(DEBUG_FLAGS)
+-STRIP?= -s
+-.endif
+-
+ COMPRESS_CMD?= gzip -cn
+ COMPRESS_EXT?= .gz
+
diff --git a/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gnu.patch b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gnu.patch
new file mode 100644
index 000000000000..54747c835809
--- /dev/null
+++ b/sys-freebsd/freebsd-mk-defs/files/freebsd-mk-defs-7.1-gnu.patch
@@ -0,0 +1,121 @@
+Index: mk/bsd.incs.mk
+===================================================================
+--- mk.orig/bsd.incs.mk
++++ mk/bsd.incs.mk
+@@ -45,7 +45,7 @@ _${group}INS_${header:T}: ${header}
+ ${INSTALL} -d -o ${${group}OWN_${.ALLSRC:T}} \
+ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
+ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
+- ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \
++ ${INSTALL} -o ${${group}OWN_${.ALLSRC:T}} \
+ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \
+ ${.ALLSRC} \
+ ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}}
+@@ -58,11 +58,11 @@ installincludes: _${group}INS
+ _${group}INS: ${_${group}INCS}
+ .if defined(${group}NAME)
+ ${INSTALL} -d ${DESTDIR}${${group}DIR}
+- ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
++ ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME}
+ .else
+ ${INSTALL} -d ${DESTDIR}${${group}DIR}
+- ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
++ ${INSTALL} -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \
+ ${.ALLSRC} ${DESTDIR}${${group}DIR}
+ .endif
+ .endif
+Index: mk/bsd.lib.mk
+===================================================================
+--- mk.orig/bsd.lib.mk
++++ mk/bsd.lib.mk
+@@ -119,11 +119,7 @@ _LIBS= lib${LIB}.a
+ lib${LIB}.a: ${OBJS} ${STATICOBJS}
+ @${ECHO} building static ${LIB} library
+ @rm -f ${.TARGET}
+-.if !defined(NM)
+- @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
+-.else
+- @${AR} cq ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
+-.endif
++ @${AR} cq ${.TARGET} ${OBJS} ${STATICOBJS} ${ARADD}
+ ${RANLIB} ${.TARGET}
+ .endif
+
+@@ -136,11 +132,7 @@ POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=
+ lib${LIB}_p.a: ${POBJS}
+ @${ECHO} building profiled ${LIB} library
+ @rm -f ${.TARGET}
+-.if !defined(NM)
+- @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
+-.else
+- @${AR} cq ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD}
+-.endif
++ @${AR} cq ${.TARGET} ${POBJS} ${ARADD}
+ ${RANLIB} ${.TARGET}
+ .endif
+
+@@ -195,15 +195,9 @@
+ .if defined(SHLIB_LINK)
+ @ln -fs ${.TARGET} ${SHLIB_LINK}
+ .endif
+-.if !defined(NM)
+ @${CC} ${LDFLAGS} -shared -Wl,-x \
+ -o ${.TARGET} -Wl,-soname,${SONAME} \
+- `lorder ${SOBJS} | tsort -q` ${LDADD}
+-.else
+- @${CC} ${LDFLAGS} -shared -Wl,-x \
+- -o ${.TARGET} -Wl,-soname,${SONAME} \
+- `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
+-.endif
++ `echo ${SOBJS} | xargs -n 1 echo | sort -u` ${LDADD}
+ .if defined(CTFMERGE)
+ ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
+ .endif
+@@ -211,13 +197,6 @@ _EXTRADEPEND:
+
+ .if !target(install)
+
+-.if defined(PRECIOUSLIB)
+-.if !defined(NO_FSCHG)
+-SHLINSTALLFLAGS+= -fschg
+-.endif
+-SHLINSTALLFLAGS+= -S
+-.endif
+-
+ _INSTALLFLAGS:= ${INSTALLFLAGS}
+ .for ie in ${INSTALLFLAGS_EDIT}
+ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
+@@ -233,12 +212,12 @@ realinstall: _libinstall
+ _libinstall:
+ .if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
+ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+- ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
++ ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
+ .endif
+ .if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB)
+ ${INSTALL} -d ${DESTDIR}${LIBDIR}
+- ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
++ ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
+ ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
+ .endif
+ .if defined(SHLIB_NAME)
+Index: mk/bsd.prog.mk
+===================================================================
+--- mk.orig/bsd.prog.mk
++++ mk/bsd.prog.mk
+@@ -120,13 +120,6 @@ _EXTRADEPEND:
+
+ .if !target(install)
+
+-.if defined(PRECIOUSPROG)
+-.if !defined(NO_FSCHG)
+-INSTALLFLAGS+= -fschg
+-.endif
+-INSTALLFLAGS+= -S
+-.endif
+-
+ _INSTALLFLAGS:= ${INSTALLFLAGS}
+ .for ie in ${INSTALLFLAGS_EDIT}
+ _INSTALLFLAGS:= ${_INSTALLFLAGS${ie}}
diff --git a/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-7.1.ebuild b/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-7.1.ebuild
new file mode 100644
index 000000000000..27f542b29b56
--- /dev/null
+++ b/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-7.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-mk-defs/freebsd-mk-defs-7.1.ebuild,v 1.1 2009/01/22 21:03:11 the_paya Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="Makefiles definitions used for building and installing libraries and system files"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc-fbsd ~x86 ~x86-fbsd"
+
+IUSE=""
+
+SRC_URI="mirror://gentoo/${SHARE}.tar.bz2"
+
+RDEPEND=""
+DEPEND=""
+
+RESTRICT="strip"
+
+S="${WORKDIR}/share/mk"
+
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-7.1-gentoo.patch"
+
+ [[ ${CHOST} != *-*bsd* || ${CHOST} == *-gnu ]] && \
+ epatch "${FILESDIR}/${PN}-7.1-gnu.patch"
+}
+
+src_compile() { :; }
+
+src_install() {
+ if [[ ${CHOST} != *-freebsd* ]]; then
+ insinto /usr/share/mk/freebsd
+ else
+ insinto /usr/share/mk
+ fi
+ doins *.mk *.awk
+}
diff --git a/sys-freebsd/freebsd-pam-modules/ChangeLog b/sys-freebsd/freebsd-pam-modules/ChangeLog
index c27290ce7cc3..36bcf3942ecb 100644
--- a/sys-freebsd/freebsd-pam-modules/ChangeLog
+++ b/sys-freebsd/freebsd-pam-modules/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-pam-modules
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/ChangeLog,v 1.22 2009/01/08 21:21:41 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/ChangeLog,v 1.23 2009/01/22 21:03:18 the_paya Exp $
+
+*freebsd-pam-modules-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/README.pamd, +freebsd-pam-modules-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
08 Jan 2009; Alexis Ballier <aballier@gentoo.org>
-freebsd-pam-modules-6.2.ebuild:
diff --git a/sys-freebsd/freebsd-pam-modules/files/README.pamd b/sys-freebsd/freebsd-pam-modules/files/README.pamd
new file mode 100644
index 000000000000..64e716c41ca4
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/files/README.pamd
@@ -0,0 +1,63 @@
+/etc/pam.d
+
+This directory contains configuration files for the Pluggable
+Authentication Modules (PAM) library.
+
+Each file details the module chain for a single service, and must be
+named after that service. If no configuration file is found for a
+particular service, the /etc/pam.d/other is used instead. If that
+file does not exist, /etc/pam.conf is searched for entries matching
+the specified service or, failing that, the "other" service.
+
+See the pam(8) manual page for an explanation of the workings of the
+PAM library and descriptions of the various files and modules. Below
+is a summary of the format for the pam.conf and /etc/pam.d/* files.
+
+Configuration lines take the following form:
+
+module-type control-flag module-path arguments
+
+Comments are introduced with a hash mark ('#'). Blank lines and lines
+consisting entirely of comments are ignored.
+
+The meanings of the different fields are as follows:
+
+ module-type:
+ auth: prompt for a password to authenticate that the user is
+ who they say they are, and set any credentials.
+ account: non-authentication based authorization, based on time,
+ resources, etc.
+ session: housekeeping before and/or after login.
+ password: update authentication tokens.
+
+ control-flag: How libpam handles success or failure of the module.
+ required: success is required; on failure all remaining
+ modules are run, but the request will be denied.
+ requisite: success is required, and on failure no remaining
+ modules are run.
+ sufficient: success is sufficient, and if no previous required
+ module failed, no remaining modules are run.
+ binding: success is sufficient; on failure all remaining
+ modules are run, but the request will be denied.
+ optional: ignored unless the other modules return PAM_IGNORE.
+
+ arguments: Module-specific options, plus some generic ones:
+ debug: syslog debug info.
+ no_warn: return no warning messages to the application.
+ Remove this to feed back to the user the
+ reason(s) they are being rejected.
+ use_first_pass: try authentication using password from the
+ preceding auth module.
+ try_first_pass: first try authentication using password from
+ the preceding auth module, and if that fails
+ prompt for a new password.
+ use_mapped_pass: convert cleartext password to a crypto key.
+ expose_account: allow printing more info about the user when
+ prompting.
+
+Note that having a "sufficient" module as the last entry for a
+particular service and module type may result in surprising behaviour.
+To get the intended semantics, add a "required" entry listing the
+pam_deny module at the end of the chain.
+
+$Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/files/README.pamd,v 1.1 2009/01/22 21:03:18 the_paya Exp $
diff --git a/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-7.1.ebuild b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-7.1.ebuild
new file mode 100644
index 000000000000..5de90bdbe74c
--- /dev/null
+++ b/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-7.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pam-modules/freebsd-pam-modules-7.1.ebuild,v 1.1 2009/01/22 21:03:18 the_paya Exp $
+
+inherit bsdmk freebsd multilib pam
+
+DESCRIPTION="FreeBSD's PAM authentication modules"
+SLOT="0"
+KEYWORDS="~x86-fbsd ~sparc-fbsd"
+
+IUSE="kerberos nis"
+
+SRC_URI="mirror://gentoo/${LIB}.tar.bz2"
+
+RDEPEND=">=sys-auth/openpam-20050201-r1
+ kerberos? ( dev-libs/openssl
+ virtual/krb5 )"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S=${WORKDIR}/lib/libpam/modules
+
+pkg_setup() {
+ # Avoid installing pam_ssh as that has its own ebuild.
+ mymakeopts="${mymakeopts} NO_OPENSSH= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+}
+
+src_unpack() {
+ unpack ${A}
+
+ cd "${WORKDIR}"/lib
+
+ for module in pam_deny pam_passwdqc pam_permit; do
+ sed -i -e "s:${module}::" "${S}"/modules.inc
+ done
+
+ # Avoid using static versions; use gentoo /lib/security dir
+ epatch "${FILESDIR}"/${PN}-6.0-gentoo.patch
+}
+
+src_install() {
+ mkinstall "LIBDIR=/$(get_libdir)/security" || die "install failed"
+
+ dodoc "${FILESDIR}/README.pamd"
+}
diff --git a/sys-freebsd/freebsd-pf/ChangeLog b/sys-freebsd/freebsd-pf/ChangeLog
index 26aa6565a83d..3d1e0b94b1c0 100644
--- a/sys-freebsd/freebsd-pf/ChangeLog
+++ b/sys-freebsd/freebsd-pf/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-freebsd/freebsd-pf
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/ChangeLog,v 1.24 2007/04/06 14:55:27 uberlord Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/ChangeLog,v 1.25 2009/01/22 21:03:51 the_paya Exp $
+
+*freebsd-pf-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-pf-7.0-libevent.patch,
+ +files/freebsd-pf-7.0-pcap_pollution.patch, files/pf.confd,
+ +freebsd-pf-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
*freebsd-pf-6.2-r1 (06 Apr 2007)
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-libevent.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-libevent.patch
new file mode 100644
index 000000000000..1425db24d975
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-libevent.patch
@@ -0,0 +1,12 @@
+--- usr.sbin/ftp-proxy/ftp-proxy/Makefile.orig 2008-06-14 00:01:52 -0300
++++ usr.sbin/ftp-proxy/ftp-proxy/Makefile 2008-06-14 00:03:19 -0300
+@@ -10,8 +10,7 @@
+ CFLAGS+= -I${.CURDIR}/../../../contrib/pf/libevent
+ CFLAGS+= -I${.CURDIR}/../../../sys/contrib/pf
+
+-DPADD= ${LIBEVENT}
+-LDADD= ${LIBEVENT}
++LDADD= -levent
+
+ WARNS?= 2
+
diff --git a/sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-pcap_pollution.patch b/sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-pcap_pollution.patch
new file mode 100644
index 000000000000..4a7c2e9a0e46
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/freebsd-pf-7.0-pcap_pollution.patch
@@ -0,0 +1,18 @@
+--- contrib/pf/pflogd/privsep.c.orig 2007-07-03 09:30:02 -0300
++++ contrib/pf/pflogd/privsep.c 2008-06-13 23:55:39 -0300
+@@ -31,13 +31,14 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <limits.h>
++#include <stdio.h>
++#define HAVE_SNPRINTF
+ #ifndef __FreeBSD__
+ #include <pcap.h>
+ #include <pcap-int.h>
+ #endif
+ #include <pwd.h>
+ #include <signal.h>
+-#include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #ifdef __FreeBSD__
diff --git a/sys-freebsd/freebsd-pf/files/pf.confd b/sys-freebsd/freebsd-pf/files/pf.confd
index 41c2fb9e5ba9..87c21b281e2b 100644
--- a/sys-freebsd/freebsd-pf/files/pf.confd
+++ b/sys-freebsd/freebsd-pf/files/pf.confd
@@ -1,10 +1,9 @@
# Copyright 2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/files/pf.confd,v 1.1 2006/04/14 15:26:29 flameeyes Exp $
# Defines where the rules file is found, by default /etc/pf.conf
-PF_RULES_FILE=/etc/pf.conf
+# pf_conf=/etc/pf.conf
# Extra options to pass to pfctl when loading the rules
# See pfctl(8)
-# PF_OPTS=
+# pf_args=
diff --git a/sys-freebsd/freebsd-pf/freebsd-pf-7.1.ebuild b/sys-freebsd/freebsd-pf/freebsd-pf-7.1.ebuild
new file mode 100644
index 000000000000..92d219f97d2f
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/freebsd-pf-7.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/freebsd-pf-7.1.ebuild,v 1.1 2009/01/22 21:03:51 the_paya Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD's base system libraries"
+SLOT="0"
+KEYWORDS="~x86-fbsd"
+
+IUSE=""
+
+# Crypto is needed to have an internal OpenSSL header
+SRC_URI="mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}
+ dev-libs/libevent
+ sys-freebsd/freebsd-mk-defs
+ =sys-freebsd/freebsd-sources-${RV}*"
+
+S="${WORKDIR}"
+
+SUBDIRS="usr.sbin/authpf sbin/pfctl sbin/pflogd usr.sbin/ftp-proxy/ftp-proxy"
+
+pkg_setup() {
+ enewgroup authpf 63
+ mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
+}
+
+src_unpack() {
+ freebsd_src_unpack
+ # pcap-int.h redefines snprintf as pcap_snprintf
+ epatch "${FILESDIR}/${PN}-7.0-pcap_pollution.patch"
+ # Use system's libevent
+ epatch "${FILESDIR}/${PN}-7.0-libevent.patch"
+ # Link in kernel sources
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+}
+
+src_compile() {
+ for dir in ${SUBDIRS}; do
+ einfo "Starting make in ${dir}"
+ cd "${S}/${dir}"
+ mkmake || die "Make ${dir} failed"
+ done
+}
+
+src_install() {
+ for dir in ${SUBDIRS}; do
+ einfo "Starting install in ${dir}"
+ cd "${S}/${dir}"
+ mkinstall || die "Install ${dir} failed"
+ done
+
+ cd "${WORKDIR}"/etc
+ insinto /etc
+ doins pf.os
+ newdoc pf.conf pf.conf.example
+ # pf.initd provided by openrc, but no pf.confd
+ newconfd "${FILESDIR}/pf.confd" pf
+}
diff --git a/sys-freebsd/freebsd-rescue/ChangeLog b/sys-freebsd/freebsd-rescue/ChangeLog
index 60beddbe8fc7..58e4d2bd792f 100644
--- a/sys-freebsd/freebsd-rescue/ChangeLog
+++ b/sys-freebsd/freebsd-rescue/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-rescue
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-rescue/ChangeLog,v 1.17 2007/01/15 21:38:18 drizzt Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-rescue/ChangeLog,v 1.18 2009/01/22 21:04:01 the_paya Exp $
+
+*freebsd-rescue-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-rescue-7.1-zlib.patch, +freebsd-rescue-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
*freebsd-rescue-6.2 (15 Jan 2007)
diff --git a/sys-freebsd/freebsd-rescue/files/freebsd-rescue-7.1-zlib.patch b/sys-freebsd/freebsd-rescue/files/freebsd-rescue-7.1-zlib.patch
new file mode 100644
index 000000000000..22fb2ec62d4f
--- /dev/null
+++ b/sys-freebsd/freebsd-rescue/files/freebsd-rescue-7.1-zlib.patch
@@ -0,0 +1,21 @@
+diff -ur sbin/savecore/savecore.c sbin-zlib/savecore/savecore.c
+--- sbin/savecore/savecore.c 2005-02-26 01:21:50 +0000
++++ sbin-zlib/savecore/savecore.c 2005-05-06 12:00:06 +0000
+@@ -95,7 +95,7 @@
+ static int checkfor, compress, clear, force, keep, verbose; /* flags */
+ static int nfound, nsaved, nerr; /* statistics */
+
+-extern FILE *zopen(const char *, const char *);
++extern FILE *gzopen(const char *, const char *);
+
+ static void
+ printheader(FILE *f, const struct kerneldumpheader *h, const char *device,
+@@ -553,7 +553,7 @@
+ if (compress) {
+ sprintf(filename, "%s.%d.gz", istextdump ? "textdump.tar" :
+ "vmcore", bounds);
+- fp = zopen(filename, "w");
++ fp = gzopen(filename, "w");
+ } else {
+ sprintf(filename, "%s.%d", istextdump ? "textdump.tar" :
+ "vmcore", bounds);
diff --git a/sys-freebsd/freebsd-rescue/freebsd-rescue-7.1.ebuild b/sys-freebsd/freebsd-rescue/freebsd-rescue-7.1.ebuild
new file mode 100644
index 000000000000..8469259628e4
--- /dev/null
+++ b/sys-freebsd/freebsd-rescue/freebsd-rescue-7.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-rescue/freebsd-rescue-7.1.ebuild,v 1.1 2009/01/22 21:04:01 the_paya Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD's rescue binaries"
+SLOT="0"
+KEYWORDS="~x86-fbsd"
+
+IUSE="atm nis"
+
+SRC_URI="mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${GNU}.tar.bz2
+ mirror://gentoo/${SYS}.tar.bz2
+ mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${RESCUE}.tar.bz2"
+
+RDEPEND=""
+DEPEND="sys-devel/flex
+ =sys-freebsd/freebsd-sources-${RV}*
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+S="${WORKDIR}/rescue"
+
+pkg_setup() {
+ use atm || mymakeopts="${mymakeopts} NO_ATM= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+
+ for flag in atm nis; do
+ if use ${flag} && ! built_with_use sys-libs/freebsd-lib ${flag}; then
+ die "You can't add ${flag} support here without adding it to sys-libs/freebsd-lib"
+ fi
+ done
+
+# append-flags -fno-stack-protector -fno-stack-protector-all
+}
+
+src_unpack() {
+ freebsd_src_unpack
+
+ # As they are patches from ${WORKDIR} apply them by hand
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}/${PN}"-5.4-gentoo.patch
+ epatch "${FILESDIR}/${PN}"-7.1-zlib.patch
+}
diff --git a/sys-freebsd/freebsd-sbin/ChangeLog b/sys-freebsd/freebsd-sbin/ChangeLog
index 34ce848e1b41..c847ff247f7a 100644
--- a/sys-freebsd/freebsd-sbin/ChangeLog
+++ b/sys-freebsd/freebsd-sbin/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-freebsd/freebsd-sbin
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/ChangeLog,v 1.46 2009/01/08 20:02:49 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/ChangeLog,v 1.47 2009/01/22 21:04:48 the_paya Exp $
+
+*freebsd-sbin-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-sbin-7.1-zlib.patch, +files/idmapd.initd,
+ +freebsd-sbin-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
08 Jan 2009; Alexis Ballier <aballier@gentoo.org>
freebsd-sbin-6.2-r2.ebuild:
diff --git a/sys-freebsd/freebsd-sbin/files/freebsd-sbin-7.1-zlib.patch b/sys-freebsd/freebsd-sbin/files/freebsd-sbin-7.1-zlib.patch
new file mode 100644
index 000000000000..22fb2ec62d4f
--- /dev/null
+++ b/sys-freebsd/freebsd-sbin/files/freebsd-sbin-7.1-zlib.patch
@@ -0,0 +1,21 @@
+diff -ur sbin/savecore/savecore.c sbin-zlib/savecore/savecore.c
+--- sbin/savecore/savecore.c 2005-02-26 01:21:50 +0000
++++ sbin-zlib/savecore/savecore.c 2005-05-06 12:00:06 +0000
+@@ -95,7 +95,7 @@
+ static int checkfor, compress, clear, force, keep, verbose; /* flags */
+ static int nfound, nsaved, nerr; /* statistics */
+
+-extern FILE *zopen(const char *, const char *);
++extern FILE *gzopen(const char *, const char *);
+
+ static void
+ printheader(FILE *f, const struct kerneldumpheader *h, const char *device,
+@@ -553,7 +553,7 @@
+ if (compress) {
+ sprintf(filename, "%s.%d.gz", istextdump ? "textdump.tar" :
+ "vmcore", bounds);
+- fp = zopen(filename, "w");
++ fp = gzopen(filename, "w");
+ } else {
+ sprintf(filename, "%s.%d", istextdump ? "textdump.tar" :
+ "vmcore", bounds);
diff --git a/sys-freebsd/freebsd-sbin/files/idmapd.initd b/sys-freebsd/freebsd-sbin/files/idmapd.initd
new file mode 100755
index 000000000000..407b0e87f85d
--- /dev/null
+++ b/sys-freebsd/freebsd-sbin/files/idmapd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need rpcbind
+}
+
+start() {
+ ebegin "Starting NFS idmapd"
+ start-stop-daemon --start --quiet --exec \
+ /sbin/idmapd -- $idmapdopts
+ eend $? "Error starting NFS idmapd"
+}
+
+stop() {
+ ebegin "Stopping NFS idmapd"
+ start-stop-daemon --stop --quiet --exec /sbin/idmapd
+ eend $? "Error stopping NFS idmapd"
+}
diff --git a/sys-freebsd/freebsd-sbin/freebsd-sbin-7.1.ebuild b/sys-freebsd/freebsd-sbin/freebsd-sbin-7.1.ebuild
new file mode 100644
index 000000000000..529cbbc813d6
--- /dev/null
+++ b/sys-freebsd/freebsd-sbin/freebsd-sbin-7.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/freebsd-sbin-7.1.ebuild,v 1.1 2009/01/22 21:04:48 the_paya Exp $
+
+inherit flag-o-matic bsdmk freebsd
+
+DESCRIPTION="FreeBSD sbin utils"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+SLOT="0"
+
+SRC_URI="mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${LIBEXEC}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ build? ( mirror://gentoo/${SYS}.tar.bz2 )"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ =sys-freebsd/freebsd-libexec-${RV}*
+ ssl? ( dev-libs/openssl )
+ dev-libs/libedit
+ sys-libs/readline
+ sys-process/vixie-cron"
+DEPEND="${RDEPEND}
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+PROVIDE="virtual/dev-manager"
+
+S="${WORKDIR}/sbin"
+
+IUSE="atm ipfilter ipv6 vinum suid ssl build"
+
+pkg_setup() {
+ use atm || mymakeopts="${mymakeopts} NO_ATM= "
+ use ipfilter || mymakeopts="${mymakeopts} NO_IPFILTER= "
+ use ipv6 || mymakeopts="${mymakeopts} NO_INET6= "
+ use vinum || mymakeopts="${mymakeopts} NO_VINUM= "
+ use suid || mymakeopts="${mymakeopts} NO_SUID= "
+
+ # O3 breaks this, apparently
+ replace-flags -O3 -O2
+}
+
+REMOVE_SUBDIRS="dhclient pfctl pflogd rcorder"
+
+PATCHES="${FILESDIR}/${PN}-setXid.patch
+ ${FILESDIR}/${PN}-7.1-zlib.patch
+ ${FILESDIR}/${PN}-6.2-ldconfig.patch
+ ${FILESDIR}/${PN}-6.1-pr102701.patch"
+
+src_unpack() {
+ freebsd_src_unpack
+ use build || ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+}
+
+src_install() {
+ freebsd_src_install
+ keepdir /var/log
+ # Needed by ldconfig:
+ keepdir /var/run
+
+ # Allow users to use ping and other commands
+ dodir /bin
+ mv "${D}/sbin/ping" "${D}/bin/" || die "mv failed"
+
+ # ext2fs can mount ext3, you just don't get the journalling
+ dosym mount_ext2fs sbin/mount_ext3
+
+ # Do we need pccard.conf if we have devd?
+ # Maybe ship our own sysctl.conf so things like radvd work out of the box.
+ cd "${WORKDIR}/etc/"
+ insinto /etc
+ doins defaults/pccard.conf minfree sysctl.conf
+
+ # initd script for idmapd
+ newinitd "${FILESDIR}/idmapd.initd" idmapd
+
+ # Install a crontab for adjkerntz
+ insinto /etc/cron.d
+ newins "${FILESDIR}/adjkerntz-crontab" adjkerntz
+
+ # Install the periodic stuff (needs probably to be ported in a more
+ # gentooish way)
+ cd "${WORKDIR}/etc/periodic"
+
+ doperiodic security \
+ security/*.ipfwlimit \
+ security/*.ip6fwlimit \
+ security/*.ip6fwdenied \
+ security/*.ipfwdenied
+
+ use ipfilter && doperiodic security \
+ security/*.ipf6denied \
+ security/*.ipfdenied
+}
diff --git a/sys-freebsd/freebsd-share/ChangeLog b/sys-freebsd/freebsd-share/ChangeLog
index 861d997efe88..d84cdcec7925 100644
--- a/sys-freebsd/freebsd-share/ChangeLog
+++ b/sys-freebsd/freebsd-share/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-share
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-share/ChangeLog,v 1.30 2009/01/08 21:07:29 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-share/ChangeLog,v 1.31 2009/01/22 21:04:57 the_paya Exp $
+
+*freebsd-share-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +freebsd-share-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
08 Jan 2009; Alexis Ballier <aballier@gentoo.org>
freebsd-share-6.2.ebuild:
diff --git a/sys-freebsd/freebsd-share/freebsd-share-7.1.ebuild b/sys-freebsd/freebsd-share/freebsd-share-7.1.ebuild
new file mode 100644
index 000000000000..47ced7c4743a
--- /dev/null
+++ b/sys-freebsd/freebsd-share/freebsd-share-7.1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-share/freebsd-share-7.1.ebuild,v 1.1 2009/01/22 21:04:57 the_paya Exp $
+
+inherit bsdmk freebsd
+
+DESCRIPTION="FreeBSD shared tools/files"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="doc isdn"
+
+SRC_URI="mirror://gentoo/${SHARE}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${GNU}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${USBIN}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2"
+
+DEPEND="=sys-freebsd/freebsd-mk-defs-${RV}*"
+RDEPEND=""
+
+RESTRICT="strip"
+
+S="${WORKDIR}/share"
+
+pkg_setup() {
+ use isdn || mymakeopts="${mymakeopts} NO_I4B= "
+ use doc || mymakeopts="${mymakeopts} NO_SHAREDOCS= "
+
+ mymakeopts="${mymakeopts} NO_SENDMAIL= NO_MANCOMPRESS= NO_INFOCOMPRESS= "
+}
+
+REMOVE_SUBDIRS="mk termcap zoneinfo tabset"
+
+PATCHES="${FILESDIR}/${PN}-5.3-doc-locations.patch
+ ${FILESDIR}/${PN}-5.4-gentoo-skel.patch"
+
+src_unpack() {
+ freebsd_src_unpack
+
+ # Remove make.conf manpage as it describes bsdmk's make.conf.
+ sed -i -e 's:make.conf.5::' "${S}/man/man5/Makefile"
+ # Remove mailer.conf manpage
+ sed -i -e 's:mailer.conf.5::' "${S}/man/man5/Makefile"
+ # Remove pbm and moduli(ssh) manpages
+ sed -i -e 's:pbm.5::' -e 's:moduli.5::' "${S}/man/man5/Makefile"
+ # Remove builtins manpage
+ sed -i -e '/builtins\.1/d' "${S}/man/man1/Makefile"
+ # Remove rc manpages
+ sed -i -e '/rc.8/d' "${S}/man/man8/Makefile"
+
+ # Don't install the arch-specific directories in subdirectories
+ sed -i -e '/MANSUBDIR/d' "${S}"/man/man4/man4.{i386,sparc64}/Makefile
+
+ # Remove them so that they can't be included by error
+ rm -rf "${S}"/mk/*.mk
+
+ # Make proper symlinks by defining the full target.
+ local sdir
+ for sdir in colldef mklocale monetdef msgdef numericdef timedef
+ do
+ sed -e 's:\${enc2}$:\${enc2}/\${FILESNAME}:g' -i \
+ "${S}/${sdir}/Makefile" || \
+ die "Error fixing ${sdir}/Makefile"
+ done
+}
+
+src_compile() {
+ export ESED="/usr/bin/sed"
+
+ # This is a groff problem and not a -shared problem.
+ export GROFF_TMAC_PATH="/usr/share/tmac/:/usr/share/groff/1.19.1/tmac/"
+ mkmake || die "emake failed"
+}
+
+src_install() {
+ mkmake -j1 DESTDIR="${D}" DOCDIR=/usr/share/doc/${PF} install || die "Install failed"
+}
diff --git a/sys-freebsd/freebsd-sources/ChangeLog b/sys-freebsd/freebsd-sources/ChangeLog
index 850a7c065f41..f40e13ee531a 100644
--- a/sys-freebsd/freebsd-sources/ChangeLog
+++ b/sys-freebsd/freebsd-sources/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for sys-freebsd/freebsd-sources
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.44 2009/01/08 18:35:47 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.45 2009/01/22 21:05:47 the_paya Exp $
+
+*freebsd-sources-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-sources-7.0-gentoo.patch,
+ +files/freebsd-sources-7.0-tmpfs_whiteout_stub.patch,
+ +files/freebsd-sources-7.0-werror.patch,
+ +files/freebsd-sources-7.1-asm.patch,
+ +files/freebsd-sources-7.1-binutils_link.patch,
+ +files/freebsd-sources-7.1-sparc64.patch,
+ +files/freebsd-sources-7.1-subnet-route-pr40133.patch,
+ +files/freebsd-sources-7.1-types.h-fix.patch, +freebsd-sources-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
*freebsd-sources-6.2-r5 (08 Jan 2009)
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-gentoo.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-gentoo.patch
new file mode 100644
index 000000000000..7da5197d8de2
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-gentoo.patch
@@ -0,0 +1,35 @@
+diff -ur ../src.orig/sys/conf/kern.mk ./sys/conf/kern.mk
+--- ../src.orig/sys/conf/kern.mk 2007-05-24 23:53:42.000000000 +0200
++++ ./sys/conf/kern.mk 2008-03-14 14:37:47.216420518 +0100
+@@ -12,7 +12,7 @@
+ .else
+ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
+ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
+- ${_wundef} ${_Wno_pointer_sign} -fformat-extensions
++ ${_wundef} ${_Wno_pointer_sign}
+ .if !defined(WITH_GCC3)
+ _Wno_pointer_sign=-Wno-pointer-sign
+ .endif
+@@ -36,7 +36,7 @@
+ # reserved for user applications.
+ #
+ .if ${MACHINE_ARCH} == "i386" && ${CC} != "icc"
+-CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 \
++CFLAGS+= -mpreferred-stack-boundary=2 \
+ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
+ INLINE_LIMIT?= 8000
+ .endif
+Only in ./sys/conf: kern.mk.rej
+Only in ./sys/conf: kern.mk~
+diff -ur ../src.orig/sys/dev/aic7xxx/aicasm/Makefile ./sys/dev/aic7xxx/aicasm/Makefile
+--- ../src.orig/sys/dev/aic7xxx/aicasm/Makefile 2005-11-21 15:41:10.000000000 +0100
++++ ./sys/dev/aic7xxx/aicasm/Makefile 2008-03-14 14:36:35.859698365 +0100
+@@ -14,7 +14,7 @@
+ SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS}
+ CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g}
+ DPADD= ${LIBL}
+-LDADD= -ll
++LDADD= -lfl
+
+ # Correct path for kernel builds
+ # Don't rely on the kernel's .depend file
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-tmpfs_whiteout_stub.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-tmpfs_whiteout_stub.patch
new file mode 100644
index 000000000000..13524efa6e00
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-tmpfs_whiteout_stub.patch
@@ -0,0 +1,44 @@
+diff -ur sys/fs/tmpfs.orig/tmpfs_vnops.c sys/fs/tmpfs/tmpfs_vnops.c
+--- sys/fs/tmpfs.orig/tmpfs_vnops.c 2008-06-22 12:17:48 -0300
++++ sys/fs/tmpfs/tmpfs_vnops.c 2008-06-28 12:05:10 -0300
+@@ -1459,6 +1459,30 @@
+ return (0);
+ }
+
++
++/* --------------------------------------------------------------------- */
++/* This does absolutely nothing */
++#ifdef GENTOO_LIVECD
++static int
++tmpfs_whiteout(struct vop_whiteout_args *ap)
++{
++ switch (ap->a_flags) {
++ case LOOKUP:
++ return (0);
++ break;
++ case CREATE:
++ return(EOPNOTSUPP);
++ break;
++ case DELETE:
++ return (0);
++ break;
++ default:
++ return(EOPNOTSUPP);
++ }
++ return(0);
++}
++#endif
++
+ /* --------------------------------------------------------------------- */
+
+ /*
+@@ -1484,6 +1508,9 @@
+ .vop_mkdir = tmpfs_mkdir,
+ .vop_rmdir = tmpfs_rmdir,
+ .vop_symlink = tmpfs_symlink,
++#ifdef GENTOO_LIVECD
++ .vop_whiteout = tmpfs_whiteout,
++#endif
+ .vop_readdir = tmpfs_readdir,
+ .vop_readlink = tmpfs_readlink,
+ .vop_inactive = tmpfs_inactive,
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-werror.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-werror.patch
new file mode 100644
index 000000000000..3a2be631b1b7
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.0-werror.patch
@@ -0,0 +1,27 @@
+diff -ur ../src.orig/sys/conf/kern.pre.mk ./sys/conf/kern.pre.mk
+--- ../src.orig/sys/conf/kern.pre.mk 2007-08-08 21:12:06.000000000 +0200
++++ ./sys/conf/kern.pre.mk 2008-03-14 14:10:03.183569137 +0100
+@@ -90,7 +90,7 @@
+ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE} == "i386" || \
+ ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE_ARCH} == "sparc64"
+-WERROR?= -Werror
++WERROR?= -Wno-error
+ .endif
+ .endif
+
+Only in ./sys/conf: kern.pre.mk.rej
+Only in ./sys/conf: kern.pre.mk~
+diff -ur ../src.orig/sys/conf/kmod.mk ./sys/conf/kmod.mk
+--- ../src.orig/sys/conf/kmod.mk 2007-07-11 03:20:37.000000000 +0200
++++ ./sys/conf/kmod.mk 2008-03-14 14:11:21.856366378 +0100
+@@ -79,7 +79,6 @@
+ . if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing)
+ CFLAGS+= -fno-strict-aliasing
+ . endif
+-#WERROR?= -Werror
+ .endif
+ CFLAGS+= ${WERROR}
+ CFLAGS+= -D_KERNEL
+Only in ./sys/conf: kmod.mk.rej
+Only in ./sys/conf: kmod.mk~
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-asm.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-asm.patch
new file mode 100644
index 000000000000..c0f5d787cd1d
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-asm.patch
@@ -0,0 +1,139 @@
+diff -ur ../src.orig/sys/compat/ndis/winx32_wrap.S ./sys/compat/ndis/winx32_wrap.S
+--- ../src.orig/sys/compat/ndis/winx32_wrap.S 2006-06-12 22:35:59.000000000 +0200
++++ ./sys/compat/ndis/winx32_wrap.S 2008-03-14 14:00:41.949886084 +0100
+@@ -369,7 +369,7 @@
+ ret
+
+ ENTRY(x86_setfs)
+- movl 4(%esp),%fs
++ movw 4(%esp),%fs
+ ret
+
+ ENTRY(x86_gettid)
+diff -ur ../src.orig/sys/i386/i386/locore.s ./sys/i386/i386/locore.s
+--- ../src.orig/sys/i386/i386/locore.s 2007-03-24 20:53:22.000000000 +0100
++++ ./sys/i386/i386/locore.s 2008-03-14 14:00:41.946886262 +0100
+@@ -358,7 +358,7 @@
+ pushl %eax
+ testl $PSL_VM,UC_EFLAGS(%eax)
+ jne 1f
+- movl UC_GS(%eax),%gs /* restore %gs */
++ movw UC_GS(%eax),%gs /* restore %gs */
+ 1:
+ movl $SYS_sigreturn,%eax
+ pushl %eax /* junk to fake return addr. */
+@@ -375,7 +375,7 @@
+ pushl %eax
+ testl $PSL_VM,UC4_EFLAGS(%eax)
+ jne 1f
+- movl UC4_GS(%eax),%gs /* restore %gs */
++ movw UC4_GS(%eax),%gs /* restore %gs */
+ 1:
+ movl $344,%eax /* 4.x SYS_sigreturn */
+ pushl %eax /* junk to fake return addr. */
+@@ -393,7 +393,7 @@
+ pushl %eax
+ testl $PSL_VM,SC_PS(%eax)
+ jne 9f
+- movl SC_GS(%eax),%gs /* restore %gs */
++ movw SC_GS(%eax),%gs /* restore %gs */
+ 9:
+ movl $103,%eax /* 3.x SYS_sigreturn */
+ pushl %eax /* junk to fake return addr. */
+diff -ur ../src.orig/sys/i386/i386/swtch.s ./sys/i386/i386/swtch.s
+--- ../src.orig/sys/i386/i386/swtch.s 2007-08-22 07:06:14.000000000 +0200
++++ ./sys/i386/i386/swtch.s 2008-03-14 14:00:41.948886237 +0100
+@@ -130,7 +130,7 @@
+ movl %ebp,PCB_EBP(%edx)
+ movl %esi,PCB_ESI(%edx)
+ movl %edi,PCB_EDI(%edx)
+- movl %gs,PCB_GS(%edx)
++ movw %gs,PCB_GS(%edx)
+ pushfl /* PSL */
+ popl PCB_PSL(%edx)
+ /* Test if debug registers should be saved. */
+@@ -301,7 +301,7 @@
+ /* This must be done after loading the user LDT. */
+ .globl cpu_switch_load_gs
+ cpu_switch_load_gs:
+- movl PCB_GS(%edx),%gs
++ movw PCB_GS(%edx),%gs
+
+ /* Test if debug registers should be restored. */
+ testl $PCB_DBREGS,PCB_FLAGS(%edx)
+@@ -371,7 +371,7 @@
+ movl %ebp,PCB_EBP(%ecx)
+ movl %esi,PCB_ESI(%ecx)
+ movl %edi,PCB_EDI(%ecx)
+- movl %gs,PCB_GS(%ecx)
++ movw %gs,PCB_GS(%ecx)
+ pushfl
+ popl PCB_PSL(%ecx)
+
+diff -ur ../src.orig/sys/i386/include/cpufunc.h ./sys/i386/include/cpufunc.h
+--- ../src.orig/sys/i386/include/cpufunc.h 2007-08-09 22:14:35.000000000 +0200
++++ ./sys/i386/include/cpufunc.h 2008-03-14 14:03:09.264377451 +0100
+@@ -452,7 +452,7 @@
+ rfs(void)
+ {
+ u_int sel;
+- __asm __volatile("movl %%fs,%0" : "=rm" (sel));
++ __asm __volatile("movw %%fs,%0" : "=rm" (sel));
+ return (sel);
+ }
+
+@@ -468,7 +468,7 @@
+ rgs(void)
+ {
+ u_int sel;
+- __asm __volatile("movl %%gs,%0" : "=rm" (sel));
++ __asm __volatile("movw %%gs,%0" : "=rm" (sel));
+ return (sel);
+ }
+
+@@ -492,7 +492,7 @@
+ rss(void)
+ {
+ u_int sel;
+- __asm __volatile("movl %%ss,%0" : "=rm" (sel));
++ __asm __volatile("movw %%ss,%0" : "=rm" (sel));
+ return (sel);
+ }
+
+@@ -507,13 +507,13 @@
+ static __inline void
+ load_fs(u_int sel)
+ {
+- __asm __volatile("movl %0,%%fs" : : "rm" (sel));
++ __asm __volatile("movw %0,%%fs" : : "rm" (sel));
+ }
+
+ static __inline void
+ load_gs(u_int sel)
+ {
+- __asm __volatile("movl %0,%%gs" : : "rm" (sel));
++ __asm __volatile("movw %0,%%gs" : : "rm" (sel));
+ }
+
+ static __inline void
+diff -ur ../src.orig/sys/i386/linux/linux_locore.s ./sys/i386/linux/linux_locore.s
+--- ../src.orig/sys/i386/linux/linux_locore.s 2001-02-25 07:29:01.000000000 +0100
++++ ./sys/i386/linux/linux_locore.s 2008-03-14 14:00:41.949886084 +0100
+@@ -8,7 +8,7 @@
+ NON_GPROF_ENTRY(linux_sigcode)
+ call *LINUX_SIGF_HANDLER(%esp)
+ leal LINUX_SIGF_SC(%esp),%ebx /* linux scp */
+- movl LINUX_SC_GS(%ebx),%gs
++ movw LINUX_SC_GS(%ebx),%gs
+ movl %esp, %ebx /* pass sigframe */
+ push %eax /* fake ret addr */
+ movl $LINUX_SYS_linux_sigreturn,%eax /* linux_sigreturn() */
+@@ -20,7 +20,7 @@
+ call *LINUX_RT_SIGF_HANDLER(%esp)
+ leal LINUX_RT_SIGF_UC(%esp),%ebx /* linux ucp */
+ leal LINUX_RT_SIGF_SC(%ebx),%ecx /* linux sigcontext */
+- movl LINUX_SC_GS(%ecx),%gs
++ movw LINUX_SC_GS(%ecx),%gs
+ push %eax /* fake ret addr */
+ movl $LINUX_SYS_linux_rt_sigreturn,%eax /* linux_rt_sigreturn() */
+ int $0x80 /* enter kernel with args */
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-binutils_link.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-binutils_link.patch
new file mode 100644
index 000000000000..43d01baef347
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-binutils_link.patch
@@ -0,0 +1,37 @@
+diff -ruN sys.orig/conf/kern.post.mk sys/conf/kern.post.mk
+--- sys.orig/conf/kern.post.mk 2007-03-23 18:55:59 -0300
++++ sys/conf/kern.post.mk 2008-06-18 19:51:13 -0300
+@@ -85,7 +85,9 @@
+ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
+ @rm -f ${.TARGET}
+ @echo linking ${.TARGET}
+- ${SYSTEM_LD}
++ ${SYSTEM_LD} -o ${.TARGET}.tmp
++ @sh $S/tools/gen-ld-u-options ${.TARGET}.tmp > ${.TARGET}.lopt
++ ${SYSTEM_LD} "@${.TARGET}.lopt"
+ .if defined(CTFMERGE)
+ ${SYSTEM_CTFMERGE}
+ .endif
+diff -ruN sys.orig/conf/kmod.mk sys/conf/kmod.mk
+--- sys.orig/conf/kmod.mk 2008-06-18 09:11:53 -0300
++++ sys/conf/kmod.mk 2008-06-18 19:50:01 -0300
+@@ -176,7 +176,8 @@
+
+ .if ${MACHINE_ARCH} != amd64
+ ${FULLPROG}: ${KMOD}.kld
+- ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld
++ sh ./@/tools/gen-ld-u-options ${KMOD}.kld > ${KMOD}.lopt
++ ${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld "@${KMOD}.lopt"
+ .if !defined(DEBUG_FLAGS)
+ ${OBJCOPY} --strip-debug ${.TARGET}
+ .endif
+diff -ruN sys.orig/tools/gen-ld-u-options sys/tools/gen-ld-u-options
+--- sys.orig/tools/gen-ld-u-options 1969-12-31 21:00:00 -0300
++++ sys/tools/gen-ld-u-options 2008-06-18 19:47:56 -0300
+@@ -0,0 +1,6 @@
++#!/bin/sh
++
++for i in `objdump -h -w $1 | grep set_ | cut -c5- | cut -f1 -d " "`
++do
++ echo -n " -u __start_$i -u __stop_$i "
++done
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-sparc64.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-sparc64.patch
new file mode 100644
index 000000000000..12bde6f9ac8b
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-sparc64.patch
@@ -0,0 +1,12 @@
+diff -ur sys.orig/conf/ldscript.sparc64 sys/conf/ldscript.sparc64
+--- sys.orig/conf/ldscript.sparc64 2003-06-07 19:23:50 +0100
++++ sys/conf/ldscript.sparc64 2006-10-11 11:10:21 +0100
+@@ -1,6 +1,6 @@
+ /* $FreeBSD: src/sys/conf/ldscript.sparc64,v 1.4.28.1 2008/11/25 02:59:29 kensmith Exp $ */
+-OUTPUT_FORMAT("elf64-sparc", "elf64-sparc",
+- "elf64-sparc")
++OUTPUT_FORMAT("elf64-sparc-freebsd", "elf64-sparc-freebsd",
++ "elf64-sparc-freebsd")
+ OUTPUT_ARCH(sparc:v9)
+ ENTRY(_start)
+ SEARCH_DIR(/usr/lib);
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-subnet-route-pr40133.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-subnet-route-pr40133.patch
new file mode 100644
index 000000000000..1184280b5d8f
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-subnet-route-pr40133.patch
@@ -0,0 +1,21 @@
+Fixes changing the default subnet route after removing an ip address.
+
+See: http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=40133
+and http://mail-index.netbsd.org/tech-net/2008/12/03/msg000896.html
+
+Thanks to Roy Marples.
+--- sys/netinet/in.c.orig
++++ sys/netinet/in.c
+@@ -858,6 +858,12 @@
+ error = rtinit(&target->ia_ifa, (int)RTM_ADD, flags);
+ if (!error)
+ target->ia_flags |= IFA_ROUTE;
++ else if (error == EEXIST) {
++ /*
++ * the fact that the route already exists is not an error.
++ */
++ error = 0;
++ }
+ return error;
+ }
+
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-types.h-fix.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-types.h-fix.patch
new file mode 100644
index 000000000000..8de5df2d16a6
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.1-types.h-fix.patch
@@ -0,0 +1,15 @@
+Fixes a compile error if XOPEN_SOURCE 600 is defined.
+
+See: http://www.mailinglistarchive.com/freebsd-current@freebsd.org/msg15011.html
+
+--- sys/sys/types.h.orig
++++ sys/sys/types.h
+@@ -46,7 +46,7 @@
+
+ #include <sys/_pthreadtypes.h>
+
+-#if __BSD_VISIBLE
++#ifndef _POSIX_SOURCE
+ typedef unsigned char u_char;
+ typedef unsigned short u_short;
+ typedef unsigned int u_int;
diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-7.1.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-7.1.ebuild
new file mode 100644
index 000000000000..e1f06ee4f88c
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/freebsd-sources-7.1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-7.1.ebuild,v 1.1 2009/01/22 21:05:47 the_paya Exp $
+
+inherit bsdmk freebsd flag-o-matic
+
+DESCRIPTION="FreeBSD kernel sources"
+SLOT="${PVR}"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="symlink"
+
+SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
+
+RDEPEND=">=sys-freebsd/freebsd-mk-defs-7.0"
+DEPEND=""
+
+RESTRICT="strip binchecks"
+
+S="${WORKDIR}/sys"
+
+MY_PVR="${PVR}"
+
+[[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # This replaces the gentoover patch, it doesn't need reapply every time.
+ sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
+ -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
+ -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
+ "${S}/conf/newvers.sh"
+
+ # __FreeBSD_cc_version comes from FreeBSD's gcc.
+ # on 7.0-RELEASE it's 700003.
+ sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=700004:g" \
+ -i "${S}/conf/kern.pre.mk" \
+ -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version"
+
+ epatch "${FILESDIR}/${PN}-7.0-gentoo.patch"
+ epatch "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
+ epatch "${FILESDIR}/${PN}-7.1-asm.patch"
+ epatch "${FILESDIR}/${PN}-7.0-werror.patch"
+ epatch "${FILESDIR}/${PN}-7.1-sparc64.patch"
+ epatch "${FILESDIR}/${PN}-6.1-ntfs.patch"
+ epatch "${FILESDIR}/${PN}-6.2-debug-O2.patch"
+ epatch "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
+ epatch "${FILESDIR}/${PN}-7.1-subnet-route-pr40133.patch"
+
+ # http://security.freebsd.org/advisories/FreeBSD-SA-07:03.ipv6.asc
+ # Why did the 6.2 patch apply almoast cleanly on 7.0?
+ # Because the code was suppressed.
+ #epatch "${FILESDIR}/${PN}-7.0-ipv6.patch"
+
+ # Disable SSP for the kernel
+ grep -Zlr -- -ffreestanding "${S}" | xargs -0 sed -i -e \
+ "s:-ffreestanding:-ffreestanding $(test-flags -fno-stack-protector -fno-stack-protector-all):g"
+
+ # By adding -DGENTOO_LIVECD to CFLAGS activate this stub
+ # vop_whiteout to tmpfs, so it can be used as an overlay
+ # unionfs filesystem over the cd9660 readonly filesystem.
+ epatch "${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch"
+
+ # See http://sourceware.org/bugzilla/show_bug.cgi?id=5391
+ # ld doesn't provide symbols constructed as the __start_set_(s) ones
+ # are on FreeBSD modules.
+ # This patch adds code to generate a list of these and adds them
+ # as undefined references to ld's commandline to get them.
+ # Without this kernel modules will not load.
+ epatch "${FILESDIR}/${PN}-7.1-binutils_link.patch"
+}
+
+src_compile() {
+ einfo "Nothing to compile.."
+}
+
+src_install() {
+ insinto "/usr/src/sys-${MY_PVR}"
+ doins -r "${S}/"*
+}
+
+pkg_postinst() {
+ if [[ ! -L "${ROOT}/usr/src/sys" ]]; then
+ einfo "/usr/src/sys symlink doesn't exist; creating symlink to sys-${MY_PVR}..."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
+ # just in case...
+ [[ -L ""${ROOT}/usr/src/sys-${RV}"" ]] && rm "${ROOT}/usr/src/sys-${RV}"
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
+ elif use symlink; then
+ einfo "Updating /usr/src/sys symlink to sys-${MY_PVR}..."
+ rm "${ROOT}/usr/src/sys" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't remove previous symlinks, please fix manually."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
+ ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
+ eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
+ fi
+
+ if use sparc-fbsd ; then
+ ewarn "WARNING: kldload currently causes kernel panics"
+ ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
+ ewarn "we need gcc-4.1 to compile the kernel correctly :/"
+ ewarn "Please compile all modules you need into the kernel"
+ fi
+}
diff --git a/sys-freebsd/freebsd-ubin/ChangeLog b/sys-freebsd/freebsd-ubin/ChangeLog
index ad197b841463..be3adde7991c 100644
--- a/sys-freebsd/freebsd-ubin/ChangeLog
+++ b/sys-freebsd/freebsd-ubin/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-freebsd/freebsd-ubin
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/ChangeLog,v 1.57 2009/01/08 21:17:28 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/ChangeLog,v 1.58 2009/01/22 21:06:12 the_paya Exp $
+
+*freebsd-ubin-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +freebsd-ubin-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
08 Jan 2009; Alexis Ballier <aballier@gentoo.org>
-freebsd-ubin-6.2.ebuild:
diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-7.1.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-7.1.ebuild
new file mode 100644
index 000000000000..5a4bf047511c
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-7.1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-ubin/freebsd-ubin-7.1.ebuild,v 1.1 2009/01/22 21:06:12 the_paya Exp $
+
+inherit bsdmk freebsd flag-o-matic pam
+
+DESCRIPTION="FreeBSD's base system source for /usr/bin"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="atm bluetooth ssl usb nls ipv6 kerberos nis build"
+
+SRC_URI="mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${BIN}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2
+ build? ( mirror://gentoo/${SYS}.tar.bz2 )"
+
+RDEPEND=">=sys-freebsd/freebsd-lib-6.2_rc2
+ ssl? ( dev-libs/openssl )
+ kerberos? ( virtual/krb5 )
+ virtual/pam
+ sys-libs/zlib
+ !dev-util/csup"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+RDEPEND="${RDEPEND}
+ >=sys-auth/pambase-20080219.1
+ sys-process/cronbase"
+
+S="${WORKDIR}/usr.bin"
+
+pkg_setup() {
+ use nls || mymakeopts="${mymakeopts} NO_NLS= "
+ use atm || mymakeopts="${mymakeopts} NO_ATM= "
+ use bluetooth || mymakeopts="${mymakeopts} NO_BLUETOOTH= "
+ use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NO_CRYPT= "
+ use usb || mymakeopts="${mymakeopts} NO_USB= "
+ use ipv6 || mymakeopts="${mymakeopts} NO_INET6= "
+ use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+
+ mymakeopts="${mymakeopts} NO_SENDMAIL= "
+}
+
+# List of patches to apply
+PATCHES="${FILESDIR}/${PN}-6.0-bsdcmp.patch
+ ${FILESDIR}/${PN}-6.0-fixmakefiles.patch
+ ${FILESDIR}/${PN}-setXid.patch
+ ${FILESDIR}/${PN}-lint-stdarg.patch
+ ${FILESDIR}/${PN}-6.0-kdump-ioctl.patch"
+
+# Here we remove some sources we don't need because they are already
+# provided by portage's packages or similar. In order:
+# - Archiving tools, provided by their own ebuilds
+# - ncurses stuff
+# - less stuff
+# - bind utils
+# - rsh stuff
+# - binutils gprof
+# and the rest are misc utils we already provide somewhere else.
+REMOVE_SUBDIRS="bzip2 bzip2recover tar
+ gzip gprof
+ tput tset
+ less lessecho lesskey
+ dig hesinfo nslookup nsupdate host
+ rsh rlogin rusers rwho ruptime
+ compile_et lex vi smbutil file vacation nc ftp telnet
+ c99 c89
+ whois tftp"
+
+pkg_preinst() {
+ # bison installs a /usr/bin/yacc symlink ...
+ # we need to remove it to avoid triggering
+ # collision-protect errors
+ if [[ -L ${ROOT}/usr/bin/yacc ]] ; then
+ rm -f "${ROOT}"/usr/bin/yacc
+ fi
+}
+
+
+src_unpack() {
+ freebsd_src_unpack
+
+ use build || ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+
+ # Rename manpage for renamed cmp
+ mv "${S}"/cmp/cmp.1 "${S}"/cmp/bsdcmp.1
+ # Fix whereis(1) manpath search.
+ sed -i -e 's:"manpath -q":"manpath":' "${S}/whereis/pathnames.h"
+
+ # Build a dynamic make
+ sed -i -e '/^NO_SHARED/ s/^/#/' "${S}"/make/Makefile
+}
+
+src_install() {
+ freebsd_src_install
+
+ # baselayout requires these in /bin
+ dodir /bin
+ for bin in sed; do
+ mv "${D}/usr/bin/${bin}" "${D}/bin/" || die "mv ${bin} failed"
+ dosym /bin/${bin} /usr/bin/${bin} || die "dosym ${bin} failed"
+ done
+
+ for pamdfile in login passwd su; do
+ newpamd "${FILESDIR}/${pamdfile}.1.pamd" ${pamdfile}
+ done
+
+ cd "${WORKDIR}/etc"
+ insinto /etc
+ doins remote phones opieaccess fbtab
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/locate-updatedb-cron" locate.updatedb
+}
+
+pkg_postinst() {
+ # We need to ensure that login.conf.db is up-to-date.
+ if [[ -e "${ROOT}"etc/login.conf ]] ; then
+ einfo "Updating ${ROOT}etc/login.conf.db"
+ "${ROOT}"usr/bin/cap_mkdb -f "${ROOT}"etc/login.conf "${ROOT}"etc/login.conf
+ elog "Remember to run cap_mkdb /etc/login.conf after making changes to it"
+ fi
+}
+
+pkg_postrm() {
+ # and if we uninstall yacc but keep bison,
+ # lets restore the /usr/bin/yacc symlink
+ if [[ ! -e ${ROOT}/usr/bin/yacc ]] && [[ -e ${ROOT}/usr/bin/yacc.bison ]] ; then
+ ln -s yacc.bison "${ROOT}"/usr/bin/yacc
+ fi
+}
diff --git a/sys-freebsd/freebsd-usbin/ChangeLog b/sys-freebsd/freebsd-usbin/ChangeLog
index daf8c89f2b29..13cc7a4bc5ba 100644
--- a/sys-freebsd/freebsd-usbin/ChangeLog
+++ b/sys-freebsd/freebsd-usbin/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-freebsd/freebsd-usbin
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/ChangeLog,v 1.49 2009/01/08 21:19:50 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/ChangeLog,v 1.50 2009/01/22 21:06:27 the_paya Exp $
+
+*freebsd-usbin-7.1 (22 Jan 2009)
+
+ 22 Jan 2009; Javier Villavicencio <the_paya@gentoo.org>
+ +files/freebsd-usbin-7.0-nowrap.patch, files/nfs.confd, files/nfs.initd,
+ +files/rpc.lockd.initd, +files/rpc.statd.initd, metadata.xml,
+ +freebsd-usbin-7.1.ebuild:
+ Import 7.1 ebuilds from gentoo-bsd overlay.
08 Jan 2009; Alexis Ballier <aballier@gentoo.org>
-freebsd-usbin-6.2.ebuild:
diff --git a/sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch
new file mode 100644
index 000000000000..17442eef68c0
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/freebsd-usbin-7.0-nowrap.patch
@@ -0,0 +1,45 @@
+diff -ur usr.sbin.orig/rpcbind/Makefile usr.sbin/rpcbind/Makefile
+--- usr.sbin.orig/rpcbind/Makefile 2007-04-21 12:02:30 +0000
++++ usr.sbin/rpcbind/Makefile 2007-04-21 12:05:32 +0000
+@@ -8,13 +8,20 @@
+ SRCS= check_bound.c rpcb_stat.c rpcb_svc_4.c rpcbind.c pmap_svc.c \
+ rpcb_svc.c rpcb_svc_com.c security.c warmstart.c util.c
+
+-CFLAGS+= -DPORTMAP -DLIBWRAP
++CFLAGS+= -DPORTMAP
+
+ .if ${MK_INET6_SUPPORT} != "no"
+ CFLAGS+= -DINET6
+ .endif
+
+-DPADD= ${LIBWRAP} ${LIBUTIL}
+-LDADD= -lwrap -lutil
++DPADD= ${LIBUTIL}
++LDADD= -lutil
++
++.if !defined(NO_WRAP)
++CFLAGS+= -DTCP_WRAPPER
++DPADD+= ${LIBWRAP}
++LDADD+= -lwrap
++.endif
++
+
+ .include <bsd.prog.mk>
+diff -ur usr.sbin.orig/ypserv/Makefile usr.sbin/ypserv/Makefile
+--- usr.sbin.orig/ypserv/Makefile 2007-04-21 12:02:31 +0000
++++ usr.sbin/ypserv/Makefile 2007-04-21 12:06:53 +0000
+@@ -8,10 +8,13 @@
+ SRCS= yp_svc.c yp_server.c yp_dblookup.c yp_dnslookup.c \
+ ypxfr_clnt.c yp.h yp_main.c yp_error.c yp_access.c yp_svc_udp.c
+
+-CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I.
++CFLAGS+= -DDB_CACHE -I.
+
++.if !defined(NO_WRAP)
++CFLAGS+= -DTCP_WRAPPER
+ DPADD= ${LIBWRAP}
+ LDADD= -lwrap
++.endif
+
+ CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
+
diff --git a/sys-freebsd/freebsd-usbin/files/nfs.confd b/sys-freebsd/freebsd-usbin/files/nfs.confd
index 80ace9c40235..844252fdc54d 100644
--- a/sys-freebsd/freebsd-usbin/files/nfs.confd
+++ b/sys-freebsd/freebsd-usbin/files/nfs.confd
@@ -1,24 +1,10 @@
-# /etc/conf.d/nfs
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfs.confd,v 1.1 2006/04/01 16:43:51 flameeyes Exp $
-
# Config file for /etc/init.d/nfs
-
-# If you wish to set the port numbers for lockd,
-# please see /etc/sysctl.conf
-
-# Number of servers to be started up by default
-RPCNFSDCOUNT=8
-
-# Options to pass to rpc.mountd
-# ex. RPCMOUNTDOPTS="-p 32767
-RPCMOUNTDOPTS=""
-
-# Options to pass to rpc.statd
-# ex. RPCSTATDOPTS="-p 32765 -o 32766"
-RPCSTATDOPTS=""
-
-# Options to pass to rpc.idmapd
-RPCIDMAPDOPTS=""
-
-# Timeout (in seconds) for exportfs
-EXPORTFSTIMEOUT=30
+# Options for nfsd (see man nfsd)
+# Example: 8 nfsd servers started:
+#nfsdopts="-n 8"
+
+# Options for mountd (see man mountd)
+# Example: allow non-root users to mount shares:
+#mountdopts="-n"
+# Specify t he exports file, this is the default:
+#exportsfile="/etc/exports"
diff --git a/sys-freebsd/freebsd-usbin/files/nfs.initd b/sys-freebsd/freebsd-usbin/files/nfs.initd
index d99017f9d0ad..640095f140fc 100755
--- a/sys-freebsd/freebsd-usbin/files/nfs.initd
+++ b/sys-freebsd/freebsd-usbin/files/nfs.initd
@@ -1,209 +1,54 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/files/nfs.initd,v 1.2 2007/04/06 14:47:17 uberlord Exp $
#---------------------------------------------------------------------------
-# This script starts/stops the following
-# rpc.statd if necessary (also checked by init.d/nfsmount)
-# rpc.rquotad if exists (from quota package)
-# rpc.nfsd
-# rpc.mountd
+# This script starts/stops nfsd and mountd
+# Daemons rpc.rquotad, rpc.rstatd, rpc.rusersd, rpc.rwalld and rpc.sprayd
+# should be started from inetd on FreeBSD.
#---------------------------------------------------------------------------
-# NB: Config is in /etc/conf.d/nfs
-
opts="reload"
-# This variable is used for controlling whether or not to run exportfs -ua;
-# see stop() for more information
-restarting=no
-
# The binary locations
-exportfs=/usr/sbin/exportfs
-statd=/usr/sbin/rpc.statd
-idmapd=/usr/sbin/rpc.idmapd
-rquotad=/usr/sbin/rpc.rquotad
-nfsd=/usr/sbin/rpc.nfsd
-mountd=/usr/sbin/rpc.mountd
+nfsd=/usr/sbin/nfsd
+mountd=/usr/sbin/mountd
depend() {
- use ypbind net
+ use ypbind net rpc.lockd
need rpcbind
after quota
}
-start_idmapd() {
- [ ! -x "${idmapd}" ] && return 0
-
- if grep -q rpc_pipefs /proc/filesystems ; then
- if ! grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then
- [ ! -d /var/lib/nfs/rpc_pipefs ] && mkdir -p /var/lib/nfs/rpc_pipefs
- ebegin "Mounting RPC pipefs"
- mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
- eend $?
- fi
- fi
-
- ebegin "Starting idmapd"
- ${idmapd} ${RPCIDMAPDOPTS}
- eend $?
-}
-
-stop_idmapd() {
- [ ! -x ${idmapd} ] && return 0
-
- ebegin "Stopping idmapd"
- start-stop-daemon --stop --quiet --exec ${idmapd}
- ret=$?
- eend ${ret}
-
- if [ $restarting = "no" -a "${RC_CMD}" != "restart" ] ; then
- if grep -q "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts ; then
- ebegin "Unmounting RPC pipefs"
- umount /var/lib/nfs/rpc_pipefs
- eend $?
- fi
- fi
-
- return ${ret}
-}
-
-start_statd() {
- # Don't start rpc.statd if already started by init.d/nfsmount
- killall -0 rpc.statd 2>/dev/null && return 0
- ebegin "Starting NFS statd"
- start-stop-daemon --start --quiet --exec \
- $statd -- $RPCSTATDOPTS 1>&2
- eend $? "Error starting NFS statd"
-}
-
-stop_statd() {
- # Don't stop rpc.statd if it's in use by init.d/nfsmount.
- mount -t nfs | grep -q . && return 0
- # Make sure it's actually running
- killall -0 rpc.statd 2>/dev/null || return 0
- # Okay, all tests passed, stop rpc.statd
- ebegin "Stopping NFS statd"
- start-stop-daemon --stop --quiet --exec $statd 1>&2
- eend $? "Error stopping NFS statd"
-}
-
-waitfor_exportfs() {
- local pid=$1
- ( sleep ${EXPORTFSTIMEOUT:-30}; kill -9 $pid 2>/dev/null ) &
- wait $1
-}
-
start() {
- # Make sure nfs support is loaded in the kernel #64709
- if [ -e /proc/modules ] ; then
- modprobe nfsd &> /dev/null
- fi
-
- # This is the new "kernel 2.6 way" to handle the exports file
- if grep -q nfsd /proc/filesystems 2>/dev/null; then
- if ! grep -q "nfsd /proc/fs/nfs" /proc/mounts 2>/dev/null; then
- ebegin "Mounting nfsd filesystem in /proc"
- mount -t nfsd nfsd /proc/fs/nfs
- eend $? "Error mounting nfsd filesystem in /proc"
- fi
- fi
- # now that nfsd is mounted inside /proc, we can safely start mountd later
-
- start_idmapd
- start_statd
-
- # Exportfs likes to hang if networking isn't working.
- # If that's the case, then try to kill it so the
- # bootup process can continue.
- if grep -q '^/' /etc/exports 2>/dev/null; then
- ebegin "Exporting NFS directories"
- $exportfs -r 1>&2 &
- waitfor_exportfs $!
- eend $? "Error exporting NFS directories"
- fi
-
- if [ -x "${rquotad}" ]; then
- ebegin "Starting NFS rquotad"
- start-stop-daemon --start --quiet --exec \
- $rquotad -- $RPCRQUOTADOPTS 1>&2
- eend $? "Error starting NFS rquotad"
- fi
-
ebegin "Starting NFS daemon"
start-stop-daemon --start --quiet --exec \
- $nfsd -- $RPCNFSDCOUNT 1>&2
+ $nfsd -- ${nfsdopts}
eend $? "Error starting NFS daemon"
# Start mountd
ebegin "Starting NFS mountd"
start-stop-daemon --start --quiet --exec \
- $mountd -- $RPCMOUNTDOPTS 1>&2
+ $mountd -- ${mountdopts} ${exporstfile}
eend $? "Error starting NFS mountd"
}
stop() {
- # Don't check NFSSERVER variable since it might have changed,
- # instead use --oknodo to smooth things over
ebegin "Stopping NFS mountd"
- start-stop-daemon --stop --quiet --oknodo \
- --exec $mountd 1>&2
+ start-stop-daemon --stop --quiet --oknodo --exec $mountd \
+ --pidfile /var/run/mountd.pid
eend $? "Error stopping NFS mountd"
- # nfsd sets its process name to [nfsd] so don't look for $nfsd
ebegin "Stopping NFS daemon"
start-stop-daemon --stop --quiet --oknodo \
- --name nfsd --user root --signal 2 1>&2
+ --name nfsd --user root
eend $? "Error stopping NFS daemon"
-
- if [ -x $rquotad ]; then
- ebegin "Stopping NFS rquotad"
- start-stop-daemon --stop --quiet --oknodo \
- --exec $rquotad 1>&2
- eend $? "Error stopping NFS rquotad"
- fi
-
- # When restarting the NFS server, running "exportfs -ua" probably
- # isn't what the user wants. Running it causes all entries listed
- # in xtab to be removed from the kernel export tables, and the
- # xtab file is cleared. This effectively shuts down all NFS
- # activity, leaving all clients holding stale NFS filehandles,
- # *even* when the NFS server has restarted.
- #
- # That's what you would want if you were shutting down the NFS
- # server for good, or for a long period of time, but not when the
- # NFS server will be running again in short order. In this case,
- # then "exportfs -r" will reread the xtab, and all the current
- # clients will be able to resume NFS activity, *without* needing
- # to umount/(re)mount the filesystem.
- if [ "$restarting" = no -a "${RC_CMD}" != "restart" ]; then
- ebegin "Unexporting NFS directories"
- # Exportfs likes to hang if networking isn't working.
- # If that's the case, then try to kill it so the
- # shutdown process can continue.
- $exportfs -ua 1>&2 &
- waitfor_exportfs $!
- eend $? "Error unexporting NFS directories"
- fi
-
- stop_statd
- stop_idmapd
}
reload() {
- # Exportfs likes to hang if networking isn't working.
- # If that's the case, then try to kill it so the
- # bootup process can continue.
+ # Hangup signal to mountd reloads /etc/exports.
ebegin "Reloading /etc/exports"
- $exportfs -r 1>&2 &
- waitfor_exportfs $!
- eend $? "Error exporting NFS directories"
-}
-
-restart() {
- # See long comment in stop() regarding "restarting" and exportfs -ua
- restarting=yes
- svc_stop
- svc_start
+ start-stop-daemon --signal 1 --quiet --exec $mountd \
+ --pidfile /var/run/mountd.pid
+ eend $?
}
diff --git a/sys-freebsd/freebsd-usbin/files/rpc.lockd.initd b/sys-freebsd/freebsd-usbin/files/rpc.lockd.initd
new file mode 100755
index 000000000000..0c74b9fed612
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rpc.lockd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net rpcbind rpc.statd
+}
+
+start() {
+ ebegin "Starting NFS lockd"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/rpc.lockd -- $rpclockdopts
+ eend $? "Error starting NFS lockd"
+}
+
+stop() {
+ ebegin "Stopping NFS lockd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rpc.lockd
+ eend $? "Error stopping NFS lockd"
+}
diff --git a/sys-freebsd/freebsd-usbin/files/rpc.statd.initd b/sys-freebsd/freebsd-usbin/files/rpc.statd.initd
new file mode 100755
index 000000000000..5c3cf30d304f
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/files/rpc.statd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net rpcbind
+}
+
+start() {
+ ebegin "Starting NFS statd"
+ start-stop-daemon --start --quiet --exec \
+ /usr/sbin/rpc.statd -- $rpcstatdopts
+ eend $? "Error starting NFS statd"
+}
+
+stop() {
+ ebegin "Stopping NFS statd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rpc.statd
+ eend $? "Error stopping NFS statd"
+}
diff --git a/sys-freebsd/freebsd-usbin/freebsd-usbin-7.1.ebuild b/sys-freebsd/freebsd-usbin/freebsd-usbin-7.1.ebuild
new file mode 100644
index 000000000000..8b072e9dac44
--- /dev/null
+++ b/sys-freebsd/freebsd-usbin/freebsd-usbin-7.1.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-usbin/freebsd-usbin-7.1.ebuild,v 1.1 2009/01/22 21:06:27 the_paya Exp $
+
+inherit bsdmk freebsd flag-o-matic eutils
+
+DESCRIPTION="FreeBSD /usr/sbin tools"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+
+IUSE="acpi atm bluetooth build ipsec ipv6 ipfilter isdn minimal nat nis
+ pam radius ssl suid tcpd usb"
+
+SRC_URI="mirror://gentoo/${P}.tar.bz2
+ mirror://gentoo/${CONTRIB}.tar.bz2
+ mirror://gentoo/${UBIN}.tar.bz2
+ mirror://gentoo/${LIB}.tar.bz2
+ mirror://gentoo/${SBIN}.tar.bz2
+ mirror://gentoo/${ETC}.tar.bz2
+ mirror://gentoo/${GNU}.tar.bz2
+ nis? ( mirror://gentoo/${LIBEXEC}.tar.bz2 )
+ build? ( mirror://gentoo/${SYS}.tar.bz2
+ mirror://gentoo/${INCLUDE}.tar.bz2 )"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*
+ =sys-freebsd/freebsd-libexec-${RV}*
+ acpi? ( sys-power/iasl )
+ build? ( sys-apps/baselayout )
+ ssl? ( dev-libs/openssl )
+ tcpd? ( sys-apps/tcp-wrappers )
+ dev-libs/libedit
+ net-libs/libpcap"
+DEPEND="${RDEPEND}
+ =sys-freebsd/freebsd-mk-defs-${RV}*
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ sys-apps/texinfo
+ sys-devel/flex"
+
+PROVIDE="virtual/logger"
+
+S="${WORKDIR}/usr.sbin"
+
+pkg_setup() {
+ # Release crunch is something like minimal. It seems to remove everything
+ # which is not needed to work.
+ use minimal && mymakeopts="${mymakeopts} RELEASE_CRUNCH= "
+
+ use acpi || mymakeopts="${mymakeopts} NO_ACPI= "
+ use atm || mymakeopts="${mymakeopts} NO_ATM= "
+ use bluetooth || mymakeopts="${mymakeopts} NO_BLUETOOTH= "
+ use ipsec || mymakeopts="${mymakeopts} NO_IPSEC= "
+ use ipfilter || mymakeopts="${mymakeopts} NO_IPFILTER= "
+ use ipv6 || mymakeopts="${mymakeopts} NO_INET6= "
+ use isdn || mymakeopts="${mymakeopts} NO_I4B= "
+ use nat || mymakeopts="${mymakeopts} NO_NAT= "
+ use nis || mymakeopts="${mymakeopts} NO_NIS= "
+ use pam || mymakeopts="${mymakeopts} NO_PAM= "
+ use radius || mymakeopts="${mymakeopts} NO_RADIUS= "
+ use suid || mymakeopts="${mymakeopts} NO_SUID= PPP_NOSUID= "
+ use tcpd || mymakeopts="${mymakeopts} NO_WRAP= "
+ use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NO_CRYPT= "
+ use suid || mymakeopts="${mymakeopts} NO_SUID= "
+ use usb || mymakeopts="${mymakeopts} NO_USB= "
+
+ mymakeopts="${mymakeopts} NO_MAILWRAPPER= NO_BIND= NO_SENDMAIL= NO_PF= NO_AUTHPF= NO_LPR="
+}
+
+PATCHES="${FILESDIR}/${PN}-7.0-nowrap.patch
+ ${FILESDIR}/${PN}-adduser.patch"
+
+REMOVE_SUBDIRS="
+ named named-checkzone named-checkconf rndc rndc-confgen
+ dnssec-keygen dnssec-signzone
+ tcpdchk tcpdmatch
+ sendmail praliases editmap mailstats makemap
+ sysinstall cron mailwrapper ntp bsnmpd
+ tcpdump ndp traceroute inetd
+ wpa/wpa_supplicant wpa/hostapd wpa/hostapd_cli wpa/wpa_cli wpa/wpa_passphrase
+ zic amd
+ pkg_install freebsd-update"
+
+src_unpack() {
+ freebsd_src_unpack
+
+ if ! use build; then
+ ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
+ ln -s "/usr/include" "${WORKDIR}/include"
+ else
+ dummy_mk mount_smbfs
+ fi
+}
+
+src_compile() {
+ strip-flags
+ append-flags -I "${WORKDIR}/sys"
+
+ NOFLAGSTRIP="yes" freebsd_src_compile
+}
+
+src_install() {
+ # By creating these directories we avoid having to do a
+ # more complex hack
+ dodir /usr/share/doc
+ dodir /sbin
+ dodir /usr/libexec
+ dodir /usr/bin
+
+ # FILESDIR is used by some makefiles which will install files
+ # in the wrong place, just put it in the doc directory.
+ mkinstall DOCDIR=/usr/share/doc/${PF} || die "Install failed"
+
+ # Most of these now come from openrc.
+ for util in nfs rpc.statd rpc.lockd; do
+ newinitd "${FILESDIR}/"${util}.initd ${util}
+ [[ -e "${FILESDIR}"/${util}.confd ]] && \
+ newconfd "${FILESDIR}"/${util}.confd ${util}
+ done
+
+ for class in daily monthly weekly; do
+ cat - > "${T}/periodic.${class}" <<EOS
+#!/bin/sh
+/usr/sbin/periodic ${class}
+EOS
+ exeinto /etc/cron.${class}
+ newexe "${T}/periodic.${class}" periodic
+ done
+
+ # Install the pw.conf file to let pw use Gentoo's skel location
+ insinto /etc
+ doins "${FILESDIR}/pw.conf"
+
+ cd "${WORKDIR}/etc"
+ doins amd.map apmd.conf syslog.conf newsyslog.conf usbd.conf
+
+ insinto /etc/ppp
+ doins ppp/ppp.conf
+
+ if use isdn; then
+ insinto /etc/isdn
+ doins isdn/*
+ rm -f "${D}"/etc/isdn/Makefile
+ fi
+
+ if use bluetooth; then
+ insinto /etc/bluetooth
+ doins bluetooth/*
+ rm -f "${D}"/etc/bluetooth/Makefile
+ fi
+
+ # Install the periodic stuff (needs probably to be ported in a more
+ # gentooish way)
+ cd "${WORKDIR}/etc/periodic"
+
+ doperiodic daily daily/*.accounting
+ doperiodic monthly monthly/*.accounting
+}
+
+pkg_postinst() {
+ # We need to run pwd_mkdb if key files are not present
+ # If they are, then there is no need to run pwd_mkdb
+ if [[ ! -e "${ROOT}etc/passwd" || ! -e "${ROOT}etc/pwd.db" || ! -e "${ROOT}etc/spwd.db" ]] ; then
+ if [[ -e "${ROOT}etc/master.passwd" ]] ; then
+ einfo "Generating passwd files from ${ROOT}etc/master.passwd"
+ "${ROOT}"usr/sbin/pwd_mkdb -p -d "${ROOT}etc" "${ROOT}etc/master.passwd"
+ else
+ eerror "${ROOT}etc/master.passwd does not exist!"
+ eerror "You will no be able to log into your system!"
+ fi
+ fi
+
+ for logfile in messages security auth.log maillog lpd-errs xferlog cron \
+ debug.log slip.log ppp.log; do
+ [[ -f "${ROOT}/var/log/${logfile}" ]] || touch "${ROOT}/var/log/${logfile}"
+ done
+}
diff --git a/sys-freebsd/freebsd-usbin/metadata.xml b/sys-freebsd/freebsd-usbin/metadata.xml
index b1aa32e9ab0e..e187f396600c 100644
--- a/sys-freebsd/freebsd-usbin/metadata.xml
+++ b/sys-freebsd/freebsd-usbin/metadata.xml
@@ -3,9 +3,9 @@
<pkgmetadata>
<herd>bsd</herd>
<use>
- <flag name='ipfilter'>Enable ipfilter firewall support</flag>
- <flag name='ipsec'>Enable IPSec support</flag>
- <flag name='isdn'>Enable ISDN support</flag>
- <flag name='nat'>Enable Network Address Translation support</flag>
+ <flag name='ipfilter'>Enable building of ipfilter firewall support.</flag>
+ <flag name='ipsec'>Enable IPSec support.</flag>
+ <flag name='isdn'>Enable ISDN support.</flag>
+ <flag name='nat'>Enable Network Address Translation support daemon.</flag>
</use>
</pkgmetadata>