Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 745cda0357 | |||
| 3a5914faca | |||
| 0162513827 | |||
| 599a2fcbe2 | |||
| 1dcbe73c7b | |||
| 3133e4a962 |
Binary file not shown.
BIN
extra/bootstrap/apacman-1.2-2-any.pkg.tar.xz
Normal file
BIN
extra/bootstrap/apacman-1.2-2-any.pkg.tar.xz
Normal file
Binary file not shown.
@@ -71,7 +71,7 @@ RSYNC_DEST="${BASEDIR}"
|
|||||||
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
|
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
|
||||||
LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
LOGFILE="${BASEDIR}/logs/$(date +%s)"
|
||||||
|
|
||||||
# What should the regular username be? (Automatically logged in on boot)
|
# What should the regular username be? (Can be automatically logged in on boot; see below)
|
||||||
REGUSR="${UXNAME}"
|
REGUSR="${UXNAME}"
|
||||||
|
|
||||||
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
|
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!
|
||||||
|
|||||||
@@ -89,6 +89,6 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
[archlinuxfr]
|
#[archlinuxfr]
|
||||||
SigLevel = Never
|
#SigLevel = Never
|
||||||
Server = http://repo.archlinux.fr/$arch
|
#Server = http://repo.archlinux.fr/$arch
|
||||||
|
|||||||
@@ -98,6 +98,6 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
[archlinuxfr]
|
#[archlinuxfr]
|
||||||
SigLevel = Never
|
#SigLevel = Never
|
||||||
Server = http://repo.archlinux.fr/$arch
|
#Server = http://repo.archlinux.fr/$arch
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
sed -i -e 's/^\(pkgbase=linux[[:space:]]*\)/#\1/g' ${1}
|
sed -i -e 's/^\(pkgbase=linux[[:space:]]*\)/#\1/g' ${1}
|
||||||
sed -i -e 's/^#\(pkgbase=linux-\)custom.*$/\1BDisk/g' ${1}
|
sed -i -e 's/^#\(pkgbase=linux-\)custom.*$/\1BDisk/g' ${1}
|
||||||
sed -i -e '/^_kernelname/a KERNVER=$(echo ${pkgver} | sed -e "s/\\\([0-9]\\\.[0-9]*\\\).*$/\\\1/")' ${1}
|
sed -i -e '/^_kernelname/a KERNVER=$(echo ${pkgver} | sed -e "s/\\\([0-9]\\\.[0-9]*\\\).*$/\\\1/")' ${1}
|
||||||
|
sed -i -e '/^_kernelname/a KERNVER_MIN=$(echo ${pkgver} | sed -e "s/\\\([0-9]\\\.[0-9]*\\\)\\\.\\\(.*\\\)$/\\\2/")' ${1}
|
||||||
sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
|
sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
|
||||||
##cp linux.preset linux-BDisk.preset
|
##cp linux.preset linux-BDisk.preset
|
||||||
##sed -i -e 's#^[[:space:]]*install\ -D\ -m644\ "${srcdir}/linux.preset".*$#install -D -m644 "${srcdir}/linux-BDisk.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"#g' ${1}
|
##sed -i -e 's#^[[:space:]]*install\ -D\ -m644\ "${srcdir}/linux.preset".*$#install -D -m644 "${srcdir}/linux-BDisk.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"#g' ${1}
|
||||||
@@ -15,6 +16,7 @@ sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
|
|||||||
|
|
||||||
# add source for aufs3
|
# add source for aufs3
|
||||||
## 12.07.2014 - remove the "git checkout <SPECIFIC COMMIT HASH>" once a bug is fixed. currently fails with:
|
## 12.07.2014 - remove the "git checkout <SPECIFIC COMMIT HASH>" once a bug is fixed. currently fails with:
|
||||||
|
##\ git checkout c75f6dddc1c58950c76cc1581e4b4c7ac8365bff > \/dev\/null 2>&1\
|
||||||
## LD fs/aufs/built-in.o
|
## LD fs/aufs/built-in.o
|
||||||
## CC [M] fs/aufs/module.o
|
## CC [M] fs/aufs/module.o
|
||||||
##In file included from fs/aufs/module.c:24:0:
|
##In file included from fs/aufs/module.c:24:0:
|
||||||
@@ -38,8 +40,9 @@ sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
|
|||||||
sed -i -e '/^prepare()\ {/a\
|
sed -i -e '/^prepare()\ {/a\
|
||||||
\ git clone git:\/\/aufs.git.sourceforge.net\/gitroot\/aufs\/aufs3-standalone.git aufs3 > \/dev\/null 2>&1\
|
\ git clone git:\/\/aufs.git.sourceforge.net\/gitroot\/aufs\/aufs3-standalone.git aufs3 > \/dev\/null 2>&1\
|
||||||
\ cd aufs3\
|
\ cd aufs3\
|
||||||
\ git checkout aufs${KERNVER} > \/dev\/null 2>&1\
|
\ AUFS_MIN=$(git branch -a | grep "${KERNVER}" | tail -n1 | cut -f3 -d"/" | sed -e "s/aufs${KERNVER}//g ; s/\\\.\\\([0-9]*\\\).*$/\\\1/g")\
|
||||||
\ git checkout c75f6dddc1c58950c76cc1581e4b4c7ac8365bff > \/dev\/null 2>&1\
|
\ if [ -n "${AUFS_MIN}" ] && [ -n "${KERNVER_MIN}" ] && [[ "${AUFS_MIN}" -le "${KERNVER_MIN}" ]] ; then CO="$(git branch -a | grep "${KERNVER}" | tail -n1 | cut -f3 -d"/")" ; else CO=aufs${KERNVER} ; fi \
|
||||||
|
\ git checkout ${CO} > \/dev\/null 2>&1\
|
||||||
\ cd ..\/' ${1}
|
\ cd ..\/' ${1}
|
||||||
#sed -i -e 's/^\(_kernelname=\).*$/\1"-BDisk"/' ${1}
|
#sed -i -e 's/^\(_kernelname=\).*$/\1"-BDisk"/' ${1}
|
||||||
sed -i -e '/^[[:space:]]*patch.*pkgver}"$/i rsync -a ../aufs3/Documentation/. Documentation/. ; rsync -a ../aufs3/fs/. fs/. ; cp -a ../aufs3/include/uapi/linux/aufs_type.h include/uapi/linux/. \
|
sed -i -e '/^[[:space:]]*patch.*pkgver}"$/i rsync -a ../aufs3/Documentation/. Documentation/. ; rsync -a ../aufs3/fs/. fs/. ; cp -a ../aufs3/include/uapi/linux/aufs_type.h include/uapi/linux/. \
|
||||||
|
|||||||
@@ -2,21 +2,28 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo -n "...Packages installing to ${i}..."
|
|
||||||
apacman --noconfirm --noedit -S --needed customizepkg-scripting
|
apacman --noconfirm --noedit -S --needed customizepkg-scripting
|
||||||
|
|
||||||
echo -n "Compiling kernel sources..."
|
echo -n "Compiling kernel sources..."
|
||||||
set +e
|
set +e
|
||||||
## Uncomment below and remove manual ABS/makepkg when https://github.com/oshazard/apacman/issues/2 is fulfulled
|
## Uncomment below and remove manual ABS/makepkg when https://github.com/oshazard/apacman/issues/2 is fulfulled
|
||||||
apacman --noconfirm --noedit -S --needed --noconfirm linux
|
#apacman --noconfirm --noedit -S --needed linux
|
||||||
|
|
||||||
ABSROOT=/tmp
|
export ABSROOT=/tmp
|
||||||
abs core/linux
|
abs core/linux
|
||||||
|
|
||||||
cd /tmp/core/linux
|
cd /tmp/core/linux
|
||||||
customizepkg --modify
|
customizepkg --modify
|
||||||
|
|
||||||
sudo -u nobody makepkg
|
chown -R nobody:nobody /tmp/core/linux
|
||||||
|
sudo -u nobody makepkg --skipinteg
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
yes '' | apacman --skipinteg --noconfirm --noedit -U /tmp/core/linux/linux-*.pkg.tar.xz
|
||||||
|
|
||||||
|
#for i in $(ls -1 linux-*.pkg.tar.xz | sort);
|
||||||
|
#do
|
||||||
|
#apacman --skipinteg --noconfirm --noedit --noconfirm -U ${i}
|
||||||
|
#done
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ function jenny_craig () {
|
|||||||
# sync over new changes and trim out the fat
|
# sync over new changes and trim out the fat
|
||||||
rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/.
|
rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/.
|
||||||
set +e
|
set +e
|
||||||
cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime
|
cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime > /dev/null 2>&1
|
||||||
cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/etc/localtime
|
cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/etc/localtime > /dev/null 2>&1
|
||||||
set -e
|
set -e
|
||||||
cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/.
|
cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/.
|
||||||
echo "Cleaning up unnecessary cruft in ${BUILDDIR}..."
|
echo "Cleaning up unnecessary cruft in ${BUILDDIR}..."
|
||||||
@@ -45,6 +45,7 @@ function jenny_craig () {
|
|||||||
mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/.
|
mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/.
|
||||||
rm -rf ${BUILDDIR}/var/cache/pacman/*
|
rm -rf ${BUILDDIR}/var/cache/pacman/*
|
||||||
rm -rf ${BUILDDIR}/var/cache/pkgfile/*
|
rm -rf ${BUILDDIR}/var/cache/pkgfile/*
|
||||||
|
rm -rf ${BUILDDIR}/var/cache/apacman/pkg/*
|
||||||
rm -rf ${BUILDDIR}/var/lib/pacman/*
|
rm -rf ${BUILDDIR}/var/lib/pacman/*
|
||||||
mkdir -p ${BUILDDIR}/var/lib/pacman/local
|
mkdir -p ${BUILDDIR}/var/lib/pacman/local
|
||||||
rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/*
|
rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/*
|
||||||
@@ -54,6 +55,8 @@ function jenny_craig () {
|
|||||||
rm -rf ${BUILDDIR}/var/abs/*
|
rm -rf ${BUILDDIR}/var/abs/*
|
||||||
rm -rf ${BUILDDIR}/run/*
|
rm -rf ${BUILDDIR}/run/*
|
||||||
rm -rf ${BUILDDIR}/boot/*
|
rm -rf ${BUILDDIR}/boot/*
|
||||||
|
#rm -rf ${BUILDDIR}/root/*
|
||||||
|
rm -rf ${BUILDDIR}/root/post-build.sh
|
||||||
rm -rf ${BUILDDIR}/usr/src/*
|
rm -rf ${BUILDDIR}/usr/src/*
|
||||||
rm -rf ${BUILDDIR}/var/log/*
|
rm -rf ${BUILDDIR}/var/log/*
|
||||||
rm -rf ${BUILDDIR}/.git
|
rm -rf ${BUILDDIR}/.git
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ EOF
|
|||||||
FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}')
|
FTSIZE=$(du -sc ${TEMPDIR}/{boot,EFI,loader} | tail -n1 | awk '{print $1}')
|
||||||
FATSIZE=$((${FTSIZE} + 64)) # let's give a little wiggle room
|
FATSIZE=$((${FTSIZE} + 64)) # let's give a little wiggle room
|
||||||
${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
|
${RACECAR_CHK}truncate -s "${FATSIZE}"K ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img
|
||||||
${RACECAR_CHK}mkfs.vfat -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${RACECAR_CHK}mkfs.vfat -F 32 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
#${RACECAR_CHK}mkfs.vfat -F32 -s2 -n ${DISTNAME}_EFI ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
mkdir -p ${SRCDIR}/efiboot
|
mkdir -p ${SRCDIR}/efiboot
|
||||||
mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot
|
mount ${TEMPDIR}/EFI/${DISTNAME}/efiboot.img ${SRCDIR}/efiboot
|
||||||
mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME}
|
mkdir -p ${SRCDIR}/efiboot/EFI/${DISTNAME}
|
||||||
|
|||||||
@@ -39,17 +39,19 @@ function mentos {
|
|||||||
|
|
||||||
if [[ -n $(find ${BASEDIR}/extra/pre-build.d/ -type f -newer ${BASEDIR}/root.x86_64/boot/vmlinuz-linux-${PNAME}) ]] || [[ "${INSTKERN}" != "${NEWKERN}" ]];
|
if [[ -n $(find ${BASEDIR}/extra/pre-build.d/ -type f -newer ${BASEDIR}/root.x86_64/boot/vmlinuz-linux-${PNAME}) ]] || [[ "${INSTKERN}" != "${NEWKERN}" ]];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit -Syyua --devel" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -Syyu --devel" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
else
|
else
|
||||||
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit -Syyua --devel --ignore linux,linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -Syyu --devel --ignore linux,linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit -S --needed --ignore linux,linux-${PNAME} ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -S --needed --ignore linux,linux-${PNAME} ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
#${CHROOTCMD} ${i}/ bash -c "apacman --noconfirm --noedit -S --needed ${PKGLIST}"
|
#${CHROOTCMD} ${i}/ bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}"
|
||||||
if [[ -n $(find ${BASEDIR}/extra/pre-build.d/ -type f -newer root.x86_64/boot/vmlinuz-linux-${PNAME}) ]];
|
if [[ -n $(find ${BASEDIR}/extra/pre-build.d/ -type f -newer root.x86_64/boot/vmlinuz-linux-${PNAME}) ]];
|
||||||
then
|
then
|
||||||
|
set +e
|
||||||
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
echo "Done."
|
echo "Done."
|
||||||
done
|
done
|
||||||
@@ -60,7 +62,7 @@ function mentos {
|
|||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${CHROOTDIR32}/ bash -c "yes '' | ${RACECAR_CHK}apacman --noconfirm --noedit -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${CHROOTDIR32}/ bash -c "yes '' | ${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
|
|
||||||
@@ -69,10 +71,10 @@ function mentos {
|
|||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${CHROOTDIR64}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${CHROOTDIR64}/ bash -c "${RACECAR_CHK}apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
#${CHROOTCMD} ${CHROOTDIR64}/ bash -c "apacman --noconfirm --noedit -S --needed ${PKGLIST}"
|
#${CHROOTCMD} ${CHROOTDIR64}/ bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}"
|
||||||
echo "Syncing overlay..."
|
echo "Syncing overlay..."
|
||||||
rsync -a ${BASEDIR}/overlay/64/. ${CHROOTDIR64}/.
|
rsync -a ${BASEDIR}/overlay/64/. ${CHROOTDIR64}/.
|
||||||
echo "Done."
|
echo "Done."
|
||||||
@@ -99,6 +101,8 @@ function mentos {
|
|||||||
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
|
chmod 600 ${CHROOTDIR64}/etc/ssh/*
|
||||||
|
chmod 600 ${CHROOTDIR32}/etc/ssh/*
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ EOF
|
|||||||
# if that doesn't work,
|
# if that doesn't work,
|
||||||
${CHROOTCMD} ${i}/ pacman -Syy >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ pacman -Syy >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed base syslinux wget rsync unzip jshon sed sudo abs xmlto bc >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed base syslinux wget rsync unzip jshon sed sudo abs xmlto bc docbook-xsl git >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
echo "Done."
|
echo "Done."
|
||||||
echo -n "...Upgrading any outdated packages..."
|
echo -n "...Upgrading any outdated packages..."
|
||||||
@@ -182,11 +182,11 @@ EOF
|
|||||||
## https://projects.archlinux.org/pacman.git/tree/NEWS#n54
|
## https://projects.archlinux.org/pacman.git/tree/NEWS#n54
|
||||||
## https://bugs.archlinux.org/task/43302
|
## https://bugs.archlinux.org/task/43302
|
||||||
#${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
mkdir ${i}/var/tmp/pkg
|
mkdir -p ${i}/var/tmp/pkg
|
||||||
cp ${BASEDIR}/extra/bootstrap/apacman* ${i}/var/tmp/pkg/apacman.tar.xz
|
cp ${BASEDIR}/extra/bootstrap/apacman* ${i}/var/tmp/pkg/apacman.tar.xz
|
||||||
#${CHROOTCMD} ${i} "pacman --noconfirm -U /var/tmp/pkg/apacman.tar.xz" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#${CHROOTCMD} ${i} "pacman --noconfirm -U /var/tmp/pkg/apacman.tar.xz" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
${CHROOTCMD} ${i} bash -c "pacman --noconfirm -U /var/tmp/pkg/apacman.tar.xz" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i} bash -c "pacman --noconfirm -U /var/tmp/pkg/apacman.tar.xz" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
${CHROOTCMD} ${i} bash -c "apacman -S --noconfirm --noedit apacman-deps expac" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i} bash -c "apacman -S --noconfirm --noedit --skipinteg -S apacman-deps expac" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
#rm -rf ${i}/var/tmp/pkg
|
#rm -rf ${i}/var/tmp/pkg
|
||||||
#${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#${CHROOTCMD} ${i}/ pacman -S --noconfirm --needed yaourt >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
@@ -215,15 +215,15 @@ EOF
|
|||||||
${CHROOTCMD} ${i}/ "/root/post-build.sh" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ "/root/post-build.sh" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
#set +e
|
#set +e
|
||||||
#${CHROOTCMD} ${i}/ /usr/bin/bash -c "apacman --noconfirm --noedit -S --needed linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#${CHROOTCMD} ${i}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
#set -e
|
#set -e
|
||||||
#for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
#for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
# Uncomment if you wish to use the mkpasswd binary from within the chroot...
|
# Uncomment if you wish to use the mkpasswd binary from within the chroot...
|
||||||
#${CHROOTCMD} ${i}/ bash -c "apacman --noconfirm --noedit -S --needed debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#${CHROOTCMD} ${i}/ bash -c "apacman --noconfirm --noedit --skipinteg -S --needed debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
#for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
#for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
echo -n "Regular packages..."
|
echo -n "Regular packages..."
|
||||||
set +e
|
set +e
|
||||||
${CHROOTCMD} ${i}/ bash -c "yes '' | apacman --noconfirm --noedit -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ bash -c "yes '' | apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
# User creation
|
# User creation
|
||||||
set -e
|
set -e
|
||||||
@@ -251,7 +251,7 @@ EOF
|
|||||||
then
|
then
|
||||||
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
else
|
else
|
||||||
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
# The following is supposed to do the same as the above, but "cleaner". However, it currently fails with "execv() failed: No such file or directory"
|
# The following is supposed to do the same as the above, but "cleaner". However, it currently fails with "execv() failed: No such file or directory"
|
||||||
##${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
##${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
@@ -260,7 +260,9 @@ EOF
|
|||||||
|
|
||||||
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||||
do
|
do
|
||||||
|
set +e
|
||||||
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
set -e
|
||||||
done
|
done
|
||||||
|
|
||||||
# 32-bit
|
# 32-bit
|
||||||
@@ -268,7 +270,7 @@ EOF
|
|||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "apacman --noconfirm --noedit -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
@@ -280,7 +282,7 @@ EOF
|
|||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "apacman --noconfirm --noedit -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
@@ -307,6 +309,8 @@ EOF
|
|||||||
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
|
||||||
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
|
||||||
|
chmod 600 ${CHROOTDIR64}/etc/ssh/*
|
||||||
|
chmod 600 ${CHROOTDIR32}/etc/ssh/*
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,15 +43,21 @@ PS1='[\u@\h \W]\$ '
|
|||||||
export HISTTIMEFORMAT="%F %T "
|
export HISTTIMEFORMAT="%F %T "
|
||||||
export PATH="${PATH}:/sbin:/bin:/usr/sbin"
|
export PATH="${PATH}:/sbin:/bin:/usr/sbin"
|
||||||
|
|
||||||
|
DEFROUTEIF=$(ip route show | egrep '^default' | awk '{print $5}')
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
date
|
date
|
||||||
|
if [ -n "${DEFROUTEIF}" ];
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo -n "${DEFROUTEIF} is: "
|
||||||
|
ifconfig "${DEFROUTEIF}" | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}'
|
||||||
|
fi
|
||||||
echo
|
echo
|
||||||
echo "eth0 is:"
|
echo -n "tun0 is:"
|
||||||
ifconfig eth0 | egrep 'inet|ether' | grep -v "inet6" | awk '{print $2}'
|
|
||||||
echo
|
|
||||||
echo "tun0 is:"
|
|
||||||
ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}'
|
ifconfig tun0 | grep inet | grep -v "inet6" | awk '{print $2}'
|
||||||
|
echo
|
||||||
echo "http://bdisk.square-r00t.net/"
|
echo "http://bdisk.square-r00t.net/"
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user