2073 Commits

Author SHA1 Message Date
Juan Cruz Viotti
9c624e8e52
chore: move updates disabling logic out of the Makefile (#1939)
The Makefile current has logic to disable updates when building deb or
rpm packages. To make the Concourse pipeline transition easier, the
logic that disables updates on deb and rpm has been moved to the main
application code.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-05 11:51:33 -04:00
Juan Cruz Viotti
a7ff5c4583
chore: re-organize files inside assets/ (second try) (#1952)
Change-Type: patch
See: https://github.com/resin-io/etcher/pull/1941
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-05 11:45:07 -04:00
Juan Cruz Viotti
2291321b46 refactor(GUI): remove the intermediate child writer proxy process (#1910)
Etcher currently elevates a child writer proxy that itself spawns the
Etcher CLI in robot mode, parses the output, and proxies those messages
to the GUI application over IPC.

After these set of changes, Etcher elevates a single child writer
process that directly communicates back with the GUI using IPC. The main
purpose behind these changes is to simplify the overall architecture and
fix various issues caused by the current complex child process tree.

Here's a summary of the changes:

- Stop wrapping the Etcher CLI to perform writing
- Remove the robot option from the Etcher CLI (along with related
  documentation)
- Elevate a new `child-write.js` standalone executable
- Move the relevant bits of `lib/child-writer` to the `image-writer` GUI
  module
- Remove the `lib/child-writer` directory
- Add a new "Child died unexpectedly" Mixpanel event
- Floor state percentage in the flash state model

The above changes made is possible to tackle all the remaining issues
where the writer process would remain alive even if the parent died.

Change-Type: patch
Changelog-Entry: Ensure the writer process dies when the GUI application is killed.
See: https://github.com/resin-io/etcher/pull/1873
See: https://github.com/resin-io/etcher/pull/1843
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 20:46:09 +01:00
Juan Cruz Viotti
0ce2fca40a
minifix(GUI): run elevated process asynchronously on Windows (#1950)
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 14:17:38 -04:00
Jonas Hermsmeier
4a6955c173
fix(gui): Re-enable application menu (#1888)
* fix(gui): Re-enable application menu

This re-enables the application menu to allow for OS native shortcuts
to work again (i.e. hide/minimize window), which also allows us to
get rid of the global-shortcuts hack to prevent window reloads.

Change-Type: patch
Changelog-Entry: Fix disabled native OS window shortcuts

* refactor(gui): Update kbd shortcut comment to be less specific
2018-01-04 18:07:10 +01:00
Jonas Hermsmeier
fdfdcf915c
upgrade(package): Bump mountutils 1.2.2 -> 1.3.8 (#1946)
Change-Type: patch
2018-01-04 15:47:25 +01:00
Jonas Hermsmeier
222fd9de62
upgrade(package): Bump electron 1.7.9 -> 1.7.10 (#1947)
Electron changelog:

- Fixed crash in custom protocols
- Fixed webrtc crash
- Linux: Fixed subpixel font rendering with freetype
- Mac OS: Fixed rendering issues with Nvidia GPU on High Sierra
- Mac OS: Fixed incorrectly cropped TouchBar items

Change-Type: patch
2018-01-04 13:09:46 +01:00
Jonas Hermsmeier
1093881149
upgrade(package): Bump drivelist 5.2.4 -> 5.2.12 (#1945)
Change-Type: patch
2018-01-04 13:08:55 +01:00
Juan Cruz Viotti
cb876436d4 fix(shared): trailing space in Windows elevation env vars (#1949)
This is a strange one. On Windows, putting a space before the
double-ampersand command concatenator makes the environment variable
value contain a trailing space. So for something like `set foo=bar &&
...` the variable `foo` will be `'bar '` instead of `'bar'`.

Change-Type: patch
Changelog-Entry: Fix trailing space in environment variables during Windows elevation.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-04 12:47:10 +01:00
Benedict Aas
13758c9568
feat(GUI): remove angular from image-writer (#1680)
* feat(GUI): remove angular from image-writer

We remove Angular from the `image-writer` module by using Redux store
updates, subscribing to them while flashing.

Changelog-Entry: Remove Angular dependency from image-writer.
Change-Type: minor
2018-01-04 11:12:08 +00:00
Juan Cruz Viotti
52af3e8aa8
chore: re-organize files inside assets/ (#1941)
This is the file convention that Resin Concourse will use. I flattened
the directory for simplicity.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2018-01-02 08:11:43 -04:00
Juan Cruz Viotti
aeb850f4fb
chore: declare Concourse dependencies in package.json (#1938)
Resin Concourse will make sure to provide these during build time.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-29 09:51:38 -04:00
林博仁(Buo-Ren Lin)
3249af4eaa docs: Add WoeUSB as an alternative tool to burn Windows USB images(2)
Performing requested change, this commit is supposed to be squashed with the previous one.

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
2017-12-28 20:25:16 +08:00
林博仁
737b3be5be docs: Add WoeUSB as an alternative tool to burn Windows USB images
By far WoeUSB is one of the few applications that support Windows image
and runs on GNU/Linux so I assume it is worth to mention it.  Additional
line wrapping is made to comply to the code conventions.

Signed-off-by: 林博仁 <Buo.Ren.Lin@gmail.com>
2017-12-28 05:26:50 +08:00
Juan Cruz Viotti
3537848d3d
chore: make test npm script run everything we run on the CI services (#1937)
The idea is that the `test` command will replace the recently introduced
`concourse-test` script.

`concourse-test` will become simply a call to `test` for now to ensure
backwards compatibility while we update Resin Concourse.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-27 13:29:55 -04:00
Jonas Hermsmeier
5387bf19d9
fix(writer): Add EBUSY to transient errors on Linux (#1918)
Change-Type: patch
2017-12-21 18:06:25 +01:00
Juan Cruz Viotti
357f2183b5
chore: add Concourse related NPM scripts (#1933)
Our Electron Concourse pipeline is completely independent from the
application its testing (ie we can apply it to any other Electron app we
build with ease).

In order to keep such genericity, the application under test should
provide certain npm scripts that tell Concourse how to do specific tasks
on the repo, like install dependencies, in a build-system independent
fashion.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-20 16:06:09 -04:00
Juan Cruz Viotti
c586d9f54c
chore: get rid of npx (#1929)
We can live without it with a simple `PATH` trick at the top of the
Makefile (thanks @lurch!).

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-19 16:08:37 -04:00
Jonas Hermsmeier
abfa44a088 upgrade(package): Bump electron-builder 19.9.1 -> 19.40.0 (#1905)
Change-Type: patch
Connects To: #1914
2017-12-19 13:53:26 -04:00
Jonas Hermsmeier
5517beff80
fix(package): Fix noodled merge of shrinkwrap file (#1924)
Out of order squash merging resulted in some from-lines
not being removed in the npm-shrinkwrap.

Change-Type: patch
2017-12-15 22:32:36 +01:00
Jonas Hermsmeier
74c0c13fbd
feat(writer): Add read/write retry delays (#1919)
Change-Type: minor
2017-12-15 16:09:11 +01:00
Jonas Hermsmeier
b086e4c2a1
refactor(scripts): Update clean-shrinkwrap script (#1816)
* refactor(scripts): Update clean-shrinkwrap script

This updates the `postshrinkwrap` script to traverse the dependency tree
and remove all `from` fields to avoid inconsistent diffs across platforms,
environments and installs when shrinkwrapping anew.

* chore(shrinkwrap): Update npm-shrinkwrap.json

* fix(scripts): Ensure `resolved` field in shrinkwrap is HTTPS

* fix(scripts): Only strip "from" of registry packages

* fix(clean-shrinkwrap): Fix linter errors

* chore(shrinkwrap): Update npm-shrinkwrap.json

* fix(scripts): fix spelling typo

Change-Type: patch
2017-12-15 16:08:33 +01:00
Andrew Scheller
b45306487b
Fix small docs typo 2017-12-15 12:01:17 +00:00
Juan Cruz Viotti
f2c9404fc4
chore: setup a Spectron integration test suite (#1884)
- Add a `make test-spectron` target

- Install `spectron` and `mocha` (since we don't need to run the tests
  inside an Electron instance like in the case of `electron-mocha`)

- Add some example tests

Fixes: https://github.com/resin-io/etcher/issues/1870
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-13 13:51:16 -04:00
Juan Cruz Viotti
b703a6f5fb
feat(SDK): display Compute Modules even if host OS has no drivers (#1892)
This is the first step towards full usbboot Windows support. The driver
selector dialog will now display disabled devices to represent Compute
Modules even when Windows drivers are not installed to act on them.
These drives will state "Missing drivers."

Change-Type: minor
Changelog-Entry: Display connected Compute Modules even if Windows doesn't have the necessary drivers to act on them.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-13 13:37:34 -04:00
Juan Cruz Viotti
f8c3faec79
fix(GUI): only emit toggle drive event if drive is selectable (#1913)
Right now we emit "Toggle drive" analytics events even when clicking on
disable/unselectable drives.

The fix is to move the `analytics.logEvent` inside the code path that
applies if a drive selection is considered valid.

Change-Type: patch
Changelog-Entry: Don't send analytics events when attempting to toggle a disabled drive.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-09 16:57:12 -04:00
Juan Cruz Viotti
5432363aa1
chore(appveyor): build x86 on real x86 machines (#1912)
We do this by using Appveyor's `platform` configuration variable instead
of always running on x64 and cross-compiling to x86.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-08 09:57:16 -04:00
Juan Cruz Viotti
85c8cd6340 docs: add high level manual testing script (#1874)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-08 13:55:17 +01:00
Jonas Hermsmeier
4c00a25968
v1.2.1 (#1906) v1.2.1 2017-12-07 16:43:58 +01:00
Juan Cruz Viotti
b74347d21f chore: pass a dictionary to codespell.py (#1717)
The `-` option loads the default dictionary.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-06 12:58:30 +00:00
Jonas Hermsmeier
657142716c
fix(writer): Add missing read/write-retry handling (#1885)
This adds read- & write-retry handling of potentially temporary errors,
as well as errors due to device disconnection.

Change-Type: patch
Changelog-Entry: Fix handling of temporary read/write errors
2017-12-06 13:58:03 +01:00
Juan Cruz Viotti
618440e38f
fix(GUI): ensure settings are loaded before bootstrapping application (#1879)
We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.

In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.

Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-05 11:04:52 -04:00
Juan Cruz Viotti
19b7ce0668
upgrade: resin-corvus to v1.0.0-beta.31 (#1902)
This version contains a couple of patches to ensure that the Mixpanel
library doesn't send any HTTP request to api.mixpanel.com unless the
user enabled analytics.

- https://github.com/resin-io-modules/resin-corvus/pull/35
- https://github.com/resin-io-modules/resin-corvus/pull/36

See: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-05 11:04:23 -04:00
Jonas Hermsmeier
39401b3bfa fix(versionist): Ignore case of Change-Type value (#1847)
There's a commit that slipped in (sorry) with a capitalised
Change-Type value of "Patch". This avoids versionist erroring,
by always lowercasing that value.

Change-Type: PATCH
2017-12-05 09:40:32 -04:00
Benedict Aas
f22938030d minifix: hide drive selector hyphen when no size info (#1900)
We hide the separator hyphen between the name and size when there is no
size information available, in the drive selector modal.

Change-Type: patch
Changelog-Entry: Hide the drive-selector separator hyphen when no drive
size is available.
2017-12-04 19:11:07 -04:00
Andrew Scheller
a70935586b
chore(ci): Attempt to fix TravisCI OSX builds (#1897)
The `pip` command is now `pip2`

Change-Type: patch
2017-12-04 14:37:27 +00:00
Jonas Hermsmeier
b1abc79942
v1.2.0 (#1846) 2017-11-27 15:37:48 +01:00
Jonas Hermsmeier
69c3d61c28
fix(writer): Set flags manually to avoid verifying cache (#1875)
We change from using `rs+` to a composition of read/write,
exlusive, sync & direct i/o flags, in order to avoid reading
stale data from the cache during verification.

Change-Type: patch
Changelog-Entry: Fix verification step reading from the cache
2017-11-23 14:42:11 +01:00
Jonas Hermsmeier
4e891151f4
feat(writer): Display actual write speed (#1863)
As we've actually been displaying the read-speed in various
forms during the flashing process, this is a venture into
displaying the actual write-speed from the end of the pipeline.

Change-Type: minor
Changelog-Entry: Display actual write speed
2017-11-22 21:12:38 +01:00
Jonas Hermsmeier
8e79e9e459
upgrade(package): Bump sudo-prompt 6.1.0 -> 8.0.0 (#1861)
This updates `sudo-prompt` from v6.1.0 to v8.0.0

Changes:

- v8.0.0:
  - Breaking: Windows: Set code page of command batch script to UTF-8
- v7.1.1:
  - readme: explicitly mention that no child process is returned
- v7.1.0:
  - Detect when PowerShell fails to launch command
  - Escape ampersand and other characters special to PowerShell
- v7.0.0:
  - Add status code to error on Windows and macOS
- v6.2.0:
  - Rename OS X to macOS

Change-Type: patch
2017-11-22 21:12:04 +01:00
Jonas Hermsmeier
f9085667d1
fix(child-writer): Reduce env vars passed during elevation (#1872)
As we're not escaping env vars properly in `permissions.getEnvironmentCommandPrefix()`,
passing the entire environment along can cause another instance of the "stuck at starting"
problem, thus we limit the vars explicitly passed along again, keeping PATH and DEBUG.

Change-Type: patch
2017-11-22 17:56:10 +01:00
Jonas Hermsmeier
a35ac7613e
fix(writer): Use a core streams variant of unbzip2-stream (#1862)
This fixes pipage blowing up on unbzip2-stream because it's
based on through streams (which don't implement `.unpipe()`),
by utilizing a custom version based on core streams.

Change-Type: patch
Changelog-Entry: Fix bzip2 streaming with the new pipelines
2017-11-20 22:32:34 +01:00
Jonas Hermsmeier
ecedff2cdf
fix(writer): Fix verify size for unaligned images (#1868)
Change-Type: patch
2017-11-20 19:28:20 +01:00
Andrew Scheller
500af07689
chore: add some more typos to the dictionary (#1864)
As spotted in #1858 and #1717

Change-type: patch
2017-11-18 16:09:32 +00:00
Jonas Hermsmeier
6779e15872
fix(writer): Emit checksum event when verifying bmaps (#1859)
Due to the Blockmap.FilterStream not emitting a "checksum"
event (as it individually verifies specified ranges), the
flashing process would get stuck on finish.

This emits a "checksum" event on "finish" when blockmapping,
averting this issue.

Change-Type: patch
2017-11-17 22:56:25 +01:00
Jonas Hermsmeier
b3b52fce62
fix(writer): Don't calculate checksum before block-stream (#1858)
The checksum-stream being situated in front of the block-stream, which
ensures block size alignment to multiples of 512, and pads the last block,
caused the checksum to be incorrectly calculated for images where the last
block needed to be padded.

Change-Type: patch
2017-11-17 21:37:49 +01:00
Jonas Hermsmeier
0e02998faf
fix(gui): Re-enable printing progress in console (#1853)
Change-Type: patch
2017-11-17 14:36:21 +01:00
Jonas Hermsmeier
19275a5ba4
fix(gui): Disable outlines (#1854)
For the time being, the focus outlines are removed, until
we can improve the UX on this.

Change-Type: patch
2017-11-17 13:33:19 +01:00
Andrew Scheller
701893b472
fix(s3): Fix EAI_AGAIN error at startup with no internet connection (#1855)
Change-type: patch
2017-11-17 11:22:22 +00:00
Jonas Hermsmeier
66cb7293e7
fix(drive-scanner): Dynamically get unsafe mode setting (#1852)
Due to the SDK keeping it's options once initialized,
the unsafe mode setting change was not reflected on subsequent scans.

Change-Type: patch
2017-11-17 03:28:32 +01:00