salt
salt copied to clipboard
[3006.x] Ensure on rpm and deb systems, that user and group for existing Salt, is maintained on upgrade
What does this PR do?
On upgrading on Redhat and Debian families, ensures that existing permissions (user, group) are preserved.
What issues does this PR fix or reference?
Fixes: https://github.com/saltstack/salt/issues/65264
Previous Behavior
Upgrades would force Salt directories etc. permissions user:group to salt:salt
New Behavior
Upgrades of Salt, now note the permissions (user:group) of Salt directories and preserves those permissions.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
- [ ] Docs
- [X] Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html
- [ ] Tests written/updated
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.
Proposed to @barneysowood that I take over https://github.com/saltstack/salt/pull/66047 and https://github.com/saltstack/salt/pull/66050 since they are not receiving enough attention
Taken over #66047 and #66050 with @barneysowood permission
Run into testing infrastructure problem, with --no-install on the CLI, runs into missing salt-master since shutil.which("salt-master") fails, since it is NOT INSTALLED :faceplam:, confirmed with 3006.x branch with same command:
nox -e 'ci-test-onedir-pkgs' -- upgrade --prev-version=3006.8 -vv --run-destructive --no-install --log-level=TRACE --log-cli-level=TRACE --log-file-level=TRACE 2>&1 tests/pytests/pkg/upgrade/test_salt_upgrade.py | tee ~/mytest.log
Working on solution. Note: the --no-install on CLI negates upgrade, and when fails due to command
nox -e 'ci-test-onedir-pkgs' -- upgrade --prev-version=3006.8 -vv --run-destructive --log-level=TRACE --log-cli-level=TRACE --log-file-level=TRACE 2>&1 tests/pytests/pkg | tee ~/mytest.log
and the above command introduces the --no-install internally and hence failure.
Fixing test_salt_api.py in tests/pytests/pkg/integration, packaging tests appear not to have been completed before the Broadcom buyout was finalized and running into issues as implementing upgrade/downgrade tests.