Gentoo Archives: gentoo-commits

From: "Alexis Ballier (aballier)" <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-freebsd/freebsd-sources: ChangeLog freebsd-sources-7.2-r1.ebuild
Date: Fri, 26 Jun 2009 05:50:22
Message-Id: E1MK4KK-0006PG-3M@stork.gentoo.org
1 aballier 09/06/26 05:50:20
2
3 Modified: ChangeLog
4 Added: freebsd-sources-7.2-r1.ebuild
5 Log:
6 Add patches for the two latest security advisories for FreeBSD kernel.
7 (Portage version: 2.2_rc33/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.50 sys-freebsd/freebsd-sources/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.50&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?rev=1.50&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog?r1=1.49&r2=1.50
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v
19 retrieving revision 1.49
20 retrieving revision 1.50
21 diff -u -r1.49 -r1.50
22 --- ChangeLog 22 May 2009 13:50:44 -0000 1.49
23 +++ ChangeLog 26 Jun 2009 05:50:20 -0000 1.50
24 @@ -1,6 +1,13 @@
25 # ChangeLog for sys-freebsd/freebsd-sources
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.49 2009/05/22 13:50:44 aballier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.50 2009/06/26 05:50:20 aballier Exp $
29 +
30 +*freebsd-sources-7.2-r1 (26 Jun 2009)
31 +
32 + 26 Jun 2009; Alexis Ballier <aballier@g.o>
33 + +freebsd-sources-7.2-r1.ebuild, +files/freebsd-sources-7.2-ipv6.patch,
34 + +files/freebsd-sources-7.2-pipe.patch:
35 + Add patches for the two latest security advisories for FreeBSD kernel.
36
37 *freebsd-sources-7.2 (22 May 2009)
38
39
40
41
42 1.1 sys-freebsd/freebsd-sources/freebsd-sources-7.2-r1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-7.2-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-7.2-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: freebsd-sources-7.2-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2009 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-7.2-r1.ebuild,v 1.1 2009/06/26 05:50:20 aballier Exp $
52
53 inherit bsdmk freebsd flag-o-matic
54
55 DESCRIPTION="FreeBSD kernel sources"
56 SLOT="${PVR}"
57 KEYWORDS="~sparc-fbsd ~x86-fbsd"
58
59 IUSE="symlink"
60
61 SRC_URI="mirror://gentoo/${SYS}.tar.bz2"
62
63 RDEPEND=">=sys-freebsd/freebsd-mk-defs-7.0"
64 DEPEND=""
65
66 RESTRICT="strip binchecks"
67
68 S="${WORKDIR}/sys"
69
70 MY_PVR="${PVR}"
71
72 [[ ${MY_PVR} == "${RV}" ]] && MY_PVR="${MY_PVR}-r0"
73
74 src_unpack() {
75 unpack ${A}
76 cd "${S}"
77
78 # This replaces the gentoover patch, it doesn't need reapply every time.
79 sed -i -e 's:^REVISION=.*:REVISION="'${PVR}'":' \
80 -e 's:^BRANCH=.*:BRANCH="Gentoo":' \
81 -e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
82 "${S}/conf/newvers.sh"
83
84 # __FreeBSD_cc_version comes from FreeBSD's gcc.
85 # on 7.0-RELEASE it's 700003.
86 sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=700004:g" \
87 -i "${S}/conf/kern.pre.mk" \
88 -i "${S}/conf/kmod.mk" || die "Couldn't set __FreeBSD_cc_version"
89
90 epatch "${FILESDIR}/${PN}-7.0-gentoo.patch"
91 epatch "${FILESDIR}/${PN}-6.0-flex-2.5.31.patch"
92 epatch "${FILESDIR}/${PN}-7.1-asm.patch"
93 epatch "${FILESDIR}/${PN}-7.0-werror.patch"
94 epatch "${FILESDIR}/${PN}-7.2-sparc64.patch"
95 epatch "${FILESDIR}/${PN}-6.1-ntfs.patch"
96 epatch "${FILESDIR}/${PN}-7.2-debug-O2.patch"
97 epatch "${FILESDIR}/${PN}-7.1-types.h-fix.patch"
98 epatch "${FILESDIR}/${PN}-7.1-subnet-route-pr40133.patch"
99 epatch "${FILESDIR}/${PN}-7.1-includes.patch"
100 epatch "${FILESDIR}/${PN}-7.2-pipe.patch"
101 epatch "${FILESDIR}/${PN}-7.2-ipv6.patch"
102
103 # Disable SSP for the kernel
104 grep -Zlr -- -ffreestanding "${S}" | xargs -0 sed -i -e \
105 "s:-ffreestanding:-ffreestanding $(test-flags -fno-stack-protector -fno-stack-protector-all):g"
106
107 # By adding -DGENTOO_LIVECD to CFLAGS activate this stub
108 # vop_whiteout to tmpfs, so it can be used as an overlay
109 # unionfs filesystem over the cd9660 readonly filesystem.
110 epatch "${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch"
111
112 # See http://sourceware.org/bugzilla/show_bug.cgi?id=5391
113 # ld doesn't provide symbols constructed as the __start_set_(s) ones
114 # are on FreeBSD modules.
115 # This patch adds code to generate a list of these and adds them
116 # as undefined references to ld's commandline to get them.
117 # Without this kernel modules will not load.
118 epatch "${FILESDIR}/${PN}-7.1-binutils_link.patch"
119 }
120
121 src_compile() {
122 einfo "Nothing to compile.."
123 }
124
125 src_install() {
126 insinto "/usr/src/sys-${MY_PVR}"
127 doins -r "${S}/"*
128 }
129
130 pkg_postinst() {
131 if [[ ! -L "${ROOT}/usr/src/sys" ]]; then
132 einfo "/usr/src/sys symlink doesn't exist; creating symlink to sys-${MY_PVR}..."
133 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
134 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
135 # just in case...
136 [[ -L ""${ROOT}/usr/src/sys-${RV}"" ]] && rm "${ROOT}/usr/src/sys-${RV}"
137 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
138 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
139 elif use symlink; then
140 einfo "Updating /usr/src/sys symlink to sys-${MY_PVR}..."
141 rm "${ROOT}/usr/src/sys" "${ROOT}/usr/src/sys-${RV}" || \
142 eerror "Couldn't remove previous symlinks, please fix manually."
143 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys" || \
144 eerror "Couldn't create ${ROOT}/usr/src/sys symlink."
145 ln -sf "sys-${MY_PVR}" "${ROOT}/usr/src/sys-${RV}" || \
146 eerror "Couldn't create ${ROOT}/usr/src/sys-${RV} symlink."
147 fi
148
149 if use sparc-fbsd ; then
150 ewarn "WARNING: kldload currently causes kernel panics"
151 ewarn "on sparc64. This is probably a gcc-4.1 issue, but"
152 ewarn "we need gcc-4.1 to compile the kernel correctly :/"
153 ewarn "Please compile all modules you need into the kernel"
154 fi
155 }