Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/build by omnibus #399

Merged
merged 4 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading