2014-04-09 14:40:27 +00:00
|
|
|
# vim: set ts=4 sw=4 et:
|
2014-03-22 11:31:42 +00: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 10:15:35 +00: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 11:07:30 +00: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 10:15:35 +00: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 20:25:02 +00: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 10:15:35 +00: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 00:06:16 +00: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 10:15:35 +00: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 08:53:14 +00: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 10:15:35 +00: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 11:42:13 +00:00
|
|
|
msg_normal "xbps-src: cleaning up $XBPS_MASTERDIR masterdir...\n"
|
2020-01-05 09:25:02 +00:00
|
|
|
[ -z "$XBPS_KEEP_ALL" -a -z "$XBPS_SKIP_DEPS" ] && remove_pkg_autodeps
|
2020-01-28 00:06:16 +00: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 10:15:35 +00:00
|
|
|
}
|
|
|
|
|
2017-03-08 16:28:31 +00: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 11:31:42 +00:00
|
|
|
chroot_init() {
|
2014-12-22 10:28:52 +00:00
|
|
|
mkdir -p $XBPS_MASTERDIR/etc/xbps
|
|
|
|
|
2019-10-27 11:15:49 +00:00
|
|
|
: ${XBPS_CONFIG_FILE:=/dev/null}
|
2019-06-12 22:29:49 +00:00
|
|
|
cat > $XBPS_MASTERDIR/etc/xbps/xbps-src.conf <<_EOF
|
2014-03-22 11:31:42 +00:00
|
|
|
# Generated configuration file by xbps-src, DO NOT EDIT!
|
2019-06-12 22:29:49 +00:00
|
|
|
$(grep -E '^XBPS_.*' "$XBPS_CONFIG_FILE")
|
2014-03-22 11:31:42 +00:00
|
|
|
XBPS_MASTERDIR=/
|
|
|
|
XBPS_CFLAGS="$XBPS_CFLAGS"
|
|
|
|
XBPS_CXXFLAGS="$XBPS_CXXFLAGS"
|
2021-01-03 12:59:48 +00:00
|
|
|
XBPS_FFLAGS="$XBPS_FFLAGS"
|
2014-03-22 11:31:42 +00:00
|
|
|
XBPS_CPPFLAGS="$XBPS_CPPFLAGS"
|
|
|
|
XBPS_LDFLAGS="$XBPS_LDFLAGS"
|
2014-06-30 10:03:56 +00:00
|
|
|
XBPS_HOSTDIR=/host
|
2019-06-12 22:29:49 +00:00
|
|
|
# End of configuration file.
|
2014-03-22 11:31:42 +00:00
|
|
|
_EOF
|
2014-04-09 14:40:27 +00:00
|
|
|
|
|
|
|
# Create custom script to start the chroot bash shell.
|
|
|
|
cat > $XBPS_MASTERDIR/bin/xbps-shell <<_EOF
|
2014-03-22 11:31:42 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
XBPS_SRC_VERSION="$XBPS_SRC_VERSION"
|
|
|
|
|
|
|
|
. /etc/xbps/xbps-src.conf
|
|
|
|
|
2019-07-02 17:14:56 +00:00
|
|
|
PATH=/void-packages:/usr/bin
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2019-06-12 22:37:59 +00: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" \
|
2014-04-09 14:40:27 +00:00
|
|
|
PS1="[\u@$XBPS_MASTERDIR \W]$ " /bin/bash +h
|
2014-03-22 11:31:42 +00:00
|
|
|
_EOF
|
2019-06-12 22:37:59 +00:00
|
|
|
|
2014-04-09 14:40:27 +00:00
|
|
|
chmod 755 $XBPS_MASTERDIR/bin/xbps-shell
|
|
|
|
cp -f /etc/resolv.conf $XBPS_MASTERDIR/etc
|
2020-01-01 11:10:59 +00:00
|
|
|
return 0
|
2014-03-22 11:31:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
chroot_prepare() {
|
2014-04-09 14:40:27 +00:00
|
|
|
local f=
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2014-04-09 14:40:27 +00: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 11:31:42 +00:00
|
|
|
|
2021-01-10 08:24:40 +00: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.
|
|
|
|
if [ -f /usr/share/zoneinfo/UTC ]; then
|
|
|
|
tzfile=/usr/share/zoneinfo/UTC
|
|
|
|
mkdir -p $XBPS_MASTERDIR/usr/share/zoneinfo
|
|
|
|
cp /usr/share/zoneinfo/UTC $XBPS_MASTERDIR/usr/share/zoneinfo/UTC
|
|
|
|
ln -sf ../usr/share/zoneinfo/UTC $XBPS_MASTERDIR/etc/localtime
|
|
|
|
else
|
|
|
|
# Should never happen.
|
2021-01-22 15:51:30 +00:00
|
|
|
msg_warn "No local timezone configuration file created.\n"
|
2017-12-16 16:52:17 +00:00
|
|
|
fi
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2021-02-08 13:17:24 +00:00
|
|
|
for f in dev sys tmp proc host boot; do
|
2014-04-09 14:40:27 +00:00
|
|
|
[ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f
|
|
|
|
done
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2014-04-09 14:40:27 +00: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 11:31:42 +00:00
|
|
|
|
2014-04-09 14:40:27 +00:00
|
|
|
# Copy /etc/hosts from base-files.
|
|
|
|
cp -f $XBPS_SRCPKGDIR/base-files/files/hosts $XBPS_MASTERDIR/etc
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2014-04-09 14:40:27 +00:00
|
|
|
# Prepare default locale: en_US.UTF-8.
|
2018-02-20 14:35:35 +00:00
|
|
|
if [ -s ${XBPS_MASTERDIR}/etc/default/libc-locales ]; then
|
2020-07-28 14:09:54 +00:00
|
|
|
printf '%s\n' \
|
|
|
|
'C.UTF-8 UTF-8' \
|
|
|
|
'en_US.UTF-8 UTF-8' \
|
|
|
|
>> ${XBPS_MASTERDIR}/etc/default/libc-locales
|
2014-04-09 14:40:27 +00:00
|
|
|
fi
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2014-04-09 14:40:27 +00:00
|
|
|
touch -f $XBPS_MASTERDIR/.xbps_chroot_init
|
|
|
|
[ -n "$1" ] && echo $1 >> $XBPS_MASTERDIR/.xbps_chroot_init
|
2014-03-22 11:31:42 +00:00
|
|
|
|
2014-04-09 14:40:27 +00:00
|
|
|
return 0
|
2014-03-22 11:31:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
chroot_handler() {
|
2015-04-09 16:57:41 +00:00
|
|
|
local action="$1" pkg="$2" rv=0 arg= _envargs=
|
2014-04-09 14:40:27 +00: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 10:15:35 +00:00
|
|
|
[ -z "$action" -a -z "$pkg" ] && return 1
|
|
|
|
|
2014-11-10 10:57:46 +00:00
|
|
|
if [ -n "$IN_CHROOT" -o -z "$CHROOT_READY" ]; then
|
2015-01-04 11:14:14 +00:00
|
|
|
return 0
|
2014-11-08 10:07:40 +00:00
|
|
|
fi
|
2014-10-11 09:02:57 +00:00
|
|
|
if [ ! -d $XBPS_MASTERDIR/void-packages ]; then
|
|
|
|
mkdir -p $XBPS_MASTERDIR/void-packages
|
2014-04-09 14:40:27 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
case "$action" in
|
2020-01-26 09:41:12 +00:00
|
|
|
fetch|extract|patch|configure|build|check|install|pkg|bootstrap-update|chroot|clean)
|
2014-04-09 14:40:27 +00:00
|
|
|
chroot_prepare || return $?
|
|
|
|
chroot_init || return $?
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "$action" = "chroot" ]; then
|
2015-04-09 16:57:41 +00: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 17:56:14 +00:00
|
|
|
rv=$?
|
2014-04-09 14:40:27 +00:00
|
|
|
else
|
2019-07-07 07:04:12 +00:00
|
|
|
env -i -- PATH="/usr/bin:$PATH" SHELL=/bin/sh \
|
2015-09-15 06:15:13 +00:00
|
|
|
HOME=/tmp IN_CHROOT=1 LC_COLLATE=C LANG=en_US.UTF-8 \
|
2019-11-08 17:48:25 +00: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 22:28:40 +00:00
|
|
|
${FTP_RETRIES:+FTP_RETRIES="${FTP_RETRIES}"} \
|
2016-03-01 17:27:16 +00:00
|
|
|
SOURCE_DATE_EPOCH="$SOURCE_DATE_EPOCH" \
|
2020-04-21 15:52:38 +00:00
|
|
|
XBPS_GIT_REVS="$XBPS_GIT_REVS" \
|
2019-02-26 20:23:11 +00:00
|
|
|
XBPS_ALLOW_CHROOT_BREAKOUT="$XBPS_ALLOW_CHROOT_BREAKOUT" \
|
2020-12-08 00:12:40 +00:00
|
|
|
${XBPS_ALT_REPOSITORY:+XBPS_ALT_REPOSITORY=$XBPS_ALT_REPOSITORY} \
|
2015-04-09 16:57:41 +00:00
|
|
|
$XBPS_COMMONDIR/chroot-style/${XBPS_CHROOT_CMD:=uunshare}.sh \
|
|
|
|
$XBPS_MASTERDIR $XBPS_DISTDIR "$XBPS_HOSTDIR" "$XBPS_CHROOT_CMD_ARGS" \
|
2019-07-10 17:48:54 +00:00
|
|
|
/void-packages/xbps-src $XBPS_OPTIONS $action $pkg
|
2015-03-12 17:56:14 +00:00
|
|
|
rv=$?
|
2014-04-09 14:40:27 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
return $rv
|
2014-03-22 11:31:42 +00: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 10:15:35 +00: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 09:41:12 +00: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 10:15:35 +00:00
|
|
|
|
2020-01-26 09:41:12 +00: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 10:15:35 +00: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 14:14:30 +00: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
|
|
|
|
|
2020-01-04 07:59:10 +00:00
|
|
|
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
|
2020-01-08 15:51:57 +00:00
|
|
|
rm -f $confdir/*remote*
|
2020-01-04 07:59:10 +00:00
|
|
|
else
|
2020-01-30 14:14:30 +00:00
|
|
|
if [ -s "${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf" ]; then
|
|
|
|
# If per-architecture base remote repo config exists, use that
|
|
|
|
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}.conf \
|
|
|
|
$confdir/20-repository-remote.conf
|
|
|
|
else
|
|
|
|
# Otherwise use generic base for musl or glibc
|
|
|
|
local suffix=
|
|
|
|
case "$XBPS_MACHINE" in
|
|
|
|
*-musl) suffix="-musl";;
|
|
|
|
esac
|
|
|
|
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.conf \
|
|
|
|
$confdir/20-repository-remote.conf
|
|
|
|
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
|
|
|
|
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_MACHINE}-multilib.conf \
|
|
|
|
$confdir/22-repository-remote-multilib.conf
|
|
|
|
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 10:15:35 +00:00
|
|
|
fi
|
|
|
|
|
2020-10-12 17:53:51 +00: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 10:15:35 +00: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
|
|
|
|
# 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 15:51:57 +00:00
|
|
|
if [ "$XBPS_SKIP_REMOTEREPOS" ]; then
|
|
|
|
rm -f $crossconfdir/*remote*
|
|
|
|
else
|
2020-01-30 14:14:30 +00: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
|
|
|
|
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote-${XBPS_TARGET_MACHINE}.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 10:15:35 +00:00
|
|
|
$crossconfdir/20-repository-remote.conf
|
2020-01-30 14:14:30 +00:00
|
|
|
else
|
|
|
|
local suffix=
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
*-musl) suffix="-musl"
|
|
|
|
esac
|
|
|
|
install -Dm644 ${XBPS_DISTDIR}/etc/xbps.d/repos-remote${suffix}.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 10:15:35 +00:00
|
|
|
$crossconfdir/20-repository-remote.conf
|
2020-01-30 14:14:30 +00: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 10:15:35 +00:00
|
|
|
fi
|
2020-10-12 17:53:51 +00: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 10:15:35 +00:00
|
|
|
fi
|
|
|
|
|
2020-04-12 23:14:31 +00: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 10:15:35 +00: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-12 23:59:03 +00: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 10:15:35 +00: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-12 23:59:03 +00: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 10:15:35 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|