I don't think this is true? At least not in the broader sense: if you
compile something on Debian, it will obviously get linked against
libraries and dependencies as they are in Debian.
Perhaps what you mean is that, given an entire separate sysroot-like
tree, passing the appropriate compiler and linker flags and
environment variables, you can use the local compiler we ship to build 'foreign' programs. That is true, but again it requires to set up the environment appropriately, including linker flags. And the caller
needs to ensure the environment, including linker flags, is
appropriate for the target environment (I guess 'host' environment, in
GNU parlance). Therefore, I don't think it would be unreasonable to
require that if the target environment is split-usr, then the caller
also needs to specify an appropriate
'-Wl,--dynamic-linker=/lib/ld-whatever' option.
as we all know every Debian maintainer can veto any systemic changes
that they do not like.
Actually merging /usr happened in a suboptimal way because I had to work around this lack of collaboration, so yes: this is true.as we all know every Debian maintainer can veto any systemic changesI don't think qusr-merge would not have happened if this was true. And
that they do not like.
I believe you know that very well.
Am 10.06.2023 um 07:35 schrieb Helmut Grohne:
One of the approaches to making bootstrapping work was adding the
symlinks to some data.tar. That has been category 2 from my earlier
mail. We definitely cannot add /bin as a directory to one package and
/bin as a symlink to another (unless using diversions), because the
resulting behaviour is dependent on the unpack order when used with
dpkg. Also any bootstrap tool that unpacks with tar -k (such as
debootstrap) requires changes to support this. So this pretty much
precludes completing the transition in a way that just unpacking all
data.tar of essential packages gives you a working chroot. In effect,
this requires a proposal to change the bootstrap protocol (category 4)
in order to make sense.
There is a loop hole that I ignored here. While /bin cannot be both a
directory and a symlink at the same time, we can upgrade it. So if we
somehow managed to get one and only one package to contain /bin as a
directory, we could upgrade that to a symlink.
I think the goal should be to get to this state eventually.
Unfortunately, any
external package that still ships stuff in /bin breaks this. In effect,
any addon repository or old package can break your system.
You lost me. We have converted /bin to a symlink already, have many
packages that ship files there and yet our systems do not break. Could
you please elaborate?
One of the approaches to making bootstrapping work was adding the
symlinks to some data.tar. That has been category 2 from my earlier
mail. We definitely cannot add /bin as a directory to one package and
/bin as a symlink to another (unless using diversions), because the
resulting behaviour is dependent on the unpack order when used with
dpkg. Also any bootstrap tool that unpacks with tar -k (such as
debootstrap) requires changes to support this. So this pretty much
precludes completing the transition in a way that just unpacking all
data.tar of essential packages gives you a working chroot. In effect,
this requires a proposal to change the bootstrap protocol (category 4)
in order to make sense.
There is a loop hole that I ignored here. While /bin cannot be both a directory and a symlink at the same time, we can upgrade it. So if we
somehow managed to get one and only one package to contain /bin as a directory, we could upgrade that to a symlink.
Unfortunately, any
external package that still ships stuff in /bin breaks this. In effect,
any addon repository or old package can break your system.
Hi Sven,
On Sat, Jun 10, 2023 at 08:35:44AM +0200, Sven Joachim wrote:
Unfortunately, any
external package that still ships stuff in /bin breaks this. In effect,
any addon repository or old package can break your system.
You lost me. We have converted /bin to a symlink already, have many
packages that ship files there and yet our systems do not break. Could
you please elaborate?
I'm sorry. I see how I am mixing up use cases all the time. What is
broken here is smooth upgrades (or package removal). Let me add detail.
dpkg has two kinds of filesystem resources. These are owned objects and shared objects. A regular file usually is owned by one and only one
package. A directory is often shared between multiple packages. A
regular file can also be shared between multiple (Multi-Arch: same)
instances of the same package. So whenever a package removes a shared
object from a package (due to upgrading or removing the package), dpkg
checks whether this shared object now is unreferenced. If that happens,
it actually deletes it from the filesystem.
So we kinda need to distinguish the actual filesystem view from the dpkg database view in this discussion. While the filesystem can now (since bookworm) be assumed to always have the symlinks, dpkg has a (shared)
object there. It doesn't track the type yet (though Guillem is
working[1] on that).
Now we imagine a situation where we managed to get past this transition somehow and the end state is that no package in trixie ships /bin other
than base-files, which ships it as a symlink.
Or maybe we finished the
transition by having no package ship /bin and we modified the bootstrap protocol to create the symlinks in another way.
There is two use cases that are at risk now:
* You have some old bookworm package around that still ships a file in
/bin. You no longer need this package and remove it. Since this was
the last package (on your system) to contain /bin (in data.tar), dpkg
observes that /bin can go away and deletes your symlink. Boom.
* You have some external repository that contains a package which still
ships something in /bin. At some point the vendor got the message
about moving files and moves them to /usr/bin and this - again - is
when your /bin symlink vanishes during the package upgrade.
My takeaway here is that while I see the protective diversion as the "obviously superior solution", this clearly is not consensus at this
time. It also means that when rewriting DEP 17, I need to spend quite a
bit of text on rationale. Thank you.
Unfortunately, any
external package that still ships stuff in /bin breaks this. In effect,
any addon repository or old package can break your system.
You lost me. We have converted /bin to a symlink already, have many
packages that ship files there and yet our systems do not break. Could
you please elaborate?
I would caution to avoid interpreting clarifying questions being asked
as dissent. It's good to ask questions and clarify details about
corner cases, but I wouldn't automatically write them down as
disagreement. At least that's my reading of recent parts of this
thread.
* Luca Boccassi <bluca@debian.org> [2023-06-10 19:54]:
I would caution to avoid interpreting clarifying questions being asked
as dissent. It's good to ask questions and clarify details about
corner cases, but I wouldn't automatically write them down as
disagreement. At least that's my reading of recent parts of this
thread.
This is also my understanding. And for the record, I want to
emphasize that I am very much in favor of the plan that Helmut came
up with, for a number of reasons:
[Full disclosure: I had a few in-person discussions with Helmut in
Hamburg last month, so I am probably somewhat biased by now.]
1. Helmut has shown experimentally that his transition plan can
work. There are always unknown unknowns, of course, but at the very
least, we do not have to break any use-cases intentionally.
2. The transition will leave us in a well-defined state post-trixie
without the need to add (and continue to maintain) any clutches
(or "special cases") for dpkg.
3. Almost all problematic cases can be dealt with by some black
magic in a single usrmerge-support package. It is not pretty, but it
will get the job done; a bunch of trickery to make dpkg do the Right
Thing despite its incomplete knowledge of aliased paths.
4. We will be able detect the few cases where the Right Thing does
not happen transparently, and we can even give advance warning to
affected package maintainers what they should and should not do. If
the maintainers of those packages pre-upload their transitioned
packages to experimental for some automated tests and verification,
we can avoid any breakage in unstable and testing.
Of course, you do not have to take my word for any of this. I am a
big fan of Helmut's approach with experimental verification and
data-driven discovery. Have a look at his published test scripts and
try to poke holes in them. The more people do this, the more
confidence we can have that this might actually work after all.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 01:56:12 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,581 |