Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
argonix
Commits
36ffa032
Commit
36ffa032
authored
Mar 06, 2019
by
Valentin Reis
Browse files
pass NIX_SSL_CERT_FILE
parent
3ddf429e
Pipeline
#5838
canceled with stage
in 1 minute and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/Argonix.hs
View file @
36ffa032
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment