All of lore.kernel.org
 help / color / mirror / Atom feed
From: Demi Marie Obenour <demiobenour@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>, Qu Wenruo <wqu@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: mkfs.btrfs reproducibility
Date: Thu, 16 Oct 2025 18:42:42 -0400	[thread overview]
Message-ID: <14681d38-fbdf-4ac2-93fa-7eba21588930@gmail.com> (raw)
In-Reply-To: <3247ee84-5a0d-4561-8d25-b1b8e180215a@gmx.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1561 bytes --]

On 10/15/25 02:49, Qu Wenruo wrote:
> 
> 
> 在 2025/10/15 16:31, Demi Marie Obenour 写道:
>> On 10/15/25 01:47, Qu Wenruo wrote:
>>> 在 2025/10/15 16:13, Demi Marie Obenour 写道:
>>>> I need to create a BTRFS filesystem where /home and /tmp are BTRFS
>>>> subvolumes owned by root.  It's easy to create the subvolumes with
>>>> --subvol and --rootdir, but they wind up being owned by the user that
>>>> ran mkfs.btrfs, not by root.  I tried using fakeroot and it doesn't
>>>> work, regardless of whether fakeroot and btrfs-progs come from Arch
>>>> or Nixpkgs.
>>>>
>>>> What is the best way to do this without needing root privileges?
>>>> Nix builders don't have root access, and I don't know if they have
>>>> access to user namespaces either.
>>>
>>> Not familiar with namespace but I believe we can address it with some
>>> extra options like --pid-map and --gid-map options, so that we can map
>>> the user pid/gid to 0:0 in that case.
>>>
>>> Thanks,
>>> Qu
>>
>> Thank you!  This would be awesome.  In the meantime I worked around
>> the issue by having systemd-tmpfiles fix up the permissions.
> 
> Mind to share some details? I believe this will help other users, and I 
> can add a short note into the docs.

I fixed the owner and permissions at startup.  This is not good
because it means that the image is not reproducible.

Is it possible for mkfs.btrfs to be reproducible, or should one run
mkfs.btrfs at install-time instead of shipping the BTRFS image?
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 7253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-10-16 22:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15  5:43 Setting owner and permissions of subvolumes in newly-created BTRFS filesystem Demi Marie Obenour
2025-10-15  5:47 ` Qu Wenruo
2025-10-15  6:01   ` Demi Marie Obenour
2025-10-15  6:49     ` Qu Wenruo
2025-10-16 22:42       ` Demi Marie Obenour [this message]
2025-10-16 22:50         ` mkfs.btrfs reproducibility Qu Wenruo
2025-11-28 18:06           ` Calvin Owens
2025-11-28 20:32             ` Qu Wenruo
2025-11-28 23:14               ` Calvin Owens

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=14681d38-fbdf-4ac2-93fa-7eba21588930@gmail.com \
    --to=demiobenour@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.com \
    /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.