aura 2.1.0 → 2.2.0
raw patch · 33 files changed
+244/−202 lines, 33 filesdep +servant-client-coredep +witherable-classdep ~language-bashPVP ok
version bump matches the API change (PVP)
Dependencies added: servant-client-core, witherable-class
Dependency ranges changed: language-bash
API changes (from Hackage documentation)
- Aura.Utils: traverseMaybe :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]
+ Aura.Core: instance GHC.Generics.Generic Aura.Core.Env
+ Aura.Core: instance RIO.Prelude.Logger.HasLogFunc Aura.Core.Env
+ Aura.Settings: [logFuncOf] :: Settings -> !LogFunc
+ Aura.Settings: instance GHC.Generics.Generic Aura.Settings.Settings
+ Aura.Utils: groupsOf :: Int -> [a] -> [[a]]
- Aura.Settings: Settings :: !Manager -> !Environment -> !Language -> !FilePath -> !Bool -> !Set PkgName -> !CommonConfig -> !BuildConfig -> Settings
+ Aura.Settings: Settings :: !Manager -> !Environment -> !Language -> !FilePath -> !Bool -> !Set PkgName -> !CommonConfig -> !BuildConfig -> !LogFunc -> Settings
Files
- CHANGELOG.md +10/−0
- aura.cabal +16/−9
- doc/aura.8 +2/−0
- exec/Flags.hs +23/−8
- exec/Settings.hs +39/−23
- exec/aura.hs +15/−18
- lib/Aura/Build.hs +4/−6
- lib/Aura/Cache.hs +0/−3
- lib/Aura/Commands/A.hs +8/−6
- lib/Aura/Commands/B.hs +2/−5
- lib/Aura/Commands/C.hs +3/−7
- lib/Aura/Commands/L.hs +0/−3
- lib/Aura/Commands/O.hs +1/−5
- lib/Aura/Core.hs +9/−8
- lib/Aura/Dependencies.hs +0/−7
- lib/Aura/Install.hs +5/−8
- lib/Aura/Languages.hs +68/−27
- lib/Aura/Languages/Fields.hs +0/−3
- lib/Aura/Logo.hs +0/−2
- lib/Aura/MakePkg.hs +0/−3
- lib/Aura/Packages/AUR.hs +16/−8
- lib/Aura/Packages/Repository.hs +0/−3
- lib/Aura/Pacman.hs +1/−5
- lib/Aura/Pkgbuild/Base.hs +0/−2
- lib/Aura/Pkgbuild/Editing.hs +1/−3
- lib/Aura/Pkgbuild/Fetch.hs +0/−2
- lib/Aura/Pkgbuild/Records.hs +1/−2
- lib/Aura/Pkgbuild/Security.hs +0/−3
- lib/Aura/Settings.hs +5/−3
- lib/Aura/State.hs +1/−5
- lib/Aura/Types.hs +0/−3
- lib/Aura/Utils.hs +14/−10
- test/Test.hs +0/−2
CHANGELOG.md view
@@ -1,5 +1,15 @@ # Aura Changelog +## 2.2.0 (2020-02-25)++- **New Feature:**: `--log-level` flag. Setting this to `debug` will give you+ some verbose logging output. This is different from the usual `-x` behaviour.+- **Bug Fix:** Users with many AUR packages installed will no longer see+ mysterious AUR connection failures.+ ([#528](https://github.com/fosskers/aura/issues/528))+- Updated Italian translations. Grazie, Cristian Tentella!+- Support for GHC 8.8.2.+ ## 2.1.0 (2020-02-17) - Reinstated `-Aw`, which downloads a snapshot tarball of an AUR package.
aura.cabal view
@@ -1,13 +1,11 @@ cabal-version: 2.2 name: aura-version: 2.1.0-synopsis:- A secure package manager for Arch Linux and the AUR, written in Haskell.-+version: 2.2.0+synopsis: A secure package manager for Arch Linux and the AUR. description:- Aura is a package manager for Arch Linux written in Haskell. It connects to- both the official Arch repostitories and to the AUR, allowing easy control of- all packages on an Arch system. It allows /all/ pacman operations and provides+ Aura is a package manager for Arch Linux. It connects to both the+ official Arch repostitories and to the AUR, allowing easy control of all+ packages on an Arch system. It allows /all/ pacman operations and provides /new/ custom ones for dealing with AUR packages. This differs from some other AUR package managers. @@ -27,7 +25,14 @@ common commons default-language: Haskell2010- default-extensions: NoImplicitPrelude+ default-extensions:+ NoImplicitPrelude+ BangPatterns+ LambdaCase+ OverloadedStrings+ TupleSections+ TypeApplications+ ghc-options: -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -Widentities -Wpartial-fields -Wcompat@@ -94,17 +99,19 @@ , filepath ^>=1.4 , generic-lens >=1.1 && <1.3 , http-types >=0.9 && <0.13- , language-bash ^>=0.8+ , language-bash >=0.8 && <0.10 , megaparsec >=7 && <9 , microlens-ghc ^>=0.4 , mwc-random ^>=0.14 , network-uri ^>=2.6 , scheduler >=1.1 && <1.5 , semigroupoids >=5.2 && <5.4+ , servant-client-core >= 0.16 && < 0.18 , stm ^>=2.5 , these ^>=1.0 , time >=1.8 && <1.10 , unliftio ^>=0.2+ , witherable-class ^>=0 executable aura import: commons, libexec
doc/aura.8 view
@@ -410,6 +410,8 @@ .P ( Italian ) Bob Valantin .P+( Italian ) Cristian Tentella+.P ( Serbian ) Filip Brcic .P ( Norwegian ) "chinatsun"
exec/Flags.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- module Flags ( Program(..), opts , PacmanOp( Sync ), SyncOp( SyncUpgrade ), MiscOp@@ -26,14 +24,17 @@ -- | A description of a run of Aura to attempt. data Program = Program {- -- ^ Whether Aura handles everything, or the ops and input are just passed down to Pacman. _operation :: Either (PacmanOp, Set MiscOp) AuraOp- -- ^ Settings common to both Aura and Pacman.+ -- ^ Whether Aura handles everything, or the ops and input are just passed down to Pacman. , _commons :: CommonConfig- -- ^ Settings specific to building packages.+ -- ^ Settings common to both Aura and Pacman. , _buildConf :: BuildConfig+ -- ^ Settings specific to building packages.+ , _language :: Maybe Language -- ^ The human language of text output.- , _language :: Maybe Language } deriving (Show)+ , _logLevel :: LogLevel+ -- ^ The default RIO logging level.+ } deriving (Show) -- | Inherited operations that are fed down to Pacman. data PacmanOp = Database (Either DatabaseOp (NESet PkgName))@@ -259,8 +260,10 @@ <*> commonConfig <*> buildConfig <*> optional language- where aurOps = aursync <|> backups <|> cache <|> log <|> orphans <|> version' <|> languages <|> viewconf- pacOps = database <|> files <|> queries <|> remove <|> sync <|> testdeps <|> upgrades+ <*> logLevel+ where+ aurOps = aursync <|> backups <|> cache <|> log <|> orphans <|> version' <|> languages <|> viewconf+ pacOps = database <|> files <|> queries <|> remove <|> sync <|> testdeps <|> upgrades aursync :: Parser AuraOp aursync = bigA *>@@ -518,3 +521,15 @@ , ( "indonesian", Indonesia ) , ( "chinese", Chinese ), ( "中文", Chinese ) , ( "esperanto", Esperanto ) ]++logLevel :: Parser LogLevel+logLevel = option (eitherReader l)+ (long "log-level" <> metavar "debug|info|warn|error" <> value LevelInfo+ <> help "The minimum level of log messages to display (default: info)")+ where+ l :: String -> Either String LogLevel+ l "debug" = Right LevelDebug+ l "info" = Right LevelInfo+ l "warn" = Right LevelWarn+ l "error" = Right LevelError+ l _ = Left "Must be one of debug|info|warn|error"
exec/Settings.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE BangPatterns #-}+ {- Copyright 2012 - 2020 Colin Woodbury <colin@fosskers.ca>@@ -19,15 +21,16 @@ -} -module Settings ( getSettings ) where+module Settings ( withEnv ) where +import Aura.Core (Env(..)) import Aura.Languages+import Aura.Packages.AUR (aurRepo)+import Aura.Packages.Repository (pacmanRepo) import Aura.Pacman import Aura.Settings import Aura.Types import Aura.Utils-import Control.Error.Util (failWith)-import Control.Monad.Trans.Except import Data.Bifunctor (Bifunctor(..)) import qualified Data.Set.NonEmpty as NES import Flags@@ -42,29 +45,42 @@ --- -getSettings :: Program -> IO (Either Failure Settings)-getSettings (Program op co bc lng) = runExceptT $ do+-- | Bracket around the `Env` type to properly initialize the `Manager` and+-- `RIO` logger function (among other things).+--+-- 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- confFile <- ExceptT (getPacmanConf . either id id $ configPathOf co)- environment <- lift (M.fromList . map (bimap T.pack T.pack) <$> getEnvironment)- manager <- lift $ newManager tlsManagerSettings- isTerm <- lift $ hIsTerminalDevice stdout- fromGroups <- lift . maybe (pure S.empty) groupPackages . NES.nonEmptySet $ getIgnoredGroups confFile <> igg+ confFile <- getPacmanConf (either id id $ configPathOf co) >>= either throwM pure+ environment <- M.fromList . map (bimap T.pack T.pack) <$> getEnvironment+ manager <- newManager tlsManagerSettings+ isTerm <- hIsTerminalDevice stdout+ fromGroups <- maybe (pure S.empty) groupPackages . NES.nonEmptySet+ $ getIgnoredGroups confFile <> igg let language = checkLang lng environment- bu <- failWith (Failure whoIsBuildUser_1) $ buildUserOf bc <|> getTrueUser environment- pure Settings { managerOf = manager- , envOf = environment- , langOf = language- , editorOf = getEditor environment- , isTerminal = isTerm- , ignoresOf = getIgnoredPkgs confFile <> fromGroups <> ign- , commonConfigOf =- -- | These maintain the precedence order: flags, config file entry, default- co { cachePathOf = first (\x -> fromMaybe x $ getCachePath confFile) $ cachePathOf co- , logPathOf = first (\x -> fromMaybe x $ getLogFilePath confFile) $ logPathOf co }- , buildConfigOf = bc { buildUserOf = Just bu}- }+ bu <- maybe (throwM $ Failure whoIsBuildUser_1) pure+ $ buildUserOf bc <|> getTrueUser environment+ repos <- (<>) <$> pacmanRepo <*> aurRepo+ lopts <- setLogMinLevel ll . setLogUseLoc True <$> logOptionsHandle stderr True+ withLogFunc lopts $ \logFunc -> do+ let !ss = Settings+ { managerOf = manager+ , envOf = environment+ , langOf = language+ , editorOf = getEditor environment+ , isTerminal = isTerm+ , ignoresOf = getIgnoredPkgs confFile <> fromGroups <> ign+ , commonConfigOf =+ -- | These maintain the precedence order: flags, config file entry, default+ co { cachePathOf =+ first (\x -> fromMaybe x $ getCachePath confFile) $ cachePathOf co+ , logPathOf =+ first (\x -> fromMaybe x $ getLogFilePath confFile) $ logPathOf co }+ , buildConfigOf = bc { buildUserOf = Just bu}+ , logFuncOf = logFunc }+ f (Env repos ss) checkLang :: Maybe Language -> Environment -> Language checkLang Nothing env = langFromLocale $ getLocale env
exec/aura.hs view
@@ -1,9 +1,6 @@-{-# LANGUAGE CPP #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-} {- @@ -47,8 +44,6 @@ import Aura.Core import Aura.Languages import Aura.Logo-import Aura.Packages.AUR (aurRepo)-import Aura.Packages.Repository (pacmanRepo) import Aura.Pacman import Aura.Settings import Aura.Types@@ -76,17 +71,18 @@ main :: IO () main = do- options <- execParser opts- esettings <- getSettings options- repos <- (<>) <$> pacmanRepo <*> aurRepo- case esettings of- Left err -> putTextLn . dtot . ($ English) $ failure err- Right ss -> execute ss repos options >>= exit ss+ options <- execParser opts+ res <- try $ withEnv options $ \env ->+ execute env options >>= exit (settings env)+ case res of+ Left err -> putTextLn (dtot . ($ English) $ failure err) *> exitFailure+ Right r -> pure r -execute :: Settings -> Repository -> Program -> IO (Either (Doc AnsiStyle) ())-execute ss r p = first f <$> try (runRIO (Env r ss) . execOpts $ _operation p)+-- | Won't throw due to the `try`.+execute :: Env -> Program -> IO (Either (Doc AnsiStyle) ())+execute env p = first f <$> try (runRIO env . execOpts $ _operation p) where- f (Failure fl) = fl $ langOf ss+ f (Failure fl) = fl $ langOf (settings env) exit :: Settings -> Either (Doc AnsiStyle) () -> IO a exit ss (Left e) = scold ss e *> exitFailure@@ -94,6 +90,7 @@ execOpts :: Either (PacmanOp, Set MiscOp) AuraOp -> RIO Env () execOpts ops = do+ logDebug "Interpreting CLI options." ss <- asks settings when (shared ss Debug) $ do liftIO . pPrintNoColor $ ops@@ -107,7 +104,7 @@ case ops of Left o@(Sync (Left sops) _, _) | any isUpgrade sops -> sudo (liftIO $ B.saveState ss) *> p o- Left o -> p o+ Left o -> logDebug "Performing a pacman operation." >> p o Right (AurSync o _) -> case o of Right ps -> bool (trueRoot . sudo) id (switch ss DryRun) $ A.install ps
lib/Aura/Build.hs view
@@ -1,8 +1,5 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Aura.Build@@ -30,6 +27,7 @@ import Data.Semigroup.Foldable (fold1) import Data.Set.NonEmpty (NESet) import qualified Data.Set.NonEmpty as NES+import Data.Witherable.Class (wither) import RIO import RIO.Directory (setCurrentDirectory) import qualified RIO.NonEmpty as NEL@@ -57,7 +55,7 @@ buildPackages :: NESet Buildable -> RIO Env (NESet PackagePath) buildPackages bs = do g <- liftIO createSystemRandom- traverseMaybe (build g) (toList bs) >>= maybe bad (pure . fold1) . NEL.nonEmpty+ wither (build g) (toList bs) >>= maybe bad (pure . fold1) . NEL.nonEmpty where bad = throwM $ Failure buildFail_10 -- | Handles the building of Packages. Fails nicely.
lib/Aura/Cache.hs view
@@ -1,7 +1,4 @@ {-# LANGUAGE DataKinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE TypeApplications #-} -- | -- Module : Aura.Cache
lib/Aura/Commands/A.hs view
@@ -1,11 +1,6 @@-{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-} {-# LANGUAGE ViewPatterns #-} -- |@@ -67,7 +62,8 @@ upgradeAURPkgs pkgs = do ss <- asks settings liftIO . notify ss . upgradeAURPkgs_1 $ langOf ss- liftIO (foreigns ss) >>= traverse_ (upgrade pkgs) . NES.nonEmptySet+ fs <- liftIO (foreigns ss)+ traverse_ (upgrade pkgs) $ NES.nonEmptySet fs -- | Foreign packages to consider for upgrading, after "ignored packages" have -- been taken into consideration.@@ -77,10 +73,15 @@ upgrade :: Set PkgName -> NESet SimplePkg -> RIO Env () upgrade pkgs fs = do+ logDebug $ "Considering " <> display (NES.size fs) <> " 'foreign' packages for upgrade."+ unless (null pkgs)+ $ logDebug $ "Also installing " <> display (S.size pkgs) <> " other packages." ss <- asks settings toUpgrade <- possibleUpdates fs+ logDebug $ "Potential upgrades: " <> display (length toUpgrade) let !names = map (PkgName . aurNameOf . fst) toUpgrade auraFirst <- auraCheck names+ logDebug $ "Upgrade Aura first? ... " <> maybe "No." (const "Yes!") auraFirst case auraFirst of Just a -> auraUpgrade a Nothing -> do@@ -97,6 +98,7 @@ aurInfos <- aurInfo $ fmap (^. field @"name") pkgs let !names = map aurNameOf aurInfos aurPkgs = NEL.filter (\(SimplePkg (PkgName n) _) -> n `elem` names) pkgs+ logDebug "Package lookup successful." pure . filter isntMostRecent . zip aurInfos $ aurPkgs ^.. each . field @"version" -- | Is there an update for Aura that we could apply first?
lib/Aura/Commands/B.hs view
@@ -1,8 +1,5 @@-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Aura.Commands.B
lib/Aura/Commands/C.hs view
@@ -1,10 +1,6 @@-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE MultiWayIf #-} -- | -- Module : Aura.Commands.C
lib/Aura/Commands/L.hs view
@@ -1,9 +1,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-} -- | -- Module : Aura.Commands.L
lib/Aura/Commands/O.hs view
@@ -1,8 +1,4 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-} -- | -- Module : Aura.Commands.O
lib/Aura/Core.hs view
@@ -1,10 +1,7 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE MultiWayIf #-} -- | -- Module : Aura.Core@@ -41,7 +38,7 @@ import Aura.Utils import Control.Monad.Trans.Maybe import Data.Bifunctor (bimap)-import Data.Generics.Product (field)+import Data.Generics.Product (field, typed) import Data.Set.NonEmpty (NESet) import qualified Data.Set.NonEmpty as NES import Data.Text.Prettyprint.Doc@@ -65,6 +62,10 @@ -- instantiated in `IO`, while `Settings` is mostly static and derived from -- command-line arguments. data Env = Env { repository :: !Repository, settings :: !Settings }+ deriving stock (Generic)++instance HasLogFunc Env where+ logFuncL = typed @Settings . typed @LogFunc -- | A `Repository` is a place where packages may be fetched from. Multiple -- repositories can be combined with the `Semigroup` instance. Checks packages
lib/Aura/Dependencies.hs view
@@ -1,14 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-}-{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE TypeApplications #-} -- | -- Module : Aura.Dependencies
lib/Aura/Install.hs view
@@ -1,11 +1,8 @@-{-# LANGUAGE BangPatterns #-}-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}-{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE MonoLocalBinds #-}+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Aura.Install
lib/Aura/Languages.hs view
@@ -1,13 +1,11 @@ {-# LANGUAGE DataKinds #-}-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-} {-# LANGUAGE ViewPatterns #-}+ {-# OPTIONS_HADDOCK prune #-} {-# OPTIONS_GHC -fno-warn-missing-export-lists #-} -- |--- Module : Aura.Languages.Fields+-- Module : Aura.Languages -- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca>@@ -24,7 +22,7 @@ Henry Kupty / Thiago Perrotta / Wagner Amaral | Portuguese Ma Jiehong / Fabien Dubosson | French Kyrylo Silin | Russian-Bob Valantin | Italian+Bob Valantin / Cristian Tentella | Italian Filip Brcic | Serbian "chinatsun" | Norwegian "pak tua Greg" | Indonesia@@ -60,7 +58,7 @@ , (Portuguese, "Henry Kupty / Thiago Perrotta / Wagner Amaral") , (French, "Ma Jiehong / Fabien Dubosson") , (Russian, "Kyrylo Silin / Alexey Kotlyarov")- , (Italian, "Bob Valantin")+ , (Italian, "Bob Valantin / Cristian Tentella") , (Serbian, "Filip Brcic") , (Norwegian, "\"chinatsun\"") , (Indonesia, "\"pak tua Greg\"")@@ -81,7 +79,7 @@ Portuguese -> [ "Japonês", "Polonês", "Croata", "Sueco", "Alemão", "Espanhol", "Português", "Francês", "Russo", "Italiano", "Sérvio", "Norueguês", "Indonésio", "Chinês", "Esperanto" ] French -> [ "Japanese", "Polonais", "Croate", "Suédois", "Allemand", "Espagnol", "Portugais", "Français", "Russe", "Italien", "Serbe", "Norvégien", "Indonesian", "Chinese", "Esperanto" ] Russian -> [ "Японский", "Польский", "Хорватский", "Шведский", "Немецкий", "Испанский", "Португальский", "Французский", "Русский", "Итальянский", "Сербский", "Норвежский", "Индонезийский", "Китайский", "Эсперанто" ]- Italian -> [ "Giapponese", "Polacco", "Croato", "Svedese", "Tedesco", "Spagnolo", "Portoghese", "Francese", "Russo", "Italiano", "", "", "Indonesian", "Chinese", "Esperanto" ]+ Italian -> [ "Giapponese", "Polacco", "Croato", "Svedese", "Tedesco", "Spagnolo", "Portoghese", "Francese", "Russo", "Italiano", "", "", "Indonesiano", "Cinese", "Esperanto" ] Serbian -> [ "Japanese", "Пољски", "Хрватски", "Шведски", "Немачки", "Шпански", "Португалски", "Француски", "Руски", "Италијански", "Српски", "", "Indonesian", "Chinese", "Esperanto" ] Norwegian -> [ "Japanese", "Polsk", "Kroatisk", "Svensk", "Tysk", "Spansk", "Portugisisk", "Fransk", "Russisk", "Italiensk", "Serbisk", "Norsk", "Indonesian", "Chinese", "Esperanto" ] Indonesia -> [ "Japanese", "Polandia", "Kroasia", "Swedia", "Jerman", "Spanyol", "Portugis", "Prancis", "Rusia", "Italia", "Serbia", "Norwegia", "Indonesian", "Chinese", "Esperanto" ]@@ -159,6 +157,7 @@ French -> "La base de données des paquets est bloquée. Appuyez sur enter pour continuer." Portuguese -> "Banco de dados de pacote travado. Aperte 'enter' quando estiver destravado para poder continuar." Russian -> "База данных пакетов заблокирована. Нажмите \"Ввод\", когда она разблокируется, чтобы продолжить."+ Italian -> "Il database dei pacchetti è bloccato. Premi invio quando sarà sbloccato per continuare." Chinese -> "包数据库已锁定。请在解锁后按下回车以继续。" Swedish -> "Paketdatabasen är låst. Klicka på enter när den är upplåst." Esperanto -> "La datumbazo de pakaĵoj estas ŝlosita. Premu enen-klavo kiam la datumbazo estas malŝlosita por daŭrigi"@@ -171,6 +170,7 @@ Spanish -> "Desde makepkg v4.2 no es posible compilar paquetes como root." Portuguese -> "A partir da versão v4.2 de makepkg, não é mais possível compilar como root." Russian -> "С версии makepkg v4.2 сборка от имени root более невозможна."+ Italian -> "A partire da makepkg v4.2 non è più possibile compilare come utente root." Chinese -> "自从 makepkg v4.2 以后,就不能以根用户身份构建软件了。" Swedish -> "I makepkg v4.2 och uppåt är det inte tillåtet att bygga som root." Esperanto -> "Depost makepkg v4.2, konstruanto ĉefuzante ne eblas."@@ -265,6 +265,7 @@ Portuguese -> "Falha ao obter scripts de compilação para " <> p <> "." Indonesia -> "Gagal mendapatkan skrip untuk " <> p <> "." Russian -> "Не удалось получить сценарии сборки для " <> p <> "."+ Italian -> "Non è stato possibile ottenere gli script di compilazione per " <> p <> "." Chinese -> "无法获得 " <> p <> " 的构建脚本。" Swedish -> "Kunde inte hämta byggskript för " <> p <> "." Esperanto -> "Paneis akiri muntaj skriptoj de " <> p <> "."@@ -276,18 +277,21 @@ Spanish -> "Ocurrió un error al ejecutar makepkg" Portuguese -> "Ocorreu um erro ao executar makepkg" Russian -> "Произошла ошибка makepkg."+ Italian -> "C'è stato un errore nell'esecuzione di makepkg." Esperanto -> "Paneo de makepkg okazis." _ -> "There was a makepkg failure." buildFail_9 :: Language -> Doc AnsiStyle buildFail_9 = \case Spanish -> "Error al detectar todos los archivo de paquete (*.pkg.tar.xz)."+ Italian -> "Non è stato possibile trovare nessun pacchetto compilato (*.pkg.tar.xz)." Esperanto -> "Paneis detekti ĉiujn dosierojn de pakaĵoj (*.pkg.tar.xz)." _ -> "Failed to detect any built package files (*.pkg.tar.xz)." buildFail_10 :: Language -> Doc AnsiStyle buildFail_10 = \case Spanish -> "Los paquetes no se pudieron construir."+ Italian -> "Non è stato possibile compilare i pacchetti." Esperanto -> "Ĉiuj pakaĵoj paneis munti." _ -> "Every package failed to build." @@ -295,6 +299,7 @@ buildFail_11 = \case Japanese -> "作成は失敗しました。エラーを見ますか?" Spanish -> "Construcción fallida. ¿Te gustaría ver el error?"+ Italian -> "La compilazione è fallita. Vuoi dare un'occhiata all'errore?" Esperanto -> "Muntado paneis. Ĉu vi volas vidi la eraron?" _ -> "Building failed. Would you like to see the error?" @@ -350,23 +355,27 @@ Spanish -> "La dependencia " <> bt s <> " no pudo ser encontrada." Portuguese -> "A dependência " <> bt s <> " não foi encontrada." Russian -> "Зависимость " <> bt s <> " не найдена."+ Italian -> "La dipendenza " <> bt s <> "non è stata trovata." Esperanto -> "La dependeco " <> bt s <> " ne povis troviĝi." _ -> "The dependency " <> bt s <> " couldn't be found." depError l (BrokenProvides (PkgName pkg) (Provides (PkgName pro)) (PkgName n)) = case l of Spanish -> "El paquete " <> bt pkg <> " necesita " <> bt n <> " que proporciona " <> bt pro <> "." Russian -> "Пакету " <> bt pkg <> " требуется " <> bt n <> ", предоставляющий " <> bt pro <> "." Esperanto -> "La pakaĵo, " <> bt pkg <> " bezonas " <> bt n <> ", kiu donas " <> bt pro <> "."+ Italian -> "Il pacchetto " <> bt pkg <> " ha bisogno di " <> bt n <> ", che rende disponibile " <> bt pro <> "." _ -> "The package " <> bt pkg <> " needs " <> bt n <> ", which provides " <> bt pro <> "." missingPkg_3 :: Language -> Doc AnsiStyle missingPkg_3 = \case Spanish -> "Se produjo un error al reorganizar el gráfico de dependencia. Si ves esto, algo está muy mal." Esperanto -> "Eraro okazis kiam reorganizi la grafeo de dependeco. Io estas erarega."+ Italian -> "C'è stato un errore nella riorganizzazione dell'albero del grafico delle dipendenze. Se vedi questo messaggio, qualcosa è andato davvero storto." _ -> "There was an error reorganizing the dependency graph. If you see this, something is very wrong." missingPkg_4 :: [NonEmpty PkgName] -> Language -> Doc AnsiStyle missingPkg_4 pns = \case Spanish -> vsep $ "Se detectaron los siguientes ciclos de dependencia:" : pns'+ Italian -> vsep $ "Sono stati individuati i seguenti cicli di dipendenza:" : pns' _ -> vsep $ "The following dependency cycles were detected:" : pns' where pns' = map (hsep . map pretty . L.intersperse "=>" . map (view (field @"name")) . toList) pns @@ -411,6 +420,7 @@ Portuguese -> "Uma atualização para Aura está disponível. Deseja atualizar antes?" French -> "Une mise à jour d'Aura est disponible. Voulez-vous la mettre à jour en premier ?" Russian -> "Доступно обновление Aura. Обновить сперва её?"+ Italian -> "Un aggiornamento per Aur è disponibile. Eseguirlo subito?" Indonesia -> "Pemutakhiran aura tersedia. Mutakhirkan aura dulu?" Chinese -> "Aura 可以升级。先升级 aura?" Swedish -> "Det finns en uppdatering tillgänglig till Aura. Vill du uppdatera Aura först?"@@ -501,6 +511,7 @@ Spanish -> p <> " está marcado como ignorado. ¿Deseas instalarlo de todas formas?" Portuguese -> p <> " está marcado como Ignorado. Deseja instalar mesmo assim?" Russian -> p <> " отмечен как игнорируемый. Всё равно установить?"+ Italian -> p <> " è un pacchetto Ignorato. Installare comunque?" Chinese -> p <> " 已被标记为忽略。仍然安装?" Swedish -> p <> " är markerad som ignorerad. Vill du installera ändå?" Esperanto -> p <> " estas markita kiel malatenta. Ĉu instali?"@@ -518,7 +529,7 @@ Portuguese -> "Os seguintes não são pacotes AUR:" French -> "Les éléments suivants ne sont pas des paquets AUR :" Russian -> "Ниже указано то, что не является пакетами AUR:"- Italian -> "I seguenti pacchetti non sono presenti in AUR:"+ Italian -> "I seguenti pacchetti non sono presenti nella AUR:" Serbian -> "Ово нису пакети:" Norwegian -> "Det følgende er ikke AUR-pakker:" Indonesia -> "Paket berikut ini bukan merupakan paket AUR:"@@ -533,6 +544,7 @@ Polish -> "Następujące pakiety zostały już zainstalowane:" Portuguese -> "Os seguintes pacotes já estão instalados:" Russian -> "Следующие пакеты уже установлены:"+ Italian -> "I seguenti pacchetti sono già presenti nel sistema." German -> "Die folgenden Pakete sind bereits installiert:" Spanish -> "Los siguientes paquetes ya están instalados:" Chinese -> "以下包已被安装:"@@ -589,7 +601,7 @@ Portuguese -> "Dependências no AUR:" French -> "Dépendances AUR\xa0:" Russian -> "Зависимости из AUR:"- Italian -> "Dipendenze in AUR:"+ Italian -> "Dipendenze nella AUR:" Serbian -> "Зависности из AUR-а:" Norwegian -> "Avhengigheter fra AUR:" Esperanto -> "Dependencoj de AUR:"@@ -687,7 +699,7 @@ Portuguese -> "Os seguintes pacotes não possuem versões no cache, logo não podem retornar a uma versão anterior:" French -> "Aucune version des paquets suivants n'est présente dans le cache ; ils ne peuvent pas être mis à niveau à une version antérieure :" Russian -> "Следующих пакетов нет в кэше. Следовательно, они не могут быть откачены к старой версии:"- Italian -> "I seguenti pacchetti non hanno versioni in cache e non posso essere retrocessi:"+ Italian -> "I seguenti pacchetti non hanno versioni nella cache e non posso essere retrocessi:" Serbian -> "Следећи пакети нису ни инсталирани, те се не могу вратити на старију верзију:" Norwegian -> "Følgende pakker har ingen versjoner i cache, og kan derfor ikke bli nedgradert:" Indonesia -> "Berikut ini tidak mempunyai versi pada cache, sehingga tidak akan diturunkan:"@@ -698,6 +710,7 @@ reportBadDowngradePkgs_2 :: PkgName -> Language -> Doc AnsiStyle reportBadDowngradePkgs_2 (PkgName p) = \case Spanish -> pretty p <+> "no tiene una versión en la caché."+ Italian -> pretty p <+> "non ha alcuna versione nella cache." _ -> pretty p <+> "has no version in the cache." upgradeAURPkgs_1 :: Language -> Doc AnsiStyle@@ -730,7 +743,7 @@ Portuguese -> "Comparando versões dos pacotes..." French -> "Comparaison des versions des paquets en cours…" Russian -> "Сравнение версий пакетов..."- Italian -> "Confronto le ersioni del pacchetto..."+ Italian -> "Confronto le versioni del pacchetto..." Serbian -> "Упоређивање верзија пакета..." Norwegian -> "Sammenligner pakkeversjoner..." Indonesia -> "Membandingkan versi paket..."@@ -749,7 +762,7 @@ Portuguese -> "Nenhum pacote do AUR precisa de atualização." French -> "Aucune mise à jour de paquet AUR n'est nécessaire." Russian -> "Обновление пакетов из AUR не требуется."- Italian -> "Non è necessario aggiornare pacchetti di AUR."+ Italian -> "Nessun pacchetto della AUR necessita di un aggiornamento." Serbian -> "Ажурирање пакета из AUR-а није потребно." Norwegian -> "Ingen pakkeoppgradering fra AUR nødvendig." Indonesia -> "Tidak ada peningkatan AUR yang dibutuhkan."@@ -809,7 +822,7 @@ Spanish -> "No se han eliminado estados de los paquetes." Serbian -> "Ниједно стање пакета није уклоњено." Norwegian -> "Ingen pakketilstander ble fjernet."- Italian -> "Nessuno stato di pacchetto verrà rimosso."+ Italian -> "Nessuno stato di pacchetto è stato rimosso." Portuguese -> "Nenhum estado de pacote será removido." French -> "Aucun état des paquets n'a été supprimé." Russian -> "Состояния пакетов отались нетронутыми."@@ -824,6 +837,7 @@ Japanese -> "現在のパッケージ状態記録:" <> pretty n <> "個。" Spanish -> "Actualmente tiene " <+> pretty n <+> "estados de paquetes guardados." Russian -> "У вас сейчас " <+> pretty n <+> pluralRussian " сохраненное состояние пакета" " сохраненных состояний пакета" " сохраненных состояний пакетов." n+ Italian -> "Al momento ci sono " <+> pretty n <+> " stati di pacchetti salvati." Esperanto -> "Vi havas " <+> pretty n <+> " konservajn statojn de pakaĵoj." _ -> "You currently have" <+> pretty n <+> "saved package states." @@ -832,19 +846,22 @@ Japanese -> "一番最近に保存されたのは:" <> pretty t Spanish -> "Guardado recientemente:" <+> pretty t Russian -> "Последнее сохраненное:" <+> pretty t+ Italian -> "Salvato più recentemente:" <+> pretty t Esperanto -> "Lastaj konservaj:" <+> pretty t _ -> "Most recently saved:" <+> pretty t cleanStates_6 :: Int -> Language -> Doc AnsiStyle cleanStates_6 n = \case Spanish -> pretty n <+> "de estos están anclados y no se eliminarán."- _ -> pretty n <+> "of these are pinned, and won't be removed."+ Italian -> pretty n <+> "di questi sono stati fissati e non saranno rimossi."+ _ -> pretty n <+> "of these are pinned, and won't be removed." readState_1 :: Language -> Doc AnsiStyle readState_1 = \case Spanish -> "Ese archivo de estado no se pudo analizar. ¿Es un archivo JSON válido?" Portuguese -> "O arquivo de estado não pôde ser interpretado. É um arquivo JSON válido?" Russian -> "Это состояние не распознано. Это корректный JSON?"+ Italian -> "Non è stato possibile analizzare il file di stato. E' correttamente formattato in JSON?" Esperanto -> "Tiu statdosiero paneis sintake analizi. Ĉu ĝi estas valida JSON?" _ -> "That state file failed to parse. Is it legal JSON?" @@ -881,7 +898,7 @@ Portuguese -> "Localização do backup não existe." French -> "Le chemin des copies de sauvegarde spécifié n'existe pas." Russian -> "Путь к бэкапу не существует."- Italian -> "L'indirizzo del salvataggio non esiste."+ Italian -> "La locazione di backup non esiste." Serbian -> "Путања ка бекапу не постоји." Norwegian -> "Spesifisert backup-plass finnes ikke." Indonesia -> "Lokasi `backup` tidak ada."@@ -900,7 +917,7 @@ Portuguese -> "Backup do cache sendo feito em " <> dir French -> "Copie de sauvegarde dans " <> dir <> "." Russian -> "Бэкап создается в директории " <> dir- Italian -> "Salvataggio della chace in " <> dir+ Italian -> "Eseguo un backup della cache in " <> dir Serbian -> "Бекапујем кеш у " <> dir Norwegian -> "Tar backup på cache til " <> dir Indonesia -> "Melakukan `backup` pada direktori " <> dir@@ -976,7 +993,7 @@ Portuguese -> "Efetuando backup. Isso pode levar alguns minutos..." French -> "Copie de sauvegarde en cours. Ceci peut prendre quelques minutes…" Russian -> "Создается бэкап. Это может занять пару минут..."- Italian -> "Salvataggio. Questo potrebbe richiedere qualche minuto..."+ Italian -> "Sto eseguendo il backup. Potrebbe volerci qualche minuto..." Serbian -> "Бекапујем. Ово може да потраје пар минута..." Norwegian -> "Tar backup. Dette kan ta en stund..." Indonesia -> "Melakukan `backup`. Proses ini akan berjalan untuk beberapa menit..."@@ -1014,7 +1031,7 @@ Portuguese -> "Isso removerá TODOS OS PACOTES do cache." French -> "Ceci va supprimer la TOTALITÉ du cache des paquets." Russian -> "Это действие ВСЕЦЕЛО уничтожит кэш пакетов."- Italian -> "Questo cancellera l'INTERA cache dei pacchetti."+ Italian -> "Questo cancellerà l'INTERA cache dei pacchetti." Serbian -> "Ово ће избрисати ЦЕО кеш пакета." Norwegian -> "Dette vil slette HELE pakke-cachen." Indonesia -> "Akan menghapus SEMUA `cache` paket"@@ -1052,7 +1069,7 @@ Portuguese -> "O resto será removido. OK?" French -> "Le reste sera supprimé. Êtes-vous d'accord ?" Russian -> "Всё остальное будет удалено. Годится?"- Italian -> "Il resto verrà mantenuto. Continuare?"+ Italian -> "Il resto sarà rimosso. Continuare?" Serbian -> "Остатак ће бити избрисан. Да ли је то у реду?" Norwegian -> "Resten vil bli slettet. Er det OK?" Indonesia -> "Selainnya akan dihapus. Ikhlas kan?"@@ -1071,7 +1088,7 @@ Portuguese -> "Limpeza do cache cancelada manualmente." French -> "Le nettoyage du cache a été arrêté manuellement." Russian -> "Очистка кэша прервана пользователем."- Italian -> "Pulitura manuale della cache interrotta."+ Italian -> "Pulizia manuale della cache interrotta." Serbian -> "Чишћење кеша је ручно прекинуто." Norwegian -> "Cache-rensing ble avbrutt manuelt." Indonesia -> "Pembersihan `cache` dibatalkan secara paksa."@@ -1090,7 +1107,7 @@ Portuguese -> "Limpando cache de pacotes..." French -> "Nettoyage du cache des paquets…" Russian -> "Очистка кэша пакета..."- Italian -> "Ripulisco la cache..."+ Italian -> "Pulisco la cache dei pacchetti..." Serbian -> "Чишћење кеша..." Norwegian -> "Renser pakke-cache..." Indonesia -> "Membersihkan `cache` paket..."@@ -1168,12 +1185,21 @@ -- Aura/AUR functions ------------------------------- --- https://github.com/aurapm/aura/issues/498+-- https://github.com/fosskers/aura/issues/498 connectionFailure_1 :: Language -> Doc AnsiStyle connectionFailure_1 = \case- Spanish -> "No se pudo contactar con el AUR. ¿Tienes conexión a internet?"- _ -> "Failed to contact the AUR. Do you have an internet connection?"+ Spanish -> "No se pudo contactar con el AUR. ¿Tienes conexión a internet?"+ Italian -> "Non è stato possibile contattare la AUR. Il computer è connesso ad internet?"+ _ -> "Failed to contact the AUR. Do you have an internet connection?" +miscAURFailure_1 :: Language -> Doc AnsiStyle+miscAURFailure_1 = \case+ _ -> "Contacting the AUR failed in some unknown way."++miscAURFailure_2 :: Language -> Doc AnsiStyle+miscAURFailure_2 = \case+ _ -> "The AUR server rejected the request."+ infoFields :: Language -> [Text] infoFields = sequence [ Fields.repository , Fields.name@@ -1201,7 +1227,7 @@ Portuguese -> "Desatualizado!" French -> "Périmé !" Russian -> "Устарел!"- Italian -> "Out of Date!"+ Italian -> "Non aggiornato!" Serbian -> "Застарео!" Norwegian -> "Utdatert!" Indonesia -> "Ketinggalan Zaman!"@@ -1239,6 +1265,7 @@ Portuguese -> "Órfão!" French -> "Abandonné !" Russian -> "Осиротевший!"+ Italian -> "Orfano!" Indonesia -> "Tak dipelihara!" Chinese -> "孤包!" Swedish -> "Föräldralös!"@@ -1278,7 +1305,7 @@ Spanish -> "Versiones anteriores no disponibles para:" Serbian -> "Захтеване старе верзије нису доступне за:" Norwegian -> "De spesifiserte nedgraderingsversjonene er ikke tilgjengelig for:"- Italian -> "Richiesta di retrocessione di versione non disponibile per:"+ Italian -> "Le richieste di retrocessione di versione non sono disponibili per:" Portuguese -> "Versões anteriores requisitadas não disponívels para:" French -> "Version antérieure requise non disponible pour :" Russian -> "Запрошенные версии для отката не доступны для:"@@ -1294,6 +1321,7 @@ Spanish -> "No hay estados guardados para ser restaurados. (Utilice -B para guardar el estado actual)" Portuguese -> "Nenhum estado disponível para ser recuperado. (Utilize -B para salvar o estado atual)" Russian -> "Нет сохраненных состояний для восстановления. (Используйте -B для сохранения текущего состояния)"+ Italian -> "Nessuno stato precedente da recuperare. (Usa -B per salvare lo stato attuale)" Chinese -> "没有要恢复的已保存状态。(使用 -B 保存当前状态)" Swedish -> "Inga sparade tillstånd att återhämta. (Använd -B för att spara det nuvarande tillståndet)" Esperanto -> "Ne konservitaj statoj restaŭros. (Uzu -B konservi la aktualan staton)"@@ -1327,6 +1355,7 @@ Spanish -> "No se puede determinar el usuario que ejecutará la compilación." Portuguese -> "Não foi possível determinal o usuário que executará a compilação." Russian -> "Не удается определить, от имени какого пользователя производить сборку."+ Italian -> "Non è stato possibile determinare quale utente utilizzare per la compilazione." Esperanto -> "Ne povas decidi, per kiu konto de uzanto munti." _ -> "Can't determine which user account to build with." @@ -1358,12 +1387,14 @@ Spanish -> "No fue posible analizar su archivo pacman.conf." Portuguese -> "Não foi possível interpretar o arquivo pacman.conf ." Russian -> "Не удается распознать формат вашего файла pacman.conf."+ Italian -> "Non è stato possibile analizzare il tuo pacman.conf." Esperanto -> "Ne kapablas sintaske analizi vian dosieron, pacman.conf." _ -> "Unable to parse your pacman.conf file." provides_1 :: PkgName -> Language -> Doc AnsiStyle provides_1 (bt . view (field @"name") -> pro) = \case Spanish -> pro <+> "se requiere como una dependencia, que es proporcionada por múltiples paquetes. Por favor, seleccione uno:"+ Italian -> pro <+> "è richiesto come dipendenza, che è disponibile in molteplici pacchetti. Per favore, scegline uno:" _ -> pro <+> "is required as a dependency, which is provided by multiple packages. Please select one:" ----------------------------------@@ -1380,7 +1411,7 @@ Portuguese -> "Deseja editar o PKGBUILD de " <> p <> "?" French -> "Voulez-vous éditer le PKGBUILD de " <> p <> " ?" Russian -> "Отредактировать PKGBUILD пакета " <> p <> "?"- Italian -> "Volete modificare il PKGBUILD di " <> p <> "?"+ Italian -> "Vorresti modificare il PKGBUILD di " <> p <> "?" Serbian -> "Желите ли да измените PKGBUILD за " <> p <> "?" Norwegian -> "Vil du endre PKGBUILD for " <> p <> "?" Indonesia -> "Apakah anda ingin menyunting PKGBUILD untuk paket " <> p <> "?"@@ -1412,51 +1443,61 @@ security_1 :: PkgName -> Language -> Doc AnsiStyle security_1 (PkgName p) = \case Spanish -> "El PKGBUILD de" <+> bt p <+> "era demasiado complejo de analizar - puede estar ofuscando código malicioso."+ Italian -> "Il PKGBUILD di" <+> bt p <+> "è troppo complesso per essere analizzato - è possibile che stia offuscando codice malevolo." _ -> "The PKGBUILD of" <+> bt p <+> "was too complex to parse - it may be obfuscating malicious code." security_2 :: Text -> Language -> Doc AnsiStyle security_2 (bt -> t) = \case Spanish -> t <+> "se puede usar para descargar scripts arbitrarios que este PKGBUILD no rastrea."+ Italian -> t <+> "può essere usato per scaricare scripts arbitrari non tracciati da questo PKGBUILD." _ -> t <+> "can be used to download arbitrary scripts that aren't tracked by this PKGBUILD." security_3 :: Text -> Language -> Doc AnsiStyle security_3 (bt -> t) = \case Spanish -> t <+> "se puede usar para ejecutar código arbitrario que este PKGBUILD no rastrea."+ Italian -> t <+> "può essere usato per eseguire codice arbitrario non tracciato da questo PKGBUILD." _ -> t <+> "can be used to execute arbitrary code not tracked by this PKGBUILD." security_4 :: Text -> Language -> Doc AnsiStyle security_4 (bt -> t) = \case Spanish -> t <+> "indica que alguien puede estar intentando obtener acceso de root a su máquina."+ Italian -> t <+> "indica che forse qualcuno sta cercando di ottenere accesso alla tua macchina come utente root." _ -> t <+> "indicates that someone may be trying to gain root access to your machine." security_5 :: PkgName -> Language -> Doc AnsiStyle security_5 (PkgName p) = \case Spanish -> "ADVERTENCIA: El PKGBUILD de" <+> bt p <+> "contiene expresiones bash en la lista negra."+ Italian -> "ATTENZIONE: Il PKGBUILD di" <+> bt p <+> "contiene espressioni in bash che fanno parte della lista nera." _ -> "WARNING: The PKGBUILD of" <+> bt p <+> "contains blacklisted bash expressions." security_6 :: Language -> Doc AnsiStyle security_6 = \case Spanish -> "¿Desea salir del proceso de compilación?"+ Italian -> "Terminare la compilazione" _ -> "Do you wish to quit the build process?" security_7 :: Language -> Doc AnsiStyle security_7 = \case Spanish -> "Se canceló el procesamiento posterior para evitar el código bash potencialmente malicioso."+ Italian -> "Non saranno eseguite altre operazioni al fine di evitare codice bash malevolo." _ -> "Cancelled further processing to avoid potentially malicious bash code." security_8 :: Text -> Language -> Doc AnsiStyle security_8 (bt -> t) = \case Spanish -> t <+> "es un comando bash integrado en los campos de la matriz del PKGBUILD."+ Italian -> t <+> "è un comando bash integrato nei campi array del tuo PKGBUILD." _ -> t <+> "is a bash command inlined in your PKGBUILD array fields." security_9 :: Text -> Language -> Doc AnsiStyle security_9 (bt -> t) = \case Spanish -> t <+> "es algo extraño para tener en sus campos de matriz. ¿Es seguro?"+ Italian -> t <+> "è una cosa strana da trovare nei tuoi campi array. E' sicura?" _ -> t <+> "is a strange thing to have in your array fields. Is it safe?" security_10 :: Text -> Language -> Doc AnsiStyle security_10 (bt -> t) = \case Spanish -> t <+> "implica que alguien estaba tratando de ser astuto con las variables para ocultar comandos maliciosos."+ Italian -> t <+> "implica che qualcuno stava provando a fare il sapientone con le variabili al fine di nascondere comandi malevoli." _ -> t <+> "implies that someone was trying to be clever with variables to hide malicious commands." -----------------------
lib/Aura/Languages/Fields.hs view
@@ -1,7 +1,4 @@-{-# LANGUAGE LambdaCase #-}-{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK prune #-}-{-# OPTIONS_GHC -fno-warn-missing-export-lists #-} -- | -- Module : Aura.Languages.Fields
lib/Aura/Logo.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- -- | -- Module : Aura.Logo -- Copyright : (c) Colin Woodbury, 2012 - 2020
lib/Aura/MakePkg.hs view
@@ -1,6 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TupleSections #-}- -- | -- Module : Aura.State -- Copyright : (c) Colin Woodbury, 2012 - 2020
lib/Aura/Packages/AUR.hs view
@@ -2,10 +2,6 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}- -- | -- Module : Aura.Packages.AUR -- Copyright : (c) Colin Woodbury, 2012 - 2020@@ -32,7 +28,7 @@ import Aura.Pkgbuild.Fetch import Aura.Settings import Aura.Types-import Aura.Utils (fmapEither)+import Aura.Utils (fmapEither, groupsOf) import Control.Error.Util (hush, note) import Control.Monad.Trans.Maybe import Control.Scheduler (Comp(..), traverseConcurrently)@@ -49,6 +45,7 @@ import qualified RIO.NonEmpty as NEL import qualified RIO.Set as S import qualified RIO.Text as T+import Servant.Client.Core (responseBody) import System.Path import System.Path.IO (getCurrentDirectory) import System.Process.Typed@@ -152,6 +149,17 @@ -- | Frontend to the `aur` library. For @-Ai@. aurInfo :: NonEmpty PkgName -> RIO Env [AurInfo] aurInfo pkgs = do- m <- asks (managerOf . settings)- res <- liftMaybeM (Failure connectionFailure_1) . fmap hush . liftIO . info m . map (^. field @"name") $ toList pkgs- pure $ sortAurInfo (Just SortAlphabetically) res+ logDebug $ "AUR: Looking up " <> display (length pkgs) <> " packages..."+ m <- asks (managerOf . settings)+ sortAurInfo (Just SortAlphabetically) . fold+ <$> traverseConcurrently Par' (work m) (groupsOf 50 $ NEL.toList pkgs)+ where+ work :: Manager -> [PkgName] -> RIO Env [AurInfo]+ work m ps = liftIO (info m $ map (^. field @"name") ps) >>= \case+ Left (ConnectionError _) -> throwM (Failure connectionFailure_1)+ Left (FailureResponse _ r) -> do+ let !resp = display . decodeUtf8Lenient . toStrictBytes $ responseBody r+ logDebug $ "Failed! Server said: " <> resp+ throwM (Failure miscAURFailure_2)+ Left _ -> throwM (Failure miscAURFailure_1)+ Right res -> pure res
lib/Aura/Packages/Repository.hs view
@@ -1,8 +1,5 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DuplicateRecordFields #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE TypeApplications #-} -- | -- Module : Aura.Packages.Repository
lib/Aura/Pacman.hs view
@@ -1,8 +1,4 @@-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Aura.Pacman
lib/Aura/Pkgbuild/Base.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- -- | -- Module : Aura.Pkgbuild.Base -- Copyright : (c) Colin Woodbury, 2012 - 2020
lib/Aura/Pkgbuild/Editing.hs view
@@ -1,6 +1,4 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-} -- | -- Module : Aura.Pkgbuild.Base
lib/Aura/Pkgbuild/Fetch.hs view
@@ -1,7 +1,5 @@ {-# LANGUAGE DataKinds #-}-{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# LANGUAGE TypeApplications #-} -- | -- Module : Aura.State
lib/Aura/Pkgbuild/Records.hs view
@@ -1,5 +1,4 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-} -- | -- Module : Aura.Pkgbuild.Records
lib/Aura/Pkgbuild/Security.hs view
@@ -1,7 +1,4 @@ {-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TupleSections #-}-{-# LANGUAGE TypeApplications #-} -- | -- Module : Aura.Pkgbuild.Security
lib/Aura/Settings.hs view
@@ -1,5 +1,5 @@-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE DerivingStrategies #-} -- | -- Module : Aura.Settings@@ -118,7 +118,9 @@ , isTerminal :: !Bool , ignoresOf :: !(Set PkgName) , commonConfigOf :: !CommonConfig- , buildConfigOf :: !BuildConfig }+ , buildConfigOf :: !BuildConfig+ , logFuncOf :: !LogFunc }+ deriving stock (Generic) -- | Unless otherwise specified, packages will be built within @/tmp@. defaultBuildDir :: Path Absolute
lib/Aura/State.hs view
@@ -1,8 +1,4 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE MonoLocalBinds #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE DataKinds #-} -- | -- Module : Aura.State
lib/Aura/Types.hs view
@@ -4,10 +4,7 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}-{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE MultiWayIf #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE TypeApplications #-} {-# OPTIONS_GHC -fno-warn-orphans #-}
lib/Aura/Utils.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- -- | -- Module : Aura.Utils -- Copyright : (c) Colin Woodbury, 2012 - 2020@@ -33,8 +31,8 @@ -- * Misc. , maybe' , fmapEither- , traverseMaybe , traverseEither+ , groupsOf ) where import Aura.Colour@@ -48,6 +46,7 @@ import RIO import qualified RIO.ByteString as B import qualified RIO.ByteString.Lazy as BL+import qualified RIO.List as L import RIO.List.Partial (maximum) import qualified RIO.Map as M import qualified RIO.Text as T@@ -242,12 +241,17 @@ Right c -> (bs, c:cs) -- | Borrowed from Compactable.-traverseMaybe :: Applicative f => (a -> f (Maybe b)) -> [a] -> f [b]-traverseMaybe f = go- where- go (x:xs) = maybe id (:) <$> f x <*> go xs- go [] = pure []---- | Borrowed from Compactable. traverseEither :: Applicative f => (a -> f (Either b c)) -> [a] -> f ([b], [c]) traverseEither f = fmap partitionEithers . traverse f++-- | Break a list into groups of @n@ elements. The last item in the result is+-- not guaranteed to have the same length as the others.+groupsOf :: Int -> [a] -> [[a]]+groupsOf n as+ | n <= 0 = []+ | otherwise = go as+ where+ go [] = []+ go bs = xs : go rest+ where+ (xs, rest) = L.splitAt n bs
test/Test.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE OverloadedStrings #-}- module Main ( main ) where import Aura.Languages