summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-08-15 09:57:24 +0200
committerMichał Górny <mgorny@gentoo.org>2018-08-15 12:32:39 +0200
commitef0aa29de614e272bfaf72978adf9780ad38887f (patch)
treedca588da9832fb8da54e5f746f781db738cfcc65
parentdev-util/ccache: bump up to 3.4.2, bug #647200 (diff)
downloadgentoo-ef0aa29de614e272bfaf72978adf9780ad38887f.tar.gz
gentoo-ef0aa29de614e272bfaf72978adf9780ad38887f.tar.bz2
gentoo-ef0aa29de614e272bfaf72978adf9780ad38887f.zip
sys-freebsd/freebsd-sources: include multiple errata updates
The following security advisory patches are included: FreeBSD-SA-18:01.ipsec FreeBSD-SA-18:03.speculative_execution FreeBSD-SA-18:04.vt FreeBSD-SA-18:05.ipsec FreeBSD-SA-18:06.debugreg FreeBSD-SA-18:07.lazyfpu Additionally, the following erratas are included: FreeBSD-EN-18:04.mem FreeBSD-EN-18:05.mem FreeBSD-EN-18:07.pmap
-rw-r--r--sys-freebsd/freebsd-sources/Manifest10
-rw-r--r--sys-freebsd/freebsd-sources/freebsd-sources-11.1_p3.ebuild188
2 files changed, 198 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-sources/Manifest b/sys-freebsd/freebsd-sources/Manifest
index b2eb5642042..6a22e2a51a3 100644
--- a/sys-freebsd/freebsd-sources/Manifest
+++ b/sys-freebsd/freebsd-sources/Manifest
@@ -1,5 +1,15 @@
+DIST freebsd-sources-11.1_p3-patchset.tar.xz 36348 BLAKE2B b88f8a0f0bfde97a0416967c76ffb1d8fcb3f9050d69caa83941ab38e289622a9a5d25887e895d364f333980f7ab21af454d6fbe48157119279b4a0b600856ff SHA512 c981eee806ad93ebc720434789da1ae38f21a131ec8f92c3e55dab4e5fbc61e225c615132bb971e2b9bf4bc6922b2c7bdd9117644e8ba6547c20857deea0bbc1
DIST freebsd-sources-EN-1707-vnet.patch 356 BLAKE2B 6e586e8cc767c0f177b6f1175512c4d5bd4fdf9abb94b644348dbe8b681d4838bdba8c83496ae351fb075329fed4e270bdd8768ce63e8c99fc69ba36d3040d8c SHA512 2fdb58388acb98811588beeabaf8a533926f96ac3f594f53dd80dcdb38ede4fe0dd66f0dd7bb32b40a27f756e2b03fed91c4416cbdcd4c16dd8143f5438885d7
DIST freebsd-sources-EN-1708-pf.patch 706 BLAKE2B 7b812c1d696f2a1ab6e648228fe4fce8b8e32f57ed8dc713b24db5dacca70e693ee24001f0db168d79c528e2c20c6011ac423629a807949757e9f468969c3127 SHA512 e9dc61ff10aafb9b92721c599577ce995458b8a1a93b31fc6cc39b910db2b8f965ff0354a45bf82d2d57abba7aa0bf6d2f002044d242e19121d5ee4cd7a1dc15
+DIST freebsd-sources-EN-1804-mem.11.patch 2932 BLAKE2B 41eb2445cbc9a339f21b64ae0aa64b477c6691540236b8b3c378475fa3f451b35f3e9793eae240f15364b39b0a9fda0971c92f4dadb0933c103a933db154a718 SHA512 feb22d2cc614c0fc80eea5410894a9f0c091ec77e01810fe1476a8702624331e3a45d44e1de15945586dfa0a334a12442f46e61ad148fa555e4900d486f79185
+DIST freebsd-sources-EN-1805-mem.11.1.patch 4106 BLAKE2B 598b12547f66e1cb3b915878bb37f73c6a028655f78cb50f8fb113af4c0a31f6ba82f884de4b79151b6512bc67aa8a2cc404c5bce6ffcf07dada37426eb5082c SHA512 ec80584da7ba7f6d0b6039b9a4acb151b18fcf5671a805c52911a97fc53cc5bcc5cfe427d37f91fcb130f437a134eed7d746b652131591fc28986d18d5b3a48c
+DIST freebsd-sources-EN-1807-pmap.patch 1639 BLAKE2B 437379a0471f1c36dcebfcce471d1e65426773c96a18ad4f4272c3617cecedce45b6a09a518a45947b36d1e1d47aa485839f24fa24d4b8dea14fd9f7fb5b480f SHA512 f3a482fc573ccee1ed779a3fc4bbd5c54a0a93395ca83e4e5b36293ce3b298545b4f9e1bb91c557d00d89890a2ef3c425e966077de4fccdb670059519bb75b44
DIST freebsd-sources-SA-1708-ptrace.patch 696 BLAKE2B d040de29c3aca8fbc5d837c574e5ee81196ba41f1a90720579e854ba4e9786e23545547892d4e6d90c850161a53aaef7de014cbb918c45a261aea56b02cd2d7b SHA512 973bfe4e594fe34340ae723b3451a1b84a9877b51e1e14e8cd0a9944bec5bc4efec6ff39ba61998c1da1f2c2df0fe17272b3dad2e2cc3880cfa0ff6017d2730e
DIST freebsd-sources-SA-1710-kldstat.patch 2155 BLAKE2B e2c47d72a4a497283d7def916cdf0991b5ec791f545736474db18301866362b3c96f0a4ac5e7c1c2a91535961ac048e5e1c1e7ad10d10ced3dba954453a04ef5 SHA512 a5cc0acfcac8401fb4066fd5bfbaa1c5718a38f05877b8fb1c5a9cce1df9af4a82bd1c263c80c2b58ad058349753dcec9c4aa13bdb178f3b80493785badc65a4
+DIST freebsd-sources-SA-1801-ipsec-11.patch 1153 BLAKE2B bc7b0fb85a5d03873cf8dc61c2478b450167f8d0d5f9094c14cf9a3647a9d1ecdee8245ba45e70270aa95e21f112a0c10978a57b41ecbafa0a5392c101bef4b0 SHA512 034777a8f5bacd73ae989747bdb1669747d7af0e1655cb033e95068a2318063301b05a2ddbb3debbfd32f938c77bef1614535b6a667a511bf3f0287fb6e1667c
+DIST freebsd-sources-SA-1804-vt.patch 640 BLAKE2B 2cf3dcecfac7b33136c47c5fad23840c98c19ae7690fdd6520eacb4779d3101a615a1416c5337a0fe740cc56d7ea19ed4de9481ccced73a5322610950637fecb SHA512 461ca668363f1b334b626b7256830d1abe249d8c76417e524a366a2643676c8681127cd8c326dfe7cd1b1ee3ad67fb4819f08fd2a2db9b5b7a108171e8777a5b
+DIST freebsd-sources-SA-1805-ipsec.patch 3182 BLAKE2B 43c7e5b80a4b552c167efcca392fc1ec5d6aed3c425d081a63b9e221aed92f891674fc6f9b17805e449c806422d4b8624e773e4b463d50b51ec629197a014004 SHA512 116d9a6d67452863e5dc12124ad3bad4a29c472755235e65f97f474e048ba7f9a4711d0f73d1301072aa31281d3f444fded4b6e429e4f28367c713708402d33a
+DIST freebsd-sources-SA-1806-debugreg.11.1.patch 10505 BLAKE2B 1071869efe163bcba8b118cde3eb85a5a3cf31f589f270735b63d9f670a12d17fcf4bca297d266c5d8a89e73ee20abaf0ef0193a1d9d5cbce934e34946cee827 SHA512 06386a69b386f05ecb115d8dd511ca2afa6b8fe18290eab92357b111e62277b7180ea116620ce854a12ae6f42f997a0d57db8c7fdeb42584f8711c23ab50db44
+DIST freebsd-sources-SA-1807-lazyfpu-11.patch 10024 BLAKE2B 0dfa6e0a86d6227230a686963f80dbc4c512486471c02577d769110899e74e8064f3cdab45afb29a8283bf9423bd521c085d70174560361529b21fddea1787a6 SHA512 932cead50235a77b8bb0a41b600e7bb1722dd5b5d95601d30041a953b0c1a6a421d794138f1b6adfcb71e5e1904f09288e8ec3a8ce7f9c879ad8d9c77ffdb162
+DIST freebsd-sources-SA-1809-l1tf-11.1.patch 5357 BLAKE2B f7b93d61a63827908afc66fd5f28b15c4e951a7f50038eba92f7d3b824c771fb22fc6ea4e55316c0565ac73e2f27af0f39a189a7ee3f8914ed4d87819208959d SHA512 9920f43f5cf26bc72b7cb704276073a1f44a57dec340cdd369d119465d3f4a6585fa760d164c246c101f629af30d74c249b2892e5b25f17534a1d7caff98263c
DIST freebsd-src-11.1.tar.xz 147661560 BLAKE2B a9e6ba9d0e12c8b56ac58575d5f02931edbb6a3545d9dccae78810d2d0470a29b29dd7f724b03b8afafbca23717a71346e4cfbd3530e0f40118a23609c3f414e SHA512 b97707ec7a601ca6bcb682c45f6d94a38484301ac24630d7285eff6f88b027ce6900c93fc62f8ce36e0cf32c91f73a9d1c999db397b7f8782fd74a8551a03aca
diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-11.1_p3.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-11.1_p3.ebuild
new file mode 100644
index 00000000000..2fb9e00362f
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/freebsd-sources-11.1_p3.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bsdmk freebsd flag-o-matic toolchain-funcs
+
+DESCRIPTION="FreeBSD kernel sources"
+SRC_URI+="
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.xz"
+
+SLOT="0"
+LICENSE="BSD dtrace? ( CDDL ) zfs? ( CDDL )"
+
+IUSE="+build-kernel debug dtrace zfs"
+
+# Security Advisory and Errata patches.
+# (commented out patches go via FILESDIR/PATCHES)
+UPSTREAM_PATCHES=(
+ "SA-17:08/ptrace.patch"
+ "SA-17:10/kldstat.patch"
+ "EN-17:07/vnet.patch"
+ "EN-17:08/pf.patch"
+ "SA-18:01/ipsec-11.patch"
+# "SA-18:03/speculative_execution-amd64-11.patch"
+ "SA-18:04/vt.patch"
+ "SA-18:05/ipsec.patch"
+ "EN-18:04/mem.11.patch"
+ "EN-18:05/mem.11.1.patch"
+ "SA-18:06/debugreg.11.1.patch"
+ "SA-18:07/lazyfpu-11.patch"
+ "EN-18:07/pmap.patch"
+# "SA-18:08/tcp-11.patch"
+ "SA-18:09/l1tf-11.1.patch"
+# "SA-18:10/ip.patch"
+)
+
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64-fbsd ~x86-fbsd"
+ SRC_URI="${SRC_URI}
+ $(freebsd_upstream_patches)"
+fi
+
+EXTRACTONLY="sys/"
+
+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 )
+ >=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}-6.0-flex-2.5.31.patch"
+ "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch"
+ "${FILESDIR}/${PN}-7.1-includes.patch"
+ "${FILESDIR}/${PN}-9.0-sysctluint.patch"
+ "${FILESDIR}/${PN}-11.0-gentoo.patch"
+ "${FILESDIR}/${PN}-11.0-gentoo-gcc.patch"
+ "${FILESDIR}/${PN}-10.1-gcc48.patch"
+
+ "${WORKDIR}/${P}-patchset/${PN}-SA-1803-speculative_execution-amd64-11.patch"
+ "${WORKDIR}/${P}-patchset/${PN}-SA-1808-tcp-11.patch"
+ "${WORKDIR}/${P}-patchset/${PN}-SA-1810-ip.patch"
+)
+
+pkg_setup() {
+ # Add the required source files.
+ use dtrace && EXTRACTONLY+="cddl/ "
+
+ # WITHOUT_SSP= is required to boot kernel that compiled with newer gcc, bug #477914
+ [[ $(tc-getCC) == *gcc* ]] && mymakeopts="${mymakeopts} WITHOUT_SSP= WITHOUT_FORMAT_EXTENSIONS="
+ use dtrace || mymakeopts="${mymakeopts} WITHOUT_CDDL="
+ use zfs || mymakeopts="${mymakeopts} WITHOUT_ZFS="
+}
+
+src_unpack() {
+ unpack "${P}-patchset.tar.xz"
+ freebsd_src_unpack
+}
+
+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 11.0-RELEASE it's 1100001.
+ # FYI, we can get it from gnu/usr.bin/cc/cc_tools/freebsd-native.h.
+ sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=1100001: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}"
+
+ # hyperv fails to compile on x86-fbsd.
+ if use x86-fbsd && [[ $(tc-getCC) == *gcc* ]] ; then
+ echo 'nodevice hyperv' >> "${conf}"
+ dummy_mk modules/hyperv
+ fi
+
+ # 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
+ 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 dtrace ; 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 to manually compile (not recommended), please don't forget the following steps."
+# 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 under the CDDL."
+ fi
+ if ! use dtrace && ! has_version '>=sys-freebsd/freebsd-cddl-9.2_beta1' ; then
+ ewarn "The GENERIC config requires sys-freebsd/freebsd-cddl. Please emerge it."
+ fi
+}