Hello community, here is the log from the commit of package cabal-rpm for openSUSE:Factory checked in at 2015-02-16 22:12:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-02-03 11:40:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.cabal-rpm.new/cabal-rpm.changes 2015-02-16 22:12:45.000000000 +0100 @@ -1,0 +2,16 @@ +Sun Feb 15 09:42:56 UTC 2015 - [email protected] + +- add requires-space.patch + +------------------------------------------------------------------- +Sat Feb 14 10:11:27 UTC 2015 - [email protected] + +- Bump to version 0.9.3 +* make sure tarball destdir exists before copying ++ improve output for listing missing packages ++ update improvements: new-sources first, continue if patch fails, git commit changes ++ spec: sort executables and use %pkg_name in %ghc_fix_dynamic_rpath ++ drop the debuginfo handling for C files ++ ignore emacs temp ".#pkgname.spec" files- + +------------------------------------------------------------------- Old: ---- cabal-rpm-0.9.2.tar.gz New: ---- cabal-rpm-0.9.3.tar.gz requires-space.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cabal-rpm.spec ++++++ --- /var/tmp/diff_new_pack.eUEH6o/_old 2015-02-16 22:12:46.000000000 +0100 +++ /var/tmp/diff_new_pack.eUEH6o/_new 2015-02-16 22:12:46.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package cabal-rpm # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: cabal-rpm -Version: 0.9.2 +Version: 0.9.3 Release: 0 Summary: RPM packaging tool for Haskell Cabal-based packages License: GPL-3.0+ @@ -25,6 +25,8 @@ Url: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz Source2: cabal-rpm.1 +# PATCH-FIX-UPSTREAM requires-space.patch - fix missed space in Requires - Ondřej Súkup [email protected] +Patch0: requires-space.patch BuildRequires: ghc-Cabal-devel # Begin cabal-rpm deps: BuildRequires: ghc-directory-devel @@ -50,6 +52,7 @@ %prep %setup -q +%patch0 -p1 %build %{ghc_bin_build} ++++++ cabal-rpm-0.9.2.tar.gz -> cabal-rpm-0.9.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.2/ChangeLog new/cabal-rpm-0.9.3/ChangeLog --- old/cabal-rpm-0.9.2/ChangeLog 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/ChangeLog 2015-02-05 16:50:49.000000000 +0100 @@ -1,3 +1,11 @@ +* 0.9.3 (2015-02-05) +- make sure tarball destdir exists before copying +- improve output for listing missing packages +- update improvements: new-sources first, continue if patch fails, git commit changes +- spec: sort executables and use %pkg_name in %ghc_fix_dynamic_rpath +- drop the debuginfo handling for C files +- ignore emacs temp ".#pkgname.spec" files + * 0.9.2 (2014-12-18) - lots of bug fixes - improved missingdeps output diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.2/cabal-rpm.cabal new/cabal-rpm-0.9.3/cabal-rpm.cabal --- old/cabal-rpm-0.9.2/cabal-rpm.cabal 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/cabal-rpm.cabal 2015-02-05 16:50:49.000000000 +0100 @@ -1,5 +1,5 @@ Name: cabal-rpm -Version: 0.9.2 +Version: 0.9.3 Synopsis: RPM packaging tool for Haskell Cabal-based packages Description: This package provides a RPM packaging tool for Haskell Cabal-based packages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.2/src/Commands/RpmBuild.hs new/cabal-rpm-0.9.3/src/Commands/RpmBuild.hs --- old/cabal-rpm-0.9.2/src/Commands/RpmBuild.hs 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/src/Commands/RpmBuild.hs 2015-02-05 16:50:49.000000000 +0100 @@ -33,7 +33,8 @@ --import Distribution.Version (VersionRange, foldVersionRange') -import System.Directory (doesFileExist) +import System.Directory (createDirectoryIfMissing, doesDirectoryExist, + doesFileExist) import System.FilePath (takeDirectory, (</>)) -- autoreconf :: Verbosity -> PackageDescription -> IO () @@ -74,6 +75,9 @@ 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.2/src/Commands/Spec.hs new/cabal-rpm-0.9.3/src/Commands/Spec.hs --- old/cabal-rpm-0.9.2/src/Commands/Spec.hs 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/src/Commands/Spec.hs 2015-02-05 16:50:49.000000000 +0100 @@ -31,7 +31,7 @@ import Data.Char (toLower, toUpper) import Data.List (groupBy, intercalate, isPrefixOf, isSuffixOf, sort, (\\)) -import Data.Maybe (fromMaybe, maybeToList) +import Data.Maybe (fromMaybe) import Data.Time.Clock (UTCTime, getCurrentTime) import Data.Time.Format (formatTime) import Data.Version (showVersion) @@ -40,9 +40,8 @@ import Distribution.Simple.Utils (notice, warn) -import Distribution.PackageDescription (PackageDescription (..), BuildInfo (..), - Executable (..), Library (..), - exeName, hasExes, hasLibs, withExe) +import Distribution.PackageDescription (PackageDescription (..), Executable (..), + exeName, hasExes, hasLibs) --import Distribution.Version (VersionRange, foldVersionRange') @@ -119,7 +118,7 @@ put "#" put $ "# spec file for package " ++ pkgname put "#" - put $ "# Copyright (c) " ++ year ++ " SUSE LINUX Products GmbH, Nuernberg, Germany." + put $ "# Copyright (c) " ++ year ++ " SUSE LINUX GmbH, Nuernberg, Germany." put "#" put "# All modifications and additions to the file contributed by third parties" put "# remain the property of their copyright owners, unless otherwise agreed" @@ -167,12 +166,12 @@ put $ "%bcond_" ++ (if null missTestDeps then "without" else "with") +-+ "tests" putNewline - let eCsources = concatMap (cSources . buildInfo) $ executables pkgDesc - let lCsources = concatMap (cSources . libBuildInfo) $ maybeToList $ library pkgDesc - when (null $ eCsources ++ lCsources) $ do - put "# no useful debuginfo for Haskell packages without C sources" - putDef "debug_package" "%{nil}" - putNewline + -- let eCsources = concatMap (cSources . buildInfo) $ executables pkgDesc + -- let lCsources = concatMap (cSources . libBuildInfo) $ maybeToList $ library pkgDesc + -- when (null $ eCsources ++ lCsources) $ do + -- put "# no useful debuginfo for Haskell packages without C sources" + -- putDef "debug_package" "%{nil}" + -- putNewline putHdr "Name" (if binlib then "%{pkg_name}" else basename) putHdr "Version" version @@ -263,10 +262,11 @@ put "%install" put $ "%ghc_" ++ pkgType ++ "_install" + + let execs = sort $ map exeName $ executables pkgDesc when selfdep $ do - let execs = map exeName $ executables pkgDesc putNewline - put $ "%ghc_fix_dynamic_rpath" +-+ intercalate " " execs + put $ "%ghc_fix_dynamic_rpath" +-+ intercalate " " (map (\ p -> if p == name then "%{pkg_name}" else p) execs) putNewline putNewline @@ -305,9 +305,7 @@ unless (null docs) $ put $ "%doc" +-+ unwords docs - withExe pkgDesc $ \exe -> - let program = exeName exe in - put $ "%{_bindir}/" ++ (if program == name then "%{name}" else program) + mapM_ (\ p -> put $ "%{_bindir}/" ++ (if p == name then "%{name}" else p)) execs unless (null (dataFiles pkgDesc)) $ put "%{_datadir}/%{name}-%{version}" @@ -329,10 +327,8 @@ when (distro /= Fedora) $ put "%defattr(-,root,root,-)" unless (null docs) $ put $ "%doc" +-+ unwords docs - when (not binlib && hasExec) $ - withExe pkgDesc $ \exe -> - let program = exeName exe in - put $ "%{_bindir}/" ++ (if program == name then "%{pkg_name}" else program) + when (not binlib) $ + mapM_ (\ p -> put $ "%{_bindir}/" ++ (if p == name then "%{pkg_name}" else p)) execs putNewline putNewline diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.2/src/Commands/Update.hs new/cabal-rpm-0.9.3/src/Commands/Update.hs --- old/cabal-rpm-0.9.2/src/Commands/Update.hs 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/src/Commands/Update.hs 2015-02-05 16:50:49.000000000 +0100 @@ -27,35 +27,35 @@ import Distribution.PackageDescription (PackageDescription (..)) import Distribution.Simple.Utils (die) -import System.Directory (createDirectory, getCurrentDirectory, - setCurrentDirectory) +import System.Directory (createDirectory, setCurrentDirectory) update :: PackageData -> RpmFlags -> IO () update pkgdata flags = case specFilename pkgdata of Nothing -> die "No (unique) .spec file in directory." Just spec -> do - withTempDirectory $ \cwd -> do - let pkg = package $ packageDesc pkgdata - name = packageName pkg - ver = packageVersion pkg - current = name ++ "-" ++ ver - curspec <- createSpecVersion current spec - latest <- latestPkg name - if current == latest - then error $ current +-+ "is latest version." - else do + let pkg = package $ packageDesc pkgdata + name = packageName pkg + ver = packageVersion pkg + current = name ++ "-" ++ ver + latest <- latestPkg name + if current == latest + then error $ current +-+ "is latest version." + else do + bringTarball latest + pkgGit <- isGitDir "." + when pkgGit $ + cmd_ "fedpkg" ["new-sources", latest ++ ".tar.gz"] + withTempDirectory $ \cwd -> do + curspec <- createSpecVersion current spec newspec <- createSpecVersion latest spec - getCurrentDirectory >>= putStrLn - shell $ "diff -u1 -I \"- spec file generated by cabal-rpm\" -I \"Fedora Haskell SIG <[email protected]>\"" +-+ curspec +-+ newspec +-+ "| patch -d" +-+ cwd +-+ "-p1" + shell $ "diff -u1 -I \"- spec file generated by cabal-rpm\" -I \"Fedora Haskell SIG <[email protected]>\"" +-+ curspec +-+ newspec +-+ "| patch -d" +-+ cwd +-+ "-p1" +-+ "|| :" setCurrentDirectory cwd cmd_ "sed" ["-i", "-e s/^\\(Release: \\).*/\\10%{?dist}/", spec] let newver = removePrefix (name ++ "-") latest cmd_ "rpmdev-bumpspec" ["-c", "update to" +-+ newver, spec] - bringTarball latest - pkgGit <- isGitDir cwd when pkgGit $ - cmd_ "fedpkg" ["new-sources", latest ++ ".tar.gz"] + cmd_ "git" ["commit", "-a", "-m", "update to" +-+ newver] where createSpecVersion :: String -> String -> IO FilePath createSpecVersion ver spec = do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.2/src/PackageUtils.hs new/cabal-rpm-0.9.3/src/PackageUtils.hs --- old/cabal-rpm-0.9.2/src/PackageUtils.hs 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/src/PackageUtils.hs 2015-02-05 16:50:49.000000000 +0100 @@ -245,7 +245,7 @@ checkForSpecFile :: Maybe String -> IO (Maybe FilePath) checkForSpecFile Nothing = do - specs <- filesWithExtension "." ".spec" + specs <- filter (\ f -> head f /= '.') <$> filesWithExtension "." ".spec" case specs of [one] -> return $ Just one _ -> return Nothing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.2/src/SysCmd.hs new/cabal-rpm-0.9.3/src/SysCmd.hs --- old/cabal-rpm-0.9.2/src/SysCmd.hs 2014-12-18 03:09:47.000000000 +0100 +++ new/cabal-rpm-0.9.3/src/SysCmd.hs 2015-02-05 16:50:49.000000000 +0100 @@ -28,7 +28,7 @@ yumInstall, (+-+)) where -import Control.Monad (void, when) +import Control.Monad (unless, void, when) import Data.Functor ((<$>)) import Data.List ((\\)) import Data.Maybe (fromMaybe, isJust, isNothing) @@ -128,22 +128,26 @@ if not (null missing) && hard then error $ unwords missing +-+ "not available." else do - putStrLn "Uninstalled dependencies:" - mapM_ putStrLn pkgs - uid <- getEffectiveUserID - maybeSudo <- - if uid == 0 - then return Nothing - else do - havesudo <- optionalProgram "sudo" - return $ if havesudo then Just "sudo" else Nothing - requireProgram "yum" - let args = map showPkg repopkgs - putStrLn $ "Running:" +-+ fromMaybe "" maybeSudo +-+ "yum install" +-+ unwords args - let exec = if hard then cmd_ else trySystem - fedora <- cmd "rpm" ["--eval", "%fedora"] - let nogpgcheck = ["--nogpgcheck" | fedora `elem` ["21", "22"]] - exec (fromMaybe "yum" maybeSudo) $ maybe [] (const "yum") maybeSudo : "install" : args ++ nogpgcheck + unless (null missing) $ do + putStrLn "Unavailable dependencies:" + mapM_ putStrLn missing + unless (null repopkgs) $ do + putStrLn "Uninstalled dependencies:" + mapM_ putStrLn repopkgs + uid <- getEffectiveUserID + maybeSudo <- + if uid == 0 + then return Nothing + else do + havesudo <- optionalProgram "sudo" + return $ if havesudo then Just "sudo" else Nothing + requireProgram "yum" + let args = map showPkg repopkgs + putStrLn $ "Running:" +-+ fromMaybe "" maybeSudo +-+ "yum install" +-+ unwords args + let exec = if hard then cmd_ else trySystem + fedora <- cmd "rpm" ["--eval", "%fedora"] + let nogpgcheck = ["--nogpgcheck" | fedora `elem` ["21", "22"]] + exec (fromMaybe "yum" maybeSudo) $ maybe [] (const "yum") maybeSudo : "install" : args ++ nogpgcheck showPkg :: String -> String showPkg p = if '(' `elem` p then show p else p ++++++ requires-space.patch ++++++ >From e94f0e8371220dc4a01fa21eb11db34f07ca41f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= <[email protected]> Date: Sun, 15 Feb 2015 10:13:29 +0100 Subject: [PATCH] repair typo in devel section in line : 'Requires: %{name} = %{version}-%{release}' must must be space between } and = --- src/Commands/Spec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/Spec.hs b/src/Commands/Spec.hs index aa38101..aea7928 100644 --- a/src/Commands/Spec.hs +++ b/src/Commands/Spec.hs @@ -239,7 +239,7 @@ createSpecFile pkgdata flags mdest = do putHdr "Requires" "ghc-compiler = %{ghc_version}" putHdr "Requires(post)" "ghc-compiler = %{ghc_version}" putHdr "Requires(postun)" "ghc-compiler = %{ghc_version}" - putHdr "Requires" $ (if binlib then "ghc-%{name}" else "%{name}") ++ isa +-+ "= %{version}-%{release}" + putHdr "Requires" $ (if binlib then "ghc-%{name}" else "%{name}") ++ isa ++ " = %{version}-%{release}" unless (null $ clibs ++ pkgcfgs) $ do put "# Begin cabal-rpm deps:" mapM_ (putHdr "Requires") $ sort $ map (++ isa) clibs ++ pkgcfgs -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
