2014-04-09 16:40:27 +02:00
|
|
|
# vim: set ts=4 sw=4 et:
|
2014-03-22 12:31:42 +01:00
|
|
|
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
install_base_chroot() {
|
|
|
|
[ "$CHROOT_READY" ] && return
|
|
|
|
if [ "$1" = "bootstrap" ]; then
|
|
|
|
unset XBPS_TARGET_PKG XBPS_INSTALL_ARGS
|
|
|
|
else
|
|
|
|
XBPS_TARGET_PKG="$1"
|
|
|
|
fi
|
|
|
|
# binary bootstrap
|
|
|
|
msg_normal "xbps-src: installing base-chroot...\n"
|
|
|
|
# XBPS_TARGET_PKG == arch
|
|
|
|
if [ "$XBPS_TARGET_PKG" ]; then
|
|
|
|
_bootstrap_arch="env XBPS_TARGET_ARCH=$XBPS_TARGET_PKG"
|
|
|
|
fi
|
2020-01-05 12:07:30 +01:00
|
|
|
(export XBPS_MACHINE=$XBPS_TARGET_PKG XBPS_ARCH=$XBPS_TARGET_PKG; chroot_sync_repodata)
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
${_bootstrap_arch} $XBPS_INSTALL_CMD ${XBPS_INSTALL_ARGS} -y base-chroot
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
msg_error "xbps-src: failed to install base-chroot!\n"
|
|
|
|
fi
|
|
|
|
# Reconfigure base-files to create dirs/symlinks.
|
|
|
|
if xbps-query -r $XBPS_MASTERDIR base-files &>/dev/null; then
|
2020-07-06 22:25:02 +02:00
|
|
|
XBPS_ARCH=$XBPS_TARGET_PKG xbps-reconfigure -r $XBPS_MASTERDIR -f base-files &>/dev/null
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
msg_normal "xbps-src: installed base-chroot successfully!\n"
|
|
|
|
chroot_prepare $XBPS_TARGET_PKG || msg_error "xbps-src: failed to initialize chroot!\n"
|
|
|
|
chroot_check
|
|
|
|
chroot_handler clean
|
|
|
|
}
|
|
|
|
|
|
|
|
reconfigure_base_chroot() {
|
|
|
|
local statefile="$XBPS_MASTERDIR/.xbps_chroot_configured"
|
|
|
|
local pkgs="glibc-locales ca-certificates"
|
|
|
|
[ -z "$IN_CHROOT" -o -e $statefile ] && return 0
|
|
|
|
# Reconfigure ca-certificates.
|
|
|
|
msg_normal "xbps-src: reconfiguring base-chroot...\n"
|
|
|
|
for f in ${pkgs}; do
|
|
|
|
if xbps-query -r $XBPS_MASTERDIR $f &>/dev/null; then
|
|
|
|
xbps-reconfigure -r $XBPS_MASTERDIR -f $f
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
touch -f $statefile
|
|
|
|
}
|
|
|
|
|
|
|
|
update_base_chroot() {
|
2020-01-28 01:06:16 +01:00
|
|
|
local keep_all_force=$1
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
[ -z "$CHROOT_READY" ] && return
|
|
|
|
msg_normal "xbps-src: updating software in $XBPS_MASTERDIR masterdir...\n"
|
|
|
|
# no need to sync repodata, chroot_sync_repodata() does it for us.
|
2020-01-05 09:53:14 +01:00
|
|
|
if $(${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -nu|grep -q xbps); then
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -yu xbps || msg_error "xbps-src: failed to update xbps!\n"
|
|
|
|
fi
|
|
|
|
${XBPS_INSTALL_CMD} ${XBPS_INSTALL_ARGS} -yu || msg_error "xbps-src: failed to update base-chroot!\n"
|
2020-01-01 12:42:13 +01:00
|
|
|
msg_normal "xbps-src: cleaning up $XBPS_MASTERDIR masterdir...\n"
|
2020-01-05 10:25:02 +01:00
|
|
|
[ -z "$XBPS_KEEP_ALL" -a -z "$XBPS_SKIP_DEPS" ] && remove_pkg_autodeps
|
2020-01-28 01:06:16 +01:00
|
|
|
[ -z "$XBPS_KEEP_ALL" -a -z "$keep_all_force" ] && rm -rf $XBPS_MASTERDIR/builddir $XBPS_MASTERDIR/destdir
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
}
|
|
|
|
|
2017-03-08 17:28:31 +01:00
|
|
|
# FIXME: $XBPS_FFLAGS is not set when chroot_init() is run
|
|
|
|
# It is set in common/build-profiles/bootstrap.sh but lost somewhere?
|
2014-03-22 12:31:42 +01:00
|
|
|
chroot_init() {
|
2014-12-22 11:28:52 +01:00
|
|
|
mkdir -p $XBPS_MASTERDIR/etc/xbps
|
|
|
|
|
2019-10-27 12:15:49 +01:00
|
|
|
: ${XBPS_CONFIG_FILE:=/dev/null}
|
2019-06-13 00:29:49 +02:00
|
|
|
cat > $XBPS_MASTERDIR/etc/xbps/xbps-src.conf <<_EOF
|
2014-03-22 12:31:42 +01:00
|
|
|
# Generated configuration file by xbps-src, DO NOT EDIT!
|
2019-06-13 00:29:49 +02:00
|
|
|
$(grep -E '^XBPS_.*' "$XBPS_CONFIG_FILE")
|
2014-03-22 12:31:42 +01:00
|
|
|
XBPS_MASTERDIR=/
|
|
|
|
XBPS_CFLAGS="$XBPS_CFLAGS"
|
|
|
|
XBPS_CXXFLAGS="$XBPS_CXXFLAGS"
|
2021-01-03 13:59:48 +01:00
|
|
|
XBPS_FFLAGS="$XBPS_FFLAGS"
|
2014-03-22 12:31:42 +01:00
|
|
|
XBPS_CPPFLAGS="$XBPS_CPPFLAGS"
|
|
|
|
XBPS_LDFLAGS="$XBPS_LDFLAGS"
|
2014-06-30 12:03:56 +02:00
|
|
|
XBPS_HOSTDIR=/host
|
2019-06-13 00:29:49 +02:00
|
|
|
# End of configuration file.
|
2014-03-22 12:31:42 +01:00
|
|
|
_EOF
|
2014-04-09 16:40:27 +02:00
|
|
|
|
|
|
|
# Create custom script to start the chroot bash shell.
|
|
|
|
cat > $XBPS_MASTERDIR/bin/xbps-shell <<_EOF
|
2014-03-22 12:31:42 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
XBPS_SRC_VERSION="$XBPS_SRC_VERSION"
|
|
|
|
|
|
|
|
. /etc/xbps/xbps-src.conf
|
|
|
|
|
2019-07-02 19:14:56 +02:00
|
|
|
PATH=/void-packages:/usr/bin
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2019-06-13 00:37:59 +02:00
|
|
|
exec env -i -- SHELL=/bin/sh PATH="\$PATH" DISTCC_HOSTS="\$XBPS_DISTCC_HOSTS" DISTCC_DIR="/host/distcc" \
|
|
|
|
${XBPS_ARCH+XBPS_ARCH=$XBPS_ARCH} ${XBPS_CHECK_PKGS+XBPS_CHECK_PKGS=$XBPS_CHECK_PKGS} \
|
|
|
|
CCACHE_DIR="/host/ccache" IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 TERM=linux HOME="/tmp" \
|
2023-01-24 15:06:21 +01:00
|
|
|
PS1="[\u@$XBPS_MASTERDIR \W]$ " /bin/bash +h "\$@"
|
2014-03-22 12:31:42 +01:00
|
|
|
_EOF
|
2019-06-13 00:37:59 +02:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
chmod 755 $XBPS_MASTERDIR/bin/xbps-shell
|
|
|
|
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
|
2020-01-01 12:10:59 +01:00
|
|
|
return 0
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
chroot_prepare() {
|
2014-04-09 16:40:27 +02:00
|
|
|
local f=
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
if [ -f $XBPS_MASTERDIR/.xbps_chroot_init ]; then
|
|
|
|
return 0
|
|
|
|
elif [ ! -f $XBPS_MASTERDIR/bin/bash ]; then
|
|
|
|
msg_error "Bootstrap not installed in $XBPS_MASTERDIR, can't continue.\n"
|
|
|
|
fi
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2021-01-10 09:24:40 +01:00
|
|
|
# Some software expects /etc/localtime to be a symbolic link it can read to
|
|
|
|
# determine the name of the time zone, so set up the expected link
|
|
|
|
# structure.
|
2021-06-09 13:31:28 +02:00
|
|
|
ln -sf ../usr/share/zoneinfo/UTC $XBPS_MASTERDIR/etc/localtime
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2021-02-08 14:17:24 +01:00
|
|
|
for f in dev sys tmp proc host boot; do
|
2014-04-09 16:40:27 +02:00
|
|
|
[ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f
|
|
|
|
done
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
# Copy /etc/passwd and /etc/group from base-files.
|
|
|
|
cp -f $XBPS_SRCPKGDIR/base-files/files/passwd $XBPS_MASTERDIR/etc
|
|
|
|
echo "$(whoami):x:$(id -u):$(id -g):$(whoami) user:/tmp:/bin/xbps-shell" \
|
|
|
|
>> $XBPS_MASTERDIR/etc/passwd
|
|
|
|
cp -f $XBPS_SRCPKGDIR/base-files/files/group $XBPS_MASTERDIR/etc
|
|
|
|
echo "$(whoami):x:$(id -g):" >> $XBPS_MASTERDIR/etc/group
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
# Copy /etc/hosts from base-files.
|
|
|
|
cp -f $XBPS_SRCPKGDIR/base-files/files/hosts $XBPS_MASTERDIR/etc
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
# Prepare default locale: en_US.UTF-8.
|
2018-02-20 15:35:35 +01:00
|
|
|
if [ -s ${XBPS_MASTERDIR}/etc/default/libc-locales ]; then
|
2020-07-28 16:09:54 +02:00
|
|
|
printf '%s\n' \
|
|
|
|
'C.UTF-8 UTF-8' \
|
|
|
|
'en_US.UTF-8 UTF-8' \
|
|
|
|
>> ${XBPS_MASTERDIR}/etc/default/libc-locales
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
touch -f $XBPS_MASTERDIR/.xbps_chroot_init
|
|
|
|
[ -n "$1" ] && echo $1 >> $XBPS_MASTERDIR/.xbps_chroot_init
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
return 0
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
chroot_handler() {
|
2015-04-09 18:57:41 +02:00
|
|
|
local action="$1" pkg="$2" rv=0 arg= _envargs=
|
2014-04-09 16:40:27 +02:00
|
|
|
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
[ -z "$action" -a -z "$pkg" ] && return 1
|
|
|
|
|
2014-11-10 11:57:46 +01:00
|
|
|
if [ -n "$IN_CHROOT" -o -z "$CHROOT_READY" ]; then
|
2015-01-04 12:14:14 +01:00
|
|
|
return 0
|
2014-11-08 11:07:40 +01:00
|
|
|
fi
|
2014-10-11 11:02:57 +02:00
|
|
|
if [ ! -d $XBPS_MASTERDIR/void-packages ]; then
|
|
|
|
mkdir -p $XBPS_MASTERDIR/void-packages
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
case "$action" in
|
2020-01-26 10:41:12 +01:00
|
|
|
fetch|extract|patch|configure|build|check|install|pkg|bootstrap-update|chroot|clean)
|
2014-04-09 16:40:27 +02:00
|
|
|
chroot_prepare || return $?
|
|
|
|
chroot_init || return $?
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "$action" = "chroot" ]; then
|
2015-04-09 18:57:41 +02:00
|
|
|
$XBPS_COMMONDIR/chroot-style/${XBPS_CHROOT_CMD:=uunshare}.sh \
|
|
|
|
$XBPS_MASTERDIR $XBPS_DISTDIR "$XBPS_HOSTDIR" "$XBPS_CHROOT_CMD_ARGS" /bin/xbps-shell
|
2015-03-12 18:56:14 +01:00
|
|
|
rv=$?
|
2014-04-09 16:40:27 +02:00
|
|
|
else
|
2019-07-07 09:04:12 +02:00
|
|
|
env -i -- PATH="/usr/bin:$PATH" SHELL=/bin/sh \
|
2015-09-15 08:15:13 +02:00
|
|
|
HOME=/tmp IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 \
|
2023-01-04 14:25:10 +01:00
|
|
|
${http_proxy:+http_proxy="${http_proxy}"} \
|
|
|
|
${https_proxy:+https_proxy="${https_proxy}"} \
|
|
|
|
${ftp_proxy:+ftp_proxy="${ftp_proxy}"} \
|
|
|
|
${all_proxy:+all_proxy="${all_proxy}"} \
|
|
|
|
${no_proxy:+no_proxy="${no_proxy}"} \
|
2019-11-08 18:48:25 +01:00
|
|
|
${HTTP_PROXY:+HTTP_PROXY="${HTTP_PROXY}"} \
|
|
|
|
${HTTPS_PROXY:+HTTPS_PROXY="${HTTPS_PROXY}"} \
|
|
|
|
${FTP_PROXY:+FTP_PROXY="${FTP_PROXY}"} \
|
|
|
|
${SOCKS_PROXY:+SOCKS_PROXY="${SOCKS_PROXY}"} \
|
|
|
|
${NO_PROXY:+NO_PROXY="${NO_PROXY}"} \
|
|
|
|
${HTTP_PROXY_AUTH:+HTTP_PROXY_AUTH="${HTTP_PROXY_AUTH}"} \
|
2020-01-29 23:28:40 +01:00
|
|
|
${FTP_RETRIES:+FTP_RETRIES="${FTP_RETRIES}"} \
|
2016-03-01 18:27:16 +01:00
|
|
|
SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
2020-04-21 17:52:38 +02:00
|
|
|
XBPS_GIT_REVS="$XBPS_GIT_REVS" \
|
2019-02-26 21:23:11 +01:00
|
|
|
XBPS_ALLOW_CHROOT_BREAKOUT="$XBPS_ALLOW_CHROOT_BREAKOUT" \
|
2020-12-08 01:12:40 +01:00
|
|
|
${XBPS_ALT_REPOSITORY:+XBPS_ALT_REPOSITORY=$XBPS_ALT_REPOSITORY} \
|
2015-04-09 18:57:41 +02:00
|
|
|
$XBPS_COMMONDIR/chroot-style/${XBPS_CHROOT_CMD:=uunshare}.sh \
|
|
|
|
$XBPS_MASTERDIR $XBPS_DISTDIR "$XBPS_HOSTDIR" "$XBPS_CHROOT_CMD_ARGS" \
|
2019-07-10 19:48:54 +02:00
|
|
|
/void-packages/xbps-src $XBPS_OPTIONS $action $pkg
|
2015-03-12 18:56:14 +01:00
|
|
|
rv=$?
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
return $rv
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
|
|
|
|
chroot_sync_repodata() {
|
|
|
|
local f= hostdir= confdir= crossconfdir=
|
|
|
|
|
|
|
|
# always start with an empty xbps.d
|
|
|
|
confdir=$XBPS_MASTERDIR/etc/xbps.d
|
|
|
|
crossconfdir=$XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
|
|
|
|
|
|
|
[ -d $confdir ] && rm -rf $confdir
|
2020-01-26 10:41:12 +01:00
|
|
|
[ -d $crossconfdir ] && rm -rf $crossconfdir
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
|
2020-01-26 10:41:12 +01:00
|
|
|
if [ -d $XBPS_DISTDIR/etc/xbps.d/custom ]; then
|
|
|
|
mkdir -p $confdir $crossconfdir
|
|
|
|
cp -f $XBPS_DISTDIR/etc/xbps.d/custom/*.conf $confdir
|
|
|
|
cp -f $XBPS_DISTDIR/etc/xbps.d/custom/*.conf $crossconfdir
|
|
|
|
fi
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
if [ "$CHROOT_READY" ]; then
|
|
|
|
hostdir=/host
|
|
|
|
else
|
|
|
|
hostdir=$XBPS_HOSTDIR
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Update xbps alternative repository if set.
|
|
|
|
mkdir -p $confdir
|
|
|
|
if [ -n "$XBPS_ALT_REPOSITORY" ]; then
|
|
|
|
( \
|
|
|
|
echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}"; \
|
|
|
|
echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/nonfree"; \
|
|
|
|
echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/debug"; \
|
|
|
|
) > $confdir/00-repository-alt-local.conf
|
|
|
|
if [ "$XBPS_MACHINE" = "x86_64" ]; then
|
|
|
|
( \
|
|
|
|
echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/multilib"; \
|
|
|
|
echo "repository=$hostdir/binpkgs/${XBPS_ALT_REPOSITORY}/multilib/nonfree"; \
|
|
|
|
) >> $confdir/00-repository-alt-local.conf
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
rm -f $confdir/00-repository-alt-local.conf
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Disable 00-repository-main.conf from share/xbps.d (part of xbps)
|
|
|
|
ln -s /dev/null $confdir/00-repository-main.conf
|
|
|
|
|
|
|
|
# Generate xbps.d(5) configuration files for repositories
|
|
|
|
sed -e "s,/host,$hostdir,g" ${XBPS_DISTDIR}/etc/xbps.d/repos-local.conf \
|
|
|
|
> $confdir/10-repository-local.conf
|
|
|
|
|
2020-01-30 15:14:30 +01:00
|
|
|
# Install multilib conf for local repos if it exists for the architecture
|
|
|
|
if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-local-${XBPS_MACHINE}-multilib.conf" ]; then
|
|
|
|
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-local-${XBPS_MACHINE}-multilib.conf \
|
|
|
|
$confdir/12-repository-local-multilib.conf
|
|
|
|
fi
|
|
|
|
|
2021-12-06 00:14:14 +01:00
|
|
|
# mirror_sed is a sed script: nop by default
|
|
|
|
local mirror_sed
|
|
|
|
if [ -n "$XBPS_MIRROR" ]; then
|
|
|
|
# when XBPS_MIRROR is set, mirror_sed rewrites remote repos
|
|
|
|
mirror_sed="s|^repository=http.*/current|repository=${XBPS_MIRROR}|"
|
|
|
|
fi
|
|
|
|
|
2020-01-04 08:59:10 +01:00
|
|
|
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
|
2020-01-08 16:51:57 +01:00
|
|
|
rm -f $confdir/*remote*
|
2020-01-04 08:59:10 +01:00
|
|
|
else
|
2020-01-30 15:14:30 +01:00
|
|
|
if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf" ]; then
|
|
|
|
# If per-architecture base remote repo config exists, use that
|
2021-12-06 00:14:14 +01:00
|
|
|
sed -e "$mirror_sed" ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf \
|
|
|
|
> $confdir/20-repository-remote.conf
|
2020-01-30 15:14:30 +01:00
|
|
|
else
|
|
|
|
# Otherwise use generic base for musl or glibc
|
|
|
|
local suffix=
|
|
|
|
case "$XBPS_MACHINE" in
|
|
|
|
*-musl) suffix="-musl";;
|
|
|
|
esac
|
2021-12-06 00:14:14 +01:00
|
|
|
sed -e "$mirror_sed" ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
|
|
|
|
> $confdir/20-repository-remote.conf
|
2020-01-30 15:14:30 +01:00
|
|
|
fi
|
|
|
|
# Install multilib conf for remote repos if it exists for the architecture
|
|
|
|
if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf" ]; then
|
2021-12-06 00:14:14 +01:00
|
|
|
sed -e "$mirror_sed" ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf \
|
|
|
|
> $confdir/22-repository-remote-multilib.conf
|
2020-01-30 15:14:30 +01:00
|
|
|
fi
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
fi
|
|
|
|
|
2020-10-12 19:53:51 +02:00
|
|
|
echo "syslog=false" > $confdir/00-xbps-src.conf
|
|
|
|
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
# Copy host repos to the cross root.
|
|
|
|
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
|
|
|
rm -rf $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
|
|
|
mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
2021-12-06 00:14:14 +01:00
|
|
|
# Disable 00-repository-main.conf from share/xbps.d (part of xbps)
|
|
|
|
ln -s /dev/null $XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d/00-repository-main.conf
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
# copy xbps.d files from host for local repos
|
|
|
|
cp ${XBPS_MASTERDIR}/etc/xbps.d/*local*.conf \
|
|
|
|
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/etc/xbps.d
|
2020-01-08 16:51:57 +01:00
|
|
|
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
|
|
|
|
rm -f $crossconfdir/*remote*
|
|
|
|
else
|
2020-01-30 15:14:30 +01:00
|
|
|
# Same general logic as above, just into cross root, and no multilib
|
|
|
|
if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.conf" ]; then
|
2021-12-06 00:14:14 +01:00
|
|
|
sed -e "$mirror_sed" ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.conf \
|
|
|
|
> $crossconfdir/20-repository-remote.conf
|
2020-01-30 15:14:30 +01:00
|
|
|
else
|
|
|
|
local suffix=
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
*-musl) suffix="-musl"
|
|
|
|
esac
|
2021-12-06 00:14:14 +01:00
|
|
|
sed -e "$mirror_sed" ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
|
|
|
|
> $crossconfdir/20-repository-remote.conf
|
2020-01-30 15:14:30 +01:00
|
|
|
fi
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
fi
|
2020-10-12 19:53:51 +02:00
|
|
|
|
|
|
|
echo "syslog=false" > $crossconfdir/00-xbps-src.conf
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
fi
|
|
|
|
|
2020-04-13 01:14:31 +02:00
|
|
|
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
# Copy xbps repository keys to the masterdir.
|
|
|
|
mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys
|
|
|
|
cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys
|
|
|
|
|
|
|
|
# Make sure to sync index for remote repositories.
|
2020-04-13 01:59:03 +02:00
|
|
|
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
|
|
|
|
msg_normal "xbps-src: updating repositories for host ($XBPS_MACHINE)...\n"
|
|
|
|
$XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -S
|
|
|
|
fi
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
|
|
|
|
if [ -n "$XBPS_CROSS_BUILD" ]; then
|
|
|
|
# Copy host keys to the target rootdir.
|
|
|
|
mkdir -p $XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
|
|
|
cp $XBPS_MASTERDIR/var/db/xbps/keys/*.plist \
|
|
|
|
$XBPS_MASTERDIR/$XBPS_CROSS_BASE/var/db/xbps/keys
|
|
|
|
# Make sure to sync index for remote repositories.
|
2020-04-13 01:59:03 +02:00
|
|
|
if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then
|
|
|
|
msg_normal "xbps-src: updating repositories for target ($XBPS_TARGET_MACHINE)...\n"
|
|
|
|
env -- XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE \
|
|
|
|
$XBPS_INSTALL_CMD $XBPS_INSTALL_ARGS -r $XBPS_MASTERDIR/$XBPS_CROSS_BASE -S
|
|
|
|
fi
|
xbps-src: base-chroot-v2 (reduce artifacts/deps)
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
2020-01-01 11:15:35 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|