From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: The unshared changes give a problem with build after doing git pull on next
Date: Tue, 06 Aug 2024 16:40:39 +0100 [thread overview]
Message-ID: <2E52F538-68BC-48E5-8EF0-9407984B12F5@ipfire.org> (raw)
In-Reply-To: <184670fa-843f-4d5d-b4c9-1885a995fad8@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 6126 bytes --]
Hello,
We should not touch the mount propagation of the host’s namespace.
Instead, we should create our own mount namespace and that should be private.
You can however try to see what happens when you add —-propagation=slave to the first unshare command.
I just installed the plain Ubuntu Server, installed git, checkout out the repository, downloaded the toolchain and ran the build.
-Michael
> On 3 Aug 2024, at 12:22, Matthias Fischer <matthias.fischer(a)ipfire.org> wrote:
>
> On 03.08.2024 10:54, Michael Tremer wrote:
>> Hello Matthias,
>
> Hi Michael,
>
> just looked through https://man7.org/linux/man-pages/man1/unshare.1.html
> and ran 'findmnt -o+PROPAGATION' (see attachment).
>
> I don't know if this could help but does this differ from your test
> installation?
>
> Best
> Matthias
>
>>> On 3 Aug 2024, at 08:47, Matthias Fischer <matthias.fischer(a)ipfire.org> wrote:
>>>
>>> Hi Michael,
>>>
>>> [shortened some stuff]
>>>
>>> ...
>>>
>>>>>>>
>>>>>>> Being curious I tried to build 'next', but I always get the same error:
>>>>>>>
>>>>>>> ***SNIP***
>>>>>>> root(a)Devel64-1: /git/ipfire-2.x # ./make.sh build
>>>>>>> Packaged toolchain compilation
>>>>>>> Building IPFire
>>>>>>> stage2
>>>>>>> Jul 26 13:32:59: Building stage2 unshare: cannot change
>>>>>>> /git/ipfire-2.x/build_x86_64/proc filesystem propagation: Invalid argument
>>>
>>>>>> ...
>>>
>>>> It looks like you can simply update the kernel staying on the same release:
>>>>
>>>> https://ubuntu.com/security/livepatch/docs/livepatch/reference/kernels
>>>>
>>>> For 22.04 LTS, there is a Linux 6.8 image available.
>>>>
>>>> Could you check that and confirm that it fixes the mount propagation problem?
>>>
>>> Done.
>>>
>>> Current state is as follows:
>>>
>>> ***SNIP***
>>> ...
>>> root(a)Devel64-1: /git/ipfire-2.x # lsb_release -a
>>> No LSB modules are available.
>>> Distributor ID: Ubuntu
>>> Description: Ubuntu 22.04.4 LTS
>>> Release: 22.04
>>> Codename: jammy
>>> ...
>>> root(a)Devel64-1: /git/ipfire-2.x # uname -mrs
>>> Linux 6.8.0-39-generic x86_64
>>> ...
>>> ***SNAP***
>>>
>>> But when I try to build 'next' I get exactly the same error as
>>> before:
>>>
>>> ***SNIP***
>>> root(a)Devel64-1: /git/ipfire-2.x # ./make.sh build
>>> Packaged toolchain compilation
>>> Building IPFire
>>> stage2
>>> Aug 2 21:21:15: Building stage2 unshare: cannot change
>>> /git/ipfire-2.x/build_x86_64/proc filesystem propagation: Invalid argument
>>
>> Ah, this is good information. So it is not the kernel, it rather is Ubuntu handling something differently.
>>
>> I will have a look at this and get back to you.
>>
>>> ERROR: Downloading stage2
>>> [ FAIL ]
>>> Check /git/ipfire-2.x/log_x86_64/_build.ipfire.log for errors if
>>> applicable [ FAIL ]
>>> ***SNAP***
>>>
>>> Being curious, I commented line line 633 in 'make.sh'
>>> ("--mount-proc=${BUILD_DIR}/proc") => Building starts but fails during
>>> 'glib 2.77.0':
>>>
>>> ***SNIP***
>>> ...
>>> glib (2.77.0)
>>> [ 1:14 ][0/1011]
>>>
>>> [951/1374] Compiling C object gio/gio.p/gio-tool-tree.c.o
>>> [952/1374] Linking target gio/gio
>>> [953/1374] Compiling C object
>>> gio/gio-querymodules.p/gio-querymodules.c.o
>>> [954/1374] Linking target gio/gio-querymodules
>>> [955/1374] Compiling C object gio/gresource.p/gresource-tool.c.o
>>> [956/1374] Compiling C object
>>> gio/glib-compile-schemas.p/.._subprojects_gvdb_gvdb_gvdb-reader.c.o
>>> [957/1374] Linking target gio/gresource
>>> [958/1374] Compiling C object
>>> gio/glib-compile-schemas.p/.._subprojects_gvdb_gvdb_gvdb-builder.c.o
>>> [959/1374] Compiling C object
>>> gio/glib-compile-resources.p/.._subprojects_gvdb_gvdb_gvdb-reader.c.o
>>> [960/1374] Compiling C object
>>> gio/glib-compile-resources.p/.._subprojects_gvdb_gvdb_gvdb-builder.c.o
>>> [961/1374] Compiling C object
>>> gio/glib-compile-resources.p/glib-compile-resources.c.o
>>> [962/1374] Linking target gio/glib-compile-resources
>>> [963/1374] Compiling C object
>>> gio/tests/modules/libtestmodulea.so.p/test-module-a.c.o
>>> [964/1374] Compiling C object gio/gapplication.p/gapplication-tool.c.o
>>> [965/1374] Compiling C object gio/gsettings.p/gsettings-tool.c.o
>>> [966/1374] Linking target gio/tests/modules/libtestmodulea.so
>>> [967/1374] Generating gio/tests/plugin-resources.c with a custom command
>>> FAILED: gio/tests/plugin-resources.c
>>> /usr/src/glib-2.77.0/builddir/gio/glib-compile-resources
>>> --compiler=gcc --target=gio/tests/plugin-resources.c --sour
>>> cedir=/usr/src/glib-2.77.0/gio/tests --internal --generate-source
>>> --c-name _g_plugin ../gio/tests/test4.gresource.xml
>>> /usr/src/glib-2.77.0/builddir/gio/glib-compile-resources: error
>>> while loading shared libraries: libgio-2.0.so.0: can
>>> not open shared object file: No such file or directory
>>> [968/1374] Linking target gio/gapplication
>>> [969/1374] Compiling C object
>>> gio/glib-compile-schemas.p/glib-compile-schemas.c.o
>>> [970/1374] Linking target gio/gsettings
>>> [971/1374] Compiling C object
>>> gio/tests/modules/libtestmoduleb.so.p/test-module-b.c.o
>>> [972/1374] Compiling C object
>>> gio/tests/gdbus-overflow.p/gdbus-overflow.c.o
>>> [973/1374] Compiling C object gio/gdbus.p/gdbus-tool.c.o
>>> [974/1374] Compiling C object
>>> gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.so.p/meson-gener
>>> ated_.._objectmanager-gen.c.o
>>> ninja: build stopped: subcommand failed.
>>> make: *** [glib:75: /usr/src/log/glib-2.77.0] Error 1
>>> make: Leaving directory '/usr/src/lfs'
>>>
>>> ERROR: Building glib
>>> [ FAIL ]
>>> Check /git/ipfire-2.x/log_x86_64/_build.ipfire.log for errors if
>>> applicable [ FAIL ]
>>> ***SNAP***
>>>
>>> Best
>>> Matthias
>>
[-- Attachment #2: devels-propagation.txt --]
[-- Type: text/plain, Size: 3266 bytes --]
���root@Devel64-1: /git/ipfire-2.x # findmnt -o+PROPAGATION
TARGET SOURCE FSTYPE OPTIONS PROPAGATION
/ /dev/sda1 ext4 rw,relatime,errors=remount-ro shared
������/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime shared
��� ������/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime shared
��� ������/sys/fs/cgroup cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_rec shared
��� ������/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime shared
��� ������/sys/fs/bpf bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 shared
��� ������/sys/kernel/debug debugfs debugfs rw,nosuid,nodev,noexec,relatime shared
��� ������/sys/kernel/tracing tracefs tracefs rw,nosuid,nodev,noexec,relatime shared
��� ������/sys/fs/fuse/connections fusectl fusectl rw,nosuid,nodev,noexec,relatime shared
��� ������/sys/kernel/config configfs configfs rw,nosuid,nodev,noexec,relatime shared
������/proc proc proc rw,nosuid,nodev,noexec,relatime shared
��� ������/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxprot shared
��� ������/proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime shared
������/dev udev devtmpfs rw,nosuid,relatime,size=8120872k,nr_inodes=2030218,mo shared
��� ������/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 shared
��� ������/dev/shm tmpfs tmpfs rw,nosuid,nodev,inode64 shared
��� ������/dev/mqueue mqueue mqueue rw,nosuid,nodev,noexec,relatime shared
��� ������/dev/hugepages hugetlbfs hugetlbfs rw,relatime,pagesize=2M shared
������/run tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,size=1628828k,mode=75 shared
������/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k,inode64 shared
������/run/credentials/systemd-sysusers.service
��� ramfs ramfs ro,nosuid,nodev,noexec,relatime,mode=700 shared
������/run/user/0 tmpfs tmpfs rw,nosuid,nodev,relatime,size=1628824k,nr_inodes=4072 shared
next parent reply other threads:[~2024-08-06 15:40 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <184670fa-843f-4d5d-b4c9-1885a995fad8@ipfire.org>
2024-08-06 15:40 ` Michael Tremer [this message]
2024-08-08 12:09 ` Adolf Belka
2024-08-08 18:25 ` Adolf Belka
2024-08-08 18:31 ` Michael Tremer
[not found] <cea14eb2-46f3-424b-8e54-aa9df10c78e3@ipfire.org>
2024-08-16 15:35 ` Michael Tremer
2024-08-16 16:43 ` Matthias Fischer
2024-08-21 14:28 ` Michael Tremer
2024-08-24 8:33 ` Matthias Fischer
2024-08-27 10:01 ` Michael Tremer
2024-08-27 12:55 ` Matthias Fischer
2024-08-27 18:03 ` / /
2024-08-28 15:46 ` Michael Tremer
2024-08-28 16:02 ` / /
2024-08-28 16:30 ` Matthias Fischer
2024-08-28 17:52 ` Adolf Belka
2024-08-28 18:28 ` Matthias Fischer
2024-08-28 19:10 ` Adolf Belka
2024-08-28 19:13 ` Adolf Belka
2024-08-29 7:46 ` Michael Tremer
2024-08-29 0:07 ` sio /
2024-08-29 7:58 ` Michael Tremer
2024-08-29 12:00 ` sio /
2024-08-29 12:17 ` Michael Tremer
2024-08-29 7:41 ` Michael Tremer
2024-08-29 7:41 ` Michael Tremer
2024-08-29 7:39 ` Michael Tremer
2024-08-30 8:56 ` Matthias Fischer
[not found] <9259926f-7276-450e-9a82-44b3c455f67e@ipfire.org>
2024-08-03 8:54 ` Michael Tremer
2024-08-03 9:39 ` Michael Tremer
[not found] <2e6a45cb-7c55-4725-81f2-d69f0c7b373f@ipfire.org>
2024-08-02 18:13 ` Michael Tremer
2024-07-26 7:57 Adolf Belka
2024-07-26 8:17 ` Michael Tremer
2024-07-26 8:35 ` Adolf Belka
2024-07-26 12:39 ` Adolf Belka
2024-07-26 13:05 ` Michael Tremer
2024-07-26 14:08 ` Matthias Fischer
2024-07-26 14:18 ` Michael Tremer
2024-07-26 15:06 ` Matthias Fischer
2024-07-26 15:08 ` Michael Tremer
2024-08-02 17:50 ` Michael Tremer
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=2E52F538-68BC-48E5-8EF0-9407984B12F5@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox