Re: Modularity is still confusing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 03, 2018 at 11:53:25PM -0400, Christopher wrote:
> I'm still very confused about how to do modular packaging in Fedora. I
> don't know:
> 
> 1. How do I create a module for a new Fedora package?
> 2. How do I create a module for my existing non-modular Fedora package?

https://docs.fedoraproject.org/en-US/modularity/making-modules/adding-new-modules/

> 3. How do I declare BuildRequires on my build dependencies from another module?
> 4. How do I declare Requires on my runtime dependencies from another module?

No changes on the RPM level.  You also have dependencies on
the module level, which makes their packages available to you.
At buildtime it means their packages are available for you to
install in the buildroot, at runtime that they are available as
installable deps.  Besides ensuring you depend on the modules
that provide your packages in the appropriate situations,
you don't need to do anything.

> 5. How do I know what modules are available?

This one is tricky.

If you only care about runtime and what's available to Fedora
end users directly, you can just run "dnf module list" or inspect
the repodata (*modules.yaml.gz) of the release you're targeting.

Not all modules are included in the repos.  Some are used
as building blocks and discovering these is more difficult.
You can query the MBS database to inspect everything there is:

https://mbs.fedoraproject.org/module-build-service/1/module-builds/

The REST API is documented here:

https://pagure.io/fm-orchestrator

> 6. How do I figure out which packages are in a particular module?
> 7. How do I find out what module a particular package is in?

These also need more work and depdends on what you're looking for.

"dnf module info" and "dnf module provides" or looking at the
repodata of your targetted release can help you identify what
binary packages are provided by particular modules.  This doesn't
include building block modules as those aren't in the repo.

MBS database (see above) has links to all modular component
builds in koji.  You could use that, too.  This includes
everything, sources and binaries, available in the repos or not.

For sources and build instructions, the database is enough but
you could also just pull the modulemd files from dist-git.

> Learning modularity, now that the primary maintainer for most of the
> Java build ecosystem in Fedora is orphaning their non-modular
> packages, has become very important for several of my packages, but
> I'm still struggling to find where these basic answers are documented.
> I'm a loyal Fedora user, but a novice packager, and still occasionally
> struggle with basic non-modular packaging tasks. Understanding modular
> packaging seems to be even harder to find clear, step-by-step
> instructions to follow, than regular non-modular packaging
> instructions, which I'm still not an expert with.

Thanks for asking these questions.  We're aware of some gaps
but sometimes you just don't know what people don't know.

Modules also have the concept of defaults, making their
packages available at runtime, even as dependencies for
non-modular packages.  There are also mechanisms to make select
modules available in the buildroot for everyone but this isn't
currently possible in Fedora.  We would like to change that
at some point, though.  With these, you shouldn't be forced to
switch to modularity if you don't want to and the maintainers
of your dependencies handle their transition properly.

> The answers to these questions should be clear, step-by-step
> command-line instructions, or specific examples of a SPEC file
> modification. Where can I find that kind of documentation? I know I've
> attempted to ask similar questions in the past, but I just haven't
> seen good documentation in response. Is there anybody who really,
> truly, understands how to do modular packaging well enough to write a
> clear step-by-step instructions for the rest of us to follow?

So, we have this:
https://docs.fedoraproject.org/en-US/modularity/

Suggestions for improvements or even PRs are definitely
appreciated.

P

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux