backport v2-sdist fix for file permissions
https://github.com/haskell/cabal/issues/5813
This commit is contained in:
parent
9dea7bddd3
commit
308e2aa058
|
@ -0,0 +1,26 @@
|
|||
--- cabal-install-2.4.1.0/Distribution/Client/CmdSdist.hs.orig 1970-01-01 07:30:00.000000000 +0730
|
||||
+++ cabal-install-2.4.1.0/Distribution/Client/CmdSdist.hs 2020-04-14 13:08:58.730089942 +0800
|
||||
@@ -84,7 +84,8 @@
|
||||
import qualified Data.Set as Set
|
||||
import System.Directory
|
||||
( getCurrentDirectory, setCurrentDirectory
|
||||
- , createDirectoryIfMissing, makeAbsolute )
|
||||
+ , createDirectoryIfMissing, makeAbsolute
|
||||
+ , getPermissions, executable )
|
||||
import System.FilePath
|
||||
( (</>), (<.>), makeRelative, normalise, takeDirectory )
|
||||
|
||||
@@ -269,10 +270,11 @@
|
||||
Right path -> tell [Tar.directoryEntry path]
|
||||
|
||||
forM_ files $ \(perm, file) -> do
|
||||
+ realPerm <- liftIO $ getPermissions file
|
||||
let fileDir = takeDirectory (prefix </> file)
|
||||
perm' = case perm of
|
||||
- Exec -> Tar.executableFilePermissions
|
||||
- NoExec -> Tar.ordinaryFilePermissions
|
||||
+ Exec | executable realPerm -> Tar.executableFilePermissions
|
||||
+ _ -> Tar.ordinaryFilePermissions
|
||||
needsEntry <- gets (Set.notMember fileDir)
|
||||
|
||||
when needsEntry $ do
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Name: cabal-install
|
||||
Version: 2.4.1.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: The command-line interface for Cabal and Hackage
|
||||
|
||||
License: BSD
|
||||
|
@ -12,8 +12,9 @@ Url: https://hackage.haskell.org/package/%{name}
|
|||
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: https://hackage.haskell.org/package/%{name}-%{version}/%{name}.cabal#/%{name}-%{version}.cabal
|
||||
# End cabal-rpm sources
|
||||
|
||||
Source10: cabal-install.sh
|
||||
# backport fix from https://github.com/haskell/cabal/issues/5813
|
||||
Patch0: cabal-install-sdist-file-permissions.patch
|
||||
|
||||
# Begin cabal-rpm deps:
|
||||
BuildRequires: ghc-rpm-macros
|
||||
|
@ -76,6 +77,7 @@ installation of Haskell libraries and programs.
|
|||
cp -bp %{SOURCE1} %{name}.cabal
|
||||
# End cabal-rpm setup
|
||||
cabal-tweak-dep-ver Cabal '>= 2.4.1.0' '>= 2.4.0.0'
|
||||
%patch0 -p1 -b .orig
|
||||
|
||||
|
||||
%build
|
||||
|
@ -106,6 +108,10 @@ install -pm 644 -D -t %{buildroot}%{_sysconfdir}/profile.d/ %{SOURCE10}
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Apr 14 2020 Jens Petersen <petersen@redhat.com> - 2.4.1.0-2
|
||||
- backport new-sdist upstream fix for doc file permissions
|
||||
(https://github.com/haskell/cabal/issues/5813)
|
||||
|
||||
* Sun Feb 09 2020 Jens Petersen <petersen@redhat.com> - 2.4.1.0-1
|
||||
- update to 2.4.1.0
|
||||
|
||||
|
|
Loading…
Reference in New Issue