From fb4838a591ce9e5abe1ddbead9d4e950515e69d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 9 Jun 2021 18:31:28 +0700 Subject: [PATCH] base-chroot: add tzdata Some packages require tzdata to testing, however, adding `tzdata` to those checkdepends will break masterdir, since `tzdata` provides `/usr/share/zoneinfo/UTC`, hence, it will be removed upon cleanup. Let's add `tzdata` into `base-chroot` and remove the shenanigan in `chroot.sh`. --- common/xbps-src/shutils/chroot.sh | 10 +--------- srcpkgs/base-chroot/template | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index c7ada315161..53e3d4a4c70 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -109,15 +109,7 @@ chroot_prepare() { # 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. - msg_warn "No local timezone configuration file created.\n" - fi + ln -sf ../usr/share/zoneinfo/UTC $XBPS_MASTERDIR/etc/localtime for f in dev sys tmp proc host boot; do [ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f diff --git a/srcpkgs/base-chroot/template b/srcpkgs/base-chroot/template index 5003e3c3724..599183f8c54 100644 --- a/srcpkgs/base-chroot/template +++ b/srcpkgs/base-chroot/template @@ -19,7 +19,7 @@ depends+=" patch sed findutils diffutils make gzip coreutils file bsdtar xbps mpfr ncurses libreadline8 chroot-bash chroot-grep chroot-gawk chroot-distcc - chroot-util-linux chroot-git" + chroot-util-linux chroot-git tzdata" if [ "$CHROOT_READY" ]; then depends+=" ccache"