Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav
eepm
Commits
fef8ae0c
Commit
fef8ae0c
authored
May 28, 2023
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
distr_info: add ID_LIKE support and small fixes
parent
fcf03988
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
distr_info
bin/distr_info
+10
-3
os-release
tests/etc/MOSDesktop/etc/os-release
+22
-0
No files found.
bin/distr_info
View file @
fef8ae0c
...
...
@@ -314,6 +314,9 @@ normalize_name()
"ROSA Chrome Desktop"
)
echo
"ROSA"
;;
"MOS Desktop"
)
echo
"ROSA"
;;
"ROSA Enterprise Linux Desktop"
)
echo
"RELS"
;;
...
...
@@ -372,6 +375,7 @@ if distro os-release ; then
# set by os-release:
#PRETTY_NAME
VENDOR_ID
=
"
$ID
"
[
-n
"
$ID_LIKE
"
]
&&
VENDOR_ID
=
"
$ID_LIKE
"
DISTRIB_FULL_RELEASE
=
"
$DISTRIB_RELEASE
"
DISTRIB_CODENAME
=
"
$VERSION_CODENAME
"
...
...
@@ -420,14 +424,17 @@ case "$DISTRIB_ID" in
echo
"
$VERSION
"
|
grep
-q
"c9.* branch"
&&
DISTRIB_RELEASE
=
"c9"
echo
"
$VERSION
"
|
grep
-q
"c9f1 branch"
&&
DISTRIB_RELEASE
=
"c9f1"
echo
"
$VERSION
"
|
grep
-q
"c9f2 branch"
&&
DISTRIB_RELEASE
=
"c9f2"
echo
"
$VERSION
"
|
grep
-q
"c9f3 branch"
&&
DISTRIB_RELEASE
=
"c9f3"
DISTRIB_CODENAME
=
"
$DISTRIB_RELEASE
"
# FIXME: fast hack for fallback: 10.1 -> p10 for /etc/os-release
if
echo
"
$DISTRIB_RELEASE
"
|
grep
-q
"^[0-9]"
&&
echo
"
$DISTRIB_RELEASE
"
|
grep
-q
-v
"[0-9][0-9][0-9]"
;
then
DISTRIB_RELEASE
=
"
$(
echo
p
$DISTRIB_RELEASE
|
sed
-e
's|\..*||'
)
"
DISTRIB_CODENAME
=
"
$DISTRIB_RELEASE
"
DISTRIB_CODENAME
=
"
$(
echo
p
$DISTRIB_RELEASE
|
sed
-e
's|\..*||'
)
"
# TODO: change p10 to 10
DISTRIB_RELEASE
=
"
$DISTRIB_CODENAME
"
fi
;;
"ALTServer"
)
DISTRIB_ID
=
"ALTLinux"
DISTRIB_CODENAME
=
"
$(
echo
p
$DISTRIB_RELEASE
|
sed
-e
's|\..*||'
)
"
;;
"ALTSPWorkstation"
)
...
...
@@ -453,7 +460,7 @@ case "$DISTRIB_ID" in
DISTRIB_RELEASE
=
"Sisyphus"
DISTRIB_CODENAME
=
"
$DISTRIB_RELEASE
"
;;
"ROSA"
)
"ROSA"
|
"MOSDesktop"
)
DISTRIB_FULL_RELEASE
=
"
$DISTRIB_CODENAME
"
DISTRIB_CODENAME
=
"
$DISTRIB_RELEASE
"
;;
...
...
tests/etc/MOSDesktop/etc/os-release
0 → 100644
View file @
fef8ae0c
# Standard values
# Specification: https://www.freedesktop.org/software/systemd/man/os-release.html
NAME="MOS Desktop"
ID=mos
ID_LIKE=rosa
PRETTY_NAME="MOS Desktop 12"
CPE_NAME="cpe:/o:mos:rosa:2021.1"
META_CLASS=desktop
VARIANT_ID=mos-desktop
ANSI_COLOR="1;43"
VERSION="12"
VERSION_ID=2021.1
VERSION_CODENAME=12
HOME_URL="http://os.mos.ru"
LOGO=mos
BUG_REPORT_URL="https://os.mos.ru/git"
# ROSA-specific values
ROSA_OS_BRANCH=mos
ROSA_OS_PLATFORM="rosa2021.1"
ROSA_OS_PLATFORM_INTEGER=202110
ROSA_OS_TYPE=desktop
ROSA_OS_VERSION=12
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment