packages feed

self-extract 0.3.3 → 0.3.4

raw patch · 6 files changed

+82/−66 lines, 6 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+## self-extract 0.3.4++Fixes:+* Better error message if no archive was bundled+ ## self-extract 0.3.3  Fixes:
+ LICENSE view
@@ -0,0 +1,11 @@+Copyright 2018 Brandon Chinn++Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:++1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.++3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
− LICENSE.md
@@ -1,11 +0,0 @@-Copyright 2018 Brandon Chinn--Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:--1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.--2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.--3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
self-extract.cabal view
@@ -1,62 +1,73 @@-name:                self-extract-version:             0.3.3-license:             BSD3-license-file:        LICENSE.md-author:              Brandon Chinn <brandonchinn178@gmail.com>-maintainer:          Brandon Chinn <brandonchinn178@gmail.com>-category:            Distribution-synopsis:            A Haskell library to make self-extracting executables-description:         A Haskell library to make self-extracting executables.-build-type:          Simple-cabal-version:       1.18-extra-doc-files:     CHANGELOG.md, README.md+-- This file has been generated from package.yaml by hpack version 0.28.2.+--+-- see: https://github.com/sol/hpack+--+-- hash: 9aa6665712803373181ee46b0357dc87ee3f4c7b030c6bd0123042ad21d3be59 +name:           self-extract+version:        0.3.4+synopsis:       A Haskell library to make self-extracting executables+description:    A Haskell library to make self-extracting executables.+category:       Distribution+homepage:       https://github.com/brandonchinn178/self-extract#readme+bug-reports:    https://github.com/brandonchinn178/self-extract/issues+author:         Brandon Chinn <brandonchinn178@gmail.com>+maintainer:     Brandon Chinn <brandonchinn178@gmail.com>+license:        BSD3+license-file:   LICENSE+build-type:     Simple+cabal-version:  >= 1.18+extra-doc-files:+    CHANGELOG.md+    README.md+ source-repository head   type: git-  location: https://github.com/brandonchinn178/self-extract.git+  location: https://github.com/brandonchinn178/self-extract  flag dev-  description:        Turn on development settings.-  manual:             True-  default:            False+  description: Turn on development settings.+  manual: True+  default: False  library-  hs-source-dirs:      src-  default-language:    Haskell2010-  exposed-modules:     Codec.SelfExtract-                       Codec.SelfExtract.Distribution-  build-depends:       base >= 4.7 && < 5-                     , Cabal >= 2.0 && < 3-                     , binary >= 0.8.5 && < 0.9-                     , bytestring >= 0.10.8 && < 0.11-                     , extra >= 1.6 && < 1.7-                     , file-embed >= 0.0.10 && < 0.1-                     , path >= 0.6 && < 0.7-                     , path-io >= 1.3 && < 1.4-                     , unix-compat >= 0.5 && < 0.6-                     , ztar >= 0.2 && < 0.3+  exposed-modules:+      Codec.SelfExtract+      Codec.SelfExtract.Distribution+  other-modules:+      Paths_self_extract+  hs-source-dirs:+      src   ghc-options: -Wall+  build-depends:+      Cabal >=2.0 && <3+    , base >=4.7 && <5+    , binary >=0.8.5 && <0.9+    , bytestring >=0.10.8 && <0.11+    , extra >=1.6 && <1.7+    , file-embed >=0.0.10 && <0.1+    , path >=0.6 && <0.7+    , path-io >=1.3 && <1.4+    , unix-compat >=0.5 && <0.6+    , ztar >=0.2 && <0.3   if flag(dev)-    ghc-options:      -Werror-  if flag(dev) && impl(ghc >= 8.0)-    ghc-options:      -Wcompat-                      -Wincomplete-record-updates-                      -Wincomplete-uni-patterns-                      -Wnoncanonical-monad-instances-                      -Wnoncanonical-monadfail-instances+    ghc-options: -Werror+  if impl(ghc >= 8.0)+    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances+  default-language: Haskell2010  executable self-bundle-  main-is:              Bundle.hs-  hs-source-dirs:       exe-  default-language:     Haskell2010-  build-depends:        base-                      , self-extract+  main-is: Bundle.hs+  other-modules:+      Paths_self_extract+  hs-source-dirs:+      exe   ghc-options: -Wall+  build-depends:+      base+    , self-extract   if flag(dev)-    ghc-options:      -Werror-  if flag(dev) && impl(ghc >= 8.0)-    ghc-options:      -Wcompat-                      -Wincomplete-record-updates-                      -Wincomplete-uni-patterns-                      -Wnoncanonical-monad-instances-                      -Wnoncanonical-monadfail-instances+    ghc-options: -Werror+  if impl(ghc >= 8.0)+    ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances+  default-language: Haskell2010
src/Codec/SelfExtract.hs view
@@ -7,8 +7,8 @@ Defines functions that should be used in a self-extractable executable. -} -{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-}  module Codec.SelfExtract@@ -22,7 +22,7 @@  import Codec.Archive.ZTar (Compression(..), create', extract') import Control.Monad ((>=>))-import Control.Monad.Extra (unlessM)+import Control.Monad.Extra (unlessM, whenM) import Data.Binary (Word32, decode, encode) import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS@@ -50,7 +50,7 @@     , withTempDir     ) import System.Environment (getExecutablePath)-import System.IO (IOMode(..), SeekMode(..), hClose, hSeek, withFile)+import System.IO (IOMode(..), SeekMode(..), hClose, hIsEOF, hSeek, withFile) import qualified System.PosixCompat.Files as Posix  {- With FilePaths -}@@ -95,6 +95,7 @@   withSystemTempFile "" $ \archive hTemp -> do     withFile (fromAbsFile self) ReadMode $ \hSelf -> do       hSeek hSelf AbsoluteSeek $ fromIntegral exeSize+      whenM (hIsEOF hSelf) $ fail "No archive found. Did you call `bundle'` on this executable?"       BS.hGetContents hSelf >>= BS.hPut hTemp      hClose hTemp
src/Codec/SelfExtract/Distribution.hs view
@@ -8,15 +8,14 @@ -}  {-# LANGUAGE NamedFieldPuns #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE QuasiQuotes #-}  module Codec.SelfExtract.Distribution   ( getExe   , getExe'   ) where -import Distribution.Simple.LocalBuildInfo (InstallDirs(..), LocalBuildInfo(..), fromPathTemplate)+import Distribution.Simple.LocalBuildInfo+    (InstallDirs(..), LocalBuildInfo(..), fromPathTemplate) import Distribution.Simple.Setup (ConfigFlags(..), fromFlag) import Path (Abs, File, Path, parseAbsDir, parseRelFile, toFilePath, (</>))