Compare commits

..

13 Commits

Author SHA1 Message Date
bts 9f39e8ed29 oops. 2014-12-21 11:52:07 -05:00
bts b6c30b6b6c remove pass for root 2014-12-21 11:46:10 -05:00
bts 830f0c9cc9 password for regular user 2014-12-21 11:41:49 -05:00
bts fc5fac0667 we should probably remove .pacnew files in the ISO. every little byte helps :/ 2014-12-20 22:41:35 -05:00
bts 15f85a19a4 trying to fix speed optimizations... 2014-12-20 22:25:12 -05:00
bts b71931b0b5 trying to fix niceness... 2014-12-20 22:16:41 -05:00
bts ba7ad82e8b Merge branch 'master' of square-r00t.net:bdisk 2014-12-20 19:37:12 -05:00
bts d5d4563399 shuffling stuff.. 2014-12-20 19:36:57 -05:00
bts 374906b15b adding notes 2014-12-20 12:41:14 -05:00
bts 998484d315 whoops. mistyped package names 2014-12-20 12:09:15 -05:00
bts 307f1e836f fixing chroot building bug 2014-12-20 02:33:21 -05:00
bts 51fad1aced updated packages 2014-12-19 16:43:39 -05:00
bts 1d8692b8e6 initial commit 2014-12-19 14:13:30 -05:00
4 changed files with 22 additions and 70 deletions
+2 -18
View File
@@ -74,9 +74,7 @@ LOGFILE="${BASEDIR}/logs/$(date +%s)"
# What should the regular username be? (Automatically logged in on boot) # What should the regular username be? (Automatically logged in on boot)
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, THE PASSWORD WILL BE BLANK!
# If you wish to have a blank password, use the string '{[BLANK]}'.
# You MUST USE SINGLE-QUOTES, OR ESCAPE SHELL-EXPANDED CHARACTERS (e.g. $,*,etc.)
# Do NOT use a plaintext password here. You will need to generate a salted and hashed string # Do NOT use a plaintext password here. You will need to generate a salted and hashed string
# in a shadow-compatible format. # in a shadow-compatible format.
# Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd): # Debian can do this with the mkpasswd utility (it's in Arch's AUR as debian-whois-mkpasswd):
@@ -90,21 +88,7 @@ REGUSR="${UXNAME}"
# /sbin/grub-crypt --sha-512 # /sbin/grub-crypt --sha-512
# The end-product should look something like this: # The end-product should look something like this:
# $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1 # $6$aBcDeFgHiJ$Yh342vFH7MOjPNu9InFymD1Dd42i5cFsr1cTWdpKGNIkbRGR/ZKQDRPJ1ZeeGb7y894Tfh3iWZIJKu3phlsqQ1
# REGUSR_PASS=""
# Note that if you want an automatic login, this is *not* where it would be set.
# It should instead be controlled via overlay/etc/systemd/system/getty@ttyN.service.d/autologin.conf
# In the following format:
# [Service]
# Type=idle
# ExecStart=
# ExecStart=-/usr/bin/agetty --autologin <USERNAME> --noclear %I 38400 linux
# (where N is the TTY number). Alternatively, if booting to a GUI, it can be set as according
# to that GUI (e.g. for LXDE, overlay/etc/lxdm/lxdm.conf, "autologin=<USERNAME>")
REGUSR_PASS=''
# Same exact thing as REGUSR_PASS, but for the root password (i.e. if no password hash is
# specified, password login will be disabled, etc.).
ROOT_PASS=''
# Do we have enough horsepower on the build system to jack up the resources we throw at building? # Do we have enough horsepower on the build system to jack up the resources we throw at building?
# Enabling this will give absolute CPU preference to building the kernels and do make-time # Enabling this will give absolute CPU preference to building the kernels and do make-time
+9 -10
View File
@@ -75,7 +75,7 @@ ed
efibootmgr efibootmgr
efivar efivar
elfutils elfutils
#elilo-efi elilo-efi
elinks elinks
etc-update etc-update
ethtool ethtool
@@ -138,15 +138,14 @@ iso-codes
isomaster isomaster
jasper jasper
jfsutils jfsutils
#john-mpi john-mpi
john
keyutils keyutils
kismet-allplugins kismet-allplugins
libisoburn libisoburn
lftp lftp
links links
localepurge localepurge
#logkeys logkeys
logkeys-keymaps logkeys-keymaps
lm_sensors lm_sensors
lrzsz lrzsz
@@ -157,7 +156,7 @@ lsscsi
lxde lxde
lynx lynx
lz4 lz4
#lzip lzip
lzo lzo
lzop lzop
macchanger macchanger
@@ -178,7 +177,7 @@ mtd-utils
mtools mtools
mtr mtr
mtree mtree
#mtx mtx
multipath-tools multipath-tools
myrescue myrescue
nbd nbd
@@ -193,7 +192,7 @@ nettle
networkmanager networkmanager
nginx-devel nginx-devel
ngrep ngrep
nmap nmap-nogui
nmon nmon
ntfs-3g ntfs-3g
ntfsfixboot ntfsfixboot
@@ -218,7 +217,7 @@ php
php-fpm php-fpm
php-gd php-gd
php-mcrypt php-mcrypt
#phrasendrescher phrasendrescher
pigz pigz
pkgfile pkgfile
pkgtools pkgtools
@@ -241,6 +240,7 @@ rdiff-backup
read-edid read-edid
reaver reaver
rename rename
rescan-scsi-bus
rfkill rfkill
rp-pppoe rp-pppoe
rpcbind rpcbind
@@ -270,7 +270,7 @@ s-nail
socat socat
squashfs3-tools squashfs3-tools
squashfs-tools squashfs-tools
#star star
strace strace
stress stress
sucrack sucrack
@@ -318,7 +318,6 @@ whdd
whois whois
wifite wifite
wipe wipe
wireshark-cli
wpscrack wpscrack
wput wput
x11vnc x11vnc
-1
View File
@@ -40,7 +40,6 @@ function jenny_craig () {
# DISABLE when no longer building custom kernel # DISABLE when no longer building custom kernel
find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \; find ${BUILDDIR}/usr/lib/modules/ -maxdepth 1 -iname "*-ARCH" -exec rm -rf '{}' \;
find ${BUILDDIR}/ -type f -name "*.pacnew" -exec rm -rf '{}' \; find ${BUILDDIR}/ -type f -name "*.pacnew" -exec rm -rf '{}' \;
sed -i -e '/^MAKEFLAGS=.*$/d' ${BUILDDIR}/etc/makepkg.conf
rm -rf ${BUILDDIR}/usr/share/locale/* rm -rf ${BUILDDIR}/usr/share/locale/*
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/*
+9 -39
View File
@@ -182,15 +182,6 @@ EOF
${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ 'pacman --noconfirm -S multilib-devel' >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
# And let's do some more optimization.
if [[ "${I_AM_A_RACECAR}" == "y" ]];
then
CPUCNT=$(grep processor /proc/cpuinfo | wc -l)
((CPUCNT++))
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR64}/etc/makepkg.conf
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf
fi
# preprocessing # preprocessing
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.* sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
# both # both
@@ -199,11 +190,11 @@ EOF
for i in ${CHROOTDIR32} ${CHROOTDIR64}; for i in ${CHROOTDIR32} ${CHROOTDIR64};
do do
echo -n "...Packages installing to ${i}..." echo -n "...Packages installing to ${i}..."
${CHROOTCMD} ${i}/ /usr/bin/bash -c "yaourt -S --needed --noconfirm customizepkg-scripting" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm customizepkg-scripting" >> "${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 "Compiling kernel sources..." echo -n "Compiling kernel sources..."
set +e set +e
${CHROOTCMD} ${i}/ /usr/bin/bash -c "yaourt -S --needed --noconfirm linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm linux" >> "${LOGFILE}.${FUNCNAME}" 2>&1
set -e set -e
# 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 "yaourt -S --needed --noconfirm debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1 #${CHROOTCMD} ${i}/ bash -c "yaourt -S --needed --noconfirm debian-whois-mkpasswd" >> "${LOGFILE}.${FUNCNAME}" 2>&1
@@ -211,9 +202,8 @@ EOF
echo -n "Regular packages..." echo -n "Regular packages..."
set +e set +e
${CHROOTCMD} ${i}/ bash -c "yes '' | yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "yes '' | yaourt -S --needed --noconfirm ${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 set -e
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
echo -n "...Creating ${REGUSR} user..." echo -n "...Creating ${REGUSR} user..."
${CHROOTCMD} ${i}/ useradd -m -s /bin/bash -c "Default user" ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ useradd -m -s /bin/bash -c "Default user" ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
${CHROOTCMD} ${i}/ usermod -aG users,games,video,audio ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ usermod -aG users,games,video,audio ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
@@ -222,32 +212,16 @@ EOF
echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR} echo "${REGUSR} ALL=(ALL) ALL" >> ${i}/etc/sudoers.d/${REGUSR}
if [ -n "${REGUSR_PASS}" ]; if [ -n "${REGUSR_PASS}" ];
then then
#${CHROOTCMD} ${i}/ "/usr/bin/echo ${REGUSR}:${REGUSR_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ echo "${REGUSR}:${REGUSR_PASS}" | chpasswd -e
sed -i -e "s|^${REGUSR}::|${REGUSR}:${REGUSR_PASS}:|g" ${i}/etc/shadow
elif [[ "${REGUSR_PASS}" == '{[BLANK]}' ]];
then
${CHROOTCMD} ${i}/ passwd -d ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
else
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
if [ -n "${ROOT_PASS}" ]; # COMMENT THIS LINE IF YOU WANT TO SET A ROOT PASSWORD
then ${CHROOTCMD} ${i}/ usermod -L root
#${CHROOTCMD} ${i}/ "/usr/bin/echo root:${ROOT_PASS} | chpasswd -e" >> "${LOGFILE}.${FUNCNAME}" 2>&1
sed -i -e "s|^root::|root:${ROOT_PASS}:|g" ${i}/etc/shadow
elif [[ "${ROOT_PASS}" == '{[BLANK]}' ]];
then
${CHROOTCMD} ${i}/ passwd -d root >> "${LOGFILE}.${FUNCNAME}" 2>&1
else
${CHROOTCMD} ${i}/ usermod -L ${REGUSR} >> "${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
echo "Done." echo "Done."
done done
for i in ${CHROOTDIR32} ${CHROOTDIR64}; for i in ${CHROOTDIR32} ${CHROOTDIR64};
do do
${CHROOTCMD} ${i}/ /usr/bin/bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${i}/ bash -c "mkinitcpio -p linux-${PNAME}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
done done
# 32-bit # 32-bit
@@ -255,11 +229,9 @@ 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 "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR32}/ bash -c "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
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
set -e
echo "Done." echo "Done."
# 64-bit # 64-bit
@@ -267,11 +239,9 @@ 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 "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1 ${CHROOTCMD} ${CHROOTDIR64}/ bash -c "yaourt -S --needed --noconfirm ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
fi fi
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
set -e
echo "Done." echo "Done."
echo "Syncing overlay..." echo "Syncing overlay..."