summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuta Satoh <nigoro.dev@gmail.com>2016-10-11 21:37:39 +0900
committerAlexis Ballier <aballier@gentoo.org>2016-10-11 16:47:48 +0200
commite1bd456fcf9272cfdeaf542618c6b1f3ce3d1118 (patch)
tree6eb8e704f2281853b01e1abcd5770ad59d798e86 /sys-freebsd/freebsd-ubin
parenteclass/freebsd.eclass: added FreeBSD 11.0 support. (diff)
downloadgentoo-e1bd456fcf9272cfdeaf542618c6b1f3ce3d1118.tar.gz
gentoo-e1bd456fcf9272cfdeaf542618c6b1f3ce3d1118.tar.bz2
gentoo-e1bd456fcf9272cfdeaf542618c6b1f3ce3d1118.zip
sys-freebsd: bump to 11.0
Diffstat (limited to 'sys-freebsd/freebsd-ubin')
-rw-r--r--sys-freebsd/freebsd-ubin/Manifest1
-rw-r--r--sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch147
-rw-r--r--sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild209
3 files changed, 357 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-ubin/Manifest b/sys-freebsd/freebsd-ubin/Manifest
index 18826f59887b..67bbfb2e4c7e 100644
--- a/sys-freebsd/freebsd-ubin/Manifest
+++ b/sys-freebsd/freebsd-ubin/Manifest
@@ -11,6 +11,7 @@ DIST freebsd-include-9.1.tar.bz2 146881 SHA256 861dce3f39e6806762b102361017cbe14
DIST freebsd-lib-8.2.tar.bz2 3323878 SHA256 e3590c12794fcb5ba8eb7a1f58b497587cf19f9200b3254c194a793da3b5bfb0 SHA512 c059cfdd1099bb519b2a5c43fb7e7104c500ef8906229ed7eb9e420cb3a217cdaf8655e9e7a9f45cfadc5491f8115e0e738fd49251d9f0c3a83780845b09f007 WHIRLPOOL 95f98a372f44a89bc8ac3029ec065dbbfec338e6f889d057d75644bfcdfb9d27fdc0421d7e392cad5a823712b97f0857297ec3d321580254c63032c22b95792e
DIST freebsd-lib-9.1.tar.bz2 3206685 SHA256 f31fa8107b4de711c548f6d0c1bb1f81d09f51bcc3b14a1e9e90bb0e7cc4a35d SHA512 40d0c36b6b889c404fa0e0afa38ba4e84a55bc88ffa2f98a70afbd7a32c4f32c158617ba770567d082a986d62c09b3ec8db3dc5ab853ee1c9bbe0b90bb82396e WHIRLPOOL 581878bf9c43184b043b4293409b85901c9ed1f9bd279e965414aca41ba50950848ebda3ee10a503a028135dfd2765e95a11acd4e62a11c528e104392bbbd8d0
DIST freebsd-src-10.3.tar.xz 126900216 SHA256 f50763dcac88e9b7ec616b77d537bf338f470350e2c85e0cc7decfcc8372b54d SHA512 a0c95fc4bbc5ad7599d0a83651a497e85cd85a5c433e5e175c57480b466c9eb5aa0390804d6336da8301c75ad499484399d39b8f7efbcfda8cafb09b1aa12d8f WHIRLPOOL bf5320bc506fb73a63d0fb324b60667a196ca2fef5d0215637a657c613f2052d76d002deb205e258f6d4e2aaea15490b26679e59a102606a34b58ab1f6b755ad
+DIST freebsd-src-11.0.tar.xz 140252356 SHA256 0725a7f1d3e8985f4b2e31a2ad714334463a5016b203073a8fc196649f3d5a27 SHA512 ee1271bb38ee46fbab3d49b33f5b5afd76f9402b2e792581d63f02272df8e2a4011fac97ad550434f0c2fc5fe241940276629bde55e75f8638896a81339870cd WHIRLPOOL e1cda77189990c1d2187ab2d9e842ff3c619d8235f1ade56819fadc52f680a871de17cf05f8119614557c615ad19d41d1b6080c4b3768e7252889546b865d827
DIST freebsd-sys-8.2.tar.bz2 25835329 SHA256 0c6c7b61aae94db2931f985d5899f3bca78fc8ffab6b598fbaa158142d676f16 SHA512 6ea4516a5c52e25c4f993f7acb875463a5caea93dbdf250c5d48eee95fff226956e9f030cab7e341b5e6a132325bc3dbf93dcb4b1185acb011918e50b1a22be3 WHIRLPOOL 870deeff877c6b9fc812a4260e4fdbb6715a5dc2065cab3bfbf2a42d876f6654703ccb124275a4e2c410cef48f3db02b63cc76059eccf9cf90244826f35b7a15
DIST freebsd-sys-9.1.tar.bz2 32588103 SHA256 b93a7ac8334ac16cc9f60665048e5ef812c0a6c62f10d0b0a674aec3f56516a8 SHA512 7dc9d9e00dde8f592bb171f4386d02b655b73cb4f153fe5ec063d010a148ef0639eae0dcdb3eeb09ecd1e3653c69e49a2d261329fa6d0381d2ddabe258ddde6d WHIRLPOOL c8348344dfb14bad64bd3a78ee615ddd29203175b292233254f8ba175e7a3fb7218af6f95f7b4dbf394c0354bafe9d8bb0c21cdf0ceaeb697214964b280469b3
DIST freebsd-ubin-8.2.tar.bz2 1808012 SHA256 6b99554f3ad6ee052069b347eb6e6219b71598d7b222acb90a24cbfc805c7b68 SHA512 48d0103323e820c431aa4f62d3be40cb3b200fb62e3de01f36c88760395bf2ba3367c51f3fa72da4dbccc2812176a051a12ca5cb7e84125c3e0fc78d4cab2c29 WHIRLPOOL ea8f3a29a37b42c2b5bcc0f2c343fa1538522157ef075363c94606a4620a590e9a03f856ce2494e3e727935b62431991d0aa9fde71de699e78b4fe225bdf1c2c
diff --git a/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch
new file mode 100644
index 000000000000..946cc5b125f9
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/files/freebsd-ubin-11.0-setXid.patch
@@ -0,0 +1,147 @@
+diff --git a/usr.bin/at/Makefile b/usr.bin/at/Makefile
+index d199a85..dc5cafd 100644
+--- a/usr.bin/at/Makefile
++++ b/usr.bin/at/Makefile
+@@ -17,6 +17,8 @@ BINOWN= root
+ BINMODE= 4555
+ CLEANFILES+= at.1
+
++LDFLAGS+=-Wl,-z,now
++
+ at.1: at.man
+ @${ECHO} Making ${.TARGET:T} from ${.ALLSRC:T}; \
+ sed -e \
+diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile
+index 4427417..4f774a1 100644
+--- a/usr.bin/chpass/Makefile
++++ b/usr.bin/chpass/Makefile
+@@ -17,6 +17,8 @@ CFLAGS+= -DYP
+ #CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
+ CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I.
+
++LDFLAGS+=-Wl,-z,now
++
+ LIBADD= crypt util
+ .if ${MK_NIS} != "no"
+ LIBADD+= ypclnt
+diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile
+index cd03a51..9a0fe6e 100644
+--- a/usr.bin/fstat/Makefile
++++ b/usr.bin/fstat/Makefile
+@@ -9,3 +9,5 @@ LIBADD= procstat
+ MAN1= fuser.1 fstat.1
+
+ .include <bsd.prog.mk>
++LDFLAGS+=-Wl,-z,now
++
+diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile
+index 07321f7..ed2c786 100644
+--- a/usr.bin/lock/Makefile
++++ b/usr.bin/lock/Makefile
+@@ -7,4 +7,6 @@ BINMODE=4555
+
+ LIBADD= crypt
+
++LDFLAGS+=-Wl,-z,now
++
+ .include <bsd.prog.mk>
+diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile
+index 3499575..62a7356 100644
+--- a/usr.bin/login/Makefile
++++ b/usr.bin/login/Makefile
+@@ -16,6 +16,8 @@ CFLAGS+= -DUSE_BSM_AUDIT
+ LIBADD+= bsm
+ .endif
+
++LDFLAGS+=-Wl,-z,now
++
+ .if ${MK_SETUID_LOGIN} != "no"
+ BINOWN= root
+ BINMODE=4555
+diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
+index 52cc3c7..11ebb2f 100644
+--- a/usr.bin/netstat/Makefile
++++ b/usr.bin/netstat/Makefile
+@@ -57,6 +57,8 @@ BINGRP= kmem
+ BINMODE=2555
+ LIBADD= kvm memstat xo util
+
++LDFLAGS+=-Wl,-z,now
++
+ .if ${MK_NETGRAPH_SUPPORT} != "no"
+ SRCS+= netgraph.c
+ LIBADD+= netgraph
+diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile
+index 3114a92..5c41213 100644
+--- a/usr.bin/opieinfo/Makefile
++++ b/usr.bin/opieinfo/Makefile
+@@ -12,6 +12,8 @@ WARNS?= 0
+
+ LIBADD= opie
+
++LDFLAGS+=-Wl,-z,now
++
+ BINOWN= root
+ BINMODE=4555
+ PRECIOUSPROG=
+diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile
+index ae35b20..32ba59b 100644
+--- a/usr.bin/opiepasswd/Makefile
++++ b/usr.bin/opiepasswd/Makefile
+@@ -12,6 +12,8 @@ WARNS?= 0
+
+ LIBADD= opie
+
++LDFLAGS+=-Wl,-z,now
++
+ BINOWN= root
+ BINMODE=4555
+ PRECIOUSPROG=
+diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile
+index 758be2d..ebde1a6 100644
+--- a/usr.bin/passwd/Makefile
++++ b/usr.bin/passwd/Makefile
+@@ -13,6 +13,8 @@ SYMLINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd
+ MLINKS = passwd.1 yppasswd.1
+ .endif
+
++LDFLAGS+=-Wl,-z,now
++
+ beforeinstall:
+ .for i in passwd yppasswd
+ [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
+diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile
+index b3dd829..26eaa63 100644
+--- a/usr.bin/su/Makefile
++++ b/usr.bin/su/Makefile
+@@ -10,6 +10,8 @@ WARNS?= 5
+ LIBADD= util pam
+
+ .if ${MK_AUDIT} != "no"
++LDFLAGS+=-Wl,-z,now
++
+ CFLAGS+= -DUSE_BSM_AUDIT
+ LIBADD+= bsm
+ .endif
+diff --git a/usr.bin/wall/Makefile b/usr.bin/wall/Makefile
+index 0579add..571be8d 100644
+--- a/usr.bin/wall/Makefile
++++ b/usr.bin/wall/Makefile
+@@ -6,4 +6,6 @@ SRCS= ttymsg.c wall.c
+ BINGRP= tty
+ BINMODE=2555
+
++LDFLAGS+=-Wl,-z,now
++
+ .include <bsd.prog.mk>
+diff --git a/usr.bin/write/Makefile b/usr.bin/write/Makefile
+index ba06110..ba6ce04 100644
+--- a/usr.bin/write/Makefile
++++ b/usr.bin/write/Makefile
+@@ -5,4 +5,6 @@ PROG= write
+ BINMODE=2555
+ BINGRP= tty
+
++LDFLAGS+=-Wl,-z,now
++
+ .include <bsd.prog.mk>
diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild
new file mode 100644
index 000000000000..537aad0cbd77
--- /dev/null
+++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-11.0.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bsdmk freebsd flag-o-matic pam multilib multibuild multilib-build
+
+DESCRIPTION="FreeBSD's base system source for /usr/bin"
+SLOT="0"
+IUSE="ar atm audit bluetooth ipv6 kerberos netware nis ssl usb build zfs"
+LICENSE="BSD zfs? ( CDDL )"
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+ SRC_URI="${SRC_URI}
+ $(freebsd_upstream_patches)"
+fi
+
+EXTRACTONLY="
+ usr.bin/
+ contrib/
+ lib/
+ etc/
+ bin/
+ include/
+"
+
+RDEPEND="=sys-freebsd/freebsd-lib-${RV}*[usb?,bluetooth?,${MULTILIB_USEDEP}]
+ ssl? ( dev-libs/openssl:0= )
+ kerberos? ( virtual/krb5 )
+ ar? ( >=app-arch/libarchive-3 )
+ virtual/pam
+ sys-libs/zlib
+ >=sys-libs/ncurses-5.9:0=
+ !sys-process/fuser-bsd
+ !dev-util/csup
+ !dev-libs/libiconv
+ !sys-freebsd/freebsd-contrib"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ !build? ( =sys-freebsd/freebsd-sources-${RV}* )
+ =sys-freebsd/freebsd-sbin-${RV}*
+ =sys-freebsd/freebsd-mk-defs-${RV}*"
+
+RDEPEND="${RDEPEND}
+ >=sys-auth/pambase-20080219.1
+ sys-process/cronbase"
+
+S="${WORKDIR}/usr.bin"
+
+PATCHES=( "${FILESDIR}/${PN}-6.0-bsdcmp.patch"
+ "${FILESDIR}/${PN}-9.0-fixmakefiles.patch"
+ "${FILESDIR}/${PN}-11.0-setXid.patch"
+ "${FILESDIR}/${PN}-lint-stdarg.patch"
+ "${FILESDIR}/${PN}-9.1-bsdar.patch"
+ "${FILESDIR}/${PN}-9.1-minigzip.patch"
+ "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch"
+ "${FILESDIR}/${PN}-10.2-talk-workaround.patch"
+ "${FILESDIR}/${PN}-10.2-bsdxml.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
+# - dc stuff
+# and the rest are misc utils we already provide somewhere else.
+REMOVE_SUBDIRS="bzip2 bzip2recover tar cpio
+ gzip gprof
+ lzmainfo xz xzdec
+ unzip
+ tput tset tabs
+ less lessecho lesskey
+ hesinfo host
+ rsh rlogin rusers rwho ruptime
+ compile_et lex vi smbutil file vacation nc ftp telnet
+ c99 c89
+ bc dc
+ whois tftp man
+ addr2line bsdcat cxxfilt cxxfilt elfcopy nm readelf sdiff size soelim strings"
+
+pkg_setup() {
+ # Add the required source files.
+ use zfs && EXTRACTONLY+="cddl/ "
+ use build && EXTRACTONLY+="sys/ "
+
+ use atm || mymakeopts="${mymakeopts} WITHOUT_ATM= "
+ use audit || mymakeopts="${mymakeopts} WITHOUT_AUDIT= "
+ use bluetooth || mymakeopts="${mymakeopts} WITHOUT_BLUETOOTH= "
+ use ipv6 || mymakeopts="${mymakeopts} WITHOUT_INET6= WITHOUT_INET6_SUPPORT= "
+ use kerberos || mymakeopts="${mymakeopts} WITHOUT_KERBEROS_SUPPORT= "
+ use netware || mymakeopts="${mymakeopts} WITHOUT_IPX= WITHOUT_IPX_SUPPORT= WITHOUT_NCP= "
+ use nis || mymakeopts="${mymakeopts} WITHOUT_NIS= "
+ use ssl || mymakeopts="${mymakeopts} WITHOUT_OPENSSL= "
+ use usb || mymakeopts="${mymakeopts} WITHOUT_USB= "
+ use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL= "
+ mymakeopts="${mymakeopts} WITHOUT_CLANG= WITHOUT_LZMA_SUPPORT= WITHOUT_SVN= WITHOUT_SVNLITE= WITHOUT_OPENSSH= WITHOUT_LDNS_UTILS= WITHOUT_MANDOCDB= "
+}
+
+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_prepare() {
+ if [[ ! -e "${WORKDIR}/sys" ]]; then
+ use build || ln -s "/usr/src/sys" "${WORKDIR}/sys"
+ fi
+
+ # Rename manpage for renamed cmp
+ mv "${S}"/cmp/cmp.1 "${S}"/cmp/bsdcmp.1 || die
+ # Rename manpage for renamed ar
+ mv "${S}"/ar/ar.1 "${S}"/ar/freebsd-ar.1 || die
+ # 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}"/bmake/Makefile.inc || die
+
+ # Disable it here otherwise our patch wont apply
+ use ar || dummy_mk ar
+
+ # Preparing to build xlint
+ export LINT=xlint
+}
+
+setup_multilib_vars() {
+ if ! multilib_is_native_abi ; then
+ cd "${WORKDIR}/usr.bin/ldd" || die
+ export mymakeopts="${mymakeopts} PROG=ldd32 WITHOUT_MAN="
+ else
+ cd "${S}" || die
+ fi
+ "$@"
+}
+
+src_compile() {
+ # Preparing to build addr2line, elfcopy, m4
+ for dir in libelftc libpe libopenbsd ; do
+ cd "${WORKDIR}/lib/${dir}" || die
+ freebsd_src_compile -j1
+ done
+
+ local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) )
+ multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1
+}
+
+src_install() {
+ cd "${S}"/calendar/calendars || die
+ for dir in $(find . -type d ! -name "." ) ; do
+ dodir /usr/share/calendar/"$(basename ${dir})"
+ done
+
+ local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) )
+ multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_install
+
+ # baselayout requires these in /bin
+ dodir /bin
+ for bin in sed printf ; 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} || die
+ done
+
+ cd "${WORKDIR}/etc" || die
+ insinto /etc
+ doins remote phones opieaccess fbtab || die
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/locate-updatedb-cron" locate.updatedb || die
+
+ # tip requires /var/spool/lock/, bug #200700
+ keepdir /var/spool/lock
+
+ # create locate database #472468
+ local f=/var/db/locate.database
+ mkdir "${ED}${f%/*}" || die
+ touch "${ED}${f}" || die
+ fowners nobody:nobody ${f}
+}
+
+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
+}