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

upgrade(package): Bump electron-builder 19.9.1 -> 19.40.0 #1905

Merged
merged 8 commits into from
Dec 19, 2017

Conversation

jhermsmeier
Copy link
Contributor

@jhermsmeier jhermsmeier commented Dec 5, 2017

Change-Type: patch
Connects To: #1914

@jhermsmeier
Copy link
Contributor Author

This currently fails for deb packages due to

{:timestamp=>"2017-12-05T17:06:10.361199+0000", :message=>"Process failed: tar failed (exit code 2). Full command was:[\"tar\", \"-C\", \"/tmp/package-dir-staging-8abc4590f5fcbb8ef993da8fef97ba2aa9169d2c54a24f906c4da425a75a\", \"-I'/etcher/node_modules/7zip-bin/7x.sh'\", \"--numeric-owner\", \"--owner\", \"0\", \"--numeric-owner\", \"--group\", \"0\", \"-cf\", \"/tmp/package-deb-build-f194c570b6596c408446b22df37210ba51e03b9d6a4b2d491ca71786153b/data.tar.xz\", \".\"]", :level=>:error}

@lurch
Copy link
Contributor

lurch commented Dec 5, 2017

This introduces a massive chunk of changes to npm-shrinkwrap.json - perhaps I'm being overly conservative, but does that mean we ought to do a bit of extra testing before release, just to make sure this doesn't accidentally break anything?

@jhermsmeier
Copy link
Contributor Author

jhermsmeier commented Dec 5, 2017

This isn't actually even working for deb packages atm; and I haven't gotten it to work so far, let alone figured out what exactly is causing fpm to explode

@@ -12,6 +12,10 @@ RUN echo "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted
RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
<% } %>

# Workaround: Install a newer version of `tar` to make fpm in electron-builder work again
RUN echo "deb http://ftp.de.debian.org/debian wheezy main contrib non-free" >> /etc/apt/sources.list
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just use http://ftp.debian.org/ as in the previous lines, rather than selecting the de-specific subdomain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -43,6 +47,10 @@ RUN apt-get update \
zip \
rpm

# Workaround: Install a newer version of `tar` to make fpm in electron-builder work again
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO these two 'Workaround' blocks should only be run in the architecture == 'i686' and architecture == 'x86_64' Dockerfiles - they're not needed in the architecture == 'armv7hf' Dockerfile as that uses a newer base-image and so the workaroud would actually downgrade the version of tar.

Copy link
Contributor

Choose a reason for hiding this comment

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

Something like

<% if (architecture == 'i686' || architecture == 'x86_64') { %>
...
<% } %>

should do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -14,7 +14,7 @@ RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/so

# Install dependencies
RUN apt-get update \
&& apt-get install -y \
&& apt-get install --force-yes -y \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really needed at this point?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope not anymore, removed

@@ -43,6 +43,12 @@ RUN apt-get update \
zip \
rpm

# Workaround: Install a newer version of `tar` to make fpm in electron-builder work again
RUN echo "deb http://ftp.de.debian.org/debian wheezy main contrib non-free" >> /etc/apt/sources.list
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we don't need the non-free. We can also try to remove contrib

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, libacl1 is on main

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@lurch
Copy link
Contributor

lurch commented Dec 6, 2017

Is the new assets/icons/256x256.png just a duplicate of the existing assets/icon.png? If that's the case, perhaps a neater solution would be to remove this new file, and instead add:

assets/icons/256x256.png: assets/icon.png
    cp $< $@

to the Makefile, and then list assets/icons/256x256.png as a dependency of those electron-builder rules that actually need it? (and that file should also then be deleted by the clean rule, and be added to .gitignore - and in fact these last two steps should probably be added for assets/osx/installer.tiff too)

EDIT: Hah, I guess the latest commit nullifies this comment ;-)

# Workaround: Install a newer version of `tar` to make fpm in electron-builder work again
RUN echo "deb http://ftp.debian.org/debian wheezy main" >> /etc/apt/sources.list
RUN echo "deb http://ftp.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list
RUN apt-get install --force-yes -y -t wheezy libacl1 && \
Copy link
Contributor

@lurch lurch Dec 6, 2017

Choose a reason for hiding this comment

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

Ah, you need an apt-get update between modifying sources.list and running apt-get install

Copy link
Contributor

Choose a reason for hiding this comment

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

...and perhaps this should be done in a single-step RUN command (just like the compiler-install step below), rather than as separate RUN commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking more:

RUN echo -e "deb http://ftp.debian.org/debian wheezy main\ndeb http://ftp.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list && \
  apt-get update && apt-get install --force-yes -y -t wheezy libacl1 && \
  apt-get install --force-yes -y -t wheezy-backports tar

But it probably makes little difference here.

@jhermsmeier jhermsmeier added this to the v1.2.1 milestone Dec 6, 2017
@jhermsmeier jhermsmeier mentioned this pull request Dec 6, 2017
14 tasks
@lurch
Copy link
Contributor

lurch commented Dec 6, 2017

Is it worth adding a note to the commit message about why we've put so much effort into upgrading electron-builder? (IIRC it's so that the hdiutil still works on the latest versions of OSX?)

@jviotti
Copy link
Contributor

jviotti commented Dec 15, 2017

@jhermsmeier Even though DMGs build fine, I get weird ABI issues when running this particular electron-builder version (and Concourse gets them as well). I started bisecting it a bit, and found that 19.40.0 works like a charm. Can we upgrade to that instead?

@lurch
Copy link
Contributor

lurch commented Dec 16, 2017

@jviotti out of curiosity, did you also try 19.49.0 ?

EDIT: Now that we've "solved" npm-shrinkwrapping, I wonder if electron-builder is going to become our new nemesis? ;-)

@jviotti
Copy link
Contributor

jviotti commented Dec 18, 2017 via email

@lurch
Copy link
Contributor

lurch commented Dec 18, 2017

Have you filed an upstream bug? ;)

@jhermsmeier
Copy link
Contributor Author

@jviotti can you post the relevant log of that ABI error?

@jviotti
Copy link
Contributor

jviotti commented Dec 19, 2017

@jhermsmeier The CI services are showing the exact error I get: https://travis-ci.org/resin-io/etcher/jobs/312464338#L2132

@jviotti
Copy link
Contributor

jviotti commented Dec 19, 2017

@lurch See electron-userland/electron-builder#2260. Apparently the solution is:

To avoid such errors in the future, we will get rid of NodeJS and this logic will reimplemented using Go.

@jhermsmeier
Copy link
Contributor Author

Oh, I see – that's because the module's been compiled against Electron's ABI, while being invoked by Node during the build step. One way to get around this would be to use the Node version corresponding to Electron's Node (v7.9.0 in Electron v1.7.9), but that's not something we want to do I think (our build process should ideally be fairly independent of Node version). I'll downgrade electron-builder to 19.40.0 for now then.

@lurch
Copy link
Contributor

lurch commented Dec 19, 2017

See electron-userland/electron-builder#2260

...which says "The rabin dependency was added as part of commit 1dc2e49, so 19.36.0 onward exhibit this issue. (19.35.1 works)" ??

@jviotti
Copy link
Contributor

jviotti commented Dec 19, 2017

@lurch Yeah, but that version hangs on High Sierra with 100% CPU usage when building the DMG :( 19.40.0 works like a charm from all sides. I say lets upgrade to that, and let electron-builder sort out the ABI problem. We will try again once they have a fix. @jhermsmeier what do you think? Lets try to get this merged soon so I can integrate Concourse without hanging all the jobs

@jviotti
Copy link
Contributor

jviotti commented Dec 19, 2017

I'll downgrade electron-builder to 19.40.0 for now then.

Ah, I missed that comment :D

@jviotti jviotti changed the title upgrade(package): Bump electron-builder 19.9.1 -> 19.47.1 upgrade(package): Bump electron-builder 19.9.1 -> 19.40.0 Dec 19, 2017
@jviotti jviotti merged commit abfa44a into master Dec 19, 2017
@jviotti jviotti deleted the bump-electron-builder branch December 19, 2017 17:53
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.

3 participants