xbps-src: force reconfiguration of bootstrap pkgs on chroot setup.
Right now ca-certificates internally requires the `openssl` utility to generate /etc/ssl/certs. Certainly we need to perform this task only once and iff we are within the chroot, because the host might not have it in PATH. This should fix the travis issue seen since xbps-0.48 was released.
This commit is contained in:
parent
24e7203b05
commit
5f030fe2f1
28
xbps-src
28
xbps-src
|
@ -289,19 +289,29 @@ install_bbootstrap() {
|
|||
msg_error "Failed to install bootstrap packages!\n"
|
||||
fi
|
||||
# Reconfigure base-files to create dirs/symlinks.
|
||||
if xbps-query -r $XBPS_MASTERDIR base-directories &>/dev/null; then
|
||||
XBPS_ARCH=$XBPS_TARGET_PKG xbps-reconfigure -r $XBPS_MASTERDIR -f base-directories &>/dev/null
|
||||
else
|
||||
if xbps-query -r $XBPS_MASTERDIR base-files &>/dev/null; then
|
||||
XBPS_ARCH=$XBPS_TARGET_PKG xbps-reconfigure -r $XBPS_MASTERDIR -f base-files &>/dev/null
|
||||
fi
|
||||
# Reconfigure ca-certificates.
|
||||
if xbps-query -r $XBPS_MASTERDIR ca-certificates &>/dev/null; then
|
||||
XBPS_ARCH=$XBPS_TARGET_PKG xbps-reconfigure -r $XBPS_MASTERDIR -f ca-certificates &>/dev/null
|
||||
fi
|
||||
|
||||
msg_normal "Installed bootstrap successfully!\n"
|
||||
chroot_prepare $XBPS_TARGET_PKG || msg_error "Failed to initialize chroot!\n"
|
||||
}
|
||||
|
||||
reconfigure_bootstrap_pkgs() {
|
||||
local statefile="$XBPS_MASTERDIR/.xbps_chroot_configured"
|
||||
local pkgs="ca-certificates"
|
||||
[ -z "$IN_CHROOT" -o -e $statefile ] && return 0
|
||||
# Reconfigure ca-certificates.
|
||||
msg_normal "Reconfiguring bootstrap packages...\n"
|
||||
for f in ${pkgs}; do
|
||||
if xbps-query $f &>/dev/null; then
|
||||
xbps-reconfigure -f $f
|
||||
fi
|
||||
done
|
||||
touch -f $statefile
|
||||
}
|
||||
|
||||
|
||||
bootstrap_update() {
|
||||
if [ -z "$CHROOT_READY" ]; then
|
||||
return
|
||||
|
@ -317,7 +327,7 @@ bootstrap_update() {
|
|||
masterdir_zap() {
|
||||
for f in bin boot builddir destdir dev etc home lib lib32 lib64 mnt \
|
||||
opt proc root run sbin sys tmp usr var host media xbps \
|
||||
void-packages .xbps_chroot_init; do
|
||||
void-packages .xbps_chroot_init .xbps_chroot_reconfigured; do
|
||||
if [ -d "$XBPS_MASTERDIR/$f" ]; then
|
||||
echo "Removing directory $XBPS_MASTERDIR/$f ..."
|
||||
rm -rf $XBPS_MASTERDIR/$f
|
||||
|
@ -606,6 +616,8 @@ if [ -z "$IN_CHROOT" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
reconfigure_bootstrap_pkgs
|
||||
|
||||
#
|
||||
# Main switch.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user