All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Anthony PERARD <anthony.perard@vates.tech>
Cc: xen-devel@lists.xenproject.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH test-artifacts v3 03/13] Add debian rootfs artifact
Date: Wed, 15 Apr 2026 19:59:34 +0200	[thread overview]
Message-ID: <ad_SBvYvvFmOspSQ@mail-itl> (raw)
In-Reply-To: <ad97jcRfLG7nXk29@l14>

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

On Wed, Apr 15, 2026 at 11:50:38AM +0000, Anthony PERARD wrote:
> I'm commenting on changes I found in the branch used by the pipeline
> linked in the cover leter, since there's no copy on the mailing list of
> the patch :-( (overzealous spam filter).
> 
> > diff --git a/scripts/debian-rootfs.sh b/scripts/debian-rootfs.sh
> > new file mode 100755
> > index 000000000000..7cb8a96e39c0
> > --- /dev/null
> > +++ b/scripts/debian-rootfs.sh
> ...
> > +PKGS=(
> > +    # System
> > +    bridge-utils
> > +    dropbear
> > +    udev
> > +    systemd-sysv
> > +    iproute2
> > +    inetutils-ping
> > +    util-linux
> > +    cpio
> 
> Is `cpio` going to be used in dom0? The alpine rootfs don't have it.

Alpine does have it, via busybox. That said, I don't see it used in any
current test.

> > +# don't need persistent logging, avoid journal flush service
> > +rmdir var/log/journal
> 
> I think this would better be done with:
> 
>     cat >> /etc/systemd/journald.conf.d/storage.conf <<EOF
>     [Journal]
>     Storage=volatile
>     EOF
> 
> because I think systemd intend to change the behavior in future release,
> and we are more explicit with a config file.

+1 

> > +# Create rootfs
> > +cd /
> > +{
> > +    PATHS="bin etc home init lib lib64 mnt opt root sbin srv tmp usr var"
> > +    find $PATHS -print0
> > +    echo -ne "dev\0proc\0run\0sys\0"
> > +} | cpio -0 -H newc -o | gzip > "${COPYDIR}/rootfs.cpio.gz"
> 
> You should add "-R0:0" to the `cpio` command, like we do for the alpine
> rootfs.

Hm, I'm not sure if that's a good idea. There are a few intentionally
non-root files in Debian. Right now that is:

-rw-r-----   1 root     42            496 Apr  1 01:08 etc/gshadow
-rw-r-----   1 root     42            564 Apr  1 01:08 etc/shadow
-rw-r-----   1 root     42            444 Apr  1 01:08 etc/gshadow-
-rw-r-----   1 root     42            565 Apr  1 01:08 etc/shadow-
-rwxr-sr-x   1 root     42          31256 Apr 19  2025 usr/bin/expiry
-rwxr-sr-x   1 root     42         113848 Apr 19  2025 usr/bin/chage
-rwsr-xr--   1 root     printadm    51272 Mar  8  2025 usr/lib/dbus-1.0/dbus-daemon-launch-helper
-rwxr-sr-x   1 root     42          43256 Jun 29  2025 usr/sbin/unix_chkpwd
drwxr-xr-x   2 systemd- systemd-        0 Apr  1 01:08 var/lib/systemd/network
drwxr-xr-x   2 42       root            0 Apr  1 01:07 var/lib/apt/lists/auxfiles
drwx------   2 42       root            0 Apr  1 01:07 var/lib/apt/lists/partial
drwxrwsr-x   2 root     mem             0 Sep  8  2025 var/mail
-rw-rw-r--   1 root     43              0 Sep  8  2025 var/log/wtmp
-rw-rw-r--   1 root     43              0 Sep  8  2025 var/log/lastlog
-rw-rw----   1 root     43              0 Sep  8  2025 var/log/btmp
-rw-r-----   1 root     adm         31508 Apr  1 01:08 var/log/apt/term.log
drwx------   2 42       root            0 Apr  1 01:08 var/cache/apt/archives/partial

While it _might_ not explode right now if we reset it to root, it may
cause issues in the future (for example APT likes to run downloads as
unprivileged user, with write access only to
/var/lib/apt/lists/partial).

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-04-15 17:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31 23:21 [PATCH test-artifacts v3 00/13] Changes for several CI improvements Marek Marczykowski-Górecki
2026-03-31 23:21 ` [PATCH test-artifacts v3 02/13] Switch Linux builds to use Alpine 3.22 container Marek Marczykowski-Górecki
2026-04-01  6:46   ` Orzel, Michal
2026-04-01  6:58     ` Marek Marczykowski-Górecki
2026-05-03 21:21       ` Marek Marczykowski-Górecki
2026-03-31 23:21 ` [PATCH test-artifacts v3 04/13] Add linux-6.12.79-x86_64 Marek Marczykowski-Górecki
2026-04-15 11:56   ` Anthony PERARD
2026-04-15 12:27     ` Marek Marczykowski-Górecki
2026-03-31 23:21 ` [PATCH test-artifacts v3 05/13] Enable CONFIG_USB_RTL8152 in kernel for hw12 runner Marek Marczykowski-Górecki
2026-03-31 23:21 ` [PATCH test-artifacts v3 06/13] Include git in the ARM64 build container too Marek Marczykowski-Górecki
2026-03-31 23:21 ` [PATCH test-artifacts v3 07/13] Support building arbitrary Linux branch/tag/commit Marek Marczykowski-Górecki
2026-04-15 13:17   ` Anthony PERARD
2026-03-31 23:21 ` [PATCH test-artifacts v3 08/13] Save Linux config to artifacts too Marek Marczykowski-Górecki
2026-03-31 23:21 ` [PATCH test-artifacts v3 09/13] Add trigger-test job, to run test on a Linux built from a branch/tag Marek Marczykowski-Górecki
2026-04-15 13:44   ` Anthony PERARD
2026-04-15 17:40     ` Marek Marczykowski-Górecki
2026-04-22 15:36       ` Anthony PERARD
2026-03-31 23:22 ` [PATCH test-artifacts v3 10/13] Add linux-stubdom dependencies Marek Marczykowski-Górecki
2026-03-31 23:22 ` [PATCH test-artifacts v3 11/13] Prepare grub for booting x86_64 HVM domU from a disk Marek Marczykowski-Górecki
2026-03-31 23:22 ` [PATCH test-artifacts v3 12/13] Prepare grub for booting x86_64 HVM domU from a cdrom Marek Marczykowski-Górecki
2026-03-31 23:22 ` [PATCH test-artifacts v3 13/13] Setup ssh access to test systems Marek Marczykowski-Górecki
2026-04-16 14:53   ` Anthony PERARD
2026-04-15 11:50 ` [PATCH test-artifacts v3 03/13] Add debian rootfs artifact Anthony PERARD
2026-04-15 17:59   ` Marek Marczykowski-Górecki [this message]
2026-04-27 15:12     ` Anthony PERARD

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=ad_SBvYvvFmOspSQ@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.