saltstack-formulas / salt-formula

Yes, Salt can Salt itself!
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
197 stars 423 forks source link

Fix repo management on Debian Bullseye and newer. #521

Closed hkbakke closed 2 years ago

hkbakke commented 2 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

Considering that signed-by was already the default, limiting the default repo config to Stretch and newer, there should be none.

Related issues and/or pull requests

Describe the changes you're proposing

See commit message. Update to modern defaults for Debian and Raspbian. Fix issue with custom repos in Bullseye.

Pillar / config required to test the proposed changes

salt:py_ver: py3 can be removed on most Debian installs.

Debug log showing how the proposed changes work

Repo management succeeds by default on Rasbian and Debian Bullseye.

Documentation checklist

Testing checklist

Additional context

hkbakke commented 2 years ago

Updated the commit subject field to hopefully fix the commitlint errors.

myii commented 2 years ago

@hkbakke This adjustment will make commitlint happy (subject starts with lowercase letter):

-fix: Make it possible to not have key_url set
+fix: make it possible to not have key_url set

-fix: Update to modern defaults for Debian family 
+fix: update to modern defaults for Debian family 
hkbakke commented 2 years ago

Those look identical to me?

Edit: nevermind -- lowercase subject.. my bad.

hkbakke commented 2 years ago

I see that the tests fails because the key_url is not present, but that is kind of the point of this PR. Is there anything I should do here?

myii commented 2 years ago

I see that the tests fails because the key_url is not present, but that is kind of the point of this PR. Is there anything I should do here?

@hkbakke That's the map.jinja verification files that need to be updated. I was going to suggest that I could push a commit on top of this PR to finalise it but I just noticed that this is set up based on hkbakke:master, which means I won't be able to do so. Using a feature branch is better for both sides.

Let me explain what needs to be changes to finalise this PR. The following lines need to be removed:

https://github.com/saltstack-formulas/salt-formula/blob/99b14699f3f2eedf9f01081e218c1d29112f3a88/test/integration/v3002-py3/files/_mapdata/debian-10.yaml#L45

https://github.com/saltstack-formulas/salt-formula/blob/99b14699f3f2eedf9f01081e218c1d29112f3a88/test/integration/v3002-py3/files/_mapdata/debian-9.yaml#L45

https://github.com/saltstack-formulas/salt-formula/blob/99b14699f3f2eedf9f01081e218c1d29112f3a88/test/integration/v3001-py3/files/_mapdata/debian-10.yaml#L45

https://github.com/saltstack-formulas/salt-formula/blob/99b14699f3f2eedf9f01081e218c1d29112f3a88/test/integration/v3001-py3/files/_mapdata/debian-9.yaml#L45


Actually, thinking about this a bit further, shouldn't Ubuntu be fixed in the same way? I.e. These lines (and the verification files):

https://github.com/saltstack-formulas/salt-formula/blob/99b14699f3f2eedf9f01081e218c1d29112f3a88/salt/osmap.yaml#L27-L31

hkbakke commented 2 years ago

Thank you. I'll fix the tests on my side then.

Regarding Ubuntu, it most likely should be fixed in the same way, but as I don't have any Ubuntu minions running I did not feel confident in changing the defaults without testing it properly myself.

myii commented 2 years ago

Thank you. I'll fix the tests on my side then.

Regarding Ubuntu, it most likely should be fixed in the same way, but as I don't have any Ubuntu minions running I did not feel confident in changing the defaults without testing it properly myself.

@hkbakke You're welcome. In fact, let's not worry about Ubuntu for now. I need to update the CI soon to add 3004 (with a working Bullseye instance) so I can tackle Ubuntu then. Thanks for your work here.

hkbakke commented 2 years ago

I have updated the tests, and also modified the description of py_ver in pillar.example.

myii commented 2 years ago

@hkbakke Merged, thanks for this useful PR. @baby-gnu Thanks for the review.

saltstack-formulas-travis commented 2 years ago

:tada: This PR is included in version 1.9.5 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: