Merge branch 'later'

This commit is contained in:
Joey Hess 2018-06-25 21:59:20 -04:00
commit dc6cb6aa5f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
7 changed files with 93 additions and 21 deletions

View file

@ -126,7 +126,7 @@ makeinfos updated version = do
, distributionKey = k , distributionKey = k
, distributionVersion = bv , distributionVersion = bv
, distributionReleasedate = now , distributionReleasedate = now
, distributionUrgentUpgrade = Nothing , distributionUrgentUpgrade = Just "6.20180626"
} }
liftIO $ writeFile infofile $ formatInfoFile d liftIO $ writeFile infofile $ formatInfoFile d
void $ inRepo $ runBool [Param "add", File infofile] void $ inRepo $ runBool [Param "add", File infofile]

View file

@ -1,4 +1,11 @@
git-annex (6.20180627) UNRELEASED; urgency=medium
* Include uname in standalone builds. * Include uname in standalone builds.
* Support configuring remote.web.annex-cost and remote.bittorrent.annex-cost
* info: Display uuid and description when a repository is identified by
uuid, and for "here".
-- Joey Hess <id@joeyh.name> Fri, 22 Jun 2018 10:36:22 -0400
git-annex (6.20180626) upstream; urgency=high git-annex (6.20180626) upstream; urgency=high

View file

@ -209,13 +209,16 @@ fileInfo o file k = showCustom (unwords ["info", file]) $ do
remoteInfo :: InfoOptions -> Remote -> Annex () remoteInfo :: InfoOptions -> Remote -> Annex ()
remoteInfo o r = showCustom (unwords ["info", Remote.name r]) $ do remoteInfo o r = showCustom (unwords ["info", Remote.name r]) $ do
i <- map (\(k, v) -> simpleStat k (pure v)) <$> Remote.getInfo r i <- map (\(k, v) -> simpleStat k (pure v)) <$> Remote.getInfo r
l <- selStats (remote_fast_stats r ++ i) (uuid_slow_stats (Remote.uuid r)) let u = Remote.uuid r
l <- selStats
(uuid_fast_stats u ++ remote_fast_stats r ++ i)
(uuid_slow_stats u)
evalStateT (mapM_ showStat l) (emptyStatInfo o) evalStateT (mapM_ showStat l) (emptyStatInfo o)
return True return True
uuidInfo :: InfoOptions -> UUID -> Annex () uuidInfo :: InfoOptions -> UUID -> Annex ()
uuidInfo o u = showCustom (unwords ["info", fromUUID u]) $ do uuidInfo o u = showCustom (unwords ["info", fromUUID u]) $ do
l <- selStats [] ((uuid_slow_stats u)) l <- selStats (uuid_fast_stats u) (uuid_slow_stats u)
evalStateT (mapM_ showStat l) (emptyStatInfo o) evalStateT (mapM_ showStat l) (emptyStatInfo o)
return True return True
@ -277,17 +280,21 @@ file_stats f k =
remote_fast_stats :: Remote -> [Stat] remote_fast_stats :: Remote -> [Stat]
remote_fast_stats r = map (\s -> s r) remote_fast_stats r = map (\s -> s r)
[ remote_name [ remote_name
, remote_description
, remote_uuid
, remote_trust , remote_trust
, remote_cost , remote_cost
, remote_type , remote_type
] ]
uuid_fast_stats :: UUID -> [Stat]
uuid_fast_stats u = map (\s -> s u)
[ repo_uuid
, repo_description
]
uuid_slow_stats :: UUID -> [Stat] uuid_slow_stats :: UUID -> [Stat]
uuid_slow_stats u = map (\s -> s u) uuid_slow_stats u = map (\s -> s u)
[ remote_annex_keys [ repo_annex_keys
, remote_annex_size , repo_annex_size
] ]
stat :: String -> (String -> StatState String) -> Stat stat :: String -> (String -> StatState String) -> Stat
@ -353,13 +360,11 @@ file_name file = simpleStat "file" $ pure file
remote_name :: Remote -> Stat remote_name :: Remote -> Stat
remote_name r = simpleStat "remote" $ pure (Remote.name r) remote_name r = simpleStat "remote" $ pure (Remote.name r)
remote_description :: Remote -> Stat repo_description :: UUID -> Stat
remote_description r = simpleStat "description" $ lift $ repo_description = simpleStat "description" . lift . Remote.prettyUUID
Remote.prettyUUID (Remote.uuid r)
remote_uuid :: Remote -> Stat repo_uuid :: UUID -> Stat
remote_uuid r = simpleStat "uuid" $ pure $ repo_uuid = simpleStat "uuid" . pure . fromUUID
fromUUID $ Remote.uuid r
remote_trust :: Remote -> Stat remote_trust :: Remote -> Stat
remote_trust r = simpleStat "trust" $ lift $ remote_trust r = simpleStat "trust" $ lift $
@ -381,12 +386,14 @@ local_annex_size :: Stat
local_annex_size = simpleStat "local annex size" $ local_annex_size = simpleStat "local annex size" $
showSizeKeys =<< cachedPresentData showSizeKeys =<< cachedPresentData
remote_annex_keys :: UUID -> Stat -- "remote" is in the name for JSON backwards-compatibility
remote_annex_keys u = stat "remote annex keys" $ json show $ repo_annex_keys :: UUID -> Stat
repo_annex_keys u = stat "remote annex keys" $ json show $
countKeys <$> cachedRemoteData u countKeys <$> cachedRemoteData u
remote_annex_size :: UUID -> Stat -- "remote" is in the name for JSON backwards-compatibility
remote_annex_size u = simpleStat "remote annex size" $ repo_annex_size :: UUID -> Stat
repo_annex_size u = simpleStat "remote annex size" $
showSizeKeys =<< cachedRemoteData u showSizeKeys =<< cachedRemoteData u
known_annex_files :: Bool -> Stat known_annex_files :: Bool -> Stat

View file

@ -14,6 +14,7 @@ import Types.Remote
import qualified Annex import qualified Annex
import qualified Git import qualified Git
import qualified Git.Construct import qualified Git.Construct
import Config
import Config.Cost import Config.Cost
import Logs.Web import Logs.Web
import Types.UrlContents import Types.UrlContents
@ -51,10 +52,11 @@ list _autoinit = do
return [r] return [r]
gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remote) gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remote)
gen r _ c gc = gen r _ c gc = do
cst <- remoteCost gc expensiveRemoteCost
return $ Just Remote return $ Just Remote
{ uuid = bitTorrentUUID { uuid = bitTorrentUUID
, cost = expensiveRemoteCost , cost = cst
, name = Git.repoDescribe r , name = Git.repoDescribe r
, storeKey = uploadKey , storeKey = uploadKey
, retrieveKeyFile = downloadKey , retrieveKeyFile = downloadKey

View file

@ -15,6 +15,7 @@ import qualified Git
import qualified Git.Construct import qualified Git.Construct
import Annex.Content import Annex.Content
import Config.Cost import Config.Cost
import Config
import Logs.Web import Logs.Web
import Annex.UUID import Annex.UUID
import Messages.Progress import Messages.Progress
@ -40,10 +41,11 @@ list _autoinit = do
return [r] return [r]
gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remote) gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remote)
gen r _ c gc = gen r _ c gc = do
cst <- remoteCost gc expensiveRemoteCost
return $ Just Remote return $ Just Remote
{ uuid = webUUID { uuid = webUUID
, cost = expensiveRemoteCost , cost = cst
, name = Git.repoDescribe r , name = Git.repoDescribe r
, storeKey = uploadKey , storeKey = uploadKey
, retrieveKeyFile = downloadKey , retrieveKeyFile = downloadKey

View file

@ -1 +1,2 @@
standalone-build standalone-build
standalone-no-LOCPATH

53
debian/patches/standalone-no-LOCPATH vendored Normal file
View file

@ -0,0 +1,53 @@
From 71cbc1012941495ec20a7cb11dad3da638aae2cf Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Tue, 22 May 2018 22:57:26 -0400
Subject: BF: do not bother changing/setting LOCPATH
Some of the initial reasoning and discussion is at
https://github.com/datalad/datalad/pull/1921
but overall summary is that a typical standalone build relies on
user having RW permissions into its installation so locales are
generated upon initial use. For NeuroDebian standalone:
- built/installed by root
- locales are likely to be installed and be compatible
thus patching of LOCPATH seems to resolve some issues, primarily
with custom remotes which are ran by annex, thus provided with
LOCPATH
---
standalone/linux/skel/runshell | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/standalone/linux/skel/runshell
+++ b/standalone/linux/skel/runshell
@@ -118,12 +118,6 @@ export ORIG_MANPATH
MANPATH="$base/usr/share/man:$MANPATH"
export MANPATH
-# Avoid using system locales, which may interact badly with bundled libc.
-ORIG_LOCPATH="$LOCPATH"
-export ORIG_LOCPATH
-LOCPATH="$base/locales"
-export LOCPATH
-
# LD_PRELOAD may interact badly with the bundled libc and other libraries,
# which may have a different subarchitecture than the preloaded library.
unset LD_PRELOAD
@@ -180,13 +174,13 @@ case "$os" in
GIT_ANNEX_TMP_DIR="$TMPDIR"
export GIT_ANNEX_TMP_DIR
- GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH MANPATH LOCPATH"
+ GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH MANPATH"
export GIT_ANNEX_STANDLONE_ENV
;;
*)
# Indicate which variables were exported above and should be cleaned
# when running non-bundled programs.
- GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR MANPATH LOCPATH"
+ GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR MANPATH"
export GIT_ANNEX_STANDLONE_ENV
;;
esac