diff options
Diffstat (limited to 'gnu/packages/patches')
22 files changed, 1043 insertions, 300 deletions
diff --git a/gnu/packages/patches/asli-use-system-libs.patch b/gnu/packages/patches/asli-use-system-libs.patch new file mode 100644 index 0000000000..6c4518e04e --- /dev/null +++ b/gnu/packages/patches/asli-use-system-libs.patch @@ -0,0 +1,72 @@ +Adjust CMakeLists.txt to use system-provided mmg and yaml-cpp libraries. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b11c5ba..702423e 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,28 +122,8 @@ if(MMG_MESH) + add_definitions(-DMMG_MESH) + + # MMG +- set(MMG_PREFIX mmg3d) +- set(MMG_PREFIX_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX}) +- set(MMG_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX}) +- ExternalProject_Add(${MMG_PREFIX} +- PREFIX ${MMG_PREFIX_DIR} +- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/mmg +- +- BUILD_ALWAYS OFF +- INSTALL_DIR ${MMG_INSTALL_DIR} +- +- CMAKE_ARGS(-DCMAKE_BUILD_TYPE=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON +- -DLIBMMG3D_SHARED=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>) +- +- BUILD_COMMAND make +- INSTALL_COMMAND make install +- ) +- set(MMG3D_INCLUDE_DIRS "${MMG_INSTALL_DIR}/include") +- set(MMG3D_LIBRARIES "${MMG_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${MMG_PREFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") +- +- include_directories(${MMG3D_INCLUDE_DIRS}) +- #add_library(MMG3D STATIC IMPORTED) +- #set_target_properties(MMG3D PROPERTIES IMPORTED_LOCATION "${MMG3D_LIBRARIES}") ++ include_directories(${MMG_INCLUDE_DIR}) ++ set(MMG3D_LIBRARIES ${MMG_LIBRARY_DIR}/libmmg3d.so) + + # MshMet + set(MSHMET_PREFIX mshmet) +@@ -192,14 +172,8 @@ target_include_directories(tet PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/tetgen) + target_compile_definitions(tet PUBLIC TETLIBRARY) # -DTETLIBRARY: flag to compile tetgen as a library + + # yaml +-file(GLOB yaml_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/src/*.cpp) # Using file GLOB is not recomended! +-add_library(yaml STATIC) +-target_include_directories(yaml +- PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/include +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/src +-) +-target_sources(yaml PRIVATE ${yaml_SRC}) +-set_target_properties(yaml PROPERTIES CXX_STANDARD 11) ++find_package(yaml-cpp REQUIRED) ++include_directories(${YAML_CPP_INCLUDE_DIRS}) + + # Compile options for debuging + if(CMAKE_BUILD_TYPE MATCHES Debug) +@@ -259,7 +233,7 @@ if(MARCH_NATIVE) + endif() + + # Create entries for C++ files in "ASLI" routine +-target_link_libraries(ASLI PUBLIC alg tet yaml) ++target_link_libraries(ASLI PUBLIC alg tet ${YAML_CPP_LIBRARIES}) + if(NOT MSVC) + target_link_libraries(ASLI PUBLIC stdc++fs) + endif() +@@ -272,7 +246,7 @@ if(CGAL_MESH) + endif() + + if(MMG_MESH) +- add_dependencies(ASLI ${MMG_PREFIX} ${MSHMET_PREFIX}) ++ add_dependencies(ASLI ${MSHMET_PREFIX}) + target_link_libraries(ASLI PUBLIC ${MMG3D_LIBRARIES} ${MSHMET_LIBRARIES}) + if(SCOTCH_FOUND) + target_link_libraries(ASLI PUBLIC ${SCOTCH_LIBRARIES} scotch) diff --git a/gnu/packages/patches/ganeti-lens-compat.patch b/gnu/packages/patches/ganeti-lens-compat.patch new file mode 100644 index 0000000000..1b9108d78f --- /dev/null +++ b/gnu/packages/patches/ganeti-lens-compat.patch @@ -0,0 +1,40 @@ +Fix building against Lens 5 by commenting out type signatures(!). + +Taken from upstream: + + https://github.com/ganeti/ganeti/commit/5e30bad1bba63c9f6c782003ef2560f107a0ba24 + +diff --git a/src/Ganeti/Network.hs b/src/Ganeti/Network.hs +index 1cb6aa1ec..696c1cd1b 100644 +--- a/src/Ganeti/Network.hs ++++ b/src/Ganeti/Network.hs +@@ -87,11 +87,11 @@ data PoolPart = PoolInstances | PoolExt + addressPoolIso :: Iso' AddressPool BA.BitArray + addressPoolIso = iso apReservations AddressPool + +-poolLens :: PoolPart -> Lens' Network (Maybe AddressPool) ++--poolLens :: PoolPart -> Lens' Network (Maybe AddressPool) + poolLens PoolInstances = networkReservationsL + poolLens PoolExt = networkExtReservationsL + +-poolArrayLens :: PoolPart -> Lens' Network (Maybe BA.BitArray) ++--poolArrayLens :: PoolPart -> Lens' Network (Maybe BA.BitArray) + poolArrayLens part = poolLens part . mapping addressPoolIso + + netIpv4NumHosts :: Network -> Integer +diff --git a/src/Ganeti/Utils/MultiMap.hs b/src/Ganeti/Utils/MultiMap.hs +index d54da3ab0..279e9335a 100644 +--- a/src/Ganeti/Utils/MultiMap.hs ++++ b/src/Ganeti/Utils/MultiMap.hs +@@ -91,7 +91,7 @@ multiMap :: (Ord k, Ord v) => M.Map k (S.Set v) -> MultiMap k v + multiMap = MultiMap . M.filter (not . S.null) + + -- | A 'Lens' that allows to access a set under a given key in a multi-map. +-multiMapL :: (Ord k, Ord v) => k -> Lens' (MultiMap k v) (S.Set v) ++--multiMapL :: (Ord k, Ord v) => k -> Lens' (MultiMap k v) (S.Set v) + multiMapL k f = fmap MultiMap + . at k (fmap (mfilter (not . S.null) . Just) + . f . fromMaybe S.empty) +-- +2.41.0 + diff --git a/gnu/packages/patches/ganeti-procps-compat.patch b/gnu/packages/patches/ganeti-procps-compat.patch new file mode 100644 index 0000000000..a2145274cb --- /dev/null +++ b/gnu/packages/patches/ganeti-procps-compat.patch @@ -0,0 +1,45 @@ +Fix compatibility with procps 4. + +Negative UIDs are no longer allowed. Use a very high one instead. + +Taken from upstream: + + https://github.com/ganeti/ganeti/commit/9cd67e6a81c66ed326d68ea8c3241d14eea6550b + +diff --git a/test/py/ganeti.uidpool_unittest.py b/test/py/ganeti.uidpool_unittest.py +index b2f5bc5cf2..2d9227cbf5 100755 +--- a/test/py/ganeti.uidpool_unittest.py ++++ b/test/py/ganeti.uidpool_unittest.py +@@ -106,23 +106,24 @@ def testRequestUnusedUid(self): + + # Check with a single, known unused user-id + # +- # We use "-1" here, which is not a valid user-id, so it's +- # guaranteed that it's unused. +- uid = uidpool.RequestUnusedUid(set([-1])) +- self.assertEqualValues(uid.GetUid(), -1) ++ # We use 2^30+42 here, which is a valid UID, but unlikely to be used on ++ # most systems (even as a subuid). ++ free_uid = 2**30 + 42 ++ uid = uidpool.RequestUnusedUid(set([free_uid])) ++ self.assertEqualValues(uid.GetUid(), free_uid) + + # Check uid-pool exhaustion + # +- # uid "-1" is locked now, so RequestUnusedUid is expected to fail ++ # free_uid is locked now, so RequestUnusedUid is expected to fail + self.assertRaises(errors.LockError, + uidpool.RequestUnusedUid, +- set([-1])) ++ set([free_uid])) + + # Check unlocking + uid.Unlock() + # After unlocking, "-1" should be available again +- uid = uidpool.RequestUnusedUid(set([-1])) +- self.assertEqualValues(uid.GetUid(), -1) ++ uid = uidpool.RequestUnusedUid(set([free_uid])) ++ self.assertEqualValues(uid.GetUid(), free_uid) + + + if __name__ == "__main__": diff --git a/gnu/packages/patches/ganeti-relax-dependencies.patch b/gnu/packages/patches/ganeti-relax-dependencies.patch new file mode 100644 index 0000000000..521b410b9e --- /dev/null +++ b/gnu/packages/patches/ganeti-relax-dependencies.patch @@ -0,0 +1,28 @@ +Relax version constraints to work with Stackage LTS 19. + +Taken from upstream: + + https://github.com/ganeti/ganeti/commit/4f8d61ea0101721eae1c6f43be8430d819e5e611 + +diff --git a/cabal/ganeti.template.cabal b/cabal/ganeti.template.cabal +index bb4ff8053..98491dd9f 100644 +--- a/cabal/ganeti.template.cabal ++++ b/cabal/ganeti.template.cabal +@@ -63,14 +63,14 @@ library + , unix >= 2.5.1.0 + , utf8-string >= 0.3.7 + +- , attoparsec >= 0.10.1.1 && < 0.14 +- , base64-bytestring >= 1.0.0.1 && < 1.2 ++ , attoparsec >= 0.10.1.1 && < 0.15 ++ , base64-bytestring >= 1.0.0.1 && < 1.3 + , case-insensitive >= 0.4.0.1 && < 1.3 + , curl >= 1.3.7 && < 1.4 + , hinotify >= 0.3.2 && < 0.5 + , hslogger >= 1.1.4 && < 1.4 + , json >= 0.5 && < 1.0 +- , lens >= 3.10 && < 5.0 ++ , lens >= 3.10 && < 6.0 + , lifted-base >= 0.2.0.3 && < 0.3 + , monad-control >= 0.3.1.3 && < 1.1 + , parallel >= 3.2.0.2 && < 3.3 diff --git a/gnu/packages/patches/ganeti-reorder-arbitrary-definitions.patch b/gnu/packages/patches/ganeti-reorder-arbitrary-definitions.patch new file mode 100644 index 0000000000..ba34c0bdd6 --- /dev/null +++ b/gnu/packages/patches/ganeti-reorder-arbitrary-definitions.patch @@ -0,0 +1,90 @@ +Fix ordering of Arbitrary definitions for GHC 9 compatibility. + +Taken from upstream: + + https://github.com/ganeti/ganeti/commit/feab8faa8fe055c89205497e4f277ae4c7b8caad + +diff --git a/test/hs/Test/Ganeti/Objects.hs b/test/hs/Test/Ganeti/Objects.hs +index 97ceb36dca..8d80be9e80 100644 +--- a/test/hs/Test/Ganeti/Objects.hs ++++ b/test/hs/Test/Ganeti/Objects.hs +@@ -93,8 +93,14 @@ instance Arbitrary (Container DataCollectorConfig) where + instance Arbitrary BS.ByteString where + arbitrary = genPrintableByteString + ++instance Arbitrary a => Arbitrary (Private a) where ++ arbitrary = Private <$> arbitrary ++ + $(genArbitrary ''PartialNDParams) + ++instance Arbitrary (Container J.JSValue) where ++ arbitrary = return $ GenericContainer Map.empty ++ + instance Arbitrary Node where + arbitrary = Node <$> genFQDN <*> genFQDN <*> genFQDN + <*> arbitrary <*> arbitrary <*> arbitrary <*> genFQDN +@@ -297,10 +303,6 @@ genDisk = genDiskWithChildren 3 + -- validation rules. + $(genArbitrary ''PartialISpecParams) + +--- | FIXME: This generates completely random data, without normal +--- validation rules. +-$(genArbitrary ''PartialIPolicy) +- + $(genArbitrary ''FilledISpecParams) + $(genArbitrary ''MinMaxISpecs) + $(genArbitrary ''FilledIPolicy) +@@ -309,6 +311,10 @@ $(genArbitrary ''FilledNDParams) + $(genArbitrary ''FilledNicParams) + $(genArbitrary ''FilledBeParams) + ++-- | FIXME: This generates completely random data, without normal ++-- validation rules. ++$(genArbitrary ''PartialIPolicy) ++ + -- | No real arbitrary instance for 'ClusterHvParams' yet. + instance Arbitrary ClusterHvParams where + arbitrary = return $ GenericContainer Map.empty +@@ -331,18 +337,12 @@ instance Arbitrary OsParams where + instance Arbitrary Objects.ClusterOsParamsPrivate where + arbitrary = (GenericContainer . Map.fromList) <$> arbitrary + +-instance Arbitrary a => Arbitrary (Private a) where +- arbitrary = Private <$> arbitrary +- + instance Arbitrary ClusterOsParams where + arbitrary = (GenericContainer . Map.fromList) <$> arbitrary + + instance Arbitrary ClusterBeParams where + arbitrary = (GenericContainer . Map.fromList) <$> arbitrary + +-instance Arbitrary IAllocatorParams where +- arbitrary = return $ GenericContainer Map.empty +- + $(genArbitrary ''Cluster) + + instance Arbitrary ConfigData where +diff --git a/test/hs/Test/Ganeti/Query/Language.hs b/test/hs/Test/Ganeti/Query/Language.hs +index 04fb8c3898..fa50196f00 100644 +--- a/test/hs/Test/Ganeti/Query/Language.hs ++++ b/test/hs/Test/Ganeti/Query/Language.hs +@@ -59,6 +59,9 @@ import Ganeti.Query.Language + instance Arbitrary (Filter FilterField) where + arbitrary = genFilter + ++instance Arbitrary FilterRegex where ++ arbitrary = genName >>= mkRegex -- a name should be a good regex ++ + -- | Custom 'Filter' generator (top-level), which enforces a + -- (sane) limit on the depth of the generated filters. + genFilter :: Gen (Filter FilterField) +@@ -97,9 +100,6 @@ $(genArbitrary ''QueryTypeLuxi) + + $(genArbitrary ''ItemType) + +-instance Arbitrary FilterRegex where +- arbitrary = genName >>= mkRegex -- a name should be a good regex +- + $(genArbitrary ''ResultStatus) + + $(genArbitrary ''FieldType) diff --git a/gnu/packages/patches/ganeti-template-haskell-2.17.patch b/gnu/packages/patches/ganeti-template-haskell-2.17.patch new file mode 100644 index 0000000000..be5948bb96 --- /dev/null +++ b/gnu/packages/patches/ganeti-template-haskell-2.17.patch @@ -0,0 +1,69 @@ +Handle GHC 9 changes in a backwards compatible manner. + +Taken from upstream: + + https://github.com/ganeti/ganeti/commit/b279fa738fd5b30320584f79f4d2f0e894315aab + +diff --git a/src/Ganeti/THH.hs b/src/Ganeti/THH.hs +index 818c11f84..9ab93d5e3 100644 +--- a/src/Ganeti/THH.hs ++++ b/src/Ganeti/THH.hs +@@ -884,7 +884,7 @@ genLoadOpCode opdefs fn = do + ) $ zip mexps opdefs + defmatch = Match WildP (NormalB fails) [] + cst = NoBindS $ CaseE (VarE opid) $ mpats++[defmatch] +- body = DoE [st, cst] ++ body = mkDoE [st, cst] + -- include "OP_ID" to the list of used keys + bodyAndOpId <- [| $(return body) + <* tell (mkUsedKeys . S.singleton . T.pack $ opidKey) |] +@@ -1541,7 +1541,7 @@ loadExcConstructor inname sname fields = do + [x] -> BindS (ListP [VarP x]) + _ -> BindS (TupP (map VarP f_names)) + cval = appCons name $ map VarE f_names +- return $ DoE [binds read_args, NoBindS (AppE (VarE 'return) cval)] ++ return $ mkDoE [binds read_args, NoBindS (AppE (VarE 'return) cval)] + + {-| Generates the loadException function. + +diff --git a/src/Ganeti/THH/Compat.hs b/src/Ganeti/THH/Compat.hs +index d29e30d18..1f51e49d7 100644 +--- a/src/Ganeti/THH/Compat.hs ++++ b/src/Ganeti/THH/Compat.hs +@@ -40,9 +40,11 @@ module Ganeti.THH.Compat + , extractDataDConstructors + , myNotStrict + , nonUnaryTupE ++ , mkDoE + ) where + + import Language.Haskell.TH ++import Language.Haskell.TH.Syntax + + -- | Convert Names to DerivClauses + -- +@@ -61,7 +63,11 @@ derivesFromNames names = map ConT names + -- + -- Handle TH 2.11 and 2.12 changes in a transparent manner using the pre-2.11 + -- API. ++#if MIN_VERSION_template_haskell(2,17,0) ++gntDataD :: Cxt -> Name -> [TyVarBndr ()] -> [Con] -> [Name] -> Dec ++#else + gntDataD :: Cxt -> Name -> [TyVarBndr] -> [Con] -> [Name] -> Dec ++#endif + gntDataD x y z a b = + #if MIN_VERSION_template_haskell(2,12,0) + DataD x y z Nothing a $ derivesFromNames b +@@ -114,3 +120,12 @@ nonUnaryTupE es = TupE $ map Just es + #else + nonUnaryTupE es = TupE $ es + #endif ++ ++-- | DoE is now qualified with an optional ModName ++mkDoE :: [Stmt] -> Exp ++mkDoE s = ++#if MIN_VERSION_template_haskell(2,17,0) ++ DoE Nothing s ++#else ++ DoE s ++#endif diff --git a/gnu/packages/patches/ganeti-template-haskell-2.18.patch b/gnu/packages/patches/ganeti-template-haskell-2.18.patch new file mode 100644 index 0000000000..e7be869636 --- /dev/null +++ b/gnu/packages/patches/ganeti-template-haskell-2.18.patch @@ -0,0 +1,179 @@ +Fix compatibility with Template Haskell 2.18 and GHC 9.2. + + +diff --git a/src/Ganeti/BasicTypes.hs b/src/Ganeti/BasicTypes.hs +index 10d0426cd..d68bc7d5b 100644 +--- a/src/Ganeti/BasicTypes.hs ++++ b/src/Ganeti/BasicTypes.hs +@@ -206,12 +206,12 @@ instance MonadTrans (ResultT a) where + instance (MonadIO m, Error a) => MonadIO (ResultT a m) where + liftIO = ResultT . liftIO + . liftM (either (failError . show) return) +- . (try :: IO a -> IO (Either IOError a)) ++ . (try :: IO α -> IO (Either IOError α)) + + instance (MonadBase IO m, Error a) => MonadBase IO (ResultT a m) where + liftBase = ResultT . liftBase + . liftM (either (failError . show) return) +- . (try :: IO a -> IO (Either IOError a)) ++ . (try :: IO α -> IO (Either IOError α)) + + instance (Error a) => MonadTransControl (ResultT a) where + #if MIN_VERSION_monad_control(1,0,0) +diff --git a/src/Ganeti/Lens.hs b/src/Ganeti/Lens.hs +index faa5900ed..747366e6a 100644 +--- a/src/Ganeti/Lens.hs ++++ b/src/Ganeti/Lens.hs +@@ -93,14 +93,14 @@ makeCustomLenses' name lst = makeCustomLensesFiltered f name + -- Most often the @g@ functor is @(,) r@ and 'traverseOf2' is used to + -- traverse an effectful computation that also returns an additional output + -- value. +-traverseOf2 :: Over (->) (Compose f g) s t a b +- -> (a -> f (g b)) -> s -> f (g t) ++-- traverseOf2 :: Over (->) (Compose f g) s t a b ++-- -> (a -> f (g b)) -> s -> f (g t) + traverseOf2 k f = getCompose . traverseOf k (Compose . f) + + -- | Traverses over a composition of a monad and a functor. + -- See 'traverseOf2'. +-mapMOf2 :: Over (->) (Compose (WrappedMonad m) g) s t a b +- -> (a -> m (g b)) -> s -> m (g t) ++-- mapMOf2 :: Over (->) (Compose (WrappedMonad m) g) s t a b ++-- -> (a -> m (g b)) -> s -> m (g t) + mapMOf2 k f = unwrapMonad . traverseOf2 k (WrapMonad . f) + + -- | A helper lens over sets. +diff --git a/src/Ganeti/THH.hs b/src/Ganeti/THH.hs +index 9ab93d5e3..9a10a9a07 100644 +--- a/src/Ganeti/THH.hs ++++ b/src/Ganeti/THH.hs +@@ -996,8 +996,8 @@ buildAccessor fnm fpfx rnm rpfx nm pfx field = do + f_body = AppE (VarE fpfx_name) $ VarE x + return $ [ SigD pfx_name $ ArrowT `AppT` ConT nm `AppT` ftype + , FunD pfx_name +- [ Clause [ConP rnm [VarP x]] (NormalB r_body) [] +- , Clause [ConP fnm [VarP x]] (NormalB f_body) [] ++ [ Clause [myConP rnm [VarP x]] (NormalB r_body) [] ++ , Clause [myConP fnm [VarP x]] (NormalB f_body) [] + ]] + + -- | Build lense declartions for a field. +@@ -1037,10 +1037,10 @@ buildLens (fnm, fdnm) (rnm, rdnm) nm pfx ar (field, i) = do + (ConE cdn) + $ zip [0..] vars + let setterE = LamE [VarP context, VarP var] $ CaseE (VarE context) +- [ Match (ConP fnm [ConP fdnm . set (element i) WildP ++ [ Match (myConP fnm [myConP fdnm . set (element i) WildP + $ map VarP vars]) + (body (not isSimple) fnm fdnm) [] +- , Match (ConP rnm [ConP rdnm . set (element i) WildP ++ , Match (myConP rnm [myConP rdnm . set (element i) WildP + $ map VarP vars]) + (body False rnm rdnm) [] + ] +@@ -1098,9 +1098,9 @@ buildObjectWithForthcoming sname field_pfx fields = do + $ JSON.showJSON $(varE x) |] + let rdjson = FunD 'JSON.readJSON [Clause [] (NormalB read_body) []] + shjson = FunD 'JSON.showJSON +- [ Clause [ConP (mkName real_nm) [VarP x]] ++ [ Clause [myConP (mkName real_nm) [VarP x]] + (NormalB show_real_body) [] +- , Clause [ConP (mkName forth_nm) [VarP x]] ++ , Clause [myConP (mkName forth_nm) [VarP x]] + (NormalB show_forth_body) [] + ] + instJSONdecl = gntInstanceD [] (AppT (ConT ''JSON.JSON) (ConT name)) +@@ -1121,9 +1121,9 @@ buildObjectWithForthcoming sname field_pfx fields = do + (fromDictWKeys $(varE xs)) |] + todictx_r <- [| toDict $(varE x) |] + todictx_f <- [| ("forthcoming", JSON.JSBool True) : toDict $(varE x) |] +- let todict = FunD 'toDict [ Clause [ConP (mkName real_nm) [VarP x]] ++ let todict = FunD 'toDict [ Clause [myConP (mkName real_nm) [VarP x]] + (NormalB todictx_r) [] +- , Clause [ConP (mkName forth_nm) [VarP x]] ++ , Clause [myConP (mkName forth_nm) [VarP x]] + (NormalB todictx_f) [] + ] + fromdict = FunD 'fromDictWKeys [ Clause [VarP xs] +@@ -1136,9 +1136,9 @@ buildObjectWithForthcoming sname field_pfx fields = do + let forthPredDecls = [ SigD forthPredName + $ ArrowT `AppT` ConT name `AppT` ConT ''Bool + , FunD forthPredName +- [ Clause [ConP (mkName real_nm) [WildP]] ++ [ Clause [myConP (mkName real_nm) [WildP]] + (NormalB $ ConE 'False) [] +- , Clause [ConP (mkName forth_nm) [WildP]] ++ , Clause [myConP (mkName forth_nm) [WildP]] + (NormalB $ ConE 'True) [] + ] + ] +@@ -1412,9 +1412,9 @@ savePParamField fvar field = do + normalexpr <- saveObjectField actualVal field + -- we have to construct the block here manually, because we can't + -- splice-in-splice +- return $ CaseE (VarE fvar) [ Match (ConP 'Nothing []) ++ return $ CaseE (VarE fvar) [ Match (myConP 'Nothing []) + (NormalB (ConE '[])) [] +- , Match (ConP 'Just [VarP actualVal]) ++ , Match (myConP 'Just [VarP actualVal]) + (NormalB normalexpr) [] + ] + +@@ -1440,9 +1440,9 @@ fillParam sname field_pfx fields = do + -- due to apparent bugs in some older GHC versions, we need to add these + -- prefixes to avoid "binding shadows ..." errors + fbinds <- mapM (newName . ("f_" ++) . nameBase) fnames +- let fConP = ConP name_f (map VarP fbinds) ++ let fConP = myConP name_f (map VarP fbinds) + pbinds <- mapM (newName . ("p_" ++) . nameBase) pnames +- let pConP = ConP name_p (map VarP pbinds) ++ let pConP = myConP name_p (map VarP pbinds) + -- PartialParams instance -------- + -- fillParams + let fromMaybeExp fn pn = AppE (AppE (VarE 'fromMaybe) (VarE fn)) (VarE pn) +@@ -1462,7 +1462,7 @@ fillParam sname field_pfx fields = do + memptyClause = Clause [] (NormalB memptyExp) [] + -- mappend + pbinds2 <- mapM (newName . ("p2_" ++) . nameBase) pnames +- let pConP2 = ConP name_p (map VarP pbinds2) ++ let pConP2 = myConP name_p (map VarP pbinds2) + -- note the reversal of 'l' and 'r' in the call to <|> + -- as we want the result to be the rightmost value + let altExp = zipWith (\l r -> AppE (AppE (VarE '(<|>)) (VarE r)) (VarE l)) +@@ -1575,9 +1575,9 @@ genLoadExc tname sname opdefs = do + opdefs + -- the first function clause; we can't use [| |] due to TH + -- limitations, so we have to build the AST by hand +- let clause1 = Clause [ConP 'JSON.JSArray +- [ListP [ConP 'JSON.JSString [VarP exc_name], +- VarP exc_args]]] ++ let clause1 = Clause [myConP 'JSON.JSArray ++ [ListP [myConP 'JSON.JSString [VarP exc_name], ++ VarP exc_args]]] + (NormalB (CaseE (AppE (VarE 'JSON.fromJSString) + (VarE exc_name)) + (str_matches ++ [defmatch]))) [] +diff --git a/src/Ganeti/THH/Compat.hs b/src/Ganeti/THH/Compat.hs +index 1f51e49d7..9b07c47ef 100644 +--- a/src/Ganeti/THH/Compat.hs ++++ b/src/Ganeti/THH/Compat.hs +@@ -41,6 +41,7 @@ module Ganeti.THH.Compat + , myNotStrict + , nonUnaryTupE + , mkDoE ++ , myConP + ) where + + import Language.Haskell.TH +@@ -129,3 +130,11 @@ mkDoE s = + #else + DoE s + #endif ++ ++-- | ConP is now qualified with an optional [Type]. ++myConP :: Name -> [Pat] -> Pat ++myConP n patterns = ConP n ++#if MIN_VERSION_template_haskell(2,18,0) ++ [] ++#endif ++ patterns diff --git a/gnu/packages/patches/go-github-com-wraparound-wrap-free-fonts.patch b/gnu/packages/patches/go-github-com-wraparound-wrap-free-fonts.patch new file mode 100644 index 0000000000..91b187a2d3 --- /dev/null +++ b/gnu/packages/patches/go-github-com-wraparound-wrap-free-fonts.patch @@ -0,0 +1,84 @@ +Index: wrap-source/pkg/pdf/fonts.go +=================================================================== +--- wrap-source.orig/pkg/pdf/fonts.go ++++ wrap-source/pkg/pdf/fonts.go +@@ -36,15 +36,15 @@ var ( + BoldItalic: []string{"Courier Prime Bold Italic.ttf"}, + } + +- CourierNew = Font{ +- RomanName: "Courier New", +- Roman: []string{"Courier New.ttf", "cour.ttf"}, +- BoldName: "Courier New Bold", +- Bold: []string{"Courier New Bold.ttf", "courbd.ttf"}, +- ItalicName: "Courier New Italic", +- Italic: []string{"Courier New Italic.ttf", "couri.ttf"}, +- BoldItalicName: "Courier New Bold Italic", +- BoldItalic: []string{"Courier New Bold Italic.ttf", "courbi.ttf"}, ++ LiberationMono = Font{ ++ RomanName: "Liberation Mono Regular", ++ Roman: []string{"LiberationMono-Regular.ttf"}, ++ BoldName: "Liberation Mono Bold", ++ Bold: []string{"LiberationMono-Bold.ttf"}, ++ ItalicName: "Liberation Mono Italic", ++ Italic: []string{"LiberationMono-Italic.ttf"}, ++ BoldItalicName: "Liberation Mono Bold Italic", ++ BoldItalic: []string{"LiberationMono-BoldItalic.ttf"}, + } + + FreeMono = Font{ +@@ -151,9 +151,8 @@ func loadFonts() { + err := loadFont(CourierPrime) + + if err != nil { +- // Courier New should be available on macOS and Windows + fmt.Fprintln(os.Stderr, "Warning: "+err.Error()) +- err = loadFont(CourierNew) ++ err = loadFont(LiberationMono) + + if err != nil { + // FreeMono as a final attempt +Index: wrap-source/pkg/cli/pdf.go +=================================================================== +--- wrap-source.orig/pkg/cli/pdf.go ++++ wrap-source/pkg/cli/pdf.go +@@ -22,7 +22,7 @@ var pdfCmd = &cobra.Command{ + var ( + pdfProductionFlag bool + useCourierPrime bool +- useCourierNew bool ++ useLiberationMono bool + useFreeMono bool + pageSize string + font string +@@ -31,7 +31,7 @@ var ( + func init() { + pdfCmd.Flags().BoolVarP(&pdfProductionFlag, "production", "p", false, "add scene numbers and other production text") + pdfCmd.Flags().BoolVar(&useCourierPrime, "use-courier-prime", false, "force the usage of Courier Prime") +- pdfCmd.Flags().BoolVar(&useCourierNew, "use-courier-new", false, "force the usage of Courier New") ++ pdfCmd.Flags().BoolVar(&useLiberationMono, "use-courier-new", false, "force the usage of Liberation Mono") + pdfCmd.Flags().BoolVar(&useFreeMono, "use-freemono", false, "force the usage of GNU FreeMono") + pdfCmd.Flags().StringVar(&pageSize, "page-size", "", "choose page size (letter or a4)") + pdfCmd.RegisterFlagCompletionFunc("page-size", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { +@@ -46,8 +46,8 @@ func pdfRun(cmd *cobra.Command, args []s + // Evaluate font selection + pdf.AutoFontSelection = false + +- if (font != "" && atLeastOne(useCourierPrime, useCourierNew, useFreeMono)) || +- moreThanOne(useCourierPrime, useCourierNew, useFreeMono) { ++ if (font != "" && atLeastOne(useCourierPrime, useLiberationMono, useFreeMono)) || ++ moreThanOne(useCourierPrime, useLiberationMono, useFreeMono) { + // The fonts are mutualy exclusive so throw an error + handle(errors.New("tried to force multiple fonts at the same time")) + } +@@ -77,8 +77,8 @@ func pdfRun(cmd *cobra.Command, args []s + } else if useCourierPrime { + pdf.SelectedFont = pdf.CourierPrime + +- } else if useCourierNew { +- pdf.SelectedFont = pdf.CourierNew ++ } else if useLiberationMono { ++ pdf.SelectedFont = pdf.LiberationMono + + } else if useFreeMono { + pdf.SelectedFont = pdf.FreeMono diff --git a/gnu/packages/patches/intel-xed-fix-nondeterminism.patch b/gnu/packages/patches/intel-xed-fix-nondeterminism.patch deleted file mode 100644 index c81bd0edde..0000000000 --- a/gnu/packages/patches/intel-xed-fix-nondeterminism.patch +++ /dev/null @@ -1,113 +0,0 @@ -This patch removes sources of build non-determinism in the upstream sources. - -In particular, many of the compiled sources are generated with Python code, -which in turn uses dictionaries to index the output C functions. However, -iterators over Python dictionaries have no guaranteed order, thus resulting in -the C functions being output in a random order between builds. - -The patch below fixes this by forcing an order during output in several key -places. Note, however, that future updates may uncover new such places that -just happen to be non-problematic at the time of this patch. If you are -reading this due to finding such issues, feel free to contact me at -elaexuotee@wilsonb.com for help. - -diff --git a/pysrc/ild_codegen.py b/pysrc/ild_codegen.py -index 628ec45..a9bff79 100755 ---- a/pysrc/ild_codegen.py -+++ b/pysrc/ild_codegen.py -@@ -188,14 +188,14 @@ def gen_l2_func_list(agi, target_nt_dict, arg_nt_dict, - ild_t_member): - """generate L2 functions""" - l2_func_list = [] -- for (nt_name,array) in target_nt_dict.items(): -+ for (nt_name,array) in sorted(target_nt_dict.items()): - target_opname = array.get_target_opname() - if array.is_const_lookup_fun(): - fo = gen_const_l2_function(agi, nt_name, - target_opname, ild_t_member) - l2_func_list.append(fo) - else: -- for arg_nt_seq,arg_arr in arg_nt_dict.items(): -+ for arg_nt_seq,arg_arr in sorted(arg_nt_dict.items()): - fo = gen_scalable_l2_function(agi, nt_name, - target_opname, ild_t_member, arg_arr, list(arg_nt_seq)) - l2_func_list.append(fo) -diff --git a/pysrc/ild_disp.py b/pysrc/ild_disp.py -index 942c036..cf80e29 100755 ---- a/pysrc/ild_disp.py -+++ b/pysrc/ild_disp.py -@@ -350,7 +350,8 @@ def work(agi, united_lookup, disp_nts, brdisp_nts, ild_gendir, - disp_dict = _gen_l3_array_dict(agi, disp_nts, _disp_token) - - -- nt_arr_list = list(brdisp_dict.values()) + list(disp_dict.values()) -+ nt_arr_list = ([v for (k,v) in sorted(brdisp_dict.items())] + -+ [v for (k,v) in sorted(disp_dict.items())]) - #create function that calls all initialization functions - init_f = ild_nt.gen_init_function(nt_arr_list, 'xed_ild_disp_l3_init') - -@@ -367,7 +368,7 @@ def work(agi, united_lookup, disp_nts, brdisp_nts, ild_gendir, - l2_functions = [] - eosz_op = ild_eosz.get_target_opname() - easz_op = ild_easz.get_target_opname() -- for nt_name,array in list(disp_dict.items()) + list(brdisp_dict.items()): -+ for nt_name,array in sorted(disp_dict.items()) + sorted(brdisp_dict.items()): - #Some DISP NTs depend on EOSZ, others on EASZ, we need to know - #that when we generate L2 functions - if eosz_op in array.get_arg_names(): -diff --git a/pysrc/ild_easz.py b/pysrc/ild_easz.py -index 02cd691..c53b9f2 100755 ---- a/pysrc/ild_easz.py -+++ b/pysrc/ild_easz.py -@@ -165,9 +165,10 @@ def work(agi, united_lookup, easz_nts, ild_gendir, debug): - return - nt_seq_arrays[tuple(nt_seq)] = array - #init function calls all single init functions for the created tables -- init_f = ild_nt.gen_init_function(list(nt_seq_arrays.values()), -+ nt_seq_values = [v for (k,v) in sorted(nt_seq_arrays.items())] -+ init_f = ild_nt.gen_init_function(nt_seq_values, - 'xed_ild_easz_init') -- ild_nt.dump_lu_arrays(agi, list(nt_seq_arrays.values()), _easz_c_fn, -+ ild_nt.dump_lu_arrays(agi, nt_seq_values, _easz_c_fn, - mbuild.join('include-private', _easz_header_fn), - init_f) - getter_fos = [] -diff --git a/pysrc/ild_eosz.py b/pysrc/ild_eosz.py -index 6643bc3..89d2d89 100755 ---- a/pysrc/ild_eosz.py -+++ b/pysrc/ild_eosz.py -@@ -200,10 +200,11 @@ def work(agi, united_lookup, eosz_nts, ild_gendir, debug): - return None - nt_seq_arrays[tuple(nt_seq)] = array - #init function calls all single init functions for the created tables -- init_f = ild_nt.gen_init_function(list(nt_seq_arrays.values()), -+ nt_seq_values = [v for (k,v) in sorted(nt_seq_arrays.items())] -+ init_f = ild_nt.gen_init_function(nt_seq_values, - 'xed_ild_eosz_init') - #dump init and lookup functions for EOSZ sequences -- ild_nt.dump_lu_arrays(agi, list(nt_seq_arrays.values()), _eosz_c_fn, -+ ild_nt.dump_lu_arrays(agi, nt_seq_values, _eosz_c_fn, - mbuild.join('include-private', _eosz_header_fn), - init_f) - #generate EOSZ getter functions - they get xed_decoded_inst_t* -diff --git a/pysrc/ild_imm.py b/pysrc/ild_imm.py -index 51c413c..0530bae 100755 ---- a/pysrc/ild_imm.py -+++ b/pysrc/ild_imm.py -@@ -322,12 +322,14 @@ def work(agi, united_lookup, imm_nts, ild_gendir, eosz_dict, - level='l3') - nt_dict[nt_name] = array - -+ nt_dict_values = [v for (k,v) in sorted(nt_dict.items())] -+ - #create function that calls all initialization functions for L3 -- init_f = ild_nt.gen_init_function(list(nt_dict.values()), -+ init_f = ild_nt.gen_init_function(nt_dict_values, - 'xed_ild_imm_l3_init') - - #dump L3 functions -- ild_nt.dump_lu_arrays(agi, list(nt_dict.values()), _l3_c_fn, -+ ild_nt.dump_lu_arrays(agi, nt_dict_values, _l3_c_fn, - mbuild.join('include-private',_l3_header_fn), - init_f) - diff --git a/gnu/packages/patches/iputils-libcap-compat.patch b/gnu/packages/patches/iputils-libcap-compat.patch deleted file mode 100644 index dc6da310ce..0000000000 --- a/gnu/packages/patches/iputils-libcap-compat.patch +++ /dev/null @@ -1,37 +0,0 @@ -Fix name clash with libcap 2.29. - -Taken from upstream: -https://github.com/iputils/iputils/commit/18f9a84e0e702841d6cc4d5f593de4fbd1348e83 - -diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c ---- a/ninfod/ninfod.c -+++ b/ninfod/ninfod.c -@@ -455,7 +455,7 @@ static void do_daemonize(void) - /* --------- */ - #ifdef HAVE_LIBCAP - static const cap_value_t cap_net_raw = CAP_NET_RAW; --static const cap_value_t cap_setuid = CAP_SETUID; -+static const cap_value_t cap_setuserid = CAP_SETUID; - static cap_flag_value_t cap_ok; - #else - static uid_t euid; -@@ -487,7 +487,7 @@ static void limit_capabilities(void) - - cap_get_flag(cap_cur_p, CAP_SETUID, CAP_PERMITTED, &cap_ok); - if (cap_ok != CAP_CLEAR) -- cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET); -+ cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET); - - if (cap_set_proc(cap_p) < 0) { - DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno)); -@@ -520,8 +520,8 @@ static void drop_capabilities(void) - - /* setuid / setuid */ - if (cap_ok != CAP_CLEAR) { -- cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET); -- cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuid, CAP_SET); -+ cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET); -+ cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuserid, CAP_SET); - - if (cap_set_proc(cap_p) < 0) { - DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno)); diff --git a/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch b/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch deleted file mode 100644 index 4a6e1223ec..0000000000 --- a/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Dan Horák <dan@danny.cz> -Subject: Add support for Python 3.9 - -Origin: upstream, https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff;h=9b0ad5177bd692f7556a4756bdbd2da81d9c34ce -Bug-Debian: https://bugs.debian.org/972769 - -diff --git a/configure.ac b/configure.ac -index f9958b3..2917cb3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -100,7 +100,7 @@ SR_PKG_CHECK_SUMMARY([srd_pkglibs_summary]) - # first, since usually only that variant will add "-lpython3.8". - # https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build - SR_PKG_CHECK([python3], [SRD_PKGLIBS], -- [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2]) -+ [python-3.9-embed], [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2]) - AS_IF([test "x$sr_have_python3" = xno], - [AC_MSG_ERROR([Cannot find Python 3 development headers.])]) - diff --git a/gnu/packages/patches/python-pyflakes-test-location.patch b/gnu/packages/patches/python-pyflakes-test-location.patch deleted file mode 100644 index ea2c50c82e..0000000000 --- a/gnu/packages/patches/python-pyflakes-test-location.patch +++ /dev/null @@ -1,42 +0,0 @@ -This patch fixes test failure related to reported source code locations. -It is a backport of this patch: - - commit 6a5f38b5ab12260fde8a0463acd433bc2d34dbcf - Author: Louis Sautier <sautier.louis@gmail.com> - Date: Sat Oct 3 02:37:53 2020 +0200 - - Fix tests with Python 3.9, closes #549 (#586) - - Stop allowing failures on Python nightly. - -diff --git a/pyflakes/test/test_api.py b/pyflakes/test/test_api.py -index 128aa69..b728e65 100644 ---- a/pyflakes/test/test_api.py -+++ b/pyflakes/test/test_api.py -@@ -515,6 +515,8 @@ def foo(bar=baz, bax): - if ERROR_HAS_LAST_LINE: - if PYPY and sys.version_info >= (3,): - column = 7 -+ elif sys.version_info >= (3, 9): -+ column = 21 - elif sys.version_info >= (3, 8): - column = 9 - else: -@@ -543,6 +545,8 @@ foo(bar=baz, bax) - if ERROR_HAS_LAST_LINE: - if PYPY and sys.version_info >= (3,): - column = 12 -+ elif sys.version_info >= (3, 9): -+ column = 17 - elif sys.version_info >= (3, 8): - column = 14 - else: -@@ -577,6 +581,8 @@ foo(bar=baz, bax) - position_end = 1 - if PYPY: - column = 6 -+ elif ver >= (3, 9): -+ column = 13 - else: - column = 7 - # Column has been "fixed" since 3.2.4 and 3.3.1 diff --git a/gnu/packages/patches/python-w3lib-fix-test-failure.patch b/gnu/packages/patches/python-w3lib-fix-test-failure.patch deleted file mode 100644 index f38fc749df..0000000000 --- a/gnu/packages/patches/python-w3lib-fix-test-failure.patch +++ /dev/null @@ -1,60 +0,0 @@ -From fae6cc40e112cd13697cb0e8d79976f32c72491d Mon Sep 17 00:00:00 2001 -From: Eugenio Lacuesta <eugenio.lacuesta@gmail.com> -Date: Wed, 10 Mar 2021 12:31:05 -0300 -Subject: [PATCH] [CI] Mark single add_or_replace_parameter test as xfail - ---- -This patch is based on upstream commit -fae6cc40e112cd13697cb0e8d79976f32c72491d which is part of -https://github.com/scrapy/w3lib/pull/166. - - .gitignore | 3 ++- - tests/test_url.py | 25 ++++++++++++++----------- - 2 files changed, 16 insertions(+), 12 deletions(-) - -diff --git a/tests/test_url.py b/tests/test_url.py -index 8b07c00..0f7458e 100644 ---- a/tests/test_url.py -+++ b/tests/test_url.py -@@ -1,12 +1,14 @@ --# -*- coding: utf-8 -*- - from __future__ import absolute_import - import os - import unittest -+ -+import pytest -+from six.moves.urllib.parse import urlparse -+ - from w3lib.url import (is_url, safe_url_string, safe_download_url, - url_query_parameter, add_or_replace_parameter, url_query_cleaner, - file_uri_to_path, parse_data_uri, path_to_file_uri, any_to_uri, - urljoin_rfc, canonicalize_url, parse_url, add_or_replace_parameters) --from six.moves.urllib.parse import urlparse - - - class UrlTests(unittest.TestCase): -@@ -310,10 +311,6 @@ def test_add_or_replace_parameter(self): - self.assertEqual(add_or_replace_parameter(url, 'arg3', 'nv3'), - 'http://domain/test?arg1=v1&arg2=v2&arg3=nv3') - -- url = 'http://domain/test?arg1=v1;arg2=v2' -- self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'), -- 'http://domain/test?arg1=v3&arg2=v2') -- - self.assertEqual(add_or_replace_parameter("http://domain/moreInfo.asp?prodID=", 'prodID', '20'), - 'http://domain/moreInfo.asp?prodID=20') - url = 'http://rmc-offers.co.uk/productlist.asp?BCat=2%2C60&CatID=60' -@@ -338,6 +335,13 @@ def test_add_or_replace_parameter(self): - self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'), - 'http://domain/test?arg1=v3&arg2=v2') - -+ @pytest.mark.xfail(reason="https://github.com/scrapy/w3lib/issues/164") -+ def test_add_or_replace_parameter_fail(self): -+ self.assertEqual( -+ add_or_replace_parameter('http://domain/test?arg1=v1;arg2=v2', 'arg1', 'v3'), -+ 'http://domain/test?arg1=v3&arg2=v2' -+ ) -+ - def test_add_or_replace_parameters(self): - url = 'http://domain/test' - self.assertEqual(add_or_replace_parameters(url, {'arg': 'v'}), diff --git a/gnu/packages/patches/qemu-disable-aarch64-migration-test.patch b/gnu/packages/patches/qemu-disable-aarch64-migration-test.patch deleted file mode 100644 index bf60ed23bb..0000000000 --- a/gnu/packages/patches/qemu-disable-aarch64-migration-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -Disable the qtest-aarch64/migration-test, which sometimes fail non-deterministically. -See: https://gitlab.com/qemu-project/qemu/-/issues/1230. - ---- qemu-7.1.0/tests/qtest/meson.build.old 1969-12-31 19:00:01.000000000 -0500 -+++ qemu-7.1.0/tests/qtest/meson.build 2022-09-26 11:11:05.434209797 -0400 -@@ -219,7 +219,6 @@ - ['arm-cpu-features', - 'numa-test', - 'boot-serial-test', -- 'migration-test', - 'bcm2835-dma-test'] - - qtests_s390x = \ diff --git a/gnu/packages/patches/qemu-disable-some-qtests-tests.patch b/gnu/packages/patches/qemu-disable-some-qtests-tests.patch new file mode 100644 index 0000000000..f60698de8f --- /dev/null +++ b/gnu/packages/patches/qemu-disable-some-qtests-tests.patch @@ -0,0 +1,52 @@ +Disable the qtest-aarch64/migration-test, which sometimes fail +non-deterministically (see: +https://gitlab.com/qemu-project/qemu/-/issues/1230). + +Also disable the bios-tables-test, which may fail on older machines (see: +https://gitlab.com/qemu-project/qemu/-/issues/1098). + +--- qemu-8.1.0/tests/qtest/meson.build.old 2023-08-30 11:48:27.871146249 -0400 ++++ qemu-8.1.0/tests/qtest/meson.build 2023-08-30 13:53:25.994084948 -0400 +@@ -1,6 +1,5 @@ + slow_qtests = { + 'ahci-test' : 60, +- 'bios-tables-test' : 120, + 'boot-serial-test' : 60, + 'migration-test' : 150, + 'npcm7xx_pwm-test': 150, +@@ -81,9 +80,6 @@ + config_all_devices.has_key('CONFIG_Q35') and \ + config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \ + slirp.found() ? ['virtio-net-failover'] : []) + \ +- (unpack_edk2_blobs and \ +- config_all_devices.has_key('CONFIG_HPET') and \ +- config_all_devices.has_key('CONFIG_PARALLEL') ? ['bios-tables-test'] : []) + \ + qtests_pci + \ + qtests_cxl + \ + ['fdc-test', +@@ -212,7 +208,6 @@ + + # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional + qtests_aarch64 = \ +- (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ + (config_all.has_key('CONFIG_TCG') and config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? \ + ['tpm-tis-device-test', 'tpm-tis-device-swtpm-test'] : []) + \ + (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \ +@@ -222,8 +217,7 @@ + config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \ + ['arm-cpu-features', + 'numa-test', +- 'boot-serial-test', +- 'migration-test'] ++ 'boot-serial-test'] + + qtests_s390x = \ + qtests_filter + \ +@@ -301,7 +295,6 @@ + endif + + qtests = { +- 'bios-tables-test': [io, 'boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'], + 'cdrom-test': files('boot-sector.c'), + 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1, + 'erst-test': files('erst-test.c'), diff --git a/gnu/packages/patches/racket-backport-8.10-rktboot.patch b/gnu/packages/patches/racket-backport-8.10-rktboot.patch new file mode 100644 index 0000000000..834001bd83 --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.10-rktboot.patch @@ -0,0 +1,130 @@ +From 5446e36e0685ec5c7b4f812dec5bf7959db4f906 Mon Sep 17 00:00:00 2001 +From: Efraim Flashner <efraim@flashner.co.il> +Date: Thu, 20 Jul 2023 15:56:21 +0300 +Subject: [PATCH 1/2] rktboot: Add support for riscv64. + +(cherry picked from commit f80c5d001d5235556ae9cde617b1e3a1322d0505) +--- + racket/src/rktboot/machine-def.rkt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt +index 8ff0688652..59ebfc88d8 100644 +--- a/racket/src/rktboot/machine-def.rkt ++++ b/racket/src/rktboot/machine-def.rkt +@@ -25,6 +25,7 @@ + [(regexp-match? #rx"^t?arm32" target-machine) "arm32"] + [(regexp-match? #rx"^t?arm64" target-machine) "arm64"] + [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"] ++ [(regexp-match? #rx"^t?rv64" target-machine) "rv64"] + [(regexp-match? #rx"^t?pb" target-machine) "pb"] + [else (error "machine.def: cannot infer architecture")]))] + [s (regexp-replace* #rx"[$][(]Mend[)]" s + +base-commit: b10ecfb8311fca2d42636eea2ca12aff0b76b208 +-- +2.41.0 + + +From 6261c3582c386e770d654ca6a36f112834f35aef Mon Sep 17 00:00:00 2001 +From: Philip McGrath <philip@philipmcgrath.com> +Date: Sun, 16 Jul 2023 15:47:14 -0400 +Subject: [PATCH 2/2] rktboot: improve machene type inference + +Related to https://issues.guix.gnu.org/62231 +Related to https://github.com/racket/racket/issues/3948 + +(cherry picked from commit 005488491cee89e7db38109de4c9dcf2d8d5aef0) +--- + racket/src/rktboot/config.rkt | 73 +++++++++++++++++++++++++++++------ + 1 file changed, 61 insertions(+), 12 deletions(-) + +diff --git a/racket/src/rktboot/config.rkt b/racket/src/rktboot/config.rkt +index 7a969017ed..2b411e002c 100644 +--- a/racket/src/rktboot/config.rkt ++++ b/racket/src/rktboot/config.rkt +@@ -15,20 +15,69 @@ + (path->complete-path scheme-dir)))))) + (hash-set! ht 'make-boot-scheme-dir scheme-dir) + ++(define (infer-target-machine) ++ ;; Compute a native or pbarch machine string for the current platform. ++ ;; Some caveats: ++ ;; 1. A pbarch Racket will always infer a pbarch machine, ++ ;; even if a native machine exists. Hopefully this is an ++ ;; unlikely scenario: if you're running Racket CS, you've ++ ;; bootstrapped Chez somehow, so you could use `re.boot`. ++ ;; 2. A `tpb` or `pb` Racket on a 32-bit platform would still return ++ ;; 64 from `(system-type 'word)`, but, in addition to the above, ++ ;; it is not currently possible or desired to build Racket as ++ ;; `tpb` or `pb` (as opposed to pbarch variants): ++ ;; see <https://github.com/racket/racket/issues/4692>. ++ ;; 3. On a hypothetical platform where Chez supported both the ++ ;; architecture and the OS, but not the combination of the two, ++ ;; (e.g. riscv64 Windows) this code would currently return a ++ ;; non-existent native machine (e.g. trv64nt) instead of a ++ ;; working pbarch machine. Presumably this could be fixed if ++ ;; such a platform came into existence. ++ (define s (path->string (system-library-subpath #f))) ++ (define arch+os ++ (cond ++ [(regexp-match #rx"^([^\\]+)\\\\([^\\]+)$" s) ++ => (λ (m) ++ (reverse (cdr m)))] ++ [(regexp-match #rx"^([^-]+)-(.+)$" s) ++ => cdr] ++ [else ++ (error 'infer-target-machine "unknown format for system library subpath" ++ "produced" (system-library-subpath #f))])) ++ (define arch ++ (case (car arch+os) ++ [("x86_64" "amd64") "a6"] ; https://github.com/racket/racket/issues/4691 ++ [("i386") "i3"] ++ [("aarch64") "arm64"] ++ [("arm") "arm32"] ++ [("ppc") "ppc32"] ++ [("riscv64") "rv64"] ++ [("unknown") #f] ; pb machine types ++ [else #f])) ++ (define os ++ (case (cadr arch+os) ++ [("macosx" "darwin" "ios") "osx"] ++ [("win32" "cygwin") "nt"] ++ [("linux" "android") "le"] ++ [("gnu-hurd") "gnu"] ++ [("freebsd") "fb"] ++ [("openbsd") "ob"] ++ [("netbsd") "nb"] ++ [("solaris") "s2"] ; NOT "sunos4" (I think) ++ [("qnx") "qnx"] ++ [("unknown") #f] ; pb machine types ++ [else #f])) ++ (if (and arch os) ++ (string-append "t" arch os) ++ (format "tpb~a~a" ++ (system-type 'word) ++ (if (system-big-endian?) ++ "b" ++ "l")))) ++ + (define target-machine (or (hash-ref ht 'make-boot-targate-machine #f) + (getenv "MACH") +- (case (system-type) +- [(macosx) (if (eqv? 64 (system-type 'word)) +- "ta6osx" +- "ti3osx")] +- [(windows) (if (eqv? 64 (system-type 'word)) +- "ta6nt" +- "ti3nt")] +- [else +- (case (path->string (system-library-subpath #f)) +- [("x86_64-linux") "ta6le"] +- [("i386-linux") "ti3le"] +- [else #f])]))) ++ (infer-target-machine))) + (hash-set! ht 'make-boot-targate-machine target-machine) + + (define optimize-level-init 3) +-- +2.41.0 + diff --git a/gnu/packages/patches/racket-rktboot-riscv64-support.patch b/gnu/packages/patches/racket-rktboot-riscv64-support.patch deleted file mode 100644 index f268b1e7f8..0000000000 --- a/gnu/packages/patches/racket-rktboot-riscv64-support.patch +++ /dev/null @@ -1,15 +0,0 @@ -Submitted upstream: -https://github.com/racket/racket/pull/4703 - -diff --git a/racket/src/rktboot/machine-def.rkt b/racket/src/rktboot/machine-def.rkt -index 8ff0688..59ebfc8 100644 ---- a/racket/src/rktboot/machine-def.rkt -+++ b/racket/src/rktboot/machine-def.rkt -@@ -25,6 +25,7 @@ - [(regexp-match? #rx"^t?arm32" target-machine) "arm32"] - [(regexp-match? #rx"^t?arm64" target-machine) "arm64"] - [(regexp-match? #rx"^t?ppc32" target-machine) "ppc32"] -+ [(regexp-match? #rx"^t?rv64" target-machine) "rv64"] - [(regexp-match? #rx"^t?pb" target-machine) "pb"] - [else (error "machine.def: cannot infer architecture")]))] - [s (regexp-replace* #rx"[$][(]Mend[)]" s diff --git a/gnu/packages/patches/rxvt-unicode-fix-cursor-position.patch b/gnu/packages/patches/rxvt-unicode-fix-cursor-position.patch new file mode 100644 index 0000000000..1905c4ccf6 --- /dev/null +++ b/gnu/packages/patches/rxvt-unicode-fix-cursor-position.patch @@ -0,0 +1,79 @@ +Fix a bug that causes the cursor position to be incorrect when opening +new terminals: + +http://lists.schmorp.de/pipermail/rxvt-unicode/2023q1/002639.html +https://bugs.archlinux.org/task/77062 +https://gitlab.alpinelinux.org/alpine/aports/-/issues/14525 + +This patches reverts all changes made to 'src/screen.C' in rxvt-unicode 9.31. + +--- rxvt-unicode-9.31/src/screen.C 2022-08-08 06:33:08.000000000 -0400 ++++ rxvt-unicode-9.30/src/screen.C 2021-07-02 23:55:47.000000000 -0400 +@@ -293,7 +293,6 @@ + + int common_col = min (prev_ncol, ncol); + +- // resize swap_buf, blank drawn_buf + for (int row = min (nrow, prev_nrow); row--; ) + { + scr_blank_screen_mem (drawn_buf [row], DEFAULT_RSTYLE); +@@ -307,7 +306,6 @@ + int pend = MOD (term_start + top_row , prev_total_rows); + int q = total_rows; // rewrapped row + +-#if ENABLE_FRILLS + if ((rewrap_always || top_row) && !rewrap_never) + { + // Re-wrap lines. This is rather ugly, possibly because I am too dumb +@@ -389,35 +387,36 @@ + scr_blank_line (*qline, qline->l, ncol - qline->l, DEFAULT_RSTYLE); + } + while (p != pend && q > 0); ++ ++ term_start = total_rows - nrow; ++ top_row = q - term_start; ++ ++ // make sure all terminal lines exist ++ while (top_row > 0) ++ scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); + } + else +-#endif + { +- // wing, instead of wrap +- screen.cur.row += nrow - prev_nrow; ++ // if no scrollback exists (yet), wing, instead of wrap + +- do ++ for (int row = min (nrow, prev_nrow); row--; ) + { +- p = MOD (p - 1, prev_total_rows); +- q--; ++ line_t &src = prev_row_buf [MOD (term_start + row, prev_total_rows)]; ++ line_t &dst = row_buf [row]; + +- copy_line (row_buf [q], prev_row_buf [p]); ++ copy_line (dst, src); + } +- while (p != pend && q > 0); +- } + +- term_start = total_rows - nrow; +- top_row = q - term_start; ++ for (int row = prev_nrow; row < nrow; row++) ++ scr_blank_screen_mem (row_buf [row], DEFAULT_RSTYLE); + +- // make sure all terminal lines exist +- while (top_row > 0) +- scr_blank_screen_mem (ROW (--top_row), DEFAULT_RSTYLE); ++ term_start = 0; ++ } + + clamp_it (screen.cur.row, 0, nrow - 1); + clamp_it (screen.cur.col, 0, ncol - 1); + } + +- // ensure drawn_buf, swap_buf and terminal rows are all initialized + for (int row = nrow; row--; ) + { + if (!ROW (row).valid ()) scr_blank_screen_mem (ROW (row), DEFAULT_RSTYLE); diff --git a/gnu/packages/patches/spdlog-fix-tests.patch b/gnu/packages/patches/spdlog-fix-tests.patch new file mode 100644 index 0000000000..13dffb309e --- /dev/null +++ b/gnu/packages/patches/spdlog-fix-tests.patch @@ -0,0 +1,26 @@ +Remove after next release and package update: +https://github.com/gabime/spdlog/commit/2ee8bac78e6525a8ad9a9196e65d502ce390d83a + +From 2ee8bac78e6525a8ad9a9196e65d502ce390d83a Mon Sep 17 00:00:00 2001 +From: xvitaly <vitaly@easycoding.org> +Date: Sun, 23 Jul 2023 10:15:25 +0200 +Subject: [PATCH] Added missing square bracket to fix the level_to_string_view + test. (#2827) + +--- + tests/test_misc.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_misc.cpp b/tests/test_misc.cpp +index 9f3cb1744..6199641ff 100644 +--- a/tests/test_misc.cpp ++++ b/tests/test_misc.cpp +@@ -43,7 +43,7 @@ TEST_CASE("log_levels", "[log_levels]") + REQUIRE(log_info("Hello", spdlog::level::trace) == "Hello"); + } + +-TEST_CASE("level_to_string_view", "[convert_to_string_view") ++TEST_CASE("level_to_string_view", "[convert_to_string_view]") + { + REQUIRE(spdlog::level::to_string_view(spdlog::level::trace) == "trace"); + REQUIRE(spdlog::level::to_string_view(spdlog::level::debug) == "debug"); diff --git a/gnu/packages/patches/vtk-7-gcc-11-compat.patch b/gnu/packages/patches/vtk-7-gcc-11-compat.patch new file mode 100644 index 0000000000..c7ab3af36e --- /dev/null +++ b/gnu/packages/patches/vtk-7-gcc-11-compat.patch @@ -0,0 +1,11 @@ +Description: GCC 11 now enforces that comparison objects be invocable as const. +--- a/Rendering/Label/vtkLabelHierarchy.cxx ++++ b/Rendering/Label/vtkLabelHierarchy.cxx +@@ -525,1 +525,1 @@ +- const vtkHierarchyNode & b) ++ const vtkHierarchyNode & b) const +--- a/Rendering/Label/vtkLabelHierarchyPrivate.h ++++ b/Rendering/Label/vtkLabelHierarchyPrivate.h +@@ -66,1 +66,1 @@ +- bool operator () ( const vtkIdType& a, const vtkIdType& b ) ++ bool operator () ( const vtkIdType& a, const vtkIdType& b ) const diff --git a/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch b/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch new file mode 100644 index 0000000000..486f0b1aa5 --- /dev/null +++ b/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch @@ -0,0 +1,137 @@ +From 62672f3756ecf218252098211d78c13369ab6d28 Mon Sep 17 00:00:00 2001 +From: Nicholas Guriev <nicholas@guriev.su> +Date: Thu, 4 May 2023 16:21:09 +0300 +Subject: [PATCH] Unbundle libSRTP + +Avoid private symbols and link against system-wide libSRTP. The excluded code +in SrtpSession looks unreachable from the call integration in Telegram Desktop. +--- + CMakeLists.txt | 3 +++ + cmake/libsrtp.cmake | 13 +++++++++++++ + src/pc/external_hmac.cc | 1 - + src/pc/external_hmac.h | 9 ++++++--- + src/pc/srtp_session.cc | 16 ++++++++++++++-- + 5 files changed, 36 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index af7d24c21..66bec8fdf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2647,6 +2647,9 @@ if (TG_OWT_USE_PROTOBUF) + list(APPEND export_targets proto) + endif() + ++if (LIBSRTP_FOUND) ++ target_compile_definitions(tg_owt PRIVATE HAVE_LIBSRTP) ++endif() + if (NOT absl_FOUND) + list(APPEND export_targets libabsl) + endif() +diff --git a/cmake/libsrtp.cmake b/cmake/libsrtp.cmake +index 5124312d2..01f051606 100644 +--- a/cmake/libsrtp.cmake ++++ b/cmake/libsrtp.cmake +@@ -1,3 +1,16 @@ ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(LIBSRTP libsrtp2) ++ ++if (LIBSRTP_FOUND) ++ add_library(libsrtp INTERFACE EXCLUDE_FROM_ALL) ++ add_library(tg_owt::libsrtp ALIAS libsrtp) ++ ++ target_include_directories(libsrtp INTERFACE ${LIBSRTP_INCLUDE_DIRS} ${LIBSRTP_CFLAGS_OTHER}) ++ target_link_libraries(libsrtp INTERFACE ${LIBSRTP_LINK_LIBRARIES} ${LIBSRTP_LDFLAGS_OTHER}) ++ ++ return() ++endif() ++ + add_library(libsrtp OBJECT EXCLUDE_FROM_ALL) + init_target(libsrtp) + add_library(tg_owt::libsrtp ALIAS libsrtp) +diff --git a/src/pc/external_hmac.cc b/src/pc/external_hmac.cc +index 27b5d0e5a..222f5d9ae 100644 +--- a/src/pc/external_hmac.cc ++++ b/src/pc/external_hmac.cc +@@ -15,7 +15,6 @@ + + #include "rtc_base/logging.h" + #include "rtc_base/zero_memory.h" +-#include "third_party/libsrtp/include/srtp.h" + + // Begin test case 0 */ + static const uint8_t kExternalHmacTestCase0Key[20] = { +diff --git a/src/pc/external_hmac.h b/src/pc/external_hmac.h +index c5071fc19..8fdc2f1a7 100644 +--- a/src/pc/external_hmac.h ++++ b/src/pc/external_hmac.h +@@ -30,9 +30,12 @@ + + #include <stdint.h> + +-#include "third_party/libsrtp/crypto/include/crypto_types.h" +-#include "third_party/libsrtp/include/srtp.h" +-#include "third_party/libsrtp/include/srtp_priv.h" ++#ifdef HAVE_LIBSRTP ++# include <srtp2/auth.h> ++# include <srtp2/srtp.h> ++#else ++# include "srtp_priv.h" ++#endif + + #define EXTERNAL_HMAC_SHA1 SRTP_HMAC_SHA1 + 1 + #define HMAC_KEY_LENGTH 20 +diff --git a/src/pc/srtp_session.cc b/src/pc/srtp_session.cc +index 7d1aaf2d6..7b5a789b0 100644 +--- a/src/pc/srtp_session.cc ++++ b/src/pc/srtp_session.cc +@@ -30,8 +30,12 @@ + #include "rtc_base/thread_annotations.h" + #include "rtc_base/time_utils.h" + #include "system_wrappers/include/metrics.h" +-#include "third_party/libsrtp/include/srtp.h" +-#include "third_party/libsrtp/include/srtp_priv.h" ++ ++#ifdef HAVE_LIBSRTP ++# include <srtp2/srtp.h> ++#else ++# include "srtp_priv.h" ++#endif + + namespace cricket { + +@@ -290,6 +294,9 @@ bool SrtpSession::UnprotectRtcp(void* p, int in_len, int* out_len) { + bool SrtpSession::GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len) { + RTC_DCHECK(thread_checker_.IsCurrent()); + RTC_DCHECK(IsExternalAuthActive()); ++#ifdef HAVE_LIBSRTP ++ return false; ++#else + if (!IsExternalAuthActive()) { + return false; + } +@@ -313,6 +320,7 @@ bool SrtpSession::GetRtpAuthParams(uint8_t** key, int* key_len, int* tag_len) { + *key_len = external_hmac->key_length; + *tag_len = rtp_auth_tag_len_; + return true; ++#endif + } + + int SrtpSession::GetSrtpOverhead() const { +@@ -336,6 +344,9 @@ bool SrtpSession::GetSendStreamPacketIndex(void* p, + int in_len, + int64_t* index) { + RTC_DCHECK(thread_checker_.IsCurrent()); ++#ifdef HAVE_LIBSRTP ++ return false; ++#else + srtp_hdr_t* hdr = reinterpret_cast<srtp_hdr_t*>(p); + srtp_stream_ctx_t* stream = srtp_get_stream(session_, hdr->ssrc); + if (!stream) { +@@ -346,6 +357,7 @@ bool SrtpSession::GetSendStreamPacketIndex(void* p, + *index = static_cast<int64_t>(rtc::NetworkToHost64( + srtp_rdbx_get_packet_index(&stream->rtp_rdbx) << 16)); + return true; ++#endif + } + + bool SrtpSession::DoSetKey(int type, diff --git a/gnu/packages/patches/yggdrasil-extra-config.patch b/gnu/packages/patches/yggdrasil-extra-config.patch index bd4bea7b9f..7934e2b50f 100644 --- a/gnu/packages/patches/yggdrasil-extra-config.patch +++ b/gnu/packages/patches/yggdrasil-extra-config.patch @@ -33,7 +33,7 @@ index 58b8230..b9df98a 100644 panic(err) } + if extraconffile != "" { -+ extraconf, err = ioutil.ReadFile(extraconffile); ++ extraconf, err = os.ReadFile(extraconffile); + } + if err != nil { + panic(err) |