summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CmdLine.hs2
-rw-r--r--Utility/SafeCommand.hs10
-rw-r--r--debian/changelog5
-rw-r--r--debian/control1
-rwxr-xr-xdebian/rules3
-rw-r--r--doc/bugs/Detection_assumes_that_shell_is_bash.mdwn4
-rw-r--r--doc/bugs/host_with_rysnc_installed__44___not_recognized.mdwn4
7 files changed, 26 insertions, 3 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index db46cba82..63d36c74c 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -40,7 +40,7 @@ dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do
state <- Annex.new g
(actions, state') <- Annex.run state $ do
checkfuzzy
- forM_ fields $ \(f, v) -> Annex.setField f v
+ forM_ fields $ uncurry Annex.setField
sequence_ flags
prepCommand cmd params
tryRun state' cmd $ [startup] ++ actions ++ [shutdown $ cmdnocommit cmd]
diff --git a/Utility/SafeCommand.hs b/Utility/SafeCommand.hs
index e6075e888..785aec578 100644
--- a/Utility/SafeCommand.hs
+++ b/Utility/SafeCommand.hs
@@ -55,8 +55,16 @@ safeSystemEnv command params environ = do
{ env = environ }
waitForProcess pid
+{- Wraps a shell command line inside sh -c, allowing it to be run in a
+ - login shell that may not support POSIX shell, eg csh. -}
+shellWrap :: String -> String
+shellWrap cmdline = "sh -c " ++ shellEscape cmdline
+
{- Escapes a filename or other parameter to be safely able to be exposed to
- - the shell. -}
+ - the shell.
+ -
+ - This method works for POSIX shells, as well as other shells like csh.
+ -}
shellEscape :: String -> String
shellEscape f = "'" ++ escaped ++ "'"
where
diff --git a/debian/changelog b/debian/changelog
index 96cca734d..e7b79f34b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,11 @@ git-annex (4.20130324) UNRELEASED; urgency=low
* webapp: Fix a race that sometimes caused alerts or other notifications
to be missed if they occurred while a page was loading.
* webapp: Progess bar fixes for many types of special remotes.
+ * Build debian package without using cabal, which writes to HOME.
+ Closes: #704205
+ * webapp: Run ssh server probes in a way that will work when the
+ login shell is a monstrosity that should have died 25 years ago,
+ such as csh.
-- Joey Hess <joeyh@debian.org> Mon, 25 Mar 2013 10:21:46 -0400
diff --git a/debian/control b/debian/control
index be65a3973..c8a15ed80 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,6 @@ Priority: optional
Build-Depends:
debhelper (>= 9),
ghc (>= 7.4),
- cabal-install,
libghc-mtl-dev (>= 2.1.1),
libghc-missingh-dev,
libghc-hslogger-dev,
diff --git a/debian/rules b/debian/rules
index 7155baded..99bcd6aa0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,5 +1,8 @@
#!/usr/bin/make -f
+# Avoid using cabal, as it writes to $HOME
+export CABAL=runghc Setup.hs
+
%:
dh $@
diff --git a/doc/bugs/Detection_assumes_that_shell_is_bash.mdwn b/doc/bugs/Detection_assumes_that_shell_is_bash.mdwn
index 46b159e80..9bb0629d3 100644
--- a/doc/bugs/Detection_assumes_that_shell_is_bash.mdwn
+++ b/doc/bugs/Detection_assumes_that_shell_is_bash.mdwn
@@ -18,3 +18,7 @@ git-annex version: 3.20121017
Not everyone has bash as there login-shell.
[[!tag /design/assistant]]
+
+> [[done]]; assistant now uses sh -c "sane shell stuff here" to work
+> around csh. (There are systems without bash, but probably fewer without sh)
+> --[[Joey]]
diff --git a/doc/bugs/host_with_rysnc_installed__44___not_recognized.mdwn b/doc/bugs/host_with_rysnc_installed__44___not_recognized.mdwn
index e411eaf9c..4513ad9db 100644
--- a/doc/bugs/host_with_rysnc_installed__44___not_recognized.mdwn
+++ b/doc/bugs/host_with_rysnc_installed__44___not_recognized.mdwn
@@ -13,3 +13,7 @@ ssh keys were installed to allow login, when ssh-askpass was not found on osx ve
[[!meta title="webapp rsync probe command failed on FreeNAS box"]]
[[!tag /design/assistant]]
+
+> [[done]]; based on the error message it's using csh and
+> the assistant will now wrap its shell commands to work with csh.
+> --[[Joey]]