diff --git a/ChangeLog b/ChangeLog index 79a318b..0e32e8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,14 @@ # Distributed under the GPL v2 # $Id$ + 12 Aug 2012; Sebastian Pipping +defaults/software.sh, + genkernel.conf: + Move software version defaults for defaults/software.sh to ease the + etc-update game + + 12 Aug 2012; Sebastian Pipping genkernel: + Fix parsing of --config=... command line option + 27 Jul 2012; Sebastian Pipping defaults/initrd.scripts, genkernel: Bump version to 3.4.40 diff --git a/defaults/software.sh b/defaults/software.sh new file mode 100644 index 0000000..e0d2537 --- /dev/null +++ b/defaults/software.sh @@ -0,0 +1,51 @@ +# NOTE: +# - This file (software.sh) is sourced by /etc/genkernel.conf . +# Rather than changing this very file, please override specific versions/variables +# somewhere after the (existing) line +# +# source "${GK_SHARE}/defaults/software.sh" +# +# in /etc/genkernel.conf . +# +# - The *_VER variables below in here are/were filled with actual version strings +# by the genkernel ebuild. + +BUSYBOX_VER="VERSION_BUSYBOX" +BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2" +BUSYBOX_DIR="busybox-${BUSYBOX_VER}" +BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2" + +LVM_VER="VERSION_LVM" +LVM_DIR="LVM2.${LVM_VER}" +LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz" +LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2" + +MDADM_VER="VERSION_MDADM" +MDADM_DIR="mdadm-${MDADM_VER}" +MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2" +MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2" + +DMRAID_VER="VERSION_DMRAID" +DMRAID_DIR="dmraid/${DMRAID_VER}/dmraid" +DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2" +DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2" + +ISCSI_VER="VERSION_ISCSI" +ISCSI_DIR="open-iscsi-${ISCSI_VER}" +ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz" +ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2" + +FUSE_VER="VERSION_FUSE" +FUSE_DIR="fuse-${FUSE_VER}" +FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz" +FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2" + +UNIONFS_FUSE_VER="VERSION_UNIONFS_FUSE" +UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}" +UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2" +UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2" + +GPG_VER="VERSION_GPG" +GPG_DIR="gnupg-${GPG_VER}" +GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2" +GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2" diff --git a/genkernel b/genkernel index 200b3fb..98f24d9 100755 --- a/genkernel +++ b/genkernel @@ -25,14 +25,16 @@ parse_opt() { # We don't know where our config is, so we check for it, and default to using # /etc/genkernel.conf if nobody has specified one. -case "$*" in - --config=*) - CMD_GK_CONFIG=`parse_opt "$*"` - ;; -esac + +# NOTE: We are look for --config=... in a way that doesn't modify $@ since we access that again, later +for (( i=1; i<=$# ; i=i+1 )); do + eval arg="\$$i" + [[ "${arg}" = --config=* ]] && CMD_GK_CONFIG=`parse_opt "${arg}"` +done # Pull in our configuration -source ${CMD_GK_CONFIG:-/etc/genkernel.conf} || small_die "Could not read /etc/genkernel.conf" +_GENKERNEL_CONF=${CMD_GK_CONFIG:-/etc/genkernel.conf} +source "${_GENKERNEL_CONF}" || small_die "Could not read ${_GENKERNEL_CONF}" # Start sourcing other scripts source ${GK_SHARE}/gen_funcs.sh || small_die "Could not read ${GK_SHARE}/gen_funcs.sh" @@ -101,8 +103,13 @@ echo get_official_arch # Read arch-specific config +print_info 1 "Using genkernel.conf from ${_GENKERNEL_CONF}" +print_info 1 "Sourcing arch-specific config.sh from ${ARCH_CONFIG} .." source ${ARCH_CONFIG} || gen_die "Could not read ${ARCH_CONFIG}" -source ${GK_SHARE}/arch/${ARCH}/modules_load || gen_die "Could not read ${GK_SHARE}/arch/${ARCH}/modules_load" +_MODULES_LOAD=${GK_SHARE}/arch/${ARCH}/modules_load +print_info 1 "Sourcing arch-specific modules_load from ${_MODULES_LOAD} .." +source "${_MODULES_LOAD}" || gen_die "Could not read ${_MODULES_LOAD}" +echo # Merge modules_load from config for group_modules in ${!AMODULES_*}; do diff --git a/genkernel.conf b/genkernel.conf index f50dd5f..8e9e424 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -198,47 +198,9 @@ DEFAULT_KERNEL_SOURCE="/usr/src/linux" # Specifies a user created busybox config #BUSYBOX_CONFIG="/path/to/file" - -BUSYBOX_VER="VERSION_BUSYBOX" -BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2" -BUSYBOX_DIR="busybox-${BUSYBOX_VER}" -BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2" #BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat" -LVM_VER="VERSION_LVM" -LVM_DIR="LVM2.${LVM_VER}" -LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz" -LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2" - -MDADM_VER="VERSION_MDADM" -MDADM_DIR="mdadm-${MDADM_VER}" -MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2" -MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2" - -DMRAID_VER="VERSION_DMRAID" -DMRAID_DIR="dmraid/${DMRAID_VER}/dmraid" -DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2" -DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2" - -ISCSI_VER="VERSION_ISCSI" -ISCSI_DIR="open-iscsi-${ISCSI_VER}" -ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz" -ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2" - -FUSE_VER="VERSION_FUSE" -FUSE_DIR="fuse-${FUSE_VER}" -FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz" -FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2" - -UNIONFS_FUSE_VER="VERSION_UNIONFS_FUSE" -UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}" -UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2" -UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2" - -GPG_VER="VERSION_GPG" -GPG_DIR="gnupg-${GPG_VER}" -GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2" -GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2" +source "${GK_SHARE}/defaults/software.sh" # =========MISC KERNEL CONFIGURATION============