packages feed

dl-fedora 2.1.1 → 2.2

raw patch · 5 files changed

+65/−38 lines, 5 files

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ # Changelog +## 2.2 (2025-12-16)+- add `--all-variants` (was `--all-editions`)+- `--all-editions` now corresponds to the actual Fedora Editions+- respin: reenable Cinnamon and Sway; uppercase LXQT; SOAS missing+- more 44 spins now using kiwi+- update missingEditions for rawhide+ ## 2.1.1 (2025-10-09) - F43 i3 moved to Kiwi - add COSMIC-Atomic@@ -182,4 +189,4 @@ - use new http-directory library to check exact filesize  ## 0.1-* initial release+- initial release
README.md view
@@ -73,7 +73,7 @@ `$ dl-fedora --version`  ```-2.1.1+2.2 ``` `$ dl-fedora --help` @@ -87,8 +87,8 @@                  [(-L|--latest) | --dl | (-k|--koji) | (-m|--mirror URL)]                   [--dvd] [--cs-devel | --cs-test | --cs-production]                   [--alt-cs-extra-edition ('MAX'|'MIN')] [-a|--arch ARCH] RELEASE-                 [--all-desktops | --all-spins | --all-editions | [-x|--exclude]-                   [EDITION...]]+                 [--all-desktops | --all-spins | --all-editions | +                   --all-variants | [-x|--exclude] [EDITION...]]    Tool for downloading Fedora iso file images.   EDITION = {cloud,container,everything,kde,server,workstation,budgie,cinnamon,@@ -135,6 +135,7 @@   --all-desktops           Get all Fedora desktops   --all-spins              Get all Fedora Spins   --all-editions           Get all Fedora editions+  --all-variants           Get all Fedora variants   -x,--exclude             Exclude specified editions ``` 
dl-fedora.cabal view
@@ -1,6 +1,6 @@-cabal-version:       1.18+cabal-version:       2.0 name:                dl-fedora-version:             2.1.1+version:             2.2 synopsis:            Fedora image download tool description:             Tool to download Fedora and Centos Stream iso and image files.@@ -27,6 +27,7 @@ executable dl-fedora   hs-source-dirs:      src   main-is:             Main.hs+  autogen-modules:     Paths_dl_fedora   other-modules:       Paths_dl_fedora                        DownloadDir 
src/Main.hs view
@@ -124,9 +124,8 @@  type URL = String -fedoraSpins :: Release -> [FedoraEdition]-fedoraSpins rel =-  (if fedoraVerOrLater 42 rel then id else (KDE :)) [Budgie .. Xfce]+fedoraSpins :: [FedoraEdition]+fedoraSpins = [Budgie .. Xfce]  fedoraVerOrLater :: Natural -> Release -> Bool fedoraVerOrLater _ Rawhide = True@@ -139,8 +138,8 @@ allSpins rawhide current rel =   case rel of     Rawhide -> allSpins rawhide current $ Fedora rawhide-    Fedora r -> fedoraSpins rel \\ missingEditions r-    FedoraRespin -> allSpins rawhide current (Fedora current) \\ [Cinnamon, KDEMobile, Miracle, Sway]+    Fedora r -> fedoraSpins \\ missingEditions r+    FedoraRespin -> allSpins rawhide current (Fedora current) \\ [KDEMobile,SoaS]     FedoraTest -> allSpins rawhide current $ Fedora current -- FIXME use fedora-releases     FedoraStage -> allSpins rawhide current $ Fedora (current + 1) -- FIXME use fedora-releases     CS 9 True -> [Cinnamon, KDE, MATE, Xfce] -- FIXME missing MAX, MIN@@ -149,15 +148,27 @@     CS _ _ -> []     ELN -> [] +allVariants :: Natural -> Natural -> Release -> [FedoraEdition]+allVariants rawhide current rel =+  case rel of+    Rawhide -> allVariants rawhide current $ Fedora rawhide+    Fedora r -> [minBound..maxBound] \\ missingEditions r+    FedoraRespin -> Workstation : allSpins rawhide current FedoraRespin+    FedoraTest -> allVariants rawhide current $ Fedora current -- FIXME use fedora-releases+    FedoraStage -> allVariants rawhide current $ Fedora (current + 1) -- FIXME use fedora-releases+    CS _ True -> Workstation : allSpins rawhide current rel+    CS _ False -> [Workstation]+    _ -> error' "--all-variants not supported for this release"+ allEditions :: Natural -> Natural -> Release -> [FedoraEdition] allEditions rawhide current rel =   case rel of     Rawhide -> allEditions rawhide current $ Fedora rawhide-    Fedora r -> [minBound..maxBound] \\ missingEditions r-    FedoraRespin -> Workstation : allSpins rawhide current FedoraRespin+    Fedora _ -> [Workstation, KDE, Server, Cloud, IoT]+    FedoraRespin -> [Workstation, KDE]     FedoraTest -> allEditions rawhide current $ Fedora current -- FIXME use fedora-releases     FedoraStage -> allEditions rawhide current $ Fedora (current + 1) -- FIXME use fedora-releases-    CS _ True -> Workstation : allSpins rawhide current rel+    CS _ True -> [Workstation, KDE]     CS _ False -> [Workstation]     _ -> error' "--all-editions not supported for this release" @@ -168,7 +179,7 @@           -- FIXME missing in rawhide           -- https://dl.fedoraproject.org/pub/fedora/linux/development/43/Spins/x86_64/iso/           -- https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Spins/x86_64/iso/-          if r > 43 then [I3, SoaS, Xfce] else []+          [KDEMobile | r > 43]     EQ -> [IoT, COSMIC_Atomic]     LT -> [COSMIC, COSMIC_Atomic] @@ -176,6 +187,7 @@                      | AllDesktops                      | AllSpins                      | AllEditions+                     | AllVariants   deriving Eq  data CheckSum = AutoCheckSum | NoCheckSum | CheckSum@@ -288,6 +300,7 @@     <*> (flagLongWith' AllDesktops "all-desktops" "Get all Fedora desktops" <|>          flagLongWith' AllSpins "all-spins" "Get all Fedora Spins" <|>          flagLongWith' AllEditions "all-editions" "Get all Fedora editions" <|>+         flagLongWith' AllVariants "all-variants" "Get all Fedora variants" <|>          (Editions            <$> switchWith 'x' "exclude" "Exclude specified editions"            <*> many (argumentWith auto "EDITION...")))@@ -361,17 +374,18 @@   successes <-     mapM (runProgramEdition mgr mirrorUrl showdestdir gpg checksum debug mode dryrun run mqemu mirror dvdnet mchannel mcsedition arch tgtrel reqeditions) $     if mode == List-    then [Workstation]+    then [Workstation] -- single dummy value     else       case reqeditions of-        AllDesktops -> Workstation : allSpins rawhide current tgtrel+        AllDesktops -> Workstation : KDE : allSpins rawhide current tgtrel         AllEditions -> allEditions rawhide current tgtrel+        AllVariants -> allVariants rawhide current tgtrel         AllSpins -> allSpins rawhide current tgtrel         Editions False editions ->           if null editions then [Workstation] else editions         Editions True [] -> error' "cannot exclude zero editions"         Editions True editions ->-           allEditions rawhide current tgtrel \\ editions+           allVariants rawhide current tgtrel \\ editions   let failures = length $ filter not successes   when (failures > 0) $ error' $ plural failures "download" +-+ "failed" @@ -444,9 +458,10 @@       current <- getCurrentFedoraVersion       let editions =             case reqeditions of-              AllDesktops -> Workstation : allSpins rawhide current tgtrel+              AllDesktops -> Workstation : KDE : allSpins rawhide current tgtrel+              AllEditions -> allEditions rawhide current tgtrel               AllSpins -> allSpins rawhide current tgtrel-              _ -> allEditions rawhide current tgtrel+              _ -> allVariants rawhide current tgtrel           extras =             case tgtrel of               CS _ True -> ["max","min"]@@ -611,7 +626,7 @@     urlPathMRel :: IO (FilePath, Maybe String)     urlPathMRel = do       let subdir =-            if edition `elem` fedoraSpins tgtrel+            if edition `elem` fedoraSpins             then joinPath ["Spins", showArch arch, "iso"]             else joinPath [showShortEdition tgtrel edition, showArch arch, editionMedia edition]       case tgtrel of@@ -723,6 +738,9 @@     -- https://pagure.io/pungi-fedora/blob/main/f/fedora.conf#_251 kiwibuild     kiwiSpins :: [FedoraEdition]     kiwiSpins =+      (if fedoraVerOrLater 44 tgtrel+       then [Cinnamon, LXDE, MATE, Sway]+       else []) ++       [I3 | fedoraVerOrLater 43 tgtrel] ++       -- https://fedoraproject.org/wiki/Changes/EROFSforLiveMedia       (if fedoraVerOrLater 42 tgtrel@@ -917,9 +935,9 @@ liveRespin Budgie = "Budgie" liveRespin COSMIC = "COSMIC" liveRespin I3 = "i3"-liveRespin LXQt = "LXQt"+-- liveRespin LXQt = "LXQt" liveRespin Miracle = "MiracleWM"-liveRespin Sway = "Sway"+-- liveRespin Sway = "Sway" liveRespin e = take 4 . upper . showEdition FedoraRespin $ e  bootImage :: Bool -> FilePath -> String -> Maybe String -> IO ()
test/tests.hs view
@@ -28,7 +28,7 @@     [["-c", latest, "silverblue"]     ,["-T", "-n", latest, "everything"]     ,["-n", previous, "server", "--dvd", "--arch", "aarch64"]-    ,["41", "iot", "-n"]+    ,["43", "iot", "-n"]     ,["-n", "c8s"]     ,["-n", "c9s", "--dvd"]     ,["-n", "c10s"]@@ -37,32 +37,32 @@     ,["-n", "c10s-live"]     ]     ++-    allFedoraEditions oldest rawhide+    allFedoraVariants oldest rawhide     ++     [["--dl", "-T", "-n", "respin", "--all-desktops"]     ,["-T", "-n", "c9s-live", "--all-desktops"]     ,["-T", "-n", "c10s-live", "--all-editions"]     ] -mkFedEdition :: Natural -> [String]-mkFedEdition = mkFedEdition' . show--mkFedEdition' :: String -> [String]-mkFedEdition' ver =-  ["--dl", "-T", "-n", ver, "--all-editions"]+mkFedVariants :: Natural -> [String]+mkFedVariants = mkFedVariants' . show+  where+    mkFedVariants' :: String -> [String]+    mkFedVariants' ver =+      ["--dl", "-T", "-n", ver, "--all-variants"] -allFedoraEditions :: Natural -> Natural -> [[String]]-allFedoraEditions oldest rawhide =-  map mkFedEdition [oldest..(rawhide-1)]+allFedoraVariants :: Natural -> Natural -> [[String]]+allFedoraVariants oldest rawhide =+  map mkFedVariants [oldest..(rawhide-1)]   -- currently empty-  -- ++ [mkFedEdition' "stage"]+  -- ++ [mkFedVariants' "stage"]   -- use --exclude for any missing-  ++ [mkFedEdition rawhide]+  ++ [mkFedVariants rawhide]  allEditions :: Natural -> [String] allEditions 9 = allEditions 10 ++ ["cinnamon", "mate", "xfce"] allEditions 10 = ["workstation", "kde", "max", "min"]-allEditions rel = ["cloud","container","everything","server","workstation","budgie","cinnamon","kde","lxde","lxqt","mate","sway","silverblue","kinoite","sericea"] ++ ["cosmic" | rel >= 42] ++ ["kdemobile" | rel >= 41] ++ ["miracle" | rel >= 41] ++ ["iot" | rel < 42] ++ ["onyx" | rel /= 43] ++ ["cosmic-atomic" | rel >= 43] ++ ["i3" | rel < 44] ++ ["soas" | rel < 44] ++ ["xfce" | rel < 44]+allEditions rel = ["cloud","container","everything","server","workstation","budgie","cinnamon","i3", "kde","lxde","lxqt","mate","soas","sway","xfce", "silverblue","kinoite","sericea"] ++ ["cosmic" | rel >= 42] ++ ["kdemobile" | rel >= 41 && rel < 44] ++ ["miracle" | rel >= 41] ++ ["iot" | rel < 42] ++ ["onyx" | rel /= 43] ++ ["cosmic-atomic" | rel >= 43]  listEditions :: Natural -> IO () listEditions n = do@@ -71,7 +71,7 @@   es <- sort . words <$> cmd "dl-fedora" args   let aes = sort $ allEditions n   unless (es == aes) $-    error' $ 'F' : show n +-+ "editions unmatched:\n" ++ show es ++ "\n" ++ show aes+    error' $ 'F' : show n +-+ "editions unmatched:\noutput: " ++ show es ++ "\nexpect: " ++ show aes  main :: IO () main = do