On 07/10/2020 08:53, Miroslav Suchý wrote:
> Dne 06. 10. 20 v 23:50 James Cassell napsal(a):
>> yum install --releasever=/ --installroot=/mnt/sysimage bash mypackage
> 
> This is naive approach. It does not setup: resolver, timezone, dbus uuid, 
> unpriv user, btrfs-control, special devices, etc.
> Yes, for most quick'n'dirty use cases you will not need it and the naive 
> approach will work. But it will hit you when
> you will not expect it.
> And it will not work when you are on RHEL7 and want to install Fedora 31 
> because of different payload of rpm.
> Mock solve all those things.


When using debootstrap, the user has to do some things manually, like
mounting /proc, /sys, /dev and /dev/shm

It is relatively easy to duplicate those things for both Fedora and
Debian chroots

Is Mock only intended for building things or the chroot created by Mock
can be considered a long-lived chroot for daily use?

Notice that daemons don't usually run from the chroot, all the desktop
and system daemons are running from the host OS.


>>> I create the chroots as Btrfs subvolumes, this gives the opportunity to
>>> create snapshots too.
>>>
>>> After testing this a bit, I'd like to document it some more for other
>>> people on the platform too.  I noticed some people losing time trying to
>>> compile things when they could potentially use upcoming versions of the
>>> packages.  Any feedback would be very welcome.
> 
> Mock supports LVM snapshots:
>   https://github.com/rpm-software-management/mock/wiki/Plugin-LvmRoot

With the move to Btrfs by default, is it possible that will be adapted?
 Or can people manually manage their snapshots on their preferred
storage platform?

>> The "fastest to get started" way to solve getting these chroots is to pull a 
>> container image and extract that.
> 
> https://github.com/rpm-software-management/mock/wiki/Feature-container-for-bootstrap
> But you still want to setup timezones, make sure the packages are updated 
> there, copy some files there... Mock does all
> of that.

Can you also clarify which container platform is being suggested?

To put all this in context, imagine the user is on Fedora 32, they saw
the thread about Thunderbird 78.2.1 "Unpleasant Surprise" from Fedora 33
and they want to run that in a chroot to see the impact on their profile
and plugins.  They could create the chroot using any of the methods
discussed, yum --installroot, Mock, container.  Maybe they want to
snapshot or fork their ~/.thunderbird profile but have access to their
regular ~/.gnupg setup.

This can be really useful for the type of problem discussed in
Thunderbird but it can also be useful for people on non-x86 platforms
who regularly need to test new versions of specific applications.

Regards,

Daniel
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org

Reply via email to