Closed noelmcloughlin closed 4 years ago
why not install git from scl?
https://wiki.centos.org/SpecialInterestGroup/SCLo/CollectionsList
I'm not a user of salter
('though I'm following it to see if it suits any of my needs) so perhaps the question is irrelevant or missing something:
Is there any reason to force the requirement to be git >= 2.x
instead of just git
and use the default provided by the OSes? While building the images to test salt formulas, I use the default git
package provided by the OSes and it works OK to build and install Salt in +30 distros variants, using Salt's bootstrap, even performing git-based installs.
Furthermore, running
grep -Ri "git " | grep -v \\.git|less
in this repo only shows some pretty basic git commands
: I see clone
, checkout
, config
, init
and pull
, if I'm not wrong.
Am I missing something? Sorry for the noise if that's the case.
Is there any reason to force the requirement to be
git >= 2.x
instead ofjust git
and use the default provided by the OSes?
This is a valid criticism - I'm being a bit selfish here. The need was related to this repo originating from a closed-source company internal repo which was a monolith when I was asked to take it over few years ago. My strategy was to push everything upstream (saltstack-formulas) and try to make something like a package manager (for formulas). This largely succeeded although I need to keep a heartbeat on supported formulas to make sure they don't break.
However in my workplace we still have the original repo but its a skeleton based on idea at https://github.com/noelmcloughlin/salter-overlay-demo
In that design I used this command which requires git v2.
git pull salter master --allow-unrelated-histories
I want to support some method to drop in private formulas/pillars onto the solution without exposing the private stuff on the WWW. I wanted to do everything possible to avoid forking - but maybe I should just fork.
I could make time to see if I could come up with a better solution.
why not install git from scl?
Is that more standard solution? I'm not that familiar with scl.
why not install git from scl?
Is that more standard solution? I'm not that familiar with scl.
Hi @noelmcloughlin SCL is something from redhat/centos to overcome the issues of stale software. So it should work better without interfering with the original packaging.
I want to support some method to drop in private formulas/pillars onto the solution without exposing the private stuff on the WWW. I wanted to do everything possible to avoid forking - but maybe I should just fork.
For drop in
you mean 'add' in a certain path or 'merge' over existing pillars? Because if it's the former, perhaps submodules
or subtrees
might help?
So it should work better without interfering with the original packaging.
Thanks @aboe I will look at this instead.
perhaps
submodules
orsubtrees
might help?
It might.
The real motivation was
salter.sh
salter.sh
myself since I'm only maintainer for internal users and it used too take up lots of my time.Mostly I want to merge in (if I recall correctly)
Thanks @Aboe I will look at this instead.
I think I prefer --allow-skip-broken
- the implementation only uses this for one specific task (install a few packages). Let me think further and compare approaches.
Hi @aboe76
I have to fallback to --skip-broken
because it serves the need best. I tried SCL but it binds to active bash session and all new bash sessions spawned by the script lose the bond and cannot find git or pickup wong git. I'm just trying to fix one dependant project short term on Cent7 for one command - this is once off option for a few packages.
@noelmcloughlin ok merged it.
Thanks guys
This PR fixes a git conflict on CentOS7 when using yum.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Workaround yum warning on CentOS
Primary type
Secondary type
Does this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
CentOS 7 only ships git v1.8 so typically we install git 2.x from IUS repo. This causes a problem with
salter.sh bootstrap
command because its trying to install git but there is conflict. One solution is to not install git (it maybe already installed) but that approach impacts all OS. The most clean solution is to allowsskip-broken
because only a limited number of packages are being installed at the step that fails.Pillar / config required to test the proposed change
Debug log showing how the proposed changes work
Testing checklist
state_top
).Additional context