Compare commits

...

4 Commits
v1.03 ... v1.05

Author SHA1 Message Date
0162513827 completed apacman integration and linux 3.18.2 2015-01-17 17:37:57 -05:00
599a2fcbe2 updating apacman, stabilizations 2015-01-16 03:36:40 -05:00
1dcbe73c7b v1.04; minor tweaks, etc. but should be good for a while 2015-01-12 20:27:41 -05:00
3133e4a962 finalized 1.03 2015-01-12 17:40:06 -05:00
10 changed files with 52 additions and 31 deletions

Binary file not shown.

View File

@@ -71,7 +71,7 @@ RSYNC_DEST="${BASEDIR}"
# Note that the code appends, rather than replaces, logs- hence the timestamp in EPOCH time format.
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}"
# Should the REGUSR have a password? IF THIS IS NOT SET, PASSWORD LOGIN WILL BE DISABLED!

View File

@@ -89,6 +89,6 @@ Include = /etc/pacman.d/mirrorlist
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
#[archlinuxfr]
#SigLevel = Never
#Server = http://repo.archlinux.fr/$arch

View File

@@ -98,6 +98,6 @@ Include = /etc/pacman.d/mirrorlist
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch
#[archlinuxfr]
#SigLevel = Never
#Server = http://repo.archlinux.fr/$arch

View File

@@ -3,6 +3,7 @@
sed -i -e 's/^\(pkgbase=linux[[:space:]]*\)/#\1/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_MIN=$(echo ${pkgver} | sed -e "s/\\\([0-9]\\\.[0-9]*\\\)\\\.\\\(.*\\\)$/\\\2/")' ${1}
sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
##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}
@@ -15,6 +16,7 @@ sed -i -e "s/^\(makedepends=.*\))$/\1 'rsync' 'git')/g" ${1}
# add source for aufs3
## 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
## CC [M] fs/aufs/module.o
##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\
\ git clone git:\/\/aufs.git.sourceforge.net\/gitroot\/aufs\/aufs3-standalone.git aufs3 > \/dev\/null 2>&1\
\ cd aufs3\
\ git checkout aufs${KERNVER} > \/dev\/null 2>&1\
\ git checkout c75f6dddc1c58950c76cc1581e4b4c7ac8365bff > \/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")\
\ 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}
#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/. \

View File

@@ -2,21 +2,28 @@
set -e
echo -n "...Packages installing to ${i}..."
apacman --noconfirm --noedit -S --needed customizepkg-scripting
echo -n "Compiling kernel sources..."
set +e
## 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
cd /tmp/core/linux
customizepkg --modify
sudo -u nobody makepkg
chown -R nobody:nobody /tmp/core/linux
sudo -u nobody makepkg --skipinteg
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."

View File

@@ -27,8 +27,8 @@ function jenny_craig () {
# sync over new changes and trim out the fat
rsync -a --delete ${CHROOTDIR}/. ${BUILDDIR}/.
set +e
cp -af ${BUILDDIR}/usr/share/zoneinfo/EST5EDT ${BUILDDIR}/etc/localtime
cp -af ${CHROOTDIR}/usr/share/zoneinfo/EST5EDT ${CHROOTDIR}/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 > /dev/null 2>&1
set -e
cp -af ${BUILDDIR}/usr/share/locale/locale.alias ${BUILDDIR}/tmp/.
echo "Cleaning up unnecessary cruft in ${BUILDDIR}..."
@@ -45,6 +45,7 @@ function jenny_craig () {
mv -f ${BUILDDIR}/tmp/locale.alias ${BUILDDIR}/usr/share/locale/.
rm -rf ${BUILDDIR}/var/cache/pacman/*
rm -rf ${BUILDDIR}/var/cache/pkgfile/*
rm -rf ${BUILDDIR}/var/cache/apacman/pkg/*
rm -rf ${BUILDDIR}/var/lib/pacman/*
mkdir -p ${BUILDDIR}/var/lib/pacman/local
rm -rf ${BUILDDIR}/var/abs/local/yaourtbuild/*
@@ -54,6 +55,8 @@ function jenny_craig () {
rm -rf ${BUILDDIR}/var/abs/*
rm -rf ${BUILDDIR}/run/*
rm -rf ${BUILDDIR}/boot/*
#rm -rf ${BUILDDIR}/root/*
rm -rf ${BUILDDIR}/root/post-build.sh
rm -rf ${BUILDDIR}/usr/src/*
rm -rf ${BUILDDIR}/var/log/*
rm -rf ${BUILDDIR}/.git

View File

@@ -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}" ]];
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
${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
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
#${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}) ]];
then
set +e
${CHROOTCMD} ${i}/ bash -c "${RACECAR_CHK}mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
set -e
fi
echo "Done."
done
@@ -60,7 +62,7 @@ function mentos {
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
if [ -n "${PKGLIST}" ];
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
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' ' ')
if [ -n "${PKGLIST}" ];
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
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..."
rsync -a ${BASEDIR}/overlay/64/. ${CHROOTDIR64}/.
echo "Done."
@@ -99,6 +101,8 @@ function mentos {
find ${CHROOTDIR64}/root/ -type f -exec chmod 600 '{}' \;
find ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
chmod 600 ${CHROOTDIR64}/etc/ssh/*
chmod 600 ${CHROOTDIR32}/etc/ssh/*
echo "Done."
}

View File

@@ -167,7 +167,7 @@ EOF
# if that doesn't work,
${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
${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
echo "Done."
echo -n "...Upgrading any outdated packages..."
@@ -182,11 +182,11 @@ EOF
## https://projects.archlinux.org/pacman.git/tree/NEWS#n54
## https://bugs.archlinux.org/task/43302
#${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
#${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 "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
#${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
@@ -215,15 +215,15 @@ EOF
${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
#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
#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...
#${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
echo -n "Regular packages..."
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
# User creation
set -e
@@ -251,7 +251,7 @@ EOF
then
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
else
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
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"
##${CHROOTCMD} ${i}/ usermod -L root >> "${LOGFILE}.${FUNCNAME}" 2>&1
@@ -260,7 +260,9 @@ EOF
for i in ${CHROOTDIR32} ${CHROOTDIR64};
do
set +e
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
set -e
done
# 32-bit
@@ -268,7 +270,7 @@ EOF
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
if [ -n "${PKGLIST}" ];
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
set +e
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' ' ')
if [ -n "${PKGLIST}" ];
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
set +e
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 ${CHROOTDIR32}/root/ -type d -exec chmod 700 '{}' \;
find ${CHROOTDIR32}/root/ -type f -exec chmod 600 '{}' \;
chmod 600 ${CHROOTDIR64}/etc/ssh/*
chmod 600 ${CHROOTDIR32}/etc/ssh/*
echo "Done."