feature: add support for AlmaLinux #373

Open
romain-dartigues wants to merge 2 commits from romain-dartigues/cdist:rd/almalinux into master
Contributor

Waiting for review and comments.

Questions:

  • should it be alma instead of almalinux for brevity sake (like void or alpine)?
  • should cdist introduce synonyms, such as RHlike or linux to make easier to write types for "any linux" or "any distribution using rpm`?
Waiting for review and comments. Questions: * should it be `alma` instead of `almalinux` for brevity sake (like `void` or `alpine`)? * should cdist introduce synonyms, such as RHlike or `linux` to make easier to write types for "any linux" or "any distribution using rpm`?
romain-dartigues added 2 commits 2024-04-11 19:21:18 +00:00
AlmaLinux is an Open Source fork of Red Hat Enterprise Linux;
it should behave like a CentOS/RHEL.
Untested yet.
romain-dartigues force-pushed rd/almalinux from 109801fbe7 to 4b874656a9 2024-04-11 19:21:49 +00:00 Compare
romain-dartigues changed title from WIP: feature: add support for AlmaLinux to feature: add support for AlmaLinux 2024-04-13 10:34:59 +00:00
romain-dartigues requested review from fnux 2024-04-13 10:37:54 +00:00
fnux self-assigned this 2024-04-16 09:08:25 +00:00
Collaborator

Can you also support 'rocky' (for Rocky Linux)? It's currently (as far as I know) the most used RHEL rebuild.

  • should it be alma instead of almalinux for brevity sake (like void or alpine)?

It should be almalinux, not alma - since it is what upstream uses:

$ podman run --rm -it almalinux:latest
[root@d134def9ce4b /]# . /etc/os-release 
[root@d134def9ce4b /]# echo "$ID"
almalinux
  • should cdist introduce synonyms, such as RHlike or linux to make easier to write types for "any linux" or "any distribution using rpm`?

I don't mind the boilerplate right now - you can open a separate issue if it bothers you.

Can you also support 'rocky' (for Rocky Linux)? It's currently (as far as I know) the most used RHEL rebuild. > * should it be `alma` instead of `almalinux` for brevity sake (like `void` or `alpine`)? It should be `almalinux`, not `alma` - since it is what upstream uses: ``` $ podman run --rm -it almalinux:latest [root@d134def9ce4b /]# . /etc/os-release [root@d134def9ce4b /]# echo "$ID" almalinux ``` > * should cdist introduce synonyms, such as RHlike or `linux` to make easier to write types for "any linux" or "any distribution using rpm`? I don't mind the boilerplate right now - you can open a separate issue if it bothers you.
Owner

@romain-dartigues No, cdist should NOT do that.

If you really need to match on an rpm package, write an explorer for that. However there is already a type, __package that does that for you.

Rule of thumb:

  • Introduce logic that makes common, repetitive tasks easy.
  • Do not introduce logic that is rarely used or does not yet have a use case
@romain-dartigues No, cdist should *NOT* do that. If you *really* need to match on an rpm package, write an explorer for that. However there is already a type, __package that does that for you. Rule of thumb: * Introduce logic that makes common, repetitive tasks easy. * Do not introduce logic that is rarely used or does not yet have a use case
fnux reviewed 2024-04-24 07:31:36 +00:00
@ -24,3 +24,3 @@
os="$("$__explorer/os")"
case "$os" in
amazon|scientific|centos|fedora|redhat) echo "yum" ;;
almalinux|amazon|scientific|centos|fedora|redhat) echo "yum" ;;
Collaborator

You'll need dnf instead of yum.

You'll need dnf instead of yum.
First-time contributor

I think some newer versions of redhat etc also only have dnf - no yum.

If anyone is interested, I can try confirm which versions.

I think some newer versions of redhat etc also only have dnf - no yum. If anyone is interested, I can try confirm which versions.
Collaborator

I think some newer versions of redhat etc also only have dnf - no yum.

If anyone is interested, I can try confirm which versions.

DNF is the default package manager since RHEL 8, and RHEL 7 is EOL in month.
I'm a Fedora contributor - I know these things pretty well :-)

> I think some newer versions of redhat etc also only have dnf - no yum. > > If anyone is interested, I can try confirm which versions. DNF is the default package manager since RHEL 8, and RHEL 7 is EOL in month. I'm a Fedora contributor - I know these things pretty well :-)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u rd/almalinux:romain-dartigues-rd/almalinux
git checkout romain-dartigues-rd/almalinux

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout master
git merge --no-ff romain-dartigues-rd/almalinux
git checkout romain-dartigues-rd/almalinux
git rebase master
git checkout master
git merge --ff-only romain-dartigues-rd/almalinux
git checkout romain-dartigues-rd/almalinux
git rebase master
git checkout master
git merge --no-ff romain-dartigues-rd/almalinux
git checkout master
git merge --squash romain-dartigues-rd/almalinux
git checkout master
git merge --ff-only romain-dartigues-rd/almalinux
git checkout master
git merge romain-dartigues-rd/almalinux
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#373
No description provided.