]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
ubuntu: security repo is different from !x86
authorLuca Boccassi <bluca@debian.org>
Thu, 23 Feb 2023 13:07:10 +0000 (13:07 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 23 Feb 2023 13:44:39 +0000 (13:44 +0000)
mkosi/distributions/ubuntu.py

index 8bd59c8a338776e6e20d4807080881140b3354fb..852f32cd24da0a95ee425ad7049e83bcd5d4216a 100644 (file)
@@ -22,8 +22,11 @@ class UbuntuInstaller(DebianInstaller):
         updates = f"deb {state.config.mirror} {state.config.release}-updates {' '.join(repos)}"
         state.root.joinpath(f"etc/apt/sources.list.d/{state.config.release}-updates.list").write_text(f"{updates}\n")
 
-        # Security updates repos are never mirrored
-        security = f"deb http://security.ubuntu.com/ubuntu/ {state.config.release}-security {' '.join(repos)}"
+        # Security updates repos are never mirrored. But !x86 are on the ports server.
+        if state.config.architecture in ["x86", "x86_64"]:
+            security = f"deb http://security.ubuntu.com/ubuntu/ {state.config.release}-security {' '.join(repos)}"
+        else:
+            security = f"deb http://ports.ubuntu.com/ {state.config.release}-security {' '.join(repos)}"
 
         state.root.joinpath(f"etc/apt/sources.list.d/{state.config.release}-security.list").write_text(f"{security}\n")