commit:     1c8b4d6d89a5bb9a94568f37293a2db594a5824f
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo 
<DOT> org>
AuthorDate: Sun Jun 29 14:38:41 2014 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Sun Jun 29 14:38:41 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=dev/jmbsvicetto.git;a=commit;h=1c8b4d6d

Bump kernel version and update SRC_URI.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> 
gentoo.org>

---
 .../infra-kernel-sources-3.15.2.ebuild             | 164 +++++++++++++++++++++
 .../infra-kernel/infra-kernel-3.13.6-r3.ebuild     |   5 +-
 ...3.13.6-r3.ebuild => infra-kernel-3.15.2.ebuild} |   5 +-
 3 files changed, 172 insertions(+), 2 deletions(-)

diff --git a/sys-kernel/infra-kernel-sources/infra-kernel-sources-3.15.2.ebuild 
b/sys-kernel/infra-kernel-sources/infra-kernel-sources-3.15.2.ebuild
new file mode 100644
index 0000000..623b2f9
--- /dev/null
+++ b/sys-kernel/infra-kernel-sources/infra-kernel-sources-3.15.2.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit flag-o-matic
+
+KERNEL_SOURCES="hardened-sources"
+KERNEL_NAME="hardened"
+KERNEL_PV="$PV"
+KERNEL_REVISION="$PR"
+INFRA_SUFFIX="infra27"
+use amd64 && KARCH="x86_64"
+use x86 && KARCH="x86"
+
+KERNEL_PVR="${KERNEL_PV}-${KERNEL_REVISION}"
+KERNEL_PF="${KERNEL_SOURCES}-${KERNEL_PVR}"
+
+KERNEL_DIR="linux-${KERNEL_PV}-${KERNEL_NAME}-${KERNEL_REVISION}"
+BINPKG_PVR="${PVR}-${INFRA_SUFFIX}"
+BINPKG_KERNEL="${PN/-sources/}-kernel-${KARCH}-${BINPKG_PVR}.tbz2"
+BINPKG_MODULES="${PN/-sources/}-modules-${KARCH}-${BINPKG_PVR}.tbz2"
+KERNEL_CONFIG="${FILESDIR}"/${KERNEL_PF}-${KARCH}-${INFRA_SUFFIX}.config
+
+BUILD_DIR="/home/upload-kernel/"
+
+DESCRIPTION="Package to build kernel + initramfs for Gentoo infra boxes"
+HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Infrastructure";
+IUSE=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       sys-apps/fakeroot
+       sys-fs/lvm2
+       >=sys-kernel/genkernel-3.4.49.1
+       =sys-kernel/${KERNEL_PF}"
+RDEPEND=""
+
+S="${WORKDIR}"
+
+pkg_setup() {
+       [ -d /usr/src/${KERNEL_DIR} ] || die "kernel dir /usr/src/${KERNEL_DIR} 
missing"
+       [ -f ${KERNEL_CONFIG} ] || die "${KERNEL_CONFIG} missing"
+       # we need to be using flags that will result in binaries working on all 
infra systems
+       strip-flags
+       filter-flags -march=* -mtune=* -mcpu=* -frecord-gcc-switches
+       use amd64 && append-flags -march=x86-64 -mtune=generic
+       use x86 && append-flags -march=pentium3 -mtune=generic
+}
+
+src_unpack() {
+       mkdir -p "${T}"/{cache,tmp,kernel-output}
+}
+
+src_prepare() {
+       # copy the kernel sources, this is potentially large, but nothing we 
can do.
+       # if it's dirty, the build will fail
+       # symlinks do not work either
+       mkdir -p "${S}"/usr/src
+       cp -a "/usr/src/${KERNEL_DIR}" "${S}"/usr/src || die
+       cd "${S}"/usr/src/${KERNEL_DIR}
+       _ARCH="$ARCH"
+       unset ARCH
+       emake mrproper || die "Failed to cleanup"
+       export ARCH=$_ARCH
+}
+
+# This deliberately runs a very sterile genkernel
+# that IGNORES the system /etc/genkernel.conf
+# so that we get more reproducable builds
+# almost all the options are easy with this except GK_SHARE
+# fakeroot is here because genkernel uses mknod still
+# which fails as non-root
+genkernel_sterile() {
+       _DISTDIR="${DISTDIR}"
+       # the parsing of --config seems to be broken in v3.4.44.2
+       #--config="${emptyconfig}" \
+       emptyconfig="${T}"/empty
+       touch "${emptyconfig}"
+       CMD_GK_CONFIG="${emptyconfig}" \
+       GK_SHARE="${ROOT}"/usr/share/genkernel \
+       DISTDIR="${ROOT}"//usr/share/genkernel/distfiles \
+       CFLAGS="${CFLAGS}" \
+       CXXFLAGS="${CXXFLAGS}" \
+       fakeroot genkernel \
+               --loglevel=1 \
+               --no-menuconfig \
+               --no-gconfig \
+               --no-xconfig \
+               --no-save-config \
+               --oldconfig \
+               --no-clean \
+               --no-mrproper \
+               --no-symlink \
+               --no-mountboot \
+               --no-lvm \
+               --no-mdadm \
+               --no-dmraid \
+               --no-multipath \
+               --no-iscsi \
+               --no-disklabel \
+               --no-luks \
+               --no-gpg \
+               --no-busybox \
+               --no-postclear \
+               --no-install \
+               --no-zfs \
+               --no-keymap \
+               --no-e2fsprogs \
+               --no-unionfs \
+               --no-netboot \
+               --compress-initramfs \
+               --ramdisk-modules \
+               --no-debug-cleanup \
+               "$@"
+}
+
+src_compile() {
+
+       addpredict "/etc/kernels"
+       addpredict "/dev"
+
+       # call genkernel to build the kernel + initramfs
+       genkernel_sterile \
+               --loglevel=5 \
+               --logfile="${T}"/genkernel.log \
+               --cachedir="${T}"/cache \
+               --tempdir="${T}"/tmp \
+               \
+               --makeopts="${MAKEOPTS}" \
+               --kerneldir="/usr/src/${KERNEL_DIR}"  \
+               --kernel-outputdir="${T}/kernel-output" \
+               --kernel-config="${KERNEL_CONFIG}" \
+               --module-prefix="${T}" \
+               \
+               --lvm \
+               --disklabel \
+               --busybox \
+               --e2fsprogs \
+               --mdadm --mdadm-config="${FILESDIR}/mdadm.conf-1.0" \
+               \
+               --minkernpackage="${T}"/${BINPKG_KERNEL} \
+               --modulespackage="${T}"/${BINPKG_MODULES} \
+               \
+               all \
+       || die "genkernel failed"
+}
+
+src_install() {
+       return 0
+}
+
+pkg_preinst() {
+       # copy the built kernel + initramfs
+       mkdir -p "${BUILD_DIR}"
+       cp -f "${T}"/${BINPKG_KERNEL} "${BUILD_DIR}" || die "Failed to copy 
kernel package"
+       cp -f "${T}"/${BINPKG_MODULES} "${BUILD_DIR}" || die "Failed to copy 
module package"
+       einfo "${BINPKG_KERNEL} and ${BINPKG_MODULES} are in ${BUILD_DIR}"
+       # mirror the packages
+       # scp ...
+}

diff --git a/sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild 
b/sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild
index 1fabd15..f0e2f2d 100644
--- a/sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild
+++ b/sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild
@@ -27,7 +27,10 @@ KERNEL_BIN="kernel-${KARCH}-${CUSTOM_VERSION}"
 INITRAMFS_BIN="initramfs-${KARCH}-${CUSTOM_VERSION}"
 SYSTEMMAP_BIN="System.map-${KARCH}-${CUSTOM_VERSION}"
 
-SRC_URI="${KERNEL_URI} ${MODULES_URI}"
+SRC_URI="
+       amd64? ( ${KERNEL_URI//--/-x86_64-} ${MODULES_URI//--/-x86_64-} )
+       x86? ( ${KERNEL_URI//--/-x86-} ${MODULES_URI//--/-x86-} )
+"
 DESCRIPTION="Package to install kernel + initramfs for Gentoo infra boxes"
 HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Infrastructure";
 IUSE=""

diff --git a/sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild 
b/sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild
similarity index 91%
copy from sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild
copy to sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild
index 1fabd15..f0e2f2d 100644
--- a/sys-kernel/infra-kernel/infra-kernel-3.13.6-r3.ebuild
+++ b/sys-kernel/infra-kernel/infra-kernel-3.15.2.ebuild
@@ -27,7 +27,10 @@ KERNEL_BIN="kernel-${KARCH}-${CUSTOM_VERSION}"
 INITRAMFS_BIN="initramfs-${KARCH}-${CUSTOM_VERSION}"
 SYSTEMMAP_BIN="System.map-${KARCH}-${CUSTOM_VERSION}"
 
-SRC_URI="${KERNEL_URI} ${MODULES_URI}"
+SRC_URI="
+       amd64? ( ${KERNEL_URI//--/-x86_64-} ${MODULES_URI//--/-x86_64-} )
+       x86? ( ${KERNEL_URI//--/-x86-} ${MODULES_URI//--/-x86-} )
+"
 DESCRIPTION="Package to install kernel + initramfs for Gentoo infra boxes"
 HOMEPAGE="http://wiki.gentoo.org/wiki/Project:Infrastructure";
 IUSE=""

Reply via email to