mgorny      15/05/24 08:45:46

  Modified:             ChangeLog
  Added:                freebsd-sources-10.1-r3.ebuild
  Removed:              freebsd-sources-10.1-r2.ebuild
  Log:
  Fix FreeBSD Errata. Fix build failure with USE=zfs, reported by NP-Hardass. 
https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/121 by nigoro.
  
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 
EFB4464E!)

Revision  Changes    Path
1.111                sys-freebsd/freebsd-sources/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.111&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.111&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?r1=1.110&r2=1.111

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- ChangeLog   10 Apr 2015 13:34:44 -0000      1.110
+++ ChangeLog   24 May 2015 08:45:46 -0000      1.111
@@ -1,6 +1,17 @@
 # ChangeLog for sys-freebsd/freebsd-sources
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 
1.110 2015/04/10 13:34:44 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 
1.111 2015/05/24 08:45:46 mgorny Exp $
+
+*freebsd-sources-10.1-r3 (24 May 2015)
+
+  24 May 2015; Michał Górny <[email protected]> 
+freebsd-sources-10.1-r3.ebuild,
+  -files/freebsd-sources-10.1-cve-2014-8612.patch,
+  -files/freebsd-sources-10.1-cve-2014-8613.patch,
+  -files/freebsd-sources-10.1-cve-2015-1414.patch,
+  -files/freebsd-sources-10.1-cve-2015-2923.patch,
+  -files/freebsd-sources-10.1-en-1501-vt.patch, 
-freebsd-sources-10.1-r2.ebuild:
+  Fix FreeBSD Errata. Fix build failure with USE=zfs, reported by NP-Hardass.
+  https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/121 by nigoro.
 
 *freebsd-sources-10.1-r2 (10 Apr 2015)
 



1.1                  sys-freebsd/freebsd-sources/freebsd-sources-10.1-r3.ebuild

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-10.1-r3.ebuild?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-10.1-r3.ebuild?rev=1.1&content-type=text/plain

Index: freebsd-sources-10.1-r3.ebuild
===================================================================
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 
/var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-10.1-r3.ebuild,v
 1.1 2015/05/24 08:45:46 mgorny Exp $

EAPI=5

inherit bsdmk freebsd flag-o-matic toolchain-funcs

DESCRIPTION="FreeBSD kernel sources"
SLOT="0"

IUSE="+build-kernel debug dtrace profile zfs"

# Security Advisory and Errata patches.
UPSTREAM_PATCHES=( "SA-15:02/sctp.patch"
        "SA-15:03/sctp.patch"
        "SA-15:04/igmp.patch"
        "SA-15:04/igmp-errata.patch"
        "SA-15:09/ipv6.patch"
        "EN-15:01/vt.patch"
        "EN-15:05/ufs.patch" )

if [[ ${PV} != *9999* ]]; then
        KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
        SRC_URI="http://dev.gentoo.org/~mgorny/dist/freebsd/${RV}/${SYS}.tar.xz
                
http://dev.gentoo.org/~mgorny/dist/freebsd/${RV}/${CONTRIB}.tar.xz
                http://dev.gentoo.org/~mgorny/dist/freebsd/${RV}/${UBIN}.tar.xz
                zfs? ( 
http://dev.gentoo.org/~mgorny/dist/freebsd/${RV}/${CDDL}.tar.xz )
                $(freebsd_upstream_patches)"
fi

RDEPEND="dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 )
        =sys-freebsd/freebsd-mk-defs-${RV}*
        !sys-freebsd/virtio-kmod
        !sys-fs/fuse4bsd
        !<sys-freebsd/freebsd-sources-9.2_beta1"
DEPEND="build-kernel? (
                dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 )
                !sparc-fbsd? ( sys-devel/clang )
                >=sys-freebsd/freebsd-usbin-9.1
                =sys-freebsd/freebsd-mk-defs-${RV}*
        )"

RESTRICT="strip binchecks"

S="${WORKDIR}/sys"

KERN_BUILD=GENTOO

PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch"
        "${FILESDIR}/${PN}-10.0-gentoo.patch"
        "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
        "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
        "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch"
        "${FILESDIR}/${PN}-7.1-includes.patch"
        "${FILESDIR}/${PN}-9.0-sysctluint.patch"
        "${FILESDIR}/${PN}-9.2-gentoo-gcc.patch" )

pkg_setup() {
        # Force set CC=clang. when using gcc, aesni fails to build.
        use sparc-fbsd || export CC=clang
        use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL="
}

src_prepare() {
        local conf="${S}/$(tc-arch-kernel)/conf/${KERN_BUILD}"

        # 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 10.0-RELEASE it's 1000001.
        # FYI, can get it from gnu/usr.bin/cc/cc_tools/freebsd-native.h.
        sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=1000001:g" \
                -i "${S}/conf/kern.pre.mk" \
                -i "${S}/conf/kmod.mk" || die "Couldn't set 
__FreeBSD_cc_version"

        # Remove -Werror
        sed -e "s:-Werror:-Wno-error:g" \
                -i "${S}/conf/kern.pre.mk" \
                -i "${S}/conf/kmod.mk" || die

        # Set the kernel configuration using USE flags.
        cp -f "${FILESDIR}/config-GENTOO" "${conf}" || die
        use debug || echo 'nomakeoptions DEBUG' >> "${conf}"
        use dtrace || echo 'nomakeoptions WITH_CTF' >> "${conf}"

        # Only used with USE=build-kernel, let the kernel build with its own 
flags, its safer.
        unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL
}

src_configure() {
        if use build-kernel ; then
                tc-export CC
                cd "${S}/$(tc-arch-kernel)/conf" || die
                config ${KERN_BUILD} || die
        fi
}

src_compile() {
        if use build-kernel ; then
                if has_version "<sys-freebsd/freebsd-ubin-10.0"; then
                        cd "${WORKDIR}"/usr.bin/bmake || die
                        CC=${CHOST}-gcc freebsd_src_compile
                        export BMAKE="${WORKDIR}/usr.bin/bmake/make"
                fi
                cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die
                freebsd_src_compile depend
                freebsd_src_compile
        else
                einfo "Nothing to compile.."
        fi
}

src_install() {
        if use build-kernel ; then
                cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die
                freebsd_src_install
                rm -rf "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}"
                cd "${S}"
        fi

        insinto "/usr/src/sys"
        doins -r "${S}/".
        if use zfs ; then
                insinto "/usr/src/cddl"
                doins -r "${WORKDIR}/cddl/".
        fi
}

pkg_preinst() {
        if [[ -L "${ROOT}/usr/src/sys" ]]; then
                einfo "/usr/src/sys is a symlink, removing it..."
                rm -f "${ROOT}/usr/src/sys"
        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

        ewarn "If you want manual compile (not recommended), please don't 
forget the following step."
        if ! use sparc-fbsd ; then
                ewarn "export CC=clang"
                ewarn "export CXX=clang++"
        fi
        if ! use zfs ; then
                ewarn "export WITHOUT_CDDL="
                ewarn "Note, Please set USE=zfs if you want to enable modules 
of CDDL license."
        fi
        if ! use dtrace && ! has_version '>=sys-freebsd/freebsd-cddl-9.2_beta1' 
; then
                ewarn "GENERIC config require sys-freebsd/freebsd-cddl. Please 
emerge it."
        fi
}




Reply via email to