Commit 36ffa032 authored by Valentin Reis's avatar Valentin Reis

pass NIX_SSL_CERT_FILE

parent 3ddf429e
Pipeline #5838 canceled with stage
in 1 minute and 1 second
......@@ -311,7 +311,7 @@ shellVerbose verbosity s = do
putVerbose verbosity s
P.runProcess (P.shell $ toS s)
readProcessVerbose :: Verbosity -> Text -> [Text] -> [(Text, Text)] -> IO Text
readProcessVerbose :: Verbosity -> Text -> [Text] -> [(Text, Text)] -> IO Text
readProcessVerbose verbosity name arguments envVars = do
putVerbose verbosity $ name <> mconcat (intersperse " " arguments)
head
......@@ -336,24 +336,28 @@ setupSystem target sa = do
ExitSuccess -> putText "removed ./nixtmpdir"
ExitFailure n -> die ("Failed to remove ./nixtmpdir " <> show n)
varXDG_CACHE_HOME <- rpVerbose "mktemp" ["-d", "/tmp/deletable-nix-cache-XXXX"] []
varTMPDIR <- createAndSetTMPDIR "nixtmpdir"
varNIX_PATH <- toS <$> SE.getEnv "NIX_PATH"
varPATH <- toS <$> SE.getEnv "PATH"
varXDG_CACHE_HOME <- rpVerbose "mktemp"
["-d", "/tmp/deletable-nix-cache-XXXX"]
[]
varTMPDIR <- createAndSetTMPDIR "nixtmpdir"
varNIX_PATH <- toS <$> SE.getEnv "NIX_PATH"
varPATH <- toS <$> SE.getEnv "PATH"
varNIX_SSL_CERT_FILE <- toS <$> SE.getEnv "NIX_SSL_CERT_FILE"
let envVars =
[ ("XDG_CACHE_HOME", varXDG_CACHE_HOME)
, ("TMPDIR" , varTMPDIR)
, ("NIX_PATH" , varNIX_PATH)
, ("PATH" , varPATH)
[ ("XDG_CACHE_HOME" , varXDG_CACHE_HOME)
, ("TMPDIR" , varTMPDIR)
, ("NIX_PATH" , varNIX_PATH)
, ("PATH" , varPATH)
, ("NIX_SSL_CERT_FILE", varNIX_SSL_CERT_FILE)
]
when (isTarget target) $ setupNodeOs envVars
return envVars
where
setupNodeOs :: [(Text,Text)] -> IO ()
setupNodeOs env= do
setupNodeOs :: [(Text, Text)] -> IO ()
setupNodeOs env = do
cleanSockets $ verbosity sa
checkFsAttributes (verbosity sa) "/tmp"
nodeos_config <- rpVerbose
......@@ -370,11 +374,14 @@ setupSystem target sa = do
ExitFailure n ->
die ("Failed to set argo_nodeos_config permissions " <> show n)
sVerbose "sudo chmod u+sw /tmp/argo_nodeos_config" >>= \case
ExitSuccess -> return ()
ExitFailure n -> die ("Setting suid bit failed with exit code " <> show n)
sVerbose "sudo /tmp/argo_nodeos_config --clean_config=kill_content:true" >>= \case
ExitSuccess -> return ()
ExitFailure n -> die ("NodeOS config cleaning failed with exit code" <> show n)
ExitFailure n ->
die ("Setting suid bit failed with exit code " <> show n)
sVerbose "sudo /tmp/argo_nodeos_config --clean_config=kill_content:true"
>>= \case
ExitSuccess -> return ()
ExitFailure n ->
die ("NodeOS config cleaning failed with exit code" <> show n)
sVerbose = shellVerbose $ verbosity sa
rpVerbose = readProcessVerbose $ verbosity sa
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment