match glibc in ConditionVersion

Extend ConditionVersion= to allow matching against glibc version,
as proposed in https://github.com/systemd/systemd/pull/36468#issuecomment-2674600909
This commit is contained in:
Matteo Croce
2025-03-21 06:57:28 +09:00
committed by Yu Watanabe
parent 966f872880
commit dcde1e903a
4 changed files with 43 additions and 4 deletions
+5
View File
@@ -21,6 +21,11 @@ ConditionVersion=systemd ">=20" "<=9000" "!=14"
ConditionVersion=systemd " >= 20" " <= 9000 " "!= 14"
ConditionVersion=systemd " >= 20" " * "
ConditionVersion=glibc ">=2"
ConditionVersion=glibc ">=2" "<=9000" "!=1"
ConditionVersion=glibc " >= 2" " <= 9000 " "!= 1"
ConditionVersion=glibc " >= 2" " * "
[Service]
ExecStart=touch /tmp/a ; /bin/sh -c 'touch /tmp/b' ; touch /tmp/c
ExecStart=test -f /tmp/a