now during testing...
This commit is contained in:
parent
eca04c2140
commit
fc0a1ec94a
10
bin/build.sh
10
bin/build.sh
@ -120,7 +120,7 @@ source ${BASEDIR}/lib/03-release_me.func.sh
|
|||||||
source ${BASEDIR}/lib/04-facehugger.func.sh
|
source ${BASEDIR}/lib/04-facehugger.func.sh
|
||||||
source ${BASEDIR}/lib/05-chroot_wrapper.func.sh
|
source ${BASEDIR}/lib/05-chroot_wrapper.func.sh
|
||||||
source ${BASEDIR}/lib/06-jenny_craig.func.sh
|
source ${BASEDIR}/lib/06-jenny_craig.func.sh
|
||||||
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
|
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" || "${HOST_DIST}" == "SUSE" ]];
|
||||||
source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
|
source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
|
||||||
fi
|
fi
|
||||||
source ${BASEDIR}/lib/08-will_it_blend.func.sh
|
source ${BASEDIR}/lib/08-will_it_blend.func.sh
|
||||||
@ -154,7 +154,7 @@ fi
|
|||||||
if [[ ${1} == "update" ]];
|
if [[ ${1} == "update" ]];
|
||||||
then
|
then
|
||||||
mentos
|
mentos
|
||||||
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
|
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||||
centos_is_stupid
|
centos_is_stupid
|
||||||
fi
|
fi
|
||||||
will_it_blend 32
|
will_it_blend 32
|
||||||
@ -176,15 +176,21 @@ if [[ ${1} == "build" || -z ${1} || ${1} == "all" ]];
|
|||||||
then
|
then
|
||||||
if [[ "${MULTIARCH}" == "y" ]];
|
if [[ "${MULTIARCH}" == "y" ]];
|
||||||
then
|
then
|
||||||
|
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||||
centos_is_stupid
|
centos_is_stupid
|
||||||
|
fi
|
||||||
will_it_blend 64
|
will_it_blend 64
|
||||||
will_it_blend 32
|
will_it_blend 32
|
||||||
yo_dj any
|
yo_dj any
|
||||||
else
|
else
|
||||||
|
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||||
centos_is_stupid
|
centos_is_stupid
|
||||||
|
fi
|
||||||
will_it_blend 64
|
will_it_blend 64
|
||||||
yo_dj 64
|
yo_dj 64
|
||||||
|
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||||
centos_is_stupid
|
centos_is_stupid
|
||||||
|
fi
|
||||||
will_it_blend 32
|
will_it_blend 32
|
||||||
yo_dj 32
|
yo_dj 32
|
||||||
fi
|
fi
|
||||||
|
@ -13,6 +13,7 @@ function so_check_me_out {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set +e
|
||||||
if [[ -z "${HOST_DIST}" ]];
|
if [[ -z "${HOST_DIST}" ]];
|
||||||
then
|
then
|
||||||
for dist_profile in $(find "${BASEDIR}"/lib/prereqs -type f -name 'meta');
|
for dist_profile in $(find "${BASEDIR}"/lib/prereqs -type f -name 'meta');
|
||||||
@ -30,6 +31,7 @@ function so_check_me_out {
|
|||||||
break 2
|
break 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sanity is important.
|
# Sanity is important.
|
||||||
@ -41,6 +43,7 @@ function so_check_me_out {
|
|||||||
|
|
||||||
## TWEAKS GO HERE. ##
|
## TWEAKS GO HERE. ##
|
||||||
# stupid gentoo. good riddance.
|
# stupid gentoo. good riddance.
|
||||||
|
set +e
|
||||||
if [[ "${HOST_DIST}" == "Gentoo" ]];
|
if [[ "${HOST_DIST}" == "Gentoo" ]];
|
||||||
then
|
then
|
||||||
grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords
|
grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords
|
||||||
@ -49,6 +52,21 @@ function so_check_me_out {
|
|||||||
echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords
|
echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords
|
||||||
fi
|
fi
|
||||||
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.
|
# 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.
|
||||||
|
|
||||||
@ -85,11 +103,13 @@ function so_check_me_out {
|
|||||||
echo "This usually means you aren't connected to the Internet or your package repositories"
|
echo "This usually means you aren't connected to the Internet or your package repositories"
|
||||||
echo "are not configured correctly. Review the list of packages in ${PKGLIST} and ensure"
|
echo "are not configured correctly. Review the list of packages in ${PKGLIST} and ensure"
|
||||||
echo "they are all available to be installed."
|
echo "they are all available to be installed."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < ${PKGLIST}
|
done < ${PKGLIST}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
rm -f "${LOCKFILE}"
|
||||||
}
|
}
|
||||||
|
|
||||||
so_check_me_out
|
so_check_me_out
|
||||||
|
@ -22,6 +22,7 @@ function centos_is_stupid {
|
|||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
# We used to fetch and compile mksquashfs from source here, but no longer- because a new enough version is *finally* in CentOS repos as of CentOS 7.
|
# We used to fetch and compile mksquashfs from source here, but no longer- because a new enough version is *finally* in CentOS repos as of CentOS 7.
|
||||||
|
# This also lets us cut out the crufty version check and replace it with the one above.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# UGH. And you know what? Fuck SUSE too.
|
# UGH. And you know what? Fuck SUSE too.
|
||||||
@ -38,7 +39,60 @@ function centos_is_stupid {
|
|||||||
curl -sLo /tmp/${XORRISO_RPM} "http://download.opensuse.org/repositories/home:/Knolleblau/openSUSE_${SUSE_VER}/x86_64/${XORRISO_RPM}"
|
curl -sLo /tmp/${XORRISO_RPM} "http://download.opensuse.org/repositories/home:/Knolleblau/openSUSE_${SUSE_VER}/x86_64/${XORRISO_RPM}"
|
||||||
zypper install --no-confirm -l /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
zypper install --no-confirm -l /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# And a double fuck-you to SLED/SLES.
|
||||||
|
if [[ "${HOST_DIST}" == "SUSE" ]];
|
||||||
|
then
|
||||||
|
source /etc/os-release
|
||||||
|
source ${BASEDIR}/lib/prereqs/SUSE/meta
|
||||||
|
SUSE_VER="${VERSION_ID}"
|
||||||
|
SUSE_REL="${ID}"
|
||||||
|
SDK_PKGS=(binutils-devel git xz-devel xz-devel-32bit zlib-devel zlib-devel-32bit)
|
||||||
|
|
||||||
|
if [[ "${PRE_RUN}" != 'none' ]];
|
||||||
|
then
|
||||||
|
echo "Now updating your local package cache..."
|
||||||
|
set +e
|
||||||
|
eval "${PRE_RUN}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: Syncing your local package cache via ${PRE_RUN} command failed."
|
||||||
|
echo "Please ensure you are connected to the Internet/have repositories configured correctly."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
zypper search binutils-devel | egrep -q '^[[:space:]]*|[[:space:]]*binutils-devel[[:space:]]*'
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "In order to install some of the necessary packages on the host, you will need to add the SLE SDK repository."
|
||||||
|
echo "It can be downloaded by visiting http://download.suse.com/ and search for 'SUSE Linux Enterprise Software Development Kit'"
|
||||||
|
echo "(or add it to your subscriptions)."
|
||||||
|
echo "See https://www.suse.com/documentation/${SUSE_REL}-${SUSE_VER}/book_sle_deployment/data/sec_add-ons_sdk.html for more information."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
for pkgname in "${SDK_PKGS[@]}";
|
||||||
|
do
|
||||||
|
eval "${PKG_CHK}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "Installing ${pkgname}..."
|
||||||
|
eval "${PKG_MGR}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: ${pkgname} was not found to be installed and we can't install it."
|
||||||
|
echo "This usually means you aren't connected to the Internet or your package repositories"
|
||||||
|
echo "are not configured correctly. Review the list of packages in ${PKGLIST} and ensure"
|
||||||
|
echo "they are all available to be installed."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,5 @@ rsync
|
|||||||
sed
|
sed
|
||||||
squashfs-tools
|
squashfs-tools
|
||||||
syslinux
|
syslinux
|
||||||
xorriso
|
|
||||||
xz
|
xz
|
||||||
zlib
|
zlib
|
||||||
|
@ -14,6 +14,7 @@ sed
|
|||||||
squashfs-tools
|
squashfs-tools
|
||||||
syslinux
|
syslinux
|
||||||
syslinux-devel
|
syslinux-devel
|
||||||
|
tar
|
||||||
xorriso
|
xorriso
|
||||||
xz
|
xz
|
||||||
xz-devel
|
xz-devel
|
||||||
|
@ -6,3 +6,4 @@ PKG_MGR='zypper install --no-confirm -l ${pkgname}'
|
|||||||
PRE_RUN='zypper refresh'
|
PRE_RUN='zypper refresh'
|
||||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
URL='https://www.suse.com/'
|
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.
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
binutils
|
binutils
|
||||||
binutils-devel
|
|
||||||
curl
|
curl
|
||||||
gcc
|
gcc
|
||||||
gcc-32bit
|
gcc-32bit
|
||||||
@ -16,7 +15,3 @@ sed
|
|||||||
squashfs
|
squashfs
|
||||||
syslinux
|
syslinux
|
||||||
xz
|
xz
|
||||||
xz-devel
|
|
||||||
xz-devel-32bit
|
|
||||||
zlib-devel
|
|
||||||
zlib-devel-32bit
|
|
||||||
|
Loading…
Reference in New Issue
Block a user