83392012d4
If you make distro/live-builder.iso, the result is an image containing almost everything (short of actual full enough repository) to rebuild itself. It will attempt to configure eth0 with DHCP and reach http://ftp.altlinux.org for packages. RAM requirements start with 2Gb, self-build is accomplished on a 4Gb host with "make CLEAN=1 distro/live-builder.iso". Packages required for "make distro/syslinux.iso" get included. (some due fixups all over the place too)
45 lines
1.1 KiB
Bash
Executable File
45 lines
1.1 KiB
Bash
Executable File
#!/bin/sh -efu
|
|
# configure hasher (implies that 30-users has been run already)
|
|
|
|
# predefined passwordless livecd user
|
|
USER="altlinux"
|
|
if ! id "$USER" >&/dev/null; then
|
|
echo "No such user '$USER'" >&2
|
|
exit
|
|
fi
|
|
|
|
# ~
|
|
HOME="/home/$USER"
|
|
install -dm750 -o "$USER" -g "$USER" "$HOME"
|
|
|
|
# we honestly don't know much more
|
|
if type -t git >&/dev/null; then
|
|
su - -c "git config --global user.email $USER@localhost" "$USER"
|
|
su - -c "git config --global user.name 'live builder'" "$USER"
|
|
fi
|
|
|
|
# developer should feel comfortable, eh? ;-)
|
|
ZSHELL="/bin/zsh"
|
|
if [ -x "$ZSHELL" ]; then
|
|
chsh -s "$ZSHELL" "$USER"
|
|
install -m755 -o "$USER" -g "$USER" /dev/null "$HOME/.zshrc"
|
|
echo "mkdir -p \"\$TMP/hasher\"" >> "$HOME/.zshrc"
|
|
fi
|
|
|
|
# $TMP
|
|
TMP="/tmp/.private/$USER"
|
|
control pam_mktemp enabled
|
|
subst '/^%_tmppath.*tmp$/d' "$HOME/.rpmmacros"
|
|
echo "%_tmppath $TMP" >> "$HOME/.rpmmacros"
|
|
|
|
# ~/hasher
|
|
WORKDIR="$TMP/hasher"
|
|
ln -s "$TMP/hasher" "$HOME/hasher"
|
|
|
|
# online repo needs network not isolation
|
|
echo "export share_network=1" >> /etc/profile.d/hasher.sh
|
|
chmod +x /etc/profile.d/hasher.sh
|
|
|
|
# requisite
|
|
hasher-useradd "$USER"
|