From 397ad8c651e102f14bb3b139e89932c9ec5e4674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 31 Oct 2017 23:59:55 +0100 Subject: Update linux to 4.13.10 --- sys-kernel/linux/Manifest | 2 +- sys-kernel/linux/linux-4.13.10-r1.ebuild | 86 ++++++++++++++++++++++++++++++++ sys-kernel/linux/linux-4.13.9-r1.ebuild | 86 -------------------------------- 3 files changed, 87 insertions(+), 87 deletions(-) create mode 100644 sys-kernel/linux/linux-4.13.10-r1.ebuild delete mode 100644 sys-kernel/linux/linux-4.13.9-r1.ebuild diff --git a/sys-kernel/linux/Manifest b/sys-kernel/linux/Manifest index 3f46de9..8175262 100644 --- a/sys-kernel/linux/Manifest +++ b/sys-kernel/linux/Manifest @@ -1 +1 @@ -DIST linux-4.13.9.tar.gz 157408147 SHA256 252c0c191bab9465cd16e3cb8e42f5531569a9c67a9ceb170442a5f94093cba7 SHA512 21da33a43f4425675f06bc54e48527a0d730646a4de9a825f118998380f63d8ce97b48bba4c5dc14d8ad7714c470d4019840f3f2a366c00f164801a076648633 WHIRLPOOL 68da41923529416e49ed3ee332241c0335ad0cebd69b0198a1d3486155e248d5a91c7c00927506737d732de487d110c6e4a702e70035d44b94b787550daa3cd8 +DIST linux-4.13.10.tar.gz 157415885 SHA256 aa4231ae291afaccbb2ecde2418f69fe26386bd422d58c8e3704e8f0462f77c3 SHA512 8b499697d5fb3280b27c0908d1f401c36ece93566b18dd9e3269ea7341a02b826b904e8453e497da64fd773db2c21e8a78bb40cae4c1888b6b943963ad4f7962 WHIRLPOOL 3627a5cca31e12486ddf8d0ae29c00ba4a9e50ca85133fe79f968780834e4dc73de619ca75d2fa8dfc8007d9dce043735835c0e545525cea8cf2b9283afa5df5 diff --git a/sys-kernel/linux/linux-4.13.10-r1.ebuild b/sys-kernel/linux/linux-4.13.10-r1.ebuild new file mode 100644 index 0000000..76579ab --- /dev/null +++ b/sys-kernel/linux/linux-4.13.10-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +VER="${PV%-r*}" +REV="r${PV##*-r}" + +DESCRIPTION="Linux kernel" +HOMEPAGE="http://kernel.org/" +SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/snapshot/linux-stable-${VER}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/linux-stable-${VER}" + +LICENSE="GPLv2" +SLOT="${PV}" +KEYWORDS="amd64 ~x86" +IUSE="" + +DEPEND="sys-devel/bc" +RDEPEND="sys-boot/myinitramfs" + +src_configure() { + # Fix ARCH variable + [ "$ARCH" = "amd64" ] && ARCH="x86" + + "${FILESDIR}"/config_prepare.sh || die "Configuration application failed" +} + +src_install() { + emake modules_install INSTALL_MOD_PATH="${D}" INSTALL_FW_PATH="${D}/lib/firmware/${PV}" + + dodir /boot + insinto /boot + newins "${S}/arch/$ARCH/boot/bzImage" "bzlinux-${PV}" + + # Package source (kind of annoying because of some packages expecting it) + emake clean + dodir /usr/src + cp -a "${S}" "${D}/usr/src/linux-${PV}" +} + +# Link /usr/src/linux to newest kernel +src_link() { + ( + cd "${ROOT}/usr/src" + rm -f linux + ln -s $(ls | grep "linux-" | sort | tail -1) linux + ) +} + +sysfile() { + if [ -f "${ROOT}/boot/syslinux/syslinux.cfg" ]; then + SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" + PFIX=".." + elif [ -f "${ROOT}/boot/EFI/BOOT/syslinux.cfg" ]; then + SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" + PFIX="../../.." + else + eerror "Can't locate syslinux configuration!" + fi +} + +pkg_postinst() { + sysfile + # Add label to syslinux config if there is non yet + if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then + ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" + if [ -n "$ARGS" ]; then + sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" + sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" + else + eerror "Adding label to syslinux configuration failed as there are no arguments" + fi + fi + src_link +} + +pkg_prerm() { + sysfile + # Remove label from syslinux config + sed -i "/^LABEL gentoo-${PV}\(\|-recovery\)$/,/^$/d" "${SYSLINUX}" || eerror "Removing label from syslinux fonfiguration failed!" +} + +pkg_postrm() { + src_link +} diff --git a/sys-kernel/linux/linux-4.13.9-r1.ebuild b/sys-kernel/linux/linux-4.13.9-r1.ebuild deleted file mode 100644 index 76579ab..0000000 --- a/sys-kernel/linux/linux-4.13.9-r1.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -VER="${PV%-r*}" -REV="r${PV##*-r}" - -DESCRIPTION="Linux kernel" -HOMEPAGE="http://kernel.org/" -SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/snapshot/linux-stable-${VER}.tar.gz -> ${P}.tar.gz" -S="${WORKDIR}/linux-stable-${VER}" - -LICENSE="GPLv2" -SLOT="${PV}" -KEYWORDS="amd64 ~x86" -IUSE="" - -DEPEND="sys-devel/bc" -RDEPEND="sys-boot/myinitramfs" - -src_configure() { - # Fix ARCH variable - [ "$ARCH" = "amd64" ] && ARCH="x86" - - "${FILESDIR}"/config_prepare.sh || die "Configuration application failed" -} - -src_install() { - emake modules_install INSTALL_MOD_PATH="${D}" INSTALL_FW_PATH="${D}/lib/firmware/${PV}" - - dodir /boot - insinto /boot - newins "${S}/arch/$ARCH/boot/bzImage" "bzlinux-${PV}" - - # Package source (kind of annoying because of some packages expecting it) - emake clean - dodir /usr/src - cp -a "${S}" "${D}/usr/src/linux-${PV}" -} - -# Link /usr/src/linux to newest kernel -src_link() { - ( - cd "${ROOT}/usr/src" - rm -f linux - ln -s $(ls | grep "linux-" | sort | tail -1) linux - ) -} - -sysfile() { - if [ -f "${ROOT}/boot/syslinux/syslinux.cfg" ]; then - SYSLINUX="${ROOT}/boot/syslinux/syslinux.cfg" - PFIX=".." - elif [ -f "${ROOT}/boot/EFI/BOOT/syslinux.cfg" ]; then - SYSLINUX="${ROOT}/boot/EFI/BOOT/syslinux.cfg" - PFIX="../../.." - else - eerror "Can't locate syslinux configuration!" - fi -} - -pkg_postinst() { - sysfile - # Add label to syslinux config if there is non yet - if ! grep -q "^LABEL gentoo-${PV}$" "${SYSLINUX}"; then - ARGS="$(grep -E "^# ARGS: " "${SYSLINUX}" | sed 's/^# ARGS: //')" - if [ -n "$ARGS" ]; then - sed -i "/^## Dynamic labels ##$/a LABEL gentoo-${PV}\n\tMENU LABEL Gentoo ${PV}\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS}\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding label to syslinux configuration failed!" - sed -i "/^## Dynamic recovery labels ##$/a LABEL gentoo-${PV}-recovery\n\tMENU LABEL Gentoo ${PV} - Recovery\n\tLINUX ${PFIX}/bzlinux-${PV}\n\tAPPEND ${ARGS} recovery\n\tINITRD ${PFIX}/initramfs-gentoo\n" "${SYSLINUX}" || eerror "Adding recovery label to syslinux configuration failed!" - else - eerror "Adding label to syslinux configuration failed as there are no arguments" - fi - fi - src_link -} - -pkg_prerm() { - sysfile - # Remove label from syslinux config - sed -i "/^LABEL gentoo-${PV}\(\|-recovery\)$/,/^$/d" "${SYSLINUX}" || eerror "Removing label from syslinux fonfiguration failed!" -} - -pkg_postrm() { - src_link -} -- cgit v1.2.3