DeveloperWiki talk:Building in a clean chroot

From ArchWiki
Latest comment: 8 August by Andrei Korshikov in topic Small style fixes

Deleting a chroot

It's not written in the page so I'll write it here: Just delete the $CHROOT folder (Unless it's btrfs). Tharbad (talk) 03:05, 12 May 2019 (UTC)Reply

(a) … and its corresponding .lock file (or am I missing something about pkgctl build?)
(b) even for BTRFS (see "Note about BTRFS subvolumes" topic)
-- Andrei Korshikov (talk) 03:25, 7 August 2024 (UTC)Reply

More info needed RE: archbuild

With the semi-recent changes to chroot building and the addition of the archbuild convenience script, using a custom repo within your build chroot is no longer supported. It is therefore required to create (or symlink) a pacman.conf to /usr/share/devtools/pacman-<some_name>.conf, and then run <some_name>-x86_64-build to build packages in a chroot that will have access to your custom repo.

For more background, see this reddit post and this response thread.

Terminalmage (talk) 01:39, 10 December 2019 (UTC)Reply

updating this comment from 2019... I think this page needs an update by someone more familiar with devtool package. Mainly a note about arch-nspawn usage/sideeffects over chroot. Gcb (talk) 09:35, 22 May 2024 (UTC)Reply

Note about BTRFS subvolumes

There is a note attached underneath the first `mkarchchroot` command that says:

On btrfs, the chroot is created as a subvolume, so you have to remove it by removing the subvolume by running btrfs subvolume delete $CHROOT/root as root.

According to this: https://wiki.archlinux.org/title/Btrfs#Deleting_a_subvolume , BTRFS subvolumes can just be removed normally with `rmdir` or `rm`. Should this note be removed? -- Saltedcoffii (talk) 13:29, 21 November 2022 (UTC)Reply

Yes, I'm also removing my BTRFS subvolumes with rm -rf or F8 button in Midnight Commander. -- Andrei Korshikov (talk) 03:26, 7 August 2024 (UTC)Reply

Adjusted mirrorlist can be over written when up dating the chroot

Quoting the end of 3.1 Setting up a chroot

Also adjust the mirrorlist in $CHROOT/root/etc/pacman.d/mirrorlist

Quoting the beginning of 3.2 Building in the chroot

Firstly, make sure the base chroot ($CHROOT/root) is up to date:
$ arch-nspawn $CHROOT/root pacman -Syu

Depending on the configuration, the adjusted mirrorlist can be over written when making sure the base chroot is up to date. Should the article point out the possible over write?

Regid (talk) 15:39, 18 March 2023 (UTC)Reply

Small style fixes

Could someone with edit rights pay attention to this article? PKGBUILD should be 'ic', and other topics are not so Arch core specific… What about moving this article into the ordinary wiki space? -- Andrei Korshikov (talk) 05:37, 8 August 2024 (UTC)Reply

The command pkgctl build is often refereed with vague sentences such as "the helper scripts" or "These helper scripts", instead of using vague sentences specifying the exact commands should be preferred. -- Fox2Code (talk) 20:38, 20 August 2024 (UTC +2)