Permalink
Browse files

openvz-rhel6-stable-2.6.32.042.053.5 update

  • Loading branch information...
1 parent c409670 commit 989db555eaeca09f5d9f034dfe546e546f841d09 @angryvincent angryvincent committed Apr 16, 2012
View
3 sys-kernel/openvz-rhel6-stable/Manifest
@@ -6,8 +6,11 @@ DIST config-2.6.32-042stab044.17.i686 105165 RMD160 5f35eedf01e10f8e351183597894
DIST config-2.6.32-042stab044.17.x86_64 100385 RMD160 382bb4548c089f50ab861ec45395b4dce879c22a SHA1 e8bfc608173211f0de3aad6b83aeb7bc2bc6f91d SHA256 bd5249d1a6e505e48d9131dcf8c5526413c9ab25061e458f8167449e8e29d8d6
DIST config-2.6.32-042stab049.6.i686 105965 RMD160 85c5e309d781d22e3ca9ef60d5430e46870b3443 SHA1 834de68f9d6b77cb4c2a9c368aaf5bd44cc62409 SHA256 f78da97369a2074dfec2b1dcad1775e4c9a568a128be763922de9e24ba4458df
DIST config-2.6.32-042stab049.6.x86_64 101162 RMD160 1ea43042a416b955c17d15ee204bfb5d7b767c6b SHA1 309e17296bf814cdee4cbd29e9e68169b37e9454 SHA256 a58f83ee196163e5d4f5ee8e1bf4cad8b0cb46e9c587db28fbf49f82dc5b034c
+DIST config-2.6.32-042stab053.5.i686 106048 RMD160 234581fdcd958b075f855bbe160c90aff73047b7 SHA1 77ae813713fb78f93bf247f6b482edfb599ef116 SHA256 4e6eaeeba3af5f18220640a0b368d85fa96f2c275c23422a1a6ac44ab71ca13f
+DIST config-2.6.32-042stab053.5.x86_64 101272 RMD160 d7ca31b83e4349ee22f0282a58a04c48c3ed7515 SHA1 c3af08c1deb3dc55e080e0e3fb5efe88a2acf55f SHA256 f179294688626f40100b3850a1ce23bd2943fa46d4b05512da51a0185690379b
DIST linux-2.6.32.tar.bz2 64424138 RMD160 b93742cbaf8174f2200d2dbef0d47a26c618039c SHA1 410b4fc818023bfef60064e973ff0ab46d3bfb19 SHA256 5099786d80b8407d98a619df00209c2353517f22d804fdd9533b362adcb4504e
DIST patch-042stab039.10-combined.gz 15807030 RMD160 8228caf42626f787e09f1204479054a497087152 SHA1 e7faae939dfe62be017053089337a0e760b7201e SHA256 be0b5239baac4b371012d23b295414729fb3d8f68fa1765308c1e3f6f67651a5
DIST patch-042stab044.11-combined.gz 15840950 RMD160 ae0e3cdb31b488452c3046a907bd33aec7048613 SHA1 d23d5d8ed110d977822916d50a71c38db7624472 SHA256 43f3c1a83631b867d04141b00edb05a720eb1d23ce732f4b2feaf37a84ede40f
DIST patch-042stab044.17-combined.gz 15841149 RMD160 cd83d3454db30dd581de25806fa38612dad0a38b SHA1 6e7039b119842f8913ebaa01f92c326c28d335cf SHA256 804f912e461d5082ea5017242225afc767426d376757ac91bfb69fd2f5820150
DIST patch-042stab049.6-combined.gz 24433316 RMD160 863163a3850bc710fe5ca18bc97c4efba209965e SHA1 c2fd480a772144586f49460d272b5621a8554a1a SHA256 ce86500935b37c89d8d70d6ceec616f558531db33ed661e0aa32a6ac11bf09a0
+DIST patch-042stab053.5-combined.gz 24570552 RMD160 eac0426e5aebd3cf230f368153e3a5d9e4cdd11d SHA1 5c4905d3a1da8f92a0e3c642503814863374b028 SHA256 0064f1a37a3617b8ced4b1401400051b939eb15497e6a21a9f1d183160b7de94
View
177 sys-kernel/openvz-rhel6-stable/openvz-rhel6-stable-2.6.32.042.053.5.ebuild
@@ -0,0 +1,177 @@
+# Copyright 2011 Funtoo Technologies
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit mount-boot
+
+SLOT=$PVR
+CKV=2.6.32
+OKV=$CKV
+OVZ_KERNEL="042stab053"
+OVZ_REV="5"
+OVZ_KV=${OVZ_KERNEL}.${OVZ_REV}
+KV_FULL=${PN}-${PVR}
+EXTRAVERSION=-${OVZ_KV}
+KERNEL_ARCHIVE="linux-${CKV}.tar.bz2"
+KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/${KERNEL_ARCHIVE}"
+RESTRICT="binchecks strip"
+
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64"
+IUSE="binary"
+DEPEND="binary? ( >=sys-kernel/genkernel-3.4.12.6-r4 ) =sys-devel/gcc-4.4.5*"
+RDEPEND="binary? ( >=sys-fs/udev-160 )"
+DESCRIPTION="Full Linux kernel sources - RHEL5 kernel with OpenVZ patchset"
+HOMEPAGE="http://www.openvz.org"
+MAINPATCH="patch-${OVZ_KV}-combined.gz"
+SRC_URI="${KERNEL_URI}
+ http://download.openvz.org/kernel/branches/rhel6-${CKV}/${OVZ_KV}/configs/config-${CKV}-${OVZ_KV}.i686
+ http://download.openvz.org/kernel/branches/rhel6-${CKV}/${OVZ_KV}/configs/config-${CKV}-${OVZ_KV}.x86_64
+ http://download.openvz.org/kernel/branches/rhel6-${CKV}/${OVZ_KV}/patches/$MAINPATCH"
+S="$WORKDIR/linux-${CKV}"
+
+K_EXTRAEINFO="
+This OpenVZ kernel uses RHEL6 (Red Hat Enterprise Linux 6) patch set.
+This patch set is maintained by Red Hat for enterprise use, and contains
+further modifications by the OpenVZ development team and the Funtoo
+Linux project.
+
+Red Hat typically only ensures that their kernels build using their
+own official kernel configurations. Significant variations from these
+configurations can result in build failures.
+
+For best results, always start with a .config provided by the OpenVZ
+team from:
+
+http://wiki.openvz.org/Download/kernel/rhel6/${OVZ_KERNEL}.
+
+On amd64 and x86 arches, one of these configurations has automatically been
+enabled in the kernel source tree that was just installed for you.
+
+Slight modifications to the kernel configuration necessary for booting
+are usually fine. If you are using genkernel, the default configuration
+should be sufficient for your needs."
+
+src_unpack() {
+ unpack ${KERNEL_ARCHIVE}
+}
+
+apply() {
+ p=$1; shift
+ case "${p##*.}" in
+ gz)
+ ca="gzip -dc"
+ ;;
+ bz2)
+ ca="bzip2 -dc"
+ ;;
+ xz)
+ ca="xz -dc"
+ ;;
+ *)
+ ca="cat"
+ ;;
+ esac
+ [ ! -e $p ] && die "patch $p not found"
+ echo "Applying patch $p"; $ca $p | patch -s $* || die "patch $p failed"
+}
+
+pkg_setup() {
+ case $ARCH in
+ x86)
+ defconfig_src=i686
+ ;;
+ amd64)
+ defconfig_src=x86_64
+ ;;
+ *)
+ die "unsupported ARCH: $ARCH"
+ ;;
+ esac
+ defconfig_src="${DISTDIR}/config-${CKV}-${OVZ_KV}.${defconfig_src}"
+ unset ARCH; unset LDFLAGS #will interfere with Makefile if set
+}
+
+src_prepare() {
+ apply $DISTDIR/$MAINPATCH -p1
+ apply ${FILESDIR}/rhel5-openvz-sources-2.6.18.028.064.7-bridgemac.patch -p1
+ apply ${FILESDIR}/openvz-bug-2016-icmp-send-bridge.patch -p1
+ apply ${FILESDIR}/gcc-4.4.5.patch -p1
+ # disable video4linux version 1 - deprecated as of linux-headers-2.6.38:
+ # http://forums.gentoo.org/viewtopic-t-872167.html?sid=60f2e6e08cf1f2e99b3e61772a1dc276
+ sed -i -e "s:video4linux/::g" Documentation/Makefile || die
+ sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile || die
+ sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile || die
+ cp $DISTDIR/config-${CKV}-${OVZ_KV}.i686 arch/x86/configs/i386_defconfig || die
+ cp $DISTDIR/config-${CKV}-${OVZ_KV}.x86_64 arch/x86/configs/x86_64_defconfig || die
+ rm -f .config >/dev/null
+ make -s mrproper || die "make mrproper failed"
+ make -s include/linux/version.h || die "make include/linux/version.h failed"
+}
+
+src_compile() {
+ ! use binary && return
+ install -d ${WORKDIR}/out/{lib,boot}
+ install -d ${T}/{cache,twork}
+ install -d $WORKDIR/build $WORKDIR/out/lib/firmware
+ DEFAULT_KERNEL_SOURCE="${S}" INSTALL_FW_PATH=${WORKDIR}/out/lib/firmware CMD_KERNEL_DIR="${S}" genkernel ${GKARGS} \
+ --no-save-config \
+ --kernel-config="$defconfig_src" \
+ --kernname="${PN}" \
+ --build-src="$S" \
+ --build-dst=${WORKDIR}/build \
+ --makeopts="${MAKEOPTS}" \
+ --firmware-dst=${WORKDIR}/out/lib/firmware \
+ --cachedir="${T}/cache" \
+ --tempdir="${T}/twork" \
+ --logfile="${WORKDIR}/genkernel.log" \
+ --bootdir="${WORKDIR}/out/boot" \
+ --lvm \
+ --luks \
+ --iscsi \
+ --module-prefix="${WORKDIR}/out" \
+ all || die "genkernel failed"
+}
+
+src_install() {
+ # copy sources into place:
+ dodir /usr/src
+ cp -a ${S} ${D}/usr/src/linux-${P} || die
+ cd ${D}/usr/src/linux-${P}
+ # prepare for real-world use and 3rd-party module building:
+ make mrproper || die
+ cp $defconfig_src .config || die
+ yes "" | make oldconfig || die
+ # if we didn't use genkernel, we're done. The kernel source tree is left in
+ # an unconfigured state - you can't compile 3rd-party modules against it yet.
+ use binary || return
+ make prepare || die
+ make scripts || die
+ # OK, now the source tree is configured to allow 3rd-party modules to be
+ # built against it, since we want that to work since we have a binary kernel
+ # built.
+ cp -a ${WORKDIR}/out/* ${D}/ || die "couldn't copy output files into place"
+ # module symlink fixup:
+ rm -f ${D}/lib/modules/*/source || die
+ rm -f ${D}/lib/modules/*/build || die
+ cd ${D}/lib/modules
+ # module strip:
+ find -iname *.ko -exec strip --strip-debug {} \;
+ # back to the symlink fixup:
+ local moddir="$(ls -d 2*)"
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/source || die
+ ln -s /usr/src/linux-${P} ${D}/lib/modules/${moddir}/build || die
+}
+
+pkg_postinst() {
+ # if K_EXTRAEINFO is set then lets display it now
+ if [[ -n ${K_EXTRAEINFO} ]]; then
+ echo ${K_EXTRAEINFO} | fmt |
+ while read -s ELINE; do einfo "${ELINE}"; done
+ fi
+ if [ ! -e ${ROOT}usr/src/linux ]
+ then
+ ln -s linux-${P} ${ROOT}usr/src/linux
+ fi
+}

0 comments on commit 989db55

Please sign in to comment.