Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-shelly for openSUSE:Factory 
checked in at 2023-01-28 18:44:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-shelly (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-shelly.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-shelly"

Sat Jan 28 18:44:35 2023 rev:12 rq:1061636 version:1.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-shelly/ghc-shelly.changes    2022-08-01 
21:30:52.441738242 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-shelly.new.32243/ghc-shelly.changes 
2023-01-28 18:52:13.708970654 +0100
@@ -1,0 +2,19 @@
+Wed Jan 25 08:58:27 UTC 2023 - Peter Simons <[email protected]>
+
+- Update shelly to version 1.11.0.
+  # 1.11.0
+
+  Andreas Abel, 2023-01-24
+  * Restore running of local scripts, e.g. `cmd "./foo.sh"`:
+    Issue [#107](https://github.com/gregwebs/Shelly.hs/issues/107)
+    fixed by Alfredo di Napoli in PR
+    [#216](https://github.com/gregwebs/Shelly.hs/pull/216).
+  * Builds with GHC 8.0 - 9.4.
+
+  # 1.10.0.1
+
+  Andreas Abel, 2023-01-24
+  * Allow `unix-compat-0.6`.
+  * Builds `-Wall` warning-free with GHC 8.0 - 9.4.
+
+-------------------------------------------------------------------

Old:
----
  shelly-1.10.0.tar.gz
  shelly.cabal

New:
----
  shelly-1.11.0.tar.gz

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

Other differences:
------------------
++++++ ghc-shelly.spec ++++++
--- /var/tmp/diff_new_pack.Y41Uim/_old  2023-01-28 18:52:14.108972919 +0100
+++ /var/tmp/diff_new_pack.Y41Uim/_new  2023-01-28 18:52:14.112972943 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-shelly
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,12 @@
 %global pkg_name shelly
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.10.0
+Version:        1.11.0
 Release:        0
 Summary:        Shell-like (systems) programming in Haskell
 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:  ghc-Cabal-devel
 BuildRequires:  ghc-async-devel
 BuildRequires:  ghc-bytestring-devel
@@ -68,7 +67,7 @@
 See the shelly-extra package for additional functionality.
 
 An overview is available in the README:
-<https://github.com/yesodweb/Shelly.hs/blob/master/README.md>.
+<https://github.com/gregwebs/Shelly.hs/blob/master/README.md>.
 
 %package devel
 Summary:        Haskell %{pkg_name} library development files
@@ -82,7 +81,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ shelly-1.10.0.tar.gz -> shelly-1.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.10.0/ChangeLog.md 
new/shelly-1.11.0/ChangeLog.md
--- old/shelly-1.10.0/ChangeLog.md      2001-09-09 03:46:40.000000000 +0200
+++ new/shelly-1.11.0/ChangeLog.md      2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,18 @@
+# 1.11.0
+
+Andreas Abel, 2023-01-24
+* Restore running of local scripts, e.g. `cmd "./foo.sh"`:
+  Issue [#107](https://github.com/gregwebs/Shelly.hs/issues/107)
+  fixed by Alfredo di Napoli in PR
+  [#216](https://github.com/gregwebs/Shelly.hs/pull/216).
+* Builds with GHC 8.0 - 9.4.
+
+# 1.10.0.1
+
+Andreas Abel, 2023-01-24
+* Allow `unix-compat-0.6`.
+* Builds `-Wall` warning-free with GHC 8.0 - 9.4.
+
 # 1.10.0
 
 Andreas Abel, 2022-01-30
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.10.0/shelly.cabal 
new/shelly-1.11.0/shelly.cabal
--- old/shelly-1.10.0/shelly.cabal      2001-09-09 03:46:40.000000000 +0200
+++ new/shelly-1.11.0/shelly.cabal      2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     1.10.0
+Version:     1.11.0
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides convenient systems programming in Haskell,
@@ -17,27 +17,28 @@
              .
              See the shelly-extra package for additional functionality.
              .
-             An overview is available in the README: 
<https://github.com/yesodweb/Shelly.hs/blob/master/README.md>
+             An overview is available in the README: 
<https://github.com/gregwebs/Shelly.hs/blob/master/README.md>
 
 
-Homepage:            https://github.com/yesodweb/Shelly.hs
+Homepage:            https://github.com/gregwebs/Shelly.hs
 License:             BSD3
 License-file:        LICENSE
 Author:              Greg Weber, Petr Rockai
-Maintainer:          Greg Weber <[email protected]>, Andreas Abel
+Maintainer:          Andreas Abel
 Category:            Development
 Build-type:          Simple
 Cabal-version:       >=1.10
 
 tested-with:
-  GHC == 8.0.2
-  GHC == 8.2.2
-  GHC == 8.4.4
-  GHC == 8.6.5
-  GHC == 8.8.4
-  GHC == 8.10.7
+  GHC == 9.4.4
+  GHC == 9.2.5
   GHC == 9.0.2
-  GHC == 9.2.1
+  GHC == 8.10.7
+  GHC == 8.8.4
+  GHC == 8.6.5
+  GHC == 8.4.4
+  GHC == 8.2.2
+  GHC == 8.0.2
 
 -- for the sdist of the test suite
 extra-source-files:
@@ -47,6 +48,7 @@
   test/data/zshrc
   test/data/nonascii.txt
   test/data/symlinked_dir/hoge_file
+  test/data/hello.sh
   test/testall
   README.md
   ChangeLog.md
@@ -75,7 +77,7 @@
     , async
     , bytestring                >= 0.10.6.0
     , containers                >= 0.5.7.0
-    , directory                 >= 1.3.0.0   && < 1.4.0.0
+    , directory                 >= 1.3.0.0   && < 1.4
     , enclosed-exceptions
     , exceptions                >= 0.8.2.1
     , filepath
@@ -88,7 +90,7 @@
     , time                      >= 1.3       && < 1.13
     , transformers              >= 0.5.0.0
     , transformers-base
-    , unix-compat               >= 0.4.1.1   && < 0.6
+    , unix-compat               >= 0.4.1.1   && < 0.7
 
   ghc-options:
     -Wall
@@ -100,10 +102,11 @@
   default-language: Haskell2010
   default-extensions:
     CPP
+    TypeOperators
 
 source-repository head
   type:     git
-  location: https://github.com/yesodweb/Shelly.hs
+  location: https://github.com/gregwebs/Shelly.hs
 
 Flag lifted
    Description: run the tests against Shelly.Lifted
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.10.0/src/Shelly.hs 
new/shelly-1.11.0/src/Shelly.hs
--- old/shelly-1.10.0/src/Shelly.hs     2001-09-09 03:46:40.000000000 +0200
+++ new/shelly-1.11.0/src/Shelly.hs     2001-09-09 03:46:40.000000000 +0200
@@ -106,7 +106,7 @@
 import Control.Concurrent
 import Control.Concurrent.Async (async, wait, Async)
 import Control.Exception
-import Control.Monad ( when, unless, void, forM, filterM, liftM2 )
+import Control.Monad ( when, unless, void, liftM2 )
 import Control.Monad.Trans ( MonadIO )
 import Control.Monad.Reader (ask)
 
@@ -122,14 +122,11 @@
 import Data.Semigroup  ( (<>) )
 #endif
 import Data.Sequence   ( Seq, (|>) )
-import Data.Set        ( Set )
 import Data.Time.Clock ( getCurrentTime, diffUTCTime  )
 import Data.Tree       ( Tree(..) )
 import Data.Typeable
 
 import qualified Data.ByteString as BS
-import qualified Data.List as List
-import qualified Data.Set as Set
 import qualified Data.Text as T
 import qualified Data.Text.IO as TIO
 import qualified Data.Text.Encoding as TE
@@ -137,7 +134,7 @@
 
 import System.Directory
   ( setPermissions, getPermissions, Permissions(..), getTemporaryDirectory, 
pathIsSymbolicLink
-  , copyFile, removeFile, doesFileExist, doesDirectoryExist, listDirectory
+  , copyFile, removeFile, doesFileExist, doesDirectoryExist
   , renameFile, renameDirectory, removeDirectoryRecursive, 
createDirectoryIfMissing
   , getCurrentDirectory
   )
@@ -605,14 +602,32 @@
     whichFull fp = do
       (trace . mappend "which " . toTextIgnore) fp >> whichUntraced
       where
-        whichUntraced | isAbsolute fp          = checkFile
-                      | dotSlash splitOnDirs   = checkFile
-                      | length splitOnDirs > 0 = lookupPath  >>= leftPathError
-                      | otherwise              = lookupCache >>= leftPathError
+        whichUntraced | isAbsolute fp             = checkFile
+                      | startsWithDot splitOnDirs = checkFile
+                      | otherwise                 = lookupPath  >>= 
leftPathError
 
         splitOnDirs = splitDirectories fp
-        dotSlash ("./":_) = True
-        dotSlash _ = False
+
+        -- 'startsWithDot' receives as input the result of 'splitDirectories',
+        -- which will include the dot (\".\") as its first element only if this
+        -- is a path of the form \"./foo/bar/baz.sh\". Check for example:
+        --
+        -- > import System.FilePath as FP
+        -- > FP.splitDirectories "./test/data/hello.sh"
+        -- [".","test","data","hello.sh"]
+        -- > FP.splitDirectories ".hello.sh"
+        -- [".hello.sh"]
+        -- > FP.splitDirectories ".test/hello.sh"
+        -- [".test","hello.sh"]
+        -- > FP.splitDirectories ".foo"
+        -- [".foo"]
+        --
+        -- Note that earlier versions of Shelly used
+        -- \"system-filepath\" which also has a 'splitDirectories'
+        -- function, but it returns \"./\" as its first argument,
+        -- so we pattern match on both for backward-compatibility.
+        startsWithDot (".":_)  = True
+        startsWithDot _ = False
 
         checkFile :: Sh (Either String FilePath)
         checkFile = do
@@ -637,33 +652,8 @@
             res <- liftIO $ isExecutable fullFp
             return $ if res then Just fullFp else Nothing
 
-        lookupCache :: Sh (Maybe FilePath)
-        lookupCache = do
-            pathExecutables <- cachedPathExecutables
-            return $ fmap (flip (</>) fp . fst) $
-                List.find (Set.member fp . snd) pathExecutables
-
-
         pathDirs = mapM absPath =<< ((map T.unpack . filter (not . T.null) . 
T.split (== searchPathSeparator)) `fmap` get_env_text "PATH")
 
-        cachedPathExecutables :: Sh [(FilePath, Set FilePath)]
-        cachedPathExecutables = do
-          mPathExecutables <- gets sPathExecutables
-          case mPathExecutables of
-              Just pExecutables -> return pExecutables
-              Nothing -> do
-                dirs <- pathDirs
-                executables <- forM dirs (\dir -> do
-                    files <- (liftIO . listDirectory) dir `catch_sh` (\(_ :: 
IOError) -> return [])
-                    exes <- fmap (map snd) $ liftIO $ filterM (isExecutable . 
fst) $
-                      map (\f -> (f, takeFileName f)) files
-                    return $ Set.fromList exes
-                  )
-                let cachedExecutables = zip dirs executables
-                modify $ \x -> x { sPathExecutables = Just cachedExecutables }
-                return $ cachedExecutables
-
-
 -- | A monadic findMap, taken from MissingM package
 findMapM :: Monad m => (a -> m (Maybe b)) -> [a] -> m (Maybe b)
 findMapM _ [] = return Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.10.0/test/data/hello.sh 
new/shelly-1.11.0/test/data/hello.sh
--- old/shelly-1.10.0/test/data/hello.sh        1970-01-01 01:00:00.000000000 
+0100
+++ new/shelly-1.11.0/test/data/hello.sh        2001-09-09 03:46:40.000000000 
+0200
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+echo -n "Hello!"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.10.0/test/src/FindSpec.hs 
new/shelly-1.11.0/test/src/FindSpec.hs
--- old/shelly-1.10.0/test/src/FindSpec.hs      2001-09-09 03:46:40.000000000 
+0200
+++ new/shelly-1.11.0/test/src/FindSpec.hs      2001-09-09 03:46:40.000000000 
+0200
@@ -115,6 +115,7 @@
               [ "dir"
               , "dir/symlinked_dir"
               , "dir/symlinked_dir/hoge_file"
+              , "hello.sh"
               , "nonascii.txt"
               , "symlinked_dir"
               , "symlinked_dir/hoge_file"
@@ -128,6 +129,7 @@
             sort res @?=
               [ "dir"
               , "dir/symlinked_dir"
+              , "hello.sh"
               , "nonascii.txt"
               , "symlinked_dir"
               , "symlinked_dir/hoge_file"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.10.0/test/src/RunSpec.hs 
new/shelly-1.11.0/test/src/RunSpec.hs
--- old/shelly-1.10.0/test/src/RunSpec.hs       2001-09-09 03:46:40.000000000 
+0200
+++ new/shelly-1.11.0/test/src/RunSpec.hs       2001-09-09 03:46:40.000000000 
+0200
@@ -28,6 +28,12 @@
       if isWindows
         then res @?= "Selbstverst\228ndlich \252berraschend\r\n"
         else res @?= "Selbstverst\228ndlich \252berraschend\n"
+    unless isWindows $ do
+      it "script at $PWD" $ do
+        res <- shelly $ do
+          run_ "chmod" ["+x", "test/data/hello.sh"]
+          run "./test/data/hello.sh" []
+        res @?= "Hello!\n"
 
   -- Bash-related commands
   describe "bash" $ do

Reply via email to