diff --git a/pkg/debian/rules b/pkg/debian/rules index ebc6bdff52d6..1a7556ab699e 100755 --- a/pkg/debian/rules +++ b/pkg/debian/rules @@ -29,6 +29,7 @@ override_dh_auto_build: build/onedir/venv/bin/tools pkg build salt-onedir . --package-name build/onedir/salt --platform linux build/onedir/venv/bin/tools pkg pre-archive-cleanup --pkg build/onedir/salt + else override_dh_auto_build: # The relenv onedir is being provided, all setup up until Salt is installed @@ -38,6 +39,7 @@ override_dh_auto_build: # Fix any hardcoded paths to the relenv python binary on any of the scripts installed in the /bin directory find build/onedir/salt/bin/ -type f -exec sed -i 's:#!/\(.*\)salt/bin/python3:#!/bin/sh\n"exec" "$$(dirname $$(readlink -f $$0))/python3" "$$0" "$$@":g' {} \; + endif # dh_auto_install tries to invoke distutils causing failures. @@ -47,4 +49,11 @@ override_dh_auto_install: override_dh_install: mkdir -p debian/salt-common/opt/saltstack cp -R build/onedir/salt debian/salt-common/opt/saltstack/ + + # Generate master and minion configs + mkdir -p debian/salt-master/etc/salt + sed 's/#user: root/user: salt/g' conf/master > debian/salt-master/etc/salt/master + mkdir -p debian/salt-minion/etc/salt + sed 's/#user: root/#user: root\ngroup: salt/g' conf/minion > debian/salt-minion/etc/salt/minion + dh_install diff --git a/pkg/debian/salt-master.install b/pkg/debian/salt-master.install index 35ea3571d081..3d665d5b164d 100644 --- a/pkg/debian/salt-master.install +++ b/pkg/debian/salt-master.install @@ -1,2 +1 @@ -pkg/common/conf/master /etc/salt pkg/common/salt-master.service /lib/systemd/system diff --git a/pkg/debian/salt-minion.install b/pkg/debian/salt-minion.install index d7a23a423bdb..3132ad7d1281 100644 --- a/pkg/debian/salt-minion.install +++ b/pkg/debian/salt-minion.install @@ -1,4 +1,3 @@ -conf/minion /etc/salt conf/proxy /etc/salt pkg/common/salt-minion.service /lib/systemd/system pkg/common/salt-proxy@.service /lib/systemd/system diff --git a/pkg/rpm/salt.spec b/pkg/rpm/salt.spec index 3d470cc314fa..769ecd7180ee 100644 --- a/pkg/rpm/salt.spec +++ b/pkg/rpm/salt.spec @@ -153,7 +153,7 @@ cd $RPM_BUILD_DIR # Generate master and minion configs sed 's/#user: root/user: salt/g' %{_salt_src}/conf/master > $RPM_BUILD_DIR/build/master - sed 's/#group: root/group: salt/g' %{_salt_src}/conf/minion > $RPM_BUILD_DIR/build/minion + sed 's/#group: root/#user: root\ngroup: salt/g' %{_salt_src}/conf/minion > $RPM_BUILD_DIR/build/minion %else # The relenv onedir is being provided, all setup up until Salt is installed @@ -166,7 +166,7 @@ cd $RPM_BUILD_DIR # Generate master and minion configs sed 's/#user: root/user: salt/g' %{_salt_src}/conf/master > $RPM_BUILD_DIR/build/master - sed 's/#group: root/group: salt/g' %{_salt_src}/conf/minion > $RPM_BUILD_DIR/build/minion + sed 's/#group: root/#user: root\ngroup: salt/g' %{_salt_src}/conf/minion > $RPM_BUILD_DIR/build/minion cd $RPM_BUILD_DIR %endif