Feature changed by: Adrian Schröter (adrianSuSE) Feature #315250, revision 13 Title: Make it easier to move around kiwi files in OBS Buildservice: Implementation Milestone: 2.5 Priority Requester: Mandatory Projectmanager: Mandatory Requested by: Adrian Schröter (adriansuse) Partner organization: openSUSE.org Description: We have often problems when moving around kiwi files in OBS, since they often need a changed repository list then. OBS will support a directive to use the repositories from the project repository definition instead. This can be triggered via defining an "obsrepositories:/" repository in the kiwi file. OBS (and osc) will patch then the kiwi file when a build starts to use the expanded repository list from the project definition. It will work therefore with all kiwi version, but we should add some proper error message to kiwi, if someone tries to run kiwi manually on such a file. Discussion: #1: Adrian Schröter (adriansuse) (2013-06-28 10:18:06) It is half implemented and testable at build-test.opensuse.org. Missing is: * product image support * osc support * correct kiwi error message #2: Robert Schweikert (rjschwei) (2013-06-28 08:48:07) As the feature is partially implemented I guess it is best to move forward with this. However, I think we should re-think this and the existing setup. At present we have: opensuse and obs acronyms comprehended by both KIWI and the build service. With this we get another acronym obsrepositories This acronym however is only comprehended by the build service, if I understand correctly. The build service will change obsrepositories into obs:// with the appropriate path before handing the config file to kiwi. I have the following concerns about this: 1.) We mangle the user data 2.) It is really difficult to explain the difference between obs:/ and obsrepositories:/ 3.) Building images in the build service is getting ever more complicated and drifting father away from a kiwi build on the command line #3: Adrian Schröter (adriansuse) (2013-06-28 14:57:14) (reply to #2) we can still drop the entire feature (it is just in the master branch for now), if there is a better solution. I just do not see one :) Yes, we mangle the user data, but only when the user decided that we should do so by using the obsrepositories:/ directive. Please note that the file in the source repo will be untouched, the mangling does only happen on the build host. The general problem here is that the repository list is in the kiwi file usually while OBS users expect it in the project meta. That is what I want to solve with the directive. #4: Robert Schweikert (rjschwei) (2013-06-28 10:21:31) (reply to #3) If the actual goal is to have the image build fit better into the concepts prevalent in OBS then it would be easier to tell kiwi to ignore the configured repositories and add new repositories that are taken from the project config on the command line. Thus when OBS invokes kiwi the command line switch --ignore-repos would be use as well as --add-repo, --add-repoalias, --add-repopriority, and --add-repotype. This has the following advantages: 1.) It is very easy to explain and document "During an image build in OBS all repositories configured in the kiwi configuration file will be ignored. Repositories for the image build are added on the kiwi command line and are taken from the project configuration." 2.) It gets OBS out of the business of having to comprehend the repository configuration of the kiwi configuration file 3.) A user can check in a configuration file that will build inside and outside of OBS The only thing that's left to solve in this case is how one build images for multiple distributions in the same project. But this can probably be deducted from some attribute settings. #5: Marcus Schaefer (sax2) (2013-07-01 09:42:11) (reply to #4) I agree, the buildservice has a complete different and unique view on the repository setup. It's better to ignore the information in the . kiwi file in this case instead of changing the user data behind the scene we would also be able to get rid of the obs:// type which confused many people in the past #6: Adrian Schröter (adriansuse) (2013-07-01 09:50:50) (reply to #4) We can do that, but that means we need updated kiwi versions for all distros. Also, we need somewhere some setting if the old or the new way should be used. Otherwise we would break all old (and current) builds. What I fear also is that users don't understand then why their repositories in the kiwi files are ignored. But maybe this can we solved by some large and loud print lines #7: Adrian Schröter (adriansuse) (2013-07-01 09:56:34) (reply to #4) Another option is that this mode becomes action, when a obsrepositories: / directive is added to the .kiwi file: * OBS replaces it with the project definitions and adds further optional obs:/ defined repos, but ignores all other definitions. * Plain kiwi ignores all obsrepositories:/ and obs:/ repositories, but uses the rest of them. In that way a user still can build one .kiwi file for OBS and non-OBS usage, but we do not break former stuff and it is still kind of transparent (from my POV). #8: Adrian Schröter (adriansuse) (2013-07-01 10:03:40) (reply to #7) JFYI, currently OBS refuses to build a .kiwi file with non obs:/ repositories because it looks to be incomplete. That check would be disabled if an obsrepositories:/ directive is inside. #9: Adrian Schröter (adriansuse) (2013-07-02 13:38:45) JFYI, this is currently deployed on build.opensuse.org. While we still can modify or remove this functionality (since it is just in master branch so far), I like to blog about it to let the users try it. However, this makes no sense if you disagree on this approach and we need to remove it again. Any opinion? #10: Marcus Schaefer (sax2) (2013-07-02 16:05:55) (reply to #9) The ignore-repos / add-repo options exists for all kiwi versions the buildservice use. I don't think we have to change/update kiwi here just the buildservice needs to change the way it calls kiwi. I'm more in favour to discuss and decide this in a meeting also with Robert. If I would have to decide this on my own I wouldn't add any new url type like obsrepositories:// or obs:// In order to explain a change in that area to the user I think we only can document it properly or print a warning at build time that repos in the .kiwi file will not have any effect It's clear to me that such a change would break current image builds also my own containment builds would break but I would accept that and move the repo defintition from the .kiwi file into the project configuration I can't tell how many other users would be affected by this but somehow we should cleanup the code and I think adding yet another complexity just to stay compatible will not make the situation any better. Thus I vote for a clear and maybe hard cut but again it should be discussed if you announce this as new feature we might receive more resistance if it is changed after a short time again. Thus I wouldn't talk about it until we had the chance to discuss it just my 2cents #11: Adrian Schröter (adriansuse) (2013-07-02 16:54:22) (reply to #10) well, breaking former builds, including the ones in released products is an absolute no-go. If the kiwi file can not contain the switch (obsrepositories:/) we need to put it elsewhere. No idea where right now. + #12: Adrian Schröter (adriansuse) (2013-07-03 14:08:30) (reply to #10) + I have now changed the code to use the kiwi command line parameters + instead of patching the kiwi file. However, the trigger is still the + obsrepositories:/ path. -- openSUSE Feature: https://features.opensuse.org/315250