From 6247d4cff40014ab1138d8640da0d6b7d37758c8 Mon Sep 17 00:00:00 2001 From: Yuta Satoh Date: Tue, 26 Jul 2016 22:53:04 +0900 Subject: sys-freebsd/freebsd-ubin: Fix FreeBSD-SA-16:25.bspatch. Closes: https://github.com/gentoo/gentoo/pull/1972 Signed-off-by: Patrice Clement --- sys-freebsd/freebsd-ubin/Manifest | 1 + .../freebsd-ubin/freebsd-ubin-10.2-r1.ebuild | 210 -------------------- .../freebsd-ubin/freebsd-ubin-10.2-r2.ebuild | 211 +++++++++++++++++++++ .../freebsd-ubin/freebsd-ubin-10.3-r1.ebuild | 210 ++++++++++++++++++++ sys-freebsd/freebsd-ubin/freebsd-ubin-10.3.ebuild | 207 -------------------- 5 files changed, 422 insertions(+), 417 deletions(-) delete mode 100644 sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r1.ebuild create mode 100644 sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r2.ebuild create mode 100644 sys-freebsd/freebsd-ubin/freebsd-ubin-10.3-r1.ebuild delete mode 100644 sys-freebsd/freebsd-ubin/freebsd-ubin-10.3.ebuild (limited to 'sys-freebsd') diff --git a/sys-freebsd/freebsd-ubin/Manifest b/sys-freebsd/freebsd-ubin/Manifest index a551aea84ab6..56982e29ca05 100644 --- a/sys-freebsd/freebsd-ubin/Manifest +++ b/sys-freebsd/freebsd-ubin/Manifest @@ -17,3 +17,4 @@ DIST freebsd-sys-9.1.tar.bz2 32588103 SHA256 b93a7ac8334ac16cc9f60665048e5ef812c DIST freebsd-ubin-8.2.tar.bz2 1808012 SHA256 6b99554f3ad6ee052069b347eb6e6219b71598d7b222acb90a24cbfc805c7b68 SHA512 48d0103323e820c431aa4f62d3be40cb3b200fb62e3de01f36c88760395bf2ba3367c51f3fa72da4dbccc2812176a051a12ca5cb7e84125c3e0fc78d4cab2c29 WHIRLPOOL ea8f3a29a37b42c2b5bcc0f2c343fa1538522157ef075363c94606a4620a590e9a03f856ce2494e3e727935b62431991d0aa9fde71de699e78b4fe225bdf1c2c DIST freebsd-ubin-9.1.tar.bz2 1910472 SHA256 ff6e586f213534b6ec2e65002c0dee64063d76ddad515c12221b1a80a1815e48 SHA512 74ae0aceec8597aa66c3f1ab313f0685a3c63d7273c36ae7baf8794275ad9bca241c60c3f6281cccf6d531d250d7611099977d3b1a27279cef3586401b6af05e WHIRLPOOL c85a3c9cf2bceff2c60ff03556bcc81d3aca22b0bce3c9538990071ac0a907236eee5ae7743ad22c5fd309b047ebf392aaaf2fe177ef5790ea869aff3da7e2fe DIST freebsd-ubin-EN-1512-netstat.patch 983 SHA256 42c31b11f4a5f2ffeb713a1cb35fca40cda83a820d255ce3c43b178ad97bba3d SHA512 7fc34362682dbaa60d2a0ef54cd6efc290010bd170880211222a7a2a60187948481d149b6f202fb3673d443d57f69bc712b45044e87e2166d6f70e96fbaf783b WHIRLPOOL 8dfbd5a225a243004d42fba4768aaa532db0c0d627bf265b7000405130dcca9916805a8167fe45416b5c8601e23c67936071fb20d0dc1a8c6882db34361817a4 +DIST freebsd-ubin-SA-1625-bspatch.patch 286 SHA256 22ab941e324509a1cd2608407ef7ca998ac1b4bd9602c8ef643b4c078c5b4134 SHA512 f2a0210e582076bac93faa3a226cd9301b6d0245938d6c5a17e1aa275401934d7848bcb908f63a689f5e36f961dfbf1d0a0b5717ff54f67a76b5d1908ae39703 WHIRLPOOL 15a1dc7546964556bab0dbaf7054c4644c3be1bce6c2cc3e8baa74ccb49871d0dd3fc4b702c21e0a5a5a68298f225da6b19e1f2736f29cdf394a8a9f081ea507 diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r1.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r1.ebuild deleted file mode 100644 index ebaf8a0f4b9a..000000000000 --- a/sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r1.ebuild +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright 1999-2015 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 )" - -# Security Advisory and Errata patches. -UPSTREAM_PATCHES=( "EN-15:12/netstat.patch" ) - -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 ) - kerberos? ( virtual/krb5 ) - ar? ( >=app-arch/libarchive-3 ) - virtual/pam - sys-libs/zlib - >=sys-libs/ncurses-5.9 - !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}-setXid.patch" - "${FILESDIR}/${PN}-lint-stdarg.patch" - "${FILESDIR}/${PN}-8.0-xinstall.patch" - "${FILESDIR}/${PN}-9.1-bsdar.patch" - "${FILESDIR}/${PN}-9.1-minigzip.patch" - "${FILESDIR}/${PN}-10.0-atf.patch" - "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch" - "${FILESDIR}/${PN}-10.0-kdump-ioctl.patch" - "${FILESDIR}/${PN}-10.0-mandoc.patch" - "${FILESDIR}/${PN}-10.1-kdump-workaround.patch" - "${FILESDIR}/${PN}-10.2-bsdxml.patch" - "${FILESDIR}/${PN}-10.2-talk-workaround.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" - -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= " -} - -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}"/make/Makefile || 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}" - fi - "$@" -} - -src_compile() { - # Preparing to build mandoc - cd "${WORKDIR}/lib/libmandoc" - freebsd_src_compile -j1 - - cd "${S}" - local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) - multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1 -} - -src_install() { - 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" - 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 -} diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r2.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r2.ebuild new file mode 100644 index 000000000000..a7521477a77e --- /dev/null +++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-10.2-r2.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2015 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 )" + +# Security Advisory and Errata patches. +UPSTREAM_PATCHES=( "SA-16:25/bspatch.patch" + "EN-15:12/netstat.patch" ) + +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 ) + kerberos? ( virtual/krb5 ) + ar? ( >=app-arch/libarchive-3 ) + virtual/pam + sys-libs/zlib + >=sys-libs/ncurses-5.9 + !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}-setXid.patch" + "${FILESDIR}/${PN}-lint-stdarg.patch" + "${FILESDIR}/${PN}-8.0-xinstall.patch" + "${FILESDIR}/${PN}-9.1-bsdar.patch" + "${FILESDIR}/${PN}-9.1-minigzip.patch" + "${FILESDIR}/${PN}-10.0-atf.patch" + "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch" + "${FILESDIR}/${PN}-10.0-kdump-ioctl.patch" + "${FILESDIR}/${PN}-10.0-mandoc.patch" + "${FILESDIR}/${PN}-10.1-kdump-workaround.patch" + "${FILESDIR}/${PN}-10.2-bsdxml.patch" + "${FILESDIR}/${PN}-10.2-talk-workaround.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" + +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= " +} + +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}"/make/Makefile || 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}" + fi + "$@" +} + +src_compile() { + # Preparing to build mandoc + cd "${WORKDIR}/lib/libmandoc" + freebsd_src_compile -j1 + + cd "${S}" + local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1 +} + +src_install() { + 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" + 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 +} diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-10.3-r1.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-10.3-r1.ebuild new file mode 100644 index 000000000000..3cdde79636c6 --- /dev/null +++ b/sys-freebsd/freebsd-ubin/freebsd-ubin-10.3-r1.ebuild @@ -0,0 +1,210 @@ +# 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 )" + +# Security Advisory and Errata patches. +UPSTREAM_PATCHES=( "SA-16:25/bspatch.patch" ) + +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}-setXid.patch" + "${FILESDIR}/${PN}-lint-stdarg.patch" + "${FILESDIR}/${PN}-8.0-xinstall.patch" + "${FILESDIR}/${PN}-9.1-bsdar.patch" + "${FILESDIR}/${PN}-9.1-minigzip.patch" + "${FILESDIR}/${PN}-10.0-atf.patch" + "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch" + "${FILESDIR}/${PN}-10.0-kdump-ioctl.patch" + "${FILESDIR}/${PN}-10.0-mandoc.patch" + "${FILESDIR}/${PN}-10.2-bsdxml.patch" + "${FILESDIR}/${PN}-10.2-talk-workaround.patch" + "${FILESDIR}/${PN}-10.3-bmake-workaround.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" + +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= " +} + +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}"/make/Makefile || 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 mandoc + cd "${WORKDIR}/lib/libmandoc" || die + freebsd_src_compile -j1 + + cd "${S}" || die + local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) + multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1 +} + +src_install() { + 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 +} diff --git a/sys-freebsd/freebsd-ubin/freebsd-ubin-10.3.ebuild b/sys-freebsd/freebsd-ubin/freebsd-ubin-10.3.ebuild deleted file mode 100644 index e97f6ee5c9fe..000000000000 --- a/sys-freebsd/freebsd-ubin/freebsd-ubin-10.3.ebuild +++ /dev/null @@ -1,207 +0,0 @@ -# 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}-setXid.patch" - "${FILESDIR}/${PN}-lint-stdarg.patch" - "${FILESDIR}/${PN}-8.0-xinstall.patch" - "${FILESDIR}/${PN}-9.1-bsdar.patch" - "${FILESDIR}/${PN}-9.1-minigzip.patch" - "${FILESDIR}/${PN}-10.0-atf.patch" - "${FILESDIR}/${PN}-10.0-dtc-gcc46.patch" - "${FILESDIR}/${PN}-10.0-kdump-ioctl.patch" - "${FILESDIR}/${PN}-10.0-mandoc.patch" - "${FILESDIR}/${PN}-10.2-bsdxml.patch" - "${FILESDIR}/${PN}-10.2-talk-workaround.patch" - "${FILESDIR}/${PN}-10.3-bmake-workaround.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" - -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= " -} - -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}"/make/Makefile || 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 mandoc - cd "${WORKDIR}/lib/libmandoc" || die - freebsd_src_compile -j1 - - cd "${S}" || die - local MULTIBUILD_VARIANTS=( $(multilib_get_enabled_abis) ) - multibuild_foreach_variant freebsd_multilib_multibuild_wrapper setup_multilib_vars freebsd_src_compile -j1 -} - -src_install() { - 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 -} -- cgit v1.2.3-65-gdbad