Working on more gentoostrap setup
This commit is contained in:
parent
ad06aab0a4
commit
34fcf638d5
@ -92,8 +92,8 @@ build-gentoo() {
|
|||||||
curl -s http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-systemd/ \
|
curl -s http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-systemd/ \
|
||||||
| grep -oe 'stage3-amd64-systemd-20.*\.tar\.xz' \
|
| grep -oe 'stage3-amd64-systemd-20.*\.tar\.xz' \
|
||||||
| sed 's/^stage3.*">//g' \
|
| sed 's/^stage3.*">//g' \
|
||||||
| uniq \
|
|
||||||
| sort \
|
| sort \
|
||||||
|
| uniq \
|
||||||
| head -n 1
|
| head -n 1
|
||||||
)"
|
)"
|
||||||
stage3file="$(mktemp "tmp.$USER.$_name.XXXXXX-stage3.tar.xz" -p "/tmp")"
|
stage3file="$(mktemp "tmp.$USER.$_name.XXXXXX-stage3.tar.xz" -p "/tmp")"
|
||||||
@ -123,6 +123,13 @@ build-gentoo() {
|
|||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
nameserver 8.8.4.4
|
nameserver 8.8.4.4
|
||||||
EOF
|
EOF
|
||||||
|
# Timezone
|
||||||
|
cp /etc/timezone "$_optdest/etc/timezone"
|
||||||
|
# Locale
|
||||||
|
cat <<-EOF > "$_optdest/etc/locale.gen"
|
||||||
|
en_US ISO-8859-1
|
||||||
|
en_US.UTF-8 UTF-8
|
||||||
|
EOF
|
||||||
|
|
||||||
# Now we need to pivot into a chroot and finish configuration natively
|
# Now we need to pivot into a chroot and finish configuration natively
|
||||||
# Buuuut... since we're using systemd, we get to just spawn a systemd-nspawn container
|
# Buuuut... since we're using systemd, we get to just spawn a systemd-nspawn container
|
||||||
@ -132,7 +139,36 @@ build-gentoo() {
|
|||||||
}
|
}
|
||||||
build-gentoo-chroot() {
|
build-gentoo-chroot() {
|
||||||
# Build Gentoo, but from within the chroot environment
|
# Build Gentoo, but from within the chroot environment
|
||||||
:
|
log "Building Gentoo from within chroot"
|
||||||
|
|
||||||
|
# Sync repositories
|
||||||
|
log "Getting ebuild repositories"
|
||||||
|
emerge-webrsync
|
||||||
|
|
||||||
|
# Get the stable plasma/systemd profile and select it
|
||||||
|
profile=$(
|
||||||
|
eselect profile list \
|
||||||
|
| grep -ie 'stable' \
|
||||||
|
| grep -ie 'plasma/systemd' \
|
||||||
|
| sort \
|
||||||
|
| uniq \
|
||||||
|
| head -n 1 \
|
||||||
|
| grep -oP '\[\K[^\]]+'
|
||||||
|
)
|
||||||
|
log "Setting profile $profile"
|
||||||
|
eselect profile set "$profile"
|
||||||
|
|
||||||
|
# BEHOLD!
|
||||||
|
emerge -DNuv @world
|
||||||
|
# Configure timezone
|
||||||
|
emerge --config sys-libs/timezone-data
|
||||||
|
# Locales
|
||||||
|
locale-gen
|
||||||
|
eselect locale set en_US.utf8
|
||||||
|
env-update
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
# Build a kernel
|
||||||
}
|
}
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
|
Loading…
Reference in New Issue
Block a user