Skip to content

Commit f5fd5e4

Browse files
committed
release.hs: constant for GPG options
1 parent 39eb4b6 commit f5fd5e4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

doc/MAINTAINER_GUIDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Next release:
44

5+
* Check that GPG signature for
6+
[Releases](https://s3.amazonaws.com/download.fpcomplete.com/debian/dists/jessie/Release)
7+
uses SHA512, and close
8+
[#1943](https://github.com/commercialhaskell/stack/issues/1934)
59
* Integrate FreeBSD binaries and packages
610
[#1253](https://github.com/commercialhaskell/stack/issues/1253#issuecomment-185993240)
711

etc/scripts/release.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ rules global@Global{..} args = do
221221
releaseDir </> binaryPkgSignatureFileName %> \out -> do
222222
need [out -<.> ""]
223223
_ <- liftIO $ tryJust (guard . isDoesNotExistError) (removeFile out)
224-
cmd "gpg --detach-sig --digest-algo=sha512 --armor"
224+
cmd ("gpg " ++ gpgOptions ++ " --detach-sig --armor")
225225
[ "-u", gGpgKey
226226
, dropExtension out ]
227227

@@ -250,15 +250,15 @@ rules global@Global{..} args = do
250250
need [pkgFile]
251251
() <- cmd "deb-s3 upload --preserve-versions --bucket download.fpcomplete.com"
252252
[ "--sign=" ++ gGpgKey
253-
, "--gpg-options=--digest-algo=sha512"
253+
, "--gpg-options=" ++ gpgOptions
254254
, "--prefix=" ++ dvDistro
255255
, "--codename=" ++ dvCodeName
256256
, pkgFile ]
257257
-- Also upload to the old, incorrect location for people who still have their systems
258258
-- configured with it.
259259
() <- cmd "deb-s3 upload --preserve-versions --bucket download.fpcomplete.com"
260260
[ "--sign=" ++ gGpgKey
261-
, "--gpg-options=--digest-algo=sha512"
261+
, "--gpg-options=" ++ gpgOptions
262262
, "--prefix=" ++ dvDistro ++ "/" ++ dvCodeName
263263
, pkgFile ]
264264
copyFileChanged pkgFile out
@@ -603,6 +603,10 @@ stackArgs Global{..} = ["--install-ghc", "--arch=" ++ display gArch]
603603
stackProgName :: FilePath
604604
stackProgName = "stack"
605605

606+
-- | Options to pass to invocations of gpg
607+
gpgOptions :: String
608+
gpgOptions = "--digest-algo=sha512"
609+
606610
-- | Linux distribution/version combination.
607611
data DistroVersion = DistroVersion
608612
{ dvDistro :: !String

0 commit comments

Comments
 (0)