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

Add minimal Electron dependencies #99

Merged
merged 4 commits into from
Dec 30, 2018
Merged

Conversation

malept
Copy link
Member

@malept malept commented Dec 27, 2018

Fixes #89.

@malept malept requested a review from fcastilloec December 27, 2018 10:09
@malept
Copy link
Member Author

malept commented Dec 27, 2018

Evidently I need to figure out how to put a newer version of RPM onto the CI worker.

Copy link
Collaborator

@fcastilloec fcastilloec left a comment

Choose a reason for hiding this comment

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

I once attempted to do this for a different project. But given that rpm has many dependencies, it's not easy at all. The best thing we can do is use a Docker image based on Ubuntu 18.04, which is an LTS version that has a newer rpm, or use a Fedora image.
As an alternative, we can use an older electron when testing (<= 1.4.1) so trash dependencies don't cause a problem. If so, we should export trashRequiresAsBoolean and test it given that all other tests will be based on older electron versions.

Many people might use this module with Travis to test their apps, or they might just be stuck in an older version of Ubuntu (<= 18.04). Making this module explicitly require rpm >= 4.13 will break a lot of the builds out there, including some of my own projects (will electron-forge be affected?). People can use an old version, but I believe that it's better if we make it compatible.
The best I can think of is checking which version of rpm is being used and produce a warning saying that trash dependencies won't be added to the required packages, which will let the module build the rpm. Not all apps using electron are going to need to manipulate files and use the trash dependencies, so not having them explicitly mention won't affect the majority of projects out there.

Ubuntu Trusty will stop being supported next April; hopefully, Travis will add support for Bionic when this happens (rather than just keep Xenial-only images), in which case we won't need the warning anymore.

@malept
Copy link
Member Author

malept commented Dec 28, 2018

The best I can think of is checking which version of rpm is being used and produce a warning saying that trash dependencies won't be added to the required packages, which will let the module build the rpm. Not all apps using electron are going to need to manipulate files and use the trash dependencies, so not having them explicitly mention won't affect the majority of projects out there.

👍 this is what I did.

will electron-forge be affected?

Yes. That's the main reason why I'm backporting a "good" version of RPM. Forge always runs against the latest stable version of Electron,and I'd rather not have the warning in CI. I've successfully built RPM 4.13.0.1 on xenial, I just need to remember how to publish a PPA.

Copy link
Collaborator

@fcastilloec fcastilloec left a comment

Choose a reason for hiding this comment

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

The only required change is adding that sentence to the README, the others can be fixed here or in another PR since they are dependent on changes to -common module

Regarding the PPA, that's a great idea. I remember I created a apt repository for some installers, but never a PPA. Let me know when you've done it, I would love to use it on some of my other projects

README.md Show resolved Hide resolved
src/dependencies.js Show resolved Hide resolved
src/installer.js Show resolved Hide resolved
@fcastilloec fcastilloec merged commit 80b40f2 into master Dec 30, 2018
@fcastilloec fcastilloec deleted the common-dependencies branch December 30, 2018 21:06
@malept
Copy link
Member Author

malept commented Jan 7, 2019

Let me know when you've done it, I would love to use it on some of my other projects

I don't remember if I updated on this front. I couldn't get a PPA working for whatever reason (no error messages on the Launchpad side), so I ended up making an Ubuntu repo on bintray.

@fcastilloec
Copy link
Collaborator

We haven't updated it on this module yet. Travis is still using rpm from the Ubuntu repos. We need to add your bintray repo to Travis to stop the warning messages.
It'll be great if we had a PPA, but any repo is fine. I also had some trouble with Launchpad so I host PPA on Github on the gh-pages branch. For any outside repo, we also need to add gpg keys for it.

@malept
Copy link
Member Author

malept commented Jan 7, 2019

We need to add your bintray repo to Travis to stop the warning messages.

I don't think it's necessary. It's not causing the builds to fail, and we're already running with DEBUG=electron-installer-redhat, which is a lot of noise to begin with.

For any outside repo, we also need to add gpg keys for it.

Yes, see: electron-userland/electron-forge-container@5847481

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.

2 participants