From 59bec454495b3d414a9e849850cb7ddd94c8e56f Mon Sep 17 00:00:00 2001 From: r00t Date: Mon, 31 Aug 2015 04:54:29 -0400 Subject: [PATCH] workaround for importing some SUSE vars... --- bin/build.sh | 4 ++-- lib/07-centos_is_stupid.func.sh | 3 +++ lib/10-yo_dj.func.sh | 8 ++++---- lib/prereqs/openSUSE/pkgs | 5 +++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index decb71d..3547fc1 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -85,7 +85,7 @@ CHROOTDIR_GLOB="${CHROOTDIR}" BUILDDIR_GLOB="${BUILDDIR}" # Set the version. -VERSION="$(git describe --abbrev=0 --tags)-$(git rev-parse --short --verify HEAD)" +BUILDVERSION="$(git describe --abbrev=0 --tags)-$(git rev-parse --short --verify HEAD)" BUILD="$(cat BUILDNO)" BUILD="$(expr ${BUILD} + 1)" echo ${BUILD} > ./BUILDNO @@ -104,7 +104,7 @@ set -e USERNAME_REAL="$(grep ${BUILD_USERNAME} /etc/passwd | cut -f5 -d':')" cat > ${BASEDIR}/VERSION_INFO.txt << EOF -Version: ${VERSION} +Version: ${BUILDVERSION} Build: ${BUILD} Time: ${BUILDTIME} Machine: ${BUILD_MACHINE} diff --git a/lib/07-centos_is_stupid.func.sh b/lib/07-centos_is_stupid.func.sh index 1cffa0a..39e1f6e 100644 --- a/lib/07-centos_is_stupid.func.sh +++ b/lib/07-centos_is_stupid.func.sh @@ -37,7 +37,10 @@ function centos_is_stupid { XORRISO_RPM=$(curl -s "http://software.opensuse.org/download.html?project=home%3AKnolleblau&package=xorriso" | egrep "/openSUSE_${SUSE_VER}/x86_64/xorriso-[0-9.-]" | tail -n1 | sed -re 's|^.*x86_64/(xorriso-[0-9.-]*.x86_64.rpm).*$|\1|g') echo "Since you're using openSUSE or SLED/SLES, we need to install xorriso directly from an RPM. Please wait while we do this..." curl -sLo /tmp/${XORRISO_RPM} "http://download.opensuse.org/repositories/home:/Knolleblau/openSUSE_${SUSE_VER}/x86_64/${XORRISO_RPM}" + cp /etc/zypp/zypp.conf /etc/zypp/zypp.conf_BAK."${$}" + echo 'pkg_gpgcheck = no' >> /etc/zypp/zypp.conf zypper install --no-confirm -l /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1 + mv -f /etc/zypp/zypp.conf_BAK."${$}" /etc/zypp/zypp.conf echo "Done." echo diff --git a/lib/10-yo_dj.func.sh b/lib/10-yo_dj.func.sh index 9dbac8b..170de6d 100644 --- a/lib/10-yo_dj.func.sh +++ b/lib/10-yo_dj.func.sh @@ -5,15 +5,15 @@ function yo_dj () { ARCH="${1}" echo "Building the actual .iso image. This may take a while." #im_batman ## WHYTF IS THIS HERE?! - ISOFILENAME="${UXNAME}-${VERSION}.iso" - #MINIFILENAME="${UXNAME}-${VERSION}-mini.iso" + ISOFILENAME="${UXNAME}-${BUILDVERSION}.iso" + #MINIFILENAME="${UXNAME}-${BUILDVERSION}-mini.iso" MINIFILENAME="${UXNAME}-mini.iso" USBFILENAME="${UXNAME}-mini.usb.img" if [[ "${MULTIARCH}" == "y" ]]; then - ISOFILENAME="${UXNAME}-${VERSION}-any.iso" + ISOFILENAME="${UXNAME}-${BUILDVERSION}-any.iso" else - ISOFILENAME="${UXNAME}-${VERSION}-${ARCH}.iso" + ISOFILENAME="${UXNAME}-${BUILDVERSION}-${ARCH}.iso" fi if [[ "${I_AM_A_RACECAR}" == "y" ]]; diff --git a/lib/prereqs/openSUSE/pkgs b/lib/prereqs/openSUSE/pkgs index 49b7539..0ca5253 100644 --- a/lib/prereqs/openSUSE/pkgs +++ b/lib/prereqs/openSUSE/pkgs @@ -1,5 +1,8 @@ binutils +binutils-devel +binutils-devel-32bit curl +dosfstools gcc gcc-32bit git @@ -15,3 +18,5 @@ sed squashfs syslinux xz +xz-devel +xz-devel-32bit