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
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
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
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
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
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
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
If the speed is zero, the eta becomes Infinity, which isn't transmitted
properly over IPC for at this time unknown reasons.
To prevent the "Missing state eta" error from popping up when the speed is
zero, we set the eta to zero as well in those cases.
Change-Type: Patch
This adds handling for cases where the writer child process
exits due to reception of a signal, while also adjusting some peripherals,
like the IPC socket directory and inherited process environment.
Another addition is that the child process is explicitly killed
should an error arise on the IPC.
Change-Type: patch
This implements a new way of image write streaming under use of pipage and blockmap, which paves the way for a few things like using network locations as sources, and imaging of storage devices (aka backups). As it allows for mutation of the streaming pipeline while it's writing, it also facilitates the development of dynamic block-mapping.
Change-Type: minor
Various GNU/Linux distributions require root access to be able to open
USB devices. This means that Etcher would need to be ran as root, which
is now not possible on Wayland based systems.
We declare usbboot as unsupported on GNU/Linux from the time being, but
we are currently working on a solution.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
For usability purposes. We get a high volume of support requests from
GNU/Linux newbies that get deeply confused about setting execution
permissions.
This reverts commit b2d3d0ecb8eadd14593c3b7587775d1ac4b5475e.
This implements an SDK.Scanner which handles any given
adapters and manages the scans. This change enables continuous
scanning without the need to `.scan()` scheduling in other places.
Change-Type: minor
This works around the "Cannot fetch index base URL http://pypi.python.org/simple/"
error by installing pip==9.0.1 directly from the pypi.python.org/packages/
Change-Type: patch
We fix the DEBUG environment variable by setting it on the `electron.remote`
instead, and we also move the code to `lib/gui/app.js` and away from
`lib/gui/index.html`.
Changelog-Entry: Set the DEBUG environment variable on the remote
electron process.
Change-Type: patch
* use debug.enabled, fix drivelist env setting
* fix: set debug env variable on remote electron process
* feat(GUI): use tabindex and focus to navigate
We make navigating with the tab key easier by highlighting focused
elements more visibly, adding `tabindex` attributes to elements, and
making `open-external` links respond to keyboard events.
Change-Type: minor
Changelog-Entry: Improve tab-key navigation through tabindex and visual improvements.
Connects-To: https://github.com/resin-io/etcher/issues/1734
* outline with 10s timeout
* use orange "warning colour" as outline
* smaller outline on settings buttons, fix order on settings page
* allow selection in drive-selector
* fix typo, better tabindexes
This is a workaround to prevent the USB device from disappearing after
the file server phase, until the resulting block device comes up.
By adding a delay after the file server phase, we prevent the USB
scanner from getting triggered again, therefore keeping the current USB
device visible in the drive selector modal.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit re-architects the usbboot adapter to prepare the drives in
the background, while emitting scan results every 2s, where each drive
has a `progress` percentage property.
Change-Type: minor
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We prompt the user with a sudo-prompt upon launch on Linux-based systems
to ensure the program has enough permissions for features needed
throughout the program's runtime.
Changelog-Entry: Add a sudo-prompt upon launch on Linux-based systems.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* refactor(SDK): make adaptor scan functions event based
This change will allow us to start emitting progress events out of the
adaptors scan functions.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
* refactor(sdk): Make adapters event emitters
We show a progress bar for any drive objects with a `progress` field
that isn't falsy, e.g. `undefined` or `0`.
Changelog-Type: minor
Changelog-Entry: Add optional progress bars to drive-selector drives.
The combination of bus number and device address is the only way to
uniquely identify a USB device, so we'll use that for the `device` and
`raw` properties.
Also, we store the USB vendor and product IDs as properties of the
drives, since they will be handy when implementing the prepare function.
Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Consider the following scenario:
- Usbboot runs successfully on a device
- Before the block device gets a chance to appear, we run usbboot again
If we're fast enough, usbboot will try to claim the device interface,
but then the drive might not be there anymore, causing a
`LIBUSB_ERROR_NO_DEVICE`.
This commit addresses that scenario, and simply ignores the drive.
Change-Type: patch
Changelog-Entry: Fix `LIBUSB_ERROR_NO_DEVICE` error at the end of usbboot.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
We currently ship with `bootcode.bin` and `start.elf` from the Raspberry
Pi Foundation, which provide a writing speed of about 6 MB/s. This PR
includes new boot files by resin.io that boost the speed to ~20 MB/s.
Change-Type: minor
Changelog-Entry: Increase the flashing speed of usbboot discovered devices.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit handles errors that can come up when unplugging the drive
halfway through the process. After tons of experimentation, the errors
than seem to occur are:
- `LIBUSB_TRANSFER_CANCELLED`
- `LIBUSB_ERROR_NO_DEVICE`
When these errors happen, we can omit the drive, and also not try to
close it, since given the device is no longer there, the close operation
bails out with a strange error message.
Change-Type: patch
Changelog-Entry: Gracefully handle scenarios where a USB drive is disconnected halfway through the usbboot procedure.
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>