|
|
Subscribe / Log in / New account

Fedora's modularity mess

By Jonathan Corbet
November 21, 2019
Fedora's Modularity initiative has been no stranger to controversy since its inception in 2016. Among other things, there were enough problems with the original design that Modularity went back to the drawing board in early 2018. Modularity has since been integrated with both the Fedora and Red Hat Enterprise Linux (RHEL) distributions, but the controversy continues, with some developers asking whether it's time for yet another redesign — or to abandon the idea altogether. Over the last month or so, several lengthy, detailed, and heated threads have explored this issue; read on for your editor's attempt to integrate what was said.

The core idea behind Modularity is to split the distribution into multiple "streams", each of which allows a user to follow a specific project (or set of projects) at a pace that suits them. A Fedora user might appreciate getting toolchain updates as soon as they are released upstream while sticking with a long-term stable release of LibreOffice, for example. By installing the appropriate streams, this sort of behavior should be achievable, allowing a fair degree of customization.

Much of the impetus — and development resources — behind Modularity come from the RHEL side of Red Hat, which has integrated Modularity into the RHEL 8 release as "Application Streams". This feature makes some sense in that setting; RHEL is famously slow-moving, to the point that RHEL 7 did not even support useful features like Python 3. Application Streams allow Red Hat (or others) to make additional options available with support periods that differ from that of the underlying distribution, making RHEL a bit less musty and old, but only for the applications a specific user cares about.

The use case for Modularity in Fedora is arguably less clear. A given Fedora release has a support lifetime of 13 months, so there are limits to the level of stability that it can provide. But there is still clearly an appetite for Modularity; Fedora leader Matthew Miller articulated three goals during one of the threads:

1. Users should have alternate streams of software available.

2. Those alternate streams should be able to have different lifecycles.

3. Packaging an individual stream for multiple outputs should be easier than before.

Thus far, it is far from clear that any of those goals have been met. In particular, there are few modules in Fedora with multiple streams, and the lifecycles of modules are required, by policy, to line up with a Fedora release. But that is just the beginning of the problems for Modularity in Fedora.

The trouble with Modularity

The list of complaints being raised against Modularity is long; some of them were described by Modularity developer Stephen Gallagher in a thread dedicated to that purpose. Covering them all would create a long article indeed, so only a few of them will be discussed here.

The first of those, and the immediate cause of at least one of the longer mailing list threads, has to do with how modules interact with upgrades of the distribution itself. One of the policy decisions behind Modularity states that once users pick a particular stream, they will not be moved to a different one. That plays poorly with upgrades, though, where some streams are discontinued and others pick up; the result may be blocked upgrade operations and irritated users.

Consider the case of libgit2, which is packaged as a module in Fedora 30. Some module maintainers also make non-modular packages available (in an unbearable bit of jargon, these are sometimes called "ursine packages" because they are "bare"), but that is not the case for libgit2. When the DNF tool is given a request to install one of these module-only packages (perhaps as a dependency for the package the user really wants), it will silently install the module, giving users a system with Modularity without their explicit wish and, probably, knowledge.

In this case, a Fedora 30 user installing a package with a dependency on libgit2 would end up getting the libgit2 module, on the 0.28 stream. That stream, however, does not exist in Fedora 31, so any dependencies on libgit2 will not be satisfiable and the upgrade fails. There is an ursine libgit2 package in Fedora 31, but once a module is installed, there is no provision for moving a system back to a non-modular version, so it could not be used.

This was a rather late and unpleasant surprise as the project was trying to get the Fedora 31 release together. The initial solution that was arrived at was to have the upgrade process print out a URL at the beginning to indicate where affected users could find information on how to fix their systems. This struck some developers as being less than fully user-friendly so, after further discussion, another solution was adopted: a rather inelegant hack to DNF that would forcibly reset the stream for libgit2 when upgrading to Fedora 31. This violates the "no stream changes" policy and it clearly is not a sustainable solution going forward, but it got the project past the problem for now.

One of the promises that came with Modularity was that users would not have to deal with it if they didn't want to. It has become increasingly clear, though, that this promise cannot be kept, for a number of reasons. The existence of module-only packages is one of those, along with the inability to revert back to a non-modular version once a given module is installed. Once a package goes module-only, any other package that depends on it must also make that transition, forcing some developers to create and maintain modules whether they want to or not. These problems have led some community members, such as Kevin Kofler, to suggest that module-only packages should be banned, as should modules for anything but leaf packages that no others depend on.

Then, there is the issue of buildroot-only modules. Fedora's use of "buildroot" does not refer to the Buildroot buildsystem; instead, it describes the environment in which packages and modules are built. A buildroot-only module is one that is created solely for the purpose of building another module in the buildroot environment; it is not shipped as part of the distribution itself. The idea behind these modules is to make life easier for packagers to deal with dependencies that are not available in Fedora; they can use a buildroot-only module to embed that dependency in their module without having to support it for other users of the distribution.

The problem with buildroot-only modules is that they make it difficult (if not impossible) for others to rebuild a module themselves. The process of rebuilding a module in general is rather more involved than building from a source RPM package. Buildroot-only modules make things far worse by hiding away the dependencies that were used to build the original module. The result, according to Kofler, "contradicts both the transparency expected from a community-developed project and the self-hosting expectations". Or, as Stephen Smoogen put it:

I find however that modularity is being used as a tool to weld parts of the engine away and it drives me bonkers. I can't just take a bunch of rpms from download.fedoraproject.org and rebuild them with some options to get what I want.

For an extreme example, see this post from Neal Gompa, describing why it is essentially impossible to rebuild Rust modules in Fedora 30. Among other things, those modules build with a private module containing a special version of RPM, so the source packages they create don't work on the target distribution.

Is it all worth it?

Given the difficulties, it is not entirely surprising that there have been some calls for Fedora to drop the Modularity initiative entirely. Simo Sorce, for example, asked whether it would be better just to use containers for the use cases targeted by Modularity. Gallagher responded that "one of the main points of Modularity is to provide a trusted source of software to install into containers". Daniel Mach, one of the Modularity developers, argued that containers can't solve all of the problems, and that Modularity is needed for the reliable provisioning of containers in the first place. He also worried that some of the problems with Modularity cannot be fixed without massive changes, though.

While others might like to see the end of Modularity, its total removal is not something many developers are actively arguing for. That may be because they realize that it is unlikely to go away regardless of what they think. As Gompa put it: "because it's in RHEL now, no one can afford to let it fail". Gompa also said, though, that "while it is a hard problem to solve, it's a worthy one" and lamented that the Fedora project lacks the infrastructure resources it needs to implement this idea properly. Miller said that the problem is "a fundamental one we need to solve in order to continue to be relevant not just as an upstream for RHEL but in general". So the project is unlikely to walk away from Modularity at this time.

Modularity 3.0?

Over the course of these discussions, a number of approaches for addressing at least some of these problems have been raised. One of those is to do what the project has already done once: drop the current Modularity implementation and design a new one. Adam Williamson, for example, stated that it was a mistake to deploy this version of Modularity into RHEL 8, but that "inventing new stuff is hard" and that is how we learn:

We just need to hold our noses and fix the icky problems, and then sit down and think about the design issues that have become apparent in Modularity v2 through our actually implementing it and using it (which is what Fedora is for, remember!) and figure out how to address them in Modularity v3.

Robbie Harwood asserted that "starting from scratch should be an option". Gallagher replied that there would be no fundamental redesign of Modularity, though. He pointed out that development on Modularity is funded by Red Hat, and the developers so funded are committed to supporting the current Modularity implementation in RHEL 8. "A full redesign in Fedora is not realistically possible with the people and resources we have available to us while also maintaining the current implementation for ten years". Instead, he said, the focus will be fixing problems in the current implementation.

Miller also stated his support for the current Modularity effort:

But the team in Fedora actually working on Modularity today includes some pretty smart, very invested Fedora people and I don't feel bad at all about standing up for their wanting to continue to refine the path they've chosen and are working on.

He suggested that if others want to see a fundamental redesign of Modularity, they should work on creating it and the results could be evaluated once a prototype exists.

Fixing Modularity 2.0

With regard to the upgrade issue, there are a few ideas in circulation. One of those is, as mentioned before, to disallow module-only packages from Fedora. That seems unlikely to fly, though, for a couple of reasons. Gallagher pointed out that converting module-only packages back would be difficult at best, especially for those that rely on buildroot-only modules. Forcing packagers to create both modules and ursine packages would add to their workload, which could cause some of them to leave the project. Smoogen noted that the number of packagers is already in decline; developers will be leery of changes that could accelerate that trend.

Miro Hrončok suggested that the solution to upgrades is to make the default stream for modules behave like an ordinary package. He quickly followed up with a grumpy note after the Modularity maintainers voted not to pursue that idea, saying instead that they would "implement a mechanism of following default streams to give people the experience they want". In other words, users will be left dealing with modules whether they want them or not, and the proposed solution leaves many feeling less than entirely happy.

The current round of discussions was actually touched off by this proposal from Gallagher on how to handle the update problem. It involved a complex set of module states meant to record the user's "intention" for a module, along with rules for state transitions. In short, it would allow a module that was installed as a dependency to switch to a new stream if the depending module changed.

Later, Gallagher posted an alternative proposal involving a new "upgrades:" attribute on modules that would specify a stream name. A module tagged in this way would, during a system upgrade, replace the current stream if it matches the given name (and if a few other conditions are met). Neither proposal was received all that well; to quote Zbigniew Jędrzejewski-Szmek:

The first form of the proposal was already staggeringly complex — "default", "dep_enabled", "default_enabled", "default", …. Recording user intent when the users interacts directly with the thing might be OK, but mapping that intent onto dependencies that are pulled in automatically is not something that can be well defined. My expectation is that we'd forever be fighting broken expectations and unexpected cases.

But the amended proposal actually makes things *worse*, even more complex. We would have two parallel sets of dependency specifications: on the rpms level and on the module level. The interactions between them would be hard to understand for users.

In short, the project does not yet have any sort of convincing answer for the upgrade problem. That, in turn, suggests that these discussions are far from done.

With regard to the problem of the one-way transition to Modularity, Gallagher said that the problem is being looked into. Reverting to an ursine package is something that would be useful in a number of situations, he said. "We haven't figured this one out yet, but it's on the queue."

With regard to modular dependencies forcing other packages to turn into modules: the current proposal is to change the rules so that the non-modular buildroot can contain module streams. This plan, dubbed "Ursa Prime", would make dependencies available for other packages to build on without those packages having to be modules themselves. The November 11 meeting of the Fedora Engineering Steering Committee approved Ursa Prime for the Fedora 32 release, though it will start with only two modules. Not everybody is at ease with this plan, but this test will at least show how it will work in practice.

Buildroot-only modules are another outstanding problem. They are included in a set of requirements for Modularity posted by Gallagher: "Build-time only dependencies for an alternative version may be excluded from the installable output artifacts". Many developers would like to ban them as being fundamentally incompatible with how Fedora is supposed to work, but there is a tradeoff: as Smoogen pointed out, an alternative to modules using buildroot-only dependencies may be the removal of those modules altogether. Still, that may well be a price that many in the Fedora project are willing to pay.

Inventing new stuff is hard

Established Linux distributions tend to have a following of longtime users who are often hostile to fundamental changes. Those who have adopted a solution because it works, and who have since found ways of dealing with the parts that don't work as well, tend not to react well if others want to come in and shake things up. That is one reason why any big change in the free-software world tends to be accompanied by interminable mailing-list threads.

Distributors, though, have reason to worry about their relevance in a changing world. Software distribution has changed considerably since the 1990s, when many of the organizing principles behind most Linux distributions were laid down. A failure to change along with the wider industry and provide features that new users want is not likely to lead to good results in the long run. So it is not surprising that distributions like Fedora are experimenting with ideas like Modularity; they have to do that to have a chance of remaining relevant in the future.

Incorporating such changes can create pain for users, but that does not always mean that the changes are fundamentally bad. Those of us who lived through the ELF transition might have been happy to live with a.out forever, but that would not have been good for Linux as a whole. One of the truths of software development is that it is often impossible to see all the consequences of a change before implementing it. The value of free software is that we can implement those changes, see where things don't work, and fix them. The downside is that we have to live through the "see where things don't work" phase of the process.

Fedora is deeply within that stage when it comes to Modularity. Since it's a free-software project, all of the difficulties with Modularity are being exposed in a highly public way. But, for the same reasons, those problems are being noted and effort is going into proposing solutions. Eventually, the Fedora project will figure out how Modularity fits into its distribution and how to make it all work well. Users may wonder someday how they ever did without it. But there will be a lot of emails produced between now and then.


to post comments

Fedora's modularity mess

Posted Nov 21, 2019 21:23 UTC (Thu) by Rudd-O (guest, #61155) [Link] (11 responses)

> (in an unbearable bit of jargon, these are sometimes called "ursine packages" because they are "bare")

Hm.

Fedora's modularity mess

Posted Nov 21, 2019 22:07 UTC (Thu) by epa (subscriber, #39769) [Link] (2 responses)

One setup is too modular. The other is too monolithic. Can Fedora come up with a scheme that is just right?

Fedora's modularity mess

Posted Nov 22, 2019 4:34 UTC (Fri) by Rudd-O (guest, #61155) [Link]

dnf install -y justright

Fedora's modularity mess

Posted Nov 22, 2019 18:40 UTC (Fri) by error27 (subscriber, #8346) [Link]

Yes, some kind of a Masha up where it's the best of both worlds.

Fedora's modularity mess

Posted Nov 22, 2019 0:23 UTC (Fri) by bobsol (subscriber, #54641) [Link] (3 responses)

Very nice.

Fedora's modularity mess

Posted Nov 22, 2019 4:34 UTC (Fri) by Rudd-O (guest, #61155) [Link] (2 responses)

I truly like LWN's editorial writing touches. It's always music to my ears. This is why I am joyous to pay money every year.

Fedora's modularity mess

Posted Nov 25, 2019 8:35 UTC (Mon) by bkircher (guest, #131764) [Link]

This. Thanks so much LWN for bringing a bit of sense and perspective to this mess.

Fedora's modularity mess

Posted Nov 25, 2019 15:50 UTC (Mon) by JFlorian (guest, #49650) [Link]

Indeed. I gave up trying to follow the ML and just *knew* that LWN would get after this eventually. Not disappointed. The wait was short and this gave a good overview.

Fedora's modularity mess

Posted Nov 22, 2019 17:25 UTC (Fri) by mattdm (subscriber, #18) [Link] (3 responses)

We've tried to kill this particular bit of jargon but it's ... somewhat tenacious.

Fedora's modularity mess

Posted Nov 22, 2019 18:40 UTC (Fri) by JamesErik (subscriber, #17417) [Link] (2 responses)

Sounds like a bear!

Fedora's modularity mess

Posted Nov 25, 2019 9:51 UTC (Mon) by amacater (subscriber, #790) [Link] (1 responses)

Finding the right terminology is always a grisly business ...

Fedora's modularity mess

Posted Dec 12, 2019 20:21 UTC (Thu) by Wol (subscriber, #4433) [Link]

Especially when you have polar opposites

Cheers,
Wol

Fedora's modularity mess

Posted Nov 22, 2019 0:27 UTC (Fri) by mxmehl (guest, #104271) [Link]

> One of the truths of software development is that it is often impossible to see all the consequences of a change before implementing it. The value of free software is that we can implement those changes, see where things don't work, and fix them. The downside is that we have to live through the "see where things don't work" phase of the process.
>
> Fedora is deeply within that stage when it comes to Modularity. Since it's a free-software project, all of the difficulties with Modularity are being exposed in a highly public way. But, for the same reasons, those problems are being noted and effort is going into proposing solutions.

Besides all the nitpicks, this is what makes even potential failures a gain for everyone in the Free Software community. Thanks for putting it in so nice words, Jonathan!

Fedora's modularity mess

Posted Nov 22, 2019 5:03 UTC (Fri) by tome (subscriber, #3171) [Link] (9 responses)

> There is an ursine libgit2 module in Fedora 31

Shouldn't that be "an ursine libgit2 package"?

Fedora's modularity mess

Posted Nov 22, 2019 7:11 UTC (Fri) by smurf (subscriber, #17840) [Link] (5 responses)

That's a typo-level error and thus should be reported via email.

Fedora's modularity mess

Posted Nov 22, 2019 17:26 UTC (Fri) by tome (subscriber, #3171) [Link] (4 responses)

Sorry about polluting the comments with a typo report. I did briefly look for but couldn't find the email address to send it to.

Fedora's modularity mess

Posted Nov 22, 2019 19:07 UTC (Fri) by rgmoore (✭ supporter ✭, #75) [Link] (3 responses)

Maybe there should be an added "report a minor error" button at the bottom of the article near the "Receive comments by email" and "Post a comment" buttons.

Fedora's modularity mess

Posted Nov 23, 2019 14:33 UTC (Sat) by tome (subscriber, #3171) [Link] (2 responses)

For future reference report minor errors to lwn@lwn.net. This isn't the first time I've done this the wrong way. I could not find the email addr in LWN's UI, nor via LWN's search facility. I finally found it with google, which led me to a response to my own comment posting of a typo in February of this year. Maybe it's just me :-(.

Typo reporting

Posted Nov 23, 2019 14:42 UTC (Sat) by jake (editor, #205) [Link] (1 responses)

Also perhaps of interest is that it is prominently noted above every comment editing form:

Please do NOT post typos in the article as comments, send them to lwn@lwn.net instead.

jake

Typo reporting

Posted Nov 23, 2019 15:17 UTC (Sat) by tome (subscriber, #3171) [Link]

Holy moly, never saw that. It's bold even. Thanks Jake.

Fixed

Posted Nov 22, 2019 14:14 UTC (Fri) by corbet (editor, #1) [Link] (2 responses)

Yes, it should have been "package", please bear with us while we fix it.

Fixed

Posted Nov 23, 2019 14:47 UTC (Sat) by mebrown (subscriber, #7960) [Link]

I see what you did there.

Fixed

Posted Dec 5, 2019 22:20 UTC (Thu) by kmweber (guest, #114635) [Link]

In the meantime, we'll just have to grin and bear it?

Fedora's modularity mess

Posted Nov 22, 2019 14:05 UTC (Fri) by cesarb (subscriber, #6266) [Link] (3 responses)

IMHO, once I have installed the default stream for some package (because I didn't care to specify a version), what I want is the default stream for that package, not whatever version happened to be the default stream when I installed it. That is, once the default moves to a new version, I want my install to follow along to that new version.

Fedora's modularity mess

Posted Nov 25, 2019 18:45 UTC (Mon) by langdonwhite (guest, #88731) [Link] (2 responses)

Most (if not all) of the Modularity Team members agree with you. However, that is not the way it is implemented in dnf at the moment.

Fedora's modularity mess

Posted Nov 26, 2019 9:40 UTC (Tue) by jafd (subscriber, #129642) [Link] (1 responses)

It almost sounds as if the Modularity Team and the DNF committers live in two distinct ivory towers, perhaps a continent apart.

Fedora's modularity mess

Posted Nov 28, 2019 2:47 UTC (Thu) by Conan_Kudo (subscriber, #103240) [Link]

Oi, ain't that the truth...

Fedora's modularity mess

Posted Nov 22, 2019 14:16 UTC (Fri) by basmevissen (guest, #54935) [Link]

Modularity of libgit2 was not only a mess with upgrading to Fedora 31, but already during the Fedora 30 lifetime. See https://bugzilla.redhat.com/show_bug.cgi?id=1717117 for example. It broke the update mechanism of people who had no modules/streams/whatever installed.

Fedora's modularity mess

Posted Nov 22, 2019 17:46 UTC (Fri) by mattdm (subscriber, #18) [Link] (3 responses)

> The use case for Modularity in Fedora is arguably less clear. A given Fedora release has a support lifetime of 13 months, so there are limits to the level of stability that it can provide.

Going past that limit is exactly the intended benefit; if someone wants to maintain a "slow" stream with a lifecycle of, say, 25 or 37 months, Modularity should provide a way to express that.

Remember, there are already many cases in Fedora where we already *have* a slow stream (a set of packages built for EPEL which are updated conservatively) and a fast stream (packages built for the Fedora releases updated every six months). Modularity should provide a way for maintainers to separate the software stack lifecycle from the underlying OS lifecycle: have the fast stream also available on RHEL/CentOS and the slow stream also available on Fedora OS releases.

Stability

Posted Nov 22, 2019 18:12 UTC (Fri) by corbet (editor, #1) [Link]

My point was that the underlying platform is only so stable if (1) it makes a point of having current software, and (2) you have to update it every year. It may make me feel a little more warm and fuzzy to know that my version of tetris is on the slow path, but the fuzziness is limited if everything around it gets torn down and rebuilt a couple of times each year...

Fedora's modularity mess

Posted Nov 25, 2019 18:55 UTC (Mon) by langdonwhite (guest, #88731) [Link] (1 responses)

We always seem to leave out the use case for when Fedora is too slow.

We regularly get a new version of some tool/language/whatnot that misses the release window. Many people say "just wait 6 months for the next Fedora." Well, there a couple big problems with that. The obvious, "well, what if it can't get in then either" risk is pretty scary. However, the more subtle/less obvious problem is that many software projects are implemented and shipped in 6 months. That is a *lifetime* in web projects these days.

Without Modularity, I have to either choose to use the last rev of X or not use Fedora to develop my application.

Fedora's modularity mess

Posted Nov 29, 2019 13:02 UTC (Fri) by epa (subscriber, #39769) [Link]

If the new version of X has been packaged in Rawhide then you can usually grab the source package and rebuild it. Or if not, you can take Fedora's current package for X and update it to the new upstream tarball. Either is usually pretty easy, and if not, well somebody has to do the packaging work no matter what kind of release cadence or modularity setup the distribution is using.

Fedora's modularity mess

Posted Nov 23, 2019 1:09 UTC (Sat) by perennialmind (guest, #45817) [Link] (4 responses)

Right now I'm feeling extra thankful for the work of the Debian Backports team. Only the "Application Streams" bit resonates for me: I've used the RHSCL sidecar before and can see wanting something more integrated. Finding that updated package in Debian Backports means I can go stub a different toe on the next obstruction. They've made reaching forward easy. Dropping anchor with apt pinning is ... awkward, but it doesn't necessarily entail the problem that Red Hat article describes.

> There are a number of problems with pinning but the simplest is that you don’t get updates to the software, by design, which, unfortunately, includes security and bug fix updates

Is that because pinning a set of packages to an older _distribution release_ won't help with Fedora's shorter release and support cycles? That's a shame: if they could make reaching across Fedora releases it would provide a lovely granularity of version selection.

Fedora's modularity mess

Posted Nov 25, 2019 18:46 UTC (Mon) by hkario (subscriber, #94864) [Link] (2 responses)

> That's a shame: if they could make reaching across Fedora releases it would provide a lovely granularity of version selection.

distribution is not just the packages, it's also all the integrations, consistent compilation options etc.
While installing FC29 package on FC31 should work in general, it's not guaranteed, let alone if it will work exactly as it did in FC29.

Fedora's modularity mess

Posted Nov 25, 2019 21:59 UTC (Mon) by perennialmind (guest, #45817) [Link] (1 responses)

I don't mean to understate the complexity or the work. It would take similar effort to curate a "forward port" inverse of Debian Backports. I pictured opting in to a "FC31-29antiques" repository and pinning a set of packages to that moving target. At least then I get a hint of the complexity and relative age if I try pulling in a hodgepodge from "FC29-28antiques", "FC31-30antiques", "FC31-32backports", etc. For me, it would help set my expectations. It's not hard to see that maintaining Apache 2.2 for all eternity is infeasible, but it's hard to miss if I have to specify "Fedora9" to get it.

I'm used to managing repositories, and I like being able to fit with existing abstractions - if it's actually a good fit.

Fedora's modularity mess

Posted Nov 25, 2019 22:08 UTC (Mon) by perennialmind (guest, #45817) [Link]

Correction: I did understate it, and what I'm trying to do is walk it back. :-)

Fedora's modularity mess

Posted Nov 25, 2019 19:24 UTC (Mon) by sgallagh (guest, #80524) [Link]

> if they could make reaching across Fedora releases it would provide a lovely granularity of version selection.

That is in fact a core piece of the puzzle: When building a module, you select which releases of Fedora it will work on. Then on upgrade if you had indicated "I want to stick with PostgreSQL 10", you'll stay on the `postgresql:10` stream instead of moving to the `postgresql11` stream, even if it's the default stream for the next release.

The big devil in the details for upgrades is determining an appropriate heuristic for when it's okay to switch to the newer module default stream vs. stay on the previous one when upgrading. The closest we've come up with so far is the initial upgrade proposal: https://lwn.net/ml/fedora-devel/CAFoKQtx_rjF6wf_ArY8-hpfG...

I'm open to better ideas for the heuristics!

Fedora's modularity mess

Posted Nov 24, 2019 8:45 UTC (Sun) by roblucid (guest, #48964) [Link]

The OpenSuSE distro would let me choose alternative repositories for tracking less stable versions of some projects, say web browser, desktop or kernel. A major update to new release would be handled by updating the base system entirely and then re-enabling the alternative repos after (assuming they were still required).
The case of developers building against a stable defined set of libraries would be handled by the build system, which uses an alternative root and an online package building service baselined against OS releases or Tumbleweed snapshots.
I struggle to understand what common cases the RHEL/Fedora can fulfill, in return for what appears impractically fragile complexity.
As a past sysadmin a key was reproducibility, developer systems which evolved in surprising ways, led to quality problems.

Fedora's modularity mess

Posted Nov 25, 2019 6:18 UTC (Mon) by IanKelling (subscriber, #89418) [Link] (2 responses)

The more relevant longer requirements quote about not packaging
build-time dependencies:

> When a person decides that they want Fedora to carry a particular package
> and decides to do the work to accomplish this, it is not uncommon to
> discover that the package they care about has additional dependencies that
> are not yet packaged in Fedora. Traditionally, this has meant that the
> packager has needed to package up those dependencies and then continue to
> maintain them for anyone who may be using them for other purposes. This can
> sometimes be a significant investment in time and energy, all to support a
> package they don’t necessarily care about except for how it supports the
> primary package.

"needed to package up those dependencies" yes, of course, "and then
continue to maintain them for anyone who may be using them for other
purposes" Huh? I'm pretty sure that is not true at all. There definitely
is nothing in https://docs.fedoraproject.org/en-US/packaging-guidelines/
remotely like that. Tons of fedora package bugs get no reply or an
uninterested reply and gets autoclosed after a few years. This seems to
be inventing a problem that doesn't exist.

Yes, publishing build dependencies is hard, but its also a key part of
what makes a distro be useful, it enables people to contribute by
building and fixing software on their own machines and enables
derivatives.

Fedora's modularity mess

Posted Nov 25, 2019 15:15 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

A way to mark a package as "maintained due to software stack" that gets a new dependency somewhere could raise a flag saying "I see you're depending on a package that was added just to satisfy dependencies. Do you want to also co-maintain that package?" to help reduce the burden for these would be good. Probably good to stop raising the flag once it has 2 or 3 co-maintainers already (or someone adopts it in a "I actually care about this package specifically" way).

Fedora's modularity mess

Posted Nov 26, 2019 2:50 UTC (Tue) by mattdm (subscriber, #18) [Link]

> Tons of fedora package bugs get no reply or an uninterested reply and gets autoclosed after a few years. This seems to be inventing a problem that doesn't exist.

I think the first part of that _is_ the problem.

Fedora's modularity mess

Posted Nov 26, 2019 14:06 UTC (Tue) by dmnks (subscriber, #135697) [Link] (5 responses)

This may sound rather naive, but I've always had the impression that we're just trying to reinvent the wheel here, "poorly". (Please take this with a grain of salt.)

Isn't this why we invented (RPM) packages and (YUM) repositories in the first place? Modules seem to share most of the same semantics; they deal with versioning, dependencies, upgrade paths (streams) etc. Why add another layer of complexity to that?

I think this stems from us struggling to clearly define what a "package" is. Is it a single binary/library, an application (comprising of multiple binaries), a software bundle (comprising of multiple related applications) or a bundle of bundles (a distribution)? Do we really need different concepts for each level in what appears to be a hierarchy with a clear set of rules and relationships?

Shouldn't we just take a step back and rethink the whole desire for "modules" in the simple context of packages and repositories first?

Fedora's modularity mess

Posted Nov 26, 2019 14:34 UTC (Tue) by dmnks (subscriber, #135697) [Link]

> I think this stems from us struggling to clearly define what a "package" is. Is it a single binary/library, an application (comprising of multiple binaries), a software bundle (comprising of multiple related applications) or a bundle of bundles (a distribution)? Do we really need different concepts for each level in what appears to be a hierarchy with a clear set of rules and relationships?

Just to clarify, what I mean is that RPM packages have been historically used to deliver not only single programs and libraries, but also software bundles (as metapackages), so it seems logical to think of modules the same way.

Fedora's modularity mess

Posted Nov 26, 2019 20:01 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (3 responses)

The problem is versioning. You can't easily install two copies of the same RPM package.

Fedora's modularity mess

Posted Nov 27, 2019 9:07 UTC (Wed) by dmnks (subscriber, #135697) [Link]

> The problem is versioning. You can't easily install two copies of the same RPM package.

Parallel installation is a solvable problem with RPM. There's no technical reason it couldn't work. In fact, Software Collections is a good example of an implementation that just adds a bunch of RPM macros and scriptlets to achieve exactly this.

But then, parallel installability is the one thing that Modularity is explicitly _not_ trying to solve :)

Fedora's modularity mess

Posted Nov 28, 2019 2:49 UTC (Thu) by Conan_Kudo (subscriber, #103240) [Link] (1 responses)

You actually can, RPM doesn't really care. Currently, DNF/YUM and friends encode a policy to forbid it for all but a few packages, but there's no reason we couldn't expand the scope...

Fedora's modularity mess

Posted Nov 28, 2019 7:19 UTC (Thu) by Cyberax (✭ supporter ✭, #52523) [Link]

The problem is not the library itself, but its reverse dependencies. There's no real way to encode which library version you want.

Fedora's modularity mess

Posted Nov 30, 2019 19:42 UTC (Sat) by snajpa (subscriber, #73467) [Link] (11 responses)

You Red Hat guys should really take a hard, long and fresh look at Nix and figure out how do you go from the m4-hell you're in now to something like Nix or Guix. At their core, those technologies have solved what you guys will still be only aiming for 10 years from now.

Who of you actually knows that RPM spec files are m4 language macros?

So, you've been defining packages with a programming language all along.

Start doing it properly. You could get configuration management of those packages, auto-generated manual for all the configuration options these packages would provide and mainly, you could get the ability to install whichever versions you'd like on a single system.

And you would still be able to reproducibly manage that, which you can't now (Ansible doesn't even come close).

It would just solve all of the problems you're never going to solve up the stack. Fix the underlying actual problem that is the RPM's legacy, get it up-to-date with modern systems research and you'll be set for another 25 years as a clear market winner.

Fedora's modularity mess

Posted Nov 30, 2019 20:04 UTC (Sat) by amacater (subscriber, #790) [Link] (7 responses)

Or just admit that, of the surviving distributions, you were third to the party (after Slackware and Debian) and just ditch RPM for .deb - reproducible, documented - as Red Hat nearly did once before. ...

Fedora's modularity mess

Posted Nov 30, 2019 21:02 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link] (6 responses)

> Or just admit that, of the surviving distributions, you were third to the party (after Slackware and Debian) and just ditch RPM for .deb - reproducible, documented - as Red Hat nearly did once before. ...

Slackware doesn't have a dependency resolver and .deb as a packaging format isn't all that different from .rpm and doesn't solve the modularity problem. So I don't see how that would help at all. Feel free to explain

Fedora's modularity mess

Posted Nov 30, 2019 21:41 UTC (Sat) by amacater (subscriber, #790) [Link] (5 responses)

Debian _does_ have dependency resolution, strict packaging policy - and tracking of reverse dependencies. It's (almost) entirely reproducible. It generally works and is readily upgradable between major versions.

The modularity and fast moving packages - there's a working alternatives system and the stable/testing/unstable ecosystem generally means that newer versions are being worked on at the same time as stable remaining stable. Comparable in size to Fedora but having longer term support.
[Disclaimer: I've been using Debian since version 1.2 and Red Hat since 4.2 - I have to help support both but _still_ can't support developers wanting to use Red Hat for daily development with any degree of satisfaction.]

Fedora's modularity mess

Posted Nov 30, 2019 23:50 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link] (4 responses)

You haven't cited a single unique feature of deb format that RPM format doesn't support. None of those solve the modularity goals. Gentoo slots and Nix does solve them in other ways but Debian doesn't. I would suggest starting with those for comparison points

Fedora's modularity mess

Posted Dec 2, 2019 9:50 UTC (Mon) by kleptog (subscriber, #1183) [Link] (3 responses)

There is nothing very special about the format, it's the Debian Packaging Policy that makes the difference. You start with the basic choice that "if you think people might want to parallel install packages they must have different names".

So you don't have postgresql:10 and postgresql:11, you have postgresql-server-10:10.11 and postgresql-server-11:11.6 and the corresponding client packages. The libraries libssl1.1, libssl1.0.2 and libssl1.0.0 are also distinct packages, the package name reflects the ABI presented. Then the whole discussion becomes much easier, dependencies are clear and installing multiple versions of a single package becomes unnecessary (although it is supported if the architecture is different).

To refer to the article, since libgit2-21 and libgit2-27 are co-installable the entire issue vanishes. It doesn't matter if the version 21 disappears from upstream, it remains on the user's system as long as they need it.

To make this work smoothly is of course a large part of the rest of the policy regarding file placement and versioning but it seems to me to solve all the issues this article is discussing. There is the choice that this scheme does not apply to dev packages for building, I think mostly because of (for example) lack of useful tooling support for dealing with three versions of the ssl.h header file being installed at the same time.

Fedora's modularity mess

Posted Dec 2, 2019 12:06 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link] (2 responses)

> There is nothing very special about the format, it's the Debian Packaging Policy that makes the difference

Indeed. So switching from RPM to Deb solves none of the problems and packaging policy can be applied in an identical way in an RPM based system. In fact, such packages already exist in Fedora and is not fundamentally different from software collections (which was more heavily used in RHEL and did not see much adoption in Fedora). The modularity group is just trying a different approach to solve it

Fedora's modularity mess

Posted Dec 2, 2019 17:01 UTC (Mon) by amacater (subscriber, #790) [Link] (1 responses)

kleptog has, essentially, made my point for me and clarified what I wanted to say but expressed badly.

Packaging policy can be applied equally to .debs and to RPM - but it isn't applied in the same way in most RPM based distributions and the IBM RPM ecosystem itself tends to depend on a mess of third party repositories, each from a small number of maintainers.

EPEL is packaged by Fedora maintainers using the libraries in Red Hat Enterprise as a base - so a third party repository for the main Enterprise distribution. Then you have Freshrpms / Livna / Elrepo / RPMFusion / whatever else Dag Wiers has contributed to :) (and whatever is today's hot repository).

Also you have the problem that the RPM ecosystem has historically only worked on a limited number of architectures so it's coming to ARM fifteen years late.

[And note, this suggestion from me is nothing new - I made a similar suggestion to rgb for the beginnings of the Beowulf project.]

Fedora's modularity mess

Posted Dec 2, 2019 17:49 UTC (Mon) by rahulsundaram (subscriber, #21946) [Link]

> EPEL is packaged by Fedora maintainers using the libraries in Red Hat Enterprise as a base - so a third party repository for the main Enterprise distribution. Then you have Freshrpms / Livna / Elrepo / RPMFusion / whatever else Dag Wiers has contributed to :) (and whatever is today's hot repository).

If we are talking about RHEL here specifically, there are essentially two repositories in widespread use

Core - Commercially supported by Red Hat.
EPEL - Community supported

Packaging policy has nothing at all to do with this split clearly. This is in impact of RHEL being a commercial product

RPM Fusion is akin to non-free in Debian. Others got merged into RPM Fusion years and years back. It is far more popular in the Fedora space than within RHEL community. There isn't anything new or "hot" here. Again, the difference here is a combination of Fedora licensing policy and Red Hat is a commercial entity and doesn't want to take on liability of distributing patent encumbered code. Nothing in the RPM format or packaging policy is going to change any of this. It also has nothing to do with the modularity effort. So I am afraid I don't see the relevance

Fedora's modularity mess

Posted Nov 30, 2019 20:45 UTC (Sat) by lkundrak (subscriber, #43452) [Link] (2 responses)

> Who of you actually knows that RPM spec files are m4 language macros?

What? No.

Fedora's modularity mess

Posted Dec 1, 2019 3:25 UTC (Sun) by snajpa (subscriber, #73467) [Link] (1 responses)

Hm, you're right, I wonder how I came across that bit of information. I've actually never bothered to validate that.

Hell, what do I know. And why do I care, I'll refrain from posting comments such as this in the future, esp. when I don't really care about the thing in question...

Sorry for that.

Fedora's modularity mess

Posted Dec 2, 2019 15:58 UTC (Mon) by Conan_Kudo (subscriber, #103240) [Link]

RPM macros are "inspired" by an unholy combination between m4 and bash. There are some primitives that are bash-like and some that are m4-like. You can mostly get away from this if you write your logic in Lua (the other programming language supported by RPM), but most people don't.

Fedora's modularity mess

Posted Oct 14, 2021 8:26 UTC (Thu) by cortana (subscriber, #24596) [Link]

The pain continues. Red Hat's otherwise quite nice Insights dashboard doesn't understand modules. It shows packages updates that would require module streams to be switched, or even disabled entirely.

What makes this particularly irritating is that enabling a module stream causes non-modular packages from enabled repositories to completely disappear when querying DNF. So you have Insights telling you that you can upgrade the softhsm package, but 'dnf list --showduplicates softhsm' only shows the package from the currently-enabled idm:DL1 module from the AppStream repo, and not the hidden 'ursine' module in EPEL.


Copyright © 2019, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds