Skip to content

Build Debian package #379

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

Merged
merged 3 commits into from
Aug 25, 2019
Merged

Build Debian package #379

merged 3 commits into from
Aug 25, 2019

Conversation

Daniel15
Copy link
Member

@Daniel15 Daniel15 commented Aug 23, 2019

What's the problem this PR addresses?
Adds a GitHub Action to build the Debian and RPM packages for Yarn.

TODO:

  • Test .deb package on Ubuntu
  • Test .deb package on Debian
  • Test .rpm package on CentOS
  • Add .cmd wrapper to tarball for Windows
  • Set version number of trunk builds to date, like Yarn v1 does
  • Fix RC version number so Lintian is happy with it

How did you fix it?
A lot of the logic has been copied the from Yarn v1 repo, with a few changes made to allow it to run using GitHub Actions.

Which packages would need a new release (if any)?
N/A

Have you run yarn version prerelease in those packages?
N/A

@Daniel15 Daniel15 added the in progress Features claimed by a contributor label Aug 23, 2019

steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
Copy link
Member Author

Choose a reason for hiding this comment

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

The idea here was that instead of building Yarn multiple times, it's instead just built once, and other jobs retrieve the built artifacts. However, this also means that the Debian package build can't start until all the unit and integration tests finish running. I might just deal with it building multiple times.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's fine to rebuild it, as they are run in parallel anyway. Maybe later we could find a solution to only build it once for all the workflows (not only the jobs in one workflow).

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, will do.


# Debian packages
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,66 @@
#!/bin/bash
Copy link
Member Author

Choose a reason for hiding this comment

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

# lib/async.js in node_modules
yarn-next: embedded-javascript-library
# No manpage... yet!
yarn-next: binary-without-manpage
Copy link
Member Author

Choose a reason for hiding this comment

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

Copied directly from yarn v1. Need to double check if all of these are still needed - A lot of them were due to node_modules junk.

Copy link
Member

Choose a reason for hiding this comment

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

Were those tags meant to describe the yarn package itself, or what it installed? We didn't have a node_modules in the deb file, right? 🤔

Copy link
Member Author

@Daniel15 Daniel15 Aug 23, 2019

Choose a reason for hiding this comment

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

@arcanis - lintian is a linter for Debian packages, and this is a list of the ignored lint rules for the resulting package. These overrides were added before we included a bundle in the Debian package, so many are outdated now.

@Daniel15 Daniel15 requested a review from arcanis August 23, 2019 07:12
@arcanis
Copy link
Member

arcanis commented Aug 23, 2019

I wasn't entirely sure where to put this. I'd like it to run for every build so we catch any breakages, but it also needs to run for releases.

Is that necessary? What could cause it to break? Since we're now using mostly integration tests, the CLI itself is fairly well tested and there's little risks we would accidentally break the rpm.

What I would suggest would be to move it inside of its own workflow file, and use a trigger to only build it on PRs that touch the relevant files (scripts/actions/build-deb & its dependent workflows ), using the paths modifier. Then in the release workflow we would add a new step that would also run it and put it within the artifacts directory.

@Daniel15
Copy link
Member Author

Daniel15 commented Aug 23, 2019

What I would suggest would be to move it inside of its own workflow file, and use a trigger to only build it on PRs that touch the relevant files (scripts/actions/build-deb & its dependent workflows ), using the paths modifier.

This is a really good idea. Will do when I get a chance!

I was thinking of the nightly builds too, but now they can actually be scheduled nightly builds (max one per day) rather than just all master builds, and we can build all the packages only for the scheduled builds rather than for every PR and master commit.

@arcanis
Copy link
Member

arcanis commented Aug 24, 2019

I was thinking of the nightly builds too, but now they can actually be scheduled nightly builds (max one per day) rather than just all master builds, and we can build all the packages only for the scheduled builds rather than for every PR and master commit.

Note that nightly builds are a bit less important on the v2 (at least for the main bundle) because we will have yarn set version from sources, which will clone the repository and build a bundle fresh from master to use in a local project.

@Daniel15 Daniel15 changed the title [WIP] Build Debian package Build Debian package Aug 25, 2019
@Daniel15 Daniel15 marked this pull request as ready for review August 25, 2019 02:06
@Daniel15
Copy link
Member Author

I think this is ready for review now, I just need to figure out how to make it run as part of the release. I've tested the package on Ubuntu 18.04 (current LTS), Ubuntu 19.04 (latest release), and CentOS 7.

@arcanis arcanis merged commit f533868 into yarnpkg:master Aug 25, 2019
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 12, 2022
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 12, 2022
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 12, 2022
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 12, 2022
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 12, 2022
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 13, 2022
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 13, 2022
@jj811208 jj811208 mentioned this pull request Oct 13, 2022
3 tasks
jj811208 added a commit to jj811208/berry that referenced this pull request Oct 15, 2022
arcanis pushed a commit that referenced this pull request Oct 24, 2022
* ci: delete snowpack e2e test

* ci: delete vue-cli e2e test

* revert: "Build Debian package (#379)"

This reverts commit f533868.

* fix: fixing erased files

Co-authored-by: merceyz <[email protected]>
merceyz added a commit that referenced this pull request Nov 3, 2022
* ci: delete snowpack e2e test

* ci: delete vue-cli e2e test

* revert: "Build Debian package (#379)"

This reverts commit f533868.

* fix: fixing erased files

Co-authored-by: merceyz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Features claimed by a contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants