[FEATURE REQUEST] Debian grains do not report minor version
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
See below; Debian does not include minor version in grains.
Setup
N/A
- on-prem machine
- VM (Virtualbox, KVM, etc. please specify)
- VM running on a cloud service, please be explicit and add details
- container (Kubernetes, Docker, containerd, etc. please specify)
- or a combination, please be explicit
- jails if it is FreeBSD
- classic packaging
- onedir packaging
- used bootstrap to install
Steps to Reproduce the behavior
# salt --out=json 'DEBIAN_MINION' grains.items | grep -Ev '^jid:' | jq '.[] | with_entries(if (.key|test("^(os|lsb)")) then ( {key: .key, value: .value } ) else empty end )'
{
"os": "Debian",
"os_family": "Debian",
"oscodename": "bookworm",
"osfullname": "Debian GNU/Linux",
"lsb_distrib_id": "Debian GNU/Linux",
"lsb_distrib_release": "12",
"lsb_distrib_codename": "bookworm",
"osrelease": "12",
"osarch": "amd64",
"osrelease_info": [
12
],
"osmajorrelease": 12,
"osfinger": "Debian-12"
}
Yet, e.g.:
DEBIAN_MINION:~ # cat /etc/debian_version
12.7
Expected behavior
e.g. on AlmaLinux:
# salt --out=json 'ALMA_MINION' grains.items | grep -Ev '^jid:' | jq '.[] | with_entries(if (.key|test("^(os|lsb)")) then ( {key: .key, value: .value } ) else empty end )'
{
"os": "AlmaLinux",
"os_family": "RedHat",
"oscodename": "Cerulean Leopard",
"osfullname": "AlmaLinux",
"lsb_distrib_id": "AlmaLinux",
"lsb_distrib_release": "8.10",
"lsb_distrib_codename": "Cerulean Leopard",
"osrelease": "8.10",
"osarch": "x86_64",
"osrelease_info": [
8,
10
],
"osmajorrelease": 8,
"osfinger": "AlmaLinux-8"
}
Both the major and minor are available via lsb_distrib_release, osrelease, and osrelease_info.
(One may argue the osfinger should include any minor/patch/revision version info as well, but c'est la vie.)
Screenshots
N/A
Versions Report
N/A, see above
Additional context
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied salt ... grains.items query on Debian and compare it with /etc/debian_version and the shown AlmaLinux output. Done means Debian grains expose the minor version consistently in the relevant version fields, with the expected output verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- debian, linux, python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 44/100