arch/arch-based, rhel/rhel-based pkglists done. untested.

This commit is contained in:
brent s. 2015-07-15 22:04:45 -04:00
parent 7fb6e77c32
commit 411a544d4b
8 changed files with 44 additions and 74 deletions

View File

@ -74,7 +74,7 @@ do
fi
done

source ${BASEDOR/}lib/00-depcheck.func.sh
source ${BASEDIR}/lib/00-depcheck.func.sh

if [ ! -f "./BUILDNO" ];
then
@ -114,13 +114,15 @@ EOF
## FUNCTIONS ##

#source ${BASEDIR}/lib/00-depcheck.func.sh ## this should be called like, VERYYYY first thing, right after sanity/safety checks and such.
#source ${BASEDIR}/lib/01-mk.chroot.func.sh ## this is called automatically and only if no chroot exists
source ${BASEDIR}/lib/01-mk.chroot.func.sh ## this is called automatically and only if no chroot exists
source ${BASEDIR}/lib/02-holla_atcha_boi.func.sh
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
source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
fi
source ${BASEDIR}/lib/08-will_it_blend.func.sh
source ${BASEDIR}/lib/09-stuffy.func.sh
source ${BASEDIR}/lib/10-yo_dj.func.sh
@ -141,7 +143,9 @@ if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root
then
chroot_wrapper 64
chroot_wrapper 32
centos_is_stupid
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
centos_is_stupid
fi
will_it_blend 64
will_it_blend 32
yo_dj
@ -150,7 +154,9 @@ fi
if [[ ${1} == "update" ]];
then
mentos
centos_is_stupid
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
centos_is_stupid
fi
will_it_blend 32
will_it_blend 64
yo_dj
@ -166,7 +172,7 @@ then
fi

# or are we just building?
if [[ ${1} == "build" ]] || [ -z ${1} ] || [[ ${1} == "all" ]];
if [[ ${1} == "build" || -z ${1} || ${1} == "all" ]];
then
if [[ "${MULTIARCH}" == "y" ]];
then

View File

@ -2,72 +2,23 @@ function centos_is_stupid {

FUNCNAME="centos_is_stupid"

echo "Checking for appropriate kernel version and mksquashfs version..."
SQFS_VER=$(mksquashfs -version 2>&1 | head -n1 | awk '{print $3}' | sed -re 's/(^[0-9]*\.[0-9]*).*$/\1/g')
KERN_VER=$(uname -r | cut -f1 -d"-")
SQUASH_OPTS="-noappend -comp xz"

set +e
ver_check() {
[ "$1" == "$2" ] && return 10
ver1front=`echo $1 | cut -d "." -f -1`
ver1back=`echo $1 | cut -d "." -f 2-`
ver2front=`echo $2 | cut -d "." -f -1`
ver2back=`echo $2 | cut -d "." -f 2-`
if [ "$ver1front" != "$1" ] || [ "$ver2front" != "$2" ]; then
[ "$ver1front" -gt "$ver2front" ] && return 11
[ "$ver1front" -lt "$ver2front" ] && return 9
[ "$ver1front" == "$1" ] || [ -z "$ver1back" ] && ver1back=0
[ "$ver2front" == "$2" ] || [ -z "$ver2back" ] && ver2back=0
ver_check "$ver1back" "$ver2back"
return $?
else
[ "$1" -gt "$2" ] && return 11 || return 9
fi
}
ver_check ${KERN_VER} "2.6.38"
KERNTEST=${?}
ver_check ${SQFS_VER} "4.2"
SQFSTEST=${?}
if [ ${KERNTEST} -lt "10" ];
rpm -qa | egrep "^xorriso-[0-9]" > /dev/null 2>&1
if [[ "${?}" != "0" ]];
then
echo "You need a newer kernel to even think about doing this. (>= 2.6.38)"
echo "If you're on CentOS, there are 3.x branches available via the elrepo repository."
echo "I recommend the 'kernel-lt' package from there."
echo "Bailing out."
exit 1
#elif [ ${SQFS_VER} -ge "4.2" ] && [ ${KERN_VER} -ge "2.6.38" ];
elif [ ${SQFSTEST} -ge "10" ] && [ ${KERNTEST} -ge "10" ];
then
#echo "Awesome; your mksquashfs (if found) is not less than v4.2."
SQUASH_CMD=$(which mksquashfs)
if [ ${?} != "0" ];
# Download/install the proper xorriso
EL_VER="$(rpm -qa coreutils | sed -re 's/^coreutils-[0-9.-]*el([0-9])*.*$/\1/g')"
if (("${EL_VER}" < "7"));
then
echo "...Except you need to install whatever package you need to for mksquashfs."
echo "Wow. Your CentOS/RHEL is too old. Sorry; this is only supported on CentOS/RHEL 7 and up."
exit 1
else
SQUASH_CMD=$(which mksquashfs)
fi
elif [ ${SQFSTEST} -lt "10" ] && [ ${KERNTEST} -ge "10" ];
then
if [ ! -f ${SRCDIR}/squashfs4.2/squashfs-tools/mksquashfs ];
then
echo "Boy howdy. We need to compile a custom version of the squashfs-tools because you aren't running a version that supports XZ. Give me a second."
set -e
mkdir -p ${SRCDIR} ${BASEDIR}/bin
cd ${SRCDIR}
#wget --quiet -O squashfs4.2.tar.gz "http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.2/squashfs4.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquashfs%2Ffiles%2F&ts=1387047818&use_mirror=hivelocity"
curl -o squashfs4.2.tar.gz "http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.2/squashfs4.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquashfs%2Ffiles%2F&ts=1387047818&use_mirror=hivelocity" >> "${LOGFILE}.${FUNCNAME}" 2>&1
tar -zxf squashfs4.2.tar.gz
cd squashfs4.2/squashfs-tools
make clean
sed -i -e 's/^#\(XZ_SUPPORT\)/\1/g' Makefile
make
SQUASH_CMD="${SRCDIR}/squashfs4.2/squashfs-tools/mksquashfs"
else
echo "Using custom-compiled mksquashfs from an earlier run."
SQUASH_CMD="${SRCDIR}/squashfs4.2/squashfs-tools/mksquashfs"
fi
XORRISO_RPM=$(curl -s http://pkgs.repoforge.org/xorriso/ | egrep "\"xorriso-[0-9.-]*el${EL_VER}.rf.x86_64.rpm\"" | sed -re "s/^.*\"(xorriso[0-9.-]*el${EL_VER}.rf.x86_64.rpm).*$/\1/g")
echo "Since you're using either CentOS or RHEL, we need to install xorriso directly from an RPM. Please wait while we do this..."
curl -sLo /tmp/${XORRISO_RPM} http://pkgs.repoforge.org/xorriso/${XORRISO_RPM}
yum -y install /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1
echo "Done."
echo
fi
set -e
# 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.

}

View File

@ -6,6 +6,7 @@ git
libisoburn
lynx
make
mtools
patch
perl
rsync

View File

@ -5,3 +5,5 @@ 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?

View File

@ -1,6 +1,6 @@
git
curl
dosfstools
git
libisoburn1
lynx
rsync

View File

@ -1,5 +1,5 @@
git
curl
git
libisofs
lynx
rsync

View File

@ -1,9 +1,19 @@
git
binutils
binutils-devel
curl
gcc
git
libisofs
lynx
make
patch
perl
rsync
sed
squashfs-tools
xorriso
syslinux
syslinux-devel
xz
xz-devel
zlib
zlib-devel

View File

@ -1,6 +1,6 @@
git
curl
dosfstools
git
libisoburn1
lynx
rsync