Am Mittwoch, den 04.03.2020, 07:38 +0100 schrieb Johannes Schauer:
> Hi,
> 
> Quoting Benjamin Drung (2020-03-03 17:05:44)
> > Am Mittwoch, den 22.01.2020, 21:40 +0100 schrieb Johannes Schauer:
> > > Quoting Benjamin Drung (2020-01-22 13:23:36)
> > > > Am Mittwoch, den 22.01.2020, 13:13 +0100 schrieb Johannes
> > > > Schauer:
> > > > > Quoting Benjamin Drung (2020-01-22 12:58:38)
> > > > > > when I set TMPDIR to a directory that has mode 0755,
> > > > > > mmdebstrap
> > > > > > will fail:
> > > > > > 
> > > > > > ```
> > > > > > $ ls -ld .
> > > > > > drwxr-xr-x 3 bdrung bdrung 80 Jan 22 12:43 .
> > > > > > $ TMPDIR=$(pwd) mmdebstrap buster buster.tar.xz
> > > > > > I: automatically chosen mode: unshare
> > > > > 
> > > > > you are using the unshare mode. This means that your
> > > > > temporary
> > > > > directory needs
> > > > > to be accessible by the unshared user. Evidently it is not. I
> > > > > don't
> > > > > think there
> > > > > is anything that mmdebstrap can do about it.
> > > > 
> > > > mmdebstrap could create a temporary directory, change the mode
> > > > to
> > > > 1777 and
> > > > let unshare use that, couldn't it?
> > > 
> > > but that's not where the error comes from. From the output you
> > > posted
> > > in your
> > > report it seems like mmdebstrap is not able to create the
> > > temporary
> > > directory
> > > at all. Obviously it cannot change permissions of something that
> > > doesn't exist.
> > > I don't think mmdebstrap should attempt touching the permissions
> > > of
> > > the $TMPDIR
> > > directory.
> > 
> > From the log from the initial report:
> > 
> > I: using /tmpfs/foo/mmdebstrap.wYxMFPcZHA as tempdir
> > 
> > This directory is created and owned by unshared user. Afterwards
> > mmdebstrap tries to create another temporary directory in
> > /tmpfs/foo
> > (instead of /tmpfs/foo/mmdebstrap.wYxMFPcZHA) and fails.
> > 
> > I expect that mmdebstrap would succeed if it would create
> > additional
> > temporary directories in that initial
> > /tmpfs/foo/mmdebstrap.wYxMFPcZHA
> > directory.
> 
> ah, now I understood what you mean. The proper solution would not be
> to change
> its mode to 1777 but to change its owner to the unshared user in the
> same way
> as it is done for /tmpfs/foo/mmdebstrap.wYxMFPcZHA in your example.
> 
> But there is a simpler way. The only time that a temporary file is
> created as
> the unshare user is when the temporary apt.conf is created. That file
> could
> just be created in /tmpfs/foo/mmdebstrap.wYxMFPcZHA/tmp/ and the
> problem would
> be solved.
> 
> The only thing that still puzzles me is the output you pasted. If it
> was really
> the apt.conf failing, then the error should be "cannot open apt.conf:
> ..." but
> that's not in your output. I'm also puzzled by your line number 1178
> as that
> line has nothing useful over here.

I rerun my example using mmdebstrap from git master and it complained
about line 1185:

    my ($conf, $tmpfile) = tempfile(UNLINK => 1)
      or error "cannot open apt.conf: $!";

I don't know why it did not print "cannot open apt.conf" in this case.

-- 
Benjamin Drung

DevOps Engineer and Debian & Ubuntu Developer
Platform Integration (IONOS Cloud)

1&1 IONOS SE | Greifswalder Str. 207 | 10405 Berlin | Germany
E-mail: benjamin.dr...@cloud.ionos.com | Web: www.ionos.de

Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 24498

Vorstand: Dr. Christian Böing, Hüseyin Dogan, Dr. Martin Endreß, Hans-
Henning Kettler, Matthias Steinberg, Achim Weiß
Aufsichtsratsvorsitzender: Markus Kadelke


Member of United Internet

Diese E-Mail kann vertrauliche und/oder gesetzlich geschützte
Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat
sind oder diese E-Mail irrtümlich erhalten haben, unterrichten Sie
bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem
bestimmungsgemäßen Adressaten ist untersagt, diese E-Mail zu speichern,
weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu
verwenden.

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient of this e-mail, you are hereby
notified that saving, distribution or use of the content of this e-mail 
in any way is prohibited. If you have received this e-mail in error,
please notify the sender and delete the e-mail.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to