commit cabal-rpm for openSUSE:Factory
Hello community, here is the log from the commit of package cabal-rpm for openSUSE:Factory checked in at 2015-04-30 11:51:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cabal-rpm (Old) and /work/SRC/openSUSE:Factory/.cabal-rpm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "cabal-rpm" Changes: -------- --- /work/SRC/openSUSE:Factory/cabal-rpm/cabal-rpm.changes 2015-03-11 09:59:02.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cabal-rpm.new/cabal-rpm.changes 2015-04-30 11:51:16.000000000 +0200 @@ -1,0 +2,10 @@ +Sun Apr 26 17:18:50 UTC 2015 - mimi.vx@gmail.com + +- update to 0.9.5 +- fix for dnf repoquery +- create SOURCES/ for tarball +- fixes for Cabal-1.22 +- nogpgcheck for Fedora 22+ +- warn about hidden backup spec files + +------------------------------------------------------------------- Old: ---- cabal-rpm-0.9.4.tar.gz New: ---- cabal-rpm-0.9.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cabal-rpm.spec ++++++ --- /var/tmp/diff_new_pack.mURTpt/_old 2015-04-30 11:51:17.000000000 +0200 +++ /var/tmp/diff_new_pack.mURTpt/_new 2015-04-30 11:51:17.000000000 +0200 @@ -17,7 +17,7 @@ Name: cabal-rpm -Version: 0.9.4 +Version: 0.9.5 Release: 0 Summary: RPM packaging tool for Haskell Cabal-based packages License: GPL-3.0+ ++++++ cabal-rpm-0.9.4.tar.gz -> cabal-rpm-0.9.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/ChangeLog new/cabal-rpm-0.9.5/ChangeLog --- old/cabal-rpm-0.9.4/ChangeLog 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/ChangeLog 2015-04-20 15:24:51.000000000 +0200 @@ -1,3 +1,10 @@ +* 0.9.5 (2015-04-20) +- fix for dnf repoquery +- create SOURCES/ for tarball +- fixes for Cabal-1.22 +- nogpgcheck for Fedora 22+ +- warn about hidden backup spec files + * 0.9.4 (2015-02-17) - use dnf if installed instead of yum for install and repoquery - update now only commits changes and new source if git origin is ssh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/cabal-rpm.cabal new/cabal-rpm-0.9.5/cabal-rpm.cabal --- old/cabal-rpm-0.9.4/cabal-rpm.cabal 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/cabal-rpm.cabal 2015-04-20 15:24:51.000000000 +0200 @@ -1,5 +1,5 @@ Name: cabal-rpm -Version: 0.9.4 +Version: 0.9.5 Synopsis: RPM packaging tool for Haskell Cabal-based packages Description: This package provides a RPM packaging tool for Haskell Cabal-based packages. @@ -17,7 +17,7 @@ Author: Jens Petersen <juhp@community.haskell.org>, Bryan O'Sullivan <bos@serpentine.com> Maintainer: Jens Petersen <petersen@fedoraproject.org> Copyright: 2007-2008 Bryan O'Sullivan <bos@serpentine.com>, - 2012-2014 Jens Petersen <petersen@fedoraproject.org> + 2012-2015 Jens Petersen <petersen@fedoraproject.org> Category: Distribution Build-type: Simple Extra-source-files: README.md ChangeLog man/cblrpm.1.md man/cblrpm.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/Commands/Depends.hs new/cabal-rpm-0.9.5/src/Commands/Depends.hs --- old/cabal-rpm-0.9.4/src/Commands/Depends.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/Commands/Depends.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : Commands.Depends --- Copyright : (C) 2014 Jens Petersen +-- Copyright : (C) 2014-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/Commands/Install.hs new/cabal-rpm-0.9.5/src/Commands/Install.hs --- old/cabal-rpm-0.9.4/src/Commands/Install.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/Commands/Install.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : Commands.Install --- Copyright : (C) 2012-2014 Jens Petersen +-- Copyright : (C) 2012-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/Commands/RpmBuild.hs new/cabal-rpm-0.9.5/src/Commands/RpmBuild.hs --- old/cabal-rpm-0.9.4/src/Commands/RpmBuild.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/Commands/RpmBuild.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,7 +1,7 @@ -- | -- Module : Commands.RpmBuild -- Copyright : (C) 2007-2008 Bryan O'Sullivan --- (C) 2012-2014 Jens Petersen +-- (C) 2012-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha @@ -33,8 +33,7 @@ --import Distribution.Version (VersionRange, foldVersionRange') -import System.Directory (createDirectoryIfMissing, doesDirectoryExist, - doesFileExist) +import System.Directory (doesFileExist) import System.FilePath (takeDirectory, (</>)) -- autoreconf :: Verbosity -> PackageDescription -> IO () @@ -75,9 +74,6 @@ when scmRepo $ error "No tarball for source repo" - destExists <- doesDirectoryExist srcdir - unless destExists $ - createDirectoryIfMissing True srcdir copyTarball name version False srcdir rpmbuild stage False Nothing specFile return specFile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/Commands/Spec.hs new/cabal-rpm-0.9.5/src/Commands/Spec.hs --- old/cabal-rpm-0.9.4/src/Commands/Spec.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/Commands/Spec.hs 2015-04-20 15:24:51.000000000 +0200 @@ -3,7 +3,7 @@ -- | -- Module : Commands.Spec -- Copyright : (C) 2007-2008 Bryan O'Sullivan --- (C) 2012-2014 Jens Petersen +-- (C) 2012-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha @@ -392,6 +392,10 @@ showLicense _ BSD2 = "BSD" showLicense _ (MPL ver) = "MPLv" ++ showVersion ver #endif +#if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,22,0) +showLicense _ ISC = "ISC" +showLicense _ UnspecifiedLicense = "Unspecified license!" +#endif -- from http://stackoverflow.com/questions/930675/functional-paragraphs -- using split would be: map unlines . (Data.List.Split.splitWhen null) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/Commands/Update.hs new/cabal-rpm-0.9.5/src/Commands/Update.hs --- old/cabal-rpm-0.9.4/src/Commands/Update.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/Commands/Update.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : Commands.Update --- Copyright : (C) 2014 Jens Petersen +-- Copyright : (C) 2014-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/Dependencies.hs new/cabal-rpm-0.9.5/src/Dependencies.hs --- old/cabal-rpm-0.9.4/src/Dependencies.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/Dependencies.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : Dependencies --- Copyright : (C) 2012-2014 Jens Petersen +-- Copyright : (C) 2012-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha @@ -67,7 +67,7 @@ clibs = concatMap extraLibs buildinfo return (deps, tools, nub clibs, pkgcfgs, selfdep) -data RepoQueryType = Rpm | Repoquery deriving Eq +data QueryBackend = Rpm | Repoquery deriving Eq resolveLib :: String -> IO (Maybe String) resolveLib lib = do @@ -82,10 +82,13 @@ rpmqueryFile Repoquery lib_path -- use repoquery or rpm -q to query which package provides file -rpmqueryFile :: RepoQueryType -> FilePath -> IO (Maybe String) -rpmqueryFile qt file = do +rpmqueryFile :: QueryBackend -> FilePath -> IO (Maybe String) +rpmqueryFile backend file = do + -- FIXME dnf repoquery does not support -f ! let args = ["-q", "--qf=%{name}", "-f"] - out <- if qt == Rpm then cmd "rpm" (args ++ [file]) else repoquery args file + out <- if backend == Rpm + then cmd "rpm" (args ++ [file]) + else repoquery args file let pkgs = nub $ words out -- EL5 repoquery can return "No package provides <file>" case pkgs of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/PackageUtils.hs new/cabal-rpm-0.9.5/src/PackageUtils.hs --- old/cabal-rpm-0.9.4/src/PackageUtils.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/PackageUtils.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : PackageUtils --- Copyright : (C) 2013-2014 Jens Petersen +-- Copyright : (C) 2013-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha @@ -53,20 +53,28 @@ import Distribution.PackageDescription.Configuration (finalizePackageDescription) import Distribution.PackageDescription.Parse (readPackageDescription) -import Distribution.Simple.Compiler (Compiler (..)) +import Distribution.Simple.Compiler ( +#if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,22,0) + compilerInfo +#else + Compiler (..) +#endif + ) import Distribution.Simple.Configure ( #if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,18,0) - configCompilerEx) + configCompilerEx #else - configCompiler) + configCompiler #endif + ) import Distribution.Simple.Program (defaultProgramConfiguration) import Distribution.Simple.Utils (die, findPackageDesc) import Distribution.System (Platform (..), buildArch, buildOS) -import System.Directory (copyFile, doesDirectoryExist, doesFileExist, - getCurrentDirectory, setCurrentDirectory) +import System.Directory (copyFile, createDirectoryIfMissing,doesDirectoryExist, + doesFileExist, getCurrentDirectory, + setCurrentDirectory) import System.Environment (getEnv) import System.FilePath ((</>), (<.>), takeBaseName, takeFileName) import System.Posix.Files (accessTime, fileMode, getFileStatus, @@ -95,7 +103,12 @@ #endif (Just GHC) Nothing Nothing defaultProgramConfiguration verbose case finalizePackageDescription (rpmConfigurationsFlags opts) - (const True) (Platform buildArch buildOS) (compilerId compiler) + (const True) (Platform buildArch buildOS) +#if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,22,0) + (compilerInfo compiler) +#else + (compilerId compiler) +#endif [] genPkgDesc of Left e -> die $ "finalize failed: " ++ show e Right (pd, _) -> return pd @@ -245,7 +258,11 @@ checkForSpecFile :: Maybe String -> IO (Maybe FilePath) checkForSpecFile Nothing = do - specs <- filter (\ f -> head f /= '.') <$> filesWithExtension "." ".spec" + -- emacs makes ".#*.spec" tmp files + allSpecs <- filesWithExtension "." ".spec" + let specs = filter (\ f -> head f /= '.') allSpecs + when (specs /= allSpecs) $ + putStrLn "Warning: dir contains a hidden spec file" case specs of [one] -> return $ Just one _ -> return Nothing @@ -299,6 +316,7 @@ cmd_ "cabal" ["fetch", "-v0", "--no-dependencies", n ++ "-" ++ v] copyTarball n v True dir else do + createDirectoryIfMissing True dir copyFile (head tarballs) dest -- cabal fetch creates tarballs with mode 0600 stat <- getFileStatus dest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.4/src/SysCmd.hs new/cabal-rpm-0.9.5/src/SysCmd.hs --- old/cabal-rpm-0.9.4/src/SysCmd.hs 2015-02-17 14:43:22.000000000 +0100 +++ new/cabal-rpm-0.9.5/src/SysCmd.hs 2015-04-20 15:24:51.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : SysCmd --- Copyright : (C) 2013-2014 Jens Petersen +-- Copyright : (C) 2013-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha @@ -33,7 +33,7 @@ import Control.Monad (unless, void, when) import Data.Functor ((<$>)) import Data.List ((\\)) -import Data.Maybe (fromMaybe, isJust, isNothing, maybeToList) +import Data.Maybe (fromMaybe, isJust, isNothing) import Distribution.Simple.Utils (die, warn, findProgramLocation) import Distribution.Verbosity (normal) @@ -132,8 +132,8 @@ repoquery :: [String] -> String -> IO String repoquery args key = do havednf <- optionalProgram "dnf" - let (prog, subcmd) = if havednf then ("dnf", Just "repoquery") else ("repoquery", Nothing) - cmd prog (maybeToList subcmd ++ args ++ [key]) + let (prog, subcmd) = if havednf then ("dnf", ["repoquery", "-q"]) else ("repoquery", []) + cmd prog (subcmd ++ args ++ [key]) pkgInstall :: [String] -> Bool -> IO () pkgInstall [] _ = return () @@ -162,7 +162,7 @@ putStrLn $ "Running:" +-+ fromMaybe "" maybeSudo +-+ pkginstaller +-+ "install" +-+ unwords args let exec = if hard then cmd_ else trySystem fedora <- cmd "rpm" ["--eval", "%fedora"] - let nogpgcheck = ["--nogpgcheck" | fedora `elem` ["21", "22"]] + let nogpgcheck = ["--nogpgcheck" | fedora `elem` ["22", "23"]] exec (fromMaybe pkginstaller maybeSudo) $ maybe [] (const pkginstaller) maybeSudo : "install" : args ++ nogpgcheck showPkg :: String -> String
participants (1)
-
root@hilbert.suse.de