summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-05-24 01:34:17 -0400
committerJoey Hess <joeyh@joeyh.name>2016-05-24 01:34:17 -0400
commitc80dce468b0660387e71e66743920b284c04f720 (patch)
tree84015ceeafc5fe58a73c1b4dd32f6238b9313435
parentc86fb48e2fe685434558c0ccfc27d093ce741835 (diff)
downloadgit-repair-c80dce468b0660387e71e66743920b284c04f720.tar.gz
Updated cabal file explictly lists source files.
The tarball on hackage will include only the files needed for cabal install; it is NOT the full git-repair source tree. debian/changelog: Converted to symlinks to CHANGELOG.
-rw-r--r--Build/Version.hs12
-rwxr-xr-xBuild/make-sdist.sh21
-rw-r--r--[l---------]CHANGELOG116
-rw-r--r--Makefile2
-rw-r--r--Setup.hs2
-rw-r--r--configure.hs6
l---------[-rw-r--r--]debian/changelog112
-rw-r--r--git-repair.cabal79
8 files changed, 198 insertions, 152 deletions
diff --git a/Build/Version.hs b/Build/Version.hs
index da9d1bb..d39a0fe 100644
--- a/Build/Version.hs
+++ b/Build/Version.hs
@@ -1,24 +1,26 @@
{- Package version determination, for configure script. -}
+{-# OPTIONS_GHC -fno-warn-tabs #-}
+
module Build.Version where
-import Data.Maybe
-import Control.Applicative
import Data.List
import System.Environment
-import System.Directory
import Data.Char
import System.Process
+import Control.Applicative
+import Prelude
import Utility.Monad
import Utility.Exception
+import Utility.Directory
type Version = String
{- Set when making an official release. (Distribution vendors should set
- this too.) -}
isReleaseBuild :: IO Bool
-isReleaseBuild = isJust <$> catchMaybeIO (getEnv "RELEASE_BUILD")
+isReleaseBuild = (== Just "1") <$> catchMaybeIO (getEnv "RELEASE_BUILD")
{- Version is usually based on the major version from the changelog,
- plus the date of the last commit, plus the git rev of that commit.
@@ -44,7 +46,7 @@ getVersion = do
getChangelogVersion :: IO Version
getChangelogVersion = do
- changelog <- readFile "debian/changelog"
+ changelog <- readFile "CHANGELOG"
let verline = takeWhile (/= '\n') changelog
return $ middle (words verline !! 1)
where
diff --git a/Build/make-sdist.sh b/Build/make-sdist.sh
deleted file mode 100755
index d4dbdb9..0000000
--- a/Build/make-sdist.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-#
-# Workaround for `cabal sdist` requiring all included files to be listed
-# in .cabal.
-
-# Create target directory
-sdist_dir=git-repair-$(grep '^Version:' git-repair.cabal | sed -re 's/Version: *//')
-mkdir --parents dist/$sdist_dir
-
-find . \( -name .git -or -name dist -or -name cabal-dev \) -prune \
- -or -not -name \\*.orig -not -type d -print \
-| perl -ne "print unless length >= 100 - length q{$sdist_dir}" \
-| xargs cp --parents --target-directory dist/$sdist_dir
-
-cd dist
-tar --format=ustar -caf $sdist_dir.tar.gz $sdist_dir
-
-# Check that tarball can be unpacked by cabal.
-# It's picky about tar longlinks etc.
-rm -rf $sdist_dir
-cabal unpack $sdist_dir.tar.gz
diff --git a/CHANGELOG b/CHANGELOG
index d526672..94f0743 120000..100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1 +1,115 @@
-debian/changelog \ No newline at end of file
+git-repair (1.20151216) UNRELEASED; urgency=medium
+
+ * git-repair.cabal: Add Setup-Depends.
+ * Updated cabal file explictly lists source files. The tarball
+ on hackage will include only the files needed for cabal install;
+ it is NOT the full git-repair source tree.
+ * debian/changelog: Converted to symlinks to CHANGELOG.
+
+ -- Joey Hess <id@joeyh.name> Wed, 04 May 2016 12:16:33 -0400
+
+git-repair (1.20151215) unstable; urgency=medium
+
+ * Fix insecure temporary permissions and potential denial of
+ service attack when creating temp dirs. Closes: #807341
+ * Merge from git-annex.
+
+ -- Joey Hess <id@joeyh.name> Tue, 15 Dec 2015 20:47:59 -0400
+
+git-repair (1.20150106) unstable; urgency=medium
+
+ * Debian package is now maintained by Richard Hartmann.
+ * Fix build with process 1.2.1.0.
+ * Merge from git-annex.
+
+ -- Joey Hess <id@joeyh.name> Tue, 06 Jan 2015 19:09:23 -0400
+
+git-repair (1.20141027) unstable; urgency=medium
+
+ * Adjust cabal file to support network-uri split.
+ * Merge Build/ from git-annex, including removing a use of deprecated
+ System.Cmd.
+
+ -- Joey Hess <joeyh@debian.org> Mon, 27 Oct 2014 11:09:56 -0400
+
+git-repair (1.20141026) unstable; urgency=medium
+
+ * Prevent auto gc from happening when fetching from a remote.
+ * Merge from git-annex.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 26 Oct 2014 13:37:30 -0400
+
+git-repair (1.20140914) unstable; urgency=medium
+
+ * Update to build with optparse-applicative 0.10. Closes: #761552
+
+ -- Joey Hess <joeyh@debian.org> Sun, 14 Sep 2014 12:48:27 -0400
+
+git-repair (1.20140815) unstable; urgency=medium
+
+ * Removing bad objects could leave fsck finding no more unreachable objects,
+ but some branches no longer accessible. Fix this, including support for
+ fixing up repositories that were incompletely repaired before.
+ * Merge from git-annex.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 15 Aug 2014 13:49:09 -0400
+
+git-repair (1.20140423) unstable; urgency=medium
+
+ * Improve memory usage when git fsck finds a great many broken objects.
+ * Merge from git-annex.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 23 Apr 2014 14:01:30 -0400
+
+git-repair (1.20140227) unstable; urgency=medium
+
+ * Optimise unpacking of pack files, and avoid repeated error
+ messages about corrupt pack files.
+ * Add swapping 2 files test case.
+
+ -- Joey Hess <joeyh@debian.org> Thu, 27 Feb 2014 11:56:27 -0400
+
+git-repair (1.20140115) unstable; urgency=medium
+
+ * Support old git versions from before git fsck --no-dangling was
+ implemented.
+ * Fix bug in packed refs file exploding code that caused a .gitrefs
+ directory to be created instead of .git/refs
+ * Check git version at run time.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 15 Jan 2014 16:53:30 -0400
+
+git-repair (1.20131213) unstable; urgency=low
+
+ * Improve repair of index files in some situations.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 13 Dec 2013 14:51:51 -0400
+
+git-repair (1.20131203) unstable; urgency=low
+
+ * Fix build deps. Closes: #731179
+
+ -- Joey Hess <joeyh@debian.org> Tue, 03 Dec 2013 15:02:21 -0400
+
+git-repair (1.20131122) unstable; urgency=low
+
+ * Added test mode, which can be used to randomly corrupt test
+ repositories, in reproducible ways, which allows easy
+ corruption-driven-development.
+ * Improve repair code in the case where the index file is corrupt,
+ and this hides other problems.
+ * Write a dummy .git/HEAD if the file is missing or corrupt, as
+ git otherwise will not treat the repository as a git repo.
+ * Improve fsck code to find badly corrupted objects that crash git fsck
+ before it can complain about them.
+ * Fixed crashes on bad file encodings.
+ * Can now run 10000 tests (git-repair --test -n 10000 --force)
+ with 0 failures.
+
+ -- Joey Hess <joeyh@debian.org> Fri, 22 Nov 2013 11:16:03 -0400
+
+git-repair (1.20131118) unstable; urgency=low
+
+ * First release
+
+ -- Joey Hess <joeyh@debian.org> Mon, 18 Nov 2013 13:38:12 -0400
diff --git a/Makefile b/Makefile
index dcdcbbb..19312be 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ clean:
# Upload to hackage.
hackage: clean
- ./Build/make-sdist.sh
+ @cabal sdist
@cabal upload dist/*.tar.gz
# hothasktags chokes on some template haskell etc, so ignore errors
diff --git a/Setup.hs b/Setup.hs
index 03c23a3..b5603f8 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,3 +1,5 @@
+{-# OPTIONS_GHC -fno-warn-tabs #-}
+
{- cabal setup file -}
import Distribution.Simple
diff --git a/configure.hs b/configure.hs
deleted file mode 100644
index 15833e6..0000000
--- a/configure.hs
+++ /dev/null
@@ -1,6 +0,0 @@
-{- configure program -}
-
-import Build.Configure
-
-main :: IO ()
-main = run tests
diff --git a/debian/changelog b/debian/changelog
index 395b4dc..a535994 100644..120000
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,111 +1 @@
-git-repair (1.20151216) UNRELEASED; urgency=medium
-
- * git-repair.cabal: Add Setup-Depends.
-
- -- Joey Hess <id@joeyh.name> Wed, 04 May 2016 12:16:33 -0400
-
-git-repair (1.20151215) unstable; urgency=medium
-
- * Fix insecure temporary permissions and potential denial of
- service attack when creating temp dirs. Closes: #807341
- * Merge from git-annex.
-
- -- Joey Hess <id@joeyh.name> Tue, 15 Dec 2015 20:47:59 -0400
-
-git-repair (1.20150106) unstable; urgency=medium
-
- * Debian package is now maintained by Richard Hartmann.
- * Fix build with process 1.2.1.0.
- * Merge from git-annex.
-
- -- Joey Hess <id@joeyh.name> Tue, 06 Jan 2015 19:09:23 -0400
-
-git-repair (1.20141027) unstable; urgency=medium
-
- * Adjust cabal file to support network-uri split.
- * Merge Build/ from git-annex, including removing a use of deprecated
- System.Cmd.
-
- -- Joey Hess <joeyh@debian.org> Mon, 27 Oct 2014 11:09:56 -0400
-
-git-repair (1.20141026) unstable; urgency=medium
-
- * Prevent auto gc from happening when fetching from a remote.
- * Merge from git-annex.
-
- -- Joey Hess <joeyh@debian.org> Sun, 26 Oct 2014 13:37:30 -0400
-
-git-repair (1.20140914) unstable; urgency=medium
-
- * Update to build with optparse-applicative 0.10. Closes: #761552
-
- -- Joey Hess <joeyh@debian.org> Sun, 14 Sep 2014 12:48:27 -0400
-
-git-repair (1.20140815) unstable; urgency=medium
-
- * Removing bad objects could leave fsck finding no more unreachable objects,
- but some branches no longer accessible. Fix this, including support for
- fixing up repositories that were incompletely repaired before.
- * Merge from git-annex.
-
- -- Joey Hess <joeyh@debian.org> Fri, 15 Aug 2014 13:49:09 -0400
-
-git-repair (1.20140423) unstable; urgency=medium
-
- * Improve memory usage when git fsck finds a great many broken objects.
- * Merge from git-annex.
-
- -- Joey Hess <joeyh@debian.org> Wed, 23 Apr 2014 14:01:30 -0400
-
-git-repair (1.20140227) unstable; urgency=medium
-
- * Optimise unpacking of pack files, and avoid repeated error
- messages about corrupt pack files.
- * Add swapping 2 files test case.
-
- -- Joey Hess <joeyh@debian.org> Thu, 27 Feb 2014 11:56:27 -0400
-
-git-repair (1.20140115) unstable; urgency=medium
-
- * Support old git versions from before git fsck --no-dangling was
- implemented.
- * Fix bug in packed refs file exploding code that caused a .gitrefs
- directory to be created instead of .git/refs
- * Check git version at run time.
-
- -- Joey Hess <joeyh@debian.org> Wed, 15 Jan 2014 16:53:30 -0400
-
-git-repair (1.20131213) unstable; urgency=low
-
- * Improve repair of index files in some situations.
-
- -- Joey Hess <joeyh@debian.org> Fri, 13 Dec 2013 14:51:51 -0400
-
-git-repair (1.20131203) unstable; urgency=low
-
- * Fix build deps. Closes: #731179
-
- -- Joey Hess <joeyh@debian.org> Tue, 03 Dec 2013 15:02:21 -0400
-
-git-repair (1.20131122) unstable; urgency=low
-
- * Added test mode, which can be used to randomly corrupt test
- repositories, in reproducible ways, which allows easy
- corruption-driven-development.
- * Improve repair code in the case where the index file is corrupt,
- and this hides other problems.
- * Write a dummy .git/HEAD if the file is missing or corrupt, as
- git otherwise will not treat the repository as a git repo.
- * Improve fsck code to find badly corrupted objects that crash git fsck
- before it can complain about them.
- * Fixed crashes on bad file encodings.
- * Can now run 10000 tests (git-repair --test -n 10000 --force)
- with 0 failures.
-
- -- Joey Hess <joeyh@debian.org> Fri, 22 Nov 2013 11:16:03 -0400
-
-git-repair (1.20131118) unstable; urgency=low
-
- * First release
-
- -- Joey Hess <joeyh@debian.org> Mon, 18 Nov 2013 13:38:12 -0400
+../CHANGELOG \ No newline at end of file
diff --git a/git-repair.cabal b/git-repair.cabal
index 25f0f2e..5076fbd 100644
--- a/git-repair.cabal
+++ b/git-repair.cabal
@@ -7,7 +7,6 @@ Author: Joey Hess
Stability: Stable
Copyright: 2013 Joey Hess
License-File: GPL
-Extra-Source-Files: CHANGELOG
Build-Type: Custom
Homepage: http://git-repair.branchable.com/
Category: Utility
@@ -21,11 +20,24 @@ Description:
As well as avoiding the need to rm -rf a damaged repository and re-clone,
using git-repair can help rescue commits you've made to the damaged
repository and not yet pushed out.
+Extra-Source-Files:
+ CHANGELOG
+ TODO
+ git-repair.1
Flag network-uri
Description: Get Network.URI from the network-uri package
Default: True
+custom-setup
+ Setup-Depends: base (>= 4.5), hslogger, MissingH, unix-compat, process,
+ unix, filepath, exceptions, bytestring, directory, IfElse, data-default,
+ Cabal
+
+source-repository head
+ type: git
+ location: git://git-repair.branchable.com/
+
Executable git-repair
Main-Is: git-repair.hs
GHC-Options: -threaded -Wall -fno-warn-tabs
@@ -44,9 +56,62 @@ Executable git-repair
else
Build-Depends: unix
-custom-setup
- Setup-Depends: base (>= 4.5), hslogger, MissingH
-
-source-repository head
- type: git
- location: git://git-repair.branchable.com/
+ Other-Modules:
+ Build.Configure
+ Build.TestConfig
+ Build.Version
+ Common
+ Git
+ Git.Branch
+ Git.BuildVersion
+ Git.CatFile
+ Git.Command
+ Git.Config
+ Git.Construct
+ Git.CurrentRepo
+ Git.Destroyer
+ Git.DiffTreeItem
+ Git.FilePath
+ Git.Filename
+ Git.Fsck
+ Git.Index
+ Git.LsFiles
+ Git.LsTree
+ Git.Objects
+ Git.Ref
+ Git.RefLog
+ Git.Remote
+ Git.Repair
+ Git.Sha
+ Git.Types
+ Git.UpdateIndex
+ Git.Url
+ Git.Version
+ Utility.Applicative
+ Utility.Batch
+ Utility.CoProcess
+ Utility.Data
+ Utility.Directory
+ Utility.DottedVersion
+ Utility.Env
+ Utility.Exception
+ Utility.FileMode
+ Utility.FileSize
+ Utility.FileSystemEncoding
+ Utility.Format
+ Utility.Metered
+ Utility.Misc
+ Utility.Monad
+ Utility.PartialPrelude
+ Utility.Path
+ Utility.PosixFiles
+ Utility.Process
+ Utility.Process.Shim
+ Utility.QuickCheck
+ Utility.Rsync
+ Utility.SafeCommand
+ Utility.SystemDirectory
+ Utility.ThreadScheduler
+ Utility.Tmp
+ Utility.URI
+ Utility.UserInfo