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

Stop cut&paste within container repositories #139

Closed
praiskup opened this issue Sep 7, 2016 · 1 comment
Closed

Stop cut&paste within container repositories #139

praiskup opened this issue Sep 7, 2016 · 1 comment

Comments

@praiskup
Copy link
Contributor

praiskup commented Sep 7, 2016

By $Subject I mean directories of PostgreSQL versions within postgresql-container repo, because we already have Makefile, it is trivial to write everything once. The all-time C&P'ing and pointing someone to C&P something really feeds my OCD .. :) and also we don't have to cheat the number-of-{added,removed-lines} statistics on github, right?

I suggest moving from multiple source trees into (a) one source tree and (b) multiple build trees (excluded by .gitignore). I wouldn't enforce this rule, if somebody likes C&P, but at least we should allow that.

There are other issues in actual approach:

  • We can not share common library paths ATM. There was some attempt to make container debugging easier in Add better logging functionality mysql-container#119, and most of the stuff could be reused, but c&p it out from there and apply here is crazy.
  • For example fixing permission bits for 'ADD root /'  #136, which effectively causes that that /usr/bin has non-default permissions. Yes, we could fix fix-permissions script somehow but we can also fix permissions before we run docker build -- but we can not do it now, because you simply can not set 0555 mode on 9.2/root/usr/bin, because then git is refused to add/remove files within that directory.
  • C&P'ing wastes contributor's concentration, demotivates contributors that want to fix one issues in one particular version of say mysql container, but (to accept his fix) we make him to fix all other versions.

There were worries about our contributors, and that such change will make it harder to contribute to containers' sources, but I really doubt this is truth -- taking into account that almost any project (honestly non-dockerfile related, yes) in the wild uses similar approach.

There were worries about templating/runtime issues, but I wouldn't force everybody to use exactly the same approach, I don't want to discuss templating in this issue either. What I would like to do is simply and slowly not-C&P those parts of our code-base that doesn't have to differ at all across $(VERSION)s.

@pkubatrh
Copy link
Member

pkubatrh commented Oct 4, 2019

This basically got resolved by introducing distgen source generation to this repository + common library via a submodule.

@pkubatrh pkubatrh closed this as completed Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants