Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dnf module #377

Open
wants to merge 63 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
fd4ad28
feat: `dnf` module
fiftydinar Dec 22, 2024
cd91b05
chore: Add support for native installation of repos
fiftydinar Dec 22, 2024
cf3d495
docs: Revise the note about %OS_VERSION% in repos
fiftydinar Dec 22, 2024
2f392e7
fix: missing quote in echo
fiftydinar Dec 22, 2024
6d1047f
fix: Get raw COPR repos array elements without JSON brackets
fiftydinar Dec 22, 2024
9d13c87
chore: Auto-confirm prompts (`-y`) when adding repos
fiftydinar Dec 22, 2024
1396a18
fix: Accidental syntax error for `done`
fiftydinar Dec 22, 2024
b898af2
chore: Remove useless echo
fiftydinar Dec 22, 2024
6523979
chore: Install & remove using `dnf` in single operation cases
fiftydinar Dec 22, 2024
97566b8
docs: Add note that URL is not preferred for copr repos
fiftydinar Dec 22, 2024
0bb79d0
fix: `/opt` symlink issue & migrate removal + install to `dnf`
fiftydinar Dec 22, 2024
70c5766
chore: Document code some more
fiftydinar Dec 22, 2024
e01ed40
docs: Fix note about using install & remove at the same time
fiftydinar Dec 22, 2024
7d4aff9
chore: Add `dnf` to `modules.json`
fiftydinar Dec 22, 2024
a4e9ba4
chore: Add support for replacing packages
fiftydinar Dec 22, 2024
7da24f5
chore: Add option to enable or disable installation of weak dependencies
fiftydinar Dec 22, 2024
d495b6a
docs: Style backtick fix
fiftydinar Dec 22, 2024
1137c8b
fix(rpm-ostree): Symlinking `/opt/` multiple times caused an error
fiftydinar Dec 22, 2024
eb522e3
chore: Rename `weak-dependencies` to `install-weak-dependencies` & ad…
fiftydinar Dec 22, 2024
57f8b22
chore: Change `copr: user/project` formt to `COPR user/project`
fiftydinar Dec 22, 2024
7a5bcea
fix: Syntax error due to redundant `fi`
fiftydinar Dec 22, 2024
c7ae430
fix: Restore logic about not removing any newlines to COPR repos
fiftydinar Dec 22, 2024
b1a7c6f
feat: Add removal & installation of RPM groups
fiftydinar Dec 22, 2024
b7c0206
docs: Style fix
fiftydinar Dec 22, 2024
feb0d71
chore: Make sorting order in typespec better
fiftydinar Dec 22, 2024
fba3840
typespec: Minor leftover fix
fiftydinar Dec 22, 2024
e27ba39
chore: Fix typespec replace definition
fiftydinar Dec 22, 2024
a53dd5b
chore: Add mutter-patched COPR to module.yml
fiftydinar Dec 22, 2024
1a81609
fix: Forgot to replace `rpm-ostree` to `dnf` when checking for local …
fiftydinar Dec 23, 2024
a72ae5c
fix: Adding local file repos
fiftydinar Dec 23, 2024
2790123
fix: Replacing packages
fiftydinar Dec 23, 2024
ecffeae
chore: Make error message consistent
fiftydinar Dec 23, 2024
84f89d0
chore: Begin implementation of specific flag options for every instal…
fiftydinar Dec 23, 2024
5d7f34b
chore: Simplify printing log message for install packages
fiftydinar Dec 23, 2024
7fc5a24
feat: Add dnf flags to all operations
fiftydinar Dec 23, 2024
63f745b
feat: Add `remove-unused-dependencies` option for package removal
fiftydinar Dec 23, 2024
b474a5a
chore: Fix group-remove typespec
fiftydinar Dec 23, 2024
770bb33
chore: Fix group-install typespec
fiftydinar Dec 23, 2024
d8a9006
chore: Fix remove typespec
fiftydinar Dec 23, 2024
33065b4
chore: Fix install typespec
fiftydinar Dec 23, 2024
3423190
chore: Remove leftover global `install-weak-dependencies` option
fiftydinar Dec 23, 2024
f176120
chore: Remove redundant dnf5 plugin check
fiftydinar Dec 23, 2024
7458b4b
fix: dnf group remove command missed `group` prefix
fiftydinar Dec 23, 2024
ce4163c
fix: Don't quote the flags, else dnf will see it as an empty argument…
fiftydinar Dec 24, 2024
c8043a4
fix: Don't quote the flags, else dnf will see it as an empty argument…
fiftydinar Dec 24, 2024
aa92eff
fix: Don't quote the flags, else dnf will see it as an empty argument…
fiftydinar Dec 24, 2024
8265b85
fix: Don't quote the flags, else dnf will see it as an empty argument…
fiftydinar Dec 24, 2024
c9f4fb0
fix: Don't quote the flags, else dnf will see it as an empty argument…
fiftydinar Dec 24, 2024
92df6a0
fix: Don't quote the flags, else dnf will see it as an empty argument…
fiftydinar Dec 24, 2024
e66b176
Merge branch 'main' into dnf-module
fiftydinar Dec 25, 2024
4920cc4
chore: Add separate `copr` array
fiftydinar Dec 25, 2024
7612cc2
fix: Assume yes for copr enable
gmpinder Dec 26, 2024
4c17647
Merge branch 'main' into dnf-module
gmpinder Dec 30, 2024
f2d6adf
feat: Add optfix systemd service
gmpinder Dec 30, 2024
72bd1db
chore: Update `rpm-ostree` from main
fiftydinar Jan 3, 2025
533bc57
Start work on making this a nushell module
gmpinder Feb 2, 2025
e06e9d1
Merge branch 'main' into dnf-module
gmpinder Feb 11, 2025
120285d
docs: create the skeleton for a new readme
xynydev Feb 18, 2025
00d3ee6
Abstract the generation of install args
gmpinder Feb 18, 2025
dc051c0
fix: Optfix script dir changes and module.yml docs
gmpinder Feb 18, 2025
0003b97
Merge branch 'main' into dnf-module
gmpinder Feb 19, 2025
e86be19
feat: Add nonfree repo additions
gmpinder Feb 19, 2025
e781c4b
fix: Go back to removing repo files and clean up negativo repos befor…
gmpinder Feb 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-individual.nu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let images = ls modules | each { |moduleDir|
cd $moduleDir.name

# module is unversioned
if ($"($moduleDir.name | path basename).sh" | path exists) {
if (glob $"($moduleDir.name | path basename).{sh,nu}" | any { path exists }) {

print $"(ansi cyan)Found(ansi reset) (ansi cyan_bold)unversioned(ansi reset) (ansi cyan)module:(ansi reset) ($moduleDir.name | path basename)"

Expand Down
4 changes: 2 additions & 2 deletions build-unified.nu
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mkdir ./modules-latest
ls modules | each { |moduleDir|

# module is unversioned
if ($"($moduleDir.name)/($moduleDir.name | path basename).sh" | path exists) {
if (glob $"($moduleDir.name)/($moduleDir.name | path basename).{sh,nu}" | any { path exists }) {

print $"(ansi cyan)Found(ansi reset) (ansi cyan_bold)unversioned(ansi reset) (ansi cyan)module:(ansi reset) ($moduleDir.name | path basename)"

Expand Down Expand Up @@ -56,4 +56,4 @@ let digest = (
print $"(ansi cyan)Signing image:(ansi reset) ($env.REGISTRY)/modules@($digest)"
cosign sign -y --key env://COSIGN_PRIVATE_KEY $"($env.REGISTRY)/modules@($digest)"

print $"(ansi green_bold)DONE!(ansi reset)"
print $"(ansi green_bold)DONE!(ansi reset)"
1 change: 1 addition & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"https://raw.githubusercontent.com/blue-build/modules/main/modules/gschema-overrides/module.yml",
"https://raw.githubusercontent.com/blue-build/modules/main/modules/justfiles/module.yml",
"https://raw.githubusercontent.com/blue-build/modules/main/modules/rpm-ostree/module.yml",
"https://raw.githubusercontent.com/blue-build/modules/main/modules/dnf/module.yml",
"https://raw.githubusercontent.com/blue-build/modules/main/modules/initramfs/module.yml",
"https://raw.githubusercontent.com/blue-build/modules/main/modules/script/module.yml",
"https://raw.githubusercontent.com/blue-build/modules/main/modules/signing/module.yml",
Expand Down
67 changes: 67 additions & 0 deletions modules/dnf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# `dnf`

The [`dnf`](https://docs.fedoraproject.org/en-US/quick-docs/dnf/) module offers pseudo-declarative package and repository management using `dnf5`.

## Package installation

- `install: packages:`
- types of packages
- `%OS_VERSION`
- flags
- from specific repos
- https://packages.fedoraproject.org/

## Package removal

- `remove: packages:`
- flags

## Package group installation

- define
- `group-install:` `packages:`
- flags
- from specific repos(?)
- `dnf5 group list --hidden`

## Package group removal

- `group-remove: packages:`
- flags

## Package replacement

- define
- `replace:`
- flags

## Repository management

- define
- `cleanup:`

### Adding COPR repos

- `copr:`

### Adding repo files

- `files:`
- from url and from file
- `%OS_VERSION`

### Disabling repositories

- `enable:`
- `disable:`

### Adding repo keys

- define
- `keys:`
- example

### Optfix

- define
- `optfix:`
11 changes: 11 additions & 0 deletions modules/dnf/bluebuild-optfix.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Create symbolic links for directories in /usr/lib/opt/ to /var/opt/
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/libexec/bluebuild/optfix.sh
RemainAfterExit=no

[Install]
WantedBy=default.target
Loading