Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Your mode of life will be changed to ASCII.


computers / alt.os.linux.slackware / Re: chroot (overlayfs?)

SubjectAuthor
* chroot (overlayfs?)David Chmelik
`* Re: chroot (overlayfs?)Henrik Carlqvist
 +- Re: chroot (overlayfs?)#Paul
 `* Re: chroot (overlayfs?)David Chmelik
  +* Re: chroot (overlayfs?)Henrik Carlqvist
  |`- Re: chroot (overlayfs?)Henrik Carlqvist
  `- Re: chroot (overlayfs?)David Chmelik

1
chroot (overlayfs?)

<te9g0j$gic$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1375&group=alt.os.linux.slackware#1375

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!aioe.org!WGNCkrdwUCE2lg62qzBGXg.user.46.165.242.91.POSTED!not-for-mail
From: dchme...@gmail.com (David Chmelik)
Newsgroups: alt.os.linux.slackware
Subject: chroot (overlayfs?)
Date: Fri, 26 Aug 2022 03:51:47 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <te9g0j$gic$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="16972"; posting-host="WGNCkrdwUCE2lg62qzBGXg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
X-Notice: Filtered by postfilter v. 0.9.2
 by: David Chmelik - Fri, 26 Aug 2022 03:51 UTC

As a computer scientist/programmer (CS) whose first other OS in college
laboratories (labs) was UNIX/*BSD (official in *BSD documentation) I've
used chroot decades but avoid newer similar things especially if not on
UNIX. My only long-time chroot usage was using installers as 'liveCDs'.
The basic way was as below but recent years GNU/Linux mounts more & more
(some maybe needed for) liveCD-like usage has limits.

mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
chroot /mnt

Now I want to chroot to design/build packages but takes much space I heard
overlayfs saves/duplicates all bare OS space: how would one install
Slackware in chroot/overlayfs?

I used to discuss/ask about liveCD-like chroot but most/everyone entirely
ignored (what else you need to mount) and threads devolved off-topic
mentioning virtual machines & more & more containers (all overkill)...
sure, some containers may automate same but (I doubt are that simple and)
defeat purpose learning manual UNIX[-like] software so I no longer reply.

Re: chroot (overlayfs?)

<tecoa8$8t33$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1377&group=alt.os.linux.slackware#1377

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Henrik.C...@deadspam.com (Henrik Carlqvist)
Newsgroups: alt.os.linux.slackware
Subject: Re: chroot (overlayfs?)
Date: Sat, 27 Aug 2022 09:31:52 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <tecoa8$8t33$1@dont-email.me>
References: <te9g0j$gic$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 27 Aug 2022 09:31:52 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="8a505995bd910b84f08076639ef85cc9";
logging-data="291939"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YlGHaEYO+eMw+HW6Sz/vA"
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:wD79G1pf7Qff9YHxu8wTGgfL9kU=
 by: Henrik Carlqvist - Sat, 27 Aug 2022 09:31 UTC

On Fri, 26 Aug 2022 03:51:47 +0000, David Chmelik wrote:
> Now I want to chroot to design/build packages but takes much space I
> heard overlayfs saves/duplicates all bare OS space: how would one
> install Slackware in chroot/overlayfs?

I am not sure what you are trying to accomplish by building Slackware
packages in a chroot environment?

Slackware packages are really simple, they are just tar archives with the
contents of the package. Then there is a special install directory which
may contain a script doinst.sh which is run after the package has been
unpacked. That script typically copies some file settings.conf.new to
settings.conf only if the old file does not exist. That script is also
used to create symbolic links.

To modify a package, simply unpack the contents of the package in some
empty temporary directory, do the modifications you want and rebuild the
package with makepkg.

To create a new package from scratch, simply instead populate that empty
temporary directory before creating the package with makepkg. This way
you can easily create packages containing both applications and settings
like a custom /etc/rc.d/rc.local file. To create a package from scratch
in a reproducable way, write a slackbuild script. There are many example
scripts to start from in the Slackware source directory and from places
like slackbuilds.org.

If you want to create your packages without being root there is a utility
called fakeroot, it is not included in Slackware but is available at
slackbuilds.org. This allows normal users to create packages. However,
you will still of course need to be root to install packages.

If you for some reason want to do a complete Slackware installation
within a chroot environment I would instead suggest to do that in some
virtual machine like qemu.

regards Henrik

Re: chroot (overlayfs?)

<7tiqtixolf.ln2@threeformcow.myzen.co.uk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1379&group=alt.os.linux.slackware#1379

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!aioe.org!3GRggUvGWc6WgWU3JZzeYg.user.46.165.242.75.POSTED!not-for-mail
From: news20k....@threeformcow.myzen.co.uk (#Paul)
Newsgroups: alt.os.linux.slackware
Subject: Re: chroot (overlayfs?)
Date: Sat, 27 Aug 2022 23:36:55 +0100
Organization: Aioe.org NNTP Server
Message-ID: <7tiqtixolf.ln2@threeformcow.myzen.co.uk>
References: <te9g0j$gic$1@gioia.aioe.org> <tecoa8$8t33$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="7129"; posting-host="3GRggUvGWc6WgWU3JZzeYg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.27 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.2
 by: #Paul - Sat, 27 Aug 2022 22:36 UTC

Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> wrote:
> I am not sure what you are trying to accomplish by building Slackware
> packages in a chroot environment?

I've thought about it because there are a couple of slackbuilds
I submit to slackbuilds.org; building in a clean chroot would
help make sure they build ok on something less customised than
my main install - mainly so I don't miss dependencies.

#Paul

Re: chroot (overlayfs?)

<tef05e$h39$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1380&group=alt.os.linux.slackware#1380

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!aioe.org!WGNCkrdwUCE2lg62qzBGXg.user.46.165.242.91.POSTED!not-for-mail
From: dchme...@gmail.com (David Chmelik)
Newsgroups: alt.os.linux.slackware
Subject: Re: chroot (overlayfs?)
Date: Sun, 28 Aug 2022 05:58:07 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <tef05e$h39$1@gioia.aioe.org>
References: <te9g0j$gic$1@gioia.aioe.org> <tecoa8$8t33$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="17513"; posting-host="WGNCkrdwUCE2lg62qzBGXg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
X-Notice: Filtered by postfilter v. 0.9.2
 by: David Chmelik - Sun, 28 Aug 2022 05:58 UTC

On Sat, 27 Aug 2022 09:31:52 -0000 (UTC), Henrik Carlqvist wrote:
> On Fri, 26 Aug 2022 03:51:47 +0000, David Chmelik wrote:
>> Now I want to chroot to design/build packages but takes much space I
>> heard overlayfs saves/duplicates all bare OS space: how would one
>> install Slackware in chroot/overlayfs?
>
> I am not sure what you are trying to accomplish by building Slackware
> packages in a chroot environment?

Reason is 'clean environment'.

Re: chroot (overlayfs?)

<tefd4k$jfoo$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1381&group=alt.os.linux.slackware#1381

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Henrik.C...@deadspam.com (Henrik Carlqvist)
Newsgroups: alt.os.linux.slackware
Subject: Re: chroot (overlayfs?)
Date: Sun, 28 Aug 2022 09:39:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <tefd4k$jfoo$1@dont-email.me>
References: <te9g0j$gic$1@gioia.aioe.org> <tecoa8$8t33$1@dont-email.me>
<tef05e$h39$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Aug 2022 09:39:32 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="227e6d333903114b91b57373fc506599";
logging-data="638744"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DOYmHFtkgmkoOvLCc0Bcy"
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:iGxyCQst8Q3/v63NItnBEroXG7U=
 by: Henrik Carlqvist - Sun, 28 Aug 2022 09:39 UTC

On Sat, 27 Aug 2022 23:36:55 +0100, #Paul wrote:

> I've thought about it because there are a couple of slackbuilds I submit
> to slackbuilds.org; building in a clean chroot would help make sure they
> build ok on something less customised than my main install - mainly so I
> don't miss dependencies.

On Sun, 28 Aug 2022 05:58:07 +0000, David Chmelik wrote:

> Reason is 'clean environment'.

But then, you somehow need to keep your chroot environment clean. That
could be done by reinstalling every time you start to build a new package
or possibly with overlayfs. However, keeping a reference installation
clean is really easy in a virtualized environment like qemu which has the
-snapshot parameter. When qemu is started with -snapshot, no changes are
saved to the disk image file, instead all changes are kept only in RAM.
The next time qemu is started with the same disk image it will be back to
its reference state it got since the last time qemu was run without -
snapshot.

regards Henrik

Re: chroot (overlayfs?)

<tefe9i$jip6$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1382&group=alt.os.linux.slackware#1382

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: Henrik.C...@deadspam.com (Henrik Carlqvist)
Newsgroups: alt.os.linux.slackware
Subject: Re: chroot (overlayfs?)
Date: Sun, 28 Aug 2022 09:59:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <tefe9i$jip6$1@dont-email.me>
References: <te9g0j$gic$1@gioia.aioe.org> <tecoa8$8t33$1@dont-email.me>
<tef05e$h39$1@gioia.aioe.org> <tefd4k$jfoo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 28 Aug 2022 09:59:14 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="227e6d333903114b91b57373fc506599";
logging-data="641830"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186/RG0FncbJRnmcwowFnfZ"
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:YhXOZ5Aq+b2JlUpapNDiDxqYcvQ=
 by: Henrik Carlqvist - Sun, 28 Aug 2022 09:59 UTC

On Sun, 28 Aug 2022 09:39:32 +0000, Henrik Carlqvist wrote:
> When qemu is started with -snapshot, no changes are saved to the disk
> image file,

Also, if you make the disk image file readonly with something like

chmod a-w Slackware_reference.img

qemu will refuse to start without the -snapshot flag. With such a routine
you can trust that the image is in a reference state.

At some few occations you might want to do

chmod u+w Slackware_reference.img

and start qemu without -snapshot to apply the latest patches packages.
Before doing such a thing you might want to create a backup of the image
file. Once the installation is updated, be sure to do a clean shutdown
and then make it readonly again.

When running in snapshot mode you don't have to care about clean
shutdowns, you can simply close the qemu Window to "shutdown".

regards Henrik

Re: chroot (overlayfs?)

<teffce$h39$3@gioia.aioe.org>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1383&group=alt.os.linux.slackware#1383

  copy link   Newsgroups: alt.os.linux.slackware
Path: i2pn2.org!i2pn.org!aioe.org!WGNCkrdwUCE2lg62qzBGXg.user.46.165.242.91.POSTED!not-for-mail
From: dchme...@gmail.com (David Chmelik)
Newsgroups: alt.os.linux.slackware
Subject: Re: chroot (overlayfs?)
Date: Sun, 28 Aug 2022 10:17:50 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <teffce$h39$3@gioia.aioe.org>
References: <te9g0j$gic$1@gioia.aioe.org> <tecoa8$8t33$1@dont-email.me>
<tef05e$h39$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="17513"; posting-host="WGNCkrdwUCE2lg62qzBGXg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Pan/0.149 (Bellevue; 4c157ba git@gitlab.gnome.org:GNOME/pan.git)
X-Notice: Filtered by postfilter v. 0.9.2
 by: David Chmelik - Sun, 28 Aug 2022 10:17 UTC

On Sun, 28 Aug 2022 05:58:07 -0000 (UTC), David Chmelik wrote:

> On Sat, 27 Aug 2022 09:31:52 -0000 (UTC), Henrik Carlqvist wrote:
>> On Fri, 26 Aug 2022 03:51:47 +0000, David Chmelik wrote:
>>> Now I want to chroot to design/build packages but takes much space I
>>> heard overlayfs saves/duplicates all bare OS space: how would one
>>> install Slackware in chroot/overlayfs?
>>
>> I am not sure what you are trying to accomplish by building Slackware
>> packages in a chroot environment?
>
> Reason is 'clean environment'.

Actually I'd already done this but if you installed much extra overlayfs
isn't clean.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor