mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 09:56:18 +02:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2020fb406a | ||
![]() |
4427b80aba | ||
![]() |
41b54bdde5 | ||
![]() |
54bad4c91d | ||
![]() |
fc95a57556 | ||
![]() |
21458bd07b | ||
![]() |
a05969b29d | ||
![]() |
fdeaed894a | ||
![]() |
3699321904 | ||
![]() |
d8ec9c9066 | ||
![]() |
fbb2bd2b8e | ||
![]() |
d5c6bc7656 | ||
![]() |
f7615fe7d7 | ||
![]() |
1703b92e1a | ||
![]() |
cfd81ab563 | ||
![]() |
ac1ee41e4d | ||
![]() |
ecae65e7fd | ||
![]() |
c617c67ff8 | ||
![]() |
7228cc00e8 | ||
![]() |
a26416dca3 | ||
![]() |
37bb1d33a7 | ||
![]() |
dbef0b91bf | ||
![]() |
499f20071a | ||
![]() |
0d3d63e3aa |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,5 +1,5 @@
|
||||
*~
|
||||
devtools-*.tar.gz
|
||||
devtools-*.tar.gz*
|
||||
archbuild
|
||||
archco
|
||||
archrelease
|
||||
|
7
Makefile
7
Makefile
@@ -1,4 +1,4 @@
|
||||
V=20120616
|
||||
V=20121115
|
||||
|
||||
PREFIX = /usr/local
|
||||
|
||||
@@ -64,6 +64,10 @@ CROSSREPOMOVE_LINKS = \
|
||||
extra2community \
|
||||
community2extra
|
||||
|
||||
BASHCOMPLETION_LINKS = \
|
||||
archco \
|
||||
communityco
|
||||
|
||||
all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion
|
||||
|
||||
edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/devtools|g"
|
||||
@@ -90,6 +94,7 @@ install:
|
||||
for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
||||
install -Dm0644 bash_completion $(DESTDIR)/usr/share/bash-completion/completions/devtools
|
||||
for l in ${BASHCOMPLETION_LINKS}; do ln -sf devtools $(DESTDIR)/usr/share/bash-completion/completions/$$l; done
|
||||
install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
||||
ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco
|
||||
|
||||
|
@@ -61,13 +61,13 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
||||
-C "@pkgdatadir@/pacman-${repo}.conf" \
|
||||
-M "@pkgdatadir@/makepkg-${arch}.conf" \
|
||||
"${chroots}/${repo}-${arch}/root" \
|
||||
"${base_packages[@]}"
|
||||
"${base_packages[@]}" || abort
|
||||
else
|
||||
setarch ${arch} mkarchroot \
|
||||
-u \
|
||||
-C "@pkgdatadir@/pacman-${repo}.conf" \
|
||||
-M "@pkgdatadir@/makepkg-${arch}.conf" \
|
||||
"${chroots}/${repo}-${arch}/root"
|
||||
"${chroots}/${repo}-${arch}/root" || abort
|
||||
fi
|
||||
|
||||
msg "Building in chroot for [${repo}] (${arch})..."
|
||||
|
@@ -13,7 +13,7 @@ case $scriptname in
|
||||
archco)
|
||||
SVNURL="svn+ssh://gerolde.archlinux.org/srv/svn-packages";;
|
||||
communityco)
|
||||
SVNURL="svn+ssh://aur.archlinux.org/srv/svn-packages";;
|
||||
SVNURL="svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn";;
|
||||
*)
|
||||
die "Couldn't find svn url for $scriptname"
|
||||
;;
|
||||
|
@@ -66,7 +66,7 @@ for tag in "$@"; do
|
||||
while read -r file; do
|
||||
trash+=("repos/$tag/$file")
|
||||
done < <(svn ls "repos/$tag")
|
||||
[[ $trash ]] && svn rm -q "${trash[@]}"
|
||||
[[ $trash ]] && svn rm -q "${trash[@]/%/@}"
|
||||
else
|
||||
mkdir -p "repos/$tag"
|
||||
svn add --parents -q "repos/$tag"
|
||||
|
@@ -58,7 +58,7 @@ for _pkgname in "${pkgname[@]}"; do
|
||||
elif [[ -f "$STARTDIR/$oldpkg" ]]; then
|
||||
ln -s "$STARTDIR/$oldpkg" "$oldpkg"
|
||||
else
|
||||
wget --quiet "$pkgurl"
|
||||
curl -fsLC - --retry 3 --retry-delay 3 -o "$oldpkg" "$pkgurl"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@@ -109,7 +109,7 @@ if [[ -z $server ]]; then
|
||||
core|extra|testing|staging|kde-unstable|gnome-unstable)
|
||||
server='gerolde.archlinux.org' ;;
|
||||
community*|multilib*)
|
||||
server='aur.archlinux.org' ;;
|
||||
server='nymeria.archlinux.org' ;;
|
||||
*)
|
||||
server='gerolde.archlinux.org'
|
||||
msg "Non-standard repository $repo in use, defaulting to server $server" ;;
|
||||
|
@@ -13,8 +13,8 @@ pkgbase="${1}"
|
||||
|
||||
packages_svn='svn+ssh://gerolde.archlinux.org/srv/svn-packages'
|
||||
packages_server='gerolde.archlinux.org'
|
||||
community_svn='svn+ssh://aur.archlinux.org/srv/svn-packages'
|
||||
community_server='aur.archlinux.org'
|
||||
community_svn='svn+ssh://svn-community@nymeria.archlinux.org/srv/repos/svn-community/svn'
|
||||
community_server='nymeria.archlinux.org'
|
||||
mirror='http://mirrors.kernel.org/archlinux'
|
||||
|
||||
case $scriptname in
|
||||
@@ -72,11 +72,23 @@ svn -q commit -m"${scriptname}: Moving ${pkgbase} from ${source_repo} to ${targe
|
||||
pushd "target_checkout/${pkgbase}/trunk" >/dev/null
|
||||
archrelease "${arch[@]/#/$target_repo-}" || die
|
||||
popd >/dev/null
|
||||
ssh "${target_server}" '/arch/db-update' || die
|
||||
|
||||
if [[ "${target_server}" == "${community_server}" ]]; then
|
||||
dbscripts_path='/srv/repos/svn-community/dbscripts'
|
||||
else
|
||||
dbscripts_path='/arch'
|
||||
fi
|
||||
|
||||
ssh "${target_server}" "${dbscripts_path}/db-update" || die
|
||||
|
||||
msg "Removing ${pkgbase} from ${source_repo}"
|
||||
if [[ "${source_server}" == "${community_server}" ]]; then
|
||||
dbscripts_path='/srv/repos/svn-community/dbscripts'
|
||||
else
|
||||
dbscripts_path='/arch'
|
||||
fi
|
||||
for _arch in ${arch[@]}; do
|
||||
ssh "${source_server}" "/arch/db-remove ${source_repo} ${_arch} ${pkgbase}"
|
||||
ssh "${source_server}" "${dbscripts_path}/db-remove ${source_repo} ${_arch} ${pkgbase}"
|
||||
done
|
||||
svn -q checkout -N "${source_svn}" source_checkout
|
||||
svn -q up "source_checkout/${pkgbase}"
|
||||
|
@@ -62,8 +62,6 @@ setup_workdir() {
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
trap - EXIT INT QUIT TERM HUP
|
||||
|
||||
[[ -n $WORKDIR ]] && rm -rf "$WORKDIR"
|
||||
[[ $1 ]] && exit $1
|
||||
}
|
||||
@@ -73,13 +71,23 @@ abort() {
|
||||
cleanup 0
|
||||
}
|
||||
|
||||
trap_abort() {
|
||||
trap - EXIT INT QUIT TERM HUP
|
||||
abort
|
||||
}
|
||||
|
||||
trap_exit() {
|
||||
trap - EXIT INT QUIT TERM HUP
|
||||
cleanup
|
||||
}
|
||||
|
||||
die() {
|
||||
error "$*"
|
||||
cleanup 1
|
||||
}
|
||||
|
||||
trap abort INT QUIT TERM HUP
|
||||
trap 'cleanup 0' EXIT
|
||||
trap 'trap_abort' INT QUIT TERM HUP
|
||||
trap 'trap_exit' EXIT
|
||||
|
||||
##
|
||||
# usage : in_array( $needle, $haystack )
|
||||
|
@@ -25,6 +25,7 @@ passeddir=
|
||||
default_copy=$USER
|
||||
[[ -n $SUDO_USER ]] && default_copy=$SUDO_USER
|
||||
[[ -z $default_copy || $default_copy = root ]] && default_copy=copy
|
||||
src_owner=${SUDO_USER:-$USER}
|
||||
|
||||
usage() {
|
||||
echo "usage ${0##*/} [options] -r <chrootdir> [--] [makepkg args]"
|
||||
@@ -212,12 +213,12 @@ if ! grep -q 'SRCDEST="/srcdest"' "$copydir/etc/makepkg.conf"; then
|
||||
echo 'SRCDEST="/srcdest"' >> "$copydir/etc/makepkg.conf"
|
||||
fi
|
||||
|
||||
if [[ -n $MAKEFLAGS ]]; then
|
||||
if [[ -n $MAKEFLAGS ]]; then
|
||||
sed -i '/^MAKEFLAGS=/d' "$copydir/etc/makepkg.conf"
|
||||
echo "MAKEFLAGS='${MAKEFLAGS}'" >> "$copydir/etc/makepkg.conf"
|
||||
fi
|
||||
|
||||
if [[ -n $PACKAGER ]]; then
|
||||
if [[ -n $PACKAGER ]]; then
|
||||
sed -i '/^PACKAGER=/d' "$copydir/etc/makepkg.conf"
|
||||
echo "PACKAGER='${PACKAGER}'" >> "$copydir/etc/makepkg.conf"
|
||||
fi
|
||||
@@ -274,7 +275,7 @@ if $run_namcap; then
|
||||
pacman -S --needed --noconfirm namcap
|
||||
for pkgfile in /build/PKGBUILD /pkgdest/*.pkg.tar.?z; do
|
||||
echo "Checking \${pkgfile##*/}"
|
||||
namcap "\$pkgfile" 2>&1 | tee "/build/\${pkgfile##*/}-namcap.log"
|
||||
sudo -u nobody namcap "\$pkgfile" 2>&1 | tee "/build/\${pkgfile##*/}-namcap.log"
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -292,10 +293,12 @@ if mkarchroot -r "/chrootbuild" "$copydir"; then
|
||||
popd >/dev/null
|
||||
fi
|
||||
|
||||
chown "$src_owner" "$pkgfile"
|
||||
mv "$pkgfile" "$PKGDEST"
|
||||
done
|
||||
|
||||
for l in "$copydir"/build/*-{build,check,namcap,package,package_*}.log; do
|
||||
chown "$src_owner" "$l"
|
||||
[[ -f $l ]] && mv "$l" .
|
||||
done
|
||||
else
|
||||
@@ -304,6 +307,7 @@ else
|
||||
fi
|
||||
|
||||
for f in "$copydir"/srcdest/*; do
|
||||
chown "$src_owner" "$f"
|
||||
mv "$f" "$SRCDEST"
|
||||
done
|
||||
|
||||
|
175
mkarchroot.in
175
mkarchroot.in
@@ -44,7 +44,7 @@ while getopts 'r:ufnhC:M:c:' arg; do
|
||||
M) makepkg_conf="$OPTARG" ;;
|
||||
n) NOCOPY='y' ;;
|
||||
c) cache_dir="$OPTARG" ;;
|
||||
h|?) usage 0 ;;
|
||||
h|?) usage ;;
|
||||
*) error "invalid argument '${arg}'"; usage ;;
|
||||
esac
|
||||
done
|
||||
@@ -78,66 +78,73 @@ if echo "${host_mirror}" | grep -q 'file://'; then
|
||||
fi
|
||||
|
||||
# {{{ functions
|
||||
chroot_mount() {
|
||||
[[ -e "${working_dir}/sys" ]] || mkdir "${working_dir}/sys"
|
||||
mount -o bind /sys "${working_dir}/sys"
|
||||
mount -o remount,ro,bind "${working_dir}/sys"
|
||||
bind_mount() {
|
||||
local mode="${2:-rw}"
|
||||
local target="${working_dir}${1}"
|
||||
|
||||
[[ -e "${working_dir}/proc" ]] || mkdir "${working_dir}/proc"
|
||||
mount -t proc proc -o nosuid,noexec,nodev "${working_dir}/proc"
|
||||
mount -o bind /proc/sys "${working_dir}/proc/sys"
|
||||
mount -o remount,ro,bind "${working_dir}/proc/sys"
|
||||
|
||||
[[ -e "${working_dir}/dev" ]] || mkdir "${working_dir}/dev"
|
||||
mount -t tmpfs dev "${working_dir}/dev" -o mode=0755,size=10M,nosuid,strictatime
|
||||
mknod -m 666 "${working_dir}/dev/null" c 1 3
|
||||
mknod -m 666 "${working_dir}/dev/zero" c 1 5
|
||||
mknod -m 600 "${working_dir}/dev/console" c 5 1
|
||||
mknod -m 644 "${working_dir}/dev/random" c 1 8
|
||||
mknod -m 644 "${working_dir}/dev/urandom" c 1 9
|
||||
mknod -m 666 "${working_dir}/dev/tty" c 5 0
|
||||
mknod -m 666 "${working_dir}/dev/ptmx" c 5 2
|
||||
mknod -m 666 "${working_dir}/dev/tty0" c 4 0
|
||||
mknod -m 666 "${working_dir}/dev/full" c 1 7
|
||||
mknod -m 666 "${working_dir}/dev/rtc0" c 254 0
|
||||
ln -s /proc/kcore "${working_dir}/dev/core"
|
||||
ln -s /proc/self/fd "${working_dir}/dev/fd"
|
||||
ln -s /proc/self/fd/0 "${working_dir}/dev/stdin"
|
||||
ln -s /proc/self/fd/1 "${working_dir}/dev/stdout"
|
||||
ln -s /proc/self/fd/2 "${working_dir}/dev/stderr"
|
||||
|
||||
[[ -e "${working_dir}/dev/shm" ]] || mkdir "${working_dir}/dev/shm"
|
||||
mount -t tmpfs shm "${working_dir}/dev/shm" -o nodev,nosuid,size=128M
|
||||
|
||||
[[ -e "${working_dir}/dev/pts" ]] || mkdir "${working_dir}/dev/pts"
|
||||
mount -o bind /dev/pts "${working_dir}/dev/pts"
|
||||
|
||||
[[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
|
||||
mount -t tmpfs tmpfs "${working_dir}/run" -o mode=0755,nodev,nosuid,strictatime,size=64M
|
||||
|
||||
if [[ -n $host_mirror_path ]]; then
|
||||
[[ -e "${working_dir}/${host_mirror_path}" ]] || mkdir -p "${working_dir}/${host_mirror_path}"
|
||||
mount -o bind "${host_mirror_path}" "${working_dir}/${host_mirror_path}"
|
||||
mount -o remount,ro,bind "${working_dir}/${host_mirror_path}"
|
||||
if [[ ! -e "$target" ]]; then
|
||||
if [[ -d "$1" ]]; then
|
||||
install -d "$target"
|
||||
else
|
||||
install -D /dev/null "$target"
|
||||
fi
|
||||
fi
|
||||
|
||||
local cache_dir_first=true
|
||||
for cache_dir in ${cache_dirs[@]}; do
|
||||
[[ -e $cache_dir ]] || mkdir -p "${cache_dir}"
|
||||
[[ -e "${working_dir}/${cache_dir}" ]] || mkdir -p "${working_dir}/${cache_dir}"
|
||||
mount -o bind "${cache_dir}" "${working_dir}/${cache_dir}"
|
||||
if ! ${cache_dir_first}; then
|
||||
mount -o remount,ro,bind "${working_dir}/${cache_dir}"
|
||||
else
|
||||
cache_dir_first=false
|
||||
fi
|
||||
done
|
||||
mount -o bind "$1" "$target"
|
||||
mount -o remount,${mode},bind "$target"
|
||||
mount --make-slave "$target"
|
||||
}
|
||||
|
||||
trap 'chroot_umount' EXIT INT QUIT TERM HUP
|
||||
chroot_mount() {
|
||||
trap 'trap_chroot_umount' EXIT INT QUIT TERM HUP
|
||||
|
||||
if (( ! have_nspawn )); then
|
||||
bind_mount /sys ro
|
||||
|
||||
[[ -e "${working_dir}/proc" ]] || mkdir "${working_dir}/proc"
|
||||
mount -t proc proc -o nosuid,noexec,nodev "${working_dir}/proc"
|
||||
bind_mount /proc/sys ro
|
||||
|
||||
[[ -e "${working_dir}/dev" ]] || mkdir "${working_dir}/dev"
|
||||
mount -t tmpfs dev "${working_dir}/dev" -o mode=0755,size=10M,nosuid,strictatime
|
||||
mknod -m 666 "${working_dir}/dev/null" c 1 3
|
||||
mknod -m 666 "${working_dir}/dev/zero" c 1 5
|
||||
mknod -m 600 "${working_dir}/dev/console" c 5 1
|
||||
mknod -m 644 "${working_dir}/dev/random" c 1 8
|
||||
mknod -m 644 "${working_dir}/dev/urandom" c 1 9
|
||||
mknod -m 666 "${working_dir}/dev/tty" c 5 0
|
||||
mknod -m 666 "${working_dir}/dev/ptmx" c 5 2
|
||||
mknod -m 666 "${working_dir}/dev/tty0" c 4 0
|
||||
mknod -m 666 "${working_dir}/dev/full" c 1 7
|
||||
mknod -m 666 "${working_dir}/dev/rtc0" c 254 0
|
||||
ln -s /proc/kcore "${working_dir}/dev/core"
|
||||
ln -s /proc/self/fd "${working_dir}/dev/fd"
|
||||
ln -s /proc/self/fd/0 "${working_dir}/dev/stdin"
|
||||
ln -s /proc/self/fd/1 "${working_dir}/dev/stdout"
|
||||
ln -s /proc/self/fd/2 "${working_dir}/dev/stderr"
|
||||
|
||||
[[ -e "${working_dir}/dev/shm" ]] || mkdir "${working_dir}/dev/shm"
|
||||
mount -t tmpfs shm "${working_dir}/dev/shm" -o nodev,nosuid,size=128M
|
||||
|
||||
bind_mount /dev/pts
|
||||
|
||||
[[ -e "${working_dir}/run" ]] || mkdir "${working_dir}/run"
|
||||
mount -t tmpfs tmpfs "${working_dir}/run" -o mode=0755,nodev,nosuid,strictatime,size=64M
|
||||
|
||||
for host_config in resolv.conf localtime; do
|
||||
bind_mount /etc/$host_config ro
|
||||
done
|
||||
fi
|
||||
|
||||
[[ -n $host_mirror_path ]] && bind_mount "$host_mirror_path" ro
|
||||
|
||||
bind_mount "${cache_dirs[0]}"
|
||||
for cache_dir in ${cache_dirs[@]:1}; do
|
||||
bind_mount "$cache_dir" ro
|
||||
done
|
||||
}
|
||||
|
||||
copy_hostconf () {
|
||||
cp /etc/resolv.conf "${working_dir}/etc/resolv.conf"
|
||||
cp -a /etc/pacman.d/gnupg "${working_dir}/etc/pacman.d"
|
||||
echo "Server = ${host_mirror}" > ${working_dir}/etc/pacman.d/mirrorlist
|
||||
|
||||
@@ -152,19 +159,27 @@ copy_hostconf () {
|
||||
sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${cache_dirs[@]})|g" -i ${working_dir}/etc/pacman.conf
|
||||
}
|
||||
|
||||
chroot_umount () {
|
||||
trap - EXIT INT QUIT TERM HUP
|
||||
umount "${working_dir}/proc/sys"
|
||||
umount "${working_dir}/proc"
|
||||
umount "${working_dir}/sys"
|
||||
umount "${working_dir}/dev/pts"
|
||||
umount "${working_dir}/dev/shm"
|
||||
umount "${working_dir}/dev"
|
||||
umount "${working_dir}/run"
|
||||
trap_chroot_umount () {
|
||||
trap 'trap_abort' INT QUIT TERM HUP
|
||||
trap 'trap_exit' EXIT
|
||||
|
||||
for cache_dir in ${cache_dirs[@]}; do
|
||||
umount "${working_dir}/${cache_dir}"
|
||||
done
|
||||
[[ -n $host_mirror_path ]] && umount "${working_dir}/${host_mirror_path}"
|
||||
|
||||
if (( ! have_nspawn )); then
|
||||
for host_config in resolv.conf localtime; do
|
||||
umount "${working_dir}/etc/${host_config}"
|
||||
done
|
||||
umount "${working_dir}/proc/sys"
|
||||
umount "${working_dir}/proc"
|
||||
umount "${working_dir}/sys"
|
||||
umount "${working_dir}/dev/pts"
|
||||
umount "${working_dir}/dev/shm"
|
||||
umount "${working_dir}/dev"
|
||||
umount "${working_dir}/run"
|
||||
fi
|
||||
}
|
||||
|
||||
chroot_lock () {
|
||||
@@ -180,8 +195,24 @@ chroot_lock () {
|
||||
stat_done
|
||||
fi
|
||||
}
|
||||
|
||||
chroot_run() {
|
||||
local dir=$1
|
||||
shift
|
||||
if (( have_nspawn)); then
|
||||
eval systemd-nspawn -D "${dir}" -- ${@} 2>/dev/null
|
||||
else
|
||||
eval unshare -mui -- chroot "${dir}" ${@}
|
||||
fi
|
||||
}
|
||||
|
||||
# }}}
|
||||
|
||||
# use systemd-nspawn if we have it available and systemd is running
|
||||
if type -P systemd-nspawn >/dev/null && mountpoint -q /sys/fs/cgroup/systemd; then
|
||||
have_nspawn=1
|
||||
fi
|
||||
|
||||
umask 0022
|
||||
if [[ -n $RUN ]]; then
|
||||
# run chroot {{{
|
||||
@@ -196,7 +227,7 @@ if [[ -n $RUN ]]; then
|
||||
chroot_mount
|
||||
copy_hostconf
|
||||
|
||||
eval unshare -mui -- chroot "${working_dir}" ${RUN}
|
||||
chroot_run "${working_dir}" ${RUN}
|
||||
|
||||
# }}}
|
||||
else
|
||||
@@ -209,37 +240,31 @@ else
|
||||
chmod 0755 "${working_dir}"
|
||||
fi
|
||||
|
||||
mkdir -p "${working_dir}/var/lib/pacman/sync"
|
||||
mkdir -p "${working_dir}/etc/"
|
||||
|
||||
chroot_lock
|
||||
chroot_mount
|
||||
|
||||
pacargs="--noconfirm --root=${working_dir} ${cache_dirs[@]/#/--cachedir=}"
|
||||
pacargs="${cache_dirs[@]/#/--cachedir=}"
|
||||
if [[ -n $pac_conf ]]; then
|
||||
pacargs="$pacargs --config=${pac_conf}"
|
||||
fi
|
||||
|
||||
if (( $# != 0 )); then
|
||||
op='-Sy'
|
||||
if [[ $FORCE = 'y' ]]; then
|
||||
op="${op}f"
|
||||
pacargs="$pacargs --force"
|
||||
fi
|
||||
if ! pacman ${op} ${pacargs} $@; then
|
||||
if ! pacstrap -GMcd "${working_dir}" ${pacargs} $@; then
|
||||
die 'Failed to install all packages'
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -d "${working_dir}/lib/modules" ]]; then
|
||||
ldconfig -r "${working_dir}"
|
||||
chroot_run "${working_dir}" ldconfig
|
||||
fi
|
||||
|
||||
if [[ -e "${working_dir}/etc/locale.gen" ]]; then
|
||||
sed -i 's@^#\(en_US\|de_DE\)\(\.UTF-8\)@\1\2@' "${working_dir}/etc/locale.gen"
|
||||
chroot "${working_dir}" /usr/sbin/locale-gen
|
||||
chroot_run "${working_dir}" locale-gen
|
||||
fi
|
||||
echo 'UTC' > "${working_dir}/etc/timezone"
|
||||
ln -s /usr/share/zoneinfo/UTC "${working_dir}/etc/localtime"
|
||||
echo 'LANG=C' > "${working_dir}/etc/locale.conf"
|
||||
|
||||
copy_hostconf
|
||||
|
Reference in New Issue
Block a user