Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 71e9d7be5d | |||
| b36ef29900 | |||
| f4c8f45ee3 | |||
| 342d9894f5 | |||
| 4403901d8f | |||
| fc0a1ec94a | |||
| eca04c2140 | |||
| 6c4634a11d | |||
| 7fb7871daf | |||
| 43cd3ab4b9 | |||
| ef664d39b9 | |||
| 411a544d4b | |||
| 7fb6e77c32 | |||
| 0153d38a33 | |||
| 52cb0ea321 | |||
| 67aba34ed1 | |||
| b4d619f2f9 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,7 +24,7 @@
|
||||
/logs
|
||||
*.swp
|
||||
*.lck
|
||||
#src/ipxe/src/
|
||||
/extrasrc
|
||||
|
||||
# You should really generate local copies of these, as they're pretty private.
|
||||
extra/pre-build.d/etc/openvpn/client.conf
|
||||
|
||||
7
TODO
7
TODO
@@ -34,12 +34,13 @@
|
||||
--http://ipxe.org/crypto
|
||||
--http://ipxe.org/cmd/imgtrust
|
||||
--http://ipxe.org/cmd/imgverify
|
||||
--https://aur.archlinux.org/packages/ip/ipxe-git/PKGBUILD (NOTE the patches- banner and efi iso specifically)
|
||||
--add conf option to specify EMBED uri
|
||||
--enable use of custom CA/self-signed certs for HTTPS etc.
|
||||
-X-platform
|
||||
--what distros are supported?
|
||||
--automatically install what we need for buildtime
|
||||
--hardcode list of runtime dependencies (e.g. openssh, vim, etc.)
|
||||
---need to finish pkg lists and then test, but meta files should be done as well as lib script
|
||||
--hardcode list of runtime (e.g. live media) dependencies (e.g. openssh, vim, etc.)
|
||||
--...and create separate list for after-the-fact e.g. goodies
|
||||
|
||||
## Split into Separate Tools CD ##
|
||||
|
||||
|
||||
45
bin/build.sh
45
bin/build.sh
@@ -7,6 +7,8 @@
|
||||
#DEBUG
|
||||
#set -x
|
||||
|
||||
echo "Starting at $(date)..."
|
||||
|
||||
## Import settings
|
||||
if [ -f "build.conf" ];
|
||||
then
|
||||
@@ -72,6 +74,8 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
source ${BASEDIR}/lib/00-depcheck.func.sh
|
||||
|
||||
if [ ! -f "./BUILDNO" ];
|
||||
then
|
||||
echo '0' > ./BUILDNO
|
||||
@@ -86,7 +90,7 @@ BUILD="$(cat BUILDNO)"
|
||||
BUILD="$(expr ${BUILD} + 1)"
|
||||
echo ${BUILD} > ./BUILDNO
|
||||
BUILDTIME="$(date)"
|
||||
BUILD_MACHINE="$(hostname -f)"
|
||||
BUILD_MACHINE="$(hostname -f) (${HOST_DIST})"
|
||||
#BUILD_USERNAME="${SUDO_USER}"
|
||||
#BUILD_USERNAME="$(who am i | awk '{print $1}')"
|
||||
set +e ; logname > /dev/null 2>&1
|
||||
@@ -99,7 +103,7 @@ fi
|
||||
set -e
|
||||
USERNAME_REAL="$(grep ${BUILD_USERNAME} /etc/passwd | cut -f5 -d':')"
|
||||
|
||||
cat > VERSION_INFO.txt << EOF
|
||||
cat > ${BASEDIR}/VERSION_INFO.txt << EOF
|
||||
Version: ${VERSION}
|
||||
Build: ${BUILD}
|
||||
Time: ${BUILDTIME}
|
||||
@@ -109,17 +113,18 @@ EOF
|
||||
|
||||
## FUNCTIONS ##
|
||||
|
||||
source lib/02-im_batman.func.sh
|
||||
source lib/03-holla_atcha_boi.func.sh
|
||||
source lib/04-release_me.func.sh
|
||||
source lib/05-facehugger.func.sh
|
||||
source lib/06-chroot_wrapper.func.sh
|
||||
source lib/07-jenny_craig.func.sh
|
||||
source lib/08-centos_is_stupid.func.sh
|
||||
source lib/09-will_it_blend.func.sh
|
||||
source lib/10-stuffy.func.sh
|
||||
source lib/11-yo_dj.func.sh
|
||||
source lib/12-mentos.func.sh
|
||||
#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/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
|
||||
source ${BASEDIR}/lib/08-will_it_blend.func.sh
|
||||
source ${BASEDIR}/lib/09-stuffy.func.sh
|
||||
source ${BASEDIR}/lib/10-yo_dj.func.sh
|
||||
source ${BASEDIR}/lib/11-mentos.func.sh
|
||||
|
||||
## The Business-End(TM) ##
|
||||
|
||||
@@ -132,16 +137,6 @@ release_me 64 > /dev/null 2>&1
|
||||
release_me 32 > /dev/null 2>&1
|
||||
|
||||
# do we need to perform any updates?
|
||||
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
||||
then
|
||||
chroot_wrapper 64
|
||||
chroot_wrapper 32
|
||||
centos_is_stupid
|
||||
will_it_blend 64
|
||||
will_it_blend 32
|
||||
yo_dj
|
||||
fi
|
||||
|
||||
if [[ ${1} == "update" ]];
|
||||
then
|
||||
mentos
|
||||
@@ -161,7 +156,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
|
||||
@@ -194,4 +189,4 @@ fi
|
||||
|
||||
# yay! we're done!
|
||||
rm -f ${LOCKFILE}
|
||||
echo "Finished successfully!"
|
||||
echo "Finished successfully at $(date)!"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Started at $(date)..."
|
||||
|
||||
## Import settings
|
||||
if [ -f "build.conf" ];
|
||||
then
|
||||
@@ -82,3 +84,5 @@ do
|
||||
done
|
||||
|
||||
rm -f ${LOCKFILE}
|
||||
|
||||
echo "Finished successfully at $(date)!"
|
||||
|
||||
@@ -61,7 +61,17 @@ MULTIARCH="yes"
|
||||
# set this to "yes". Otherwise, just build the full ISO.
|
||||
BUILDMINI="no"
|
||||
|
||||
# set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
||||
# What URI should iPXE's EMBED script use?
|
||||
# Only used if BUILDMINI is set to yes.
|
||||
# DO NOT USE A ',' (comma); instead, replace it with:
|
||||
# %%COMMA%%
|
||||
# If you require HTTP BASIC Authentication or HTTP Digest Authentication (untested), you can
|
||||
# format it via the following:
|
||||
# https://user:password@domain.tld/page.php
|
||||
# This currently does not work for HTTPS with self-signed certificates.
|
||||
IPXE_URI="https://bdisk.square-r00t.net"
|
||||
|
||||
# Set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
||||
GIT="no"
|
||||
|
||||
# If this is set, use rsync to copy the http and iso files. This is the rsync destination host.
|
||||
@@ -119,17 +129,19 @@ I_AM_A_RACECAR="no"
|
||||
|
||||
# ________________________________________________________________________________________________
|
||||
## RECOMMENDED DEFALTS ##
|
||||
# The following shoult not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE
|
||||
# The following should not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE
|
||||
# about what you are doing!!!
|
||||
|
||||
# Legacy support.
|
||||
BASEDIR="${BASEDIR}"
|
||||
# This can be used to override automatic distro-detection.
|
||||
# If you DO set this, be sure that you have a matching profile in
|
||||
# ${BASEDIR}/lib/prereqs/<Distro>/meta !!
|
||||
HOST_DIST=""
|
||||
|
||||
# This used to be defined statically (e.g. CHBASEDIR="${BASEDIR}/chroot"),
|
||||
# but is now dynamically appended. Please don't alter this unless you renamed the chroot directory paths.
|
||||
# This used to be defined statically, but is now dynamically appended. Please don't alter this
|
||||
# unless you renamed the chroot directory paths.
|
||||
CHROOTDIR="${BASEDIR}/"
|
||||
CHROOTDIR32="${CHBASEDIR}root.i686"
|
||||
CHROOTDIR64="${CHBASEDIR}root.x86_64"
|
||||
CHROOTDIR32="${CHROOTDIR}root.i686"
|
||||
CHROOTDIR64="${CHROOTDIR}root.x86_64"
|
||||
|
||||
# This is a directory we use for staging. It definitely should not be checked into git.
|
||||
# It used to be defined statically (e.g. BUILDDIR="${BASEDIR}/build"),
|
||||
|
||||
@@ -7,23 +7,25 @@ afflib
|
||||
aircrack-ng
|
||||
apr
|
||||
apr-util
|
||||
arch-install-scripts
|
||||
archiso
|
||||
arj
|
||||
asciidoc
|
||||
atop
|
||||
autopsy
|
||||
autossh
|
||||
backuppc
|
||||
#bacula ## TODO: grab all the bacula packages in here
|
||||
beep
|
||||
bin86
|
||||
bind-tools
|
||||
binutils
|
||||
bluez-utils
|
||||
bonnie++
|
||||
boxbackup-client
|
||||
boxbackup-server
|
||||
bozocrack-git
|
||||
bridge-utils
|
||||
burp-backup-git
|
||||
btrfs-progs
|
||||
bzip2
|
||||
cabextract
|
||||
cdrtools
|
||||
cdw
|
||||
@@ -33,17 +35,17 @@ chntpw
|
||||
cifs-utils
|
||||
ckermit
|
||||
clamav
|
||||
clonezilla
|
||||
cmospwd
|
||||
colordiff
|
||||
coreutils
|
||||
cowpatty
|
||||
cpio
|
||||
cpuburn
|
||||
cpupower
|
||||
crackpkcs12
|
||||
cronie
|
||||
#cryptcat
|
||||
cryptsetup
|
||||
csync2
|
||||
customizepkg-scripting
|
||||
dar
|
||||
dcfldd
|
||||
@@ -52,9 +54,6 @@ dd_rescue
|
||||
dd_rhelp
|
||||
debianutils
|
||||
debootstrap
|
||||
dhclient
|
||||
dhcp
|
||||
dhcpcd
|
||||
dialog
|
||||
diffutils
|
||||
djohn
|
||||
@@ -63,7 +62,6 @@ dnssec-anchors
|
||||
dnstracer
|
||||
#dnsutils #replaced by bind-tools, https://www.archlinux.org/packages/extra/x86_64/bind-tools/
|
||||
dos2unix
|
||||
dosfstools
|
||||
dropbear
|
||||
dstat
|
||||
dump
|
||||
@@ -73,8 +71,6 @@ dvd+rw-tools
|
||||
e2fsprogs
|
||||
ecryptfs-utils
|
||||
ed
|
||||
efibootmgr
|
||||
efivar
|
||||
elfutils
|
||||
#elilo-efi
|
||||
elinks
|
||||
@@ -110,7 +106,6 @@ gpm
|
||||
gptfdisk
|
||||
gst-libav
|
||||
gst-plugins-ugly
|
||||
gummiboot
|
||||
hashcat
|
||||
hddtemp
|
||||
hdparm
|
||||
@@ -132,10 +127,8 @@ iozone
|
||||
ipcalc
|
||||
iperf
|
||||
iperf3
|
||||
iproute2
|
||||
ipsec-tools
|
||||
iptraf-ng
|
||||
iputils
|
||||
irssi
|
||||
iso-codes
|
||||
isomaster
|
||||
@@ -145,10 +138,8 @@ jfsutils
|
||||
john
|
||||
keyutils
|
||||
kismet-allplugins
|
||||
libisoburn
|
||||
lftp
|
||||
links
|
||||
localepurge
|
||||
#logkeys
|
||||
logkeys-keymaps
|
||||
lm_sensors
|
||||
@@ -159,10 +150,7 @@ lsof
|
||||
lsscsi
|
||||
lxde
|
||||
lynx
|
||||
lz4
|
||||
#lzip
|
||||
lzo
|
||||
lzop
|
||||
macchanger
|
||||
magicrescue
|
||||
mbr
|
||||
@@ -175,10 +163,8 @@ megaraid-cli
|
||||
memtester
|
||||
mfoc
|
||||
minicom
|
||||
mkinitcpio-nfs-utils
|
||||
ms-sys
|
||||
mondo
|
||||
mtd-utils
|
||||
mtools
|
||||
mtr
|
||||
mtree
|
||||
#mtx
|
||||
@@ -189,11 +175,8 @@ ncftp
|
||||
ncompress
|
||||
ncrack
|
||||
net-snmp
|
||||
net-tools
|
||||
netctl
|
||||
netselect
|
||||
nettle
|
||||
networkmanager
|
||||
networkmanager-pptp
|
||||
nginx-devel
|
||||
ngrep
|
||||
@@ -202,15 +185,16 @@ nmon
|
||||
ntfs-3g
|
||||
ntfsfixboot
|
||||
nwipe
|
||||
obnam
|
||||
open-iscsi
|
||||
openipmi
|
||||
openssh
|
||||
openvpn
|
||||
ophcrack
|
||||
os-prober
|
||||
p7zip
|
||||
pack
|
||||
par2cmdline
|
||||
partclone
|
||||
partclone-utils
|
||||
parted
|
||||
partimage
|
||||
pax-utils
|
||||
@@ -233,9 +217,8 @@ procinfo-ng
|
||||
procps-ng
|
||||
progsreiserfs
|
||||
psmisc
|
||||
pv
|
||||
pwgen
|
||||
pxz
|
||||
pixz
|
||||
pyrit-svn
|
||||
python2-gnuplot
|
||||
python2-pyx
|
||||
@@ -251,7 +234,6 @@ rpcbind
|
||||
rpmextract
|
||||
rp-pppoe
|
||||
rsnapshot
|
||||
rsync
|
||||
rygel
|
||||
safecopy
|
||||
samba
|
||||
@@ -261,27 +243,20 @@ scrounge-ntfs
|
||||
scrub
|
||||
scsiadd
|
||||
sdparm
|
||||
sed
|
||||
setserial
|
||||
sg3_utils
|
||||
sharutils
|
||||
shorewall
|
||||
sipcalc
|
||||
sipcrack
|
||||
smartmontools
|
||||
smbclient
|
||||
s-nail
|
||||
socat
|
||||
squashfs3-tools
|
||||
squashfs-tools
|
||||
#star
|
||||
#star ## do people even USE tape packups anymore?
|
||||
strace
|
||||
stress
|
||||
sucrack
|
||||
sudo
|
||||
symlinks
|
||||
sysfsutils
|
||||
syslinux
|
||||
sysstat
|
||||
tcpdump
|
||||
tcpslice
|
||||
@@ -292,7 +267,6 @@ thin-provisioning-tools
|
||||
thttpd
|
||||
tmon
|
||||
tmux
|
||||
traceroute
|
||||
tre
|
||||
truecrack-svn
|
||||
truecrypt
|
||||
@@ -300,6 +274,7 @@ tor
|
||||
udftools
|
||||
#udpcast
|
||||
unace
|
||||
unison
|
||||
unrar
|
||||
unshield
|
||||
unzip
|
||||
@@ -332,6 +307,7 @@ xfsprogs
|
||||
xmlto
|
||||
xorg
|
||||
xorg-drivers
|
||||
xorg-xinit
|
||||
zerofree
|
||||
zip
|
||||
zsh
|
||||
|
||||
@@ -25,8 +25,8 @@ noedit=1
|
||||
skipinteg=1
|
||||
#skiptest=1
|
||||
#warn=1
|
||||
tmpdir=/var/tmp/apacman
|
||||
TMPDIR=/var/tmp/apacman
|
||||
#tmpdir=/var/tmp/apacman
|
||||
#TMPDIR=/var/tmp/apacman
|
||||
|
||||
#
|
||||
# CONFIGURATION
|
||||
|
||||
@@ -4,6 +4,9 @@ build() {
|
||||
add_runscript
|
||||
|
||||
add_binary curl
|
||||
|
||||
add_full_dir /etc/ssl
|
||||
add_full_dir /etc/ca-certificates
|
||||
}
|
||||
|
||||
help() {
|
||||
|
||||
@@ -1,3 +1,93 @@
|
||||
#!/bin/bash
|
||||
|
||||
# placeholder...
|
||||
function so_check_me_out {
|
||||
|
||||
FUNCNAME="depcheck"
|
||||
|
||||
if [[ -n ${HOST_DIST} ]];
|
||||
then
|
||||
if [[ ! -f ${BASEDIR}/lib/prereqs/${HOST_DIST}/meta || ! -f ${BASEDIR}/lib/prereqs/${HOST_DIST}/pkgs ]];
|
||||
then
|
||||
echo "ERROR: You have specified ${HOST_DIST} as your host system's distro, but it is missing a meta and/or pkgs profile."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
set +e
|
||||
if [[ -z "${HOST_DIST}" ]];
|
||||
then
|
||||
for dist_profile in $(find "${BASEDIR}"/lib/prereqs -type f -name 'meta');
|
||||
do
|
||||
source ${dist_profile}
|
||||
if [[ "${SUPPORTED}" != "yes" ]];
|
||||
then
|
||||
continue
|
||||
fi
|
||||
eval "${CHECK_METHOD}" > /dev/null 2>&1
|
||||
if [[ "${?}" == "0" ]];
|
||||
then
|
||||
export HOST_DIST="${NAME}"
|
||||
echo "Detected distro as ${HOST_DIST}."
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
fi
|
||||
set -e
|
||||
|
||||
# Sanity is important.
|
||||
if [[ -z "${HOST_DIST}" ]];
|
||||
then
|
||||
echo "ERROR: Your distro was not found/detected, or is flagged as unsupported."
|
||||
exit 1
|
||||
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}"
|
||||
META="${DISTRO_DIR}/meta"
|
||||
PKGLIST="${DISTRO_DIR}/pkgs"
|
||||
|
||||
# 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..."
|
||||
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
|
||||
set -e
|
||||
fi
|
||||
|
||||
set +e
|
||||
while read pkgname;
|
||||
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."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done < ${PKGLIST}
|
||||
set -e
|
||||
|
||||
rm -f "${LOCKFILE}"
|
||||
}
|
||||
|
||||
so_check_me_out
|
||||
|
||||
@@ -109,10 +109,10 @@ function mkchroot {
|
||||
echo "Local: ${LOCSUM32}"
|
||||
echo "Remote: ${CKSUM32}"
|
||||
echo "Fetching fresh copy."
|
||||
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}"
|
||||
fi
|
||||
else
|
||||
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}"
|
||||
fi
|
||||
|
||||
if [ ! -f "${CHROOTDIR32}/etc/pacman.d/gnupg/trustdb.gpg" ] || [ ! -f "${CHROOTDIR64}/etc/pacman.d/gnupg/trustdb.gpg" ];
|
||||
@@ -147,6 +147,7 @@ HOME_URL="https://www.archlinux.org/"
|
||||
SUPPORT_URL="https://bbs.archlinux.org/"
|
||||
BUG_REPORT_URL="https://bugs.archlinux.org/"
|
||||
EOF
|
||||
cp ${BASEDIR}/VERSION_INFO.txt ${BASEDIR}/root.${i}/.
|
||||
done
|
||||
|
||||
# And make it usable.
|
||||
@@ -212,10 +213,42 @@ EOF
|
||||
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf
|
||||
fi
|
||||
|
||||
# Baseline packages
|
||||
echo "Installing baseline packages..."
|
||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst | tr '\n' ' ')
|
||||
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||
do
|
||||
set +e
|
||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||
set -e
|
||||
${CHROOTCMD} ${i}/ bash -c "yes '' | apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
set +e
|
||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||
set -e
|
||||
done
|
||||
# 32-bit
|
||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst.32 | tr '\n' ' ')
|
||||
if [ -n "${PKGLIST}" ];
|
||||
then
|
||||
${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
fi
|
||||
set +e
|
||||
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||
set -e
|
||||
# 64-bit
|
||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst.64 | tr '\n' ' ')
|
||||
if [ -n "${PKGLIST}" ];
|
||||
then
|
||||
${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
fi
|
||||
set +e
|
||||
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||
set -e
|
||||
|
||||
# preprocessing
|
||||
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
||||
# both
|
||||
echo "Installing common packages..."
|
||||
echo "Installing extra common packages..."
|
||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.both | tr '\n' ' ')
|
||||
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||
do
|
||||
@@ -278,7 +311,7 @@ EOF
|
||||
done
|
||||
|
||||
# 32-bit
|
||||
echo "Installing packages for 32-bit..."
|
||||
echo "Installing extra packages for 32-bit..."
|
||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
||||
if [ -n "${PKGLIST}" ];
|
||||
then
|
||||
@@ -290,7 +323,7 @@ EOF
|
||||
echo "Done."
|
||||
|
||||
# 64-bit
|
||||
echo "Installing packages for 64-bit..."
|
||||
echo "Installing estra packages for 64-bit..."
|
||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
||||
if [ -n "${PKGLIST}" ];
|
||||
then
|
||||
@@ -326,10 +359,13 @@ EOF
|
||||
echo "Done."
|
||||
|
||||
|
||||
rm -f ${LOCKFILE}
|
||||
#rm -f ${LOCKFILE}
|
||||
|
||||
echo "Chroot setup complete."
|
||||
|
||||
}
|
||||
|
||||
mkchroot
|
||||
if [[ ! -f "${BASEDIR}/root.x86_64/VERSION_INFO.txt" && ! -f "${BASEDIR}/root.x86_64/VERSION_INFO.txt" ]];
|
||||
then
|
||||
mkchroot
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
function holla_atcha_boi {
|
||||
|
||||
FUNCNAME="holla_atcha_boi"
|
||||
|
||||
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
||||
then
|
||||
RACECAR_CHK='nice -n -19 '
|
||||
@@ -7,6 +9,7 @@ function holla_atcha_boi {
|
||||
RACECAR_CHK=""
|
||||
fi
|
||||
|
||||
so_check_me_out
|
||||
|
||||
# Do we have an existing chroot set up yet? If not, create.
|
||||
if [[ ! -d "root.x86_64/root" || ! -d "root.i686/root" ]];
|
||||
@@ -1,30 +0,0 @@
|
||||
function im_batman {
|
||||
set +e # false errors are bad mmk
|
||||
# Detect the distro and set some vars
|
||||
if [ -f "/usr/bin/yum" ]; # CentOS/Redhat, etc.
|
||||
then
|
||||
OS_STRING='RHEL-like'
|
||||
DISTRO='RHEL'
|
||||
INST_CMD='yum -y install '
|
||||
elif [ -f "/usr/bin/pacman" ]; # Arch, Manjaro, etc.
|
||||
then
|
||||
OS_STRING='Arch-like'
|
||||
DISTRO='Arch'
|
||||
INST_CMD='pacman -S '
|
||||
elif [ -f "/usr/bin/emerge" ]; # Gentoo
|
||||
then
|
||||
OS_STRING='Gentoo-like'
|
||||
DISTRO='Gentoo'
|
||||
INST_CMD='emerge '
|
||||
elif [ -f "/usr/bin/apt-get" ]; # Debian, Ubuntu (and derivatives), etc.
|
||||
then
|
||||
OS_STRING='Debian-like'
|
||||
DISTRO="Debian"
|
||||
INST_CMD='apt-get install '
|
||||
else
|
||||
echo 'Sorry, I cannot detect which distro you are running. Please report this along with what distro you are running. Dying now.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e # and turn this back on lolz
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
function release_me () {
|
||||
|
||||
FUNCNAME="release_me"
|
||||
|
||||
## check for mountpoints from a manual chroot and umount them if they're still mounted.
|
||||
## NOTE: you can use findmnt(8) to view a tree of mountpoints, including bindmounts etc.
|
||||
# Is there an active chroot?
|
||||
@@ -1,4 +1,7 @@
|
||||
function facehugger () {
|
||||
|
||||
FUNCNAME="facehugger"
|
||||
|
||||
local ARCHSUFFIX="${1}"
|
||||
if [[ "${1}" == "64" ]];
|
||||
then
|
||||
@@ -1,4 +1,7 @@
|
||||
function chroot_wrapper () {
|
||||
|
||||
FUNCNAME="chroot_wrapper"
|
||||
|
||||
local ARCHSUFFIX="${1}"
|
||||
if [[ "${1}" == "64" ]];
|
||||
then
|
||||
@@ -1,4 +1,7 @@
|
||||
function jenny_craig () {
|
||||
|
||||
FUNCNAME="jenny_craig"
|
||||
|
||||
BUILDDIR="${BUILDDIR_GLOB}"
|
||||
if [[ "${1}" == "64" ]];
|
||||
then
|
||||
98
lib/07-centos_is_stupid.func.sh
Normal file
98
lib/07-centos_is_stupid.func.sh
Normal file
@@ -0,0 +1,98 @@
|
||||
function centos_is_stupid {
|
||||
|
||||
FUNCNAME="centos_is_stupid"
|
||||
|
||||
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
|
||||
then
|
||||
rpm -qa | egrep -q "^xorriso-[0-9]"
|
||||
if [[ "${?}" != "0" ]];
|
||||
then
|
||||
# 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 "Wow. Your CentOS/RHEL is too old. Sorry; this is only supported on CentOS/RHEL 7 and up."
|
||||
exit 1
|
||||
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
|
||||
# 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
|
||||
|
||||
# UGH. And you know what? Fuck SUSE too.
|
||||
if [[ "${HOST_DIST}" == "openSUSE" || "${HOST_DIST}" == "SUSE" ]];
|
||||
then
|
||||
rpm -qa | egrep -q "^xorriso-[0-9]"
|
||||
if [[ "${?}" != "0" ]];
|
||||
then
|
||||
# Download/install the proper xorriso
|
||||
source /etc/os-release
|
||||
SUSE_VER="${VERSION_ID}"
|
||||
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}"
|
||||
zypper install --no-confirm -l /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
echo "Done."
|
||||
|
||||
echo
|
||||
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
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
function 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" ];
|
||||
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" ];
|
||||
then
|
||||
echo "...Except you need to install whatever package you need to for mksquashfs."
|
||||
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
|
||||
fi
|
||||
set -e
|
||||
}
|
||||
@@ -1,4 +1,10 @@
|
||||
function will_it_blend () {
|
||||
|
||||
FUNCNAME="will_it_blend"
|
||||
|
||||
SQUASH_CMD="mksquashfs"
|
||||
SQUASH_OPTS="-noappend -comp xz"
|
||||
|
||||
local ARCHSUFFIX="${1}"
|
||||
if [[ "${1}" == "64" ]];
|
||||
then
|
||||
@@ -1,5 +1,7 @@
|
||||
function stuffy {
|
||||
|
||||
FUNCNAME="stuffy"
|
||||
|
||||
cp -f ${BASEDIR}/VERSION_INFO.txt ${TEMPDIR}/.
|
||||
|
||||
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
||||
@@ -21,12 +23,12 @@ function stuffy {
|
||||
if [ ! -f "${TEMPDIR}/EFI/shellx64_v2.efi" ];
|
||||
then
|
||||
# EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell )
|
||||
curl -o ${TEMPDIR}/EFI/shellx64_v2.efi https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
curl -o ${TEMPDIR}/EFI/shellx64_v2.efi "https://github.com/tianocore/edk2/blob/master/ShellBinPkg/UefiShell/X64/Shell.efi?raw=true" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
fi
|
||||
if [ ! -f "${TEMPDIR}/EFI/shellx64_v1.efi" ];
|
||||
then
|
||||
# EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell )
|
||||
curl -o ${TEMPDIR}/EFI/shellx64_v1.efi https://svn.code.sf.net/p/edk2/code/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
curl -o ${TEMPDIR}/EFI/shellx64_v1.efi "https://github.com/tianocore/edk2/blob/master/EdkShellBinPkg/FullShell/X64/Shell_Full.efi?raw=true" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
fi
|
||||
|
||||
# now for setting up loader config/entries. maybe add memtest or something in the future? i dunno.
|
||||
@@ -1,7 +1,10 @@
|
||||
function yo_dj () {
|
||||
|
||||
FUNCNAME="yo_dj"
|
||||
|
||||
ARCH="${1}"
|
||||
echo "Building the actual .iso image. This may take a while."
|
||||
im_batman
|
||||
#im_batman ## WHYTF IS THIS HERE?!
|
||||
ISOFILENAME="${UXNAME}-${VERSION}.iso"
|
||||
#MINIFILENAME="${UXNAME}-${VERSION}-mini.iso"
|
||||
MINIFILENAME="${UXNAME}-mini.iso"
|
||||
@@ -293,9 +296,12 @@ EOF
|
||||
do
|
||||
patch -Np2 < ${BASEDIR}/src/ipxe_local/patches/${i} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
done
|
||||
#make everything EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
make bin/ipxe.eiso bin/ipxe.usb EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
# Generate the iPXE EMBED script...
|
||||
sed -re "s,^(chain\ ).*$,\1${IPXE_URI},g" \
|
||||
-e 's/%%COMMA%%/,/g' ${BASEDIR}/src/ipxe_local/EMBED > ${SRCDIR}/EMBED
|
||||
#make everything EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
make bin/ipxe.eiso bin/ipxe.usb EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
# Change this to USB-only...
|
||||
#make all EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
mv -f ${BASEDIR}/src/ipxe/src/bin/ipxe.usb ${ISODIR}/${USBFILENAME}
|
||||
@@ -1,4 +1,7 @@
|
||||
function mentos {
|
||||
|
||||
FUNCNAME="mentos"
|
||||
|
||||
# Freshen up the chroots to git's HEAD. Package lists, overlay, etc.
|
||||
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
||||
# both
|
||||
27
lib/prereqs/Antergos/meta
Normal file
27
lib/prereqs/Antergos/meta
Normal file
@@ -0,0 +1,27 @@
|
||||
NAME='Antergos'
|
||||
SUPPORTED='yes'
|
||||
CHECK_METHOD='egrep "^NAME=\"Antergos Linux\"$" /etc/os-release'
|
||||
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.
|
||||
|
||||
pacman -S --needed --noconfirm haveged >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
haveged
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
1
lib/prereqs/Antergos/pkgs
Symbolic link
1
lib/prereqs/Antergos/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../Arch/pkgs
|
||||
27
lib/prereqs/Arch/meta
Normal file
27
lib/prereqs/Arch/meta
Normal file
@@ -0,0 +1,27 @@
|
||||
NAME='Arch'
|
||||
SUPPORTED='yes'
|
||||
CHECK_METHOD='egrep "^NAME=\"Arch Linux\"$" /etc/os-release'
|
||||
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.
|
||||
|
||||
pacman -S --needed --noconfirm haveged >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
haveged
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
19
lib/prereqs/Arch/pkgs
Normal file
19
lib/prereqs/Arch/pkgs
Normal file
@@ -0,0 +1,19 @@
|
||||
binutils
|
||||
curl
|
||||
dosfstools
|
||||
findutils
|
||||
gcc-libs-multilib
|
||||
gcc-multilib
|
||||
git
|
||||
libisoburn
|
||||
lynx
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs-tools
|
||||
syslinux
|
||||
xz
|
||||
zlib
|
||||
17
lib/prereqs/CentOS/meta
Normal file
17
lib/prereqs/CentOS/meta
Normal file
@@ -0,0 +1,17 @@
|
||||
NAME='CentOS'
|
||||
# Currently fails on installing software *inside* the chroot. Will troubleshoot and restore when figured out.
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^CentOS" /etc/redhat-release'
|
||||
PKG_MGR='yum -y install ${pkgname}'
|
||||
PRE_RUN='none'
|
||||
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||
URL='http://centos.org/'
|
||||
|
||||
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?
|
||||
# You need EPEL enabled, by the way.
|
||||
|
||||
echo "No tweaks found."
|
||||
|
||||
}
|
||||
1
lib/prereqs/CentOS/pkgs
Symbolic link
1
lib/prereqs/CentOS/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../RHEL/pkgs
|
||||
13
lib/prereqs/Debian/meta
Normal file
13
lib/prereqs/Debian/meta
Normal file
@@ -0,0 +1,13 @@
|
||||
NAME='Debian'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^NAME=\"Debian\ GNU/Linux\"$" /etc/os-release'
|
||||
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."
|
||||
|
||||
}
|
||||
26
lib/prereqs/Debian/pkgs
Normal file
26
lib/prereqs/Debian/pkgs
Normal file
@@ -0,0 +1,26 @@
|
||||
binutils
|
||||
binutils-dev
|
||||
curl
|
||||
dosfstools
|
||||
gcc
|
||||
gcc-multilib
|
||||
git
|
||||
isolinux
|
||||
libiberty-dev
|
||||
libisoburn1
|
||||
lynx
|
||||
liblzma5
|
||||
liblsma-dev
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs-tools
|
||||
syslinux
|
||||
syslinux-efi
|
||||
xorriso
|
||||
xz-utils
|
||||
zlib1g
|
||||
zlib1g-dev
|
||||
14
lib/prereqs/Devuan/meta
Normal file
14
lib/prereqs/Devuan/meta
Normal file
@@ -0,0 +1,14 @@
|
||||
NAME='Devuan'
|
||||
SUPPORTED='yes'
|
||||
CHECK_METHOD='egrep "^NAME=\"Devuan\ GNU/Linux\"$" /etc/os-release'
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
1
lib/prereqs/Devuan/pkgs
Symbolic link
1
lib/prereqs/Devuan/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../Debian/pkgs
|
||||
14
lib/prereqs/Fedora/meta
Normal file
14
lib/prereqs/Fedora/meta
Normal file
@@ -0,0 +1,14 @@
|
||||
NAME='Fedora'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep '^Fedora' /etc/redhat-release'
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
22
lib/prereqs/Fedora/pkgs
Normal file
22
lib/prereqs/Fedora/pkgs
Normal file
@@ -0,0 +1,22 @@
|
||||
binutils
|
||||
binutils-devel
|
||||
curl
|
||||
gcc
|
||||
git
|
||||
libisofs
|
||||
lynx
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs-tools
|
||||
syslinux
|
||||
syslinux-devel
|
||||
tar
|
||||
xorriso
|
||||
xz
|
||||
xz-devel
|
||||
zlib
|
||||
zlib-devel
|
||||
20
lib/prereqs/Gentoo/meta
Normal file
20
lib/prereqs/Gentoo/meta
Normal file
@@ -0,0 +1,20 @@
|
||||
NAME='Gentoo'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^Gentoo\ Base\ System" /etc/gentoo-release'
|
||||
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
|
||||
|
||||
}
|
||||
17
lib/prereqs/Gentoo/pkgs
Normal file
17
lib/prereqs/Gentoo/pkgs
Normal file
@@ -0,0 +1,17 @@
|
||||
sys-devel/binutils
|
||||
net-misc/curl
|
||||
sys-devel/gcc
|
||||
dev-vcs/git
|
||||
dev-libs/libisoburn
|
||||
www-client/lynx
|
||||
app-arch/lzma
|
||||
sys-devel/make
|
||||
sys-fs/mtools
|
||||
sys-devel/patch
|
||||
dev-lang/perl
|
||||
net-misc/rsync
|
||||
sys-apps/sed
|
||||
sys-fs/squashfs-tools
|
||||
sys-boot/syslinux
|
||||
app-arch/xz-utils
|
||||
sys-libs/zlib
|
||||
19
lib/prereqs/HUMAN
Normal file
19
lib/prereqs/HUMAN
Normal file
@@ -0,0 +1,19 @@
|
||||
This directory is used to enable cross-distro support and set baseline ISO packages needed for it to boot. A list of packages is needed for the *host* to build the ISO as well, which you'll find detailed below. Adding distro support is easy; there simply needs to be the following added:
|
||||
|
||||
<basedir>/lib/prereqs/<Distro>/{meta,pkgs}
|
||||
|
||||
"pkgs" should contain a list of the specific package names needed to install for that specific distro (as this isn't always standardized).
|
||||
|
||||
"meta" is a file consisting of the following variables (enclosed in single or double quotes, please:
|
||||
|
||||
NAME=<Distro - this should match the name of the directory this file is in!>
|
||||
SUPPORTED=<yes or no- yes by default>
|
||||
CHECK_METHOD=<a command that will be run that should return '0' (success) on *only* this specific distro
|
||||
(or fully compatible derivatives, i.e. CentOS/RHEL)>
|
||||
PKG_MGR=<a command used to prefix installation of packages e.g. for RHEL, "yum -y install">
|
||||
PRE_RUN=<a command to be run before PKG_MGR (e.g. on Ubuntu, "apt-get update"). commonly used to update package caches/metadata.
|
||||
if your distro does not require this, set PRE_RUN=none >
|
||||
PKG_CHK=<a command that will be run that should return '0' (success) *only* if any given package in the pkgs file is installed. e.g. for RHEL, "rpm -q">
|
||||
URL=<the URL for the distro. optional, as it isn't really used as any active part of the scripts- at least not presently.>
|
||||
|
||||
Oh- and your distro *must be able to install the package*. That means if you need to enable/add additional repositories, be sure to do so ahead of time.
|
||||
14
lib/prereqs/Mageia/meta
Normal file
14
lib/prereqs/Mageia/meta
Normal file
@@ -0,0 +1,14 @@
|
||||
NAME='Mageia'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^Mageia\ release\ " /etc/mageia-release'
|
||||
PKG_MGR='urpmi --force --auto ${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."
|
||||
|
||||
}
|
||||
|
||||
27
lib/prereqs/Mageia/pkgs
Normal file
27
lib/prereqs/Mageia/pkgs
Normal file
@@ -0,0 +1,27 @@
|
||||
binutils
|
||||
binutils-devel
|
||||
curl
|
||||
gcc
|
||||
git
|
||||
lib64isofs6
|
||||
lib64apr1_0
|
||||
lib64apr-util1_0
|
||||
lib64lzma5
|
||||
lib64lzma-devel
|
||||
lib64lzmalib1
|
||||
lib64lzmalib-devel
|
||||
libstdc++-devel
|
||||
lynx
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs-tools
|
||||
syslinux
|
||||
syslinux-devel
|
||||
xorriso
|
||||
xz
|
||||
zlib
|
||||
zlib-devel
|
||||
27
lib/prereqs/Manjaro/meta
Normal file
27
lib/prereqs/Manjaro/meta
Normal file
@@ -0,0 +1,27 @@
|
||||
NAME='Manjaro'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^NAME=\"Manjaro Linux\"$" /etc/os-release'
|
||||
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.
|
||||
|
||||
pacman -S --needed --noconfirm haveged >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||
haveged
|
||||
|
||||
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
|
||||
|
||||
}
|
||||
1
lib/prereqs/Manjaro/pkgs
Symbolic link
1
lib/prereqs/Manjaro/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../Arch/pkgs
|
||||
13
lib/prereqs/Mint/meta
Normal file
13
lib/prereqs/Mint/meta
Normal file
@@ -0,0 +1,13 @@
|
||||
NAME='Mint'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^DESCRIPTION=\"Linux\ Mint\"" /etc/linuxmint/info'
|
||||
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."
|
||||
|
||||
}
|
||||
1
lib/prereqs/Mint/pkgs
Symbolic link
1
lib/prereqs/Mint/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../Ubuntu/pkgs
|
||||
15
lib/prereqs/RHEL/meta
Normal file
15
lib/prereqs/RHEL/meta
Normal file
@@ -0,0 +1,15 @@
|
||||
NAME='RHEL'
|
||||
SUPPORTED='untested'
|
||||
# Red Hat Enterprise Linux Server release 6.5 (Santiago)
|
||||
CHECK_METHOD='egrep "^Red\ Hat\ Enterprise\ Linux" /etc/redhat-release'
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
20
lib/prereqs/RHEL/pkgs
Normal file
20
lib/prereqs/RHEL/pkgs
Normal file
@@ -0,0 +1,20 @@
|
||||
binutils
|
||||
binutils-devel
|
||||
curl
|
||||
gcc
|
||||
git
|
||||
libisofs
|
||||
lynx
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs-tools
|
||||
syslinux
|
||||
syslinux-devel
|
||||
xz
|
||||
xz-devel
|
||||
zlib
|
||||
zlib-devel
|
||||
16
lib/prereqs/SUSE/meta
Normal file
16
lib/prereqs/SUSE/meta
Normal file
@@ -0,0 +1,16 @@
|
||||
NAME='SUSE'
|
||||
SUPPORTED='untested'
|
||||
# Both SLED and SLES. We can probably safely combine them.
|
||||
CHECK_METHOD='egrep "^NAME=\"SLE(D|S)\"$" /etc/os-release'
|
||||
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/'
|
||||
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
1
lib/prereqs/SUSE/pkgs
Symbolic link
1
lib/prereqs/SUSE/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../openSUSE/pkgs
|
||||
14
lib/prereqs/Ubuntu/meta
Normal file
14
lib/prereqs/Ubuntu/meta
Normal file
@@ -0,0 +1,14 @@
|
||||
NAME='Ubuntu'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^DISTRIB_ID=Ubuntu$" /etc/lsb-release'
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
26
lib/prereqs/Ubuntu/pkgs
Normal file
26
lib/prereqs/Ubuntu/pkgs
Normal file
@@ -0,0 +1,26 @@
|
||||
binutils
|
||||
binutils-dev
|
||||
curl
|
||||
dosfstools
|
||||
gcc
|
||||
gcc-multilib
|
||||
git
|
||||
isolinux
|
||||
libiberty-dev
|
||||
libisoburn1
|
||||
lynx
|
||||
liblzma5
|
||||
liblsma-dev
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs-tools
|
||||
syslinux
|
||||
syslinux-efi
|
||||
xorriso
|
||||
xz-utils
|
||||
zlib1g
|
||||
zlib1g-dev
|
||||
14
lib/prereqs/elementaryOS/meta
Normal file
14
lib/prereqs/elementaryOS/meta
Normal file
@@ -0,0 +1,14 @@
|
||||
NAME='elementaryOS'
|
||||
SUPPORTED='untested'
|
||||
CHECK_METHOD='egrep "^DISTRIB_ID=\"elementary OS\"$" /etc/lsb-release'
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
1
lib/prereqs/elementaryOS/pkgs
Symbolic link
1
lib/prereqs/elementaryOS/pkgs
Symbolic link
@@ -0,0 +1 @@
|
||||
../Ubuntu/pkgs
|
||||
40
lib/prereqs/iso.pkgs.lst
Normal file
40
lib/prereqs/iso.pkgs.lst
Normal file
@@ -0,0 +1,40 @@
|
||||
arch-install-scripts
|
||||
archiso
|
||||
bzip2
|
||||
coreutils
|
||||
cronie
|
||||
dhclient
|
||||
dhcp
|
||||
dhcpcd
|
||||
dosfstools
|
||||
efibootmgr
|
||||
efivar
|
||||
ethtool
|
||||
file
|
||||
findutils
|
||||
gummiboot
|
||||
iproute2
|
||||
iputils
|
||||
libisoburn
|
||||
localepurge
|
||||
lz4
|
||||
lzo
|
||||
lzop
|
||||
mkinitcpio-nfs-utils
|
||||
ms-sys
|
||||
mtools
|
||||
net-tools
|
||||
netctl
|
||||
networkmanager
|
||||
openssh
|
||||
openvpn
|
||||
pv
|
||||
rsync
|
||||
sed
|
||||
shorewall
|
||||
squashfs3-tools
|
||||
squashfs-tools
|
||||
sudo
|
||||
sysfsutils
|
||||
syslinux
|
||||
traceroute
|
||||
1
lib/prereqs/iso.pkgs.lst.32
Normal file
1
lib/prereqs/iso.pkgs.lst.32
Normal file
@@ -0,0 +1 @@
|
||||
# This can be used for 32-bit only packages
|
||||
1
lib/prereqs/iso.pkgs.lst.64
Normal file
1
lib/prereqs/iso.pkgs.lst.64
Normal file
@@ -0,0 +1 @@
|
||||
# This can be used for 64-bit only packages
|
||||
15
lib/prereqs/openSUSE/meta
Normal file
15
lib/prereqs/openSUSE/meta
Normal file
@@ -0,0 +1,15 @@
|
||||
NAME='openSUSE'
|
||||
SUPPORTED='untested'
|
||||
# Default doesn't have the quotes around the value, but I have a feeling that's a bug that will get "fixed" soon.
|
||||
CHECK_METHOD='egrep "^NAME=\"?openSUSE\"?$" /etc/os-release'
|
||||
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."
|
||||
|
||||
}
|
||||
|
||||
17
lib/prereqs/openSUSE/pkgs
Normal file
17
lib/prereqs/openSUSE/pkgs
Normal file
@@ -0,0 +1,17 @@
|
||||
binutils
|
||||
curl
|
||||
gcc
|
||||
gcc-32bit
|
||||
git
|
||||
libisoburn1
|
||||
libisofs6
|
||||
lynx
|
||||
make
|
||||
mtools
|
||||
patch
|
||||
perl
|
||||
rsync
|
||||
sed
|
||||
squashfs
|
||||
syslinux
|
||||
xz
|
||||
Reference in New Issue
Block a user