Hello community,

here is the log from the commit of package ghc-zip-archive for openSUSE:Factory 
checked in at 2017-06-21 13:56:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-zip-archive (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-zip-archive.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-zip-archive"

Wed Jun 21 13:56:55 2017 rev:8 rq:504687 version:0.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-zip-archive/ghc-zip-archive.changes  
2017-06-04 01:56:17.538179552 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-zip-archive.new/ghc-zip-archive.changes     
2017-06-21 13:56:58.085262214 +0200
@@ -1,0 +2,5 @@
+Mon Jun 12 09:41:33 UTC 2017 - [email protected]
+
+- Update to version 0.3.1.
+
+-------------------------------------------------------------------

Old:
----
  zip-archive-0.3.0.6.tar.gz

New:
----
  zip-archive-0.3.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-zip-archive.spec ++++++
--- /var/tmp/diff_new_pack.HEhoJ2/_old  2017-06-21 13:56:58.793162359 +0200
+++ /var/tmp/diff_new_pack.HEhoJ2/_new  2017-06-21 13:56:58.797161795 +0200
@@ -19,7 +19,7 @@
 %global pkg_name zip-archive
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.3.0.6
+Version:        0.3.1
 Release:        0
 Summary:        Library for creating and modifying zip archives
 License:        BSD-3-Clause

++++++ zip-archive-0.3.0.6.tar.gz -> zip-archive-0.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/Main.hs 
new/zip-archive-0.3.1/Main.hs
--- old/zip-archive-0.3.0.6/Main.hs     1970-01-01 01:00:00.000000000 +0100
+++ new/zip-archive-0.3.1/Main.hs       2017-06-04 13:08:55.000000000 +0200
@@ -0,0 +1,90 @@
+------------------------------------------------------------------------
+-- Zip.hs
+-- Copyright (c) 2008 John MacFarlane
+-- License     : BSD3 (see LICENSE)
+--
+-- This is a demonstration of the use of the 'Codec.Archive.Zip' library.
+-- It duplicates some of the functionality of the 'zip' command-line
+-- program.
+------------------------------------------------------------------------
+
+import Codec.Archive.Zip
+import System.IO
+import qualified Data.ByteString.Lazy as B
+import System.Exit
+import System.Environment
+import System.Directory
+import System.Console.GetOpt
+import Control.Monad ( when )
+import Control.Applicative ( (<$>) )
+import Data.Version ( showVersion )
+import Paths_zip_archive ( version )
+import Debug.Trace ( traceShowId )
+
+data Flag
+  = Quiet
+  | Version
+  | Decompress
+  | Recursive
+  | Remove
+  | List
+  | Debug
+  | Help
+  deriving (Eq, Show, Read)
+
+options :: [OptDescr Flag]
+options =
+   [ Option ['d']   ["decompress"] (NoArg Decompress)    "decompress (unzip)"
+   , Option ['r']   ["recursive"]  (NoArg Recursive)     "recursive"
+   , Option ['R']   ["remove"]     (NoArg Remove)        "remove"
+   , Option ['l']   ["list"]       (NoArg List)          "list"
+   , Option ['v']   ["version"]    (NoArg Version)       "version"
+   , Option ['q']   ["quiet"]      (NoArg Quiet)         "quiet"
+   , Option []      ["debug"]      (NoArg Debug)         "debug output"
+   , Option ['h']   ["help"]       (NoArg Help)          "help"
+   ]
+
+main :: IO ()
+main = do
+  argv <- getArgs
+  progname <- getProgName
+  let header = "Usage: " ++ progname ++ " [OPTION...] archive files..."
+  (opts, args) <- case getOpt Permute options argv of
+      (o, _, _)      | Version `elem` o -> do
+        putStrLn ("version " ++ showVersion version)
+        exitWith ExitSuccess
+      (o, _, _)      | Help `elem` o    -> error $ usageInfo header options
+      (o, (a:as), [])                   -> return (o, a:as)
+      (_, _, errs)                      -> error $ concat errs ++ "\n" ++ 
usageInfo header options
+  let verbosity = if Quiet `elem` opts then [] else [OptVerbose]
+  let debug = Debug `elem` opts
+  let cmd = case filter (`notElem` [Quiet, Help, Version, Debug]) opts of
+                  []    -> Recursive
+                  (x:_) -> x
+  let (archivePath : files) = args
+  exists <- doesFileExist archivePath
+  archive <- if exists
+                then toArchive <$> B.readFile archivePath
+                else return emptyArchive
+  let showArchiveIfDebug x = if debug
+                                then traceShowId x
+                                else x
+  case cmd of
+       Decompress  -> extractFilesFromArchive verbosity $ showArchiveIfDebug 
archive
+       Remove      -> do tempDir <- getTemporaryDirectory
+                         (tempArchivePath, tempArchive) <- openTempFile 
tempDir "zip"
+                         B.hPut tempArchive $ fromArchive $ showArchiveIfDebug 
$
+                                              foldr deleteEntryFromArchive 
archive files
+                         hClose tempArchive
+                         copyFile tempArchivePath archivePath
+                         removeFile tempArchivePath
+       List        -> mapM_ putStrLn $ filesInArchive $ showArchiveIfDebug 
archive
+       Recursive   -> do when (null files) $ error "No files specified."
+                         tempDir <- getTemporaryDirectory
+                         (tempArchivePath, tempArchive) <- openTempFile 
tempDir "zip"
+                         addFilesToArchive (verbosity ++ [OptRecursive]) 
archive files >>=
+                            B.hPut tempArchive . fromArchive . 
showArchiveIfDebug
+                         hClose tempArchive
+                         copyFile tempArchivePath archivePath
+                         removeFile tempArchivePath
+       _           -> error $ "Unknown command " ++ show cmd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/Setup.hs 
new/zip-archive-0.3.1/Setup.hs
--- old/zip-archive-0.3.0.6/Setup.hs    1970-01-01 01:00:00.000000000 +0100
+++ new/zip-archive-0.3.1/Setup.hs      2017-06-04 13:52:37.000000000 +0200
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/Setup.lhs 
new/zip-archive-0.3.1/Setup.lhs
--- old/zip-archive-0.3.0.6/Setup.lhs   2017-04-25 09:52:02.000000000 +0200
+++ new/zip-archive-0.3.1/Setup.lhs     1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-#!/usr/bin/env runhaskell
-
-> module Main ( main ) where
->
-> import Distribution.Simple
-> import Distribution.Simple.Program
->
-> main :: IO ()
-> main = defaultMainWithHooks simpleUserHooks
->        { hookedPrograms = [ simpleProgram "zip" ]
->        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/Zip.hs 
new/zip-archive-0.3.1/Zip.hs
--- old/zip-archive-0.3.0.6/Zip.hs      2017-04-25 09:52:02.000000000 +0200
+++ new/zip-archive-0.3.1/Zip.hs        1970-01-01 01:00:00.000000000 +0100
@@ -1,84 +0,0 @@
-------------------------------------------------------------------------
--- Zip.hs
--- Copyright (c) 2008 John MacFarlane
--- License     : BSD3 (see LICENSE)
---
--- This is a demonstration of the use of the 'Codec.Archive.Zip' library.
--- It duplicates some of the functionality of the 'zip' command-line
--- program.
-------------------------------------------------------------------------
-
-import Codec.Archive.Zip
-import System.IO
-import qualified Data.ByteString.Lazy as B
-import System.Exit
-import System.Environment
-import System.Directory
-import System.Console.GetOpt
-import Control.Monad ( when )
-import Control.Applicative ( (<$>) )
-import Data.Version ( showVersion )
-import Paths_zip_archive ( version )
-
-data Flag 
-  = Quiet 
-  | Version
-  | Decompress
-  | Recursive
-  | Remove
-  | List
-  | Help
-  deriving (Eq, Show, Read)
-
-options :: [OptDescr Flag]
-options =
-   [ Option ['d']   ["decompress"] (NoArg Decompress)    "decompress (unzip)"
-   , Option ['r']   ["recursive"]  (NoArg Recursive)     "recursive"
-   , Option ['R']   ["remove"]     (NoArg Remove)        "remove"
-   , Option ['l']   ["list"]       (NoArg List)          "list"
-   , Option ['v']   ["version"]    (NoArg Version)       "version"
-   , Option ['q']   ["quiet"]      (NoArg Quiet)         "quiet"
-   , Option ['h']   ["help"]       (NoArg Help)          "help"
-   ]
-
-main :: IO ()
-main = do
-  argv <- getArgs
-  progname <- getProgName
-  let header = "Usage: " ++ progname ++ " [OPTION...] archive files..."
-  (opts, args) <- case getOpt Permute options argv of
-      (o, _, _)      | Version `elem` o -> do
-        putStrLn ("version " ++ showVersion version)
-        exitWith ExitSuccess
-      (o, _, _)      | Help `elem` o    -> error $ usageInfo header options
-      (o, (a:as), [])                   -> return (o, a:as)
-      (_, _, errs)                      -> error $ concat errs ++ "\n" ++ 
usageInfo header options
-  let verbosity = if Quiet `elem` opts then [] else [OptVerbose]
-  let cmd = take 1 $ filter (`notElem` [Quiet, Help, Version]) opts
-  let cmd' = if null cmd
-                then Recursive
-                else head cmd
-  let (archivePath : files) = args
-  exists <- doesFileExist archivePath
-  archive <- if exists
-                then toArchive <$> B.readFile archivePath
-                else return emptyArchive
-  case cmd' of
-       Decompress  -> extractFilesFromArchive verbosity archive  
-       Remove      -> do tempDir <- getTemporaryDirectory
-                         (tempArchivePath, tempArchive) <- openTempFile 
tempDir "zip" 
-                         B.hPut tempArchive $ fromArchive $ 
-                                              foldr deleteEntryFromArchive 
archive files
-                         hClose tempArchive
-                         copyFile tempArchivePath archivePath
-                         removeFile tempArchivePath
-       List        -> mapM_ putStrLn $ filesInArchive archive
-       Recursive   -> do when (null files) $ error "No files specified."
-                         tempDir <- getTemporaryDirectory
-                         (tempArchivePath, tempArchive) <- openTempFile 
tempDir "zip" 
-                         addFilesToArchive (verbosity ++ [OptRecursive]) 
archive files >>= 
-                            B.hPut tempArchive . fromArchive
-                         hClose tempArchive
-                         copyFile tempArchivePath archivePath
-                         removeFile tempArchivePath
-       _           -> error "Unknown command"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/changelog 
new/zip-archive-0.3.1/changelog
--- old/zip-archive-0.3.0.6/changelog   2017-04-25 09:59:53.000000000 +0200
+++ new/zip-archive-0.3.1/changelog     2017-06-04 13:51:30.000000000 +0200
@@ -1,3 +1,15 @@
+zip-archive 0.3.1
+
+  * Don't use a custom build (#28).
+  * Renamed executable Zip -> zip-archive, added --debug option.
+    The --debug option prints the intermediate Haskell data structure.
+
+zip-archive 0.3.0.7
+
+  * Fix check for unix file attributes (#34).
+    Previously attributes would not always be preserved
+    for files in zip archives.
+
 zip-archive 0.3.0.6
 
   * Bump bytestring lower bound so toStrict is guaranteed (Benjamin Landers).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/src/Codec/Archive/Zip.hs 
new/zip-archive-0.3.1/src/Codec/Archive/Zip.hs
--- old/zip-archive-0.3.0.6/src/Codec/Archive/Zip.hs    2017-04-25 
09:52:02.000000000 +0200
+++ new/zip-archive-0.3.1/src/Codec/Archive/Zip.hs      2017-06-04 
13:46:19.000000000 +0200
@@ -318,7 +318,7 @@
           else E.throwIO $ CRC32Mismatch path
 #ifndef _WINDOWS
        let modes = fromIntegral $ shiftR (eExternalFileAttributes entry) 16
-       when (eVersionMadeBy entry == 0x0300 &&
+       when (eVersionMadeBy entry .&. 0xFF00 == 0x0300 &&
              modes /= 0) $ setFileMode path modes
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zip-archive-0.3.0.6/zip-archive.cabal 
new/zip-archive-0.3.1/zip-archive.cabal
--- old/zip-archive-0.3.0.6/zip-archive.cabal   2017-04-25 10:00:06.000000000 
+0200
+++ new/zip-archive-0.3.1/zip-archive.cabal     2017-06-04 13:49:42.000000000 
+0200
@@ -1,7 +1,7 @@
 Name:                zip-archive
-Version:             0.3.0.6
+Version:             0.3.1
 Cabal-Version:       >= 1.10
-Build-type:          Custom
+Build-type:          Simple
 Synopsis:            Library for creating and modifying zip archives.
 Description:         The zip-archive library provides functions for creating, 
modifying,
                      and extracting files from zip archives.
@@ -42,12 +42,12 @@
   else
     Build-depends:   unix
 
-Executable Zip
+Executable zip-archive
   if flag(executable)
     Buildable:       True
   else
     Buildable:       False
-  Main-is:           Zip.hs
+  Main-is:           Main.hs
   Hs-Source-Dirs:    .
   Build-Depends:     base >= 4.2 && < 5, directory >= 1.1, bytestring >= 0.9.0,
                      zip-archive
@@ -64,7 +64,6 @@
                   HUnit, zip-archive, temporary
   Default-Language:  Haskell98
   Ghc-Options:    -Wall
-  Build-Tools:    zip
   if os(windows)
     cpp-options:     -D_WINDOWS
   else


Reply via email to