have origin.spec use hack scripts to build#10398
have origin.spec use hack scripts to build#10398openshift-bot merged 1 commit intoopenshift:masterfrom
Conversation
|
Can you verify the Linux |
| # builder | ||
| cmd = '. ./hack/common.sh ; echo $(os::build::ldflags)' | ||
|
|
||
| ## Fixup os_git_vars |
There was a problem hiding this comment.
We have os::build::os_version_vars in hack/common.sh -- is it possible to reuse that logic?
There was a problem hiding this comment.
The big difference is that os::build::ldflags echo's everything out in one line. os::build::os_version_vars just set's variables. But I'll give it a try.
There was a problem hiding this comment.
You could also write a wrapper:
function os::build::emit_os_version_vars() {
os::build::os_version_vars
echo "OS_GIT_COMMIT=${OS_GIT_COMMIT}...."
}Either way, I think it's worthwhile to keep the logic in one place so it can't drift. I found a bug in the logic this week, if there ends up a bug fix I'd rather it propagate correctly.
There was a problem hiding this comment.
I totally agree with you, in keeping the logic in one place.
I wish the tito scripts were in bash so I could write a wrapper function. What I have below isn't pretty, but it get's the job done.
There was a problem hiding this comment.
Sorry, I meant if you write a Bash wrapper in hack/common.sh and call it the same way you're calling os::build::ldflags.
There was a problem hiding this comment.
Well, actually not the same way. You don't need to do echo $(funcname), you can simply do funcname. But that's a nitpick
There was a problem hiding this comment.
I now understand what you are saying, but I'd like to keep the logic where it is for this pull request.
I have some ideas for building srpm's, #7268 and I'd like to defer this cleanup until then.
There was a problem hiding this comment.
Sure thing. Your logic is distinct from the logic used in os::build::os_version_vars but I assume it's compatible for now.
|
@liggitt Yep, looks like it does $ _output/local/bin/linux/amd64/oc version |
|
[test] |
Have tito update os_git_vars in origin.spec Set pkgdir the same as go_pkg_dir Use hack/build-cross.sh to build rpm binaries Install binaries from new build locations Add OS_GIT_VERSION to os_git_vars Fix ldflag generation by exporting OS_ROOT manually Do not export OS_ROOT Create extended test with scripts Remove ldflags since they are no longer needed Set OS_ROOT each time we use os::build::ldflags Use hack/common.h to set os_git_vars
0edc325 to
7a3a9d6
Compare
|
Evaluated for origin test up to 7a3a9d6 |
|
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7935/) |
|
[test] |
|
The Origin test job could not be run again for this pull request.
|
|
It looks like the tests failing were a false falure. Can we get a merge on this. |
|
@tdawson if we want green tests, just link to the conformance flake that you had and you can re-test. That being said, are there any tests in our CI right now that would prove correctness for what you've done? I don't think so. If not, there's no point in testing again and I'll merge it |
|
There's hack/test-rpm.sh but I don't believe it's wired in anywhere and likely is out of date. |
|
There's even a Vagrant command wired up for it but I don't think we ever call it. @tdawson can you open an issue to track the migration of the logic from in here to Bash? [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8149/) (Image: devenv-rhel7_4867) |
|
Evaluated for origin merge up to 7a3a9d6 |
|
I ran the the hack/test-rpm.sh on this pull request. None of the errors or warning had anything that this pull request would have affected. I think the reason this wasn't incorporated into the tests was due to the amount of cleanup the rpmlint is going to take. |
Which are missing? We are trying to generate all of the man pages for the CLI from our normal helptext. |
|
We are currently only creating man pages for the main binaries, oadm, oc, and openshift We don't create any for Most of those are just links to openshift, but rpmlint doesn't know that, and some of them act differently depending on how they are called. |
|
Should be fairly simple to add pages for the links, just change the base name of them. Similarly we could import the kube ones if it's more important than getting fewer nags from rpmlint |
|
The -pkgdir statement is wrong - on some platforms it generates content into the user's git repo. I'll open a follow up, but I'll need you @tdawson to review the changes for spec. |
| eval "platform_goflags=(${!platform_goflags_envvar:-})" | ||
|
|
||
| GOOS=${platform%/*} GOARCH=${platform##*/} go install \ | ||
| -pkgdir ${GOPATH}/src/${OS_GO_PACKAGE} \ |
There was a problem hiding this comment.
@tdawson @smarterclayton @stevekuznetsov FYI this line makes it so the go stdlib as well as all the origin & vendored code have their .a files placed in the root of the origin dir, so you get bufio.a, bytes.a, ...
@damemi in case you were wondering why this was happening
There was a problem hiding this comment.
@ncdc Correct. And if we don't have that there, then everything built tries to be put in the go global area (/usr/lib/golang/pkg/linux_386/). This works if you are a privileged user, but doesn't if you are not.
#10027 (comment)
There was a problem hiding this comment.
Yeah, that's a problem for non-release builds (putting all the junk into pwd). I think it would be better to only set -pkgdir for release builds.
|
Opened #10533 to track -pkgdir not being the root |
Use the hack scripts to build the binaries for the origin rpm