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

Declare chocolatey dependency on VC redist package #7437

Closed
wants to merge 2 commits into from

Conversation

petemounce
Copy link
Contributor

@petemounce petemounce commented Feb 15, 2019

Fixes #7376. Currently untested, am on holiday without my build environment.

cc @laszlocsomor, @RNabel, @vmax.

To verify:

  1. check out this branch on a Windows computer
  2. cd scripts/packages/chocolatey
  3. in powershell: ./build.ps1 -version 0.23.0 -mode rc -rc 2 (I think 0.23 release is in flight, and rc2 has not been pushed)
    • should produce ./bazel-0.23.0rc2.nupkg (from memory; filename might vary)
  4. choco install --verbose --yes ./bazel-0.23.0rc2.nupkg
    • should see `[INFO ] - [NuGet] Attempting to resolve dependency 'vcredist2015 (= 14.0.24215.20170201).' in log, where, previous to this change, would not be present in log.

selfie-0
GitHub Selfies

@laszlocsomor
Copy link
Contributor

Cool photo! :) Thanks for fixing it even while you're on vacation!

Tried it:

  1. cloned this PR to my workstation, built the package, got bazel.nuspec and bazel.0.23.0-rc2.nupkg
  2. created a fresh Windows VM, installed Chocolatey, choco installed bazel (0.22.0)
  3. transferred the .nuspec and .nupkg files to the VM, ran choco install as you advised, got output:
    By installing you accept licenses for the packages.
    [NuGet] Attempting to resolve dependency 'chocolatey-core.extension (= 1.0.7)'.
    [NuGet] Attempting to resolve dependency 'msys2 (= 20160719.1.0 && = 20160719.1.1)'.
    [NuGet] Attempting to resolve dependency 'python2 (= 2.7.11 && < 3.0)'.
    [NuGet] Attempting to resolve dependency 'vcredist2015 (= 14.0.24215.20170201)'.
    bazel not installed. An error occurred during installation:
     Unable to resolve dependency 'vcredist2015 (= 14.0.24215.20170201)'.
    bazel package files install completed. Performing other installation steps.
    The install of bazel was NOT successful.
    bazel not installed. An error occurred during installation:
     Unable to resolve dependency 'vcredist2015 (= 14.0.24215.20170201)'.
    
    Chocolatey installed 0/1 packages. 1 packages failed.
     See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
    
    Failures
     - bazel (exited 1) - bazel not installed. An error occurred during installation:
     Unable to resolve dependency 'vcredist2015 (= 14.0.24215.20170201)'.
    

The line you mentioned is there, so far so good. Do you think the failure is expected? (I wouldn't know, since I never install Bazel from Chocolatey.)

@petemounce
Copy link
Contributor Author

No, that's a failure. "Unable to resolve dependency"; it cannot find that version of the vcredist2015 package. I don't know why, https://chocolatey.org/packages/vcredist2015/14.0.24215.20170201 exists...

@jin jin added the area-Windows Windows-specific issues and feature requests label Feb 19, 2019
@brunoyb
Copy link

brunoyb commented Feb 28, 2019

Hi! Thanks for working on this!

That's odd. I noticed vcredist2015 now just takes a dependency on vcredist140. So, maybe if you change it to depend on vcredist140 directly instead...?

@laszlocsomor
Copy link
Contributor

Hey @petemounce, do you still plan to fix this issue?

@petemounce
Copy link
Contributor Author

Sorry! Yes.

@laszlocsomor
Copy link
Contributor

laszlocsomor commented May 7, 2019

Thanks! Could you try and rebase your change on top of master? I believe that should fix the CI failure.

Peter Mounce and others added 2 commits May 8, 2019 08:20
Fixes bazelbuild#7376. Currently untested, am on holiday without my build environment.

To verify:
1. check out this branch on a Windows computer
1. `cd scripts/packages/chocolatey`
1. in powershell: `./build.ps1 -version 0.23.0 -mode rc -rc 2` (I think 0.23 release is in flight, and rc2 has not been pushed)
  * should produce ./bazel-0.23.0rc2.nupkg (from memory; filename might vary)
1. `choco install --verbose --yes ./bazel-0.23.0rc2.nupkg`
  * should see `[INFO ] - [NuGet] Attempting to resolve dependency 'vcredist2015 (= 14.0.24215.20170201).' in log, where, previous to this change, would not be present in log.
@petemounce
Copy link
Contributor Author

Oops, done.

Speaking of which - where can I add a buildkite step to build the chocolatey package? On reading through the windows node setup powershell, I think all the dependencies are there.

Publishing the package will still require the chocolatey API key to available to the agent.

@laszlocsomor
Copy link
Contributor

Speaking of which - where can I add a buildkite step to build the chocolatey package? On reading through the windows node setup powershell, I think all the dependencies are there.

@philwo or @buchgr or @fweikert , does any of you know?

@petemounce
Copy link
Contributor Author

Ah, best to reply inside #4049 I think.

@laszlocsomor
Copy link
Contributor

Hey @petemounce , do you plan fix this PR?

@petemounce
Copy link
Contributor Author

I thought I rebased when you asked; what's outstanding?

@laszlocsomor
Copy link
Contributor

Oh sorry, it's all good! Let me import it.

@laszlocsomor
Copy link
Contributor

Shall I keep the whole PR message? :)

@petemounce
Copy link
Contributor Author

What would you write if you didn't?

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels Jul 9, 2019
@laszlocsomor
Copy link
Contributor

I'd leave out the part about your having been on holiday and the PR being untested.

Didn't mean to sound like a censor, I'm happy to keep everything verbatim.

@laszlocsomor
Copy link
Contributor

I'll fix the CLA thing tomorrow.

@petemounce
Copy link
Contributor Author

Sounds good to me.

@petemounce
Copy link
Contributor Author

Once #4049 progresses, this becomes testable within CI, or if you give me a steer toward how (where, really) to add a build step so I can download the bazel binary from buildkite artifacts (I assume it's built and pushed there) and then run the package build.PS1 and test.Ps1?

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot removed the cla: no label Jul 10, 2019
@laszlocsomor
Copy link
Contributor

Once #4049 progresses, this becomes testable within CI, or if you give me a steer toward how (where, really) to add a build step so I can download the bazel binary from buildkite artifacts (I assume it's built and pushed there) and then run the package build.PS1 and test.Ps1?

bazelbuild/continuous-integration#745 adds a .msi building step to the release process. I believe that's where you must add the Chocolatey step.

@bazel-io bazel-io closed this in 46faa85 Jul 10, 2019
irengrig pushed a commit to irengrig/bazel that referenced this pull request Jul 15, 2019
Fixes bazelbuild#7376. Currently untested, am on holiday without my build environment.

cc @laszlocsomor, @RNabel, @vmax.

To verify:
1. check out this branch on a Windows computer
1. `cd scripts/packages/chocolatey`
1. in powershell: `./build.ps1 -version 0.23.0 -mode rc -rc 2` (I think 0.23 release is in flight, and rc2 has not been pushed)
    * should produce `./bazel-0.23.0rc2.nupkg` (from memory; filename might vary)
1. `choco install --verbose --yes ./bazel-0.23.0rc2.nupkg`
    * should see `[INFO ] - [NuGet] Attempting to resolve dependency 'vcredist2015 (= 14.0.24215.20170201).' in log, where, previous to this change, would not be present in log.

![selfie-0](https://i.imgur.com/OZHeyFD.png)
[_GitHub Selfies_](https://github.com/thieman/github-selfies/)

Closes bazelbuild#7437.

PiperOrigin-RevId: 257362183
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests cla: yes team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package provided in Chocolatey does not declare a dependency
6 participants