unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: Re: Tests failing on master
Date: Fri, 22 Nov 2019 00:16:17 +0200	[thread overview]
Message-ID: <m2y2w898pa.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87pnhqsmes.fsf@tethera.net>

On Sun, Nov 17 2019, David Bremner wrote:

> Yes, being root would break some of the tests, e.g. those that rely on
> removing permissions to generate an error. Probably we should just
> document that running the test suite as root is not supported? If
> someone can explain a good reason to run as root (maybe some odd
> auto-builder, the tests in question could probably be modified to do
> something more extreme (e.g. delete a file) rather than chmod.

Yes, rootless podman containers!

if I run e.g

  $ podman run --rm -it -v $HOME:$HOME -w $HOME/vc/ext/notmuch \
         notmuch-buildenv-debian10: /bin/zsh

  [root@e489c80816a9 notmuch]# id
  uid=0(root) gid=0(root) groups=0(root)

  [root@e489c80816a9 notmuch]# pwd
  /home/too/vc/ext/notmuch

  [root@e489c80816a9 build]# ls -l configure 
  -rwxr-xr-x. 1 root root 41920 Nov 17 21:00 configure

  [root@e489c80816a9 build]# exit

  $ ls -l $HOME/vc/ext/notmuch/configure
  -rwxr-xr-x. 1 too too 41920 Nov 17 23:00 /home/too/vc/ext/notmuch/configure

  $ podman unshare cat /proc/self/uid_map
  0       1000          1
  1     100000      65536


The last line, would have had same results if run inside container, tells
that uid 0 (root) inside container was mapped to uid 1000 (too) outside, 
on "host" side, and 1 uid was mapped, from uid 1 onwards in container,
uids are mapped starting from 100000 outside.

All that means, that I can do, without sudo, all kinds of things when 
using this container technology. Files owned by my uid outside container
are seen as owned by root inside container.

Since last spring, I've been gradually moving all things I used docker
to podman. And everything has (in my use cases) worked better. In Fedora
it just works (already). In Ubuntu 16.04 and RHEL 7.7 it also worked when
I tried, but lack of fuse-overlayfs makes it slow (to start) in these
systems. I hope every system in 2020 has good podman support...


All that long text written, I can take care notmuch tests can be run on
podman containers... 

>
> cheers,
>
> d

YEA,

Tomi

      reply	other threads:[~2019-11-21 22:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17 10:35 Tests failing on master Johan Parin
2019-11-17 11:49 ` Johan Parin
2019-11-17 12:43   ` David Bremner
2019-11-21 22:16     ` Tomi Ollila [this message]

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=m2y2w898pa.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).