temporary checkin... working on the chrooted bash script
This commit is contained in:
parent
e838bab81c
commit
c8637e9779
5
.gitignore
vendored
5
.gitignore
vendored
@ -6,6 +6,7 @@
|
|||||||
/root.i686
|
/root.i686
|
||||||
|
|
||||||
# We don't want the copied/stripped/compressed chroots
|
# We don't want the copied/stripped/compressed chroots
|
||||||
|
# might not be relevant anymore in the python rewrite
|
||||||
/build64
|
/build64
|
||||||
/build32
|
/build32
|
||||||
|
|
||||||
@ -15,8 +16,8 @@
|
|||||||
/temp
|
/temp
|
||||||
/TMPBOOT
|
/TMPBOOT
|
||||||
/tftpboot
|
/tftpboot
|
||||||
/latest.64.tar.gz
|
/.latest.x86_64.tar.gz
|
||||||
/latest.32.tar.gz
|
/.latest.i686.tar.gz
|
||||||
/lockfile.lck
|
/lockfile.lck
|
||||||
/VERSION_INFO.txt
|
/VERSION_INFO.txt
|
||||||
/BUILDNO
|
/BUILDNO
|
||||||
|
@ -1,5 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Import settings.
|
||||||
|
if [[ -f /root/VARS.txt ]];
|
||||||
|
then
|
||||||
|
source /root/VARS.txt
|
||||||
|
else
|
||||||
|
# TODO: do these defaults via the config stuff in python instead.
|
||||||
|
export DISTNAME='BDISK'
|
||||||
|
export UXNAME='bdisk'
|
||||||
|
export PNAME='BDisk'
|
||||||
|
export DISTPUB='r00t^2'
|
||||||
|
export DISTDESC='j00 got 0wnz0r3d lulz.'
|
||||||
|
export REGUSR="${UXNAME}"
|
||||||
|
export REGUSR_PASS=''
|
||||||
|
export ROOT_PASS=''
|
||||||
|
fi
|
||||||
|
|
||||||
# Logging!
|
# Logging!
|
||||||
exec 3>&1 4>&2
|
exec 3>&1 4>&2
|
||||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||||
@ -41,7 +57,7 @@ pacman --noconfirm -U /root/apacman*.tar.xz &&\
|
|||||||
mkdir /var/tmp/apacman && chmod 0750 /var/tmp/apacman &&\
|
mkdir /var/tmp/apacman && chmod 0750 /var/tmp/apacman &&\
|
||||||
chown root:aurbuild /var/tmp/apacman
|
chown root:aurbuild /var/tmp/apacman
|
||||||
cleanPacorigs
|
cleanPacorigs
|
||||||
apacman -S --noconfirm --noedit --skipinteg -S apacman apacman-deps apacman-utils expac
|
apacman -S --noconfirm --noedit --skipinteg --needed -S apacman apacman-deps apacman-utils expac
|
||||||
apacman --gendb
|
apacman --gendb
|
||||||
cleanPacorigs
|
cleanPacorigs
|
||||||
# Install multilib-devel if we're in an x86_64 chroot.
|
# Install multilib-devel if we're in an x86_64 chroot.
|
||||||
@ -49,15 +65,32 @@ if $(egrep -q '^\[multilib' /etc/pacman.conf);
|
|||||||
then
|
then
|
||||||
pacman --noconfirm -R gcc-libs libtool
|
pacman --noconfirm -R gcc-libs libtool
|
||||||
pacman --noconfirm -S --needed multilib-devel
|
pacman --noconfirm -S --needed multilib-devel
|
||||||
|
cleanPacorigs
|
||||||
TGT_ARCH='x86_64'
|
TGT_ARCH='x86_64'
|
||||||
else
|
else
|
||||||
TGT_ARCH='i686'
|
TGT_ARCH='i686'
|
||||||
fi
|
fi
|
||||||
# Install some stuff we need for the ISO.
|
# Install some stuff we need for the ISO.
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.both | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.both | tr '\n' ' ')
|
||||||
cleanPacorigs
|
if [[ -n "${PKGLIST}" ]];
|
||||||
|
then
|
||||||
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
||||||
apacman --gendb
|
apacman --gendb
|
||||||
cleanPacorigs
|
cleanPacorigs
|
||||||
|
fi
|
||||||
|
# And install arch-specific packages for the ISO, if there are any.
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.${TGT_ARCH} | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/prereqs/iso.pkgs.${TGT_ARCH} | tr '\n' ' ')
|
||||||
|
if [[ -n "${PKGLIST}" ]];
|
||||||
|
then
|
||||||
|
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
||||||
|
apacman --gendb
|
||||||
|
cleanPacorigs
|
||||||
|
fi
|
||||||
|
# And install EXTRA functionality packages, if there are any.
|
||||||
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/packages.both | tr '\n' ' ')
|
||||||
|
if [[ -n "${PKGLIST}" ]];
|
||||||
|
then
|
||||||
|
apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}
|
||||||
|
apacman --gendb
|
||||||
|
cleanPacorigs
|
||||||
|
fi
|
||||||
|
8
extra/templates/VARS.txt.j2
Normal file
8
extra/templates/VARS.txt.j2
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export DISTNAME={{ bdisk['name']|upper }}
|
||||||
|
export UXNAME={{ bdisk['name']|lower }}
|
||||||
|
export PNAME={{ bdisk['name'] }}
|
||||||
|
export DISTPUB={{ bdisk['dev'] }}
|
||||||
|
export DISTDESC={{ bdisk['desc'] }}
|
||||||
|
export REGUSR={{ bdisk['name']|lower }}
|
||||||
|
export REGUSR_PASS={{ bdisk['usr_pass'] }}
|
||||||
|
export ROOT_PASS={{ bdisk['root_pass'] }}
|
Loading…
Reference in New Issue
Block a user