diff --git a/bin/build.sh b/bin/build.sh index 4260199..099f621 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -120,9 +120,7 @@ source ${BASEDIR}/lib/03-release_me.func.sh source ${BASEDIR}/lib/04-facehugger.func.sh source ${BASEDIR}/lib/05-chroot_wrapper.func.sh source ${BASEDIR}/lib/06-jenny_craig.func.sh -if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" || "${HOST_DIST}" == "SUSE" ]]; - source ${BASEDIR}/lib/07-centos_is_stupid.func.sh -fi +source ${BASEDIR}/lib/07-centos_is_stupid.func.sh source ${BASEDIR}/lib/08-will_it_blend.func.sh source ${BASEDIR}/lib/09-stuffy.func.sh source ${BASEDIR}/lib/10-yo_dj.func.sh @@ -154,9 +152,7 @@ fi if [[ ${1} == "update" ]]; then mentos - if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; - centos_is_stupid - fi + centos_is_stupid will_it_blend 32 will_it_blend 64 yo_dj @@ -176,21 +172,15 @@ if [[ ${1} == "build" || -z ${1} || ${1} == "all" ]]; then if [[ "${MULTIARCH}" == "y" ]]; then - if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; - centos_is_stupid - fi + centos_is_stupid will_it_blend 64 will_it_blend 32 yo_dj any else - if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; - centos_is_stupid - fi + centos_is_stupid will_it_blend 64 yo_dj 64 - if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]]; - centos_is_stupid - fi + centos_is_stupid will_it_blend 32 yo_dj 32 fi diff --git a/lib/00-depcheck.func.sh b/lib/00-depcheck.func.sh index ca57d95..8f356f8 100755 --- a/lib/00-depcheck.func.sh +++ b/lib/00-depcheck.func.sh @@ -41,33 +41,6 @@ function so_check_me_out { exit 1 fi - ## TWEAKS GO HERE. ## - # stupid gentoo. good riddance. - set +e - if [[ "${HOST_DIST}" == "Gentoo" ]]; - then - grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords - if [[ "${?}" != "0" ]]; - then - echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords - fi - fi - set -e - - # For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough - # to figuure out that if I enable the multilib repos, *I wat multilib gcc*. Fuck it. We'll just remove it first. - if [[ "${HOST_DIST}" == "Arch" || "${HOST_DIST}" == "Antergos" || "${HOST_DIST}" == "Manjaro" ]]; - then - for pkg_override in gcc gcc-libs; - do - pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 - if [[ "${?}" == "0" ]]; - then - pacman -R --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 - fi - done - fi - # So we've validated the distro. Here, check for packages and install if necessary. maybe use an array, but it'd be better to soft-fail if one of the packages is missing. DISTRO_DIR="${BASEDIR}/lib/prereqs/${HOST_DIST}" @@ -77,6 +50,9 @@ function so_check_me_out { # And once more, just to be safe. source ${META} + ## TWEAKS GET RUN HERE. + distro_specific_tweaks + if [[ "${PRE_RUN}" != 'none' ]]; then echo "Now updating your local package cache..." diff --git a/lib/prereqs/Antergos/meta b/lib/prereqs/Antergos/meta index d6e27a0..8199262 100644 --- a/lib/prereqs/Antergos/meta +++ b/lib/prereqs/Antergos/meta @@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}' PRE_RUN='pacman -Syyy' PKG_CHK='pacman -Q ${pkgname}' URL='http://antergos.com/' + +function distro_specific_tweaks { + # For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough + # to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first. + + set +e + for pkg_override in gcc gcc-libs; + do + pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + if [[ "${?}" == "0" ]]; + then + pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + fi + done +set -e + +} diff --git a/lib/prereqs/Arch/meta b/lib/prereqs/Arch/meta index 7c0295c..88230d1 100644 --- a/lib/prereqs/Arch/meta +++ b/lib/prereqs/Arch/meta @@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}' PRE_RUN='pacman -Syyy' PKG_CHK='pacman -Q ${pkgname}' URL='https://www.archlinux.org/' + +function distro_specific_tweaks { + # For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough + # to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first. + + set +e + for pkg_override in gcc gcc-libs; + do + pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + if [[ "${?}" == "0" ]]; + then + pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + fi + done +set -e + +} diff --git a/lib/prereqs/CentOS/meta b/lib/prereqs/CentOS/meta index 03fb02a..f552883 100644 --- a/lib/prereqs/CentOS/meta +++ b/lib/prereqs/CentOS/meta @@ -5,5 +5,11 @@ PKG_MGR='yum -y install ${pkgname}' PRE_RUN='none' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' URL='http://centos.org/' -# NOTE: we handle installing of squashfs-tools (maybe) and xorriso in centos_is_stupid function. -# because they *suck*. Seriously. I need to install tk just to install xorriso. I mean, what? + +function distro_specific_tweaks { + # NOTE: we handle installing of squashfs-tools (maybe) and xorriso in centos_is_stupid function. + # because they *suck*. Seriously. I need to install tk just to install xorriso. I mean, what? + + echo "No tweaks found." + +} diff --git a/lib/prereqs/Debian/meta b/lib/prereqs/Debian/meta index 71fc285..1c9eab3 100644 --- a/lib/prereqs/Debian/meta +++ b/lib/prereqs/Debian/meta @@ -5,3 +5,9 @@ PKG_MGR='apt-get -y install ${pkgname}' PRE_RUN='apt-get update' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' URL='http://www.debian.org/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} diff --git a/lib/prereqs/Devuan/meta b/lib/prereqs/Devuan/meta index cd36c19..d508914 100644 --- a/lib/prereqs/Devuan/meta +++ b/lib/prereqs/Devuan/meta @@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}' PRE_RUN='apt-get update' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' URL='http://www.debian.org/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/Fedora/meta b/lib/prereqs/Fedora/meta index e92bea7..3ab01f1 100644 --- a/lib/prereqs/Fedora/meta +++ b/lib/prereqs/Fedora/meta @@ -5,3 +5,10 @@ PKG_MGR='dnf -y install ${pkgname}' PRE_RUN='none' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' URL='https://getfedora.org/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/Gentoo/meta b/lib/prereqs/Gentoo/meta index 16453c9..5c1b9dc 100644 --- a/lib/prereqs/Gentoo/meta +++ b/lib/prereqs/Gentoo/meta @@ -5,3 +5,16 @@ PKG_MGR='emerge -q1Dn ${pkgname}' PRE_RUN='emerge -q --sync' PKG_CHK='emerge -qp @installed 2>/dev/null | egrep -E "/${pkgname}-[0-9.]+"' URL='https://www.gentoo.org/' + +function distro_specific_tweaks { + # WHY IS THIS EVEN MASKED?! + + set +e + grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords + if [[ "${?}" != "0" ]]; + then + echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords + fi + set -e + +} diff --git a/lib/prereqs/Mageia/meta b/lib/prereqs/Mageia/meta index 4f235da..56dd871 100644 --- a/lib/prereqs/Mageia/meta +++ b/lib/prereqs/Mageia/meta @@ -5,3 +5,10 @@ PKG_MGR='urpmi --force ${pkgname}' PRE_RUN='urpmi.update -a' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' URL='https://www.mageia.org/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/Manjaro/meta b/lib/prereqs/Manjaro/meta index 3bd7fde..57df8b6 100644 --- a/lib/prereqs/Manjaro/meta +++ b/lib/prereqs/Manjaro/meta @@ -5,3 +5,20 @@ PKG_MGR='pacman -S --needed --noconfirm ${pkgname}' PRE_RUN='pacman -Syyyu' PKG_CHK='pacman -Q ${pkgname}' URL='https://manjaro.org/' + +function distro_specific_tweaks { + # For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough + # to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first. + + set +e + for pkg_override in gcc gcc-libs; + do + pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + if [[ "${?}" == "0" ]]; + then + pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + fi + done +set -e + +} diff --git a/lib/prereqs/Mint/meta b/lib/prereqs/Mint/meta index 27c545e..ad5d74b 100644 --- a/lib/prereqs/Mint/meta +++ b/lib/prereqs/Mint/meta @@ -5,3 +5,9 @@ PKG_MGR='apt-get -y install ${pkgname}' PRE_RUN='apt-get -y update' PKG_CHK='dpkg-query -l ${pkgname}' URL='http://www.linuxmint.com/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} diff --git a/lib/prereqs/RHEL/meta b/lib/prereqs/RHEL/meta index 1fb5bfe..d5319ab 100644 --- a/lib/prereqs/RHEL/meta +++ b/lib/prereqs/RHEL/meta @@ -6,3 +6,10 @@ PKG_MGR='yum -y install' PRE_RUN='none' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' URL='http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/SUSE/meta b/lib/prereqs/SUSE/meta index 56a6331..cbdb475 100644 --- a/lib/prereqs/SUSE/meta +++ b/lib/prereqs/SUSE/meta @@ -6,4 +6,11 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}' PRE_RUN='zypper refresh' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' URL='https://www.suse.com/' -# See the centos_is_stupid function. we do some tweaks there since -devel pkgs require the SDK on SLES/SLED. + +function distro_specific_tweaks { + # See the centos_is_stupid function. we do some tweaks there since -devel pkgs require the SDK on SLES/SLED. + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/Ubuntu/meta b/lib/prereqs/Ubuntu/meta index d9e71b5..aaa98f2 100644 --- a/lib/prereqs/Ubuntu/meta +++ b/lib/prereqs/Ubuntu/meta @@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}' PRE_RUN='apt-get -y update' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' URL='http://www.ubuntu.com/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/elementaryOS/meta b/lib/prereqs/elementaryOS/meta index 63003d0..34f10ae 100644 --- a/lib/prereqs/elementaryOS/meta +++ b/lib/prereqs/elementaryOS/meta @@ -5,3 +5,10 @@ PKG_MGR='apt-get -y install ${pkgname}' PRE_RUN='apt-get -y update' PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"' URL='https://elementary.io/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} + diff --git a/lib/prereqs/openSUSE/meta b/lib/prereqs/openSUSE/meta index 0966de3..d33230d 100644 --- a/lib/prereqs/openSUSE/meta +++ b/lib/prereqs/openSUSE/meta @@ -6,3 +6,10 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}' PRE_RUN='zypper refresh' PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"' URL='https://www.opensuse.org/' + +function distro_specific_tweaks { + + echo "No tweaks found." + +} +