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

Install bdcs.rpm from Copr instead of pulling it from S3 #31

Merged
merged 3 commits into from
Mar 15, 2018

Conversation

atodorov
Copy link
Member

@atodorov atodorov commented Mar 2, 2018

Note: the failure in test_images.sh is from the command:

./dist/build/bdcs-cli/bdcs-cli --url http://api:4000/ -m metadata.db -r metadata.repo/ compose tar http-server
Creating tar of http-server, saving to http-server.tar
bdcs-cli: export: rawSystem: runInteractiveProcess: exec: does not exist (No such file or directory)

which looks like it can't find bdcs-export.

@atodorov
Copy link
Member Author

atodorov commented Mar 2, 2018

The original error reported is weldr/bdcs#143 which however doesn't seem to be a problem for Jenkins.

The current failure is:
"Unable to add /usr/lib64/libnssckbi.so, file already added at this location"

where this file is a symlink to /etc/alternatives/ so I'm not quire certain that is going on.

@atodorov atodorov requested a review from bcl March 2, 2018 11:24
Copy link
Collaborator

@bcl bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. Note that we're going to start using the new compose code in bdcs-api soon, so don't worry about export.

@atodorov
Copy link
Member Author

atodorov commented Mar 5, 2018

"Unable to add /usr/lib64/libnssckbi.so, file already added at this location"

@wgwoods ^^^ this one sounds related to your work on /etc/alternatives, indeed this file is a symlink to /etc/alternatives. How do you propose I deal with this failure:

  1. Remove the offending package from the recipe so it's not exported
  2. Something else ?

@wgwoods
Copy link

wgwoods commented Mar 9, 2018

(Paraphrasing what I said on IRC, for the record)

In the long term: we're going to have to get everyone who's using /usr/sbin/alternatives in their package's %post to convert over to using a config file or something so that we can parse those and figure out which link has the highest priority. (See fedora-sysv/chkconfig#9 where I've proposed a config file format to upstream).

In the near-term I think we're gonna need a couple of things:

  1. Find some way to store the fact that %ghost files (like links to /etc/alternatives items) aren't actually in the content store and need to be generated at export-time
  2. Start compiling /etc/alternatives data somewhere (possibly just start writing our own /etc/alternatives.conf.d files?) so we have some way to look up the target and priority for each possible alternative
  3. Use that data to resolve these conflicts and generate the correct link

This is a specific case of a general problem - "how do we handle files that need to be generated at export-time?" - and it's gonna take some time to design a sensible long-term solution. Alas, I'd hoped this day wouldn't come so soon...

@atodorov
Copy link
Member Author

atodorov commented Mar 9, 2018

Note: if this fails we have to merge it after #33 so we don't have to adjust the recipes inside the Rust API docker image.

@atodorov atodorov force-pushed the fix_depsolve branch 3 times, most recently from 41df4cf to 81f4c54 Compare March 13, 2018 14:07
Copy link
Collaborator

@bcl bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really opposed to these kinds of changes. This is being changed purely to get tests to pass, not to fix an actual problem. We should not be doing that.

I think that @dashea has fixed the symlink problem in bdcs so this should not be needed.

@@ -119,7 +119,8 @@ composeCommand ctx ("tar":recipe:_) = depsolveRecipes ctx recipe >>= \r -> do
let mddbPath = optMDDB $ ctxOptions ctx
let repoPath = optRepo $ ctxOptions ctx
printf "Creating tar of %s, saving to %s\n" recipe tarFile
rawSystem "export" [mddbPath, repoPath, tarFile, tmpFile]
-- this requires the bdcs.rpm to be installed
rawSystem "/usr/libexec/weldr/bdcs-export" [mddbPath, repoPath, tarFile, tmpFile]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This piece of code is going to go away in the next iteration, it'll be using the API to start the compose, not calling bdcs commands directly.

Copy link
Collaborator

@bcl bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop the Commands.hs and http-server.toml commits and everything else looks ok to me.

@atodorov atodorov merged commit 67e358d into weldr:master Mar 15, 2018
@atodorov atodorov deleted the fix_depsolve branch March 15, 2018 09:23
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

Successfully merging this pull request may close these issues.

None yet

3 participants