Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-sources: freebsd-sources-10.1-r6.ebuild ChangeLog freebsd-sources-10.1-r5.ebuild
Date: Wed, 29 Jul 2015 12:14:54
Message-Id: 20150729121443.0E9AE11D@oystercatcher.gentoo.org
1 mgorny 15/07/29 12:14:43
2
3 Modified: ChangeLog
4 Added: freebsd-sources-10.1-r6.ebuild
5 Removed: freebsd-sources-10.1-r5.ebuild
6 Log:
7 Fix FreeBSD-SA-15:15.tcp. https://github.com/gentoo/gentoo-portage-rsync-mirror/pull/187 by nigoro.
8
9 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
10
11 Revision Changes Path
12 1.117 sys-freebsd/freebsd-sources/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.117&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.117&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?r1=1.116&r2=1.117
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v
21 retrieving revision 1.116
22 retrieving revision 1.117
23 diff -u -r1.116 -r1.117
24 --- ChangeLog 25 Jul 2015 12:07:51 -0000 1.116
25 +++ ChangeLog 29 Jul 2015 12:14:42 -0000 1.117
26 @@ -1,6 +1,13 @@
27 # ChangeLog for sys-freebsd/freebsd-sources
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.116 2015/07/25 12:07:51 mgorny Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.117 2015/07/29 12:14:42 mgorny Exp $
31 +
32 +*freebsd-sources-10.1-r6 (29 Jul 2015)
33 +
34 + 29 Jul 2015; Michał Górny <mgorny@g.o> +freebsd-sources-10.1-r6.ebuild,
35 + -freebsd-sources-10.1-r5.ebuild:
36 + Fix FreeBSD-SA-15:15.tcp. https://github.com/gentoo/gentoo-portage-rsync-
37 + mirror/pull/187 by nigoro.
38
39 *freebsd-sources-10.1-r5 (25 Jul 2015)
40
41
42
43
44 1.1 sys-freebsd/freebsd-sources/freebsd-sources-10.1-r6.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-10.1-r6.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-10.1-r6.ebuild?rev=1.1&content-type=text/plain
48
49 Index: freebsd-sources-10.1-r6.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-10.1-r6.ebuild,v 1.1 2015/07/29 12:14:42 mgorny Exp $
54
55 EAPI=5
56
57 inherit bsdmk freebsd flag-o-matic toolchain-funcs
58
59 DESCRIPTION="FreeBSD kernel sources"
60 SLOT="0"
61
62 IUSE="+build-kernel debug dtrace zfs"
63
64 # Security Advisory and Errata patches.
65 UPSTREAM_PATCHES=( "SA-15:02/sctp.patch"
66 "SA-15:03/sctp.patch"
67 "SA-15:04/igmp.patch"
68 "SA-15:04/igmp-errata.patch"
69 "SA-15:09/ipv6.patch"
70 "SA-15:13/tcp.patch"
71 "SA-15:15/tcp-9.3-10.1.patch"
72 "EN-15:01/vt.patch"
73 "EN-15:05/ufs.patch"
74 "EN-15:07/zfs.patch" )
75
76 if [[ ${PV} != *9999* ]]; then
77 KEYWORDS="~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
78 SRC_URI="${SRC_URI}
79 $(freebsd_upstream_patches)"
80 fi
81
82 EXTRACTONLY="
83 sys/
84 contrib/bmake/
85 usr.bin/bmake/
86 "
87 use zfs && EXTRACTONLY+="cddl/"
88
89 RDEPEND="dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 )
90 =sys-freebsd/freebsd-mk-defs-${RV}*
91 !sys-freebsd/virtio-kmod
92 !sys-fs/fuse4bsd
93 !<sys-freebsd/freebsd-sources-9.2_beta1"
94 DEPEND="build-kernel? (
95 dtrace? ( >=sys-freebsd/freebsd-cddl-9.2_rc1 )
96 >=sys-freebsd/freebsd-usbin-9.1
97 =sys-freebsd/freebsd-mk-defs-${RV}*
98 )"
99
100 RESTRICT="strip binchecks"
101
102 S="${WORKDIR}/sys"
103
104 KERN_BUILD=GENTOO
105
106 PATCHES=( "${FILESDIR}/${PN}-9.0-disable-optimization.patch"
107 "${FILESDIR}/${PN}-10.0-gentoo.patch"
108 "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
109 "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
110 "${FILESDIR}/${PN}-8.0-subnet-route-pr40133.patch"
111 "${FILESDIR}/${PN}-7.1-includes.patch"
112 "${FILESDIR}/${PN}-9.0-sysctluint.patch"
113 "${FILESDIR}/${PN}-9.2-gentoo-gcc.patch"
114 "${FILESDIR}/${PN}-10.1-gcc48.patch" )
115
116 pkg_setup() {
117 # WITHOUT_SSP= is required to boot kernel that compiled with newer gcc, bug #477914
118 [[ $(tc-getCC) == *gcc* ]] && mymakeopts="${mymakeopts} WITHOUT_SSP="
119 use zfs || mymakeopts="${mymakeopts} WITHOUT_CDDL="
120 }
121
122 src_prepare() {
123 local conf="${S}/$(tc-arch-kernel)/conf/${KERN_BUILD}"
124
125 # This replaces the gentoover patch, it doesn't need reapply every time.
126 sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
127 -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
128 -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
129 "${S}/conf/newvers.sh"
130
131 # __FreeBSD_cc_version comes from FreeBSD's gcc.
132 # on 10.0-RELEASE it's 1000001.
133 # FYI, can get it from gnu/usr.bin/cc/cc_tools/freebsd-native.h.
134 sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=1000001:g" \
135 -i "${S}/conf/kern.pre.mk" \
136 -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version"
137
138 # Remove -Werror
139 sed -e "s:-Werror:-Wno-error:g" \
140 -i "${S}/conf/kern.pre.mk" \
141 -i "${S}/conf/kmod.mk" || die
142
143 # Set the kernel configuration using USE flags.
144 cp -f "${FILESDIR}/config-GENTOO" "${conf}" || die
145 use debug || echo 'nomakeoptions DEBUG' >> "${conf}"
146 use dtrace || echo 'nomakeoptions WITH_CTF' >> "${conf}"
147
148 # Only used with USE=build-kernel, let the kernel build with its own flags, its safer.
149 unset LDFLAGS CFLAGS CXXFLAGS ASFLAGS KERNEL
150 }
151
152 src_configure() {
153 if use build-kernel ; then
154 tc-export CC
155 cd "${S}/$(tc-arch-kernel)/conf" || die
156 config ${KERN_BUILD} || die
157 fi
158 }
159
160 src_compile() {
161 if use build-kernel ; then
162 if has_version "<sys-freebsd/freebsd-ubin-10.0"; then
163 cd "${WORKDIR}"/usr.bin/bmake || die
164 CC=${CHOST}-gcc freebsd_src_compile
165 export BMAKE="${WORKDIR}/usr.bin/bmake/make"
166 fi
167 cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die
168 freebsd_src_compile depend
169 freebsd_src_compile
170 else
171 einfo "Nothing to compile.."
172 fi
173 }
174
175 src_install() {
176 if use build-kernel ; then
177 cd "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}" || die
178 freebsd_src_install
179 rm -rf "${S}/$(tc-arch-kernel)/compile/${KERN_BUILD}"
180 cd "${S}"
181 fi
182
183 insinto "/usr/src/sys"
184 doins -r "${S}/".
185 if use zfs ; then
186 insinto "/usr/src/cddl"
187 doins -r "${WORKDIR}/cddl/".
188 fi
189 }
190
191 pkg_preinst() {
192 if [[ -L "${ROOT}/usr/src/sys" ]]; then
193 einfo "/usr/src/sys is a symlink, removing it..."
194 rm -f "${ROOT}/usr/src/sys"
195 fi
196
197 if use sparc-fbsd ; then
198 ewarn "WARNING: kldload currently causes kernel panics"
199 ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
200 ewarn "we need gcc-4.1 to compile the kernel correctly :/"
201 ewarn "Please compile all modules you need into the kernel"
202 fi
203
204 ewarn "If you want manual compile (not recommended), please don't forget the following step."
205 if ! use sparc-fbsd ; then
206 ewarn "export CC=clang"
207 ewarn "export CXX=clang++"
208 fi
209 if ! use zfs ; then
210 ewarn "export WITHOUT_CDDL="
211 ewarn "Note, Please set USE=zfs if you want to enable modules of CDDL license."
212 fi
213 if ! use dtrace && ! has_version '>=sys-freebsd/freebsd-cddl-9.2_beta1' ; then
214 ewarn "GENERIC config require sys-freebsd/freebsd-cddl. Please emerge it."
215 fi
216 }