Hello community, here is the log from the commit of package ghc-cipher-aes128 for openSUSE:Factory checked in at 2016-10-23 12:50:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-cipher-aes128 (Old) and /work/SRC/openSUSE:Factory/.ghc-cipher-aes128.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-cipher-aes128" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-cipher-aes128/ghc-cipher-aes128.changes 2016-09-25 14:37:40.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-cipher-aes128.new/ghc-cipher-aes128.changes 2016-10-23 12:50:46.000000000 +0200 @@ -1,0 +2,5 @@ +Thu Sep 15 06:44:08 UTC 2016 - [email protected] + +- Update to version 0.7.0.3 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- cipher-aes128-0.7.0.1.tar.gz New: ---- cipher-aes128-0.7.0.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-cipher-aes128.spec ++++++ --- /var/tmp/diff_new_pack.pWjL6V/_old 2016-10-23 12:50:47.000000000 +0200 +++ /var/tmp/diff_new_pack.pWjL6V/_new 2016-10-23 12:50:47.000000000 +0200 @@ -18,22 +18,20 @@ %global pkg_name cipher-aes128 Name: ghc-%{pkg_name} -Version: 0.7.0.1 +Version: 0.7.0.3 Release: 0 Summary: AES and common modes using AES-NI when available License: BSD-3-Clause -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-bytestring-devel BuildRequires: ghc-cereal-devel BuildRequires: ghc-crypto-api-devel BuildRequires: ghc-rpm-macros BuildRequires: ghc-tagged-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build -# End cabal-rpm deps %description Cipher-aes128 is an implementation of AES and common modes of operation. @@ -58,15 +56,12 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %post devel %ghc_pkg_recache ++++++ cipher-aes128-0.7.0.1.tar.gz -> cipher-aes128-0.7.0.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cipher-aes128-0.7.0.1/Benchmark/bench.hs new/cipher-aes128-0.7.0.3/Benchmark/bench.hs --- old/cipher-aes128-0.7.0.1/Benchmark/bench.hs 2015-04-26 18:33:37.000000000 +0200 +++ new/cipher-aes128-0.7.0.3/Benchmark/bench.hs 2016-08-31 07:58:48.000000000 +0200 @@ -1,5 +1,4 @@ -import Crypto.Cipher.AES128 -import Crypto.Cipher.AES +import qualified Crypto.Cipher.AES128 as AES128 import Crypto.Classes import Crypto.Types import Criterion @@ -12,11 +11,8 @@ let iv = zeroIV ivV = B.replicate 16 0 pt <- getEntropy (2^16) - k <- buildKeyIO :: IO AESKey128 - let kV = initAES (B.pack [0..15]) + k <- buildKeyIO :: IO AES128.AESKey128 defaultMain - [ bench "aes-ecb cipher-aes128" $ nf (encryptBlock k) pt - , bench "aes-ctr cipher-aes128" $ nf (fst . ctr k iv) pt - , bench "aes-ecb cipher-aes" $ nf (encryptECB kV) pt - , bench "aes-ctr cipher-aes" $ nf (encryptCTR kV ivV) pt - , bench "aes-gcm cipher-aes" $ nf (fst . encryptGCM kV ivV B.empty) pt] + [ bench "aes-ecb cipher-aes128" $ nf (AES128.encryptBlock k) pt + , bench "aes-ctr cipher-aes128" $ nf (fst . AES128.ctr k iv) pt + ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cipher-aes128-0.7.0.1/Setup.hs new/cipher-aes128-0.7.0.3/Setup.hs --- old/cipher-aes128-0.7.0.1/Setup.hs 2015-04-26 18:33:37.000000000 +0200 +++ new/cipher-aes128-0.7.0.3/Setup.hs 2016-08-31 07:58:48.000000000 +0200 @@ -1,14 +1,15 @@ +{-# LANGUAGE CPP #-} +import Control.Monad (unless) import Distribution.Simple import Distribution.Simple.LocalBuildInfo -import Distribution.Simple.Setup -import Distribution.PackageDescription import Distribution.Simple.Utils import Distribution.Simple.Program import Distribution.Verbosity import System.Process -import System.Directory import System.Exit +import System.IO (hFlush, stdout) +main :: IO () main = defaultMainWithHooks hk where hk = simpleUserHooks { buildHook = \pd lbi uh bf -> do @@ -17,7 +18,7 @@ mConf = lookupProgram ccProg (withPrograms lbi) hcConf = lookupProgram hcProg (withPrograms lbi) err = error "Could not determine C compiler" - cc = locationPath . programLocation . maybe err id $ mConf + _cc = locationPath . programLocation . maybe err id $ mConf hc = locationPath . programLocation . maybe err id $ hcConf b <- canUseAesIntrinsicsFlag hc let newWithPrograms1 = userSpecifyArgs "gcc" aesArgs (withPrograms lbi) @@ -40,6 +41,30 @@ , "int real_main() {" , "return 0; }" ]) - ec <- rawSystemExitCode normal cc (aesArgsHC ++ ["-c", tmpDir ++ "/testIntrinsic.c"]) + ec <- myRawSystemExitCode normal cc (aesArgsHC ++ ["-c", tmpDir ++ "/testIntrinsic.c"]) notice normal $ "Result of NI Intrinsics Test: " ++ show (ec == ExitSuccess) return (ec == ExitSuccess) + +myRawSystemExitCode :: Verbosity -> FilePath -> [String] -> IO ExitCode +#if __GLASGOW_HASKELL__ >= 704 +-- We know for sure, that if GHC >= 7.4 implies Cabal >= 1.14 +myRawSystemExitCode = rawSystemExitCode +#else +-- Legacy branch: +-- We implement our own 'rawSystemExitCode', this will even work if +-- the user happens to have Cabal >= 1.14 installed with GHC 7.0 or +-- 7.2 +myRawSystemExitCode verbosity path args = do + printRawCommandAndArgs verbosity path args + hFlush stdout + exitcode <- rawSystem path args + unless (exitcode == ExitSuccess) $ do + debug verbosity $ path ++ " returned " ++ show exitcode + return exitcode + where + printRawCommandAndArgs :: Verbosity -> FilePath -> [String] -> IO () + printRawCommandAndArgs verbosity path args + | verbosity >= deafening = print (path, args) + | verbosity >= verbose = putStrLn $ unwords (path : args) + | otherwise = return () +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cipher-aes128-0.7.0.1/cipher-aes128.cabal new/cipher-aes128-0.7.0.3/cipher-aes128.cabal --- old/cipher-aes128-0.7.0.1/cipher-aes128.cabal 2015-04-26 18:33:37.000000000 +0200 +++ new/cipher-aes128-0.7.0.3/cipher-aes128.cabal 2016-08-31 07:58:48.000000000 +0200 @@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: cipher-aes128 -version: 0.7.0.1 +version: 0.7.0.3 synopsis: AES and common modes using AES-NI when available. description: Cipher-aes128 is an implementation of AES and common modes of operation. It borrows Hanquez's C AES code (see 'cipher-aes') but is unique due to including compile-time detection of @@ -20,7 +20,8 @@ build-type: Custom -- build-type: Simple -- ^^^ For HaLVM -cabal-version: >=1.12 +cabal-version: >=1.10 +tested-with: GHC==7.10.3 extra-source-files: ./cbits/*.h, ./cbits/*.c , AUTHORS @@ -63,9 +64,10 @@ type: exitcode-stdio-1.0 hs-source-dirs: . Benchmark main-is: bench.hs - build-depends: base < 5, criterion, crypto-api, entropy, bytestring, tagged, cereal, cipher-aes + build-depends: base < 5, criterion, crypto-api, entropy, bytestring, tagged, cereal ghc-options: -O2 include-dirs: cbits + default-language: Haskell2010 c-sources: ./cbits/aes.c , ./cbits/aes_generic.c , ./cbits/aes_x86ni.c
