DNF-MODULESYNC(8)

πŸ“¦
version 4.3.1 Β· 3 versions
, in debian bookworm, ubuntu noble

πŸ’– NAME πŸ’–

dnf-modulesync β€” the DNF modulesync Plugin, bestie πŸ’…

Download packages from modules and/or create a repository with modular data. That's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

dnf modulesync [options] [<module-spec>...]

🌸 DESCRIPTION 🌸

Okay so here's the tea β˜• β€” modulesync downloads packages from modules based on whatever arguments you hand it, and then it builds you a repository with modular data right there in your working directory. Iconic behavior, honestly.

In an environment that has modules, you really wanna use this command for redistribution of packages, because DNF straight up does not allow installation of modular packages when there's no modular metadata on the system (that's the fail-safe mechanism doing its thing, no cap πŸ›‘οΈ).

And if you run the command with no argument at all? It creates a repository like createrepo_c would, except with modular metadata collected from all available repositories. Slay.

See examples. πŸ‘€


πŸŽ€ ARGUMENTS πŸŽ€

  • <module-spec> β€” the module specification for the package you wanna download. This argument is optional, so no pressure, she's flexible. πŸ’β€β™€οΈ

✨ OPTIONS ✨

All general DNF options are accepted, periodt. Namely, the --destdir option can be used to specify the directory where packages will be downloaded and the new repository gets created. See Options in dnf(8) for the deets. 🫢

  • -n, --newest-only β€” download only packages from the newest modules. Only the fresh ones, we don't do old news. πŸ’…
  • --enable_source_repos β€” enable repositories with source packages. πŸ”₯
  • --enable_debug_repos β€” enable repositories with debug-info and debug-source packages. πŸ›
  • --resolve β€” resolve and download needed dependencies. She does the detective work for you. πŸ•΅οΈβ€β™€οΈ

🌈 EXAMPLES 🌈

Downloading from the nodejs module

dnf modulesync nodejs

Download packages from the nodejs module and crete a repository with modular metadata in the working directory.

dnf download nodejs

Just modulesync, no args, main character energy

dnf modulesync

The first download command downloads the nodejs package into the working directory. In an environment with modules, the nodejs package can be a modular package, so when I create a repository I have to insert modular metadata from available repositories too, to ensure 100% functionality. Instead of createrepo_c, use dnf modulesync to create a repository in the working directory with the nodejs package and modular metadata. πŸ’–

Specifying a stream/profile + resolving deps

dnf --destdir=/tmp/my-temp modulesync nodejs:14/minimal --resolve

Download the package required for installation of the minimal profile from module nodejs and stream 14 into the directory /tmp/my-temp, plus all required dependencies. Then it creates a repository in the /tmp/my-temp directory with the previously downloaded packages and modular metadata from all available repositories. 🌟

dnf module install nodejs:14/minimal --downloadonly
--destdir=/tmp/my-temp

Same destination, different journey

dnf modulesync --destdir=/tmp/my-temp

The first dnf module install command downloads the package required for installation of the minimal profile from module nodejs and stream 14 into the directory /tmp/my-temp. The second command, dnf modulesync, creates a repository in the /tmp/my-temp directory with the previously downloaded packages and modular metadata from all available repositories. In comparison to dnf –destdir=/tmp/my-temp modulesync nodejs:14/minimal –resolve, it will only download packages required for installation on the current system. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • dnf(8), DNF Command Reference

🫢 AUTHOR 🫢

See AUTHORS in your Core DNF Plugins distribution.


2023, Red Hat, Licensed under GPLv2+


Okay bestie, that's a wrap β€” this was version 4.3.1, dated Jan 22, 2023, brought to you by the dnf-plugins-core girlies. Go build some repos, you ate. πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from