Skip to content

Commit

Permalink
Merge pull request #399 from nodecross/fix/build-by-omnibus
Browse files Browse the repository at this point in the history
Fix/build by omnibus
  • Loading branch information
da13da authored Sep 29, 2024
2 parents 8e8941c + 1c2219f commit c8cd1bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 8 additions & 4 deletions omnibus/config/software/build-nodex-agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@

build do
nodex_dir = File.expand_path('..', Omnibus::Config.project_root)
unless Dir.exist?("#{project_dir}/src")
mkdir "#{project_dir}/src"
unless Dir.exist?("#{project_dir}/agent")
mkdir "#{project_dir}/agent"
end
copy "#{nodex_dir}/src/*", "#{project_dir}/src/"
copy "#{nodex_dir}/agent/*", "#{project_dir}/agent/"

unless Dir.exist?("#{project_dir}/protocol")
mkdir "#{project_dir}/protocol"
end
copy "#{nodex_dir}/protocol/*", "#{project_dir}/protocol/"

unless Dir.exist?("#{project_dir}/e2e")
mkdir "#{project_dir}/e2e"
end
copy "#{nodex_dir}/e2e/*", "#{project_dir}/e2e/"

copy "#{nodex_dir}/build.rs", "#{project_dir}"
copy "#{nodex_dir}/Cargo.toml", "#{project_dir}"
copy "#{nodex_dir}/Cargo.lock", "#{project_dir}"

Expand Down
5 changes: 0 additions & 5 deletions omnibus/config/templates/init-scripts/systemd.service.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,10 @@ User=nodex
Group=nodex

# Security and isolation settings:
# - PrivateTmp: Isolates temporary files from other services.
# - NoNewPrivileges: Prevents gaining additional privileges.
# - ProtectSystem, ProtectKernelModules, ProtectKernelTunables, ProtectControlGroups: Limits the service’s ability to modify the system, enhancing security.
PrivateTmp=true
NoNewPrivileges=true
ProtectSystem=full
ReadWritePaths=%h/.config
ReadWritePaths=%h/.nodex
ReadWritePaths=%h/bin
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
Expand Down

0 comments on commit c8cd1bb

Please sign in to comment.