xbps-src: no need to chroot to install xbps-src anymore.
This commit is contained in:
parent
99578ee070
commit
7253423d23
3 changed files with 27 additions and 17 deletions
|
@ -270,13 +270,7 @@ install_xbps_utils()
|
||||||
local needed _cmd
|
local needed _cmd
|
||||||
local xbps_prefix=$XBPS_MASTERDIR/usr/local
|
local xbps_prefix=$XBPS_MASTERDIR/usr/local
|
||||||
|
|
||||||
for f in bin repo uhelper; do
|
if [ ! -f ${XBPS_MASTERDIR}/.xbps_utils_done ]; then
|
||||||
if [ ! -x $xbps_prefix/sbin/xbps-${f}.static ]; then
|
|
||||||
needed=yes
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$needed" ]; then
|
|
||||||
echo "=> Installing static XBPS utils into masterdir."
|
echo "=> Installing static XBPS utils into masterdir."
|
||||||
for f in bin repo uhelper; do
|
for f in bin repo uhelper; do
|
||||||
_cmd=$(which xbps-${f}.static 2>/dev/null)
|
_cmd=$(which xbps-${f}.static 2>/dev/null)
|
||||||
|
@ -286,9 +280,29 @@ install_xbps_utils()
|
||||||
fi
|
fi
|
||||||
cp -f ${_cmd} $xbps_prefix/sbin
|
cp -f ${_cmd} $xbps_prefix/sbin
|
||||||
done
|
done
|
||||||
|
touch ${XBPS_MASTERDIR}/.xbps_utils_done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_xbps_src()
|
||||||
|
{
|
||||||
|
set -e
|
||||||
|
install -Dm755 ${XBPS_SBINDIR}/xbps-src \
|
||||||
|
${XBPS_MASTERDIR}/usr/local/sbin/xbps-src
|
||||||
|
install -Dm755 ${XBPS_LIBEXECDIR}/doinst-helper.sh \
|
||||||
|
${XBPS_MASTERDIR}/usr/local/libexec/xbps-src/doinst-helper.sh
|
||||||
|
install -d ${XBPS_MASTERDIR}/usr/local/share/xbps-src/shutils
|
||||||
|
install -m644 ${XBPS_SHAREDIR}/shutils/*.sh \
|
||||||
|
${XBPS_MASTERDIR}/usr/local/share/xbps-src/shutils
|
||||||
|
install -d ${XBPS_MASTERDIR}/usr/local/share/xbps-src/common
|
||||||
|
install -m644 ${XBPS_SHAREDIR}/common/* \
|
||||||
|
${XBPS_MASTERDIR}/usr/local/share/xbps-src/common
|
||||||
|
install -d ${XBPS_MASTERDIR}/usr/local/share/xbps-src/helpers
|
||||||
|
install -m644 ${XBPS_SHAREDIR}/helpers/*.sh \
|
||||||
|
${XBPS_MASTERDIR}/usr/local/share/xbps-src/helpers
|
||||||
|
set +e
|
||||||
|
}
|
||||||
|
|
||||||
xbps_chroot_handler()
|
xbps_chroot_handler()
|
||||||
{
|
{
|
||||||
local action="$1" pkg="$2" rv=0 arg
|
local action="$1" pkg="$2" rv=0 arg
|
||||||
|
@ -307,6 +321,7 @@ xbps_chroot_handler()
|
||||||
create_binsh_symlink
|
create_binsh_symlink
|
||||||
create_busybox_links
|
create_busybox_links
|
||||||
install_xbps_utils
|
install_xbps_utils
|
||||||
|
install_xbps_src
|
||||||
|
|
||||||
_mount || return $?
|
_mount || return $?
|
||||||
|
|
||||||
|
@ -314,13 +329,6 @@ xbps_chroot_handler()
|
||||||
prepare_binpkg_repos
|
prepare_binpkg_repos
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Reinstall xbps-src in the chroot
|
|
||||||
msg_normal "Installing xbps-src in the masterdir...\n"
|
|
||||||
env IN_CHROOT=yes LANG=C \
|
|
||||||
${CHROOT_CMD} $XBPS_MASTERDIR sh -c \
|
|
||||||
"cd /xbps/xbps-src && make IN_CHROOT=1 install clean" \
|
|
||||||
2>&1 >/dev/null || return $?
|
|
||||||
|
|
||||||
# Update ld.so(8) cache
|
# Update ld.so(8) cache
|
||||||
msg_normal "Updating ld.so(8) cache...\n"
|
msg_normal "Updating ld.so(8) cache...\n"
|
||||||
${CHROOT_CMD} $XBPS_MASTERDIR sh -c "ldconfig" || return $?
|
${CHROOT_CMD} $XBPS_MASTERDIR sh -c "ldconfig" || return $?
|
||||||
|
|
|
@ -135,8 +135,8 @@ install_pkg()
|
||||||
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
|
BOOTSTRAP_PKG_REBUILD=$BOOTSTRAP_PKG_REBUILD \
|
||||||
CONFIG_FILE=${XBPS_CONFIG_FILE} \
|
CONFIG_FILE=${XBPS_CONFIG_FILE} \
|
||||||
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
|
${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} \
|
||||||
${XBPS_LIBEXECDIR}/doinst-helper.sh ${curpkgn} \
|
${XBPS_LIBEXECDIR}/doinst-helper.sh \
|
||||||
|| return $?
|
${curpkgn} || return $?
|
||||||
|
|
||||||
# Strip binaries/libraries.
|
# Strip binaries/libraries.
|
||||||
strip_files
|
strip_files
|
||||||
|
|
|
@ -28,9 +28,11 @@ readonly XBPS_SRC_BUILD_VERSION=20111118
|
||||||
if [ -n "$IN_CHROOT" ]; then
|
if [ -n "$IN_CHROOT" ]; then
|
||||||
export XBPS_ETCDIR=/usr/local/etc/xbps
|
export XBPS_ETCDIR=/usr/local/etc/xbps
|
||||||
export XBPS_SHAREDIR=/usr/local/share/xbps-src
|
export XBPS_SHAREDIR=/usr/local/share/xbps-src
|
||||||
export XBPS_LIBEXECDIR=/usr/local/libexec
|
export XBPS_LIBEXECDIR=/usr/local/libexec/xbps-src
|
||||||
else
|
else
|
||||||
|
export XBPS_PREFIX=@@XBPS_INSTALL_PREFIX@@
|
||||||
export XBPS_ETCDIR=@@XBPS_INSTALL_ETCDIR@@
|
export XBPS_ETCDIR=@@XBPS_INSTALL_ETCDIR@@
|
||||||
|
export XBPS_SBINDIR=@@XBPS_INSTALL_SBINDIR@@
|
||||||
export XBPS_SHAREDIR=@@XBPS_INSTALL_SHAREDIR@@
|
export XBPS_SHAREDIR=@@XBPS_INSTALL_SHAREDIR@@
|
||||||
export XBPS_LIBEXECDIR=@@XBPS_INSTALL_LIBEXECDIR@@
|
export XBPS_LIBEXECDIR=@@XBPS_INSTALL_LIBEXECDIR@@
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue