summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/hardened/update.py
diff options
context:
space:
mode:
authorTim Steinbach <tim@nequissimus.com>2021-01-24 13:02:00 -0500
committerTim Steinbach <NeQuissimus@users.noreply.github.com>2021-01-24 18:17:56 -0500
commite80850fe42c61d915162403a32cf20601ba61034 (patch)
tree7e6f623574ca68f39e9bdaeae70cd6245c84a7af /pkgs/os-specific/linux/kernel/hardened/update.py
parentd3cf0f85c532e1bf4159e0031da0e48ce6a16764 (diff)
downloadnixpkgs-e80850fe42c61d915162403a32cf20601ba61034.tar
nixpkgs-e80850fe42c61d915162403a32cf20601ba61034.tar.gz
nixpkgs-e80850fe42c61d915162403a32cf20601ba61034.tar.bz2
nixpkgs-e80850fe42c61d915162403a32cf20601ba61034.tar.lz
nixpkgs-e80850fe42c61d915162403a32cf20601ba61034.tar.xz
nixpkgs-e80850fe42c61d915162403a32cf20601ba61034.tar.zst
nixpkgs-e80850fe42c61d915162403a32cf20601ba61034.zip
linux-hardened: Fix update script
Diffstat (limited to 'pkgs/os-specific/linux/kernel/hardened/update.py')
-rwxr-xr-xpkgs/os-specific/linux/kernel/hardened/update.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/kernel/hardened/update.py b/pkgs/os-specific/linux/kernel/hardened/update.py
index b831c649109..e96ac9ca855 100755
--- a/pkgs/os-specific/linux/kernel/hardened/update.py
+++ b/pkgs/os-specific/linux/kernel/hardened/update.py
@@ -101,7 +101,7 @@ def verify_openpgp_signature(
 
 def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]:
     release = release_info.release
-    extra = f'.{release_info.version[-1]}'
+    extra = f'-{release_info.version[-1]}'
 
     def find_asset(filename: str) -> str:
         try:
@@ -138,7 +138,7 @@ def fetch_patch(*, name: str, release_info: ReleaseInfo) -> Optional[Patch]:
 
 def parse_version(version_str: str) -> Version:
     version: Version = []
-    for component in version_str.split("."):
+    for component in re.split('\.|\-', version_str):
         try:
             version.append(int(component))
         except ValueError:
@@ -208,7 +208,7 @@ failures = False
 releases = {}
 for release in repo.get_releases():
     version = parse_version(release.tag_name)
-    # needs to look like e.g. 5.6.3.a
+    # needs to look like e.g. 5.6.3-hardened1
     if len(version) < 4:
         continue