Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-zip for openSUSE:Factory checked in at 2021-11-11 21:37:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-zip (Old) and /work/SRC/openSUSE:Factory/.ghc-zip.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-zip" Thu Nov 11 21:37:49 2021 rev:6 rq:930452 version:1.7.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-zip/ghc-zip.changes 2021-08-25 20:58:26.789142423 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-zip.new.1890/ghc-zip.changes 2021-11-11 21:38:40.836987488 +0100 @@ -1,0 +2,5 @@ +Mon Nov 1 08:43:00 UTC 2021 - [email protected] + +- Add zip at version 1.7.2. + +------------------------------------------------------------------- @@ -40 +44,0 @@ - Old: ---- zip-1.7.1.tar.gz zip.cabal New: ---- zip-1.7.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-zip.spec ++++++ --- /var/tmp/diff_new_pack.9OvMXP/_old 2021-11-11 21:38:41.284987814 +0100 +++ /var/tmp/diff_new_pack.9OvMXP/_new 2021-11-11 21:38:41.284987814 +0100 @@ -19,13 +19,12 @@ %global pkg_name zip %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.7.1 +Version: 1.7.2 Release: 0 Summary: Operations on zip archives License: BSD-3-Clause 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: chrpath BuildRequires: ghc-Cabal-devel BuildRequires: ghc-bytestring-devel @@ -72,7 +71,6 @@ %prep %autosetup -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ zip-1.7.1.tar.gz -> zip-1.7.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zip-1.7.1/CHANGELOG.md new/zip-1.7.2/CHANGELOG.md --- old/zip-1.7.1/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/zip-1.7.2/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,8 @@ +## Zip 1.7.2 + +* Now the ZIP64 extra field is only written when it is necessary. Previously + it was written unconditionally and it confused some tools. + ## Zip 1.7.1 * Fixed compilation with zstd and/or bzip2 disabled. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zip-1.7.1/Codec/Archive/Zip/Internal.hs new/zip-1.7.2/Codec/Archive/Zip/Internal.hs --- old/zip-1.7.1/Codec/Archive/Zip/Internal.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/zip-1.7.2/Codec/Archive/Zip/Internal.hs 2001-09-09 03:46:40.000000000 +0200 @@ -563,6 +563,8 @@ hSeek h AbsoluteSeek afterStreaming return (s, desc2) +{- ORMOLU_DISABLE -} + -- | Create a 'Sink' to stream data there. Once streaming is finished, -- return 'DataDescriptor' for the streamed data. The action /does not/ -- close the given 'Handle'. @@ -612,6 +614,8 @@ ddUncompressedSize = uncompressedSize } +{- ORMOLU_ENABLE -} + -- | Append central directory entries and the end of central directory -- record to the file that given 'Handle' is associated with. Note that this -- automatically writes Zip64 end of central directory record and Zip64 end @@ -774,12 +778,12 @@ Zip64ExtraField -> -- | Resulting representation ByteString -makeZip64ExtraField c Zip64ExtraField {..} = runPut $ do - when (c == LocalHeader || z64efUncompressedSize >= ffffffff) $ +makeZip64ExtraField headerType Zip64ExtraField {..} = runPut $ do + when (headerType == LocalHeader || z64efUncompressedSize >= ffffffff) $ putWord64le (fromIntegral z64efUncompressedSize) -- uncompressed size - when (c == LocalHeader || z64efCompressedSize >= ffffffff) $ + when (headerType == LocalHeader || z64efCompressedSize >= ffffffff) $ putWord64le (fromIntegral z64efCompressedSize) -- compressed size - when (c == CentralDirHeader && z64efOffset >= ffffffff) $ + when (headerType == CentralDirHeader && z64efOffset >= ffffffff) $ putWord64le (fromIntegral z64efOffset) -- offset of local file header -- | Create 'ByteString' representing an extra field. @@ -795,8 +799,8 @@ putCD m = forM_ (M.keys m) $ \s -> putHeader CentralDirHeader s (m ! s) --- | Create 'ByteString' representing a local file header if the first --- argument is 'False' and a central directory file header otherwise. +-- | Create 'ByteString' representing either a local file header or a +-- central directory file header. putHeader :: -- | Type of header to generate HeaderType -> @@ -805,11 +809,11 @@ -- | Description of entry EntryDescription -> Put -putHeader c' s EntryDescription {..} = do - let c = c' == CentralDirHeader - putWord32le (bool 0x04034b50 0x02014b50 c) +putHeader headerType s entry@EntryDescription {..} = do + let isCentralDirHeader = headerType == CentralDirHeader + putWord32le (bool 0x04034b50 0x02014b50 isCentralDirHeader) -- ??? local/central file header signature - when c $ + when isCentralDirHeader $ putWord16le (fromVersion edVersionMadeBy) -- version made by putWord16le (fromVersion edVersionNeeded) -- version needed to extract let entryName = getEntryName s @@ -830,7 +834,7 @@ putWord16le (fromIntegral $ B.length rawName) -- file name length let zip64ef = makeZip64ExtraField - c' + headerType Zip64ExtraField { z64efUncompressedSize = edUncompressedSize, z64efCompressedSize = edCompressedSize, @@ -838,9 +842,11 @@ } extraField = B.take 0xffff . runPut . putExtraField $ - M.insert 1 zip64ef edExtraField + if needsZip64 entry + then M.insert 1 zip64ef edExtraField + else edExtraField putWord16le (fromIntegral $ B.length extraField) -- extra field length - when c $ do + when isCentralDirHeader $ do putWord16le (fromIntegral $ B.length comment) -- file comment length putWord16le 0 -- disk number start putWord16le 0 -- internal file attributes @@ -848,7 +854,7 @@ putWord32le (withSaturation edOffset) -- relative offset of local header putByteString rawName -- file name (variable size) putByteString extraField -- extra field (variable size) - when c (putByteString comment) -- file comment (variable size) + when isCentralDirHeader (putByteString comment) -- file comment (variable size) -- | Create 'ByteString' representing Zip64 end of central directory record. putZip64ECD :: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zip-1.7.1/tests/Main.hs new/zip-1.7.2/tests/Main.hs --- old/zip-1.7.1/tests/Main.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/zip-1.7.2/tests/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -84,6 +84,8 @@ instance Arbitrary ByteString where arbitrary = B.pack <$> listOf arbitrary +{- ORMOLU_DISABLE -} + instance Arbitrary CompressionMethod where arbitrary = elements @@ -97,6 +99,8 @@ Deflate ] +{- ORMOLU_ENABLE -} + instance Arbitrary UTCTime where arbitrary = UTCTime @@ -455,13 +459,16 @@ it "does not pass the check" $ \path -> property $ \b s -> not (B.null b) ==> do - let r = 50 + (B.length . T.encodeUtf8 . getEntryName $ s) - offset <- createArchive path $ do + let headerLength = 30 + (B.length . T.encodeUtf8 . getEntryName $ s) + localFileHeaderOffset <- createArchive path $ do addEntry Store b s commit fromIntegral . edOffset . (! s) <$> getEntries withFile path ReadWriteMode $ \h -> do - hSeek h AbsoluteSeek (offset + fromIntegral r) + hSeek + h + AbsoluteSeek + (localFileHeaderOffset + fromIntegral headerLength) byte <- B.map complement <$> B.hGet h 1 hSeek h RelativeSeek (-1) B.hPut h byte diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zip-1.7.1/zip.cabal new/zip-1.7.2/zip.cabal --- old/zip-1.7.1/zip.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/zip-1.7.2/zip.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,11 +1,11 @@ cabal-version: 1.18 name: zip -version: 1.7.1 +version: 1.7.2 license: BSD3 license-file: LICENSE.md maintainer: Mark Karpov <[email protected]> author: Mark Karpov <[email protected]> -tested-with: ghc ==8.8.4 ghc ==8.10.4 ghc ==9.0.1 +tested-with: ghc ==8.8.4 ghc ==8.10.5 ghc ==9.0.1 homepage: https://github.com/mrkkrp/zip bug-reports: https://github.com/mrkkrp/zip/issues synopsis: Operations on zip archives @@ -67,7 +67,7 @@ mtl >=2.0 && <3.0, resourcet >=1.2 && <1.3, text >=0.2 && <1.3, - time >=1.4 && <1.10, + time >=1.4 && <1.13, transformers >=0.4 && <0.6, transformers-base @@ -134,7 +134,7 @@ hspec >=2.0 && <3.0, temporary >=1.1 && <1.4, text >=0.2 && <1.3, - time >=1.4 && <1.10, + time >=1.4 && <1.13, transformers >=0.4 && <0.6, zip
