commit ghc-cabal-helper for openSUSE:Factory

2017-09-15 Thread root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2017-09-15 21:25:15

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Fri Sep 15 21:25:15 2017 rev:13 rq:524248 version:0.7.3.0

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2017-03-21 22:48:20.389040395 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2017-09-15 21:25:15.873818310 +0200
@@ -1,0 +2,5 @@
+Thu Aug  3 15:38:38 UTC 2017 - psim...@suse.com
+
+- Updated with latest spec-cleaner version 0.9.8-8-geadfbbf.
+
+---



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.F8HPGU/_old  2017-09-15 21:25:16.549723043 +0200
+++ /var/tmp/diff_new_pack.F8HPGU/_new  2017-09-15 21:25:16.553722479 +0200
@@ -23,8 +23,8 @@
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+
-Group:  Development/Languages/Other
-Url:https://hackage.haskell.org/package/%{pkg_name}
+Group:  Development/Libraries/Haskell
+URL:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
@@ -39,8 +39,8 @@
 BuildRequires:  ghc-temporary-devel
 BuildRequires:  ghc-transformers-devel
 BuildRequires:  ghc-utf8-string-devel
-BuildRoot:  %{_tmppath}/%{name}-%{version}-build
 %if %{with tests}
+BuildRequires:  cabal-install
 BuildRequires:  ghc-extra-devel
 BuildRequires:  ghc-unix-devel
 %endif
@@ -72,7 +72,7 @@
 
 %package devel
 Summary:Haskell %{pkg_name} library development files
-Group:  Development/Libraries/Other
+Group:  Development/Libraries/Haskell
 Requires:   %{name} = %{version}-%{release}
 Requires:   ghc-compiler = %{ghc_version}
 Requires(post): ghc-compiler = %{ghc_version}
@@ -103,7 +103,6 @@
 %ghc_pkg_recache
 
 %files -f %{name}.files
-%defattr(-,root,root,-)
 %doc LICENSE
 %dir %{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}
 %dir %{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/%{pkg_name}-%{version}
@@ -111,7 +110,6 @@
 
%{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/%{pkg_name}-%{version}/cabal-helper-wrapper
 
 %files devel -f %{name}-devel.files
-%defattr(-,root,root,-)
 %doc README.md
 
 %changelog




commit ghc-cabal-helper for openSUSE:Factory

2017-03-21 Thread root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2017-03-21 22:48:19

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Tue Mar 21 22:48:19 2017 rev:12 rq:462021 version:0.7.3.0

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2017-02-03 17:38:45.239759737 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2017-03-21 22:48:20.389040395 +0100
@@ -1,0 +2,5 @@
+Sun Feb 12 14:19:47 UTC 2017 - psim...@suse.com
+
+- Update to version 0.7.3.0 revision 1 with cabal2obs.
+
+---

Old:

  cabal-helper-0.7.2.0.tar.gz

New:

  cabal-helper-0.7.3.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.dvB0F8/_old  2017-03-21 22:48:21.112938056 +0100
+++ /var/tmp/diff_new_pack.dvB0F8/_new  2017-03-21 22:48:21.116937490 +0100
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.7.2.0
+Version:0.7.3.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+
@@ -29,6 +29,7 @@
 Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-filepath-devel
 BuildRequires:  ghc-mtl-devel
@@ -90,6 +91,7 @@
 
 %install
 %ghc_lib_install
+ln -s %{pkg_name}-%{version} 
%{buildroot}%{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/%{pkg_name}
 
 %check
 %cabal_test
@@ -103,9 +105,13 @@
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
-%{_libexecdir}/cabal-helper-wrapper-v0.7
+%dir %{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}
+%dir %{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/%{pkg_name}-%{version}
+%{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/%{pkg_name}
+%{_libexecdir}/%{_arch}-%{_os}-ghc-%{ghc_version}/%{pkg_name}-%{version}/cabal-helper-wrapper
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
+%doc README.md
 
 %changelog

++ cabal-helper-0.7.2.0.tar.gz -> cabal-helper-0.7.3.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.7.2.0/CabalHelper/Compile.hs 
new/cabal-helper-0.7.3.0/CabalHelper/Compile.hs
--- old/cabal-helper-0.7.2.0/CabalHelper/Compile.hs 2016-07-29 
15:03:02.0 +0200
+++ new/cabal-helper-0.7.3.0/CabalHelper/Compile.hs 2017-01-16 
18:37:40.0 +0100
@@ -308,10 +308,17 @@
 ( [ Version [1,18,1] [] ]
 , fixArrayConstraint
 ),
+
+
 ( [ Version [1,18,0] [] ]
 , \dir -> do
 fixArrayConstraint dir
 fixOrphanInstance dir
+),
+
+-- just want the pristine version
+( [ Version [1,24,1,0] [] ]
+, \_ -> return ()
 )
   ]
  where
@@ -359,7 +366,8 @@
 unpackCabal opts cabalVer tmpdir = do
   let cabal = "Cabal-" ++ showVersion cabalVer
   dir = tmpdir  cabal
-  callProcessStderr (Just tmpdir) (cabalProgram opts) [ "get", cabal ]
+  callProcessStderr (Just tmpdir) (cabalProgram opts)
+[ "get", "--pristine", cabal ]
   return dir
 
 unpackCabalHEAD :: FilePath -> IO (FilePath, String)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.7.2.0/CabalHelper/Main.hs 
new/cabal-helper-0.7.3.0/CabalHelper/Main.hs
--- old/cabal-helper-0.7.2.0/CabalHelper/Main.hs2016-07-29 
15:03:02.0 +0200
+++ new/cabal-helper-0.7.3.0/CabalHelper/Main.hs2017-01-16 
18:37:40.0 +0100
@@ -120,7 +120,7 @@
  ++"  ) ...\n"
 
 commands :: [String]
-commands = [ "print-bli"
+commands = [ "print-lbi"
, "package-id"
, "flags"
, "config-flags"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.7.2.0/Distribution/Helper.hs 
new/cabal-helper-0.7.3.0/Distribution/Helper.hs
--- old/cabal-helper-0.7.2.0/Distribution/Helper.hs 2016-07-29 
15:03:02.0 +0200
+++ new/cabal-helper-0.7.3.0/Distribution/Helper.hs 2017-01-16 
18:37:40.0 +0100
@@ -415,8 +415,7 @@
 findLibexecExe :: IO FilePath
 findLibexecExe = do
 libexecdir <- getLibexecDir
-let Version (mj:mi:_) _ = version
-exeName = "cabal-helper-wrapper-v" ++ show mj ++ "." ++ show mi
+let exeName = "cabal-helper-wrapper"
  

commit ghc-cabal-helper for openSUSE:Factory

2017-02-03 Thread root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2017-01-31 12:43:44

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2016-10-22 13:20:03.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2017-02-03 17:38:45.239759737 +0100
@@ -1,0 +2,5 @@
+Wed Jan 18 09:00:29 UTC 2017 - psim...@suse.com
+
+- Update to version 0.7.2.0 revision 1 with cabal2obs.
+
+---

New:

  cabal-helper.cabal



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.MttnBK/_old  2017-02-03 17:38:45.679697468 +0100
+++ /var/tmp/diff_new_pack.MttnBK/_new  2017-02-03 17:38:45.679697468 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-cabal-helper
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -26,6 +26,7 @@
 Group:  Development/Languages/Other
 Url:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
+Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-directory-devel
@@ -81,6 +82,7 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %define cabal_configure_options --libexecdir=%{_libexecdir}

++ cabal-helper.cabal ++
name:cabal-helper
version: 0.7.2.0
x-revision: 1
synopsis:Simple interface to some of Cabal's configuration state 
used by ghc-mod
description:
@cabal-helper@ provides a library which wraps the internal use of an
executable to lift the restrictions imposed by linking against versions of
GHC before @7.10@. This has the pleasant side effect of isolating the user
from having to deal with Cabal version changes manually as @cabal-helper@
can simply recompile it's helper program automatically as needed.
.
@cabal-helper@ uses a wrapper executable to compile the actual cabal-helper
executable at runtime while linking against an arbitrary version of
Cabal. This runtime-compiled helper executable is then used to extract
various bits and peices from Cabal\'s on disk state (dist/setup-config)
written by it's configure command.
.
In addition to this the wrapper executable also supports installing any
version of Cabal from hackage in case it cannot be found in any available
package database. The wrapper installs these instances of the Cabal library
into a private package database so as to not interfere with the user's
packages.
.
Furthermore the wrapper supports one special case namely reading a state
file for Cabal itself. This is needed as Cabal compiles it's Setup.hs using
itself and not using any version of Cabal installed in any package database.
.
@cabal-helper@ can compile with @Cabal >= 1.14@ but requires @Cabal >= 1.16@
at runtime.

license: AGPL-3
license-file:LICENSE
author:  Daniel Gröber 
maintainer:  d...@darkboxed.org
category:Distribution
build-type:  Custom
cabal-version:   >=1.10
extra-source-files:  CabalHelper/Main.hs
 CabalHelper/Licenses.hs

source-repository head
  type: git
  location: https://github.com/DanielG/cabal-helper.git

library
  exposed-modules: Distribution.Helper
  Other-Modules:   Paths_cabal_helper
 , CabalHelper.Types
 , CabalHelper.Sandbox
  default-language:Haskell2010
  GHC-Options: -Wall
  Build-Depends:   base  < 5&& >= 4.5
 , Cabal < 1.26 && >= 1.14
 , directory < 1.4  && >= 1.1.0.2
 , filepath  < 1.5  && >= 1.3.0.0
 , transformers  < 0.6  && >= 0.3.0.0
 , mtl   < 2.3  && >= 2.0
 , process   < 1.5  && >= 1.1.0.1
 , ghc-prim

Executable cabal-helper-wrapper-v0.7
  Default-Language:Haskell2010
  Other-Extensions:

commit ghc-cabal-helper for openSUSE:Factory

2016-10-22 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2016-10-22 13:20:00

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2016-07-21 08:02:15.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2016-10-22 13:20:03.0 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 06:36:32 UTC 2016 - psim...@suse.com
+
+- Update to version 0.7.2.0 revision 0 with cabal2obs.
+
+---

Old:

  1.cabal
  cabal-helper-0.6.3.1.tar.gz

New:

  cabal-helper-0.7.2.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.ODIgG1/_old  2016-10-22 13:20:04.0 +0200
+++ /var/tmp/diff_new_pack.ODIgG1/_new  2016-10-22 13:20:04.0 +0200
@@ -19,16 +19,14 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-%{pkg_name}
-Version:0.6.3.1
+Version:0.7.2.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+
-Group:  System/Libraries
+Group:  Development/Languages/Other
 Url:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-bytestring-devel
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-filepath-devel
@@ -44,10 +42,9 @@
 BuildRequires:  ghc-extra-devel
 BuildRequires:  ghc-unix-devel
 %endif
-# End cabal-rpm deps
 
 %description
-'cabal-helper' provides a library which wraps the internal use of anexecutable
+'cabal-helper' provides a library which wraps the internal use of an executable
 to lift the restrictions imposed by linking against versions of GHC before
 '7.10'. This has the pleasant side effect of isolating the user from having to
 deal with Cabal version changes manually as 'cabal-helper' can simply recompile
@@ -84,23 +81,16 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
-
 
 %build
 %define cabal_configure_options --libexecdir=%{_libexecdir}
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache
@@ -111,7 +101,7 @@
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
-%{_libexecdir}/cabal-helper-wrapper
+%{_libexecdir}/cabal-helper-wrapper-v0.7
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)

++ cabal-helper-0.6.3.1.tar.gz -> cabal-helper-0.7.2.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.3.1/CabalHelper/Compile.hs 
new/cabal-helper-0.7.2.0/CabalHelper/Compile.hs
--- old/cabal-helper-0.6.3.1/CabalHelper/Compile.hs 2016-01-14 
19:19:13.0 +0100
+++ new/cabal-helper-0.7.2.0/CabalHelper/Compile.hs 2016-07-29 
15:03:02.0 +0200
@@ -51,7 +51,7 @@
   compCabalHelperSourceDir :: FilePath,
   compCabalSourceDir :: Maybe FilePath,
   compPackageDb  :: Maybe FilePath,
-  compCabalVersion   :: Version,
+  compCabalVersion   :: Either String Version,
   compPackageDeps:: [String]
 }
 
@@ -86,9 +86,6 @@
-- | Check if this version is globally available
compileGlobal :: FilePath -> MaybeT IO (Either ExitCode FilePath)
compileGlobal chdir = do
-  -- TODO: add option to let user specify custom package-db, relevant when
-  -- using a Cabal compiled from git!
-
ver <- MaybeT $ find (== cabalVer) <$> listCabalVersions opts
vLog opts $ logMsg ++ "user/global package-db"
liftIO $ compileWithPkg chdir Nothing ver
@@ -111,7 +108,7 @@
case db_exists of
  False -> mzero
  True -> do
- db <- liftIO $ getPrivateCabalPkgDb opts cabalVer
+ db <- liftIO $ getPrivateCabalPkgDb opts (showVersion cabalVer)
  vLog opts $ logMsg ++ "private package-db in " ++ db
  liftIO $ compileWithPkg chdir (Just db) cabalVer
 
@@ -143,10 +140,10 @@
compileWithPkg chdir (Just db) cabalVer
 
compileWithCabalTree chdir ver srcDir =
-   compile distdir opts $ Compile chdir (Just srcDir) Nothing ver []
+   compile distdir opts $ Compile chdir (Just srcDir) Nothing (Right 

commit ghc-cabal-helper for openSUSE:Factory

2016-07-21 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2016-07-21 08:02:06

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2016-01-28 17:24:31.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2016-07-21 08:02:15.0 +0200
@@ -1,0 +2,5 @@
+Sun Jul 10 17:21:32 UTC 2016 - psim...@suse.com
+
+- Update to version 0.6.3.1 revision 1 with cabal2obs.
+
+---

New:

  1.cabal



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.K0wZqd/_old  2016-07-21 08:02:17.0 +0200
+++ /var/tmp/diff_new_pack.K0wZqd/_new  2016-07-21 08:02:17.0 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-cabal-helper
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -18,7 +18,7 @@
 
 %global pkg_name cabal-helper
 %bcond_with tests
-Name:   ghc-cabal-helper
+Name:   ghc-%{pkg_name}
 Version:0.6.3.1
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
@@ -26,10 +26,10 @@
 Group:  System/Libraries
 Url:https://hackage.haskell.org/package/%{pkg_name}
 Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
+Source1:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal
 BuildRequires:  ghc-Cabal-devel
 # Begin cabal-rpm deps:
 BuildRequires:  ghc-bytestring-devel
-BuildRequires:  ghc-data-default-devel
 BuildRequires:  ghc-directory-devel
 BuildRequires:  ghc-filepath-devel
 BuildRequires:  ghc-mtl-devel
@@ -84,19 +84,24 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+cp -p %{SOURCE1} %{pkg_name}.cabal
+
 
 %build
 %define cabal_configure_options --libexecdir=%{_libexecdir}
 %ghc_lib_build
 
+
 %install
 %ghc_lib_install
 
+
 %check
 %if %{with tests}
-%cabal test
+%{cabal} test
 %endif
 
+
 %post devel
 %ghc_pkg_recache
 

++ 1.cabal ++
X-Revision: 1
name:cabal-helper
version: 0.6.3.1
synopsis:Simple interface to some of Cabal's configuration state 
used by ghc-mod
description:
@cabal-helper@ provides a library which wraps the internal use of
anexecutable to lift the restrictions imposed by linking against versions of
GHC before @7.10@. This has the pleasant side effect of isolating the user
from having to deal with Cabal version changes manually as @cabal-helper@
can simply recompile it's helper program automatically as needed.
.
@cabal-helper@ uses a wrapper executable to compile the actual cabal-helper
executable at runtime while linking against an arbitrary version of
Cabal. This runtime-compiled helper executable is then used to extract
various bits and peices from Cabal\'s on disk state (dist/setup-config)
written by it's configure command.
.
In addition to this the wrapper executable also supports installing any
version of Cabal from hackage in case it cannot be found in any available
package database. The wrapper installs these instances of the Cabal library
into a private package database so as to not interfere with the user's
packages.
.
Furthermore the wrapper supports one special case namely reading a state
file for Cabal itself. This is needed as Cabal compiles it's Setup.hs using
itself and not using any version of Cabal installed in any package database.
.
@cabal-helper@ can compile with @Cabal >= 1.14@ but requires @Cabal >= 1.16@
at runtime.

license: AGPL-3
license-file:LICENSE
author:  Daniel Gröber 
maintainer:  d...@darkboxed.org
category:Distribution
build-type:  Custom
cabal-version:   >=1.10
extra-source-files:  CabalHelper/Main.hs
 CabalHelper/Licenses.hs

source-repository head
  type: git
  location: https://github.com/DanielG/cabal-helper.git

library
  exposed-modules: Distribution.Helper
  Other-Modules:   Paths_cabal_helper
 , CabalHelper.Types
 , CabalHelper.Sandbox
  default-language:Haskell2010
  GHC-Options: -Wall
  Build-Depends:   

commit ghc-cabal-helper for openSUSE:Factory

2016-01-29 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2016-01-28 17:23:36

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2016-01-22 01:08:43.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2016-01-28 17:24:31.0 +0100
@@ -1,0 +2,5 @@
+Fri Jan 22 07:55:32 UTC 2016 - mimi...@gmail.com
+
+- update to 0.6.3.1 
+
+---

Old:

  cabal-helper-0.6.3.0.tar.gz

New:

  cabal-helper-0.6.3.1.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.BjaXtF/_old  2016-01-28 17:24:32.0 +0100
+++ /var/tmp/diff_new_pack.BjaXtF/_new  2016-01-28 17:24:32.0 +0100
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-cabal-helper
-Version:0.6.3.0
+Version:0.6.3.1
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+

++ cabal-helper-0.6.3.0.tar.gz -> cabal-helper-0.6.3.1.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.3.0/CabalHelper/Compile.hs 
new/cabal-helper-0.6.3.1/CabalHelper/Compile.hs
--- old/cabal-helper-0.6.3.0/CabalHelper/Compile.hs 2015-11-25 
23:10:09.0 +0100
+++ new/cabal-helper-0.6.3.1/CabalHelper/Compile.hs 2016-01-14 
19:19:13.0 +0100
@@ -97,7 +97,8 @@
compileSandbox :: FilePath -> MaybeT IO (Either ExitCode FilePath)
compileSandbox chdir = do
sandbox <- MaybeT $ getSandboxPkgDb projdir (display buildPlatform) =<< 
ghcVersion opts
-   ver <- MaybeT $ find (== cabalVer) <$> listCabalVersions' opts (Just 
sandbox)
+   ver <- MaybeT $ logSomeError opts "compileSandbox" $
+ find (== cabalVer) <$> listCabalVersions' opts (Just sandbox)
vLog opts $ logMsg ++ "sandbox package-db"
liftIO $ compileWithPkg chdir (Just sandbox) ver
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.3.0/CabalHelper/GuessGhc.hs 
new/cabal-helper-0.6.3.1/CabalHelper/GuessGhc.hs
--- old/cabal-helper-0.6.3.0/CabalHelper/GuessGhc.hs2015-04-27 
21:16:53.0 +0200
+++ new/cabal-helper-0.6.3.1/CabalHelper/GuessGhc.hs2016-01-17 
21:29:42.0 +0100
@@ -49,11 +49,11 @@
path  = ghcPath
dir   = takeDirectory path
versionSuffix = takeVersionSuffix (dropExeExtension path)
-   guessNormal   = dir  toolname <.> exeExtension
+   guessNormal   = dir  toolname <.> exeExtension'
guessGhcVersioned = dir  (toolname ++ "-ghc" ++ versionSuffix)
-   <.> exeExtension
+   <.> exeExtension'
guessVersioned= dir  (toolname ++ versionSuffix)
-   <.> exeExtension
+   <.> exeExtension'
guesses | null versionSuffix = [guessNormal]
| otherwise  = [guessGhcVersioned,
guessVersioned,
@@ -70,7 +70,7 @@
 dropExeExtension :: FilePath -> FilePath
 dropExeExtension filepath =
   case splitExtension filepath of
-(filepath', extension) | extension == exeExtension -> filepath'
+(filepath', extension) | extension == exeExtension' -> filepath'
| otherwise -> filepath
 
 -- | @takeWhileEndLE p@ is equivalent to @reverse . takeWhile p . reverse@, but
@@ -81,3 +81,6 @@
 go x (rest, done)
   | not done && p x = (x:rest, False)
   | otherwise = (rest, True)
+
+exeExtension' :: FilePath
+exeExtension' = Distribution.Simple.BuildPaths.exeExtension
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.3.0/CabalHelper/Log.hs 
new/cabal-helper-0.6.3.1/CabalHelper/Log.hs
--- old/cabal-helper-0.6.3.0/CabalHelper/Log.hs 2015-08-21 06:28:15.0 
+0200
+++ new/cabal-helper-0.6.3.1/CabalHelper/Log.hs 2016-01-14 19:19:13.0 
+0100
@@ -2,6 +2,7 @@
 
 import Control.Monad
 import Control.Monad.IO.Class
+import Control.Exception as E
 import Data.String
 import System.IO
 import Prelude
@@ -12,3 +13,9 @@
 vLog Options { verbose = True } msg =
 liftIO $ hPutStrLn stderr msg
 vLog _ _ = 

commit ghc-cabal-helper for openSUSE:Factory

2016-01-21 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2016-01-21 23:43:32

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2015-12-29 12:58:51.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2016-01-22 01:08:43.0 +0100
@@ -1,0 +2,5 @@
+Mon Jan 11 07:39:48 UTC 2016 - mimi...@gmail.com
+
+- update to 0.6.3.0 
+
+---

Old:

  cabal-helper-0.6.2.0.tar.gz

New:

  cabal-helper-0.6.3.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.PHISNk/_old  2016-01-22 01:08:45.0 +0100
+++ /var/tmp/diff_new_pack.PHISNk/_new  2016-01-22 01:08:45.0 +0100
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-cabal-helper
-Version:0.6.2.0
+Version:0.6.3.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+

++ cabal-helper-0.6.2.0.tar.gz -> cabal-helper-0.6.3.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.2.0/Distribution/Helper.hs 
new/cabal-helper-0.6.3.0/Distribution/Helper.hs
--- old/cabal-helper-0.6.2.0/Distribution/Helper.hs 2015-09-24 
04:11:17.0 +0200
+++ new/cabal-helper-0.6.3.0/Distribution/Helper.hs 2016-01-10 
22:00:45.0 +0100
@@ -48,6 +48,7 @@
   , configFlags
   , nonDefaultConfigFlags
   , packageId
+  , compilerVersion
 
   -- * Result types
   , ChModuleName(..)
@@ -63,8 +64,10 @@
 
   -- * Managing @dist/@
   , prepare
+  , prepare'
   , reconfigure
   , writeAutogenFiles
+  , writeAutogenFiles'
 
   -- * $libexec related error handling
   , LibexecNotFoundError(..)
@@ -79,6 +82,7 @@
 import Control.Exception as E
 import Data.Char
 import Data.List
+import Data.Maybe
 import Data.Version
 import Data.Typeable
 import Distribution.Simple.BuildPaths (exeExtension)
@@ -154,7 +158,8 @@
   slbiPkgLicenses :: [(String, [(String, Version)])],
   slbiFlags   :: [(String, Bool)],
   slbiConfigFlags :: [(String, Bool)],
-  slbiNonDefaultConfigFlags :: [(String, Bool)]
+  slbiNonDefaultConfigFlags :: [(String, Bool)],
+  slbiCompilerVersion :: (String, Version)
 } deriving (Eq, Ord, Read, Show)
 
 -- | Caches helper executable result so it doesn't have to be run more than 
once
@@ -164,6 +169,9 @@
  (ReaderT QueryEnv m) a }
 deriving (Functor, Applicative, Monad, MonadIO)
 
+instance MonadTrans Query where
+lift = Query . lift . lift
+
 type MonadQuery m = ( MonadIO m
 , MonadState (Maybe SomeLocalBuildInfo) m
 , MonadReader QueryEnv m)
@@ -230,6 +238,9 @@
 -- i.e. don't rely on these being the flags set by the user directly.
 nonDefaultConfigFlags :: MonadIO m => Query m [(String, Bool)]
 
+-- | The version of GHC the project is configured to use
+compilerVersion :: MonadIO m => Query m (String, Version)
+
 -- | Package identifier, i.e. package name and version
 packageId :: MonadIO m => Query m (String, Version)
 
@@ -246,6 +257,7 @@
 flags   = Query $ slbiFlags   `liftM` getSlbi
 configFlags = Query $ slbiConfigFlags `liftM` getSlbi
 nonDefaultConfigFlags = Query $ slbiNonDefaultConfigFlags `liftM` getSlbi
+compilerVersion = Query $ slbiCompilerVersion `liftM` getSlbi
 packageId   = Query $ getPackageId
 
 -- | Run @cabal configure@
@@ -266,50 +278,57 @@
 _ <- liftIO $ readProc (cabalProgram progs) ("configure":progOpts) ""
 return ()
 
-
-
-invokeHelper :: MonadQuery m => [String] -> m [Maybe ChResponse]
-invokeHelper args = ask >>= \QueryEnv {..} -> do
-  let progs = qePrograms
-  projdir = qeProjectDir
-  distdir = qeDistDir
-
-  progArgs = [ "--with-ghc=" ++ ghcProgram progs
- , "--with-ghc-pkg=" ++ ghcPkgProgram progs
- , "--with-cabal="   ++ cabalProgram progs
+readHelper :: (MonadIO m, MonadQuery m) => [String] -> m [Maybe ChResponse]
+readHelper args = ask >>= \qe -> liftIO $ do
+  out <- either error id <$> invokeHelper qe args
+  let res = read out
+  liftIO $ evaluate res `E.catch` \se@(SomeException _) -> do
+  md <- lookupEnv' "CABAL_HELPER_DEBUG"
+  let msg = "readHelper: exception: '" ++ show se ++ "'"
+  error $ msg 

commit ghc-cabal-helper for openSUSE:Factory

2015-12-29 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2015-12-29 12:58:50

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2015-11-02 12:55:56.0 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2015-12-29 12:58:51.0 +0100
@@ -1,0 +2,5 @@
+Wed Dec 23 16:04:07 UTC 2015 - mimi...@gmail.com
+
+- update to 0.6.2.0
+
+---

Old:

  cabal-helper-0.6.1.0.tar.gz

New:

  cabal-helper-0.6.2.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.SQhKxu/_old  2015-12-29 12:58:52.0 +0100
+++ /var/tmp/diff_new_pack.SQhKxu/_new  2015-12-29 12:58:52.0 +0100
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-cabal-helper
-Version:0.6.1.0
+Version:0.6.2.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+

++ cabal-helper-0.6.1.0.tar.gz -> cabal-helper-0.6.2.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.1.0/CabalHelper/Common.hs 
new/cabal-helper-0.6.2.0/CabalHelper/Common.hs
--- old/cabal-helper-0.6.1.0/CabalHelper/Common.hs  2015-10-05 
17:36:12.0 +0200
+++ new/cabal-helper-0.6.2.0/CabalHelper/Common.hs  2015-10-30 
17:25:27.0 +0100
@@ -95,3 +95,12 @@
 if takeFileName p == takeExtension p
   then "" -- just ".cabal" is not a valid cabal file
   else takeExtension p
+
+replace :: String -> String -> String -> String
+replace n r hs' = go "" hs'
+ where
+   go acc h
+   | take (length n) h == n =
+   reverse acc ++ r ++ drop (length n) h
+   go acc (h:hs) = go (h:acc) hs
+   go acc [] = reverse acc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.1.0/CabalHelper/Compile.hs 
new/cabal-helper-0.6.2.0/CabalHelper/Compile.hs
--- old/cabal-helper-0.6.1.0/CabalHelper/Compile.hs 2015-10-05 
17:36:12.0 +0200
+++ new/cabal-helper-0.6.2.0/CabalHelper/Compile.hs 2015-11-03 
14:27:21.0 +0100
@@ -34,6 +34,7 @@
 import System.Process
 import System.Exit
 import System.IO
+import System.IO.Temp
 import Prelude
 
 import Distribution.System (buildPlatform)
@@ -248,7 +249,17 @@
 \\n\
 \Installing Cabal %s ...\n" appdir sver sver sver
 
-  db <- createPkgDb opts ver
+  withSystemTempDirectory "cabal-helper" $ \tmpdir -> do
+let
+mpatch :: Maybe (FilePath -> IO ())
+mpatch = snd <$> find ((ver`elem`) . fst) patchyCabalVersions
+msrcdir <- sequenceA $ unpackPatchedCabal opts ver tmpdir <$> mpatch
+db <- createPkgDb opts ver
+cabalInstall opts db ver msrcdir
+return db
+
+cabalInstall :: Options -> FilePath -> Version -> Maybe FilePath -> IO ()
+cabalInstall opts db ver msrcdir = do
   cabalInstallVer <- cabalInstallVersion opts
   cabal_opts <- return $ concat
   [
@@ -264,15 +275,77 @@
 , if ghcPkgProgram opts /= ghcPkgProgram defaultOptions
 then [ "--with-ghc-pkg=" ++ ghcPkgProgram opts ]
 else []
-, [ "install", "Cabal", "--constraint"
-  , "Cabal == " ++ showVersion ver ]
+,
+  case msrcdir of
+Nothing ->
+[ "install", "Cabal"
+, "--constraint", "Cabal == " ++ showVersion ver
+]
+Just srcdir ->
+[ "install", srcdir ]
   ]
 
-  vLog opts $ intercalate " " $ map (("\""++) . (++"\"")) $ cabalProgram 
opts:cabal_opts
+  vLog opts $ intercalate " "
+$ map (("\""++) . (++"\""))
+$ cabalProgram opts:cabal_opts
 
   callProcessStderr (Just "/") (cabalProgram opts) cabal_opts
   hPutStrLn stderr "done"
-  return db
+
+patchyCabalVersions :: [([Version], FilePath -> IO ())]
+patchyCabalVersions = [
+( [ Version [1,18,1] [] ]
+, fixArrayConstraint
+),
+( [ Version [1,18,0] [] ]
+, \dir -> do
+fixArrayConstraint dir
+fixOrphanInstance dir
+)
+  ]
+ where
+   fixArrayConstraint dir = do
+ let cabalFile= dir  "Cabal.cabal"
+ cabalFileTmp = cabalFile ++ ".tmp"
+
+ cf <- readFile cabalFile
+ writeFile cabalFileTmp $ replace "&& < 0.5" "&& < 0.6" cf
+ renameFile cabalFileTmp cabalFile
+
+   fixOrphanInstance dir = do
+ let versionFile= dir  

commit ghc-cabal-helper for openSUSE:Factory

2015-11-02 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2015-11-02 12:55:55

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2015-09-30 05:53:13.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2015-11-02 12:55:56.0 +0100
@@ -1,0 +2,5 @@
+Mon Nov  2 07:56:57 UTC 2015 - mimi...@gmail.com
+
+- update to 0.6.1.0 
+
+---

Old:

  cabal-helper-0.6.0.0.tar.gz

New:

  cabal-helper-0.6.1.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.SBmvwI/_old  2015-11-02 12:55:56.0 +0100
+++ /var/tmp/diff_new_pack.SBmvwI/_new  2015-11-02 12:55:56.0 +0100
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-cabal-helper
-Version:0.6.0.0
+Version:0.6.1.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+

++ cabal-helper-0.6.0.0.tar.gz -> cabal-helper-0.6.1.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.0.0/CabalHelper/Common.hs 
new/cabal-helper-0.6.1.0/CabalHelper/Common.hs
--- old/cabal-helper-0.6.0.0/CabalHelper/Common.hs  2015-09-07 
08:02:26.0 +0200
+++ new/cabal-helper-0.6.1.0/CabalHelper/Common.hs  2015-10-05 
17:36:12.0 +0200
@@ -86,3 +86,12 @@
 
 appDataDir :: IO FilePath
 appDataDir = ( "cabal-helper") <$> getAppUserDataDirectory "ghc-mod"
+
+isCabalFile :: FilePath -> Bool
+isCabalFile f = takeExtension' f == ".cabal"
+
+takeExtension' :: FilePath -> String
+takeExtension' p =
+if takeFileName p == takeExtension p
+  then "" -- just ".cabal" is not a valid cabal file
+  else takeExtension p
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.6.0.0/CabalHelper/Main.hs 
new/cabal-helper-0.6.1.0/CabalHelper/Main.hs
--- old/cabal-helper-0.6.0.0/CabalHelper/Main.hs2015-09-07 
08:02:26.0 +0200
+++ new/cabal-helper-0.6.1.0/CabalHelper/Main.hs2015-10-05 
17:36:12.0 +0200
@@ -19,8 +19,12 @@
 import Distribution.Simple.Utils (cabalVersion)
 import Distribution.Simple.Configure
 
-import Distribution.Package (PackageIdentifier, InstalledPackageId, PackageId)
+import Distribution.Package (PackageIdentifier, InstalledPackageId, PackageId,
+ packageName, packageVersion)
 import Distribution.PackageDescription (PackageDescription,
+GenericPackageDescription(..),
+Flag(..),
+FlagName(..),
 FlagAssignment,
 Executable(..),
 Library(..),
@@ -65,9 +69,11 @@
 #endif
 
 import Control.Applicative ((<$>))
+import Control.Arrow (first, (&&&))
 import Control.Monad
 import Control.Exception (catch, PatternMatchFail(..))
 import Data.List
+import qualified Data.Map as Map
 import Data.Maybe
 import Data.Monoid
 import Data.IORef
@@ -92,6 +98,10 @@
  ++"PROJ_DIR DIST_DIR [--with-* ...] (\n"
  ++"version\n"
  ++"  | print-lbi [--human]\n"
+ ++"  | package-id\n"
+ ++"  | flags\n"
+ ++"  | config-flags\n"
+ ++"  | non-default-config-flags\n"
  ++"  | write-autogen-files\n"
  ++"  | compiler-version\n"
  ++"  | ghc-options [--with-inplace]\n"
@@ -107,6 +117,10 @@
 
 commands :: [String]
 commands = [ "print-bli"
+   , "package-id"
+   , "flags"
+   , "config-flags"
+   , "non-default-config-flags"
, "write-autogen-files"
, "compiler-version"
, "ghc-options"
@@ -131,8 +145,11 @@
  errMsg $ "distdir '"++distdir++"' does not exist"
  exitFailure
 
+  [cfile] <- filter isCabalFile <$> getDirectoryContents projdir
+
   v <- maybe silent (const deafening) . lookup  "GHC_MOD_DEBUG" <$> 
getEnvironment
   lbi <- unsafeInterleaveIO $ getPersistBuildConfig distdir
+  gpd <- unsafeInterleaveIO $ readPackageDescription v (projdir  cfile)
   let pd = localPkgDescr lbi
   let lvd = (lbi, v, distdir)
 
@@ -162,6 +179,26 @@
 
   print =<< flip mapM cmds $$ \cmd -> do
   case cmd of
+"flags":[] -> do
+  return $ Just $ ChResponseFlags $ sort $

commit ghc-cabal-helper for openSUSE:Factory

2015-09-29 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2015-09-30 05:53:08

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2015-09-08 17:47:23.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2015-09-30 05:53:13.0 +0200
@@ -1,0 +2,5 @@
+Mon Sep 28 13:52:02 UTC 2015 - mimi...@gmail.com
+
+- update to 0.6.0.0 
+
+---

Old:

  cabal-helper-0.5.2.0.tar.gz

New:

  cabal-helper-0.6.0.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.27h2vp/_old  2015-09-30 05:53:13.0 +0200
+++ /var/tmp/diff_new_pack.27h2vp/_new  2015-09-30 05:53:13.0 +0200
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-cabal-helper
-Version:0.5.2.0
+Version:0.6.0.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+

++ cabal-helper-0.5.2.0.tar.gz -> cabal-helper-0.6.0.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.5.2.0/CabalHelper/Common.hs 
new/cabal-helper-0.6.0.0/CabalHelper/Common.hs
--- old/cabal-helper-0.5.2.0/CabalHelper/Common.hs  2015-08-20 
04:02:22.0 +0200
+++ new/cabal-helper-0.6.0.0/CabalHelper/Common.hs  2015-09-07 
08:02:26.0 +0200
@@ -30,6 +30,8 @@
 import System.Environment
 import System.IO
 import System.Exit
+import System.Directory
+import System.FilePath
 import Text.ParserCombinators.ReadP
 import Prelude
 
@@ -48,20 +50,6 @@
   prog <- getProgName
   hPutStrLn stderr $ prog ++ ": " ++ str
 
-align :: String -> String -> String -> String
-align n an str = let
-h:rest = lines str
-[hm]   = match n h
-rest'  = [ move (hm - rm) r | r <- rest, rm <- match an r]
-in
-  unlines (h:rest')
- where
-   match p str' = maybeToList $
- fst <$> find ((p `isPrefixOf`) . snd) ([0..] `zip` tails str')
-   move i str' | i > 0  = replicate i ' ' ++ str'
-   move i str' = drop i str'
-
-
 -- | @getCabalConfigHeader "dist/setup-config"@ returns the cabal version and
 -- compiler version
 getCabalConfigHeader :: FilePath -> IO (Maybe (Version, (ByteString, Version)))
@@ -95,3 +83,6 @@
 runReadP p i = case filter ((=="") . snd) $ readP_to_S p i of
  (a,""):[] -> a
  _ -> error $ "Error parsing: " ++ show i
+
+appDataDir :: IO FilePath
+appDataDir = ( "cabal-helper") <$> getAppUserDataDirectory "ghc-mod"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.5.2.0/CabalHelper/Compile.hs 
new/cabal-helper-0.6.0.0/CabalHelper/Compile.hs
--- old/cabal-helper-0.5.2.0/CabalHelper/Compile.hs 1970-01-01 
01:00:00.0 +0100
+++ new/cabal-helper-0.6.0.0/CabalHelper/Compile.hs 2015-09-07 
08:02:26.0 +0200
@@ -0,0 +1,375 @@
+-- cabal-helper: Simple interface to Cabal's configuration state
+-- Copyright (C) 2015  Daniel Gröber 
+--
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU Affero General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-- GNU Affero General Public License for more details.
+--
+-- You should have received a copy of the GNU Affero General Public License
+-- along with this program.  If not, see .
+{-# LANGUAGE RecordWildCards, FlexibleContexts #-}
+module CabalHelper.Compile where
+
+import Control.Applicative
+import Control.Arrow
+import Control.Exception as E
+import Control.Monad
+import Control.Monad.Trans.Maybe
+import Control.Monad.IO.Class
+import Data.Traversable
+import Data.Char
+import Data.List
+import Data.Maybe
+import Data.String
+import Data.Version
+import Text.Printf
+import System.Directory
+import System.FilePath
+import System.Process
+import System.Exit
+import System.IO
+import Prelude
+
+import Distribution.System (buildPlatform)
+import Distribution.Text (display)
+
+import Paths_cabal_helper (version)
+import CabalHelper.Data
+import CabalHelper.Common
+import 

commit ghc-cabal-helper for openSUSE:Factory

2015-09-08 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2015-09-08 17:42:54

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is "ghc-cabal-helper"

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2015-08-28 08:27:09.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2015-09-08 17:47:23.0 +0200
@@ -1,0 +2,10 @@
+Sun Aug 30 10:13:08 UTC 2015 - mimi...@gmail.com
+
+- rework %install 
+
+---
+Fri Aug 28 14:15:54 UTC 2015 - mimi...@gmail.com
+
+- move cabal-helper-wrapper to %_libexecdir 
+
+---



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.xUagR9/_old  2015-09-08 17:47:23.0 +0200
+++ /var/tmp/diff_new_pack.xUagR9/_new  2015-09-08 17:47:23.0 +0200
@@ -86,12 +86,11 @@
 %setup -q -n %{pkg_name}-%{version}
 
 %build
+%define cabal_configure_options --libexecdir=%{_libexecdir}
 %ghc_lib_build
 
 %install
 %ghc_lib_install
-mkdir %{buildroot}%{_prefix}/bin
-mv %{buildroot}%{_prefix}/libexec/cabal-helper-wrapper 
%{buildroot}%{_bindir}/cabal-helper-wrapper
 
 %check
 %if %{with tests}
@@ -107,7 +106,7 @@
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
-%{_bindir}/cabal-helper-wrapper
+%{_libexecdir}/cabal-helper-wrapper
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)




commit ghc-cabal-helper for openSUSE:Factory

2015-08-28 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2015-08-28 08:26:52

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is ghc-cabal-helper

Changes:

--- /work/SRC/openSUSE:Factory/ghc-cabal-helper/ghc-cabal-helper.changes
2015-08-25 07:19:04.0 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2015-08-28 08:27:09.0 +0200
@@ -1,0 +2,5 @@
+Wed Aug 26 20:05:13 UTC 2015 - mimi...@gmail.com
+
+- update to 0.5.2.0
+
+---

Old:

  cabal-helper-0.5.0.0.tar.gz

New:

  cabal-helper-0.5.2.0.tar.gz



Other differences:
--
++ ghc-cabal-helper.spec ++
--- /var/tmp/diff_new_pack.Q2KHJt/_old  2015-08-28 08:27:09.0 +0200
+++ /var/tmp/diff_new_pack.Q2KHJt/_new  2015-08-28 08:27:09.0 +0200
@@ -19,7 +19,7 @@
 %global pkg_name cabal-helper
 %bcond_with tests
 Name:   ghc-cabal-helper
-Version:0.5.0.0
+Version:0.5.2.0
 Release:0
 Summary:Simple interface to some of Cabal's configuration state used 
by ghc-mod
 License:AGPL-3.0+
@@ -85,11 +85,9 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 mkdir %{buildroot}%{_prefix}/bin
@@ -100,15 +98,12 @@
 %cabal test
 %endif
 
-
 %post devel
 %ghc_pkg_recache
 
-
 %postun devel
 %ghc_pkg_recache
 
-
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE

++ cabal-helper-0.5.0.0.tar.gz - cabal-helper-0.5.2.0.tar.gz ++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.5.0.0/CabalHelper/Main.hs 
new/cabal-helper-0.5.2.0/CabalHelper/Main.hs
--- old/cabal-helper-0.5.0.0/CabalHelper/Main.hs2015-08-12 
09:25:45.0 +0200
+++ new/cabal-helper-0.5.2.0/CabalHelper/Main.hs2015-08-20 
04:02:22.0 +0200
@@ -168,15 +168,7 @@
   return $ Just $ ChResponseVersion (show comp) ver
 
 ghc-options:flags - do
-  res - componentsMap lbi v distdir $ \c clbi bi - let
-   outdir = componentOutDir lbi c
-   (clbi', adopts) = case flags of
-   [--with-inplace] - (clbi, mempty)
-   [] - removeInplaceDeps v lbi pd clbi
-
-
-   opts = componentGhcOptions normal lbi bi clbi' outdir
- in renderGhcOptions' lbi v (opts `mappend` adopts)
+  res - componentOptions lvd True flags id
   return $ Just $ ChResponseCompList (res ++ [(ChSetupHsName, [])])
 
 ghc-src-options:flags - do
@@ -204,12 +196,15 @@
 ghc-merged-pkg-options:flags - do
   let pd = localPkgDescr lbi
   res - mconcat . map snd $ (componentOptions' lvd True flags (\_ _ o 
- return o) $ \opts - mempty {
-   ghcOptPackageDBs = ghcOptPackageDBs opts,
-   ghcOptPackages   = ghcOptPackages opts,
-   ghcOptHideAllPackages = ghcOptHideAllPackages opts
+   ghcOptPackageDBs = [],
+   ghcOptHideAllPackages = NoFlag,
+   ghcOptPackages   = ghcOptPackages opts
})
 
-  let res' = res { ghcOptPackageDBs = nub $ ghcOptPackageDBs res }
+  let res' = res { ghcOptPackageDBs = withPackageDB lbi
+ , ghcOptHideAllPackages = Flag True
+ , ghcOptPackages   = nub $ ghcOptPackages res
+ }
 
   Just . ChResponseList $ renderGhcOptions' lbi v res'
 
@@ -304,7 +299,7 @@
opts = componentGhcOptions normal lbi bi clbi' outdir
opts' = f opts
 
- in rf lbi v $ opts' `mappend` adopts
+ in rf lbi v $ nubPackageFlags $ opts' `mappend` adopts
 
 componentOptions (lbi, v, distdir) inplaceFlag flags f =
 componentOptions' (lbi, v, distdir) inplaceFlag flags renderGhcOptions' f
@@ -380,6 +375,8 @@
isInplaceDep :: (InstalledPackageId, PackageId) - Bool
isInplaceDep (ipid, pid) = inplacePackageId pid == ipid
 
+nubPackageFlags opts = opts { ghcOptPackages = nub $ ghcOptPackages opts }
+
 renderGhcOptions' lbi v opts = do
 #if CABAL_MAJOR == 1  CABAL_MINOR  20
   (ghcProg, _) - requireProgram v ghcProgram (withPrograms lbi)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cabal-helper-0.5.0.0/Distribution/Helper.hs 
new/cabal-helper-0.5.2.0/Distribution/Helper.hs
--- old/cabal-helper-0.5.0.0/Distribution/Helper.hs 2015-08-12 
09:25:45.0 +0200
+++ new/cabal-helper-0.5.2.0/Distribution/Helper.hs 2015-08-20 

commit ghc-cabal-helper for openSUSE:Factory

2015-08-24 Thread h_root
Hello community,

here is the log from the commit of package ghc-cabal-helper for 
openSUSE:Factory checked in at 2015-08-25 07:19:03

Comparing /work/SRC/openSUSE:Factory/ghc-cabal-helper (Old)
 and  /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new (New)


Package is ghc-cabal-helper

Changes:

New Changes file:

--- /dev/null   2015-08-24 19:43:32.284261900 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-cabal-helper.new/ghc-cabal-helper.changes   
2015-08-25 07:19:04.0 +0200
@@ -0,0 +1,5 @@
+---
+Thu Aug 13 20:09:30 UTC 2015 - mimi...@gmail.com
+
+- initial commit 
+

New:

  cabal-helper-0.5.0.0.tar.gz
  ghc-cabal-helper.changes
  ghc-cabal-helper.spec



Other differences:
--
++ ghc-cabal-helper.spec ++
#
# spec file for package ghc-cabal-helper
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An Open Source License is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%global pkg_name cabal-helper
%bcond_with tests
Name:   ghc-cabal-helper
Version:0.5.0.0
Release:0
Summary:Simple interface to some of Cabal's configuration state used by 
ghc-mod
License:AGPL-3.0+
Group:  System/Libraries
Url:https://hackage.haskell.org/package/%{pkg_name}
Source0:
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires:  ghc-Cabal-devel
# Begin cabal-rpm deps:
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-data-default-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-filepath-devel
BuildRequires:  ghc-mtl-devel
BuildRequires:  ghc-process-devel
BuildRequires:  ghc-rpm-macros
BuildRequires:  ghc-template-haskell-devel
BuildRequires:  ghc-temporary-devel
BuildRequires:  ghc-transformers-devel
BuildRequires:  ghc-utf8-string-devel
BuildRoot:  %{_tmppath}/%{name}-%{version}-build
%if %{with tests}
BuildRequires:  ghc-extra-devel
BuildRequires:  ghc-unix-devel
%endif
# End cabal-rpm deps

%description
'cabal-helper' provides a library which wraps the internal use of anexecutable
to lift the restrictions imposed by linking against versions of GHC before
'7.10'. This has the pleasant side effect of isolating the user from having to
deal with Cabal version changes manually as 'cabal-helper' can simply recompile
it's helper program automatically as needed.

'cabal-helper' uses a wrapper executable to compile the actual cabal-helper
executable at runtime while linking against an arbitrary version of Cabal.
This runtime-compiled helper executable is then used to extract various bits
and peices from Cabal's on disk state (dist/setup-config) written by it's
configure command.

In addition to this the wrapper executable also supports installing any version
of Cabal from hackage in case it cannot be found in any available package
database. The wrapper installs these instances of the Cabal library into a
private package database so as to not interfere with the user's packages.

Furthermore the wrapper supports one special case namely reading a state file
for Cabal itself. This is needed as Cabal compiles it's Setup.hs using itself
and not using any version of Cabal installed in any package database.

'cabal-helper' can compile with 'Cabal = 1.14' but requires 'Cabal = 1.16' at
runtime.

%package devel
Summary:Haskell %{pkg_name} library development files
Group:  Development/Libraries/Other
Requires:   %{name} = %{version}-%{release}
Requires:   ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}

%description devel
This package provides the Haskell %{pkg_name} library development files.

%prep
%setup -q -n %{pkg_name}-%{version}


%build
%ghc_lib_build


%install
%ghc_lib_install
mkdir %{buildroot}%{_prefix}/bin
mv %{buildroot}%{_prefix}/libexec/cabal-helper-wrapper 
%{buildroot}%{_bindir}/cabal-helper-wrapper

%check
%if %{with tests}
%cabal test
%endif


%post devel
%ghc_pkg_recache


%postun devel
%ghc_pkg_recache


%files -f %{name}.files
%defattr(-,root,root,-)
%doc LICENSE
%{_bindir}/cabal-helper-wrapper

%files devel -f