3350 Commits

Author SHA1 Message Date
Juan Cruz Viotti
b8709d10c7 upgrade: drivelist to v5.1.4 (#1675)
Change-Type: patch
Changelog-Entry: Improve Windows drive detection error codes.
See: https://github.com/resin-io-modules/drivelist/pull/204
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-07 08:10:38 -07:00
Jonas Hermsmeier
762d570f8b refactor(gui): Only enable full debug output on demand (#1600)
This disables full wildcard debug output by default now,
leave the possibility to manually enable selective debug output
via the `DEBUG` environment variable.

Change-Type: patch
2017-08-07 07:56:28 -07:00
Jonas Hermsmeier
a2f1ddddb5 fix(svg-icon): Handle DOMParser parsererrors (#1663)
This checks for `parsererror`s in the DOMParser's returned document,
to prevent re-use of the previous image and avoid displaying an error
document in the SVG icon slot.

Change-Type: patch
Changelog-Entry: Avoid "broken" icon when selecting a zip image archive with invalid SVG.
2017-08-07 07:29:30 -07:00
Juan Cruz Viotti
b5b98cf392 chore: add type option to bintray publish script (#1670)
Used to not hardcode the architecture type, and to be able to
conditionally set the Bintray Debian headers.

See: https://github.com/resin-io/etcher/pull/1611#discussion_r131349440
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-06 19:56:17 -07:00
Juan Cruz Viotti
4827267af6 chore: add a publish-all make target (#1666)
The CI servers currently call `installers-all` to deploy snapshot
builds, however that target builds the installers, but doesn't call the
phony rules that actually publishes them.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 18:13:50 -04:00
Benedict Aas
de63d534c5 fix(GUI): make disabled svgs work in img tags (#1661)
SVGs are displayed through IMG tags, but these do not support CSS
`fill`, and as such we work around it with `opacity`.
2017-08-03 12:30:00 -04:00
Juan Cruz Viotti
269aafd625 fix(GUI): log known user errors when querying S3 for updates (#1655)
We send an HTTP request to S3 to determine the latest available version.
There are various error that can happen that we don't have control over
(like `ETIMEDOUT`).

The current approach is to whitelist certain errors and pretend there is
no update available, however this commit improves that whole situation.

Instead of swallowing these errors, we throw a user error from the
function that determines the latest available version. From the
application code, we check if that function throws a user error, and if
so, instead of showing it to the user, we log a mixpanel event and carry
on.

This change is motivated by the latest reporter error we can't do
anything about: `UNABLE_TO_GET_ISSUER_CERT_LOCALLY`.

Fixes: https://github.com/resin-io/etcher/issues/1525
Change-Type: patch
Changelog-Entry: Fix `UNABLE_TO_GET_ISSUER_CERT_LOCALLY` error at startup when behind certain proxies.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 10:23:34 -04:00
Juan Cruz Viotti
d8e31665a0 chore: follow standardjs guidelines (#1664)
- Extend the `standard` ESLint configuration
- Remove ESLint rules that are defined in the `standard` configuration
- Get rid of semi-colons

See: https://github.com/resin-io/etcher/pull/1657
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 09:01:54 -04:00
Juan Cruz Viotti
5c19b70e83 refactor: adhere mostly to StandardJS guidelines (#1657)
This commit changes the whole codebase to adhere to all StandardJS
guidelines rules except semicolons, since the removal of semicolons
affect pretty much all lines, and the final diff is very hard to follow
(and to assess other more involved changes).

In a nutshell:

- When using `function`, we now require a space before the opening
  parenthesis
- If a line with operators is broken into multiple lines, the operator
  should now go after the line break
- Unnecessary padding lines are now forbidden

There were also some minor things that the `standard` CLI caught that I
updated here.

See: https://standardjs.com
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-03 06:59:02 -04:00
Dhruv Paranjape
064c741e3f docs(README): Add documentation for rpm packages. (#1652) 2017-08-02 10:14:25 -04:00
Juan Cruz Viotti
f05b28218c fix: ignore EHOSTDOWN errors when querying S3 (#1654)
There's not much we can do if we can't connect to S3 to determine the
latest available versions when checking if we should show an update
notification dialog or not.

As with similar errors, lets swallow this particular one, and try again
the next time Etcher runs.

Change-Type: patch
Changelog-Entry: Fix `EHOSTDOWN` error at startup.
Fixes: https://github.com/resin-io/etcher/issues/1645
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-02 10:12:45 -04:00
Juan Cruz Viotti
4b4e6ea035 upgrade: drivelist to v5.1.3 (#1653)
This version contains the following fixes:

- Fix "Couldn't initialize the scanner: An unknown error occurred" error
- Fix "Couldn't scan the drives: An unknown error occurred" where there
  is a mounted virtual drive

See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Change-Type: patch
Changelog-Entry: Fix various drive scanning Windows errors.
Fixes: https://github.com/resin-io/etcher/issues/1646
Fixes: https://github.com/resin-io/etcher/issues/1639
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-02 10:12:27 -04:00
Juan Cruz Viotti
861b8a4450 fix(GUI): throw a user error if the user is not in the sudoers file (#1620)
Change-Type: patch
Changelog-Entry: Display a user-friendly error message if the user is not in the sudoers file.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 17:35:45 -04:00
Benedict Aas
70ad86534d feat(GUI): make size units closest relative (#1539)
We make the size units used the closest relative unit through a new
filter `closestUnit` replacing the old `gigabyte` filter.

Changelog-Entry: Round byte sizes to the more appropriate unit.

* remove filters folder

* new shrinkwrap, add to package.json

* test
2017-08-01 17:34:13 -04:00
Benedict Aas
7714e8b50a fix(GUI): make archive-embedded svgs work again (#1642)
We make the svg-icon component accept XML in its path argument to handle
archive-embedded SVG icons.

Changelog-Entry: Make archive-embedded SVG icons work again.
Fixes: https://github.com/resin-io/etcher/issues/1636
2017-08-01 12:34:06 -04:00
Juan Cruz Viotti
a63b6bf18c fix(CLI): pass required arguments to flashComplete message (#1630)
The `flashComplete` message takes the drive object and the image
basename as arguments. This was updated on the GUI, but causes the CLI
to throw an error upon completion.

Change-Type: patch
Changelog-Entry: Fix "imageBasename is not defined" error on the CLI.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 12:32:50 -04:00
moragues
70c79f6127 feat: support rpi-sdcard image file type (#1648)
Support the rpi-sdcard image file type output by Yocto for
the Raspberry Pi device.

Change-Id: Ia7e3aef0d90fdf21d373a560e6dd2b96e6b51da8
Changelog-Entry: Add support for `.rpi-sdcard` images.
2017-08-01 10:34:25 -04:00
Juan Cruz Viotti
de62b2e65c chore: publish development Bintray packages (#1611)
This commit includes several changes to adapt the CI configuration files
and Bintray publish script to perform development deployments.

- Move our Bintray details to the Makefile
- Deploy to a new Bintray component if `RELEASE_TYPE` is `snapshot`
- Call `publish-bintray-debian` and `publish-bintray-redhat` in the CI
  deployment script
- Call the Bintray deployment scripts for RPMs

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:29:09 -04:00
Juan Cruz Viotti
1103492193 refactor: address review comments from #1625 (#1647)
That PR was merged in a rush, so this is the follow-up commit addressing
the review comments made there.

See: https://github.com/resin-io/etcher/pull/1625
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:27:59 -04:00
Juan Cruz Viotti
fc3eeff1c9 refactor(GUI): make settings model setter asynchronous (#1597)
This is part of the process of implementing support for a configuration
file. We previously decoupled the Redux store from localStorage by
moving the logic that actually persists the data to localStorage to a
local-settings.js file, however the localStorage API is synchronous, so
it follows that at the moment, all functions that interact with are also
synchronous.

Moving to storing the settings to a file means turning all these
functions to promises, which we do in this commit, in order to not mix
the addition of the configuration file feature with the huge amount of
refactoring it requires.

See: https://github.com/resin-io/etcher/issues/1356
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:27:15 -04:00
Juan Cruz Viotti
205711da7e refactor(image-stream): parse xz and gzip metadata using a custom read function (#1590)
This commit refactors the xz and gzip image handlers to pass/use a
custom read function to be able to determine the uncompressed size, and
other needed metadata.

By using this function (which currently only uses the `fs` module), we
can implement support for getting the uncompressed size of compressed
files using HTTP Ranges.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-08-01 10:24:19 -04:00
Lucas Rangit MAGASWERAN
57709942a0 docs(README): add debian repository in one line (#1649)
For convenience, create the apt source file and add the repository in one line.

Signed-off-by: Lucas Magasweran <lucas.magasweran@ieee.org>
2017-07-31 16:06:25 -03:00
Juan Cruz Viotti
5e582ceb98 chore: use electron-builder default package names (#1609)
We're currently manually changing the names of the final packages
created by `electron-builder`. This commit makes Etcher use the default
package names that `electron-builder` picks for us.

The Windows final package names contain spaces, so I did keep the
`artifactName` entries for them, which now basically use what
`electron-builder` recommends, but use hyphens instead of spaces.

Change-Type: minor
See: https://github.com/resin-io/etcher/pull/1555
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-31 16:04:10 -03:00
Jonas Hermsmeier
25d50fed74 doc: Merge running locally into contributing guide (#1640)
As recently several people have been asking for things
that are described in `RUNNING-LOCALLY.md`, but couldn't be
found in the `CONTRIBUTING.md`, this consilidates the two into
one single resource to look for on how to get started developing.

Change-Type: patch
2017-07-31 17:24:33 +02:00
Jonas Hermsmeier
07ac2ecf4c doc: Add link to commit guidelines to contributing guide (#1641)
This adds a reference to the commit guidelines to the contributing guide.
Fixes #1494

Change-Type: patch
2017-07-28 12:44:15 +02:00
Juan Cruz Viotti
7908c39ef4
v1.1.1
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
v1.1.1
2017-07-25 09:50:24 -03:00
Juan Cruz Viotti
b64ef705e8 chore: use old custom build system to create AppImages (#1625)
electron-builder seems to ship with an older AppImages version that
doesn't play very well with the custom AppImages elevation system we
created.

More particularly, we can't execute custom binaries inside the mounted
AppImage given that the mount point seems to lose permissions, owner,
and group file information.

This commit goes back to our old custom build system just for AppImages,
until we properly solve the problem, which will likely involve updating
the AppImages version in electron-builder.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-25 09:47:33 -03:00
Jonas Hermsmeier
36664fb251 fix(writer): Use final size if it's not an estimation (#1587)
This avoids running into the "flashstate percentage above 100%" error again.

Change-Type: patch
Changelog-Entry: Prevent "percentage above 100%" errors on DMG images.
2017-07-24 16:54:02 -03:00
Andrew Scheller
fa8f8151f6 docs(PUBLISHING): fix Etcher forum link (#1626) 2017-07-24 19:55:34 +01:00
Andrew Scheller
bebedf1a50 chore: make distclean now deletes build directory too (#1624) 2017-07-24 13:12:46 -03:00
Juan Cruz Viotti
f53a0af150 upgrade: mountutils to v1.2.1 (#1623)
This version contains a fix to a set of very recurrent "Unmount failed"
macOS errors.

See: https://github.com/resin-io-modules/mountutils/pull/44
Change-Type: patch
Changelog-Entry: Fix most "Unmount failed" errors on macOS.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-24 09:36:31 -03:00
Juan Cruz Viotti
09bf430a1e chore: remove the concept of target and host platforms (#1610)
Its very unlikely that we will ever support cross platform builds. For
that reason, let's simplify the whole Makefile by removing the concept
of target and host platforms.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-23 23:33:05 -03:00
Juan Cruz Viotti
b221914a3d fix(GUI): properly pass error object to "Flash error" event (#1619)
Simply running `_.merge` on an Error object results in an empty plain
object `{}` being sent to Mixpanel/Sentry.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-23 23:32:50 -03:00
Juan Cruz Viotti
1d66794450 fix(windows): include local native modules in final asar (#1616)
Etcher has local native code that gets built to `build/`, but that's not
being included inside the final asar.

The fix is to manually add the `*.node` files inside `build/Release` by
adding the appropriate wilcard to the `files` section of
`electron-builder.yml`.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
v1.1.0
2017-07-21 09:10:46 -03:00
Juan Cruz Viotti
1563a2392d
v1.1.0
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-20 14:48:30 -03:00
Juan Cruz Viotti
a19b0e028f upgrade: drivelist to v5.0.27 (#1607)
This new version contains the following PRs that we're interested about:

- https://github.com/resin-io-modules/drivelist/pull/196

To reduce the amount of debug logging we produce (see
https://github.com/resin-io/etcher/pull/1600).

- https://github.com/resin-io-modules/drivelist/pull/195

To properly handle spawning EAGAIN errors.

Fixes: https://github.com/resin-io/etcher/issues/1578
Change-Type: patch
Changelog-Entry: Retry various times on EAGAIN when spawning drive scanning scripts.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-19 15:23:32 -03:00
Andrew Scheller
fa60a746a2 chore: fix typos in target-convert.sh (#1608) 2017-07-19 10:04:15 -03:00
Benedict Aas
227533a7f9 upgrade(package): update resin-corvus to 1.0.0-beta.28 (#1604)
Closes: https://github.com/resin-io/etcher/issues/1465
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 14:54:03 -03:00
Juan Cruz Viotti
4122e0bf1d refactor: move most models to lib/shared/ (#1596)
Now that the Redux store is no longer front-end dependent, we can move
most of the models to lib/shared. Currently, lib/shared is a mess, and
contains all sorts of functionality, however moving things out of the
GUI is the first step. Once we have everything decoupled, we can
organise all the code we have there.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 12:34:10 -03:00
Juan Cruz Viotti
3a42331875 fix(GUI): incorrect function call in FlashController (#1606)
This commit fixes a subtle issue where we are calling a non-existing
function of an error object, instead of using the exception reporter
module.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-18 11:47:26 -03:00
Juan Cruz Viotti
37b7ea3b0a refactor(image-stream): extract part of utils.js into mime.js (#1594)
This is a small refactoring commit that extracts the MIME related
function from utils.js into a new file called mime.js, and stores the
default image MIME type there as a constant, to avoid duplicating it in
multiple parts of the code.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-14 19:59:33 -04:00
Juan Cruz Viotti
a772877ae1 test(image-stream): move extraction timeout to a shared constant (#1599)
The image stream tests that extract images all have a 20s timeout, which
is manually set in all the suites related to extraction.

This commit extracts that number as a constant called DEFAULT_TIMEOUT.

See: https://github.com/resin-io/etcher/pull/1595
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-14 19:59:25 -04:00
Juan Cruz Viotti
76b6bdfd06 chore: cache ~/.pkg-cache in Travis CI and Appveyor CI (#1598)
Looks like pkg downloads node binaries from GitHub Releases, and GitHub
may impose a rate limiting if we download too many things from them in a
short period of time (likely to happen when there are many concurrent
PRs).

In order to mitigate this issue, this commit adds `$HOME/.pkg-cache`,
the directory where pkg stores node binaries, to the CI services cache.

See: https://github.com/resin-io/etcher/pull/1594
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-14 11:48:45 -04:00
Juan Cruz Viotti
2a8e91190c test(image-stream): increase DMG tests timeouts (#1595)
I caught an sporadic issue a couple of times, where the DMG tests would
exceed the default 2000ms mocha timeout. All the other image
decompression tests have a much higher timeout already, so this commit
adds the same timeout to the DMG tests file.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 17:41:44 -04:00
Juan Cruz Viotti
be8a638fce chore: pass --quiet to pip install (#1592)
This helps reduce a bit of output in the CI servers.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 16:15:03 -04:00
Juan Cruz Viotti
3e2da6a386 chore: cache electron-builder temporary files in macOS (#1591)
Our current Travis CI configuration caches temporary files created by
electron-builder, but only for GNU/Linux builds. In macOS, electron and
electron-builder store their cache at ~/Library/Caches, so we must cache
that as well.

This commit was motivated by the fact that most macOS builds are failing
for Electron package download timeouts.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 11:37:26 -04:00
Juan Cruz Viotti
ff547035be chore: only ignore top level directories in gitignore for some cases (#1588)
We accidentally added build/ to gitignore, causing any new files from
`scripts/build` to be ignored.

See: https://github.com/resin-io/etcher/pull/1547#discussion_r126790010
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 10:23:22 -04:00
Juan Cruz Viotti
ca9136d1cb chore: send analytics about package types (#1570)
This commit adds a `packageType` property to package.json, which is set
according to the package type of the Etcher target (e.g: dmg, nsis, deb,
etc).

This information is then sent to Mixpanel as the `packageType` property
of the "Application start" event.

Change-Type: patch
Changelog-Entry: Send anonymous analytics about package types.
Fixes: https://github.com/resin-io/etcher/issues/1328
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 10:13:56 -04:00
Juan Cruz Viotti
439be1c222 refactor(image-stream): rename file variable to imagePath (#1589)
This is a small initial step towards decoupling the image stream
handlers from the concept of a "file."

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-13 09:30:28 -04:00
Juan Cruz Viotti
77c60b91c6 upgrade: drivelist to v5.0.25 (#1574)
This version contains various improvements on the drive detection system
mainly on Windows. The improvements can be summarized as follows:

- Drivelist no longer spawns a .bat script to perform its job. This
  means that a lot of spawning related issues are now fixed

- Drivelist doesn't fetch drive sizes from WMI anymore, which was known
  to incorrectly report a very small size for certain drives, causing
  the famous "0.0 GB" Windows issues (see
  https://github.com/resin-io-modules/drivelist/issues/142)

- Cleanup temporary scripts after execution

This PR also sets the DRIVELIST_DEBUG environment variable to enable
debug information from Windows' drivelist implementation.

Change-Type: patch
Changelog-Entry: Implement Windows drive detection using C++
Changelog-Entry: Fix various Windows `.bat` spawning issues
Changelog-Entry: Fix 0.0 GB Windows drive detection issues
Changelog-Entry: Cleanup drive detection temporary scripts created for other operating systems
Fixes: https://github.com/resin-io/etcher/issues/1108
Fixes: https://github.com/resin-io/etcher/issues/1054
Fixes: https://github.com/resin-io/etcher/issues/995
Fixes: https://github.com/resin-io/etcher/issues/1483
Fixes: https://github.com/resin-io/etcher/issues/1142
Fixes: https://github.com/resin-io/etcher/issues/1571
See: https://github.com/resin-io-modules/drivelist/blob/master/CHANGELOG.md
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-07-12 15:18:05 -04:00