Github messages for voidlinux
 help / color / mirror / Atom feed
From: sternenseemann <sternenseemann@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
Date: Mon, 08 Feb 2021 14:21:29 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28584@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

There is a new pull request by sternenseemann against master on the void-packages repository

https://github.com/sternenseemann/void-packages chroot-prepare-tmp
https://github.com/void-linux/void-packages/pull/28584

xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
Missing $XBPS_MASTERDIR/tmp caused ca-certificates and glibc-locales to
fail in the reconfigure step of binary-bootstrap, since a call to mktemp
(which I couldn't locate in source though) assumed /tmp in the chroot
would be present already.

This issue was reproducible reliably for me on NixOS by doing something
like:

    rm -rf masterdir
    ./xbps-src binary-bootstrap

The workaround I found was:

    mkdir -p masterdir/tmp      # or alternatively ./xbps-src clean
                                # which also (re-)creates masterdir/tmp
    ./xbps-src binary-bootstrap

This workaround is now mirrored in chroot_prepare by ensuring that tmp
always exists.

A patch file from https://github.com/void-linux/void-packages/pull/28584.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-chroot-prepare-tmp-28584.patch --]
[-- Type: text/x-diff, Size: 1485 bytes --]

From 585f365973915beafd552ed7b357383ab945744f Mon Sep 17 00:00:00 2001
From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>
Date: Mon, 8 Feb 2021 14:17:24 +0100
Subject: [PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare

Missing $XBPS_MASTERDIR/tmp caused ca-certificates and glibc-locales to
fail in the reconfigure step of binary-bootstrap, since a call to mktemp
(which I couldn't locate in source though) assumed /tmp in the chroot
would be present already.

This issue was reproducible reliably for me on NixOS by doing something
like:

    rm -rf masterdir
    ./xbps-src binary-bootstrap

The workaround I found was:

    mkdir -p masterdir/tmp      # or alternatively ./xbps-src clean
                                # which also (re-)creates masterdir/tmp
    ./xbps-src binary-bootstrap

This workaround is now mirrored in chroot_prepare by ensuring that tmp
always exists.
---
 common/xbps-src/shutils/chroot.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh
index 2fc17f2ab54d..c7ada3151618 100644
--- a/common/xbps-src/shutils/chroot.sh
+++ b/common/xbps-src/shutils/chroot.sh
@@ -119,7 +119,7 @@ chroot_prepare() {
         msg_warn "No local timezone configuration file created.\n"
     fi
 
-    for f in dev sys proc host boot; do
+    for f in dev sys tmp proc host boot; do
         [ ! -d $XBPS_MASTERDIR/$f ] && mkdir -p $XBPS_MASTERDIR/$f
     done
 

             reply	other threads:[~2021-02-08 13:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 13:21 sternenseemann [this message]
2021-02-10  0:44 ` ericonr
2021-02-10  7:40 ` sgn
2021-02-11  5:07 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28584@inbox.vuxu.org \
    --to=sternenseemann@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).