Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
@ 2021-02-08 13:21 sternenseemann
  2021-02-10  0:44 ` ericonr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sternenseemann @ 2021-02-08 13:21 UTC (permalink / raw)
  To: ml

[-- 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
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
  2021-02-08 13:21 [PR PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare sternenseemann
@ 2021-02-10  0:44 ` ericonr
  2021-02-10  7:40 ` sgn
  2021-02-11  5:07 ` [PR PATCH] [Merged]: " ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-02-10  0:44 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/28584#issuecomment-776348229

Comment:
@sgn ok to merge? We had decided against this for some reason, but I'm ok with keeping it...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
  2021-02-08 13:21 [PR PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare sternenseemann
  2021-02-10  0:44 ` ericonr
@ 2021-02-10  7:40 ` sgn
  2021-02-11  5:07 ` [PR PATCH] [Merged]: " ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: sgn @ 2021-02-10  7:40 UTC (permalink / raw)
  To: ml

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

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/28584#issuecomment-776510597

Comment:
On 2021-02-09 16:44:27-0800, Érico Nogueira Rolim <notifications@github.com> wrote:
> @sgn ok to merge? We had decided against this for some reason, but I'm ok with keeping it...

I'm not against this.
I want to have the binary-bootstrap works regardless.

I think the root problem is somewhere in base-files.
However, I don't look hard into it.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
  2021-02-08 13:21 [PR PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare sternenseemann
  2021-02-10  0:44 ` ericonr
  2021-02-10  7:40 ` sgn
@ 2021-02-11  5:07 ` ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-02-11  5:07 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare
https://github.com/void-linux/void-packages/pull/28584

Description:
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-11  5:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 13:21 [PR PATCH] xbps-src: create $XBPS_MASTERDIR/tmp in chroot_prepare sternenseemann
2021-02-10  0:44 ` ericonr
2021-02-10  7:40 ` sgn
2021-02-11  5:07 ` [PR PATCH] [Merged]: " ericonr

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).