aura 3.1.0 → 3.1.1
raw patch · 11 files changed
+39/−15 lines, 11 filesdep −microlensdep ~rioPVP ok
version bump matches the API change (PVP)
Dependencies removed: microlens
Dependency ranges changed: rio
API changes (from Hackage documentation)
+ Aura.Utils: type Traversal' s a = forall f. Applicative f => (a -> f a) -> s -> f s
Files
- CHANGELOG.md +14/−0
- aura.cabal +2/−3
- exec/Aura/Flags.hs +1/−1
- exec/Aura/Settings/Runtime.hs +4/−4
- lib/Aura/Dependencies.hs +1/−1
- lib/Aura/MakePkg.hs +4/−2
- lib/Aura/Packages/AUR.hs +1/−1
- lib/Aura/Pacman.hs +1/−1
- lib/Aura/Pkgbuild/Security.hs +1/−1
- lib/Aura/Types.hs +0/−1
- lib/Aura/Utils.hs +10/−0
CHANGELOG.md view
@@ -1,5 +1,19 @@ # Aura Changelog +## 3.1.1 (2020-06-02)++#### Changed++- Running Aura with `sudo -E aura ...` will ensure that the transfer of the true+ user's environment will persist all the way to the internal `makepkg` calls.+ This should help people who have set custom paths for GPG, `npm`, etc., via+ environment variables. See [#606](https://github.com/fosskers/aura/issues/606).+ Users with standard setups don't need to worry about `-E`.++#### Removed++- Explicit dependency on `microlens`. Everything Aura uses now comes through `rio`.+ ## 3.1.0 (2020-05-27) #### Added
aura.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: aura-version: 3.1.0+version: 3.1.1 synopsis: A secure package manager for Arch Linux and the AUR. description: Aura is a package manager for Arch Linux. It connects to both the@@ -44,8 +44,7 @@ , bytestring ^>=0.10 , containers ^>=0.6 , megaparsec >=7 && <9- , microlens ^>=0.4- , rio ^>=0.1.13+ , rio ^>=0.1.16 , text ^>=1.2 , versions ^>=3.5.4
exec/Aura/Flags.hs view
@@ -9,7 +9,7 @@ import Aura.Pacman (defaultLogFile, pacmanConfFile) import Aura.Settings import Aura.Types-import Lens.Micro (Traversal')+import Aura.Utils (Traversal') import Options.Applicative import RIO hiding (exp, log) import RIO.FilePath
exec/Aura/Settings/Runtime.hs view
@@ -35,10 +35,10 @@ import Aura.Types import Aura.Utils import Data.Bifunctor (Bifunctor(..))-import Lens.Micro (folded, (%~), (.~), (<>~), (^..), _Left, _Right) import Network.HTTP.Client (newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import RIO hiding (first)+import RIO.Lens (each, _Left, _Right) import qualified RIO.Map as M import qualified RIO.Set as S import qualified RIO.Text as T@@ -53,8 +53,8 @@ -- Throws in `IO` if there were any errors. withEnv :: Program -> (Env -> IO a) -> IO a withEnv (Program op co bc lng ll) f = do- let ign = S.fromList $ op ^.. _Right . _AurSync . folded . _AurIgnore . folded- igg = S.fromList $ op ^.. _Right . _AurSync . folded . _AurIgnoreGroup . folded+ let ign = S.fromList $ op ^.. _Right . _AurSync . to toList . each . _AurIgnore . to toList . each+ igg = S.fromList $ op ^.. _Right . _AurSync . to toList . each . _AurIgnoreGroup . to toList . each confFile <- getPacmanConf (either id id $ configPathOf co) >>= either throwM pure auraConf <- auraConfig <$> getAuraConf defaultAuraConf when (ll == LevelDebug) . printf "%s\n" $ show auraConf@@ -84,7 +84,7 @@ & buildPathOfL %~ (<|> acBuildPath auraConf) & allsourcePathOfL %~ (<|> acASPath auraConf) & vcsPathOfL %~ (<|> acVCSPath auraConf)- & buildSwitchesOfL <>~ maybe S.empty S.singleton (acAnalyse auraConf)+ & buildSwitchesOfL %~ (<> maybe S.empty S.singleton (acAnalyse auraConf)) , logLevelOf = ll , logFuncOf = logFunc } f (Env repos ss)
lib/Aura/Dependencies.hs view
@@ -23,8 +23,8 @@ import Aura.Types import Aura.Utils import Data.Versions hiding (Lens')-import Lens.Micro import RIO+import RIO.Lens (each) import qualified RIO.Map as M import qualified RIO.NonEmpty as NEL import qualified RIO.Set as S
lib/Aura/MakePkg.hs view
@@ -18,11 +18,11 @@ import Aura.Settings import Aura.Types import Aura.Utils (note)-import Lens.Micro (_2) import RIO import qualified RIO.ByteString.Lazy as BL import RIO.Directory import RIO.FilePath+import RIO.Lens (_2) import qualified RIO.NonEmpty as NEL import qualified RIO.Text as T import System.Process.Typed@@ -66,7 +66,9 @@ -> ProcessConfig stdin stdout stderr -> m (ExitCode, BL.ByteString, [FilePath]) make ss (User usr) pc = do+ -- Perform the actual building. (ec, se) <- runIt ss pc+ -- Fetch the filenames of the built tarballs. res <- readProcess $ proc "sudo" ["-u", T.unpack usr, makepkgCmd, "--packagelist"] let fs = map T.unpack . T.lines . decodeUtf8Lenient . BL.toStrict $ res ^. _2 pure (ec, se, fs)@@ -88,4 +90,4 @@ -- | As of makepkg v4.2, building with `--asroot` is no longer allowed. runStyle :: User -> [String] -> (FilePath, [String])-runStyle (User usr) opts = ("sudo", ["-u", T.unpack usr, makepkgCmd] <> opts)+runStyle (User usr) opts = ("sudo", ["-E", "-u", T.unpack usr, makepkgCmd] <> opts)
lib/Aura/Packages/AUR.hs view
@@ -31,12 +31,12 @@ import Control.Monad.Trans.Maybe import Control.Scheduler (Comp(..), traverseConcurrently) import Data.Versions (versioning)-import Lens.Micro (each, non, (^..)) import Linux.Arch.Aur import Network.HTTP.Client (Manager) import RIO import RIO.Directory import RIO.FilePath+import RIO.Lens (each, non) import qualified RIO.List as L import qualified RIO.Map as M import qualified RIO.NonEmpty as NEL
lib/Aura/Pacman.hs view
@@ -32,11 +32,11 @@ import Aura.Settings.External import Aura.Types import Data.Bifunctor (first)-import Lens.Micro (_2) import RIO hiding (first, some, try) import qualified RIO.ByteString as BS import qualified RIO.ByteString.Lazy as BL import RIO.FilePath+import RIO.Lens (_2) import RIO.List.Partial ((!!)) import qualified RIO.Map as M import qualified RIO.Set as S
lib/Aura/Pkgbuild/Security.hs view
@@ -23,8 +23,8 @@ import Language.Bash.Parse (parse) import Language.Bash.Syntax import Language.Bash.Word-import Lens.Micro (each, (.~), (^..), _Just) import RIO hiding (Word)+import RIO.Lens (each, _Just) import qualified RIO.Map as M import qualified RIO.Text as T
lib/Aura/Types.hs view
@@ -46,7 +46,6 @@ import Data.Text.Prettyprint.Doc hiding (list, space) import Data.Text.Prettyprint.Doc.Render.Terminal import Data.Versions hiding (Traversal')-import Lens.Micro import RIO hiding (try) import RIO.FilePath import qualified RIO.Text as T
lib/Aura/Utils.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE RankNTypes #-}+ -- | -- Module : Aura.Utils -- Copyright : (c) Colin Woodbury, 2012 - 2020@@ -26,6 +28,8 @@ , these -- * Directory , edit+ -- * Lens+ , Traversal' -- * Misc. , maybe' , groupsOf@@ -127,6 +131,12 @@ -- | Partition a `NonEmpty` based on some function. partNonEmpty :: (a -> These b c) -> NonEmpty a -> These (NonEmpty b) (NonEmpty c) partNonEmpty f = foldMap1 (bimap pure pure . f)++--------------------------------------------------------------------------------+-- Lens++-- | Simple Traversals compatible with both lens and microlens.+type Traversal' s a = forall f. Applicative f => (a -> f a) -> s -> f s -------------------------------------------------------------------------------- -- These