Giter VIP home page Giter VIP logo

popsicle's Introduction

Popsicle

Popsicle is a Linux utility for flashing multiple USB devices in parallel, written in Rust.

Build Dependencies

If building the GTK front end, you will be required to install the development dependencies for GTK and D-Bus, usually named libgtk-3-dev and libdbus-1-dev, respectively. No other dependencies are required to build the CLI or GTK front ends, besides Rust's cargo utility.

For those who need to vendor Cargo's crate dependencies which are fetched from Crates.io, you will need to install cargo-vendor, and then run make vendor.

Installation Instructions

A makefile is included for simply building and installing all required files into the system. You may either build both the CLI and GTK workspace, just the CLI workspace, or just the GTK workspace.

  • make cli && sudo make install-cli will build and install just the CLI workspace
  • make gtk && sudo make install-gtk will build and install just the GTK workspace
  • make && sudo make install will build and install both the CLI and GTK workspaces

Screenshots

Image Selection

Image Selection

Device Selection

Device Selection

The list will also dynamically refresh as devices are added and removed

GIF Demo

Device Flashing

Flashing Devices Flashing Devices

Summary

Summary

Translators

Translators are welcome to submit translations directly as a pull request to this project. It is generally expected that your pull requests will contain a single commit for each language that was added or improved, using a syntax like so:

i18n(eo): Add Esperanto language support

Translation files can be found here. We are using Project Fluent for our translations, which should be easier than working with gettext.

popsicle's People

Contributors

aanzel avatar adminxvii avatar aquaticcalf avatar booteille avatar brs17 avatar cassidyjames avatar coffeemakr avatar francarotti avatar fusaty avatar hallonmunken avatar hedw1gp avatar hugok79 avatar ids1024 avatar jackpot51 avatar luckyturtledev avatar ludovicobesana avatar mmstick avatar n3m0-22 avatar oymate avatar polypaul avatar raphipod avatar sopor avatar techguy16 avatar theassassin avatar toomoch avatar viktoron avatar xemwebe avatar xtibor avatar yorimirus avatar zbed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

popsicle's Issues

Use Faster Threading Primitives

crossbeam-channel versus std::sync::mpsc

parking_lot Mutex vs std Mutex

Higher values are better

- Running with 1 threads
- 1 iterations inside lock, 0 iterations outside lock
- 3 seconds per test
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |  60402.850 kHz |  61753.175 kHz |   1350.325 kHz
std::sync::Mutex     |  46016.558 kHz |  46626.734 kHz |    610.176 kHz
pthread_mutex_t      |  53268.642 kHz |  53359.425 kHz |     90.782 kHz
- Running with 2 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |  29672.847 kHz |  35965.545 kHz |   6629.604 kHz
std::sync::Mutex     |   4099.018 kHz |   4642.389 kHz |    626.056 kHz
pthread_mutex_t      |   7086.428 kHz |   7230.676 kHz |    196.112 kHz
- Running with 3 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |  19867.183 kHz |  24563.728 kHz |  10232.785 kHz
std::sync::Mutex     |   4136.010 kHz |   4175.220 kHz |     73.005 kHz
pthread_mutex_t      |   5045.504 kHz |   5090.151 kHz |     81.731 kHz
- Running with 4 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |  14809.114 kHz |  17544.133 kHz |   7808.036 kHz
std::sync::Mutex     |   2118.016 kHz |   2125.304 kHz |     24.925 kHz
pthread_mutex_t      |   3104.926 kHz |   3142.101 kHz |     51.442 kHz
- Running with 5 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |  11326.408 kHz |  13043.124 kHz |   6007.196 kHz
std::sync::Mutex     |   1675.045 kHz |   1702.958 kHz |     91.218 kHz
pthread_mutex_t      |   2285.452 kHz |   2316.768 kHz |    116.759 kHz
- Running with 6 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |   9424.928 kHz |  12319.226 kHz |   5667.318 kHz
std::sync::Mutex     |   1258.374 kHz |   1271.011 kHz |     34.273 kHz
pthread_mutex_t      |   1770.459 kHz |   1773.616 kHz |     68.696 kHz
- Running with 7 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |   7887.535 kHz |  10105.100 kHz |   4147.824 kHz
std::sync::Mutex     |   1043.273 kHz |   1038.135 kHz |     22.699 kHz
pthread_mutex_t      |   1482.260 kHz |   1473.764 kHz |     40.721 kHz
- Running with 8 threads
        name         |    average     |     median     |    std.dev.   
parking_lot::Mutex   |   6739.492 kHz |   8044.099 kHz |   2204.661 kHz
std::sync::Mutex     |    890.111 kHz |    889.019 kHz |     13.639 kHz
pthread_mutex_t      |   1273.654 kHz |   1271.624 kHz |     23.562 kHz

parking_lot RwLock vs std RwLock

Higher values are better

- 1 iterations inside lock, 0 iterations outside lock
- 3 seconds per test
parking_lot::RwLock  - [write]      0.000 kHz [read]  52719.563 kHz
seqlock::SeqLock     - [write]      0.000 kHz [read] 236922.089 kHz
std::sync::RwLock    - [write]      0.000 kHz [read]  28657.696 kHz
pthread_rwlock_t     - [write]      0.000 kHz [read]  34604.594 kHz
- Running with 0 writer threads and 2 reader threads
parking_lot::RwLock  - [write]      0.000 kHz [read]  49628.359 kHz
seqlock::SeqLock     - [write]      0.000 kHz [read] 448663.138 kHz
std::sync::RwLock    - [write]      0.000 kHz [read]   7430.355 kHz
pthread_rwlock_t     - [write]      0.000 kHz [read]  10277.398 kHz
- Running with 0 writer threads and 3 reader threads
parking_lot::RwLock  - [write]      0.000 kHz [read]  48633.633 kHz
seqlock::SeqLock     - [write]      0.000 kHz [read] 668788.347 kHz
std::sync::RwLock    - [write]      0.000 kHz [read]   7526.618 kHz
pthread_rwlock_t     - [write]      0.000 kHz [read]   8301.649 kHz
- Running with 0 writer threads and 4 reader threads
parking_lot::RwLock  - [write]      0.000 kHz [read]  47424.554 kHz
seqlock::SeqLock     - [write]      0.000 kHz [read] 852084.755 kHz
std::sync::RwLock    - [write]      0.000 kHz [read]   7550.919 kHz
pthread_rwlock_t     - [write]      0.000 kHz [read]   6467.605 kHz
- Running with 1 writer threads and 0 reader threads
parking_lot::RwLock  - [write]  58991.526 kHz [read]      0.000 kHz
seqlock::SeqLock     - [write]  58952.036 kHz [read]      0.000 kHz
std::sync::RwLock    - [write]  30732.579 kHz [read]      0.000 kHz
pthread_rwlock_t     - [write]  34976.304 kHz [read]      0.000 kHz
- Running with 1 writer threads and 1 reader threads
parking_lot::RwLock  - [write]  60365.084 kHz [read]   2504.651 kHz
seqlock::SeqLock     - [write]  45803.276 kHz [read]   9734.377 kHz
std::sync::RwLock    - [write]    651.436 kHz [read]    601.020 kHz
pthread_rwlock_t     - [write]   4062.541 kHz [read]   4624.594 kHz
- Running with 1 writer threads and 2 reader threads
parking_lot::RwLock  - [write]  58498.529 kHz [read]   2530.441 kHz
seqlock::SeqLock     - [write]  36707.296 kHz [read]  22981.270 kHz
std::sync::RwLock    - [write]    156.200 kHz [read]   2048.605 kHz
pthread_rwlock_t     - [write]   2916.363 kHz [read]   5380.056 kHz
- Running with 1 writer threads and 3 reader threads
parking_lot::RwLock  - [write]  54709.932 kHz [read]   4259.414 kHz
seqlock::SeqLock     - [write]  31652.296 kHz [read]  20743.579 kHz
std::sync::RwLock    - [write]    108.414 kHz [read]   3471.831 kHz
pthread_rwlock_t     - [write]   1710.729 kHz [read]   4729.281 kHz
- Running with 1 writer threads and 4 reader threads
parking_lot::RwLock  - [write]  41931.769 kHz [read]  12514.711 kHz
seqlock::SeqLock     - [write]  27640.776 kHz [read]  31556.929 kHz
std::sync::RwLock    - [write]     42.332 kHz [read]   5662.952 kHz
pthread_rwlock_t     - [write]   1207.303 kHz [read]   4606.489 kHz
- Running with 2 writer threads and 0 reader threads
parking_lot::RwLock  - [write]  62614.957 kHz [read]      0.000 kHz
seqlock::SeqLock     - [write]  53983.536 kHz [read]      0.000 kHz
std::sync::RwLock    - [write]   7533.987 kHz [read]      0.000 kHz
pthread_rwlock_t     - [write]   8383.159 kHz [read]      0.000 kHz
- Running with 2 writer threads and 1 reader threads
parking_lot::RwLock  - [write]  58545.375 kHz [read]   2638.517 kHz
seqlock::SeqLock     - [write]  40492.168 kHz [read]  13461.550 kHz
std::sync::RwLock    - [write]    366.482 kHz [read]   1644.005 kHz
pthread_rwlock_t     - [write]   5472.980 kHz [read]   2835.566 kHz
- Running with 2 writer threads and 2 reader threads
parking_lot::RwLock  - [write]  57471.938 kHz [read]   1715.004 kHz
seqlock::SeqLock     - [write]  34525.371 kHz [read]  25672.695 kHz
std::sync::RwLock    - [write]    156.684 kHz [read]   1933.383 kHz
pthread_rwlock_t     - [write]   3300.043 kHz [read]   3011.416 kHz
- Running with 2 writer threads and 3 reader threads
parking_lot::RwLock  - [write]  48778.401 kHz [read]   7428.756 kHz
seqlock::SeqLock     - [write]  27742.067 kHz [read]  34696.893 kHz
std::sync::RwLock    - [write]    107.839 kHz [read]   3248.390 kHz
pthread_rwlock_t     - [write]   2314.413 kHz [read]   3457.917 kHz
- Running with 2 writer threads and 4 reader threads
parking_lot::RwLock  - [write]  47613.610 kHz [read]   7328.761 kHz
seqlock::SeqLock     - [write]  29363.052 kHz [read]  36264.828 kHz
std::sync::RwLock    - [write]     40.587 kHz [read]   5667.128 kHz
pthread_rwlock_t     - [write]   1754.821 kHz [read]   3544.354 kHz
- Running with 3 writer threads and 0 reader threads
parking_lot::RwLock  - [write]  61451.173 kHz [read]      0.000 kHz
seqlock::SeqLock     - [write]  48341.429 kHz [read]      0.000 kHz
std::sync::RwLock    - [write]   8349.189 kHz [read]      0.000 kHz
pthread_rwlock_t     - [write]   8228.863 kHz [read]      0.000 kHz
- Running with 3 writer threads and 1 reader threads
parking_lot::RwLock  - [write]  57919.760 kHz [read]   1144.595 kHz
seqlock::SeqLock     - [write]  36219.542 kHz [read]  15650.754 kHz
std::sync::RwLock    - [write]    223.381 kHz [read]    367.214 kHz
pthread_rwlock_t     - [write]   4946.966 kHz [read]   1472.755 kHz
- Running with 3 writer threads and 2 reader threads
parking_lot::RwLock  - [write]  52903.982 kHz [read]   4711.847 kHz
seqlock::SeqLock     - [write]  31673.358 kHz [read]  27105.980 kHz
std::sync::RwLock    - [write]    161.620 kHz [read]   2055.015 kHz
pthread_rwlock_t     - [write]   3474.153 kHz [read]   2317.335 kHz
- Running with 3 writer threads and 3 reader threads
parking_lot::RwLock  - [write]  49773.336 kHz [read]   5466.810 kHz
seqlock::SeqLock     - [write]  28000.003 kHz [read]  39288.238 kHz
std::sync::RwLock    - [write]    108.594 kHz [read]   3280.566 kHz
pthread_rwlock_t     - [write]   2682.776 kHz [read]   2661.312 kHz
- Running with 3 writer threads and 4 reader threads
parking_lot::RwLock  - [write]  48860.565 kHz [read]   5279.842 kHz
seqlock::SeqLock     - [write]  27043.554 kHz [read]  46468.848 kHz
std::sync::RwLock    - [write]     40.954 kHz [read]   5691.570 kHz
pthread_rwlock_t     - [write]   2152.390 kHz [read]   2724.305 kHz
- Running with 4 writer threads and 0 reader threads
parking_lot::RwLock  - [write]  58395.404 kHz [read]      0.000 kHz
seqlock::SeqLock     - [write]  42643.841 kHz [read]      0.000 kHz
std::sync::RwLock    - [write]   5878.185 kHz [read]      0.000 kHz
pthread_rwlock_t     - [write]   6334.077 kHz [read]      0.000 kHz
- Running with 4 writer threads and 1 reader threads
parking_lot::RwLock  - [write]  54407.372 kHz [read]   3683.116 kHz
seqlock::SeqLock     - [write]  32643.727 kHz [read]  18531.820 kHz
std::sync::RwLock    - [write]    249.974 kHz [read]    424.784 kHz
pthread_rwlock_t     - [write]   4633.299 kHz [read]   1162.709 kHz
- Running with 4 writer threads and 2 reader threads
parking_lot::RwLock  - [write]  53071.442 kHz [read]   3500.791 kHz
seqlock::SeqLock     - [write]  28644.046 kHz [read]  31088.420 kHz
std::sync::RwLock    - [write]    167.455 kHz [read]   1930.530 kHz
pthread_rwlock_t     - [write]   3521.325 kHz [read]   1799.898 kHz
- Running with 4 writer threads and 3 reader threads
parking_lot::RwLock  - [write]  49381.039 kHz [read]   5024.164 kHz
seqlock::SeqLock     - [write]  27936.083 kHz [read]  40144.285 kHz
std::sync::RwLock    - [write]    110.427 kHz [read]   3190.550 kHz
pthread_rwlock_t     - [write]   2833.992 kHz [read]   2096.695 kHz
- Running with 4 writer threads and 4 reader threads
parking_lot::RwLock  - [write]  39091.665 kHz [read]   2887.356 kHz
seqlock::SeqLock     - [write]  16447.604 kHz [read]  34305.151 kHz
std::sync::RwLock    - [write]     38.380 kHz [read]   5781.112 kHz
pthread_rwlock_t     - [write]   2350.162 kHz [read]   2278.875 kHz

Popsicle fails to compile with "error[E0308]: mismatched types"

Distribution (run cat /etc/os-release): Void Linux

Related Application and/or Package Version (run apt policy $PACKAGE NAME): Popsicle, latest git commit. (r202.e714aab)

Issue/Bug Description: Compiling Popsicle errors with

   Compiling popsicle_gtk v0.2.0 (https://github.com/pop-os/popsicle#e714aab4)
error[E0308]: mismatched types
  --> /home/caleba/.cargo/git/checkouts/popsicle-7ad9519ffbbd5284/e714aab/gtk/src/app/widgets/dialogs.rs:23:15
   |
23 |             | path.map(|p| dialog.set_current_folder(p));
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: consider using a semicolon here
   |               |
   |               expected (), found enum `std::option::Option`
   |
   = note: expected type `()`
              found type `std::option::Option<bool>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: failed to compile `popsicle_gtk v0.2.0 (https://github.com/pop-os/popsicle#e714aab4)`, intermediate artifacts can be found at `/tmp/cargo-installdq73uK`

Caused by:
  could not compile `popsicle_gtk`.

Steps to reproduce (if you know): Run cargo install --git https://github.com/pop-os/popsicle popsicle_gtk, failure on step 153: Compiling popsicle_gtk v0.2.0 (https://github.com/pop-os/popsicle#e714aab4)

Expected behavior: Popsicle compiles without error and successfully runs.

Other Notes: While I have all the dependecies listed on the README installed, this AUR comment suggests I might need other packages installed. Even with xorgproto installed it still fails however.

Compiling 0.1.5 works, but results in a single binary, muff, which appears to CLI only.

Writing image bigger than USB

Distribution (run cat /etc/os-release):
NAME="Pop!_OS"
VERSION="18.04 LTS"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
popsicle:
Installed: 0.1.5152600532318.049254724
Candidate: 0.1.5
152600532318.049254724
Version table:
*** 0.1.5152600532318.04~9254724 1001
1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
100 /var/lib/dpkg/status

Issue/Bug Description:
Popsicle allows writing a bigger image than the capacity of the USB without warning the user.

Expected behavior:
A prompt should appear saying that this operation cannot be done since the size of the image is bigger than the USB.

Rename

I know we talked about renaming to something else (Pop! USB Flasher? Popsicle?), so we should:

  • Decide what that's going to be, then
  • Rename the repo, and
  • Find/replace any relevant bits in the project

Implement parallel streamed reads & writes of images

Problem

Currently, the popsicle lib works by flashing an Arc'd buffer of the entire contents of an ISO in memory at once. This requires that the program must load the entire image into memory in advance. For systems with little memory, or for images that are too great in size, the program would be killed by the kernel, or the image would be sent to swap.

Solution

We may implement a mechanism so that only portions of the image may be buffered at a time, if we use a single-consumer, multi-producer channel with smaller Arc'd buffers which are read on an as-needed basis. The bus crate provides the Bus type which can broadcast these buffers to receiving threads.

Other implications

  • This could be used to move some more logic from the GTK & CLI frontend into the lib.
  • It could be done in a generic fashion, so it would be useful in situations beyond flashing devices
    • In one example, it could be used to take a large disk image and parallel flash that image to other disks. Instead of small flash drives, you could image entire systems.
    • In another, it could be used to read from a source file, and then parallel write that file to multiple locations, locally or remotely.

Flasher cannot find image file if the extension is uppercase

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="18.04 LTS"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

popsicle:
  Installed: 0.1.5~1560357257~18.04~3d3d410
  Candidate: 0.1.5~1560357257~18.04~3d3d410
  Version table:
 *** 0.1.5~1560357257~18.04~3d3d410 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
popsicle-gtk:
  Installed: 0.1.5~1560357257~18.04~3d3d410
  Candidate: 0.1.5~1560357257~18.04~3d3d410
  Version table:
 *** 0.1.5~1560357257~18.04~3d3d410 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:
Popsicle GUI file browser does not show image file (.iso) if the extension is in upper case (.ISO)

Steps to reproduce (if you know):

  1. Start Popsicle GUI
  2. Click on the "Choose Image" button and browse to a folder which you know contains an .ISO file (.iso image with extension in uppercase)
  3. Wonder why Popsicle is not showing the image, which you can clearly see in your file browser.

Expected behavior:
Popsicle file browser should not care whether the extension of image files are upper or lower case. The file should be visible in the browser if it ends in \.(ISO|iso)$

Some possible UI improvments

Looking at the GTK interface for Popsicle, it seems pretty simple and intuitive, but it seems like some UI elements could be a little bit clearer. I can think of a few things that could perhaps be improved:

  • The "check" button for the checksum is at the bottom right, and in the same style as the next button. At first glance, it's easy to expect this is the button to go to the next step.
  • When selecting a USB drive to write to, the capacity of the drive isn't shown. Though it looks like DevicesView does at least show when the drive is too small for the image. Seeing capacity listed can make it clearer that the device is the one the user expects.
  • When flashing, a transfer rate is shown, with a progress bar. It could be useful also see how many bytes out of what total has been transfer, and perhaps an ETA. This could made it a bit more cluttered, but these a fairly common things to display in such a context.

Popsicle freezes when clicking next with image selected

Distribution (run cat /etc/os-release):

aaronhoneycutt@pop-os:~/Downloads$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="18.04 LTS"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 18.04 LTS"
VERSION_ID="18.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

aaronhoneycutt@pop-os:/Downloads$ apt policy popsicle-gtk
popsicle-gtk:
Installed: 0.1.5
153088976718.042ba9db3
Candidate: 0.1.5153088976718.042ba9db3
Version table:
*** 0.1.5
153088976718.042ba9db3 1001
1001 http://ppa.launchpad.net/system76/pop/ubuntu bionic/main amd64 Packages
100 /var/lib/dpkg/status

Issue/Bug Description:

The application freezes after an image is selected and then clicking Next

Steps to reproduce (if you know):

Expected behavior:

Other Notes:

log.txt

High CPU usage

Pop!_OS 18.04 (iso 12 with updates run)

top shows a >100% CPU usage when launching popsicle (on Bonobo 13 or Galago Pro 3). This is not during the writing of an image but just with the application open.

Show Device Names

Show device names from /sys/class/block

For example, when using /dev/sdd, the following files have useful information:

  • /sys/class/block/sdd/device/vendor
  • /sys/class/block/sdd/device/model

Improve Choose Image

  • Hide the open file dialog when an image is chosen, before loading the image
  • Show a loading spinner or progress bar after selecting image

popiscle-gtk using 100% CPU while waiting for iso

I was downloading an ISO to flash on a USB when I noticed the fan spinning louder than I've ever heard it before. I checked top to see if someone was using the CPU. popiscle-gtk came in first with 100% of the CPU being used.

Internal drive recognized as USB device

Internal hard drive is being recognized as a usb device making the -a flag not work properly.

Error message:

unmounting '/dev/disk/by-path/pci-0000:00:14.0-usb-0:12:1.0-scsi-0:0:0:0': "/dev/sdc1" is mounted at "/media/[redacted]/Pop_OS 17.10 amd64"
muff: error opening disk '/dev/disk/by-path/pci-0000:00:14.0-usb-0:14:1.0-scsi-0:0:0:0': No medium found (os error 123)

Disks info of drive:
disks

Any idea why this is going on?

Hash Box widget layout is strange, causing theming issues

The layout for the .hash-box class is a bit strange, which causes its children to be drawn very weirdly by Gtk:

screenshot from 2018-05-07 10-24-08

Notice how there is no shadow, and none of the corners are rounded.

Linked widgets in Pop have rounded corners on the outside widgets, and straight corners on the middle widgets. To allow the theme to do this automatically, the GtkComboBox and GtkEntry children of the hash box should be contained within a separate horizontal box with the .linked style class added. This will allow the theme to automatically round the correct corners.

Additionally, it looks like the hash box needs about 6 px of padding added to ensure that the shadows don't get cut off.

Remove Sidebar

I think something got lost in translation from mockups to code. There should not be a sidebar UI going on, as it's extra UI that doesn't do anything.

The idea with the window contents layout is to mimic the Gtk+ dialog style, as seen here:

image

zenity --info --text="<b>Here is some text</b>\n\nThis is fairly standard Gtk+ dialog style."

"Select all" checkbox should be bound to the selection state of the drives

  1. If I uncheck "Select all", it should deselect all drives
  2. If I uncheck a drive in the list, "Select all" should switch to the mixed state (inconsistent property)

From the GNOME HIG: https://developer.gnome.org/hig/stable/check-boxes.html.en#guidelines

If the check box represents a setting in a multiple selection that is set for some objects in the selection and unset for others, show the check box in its mixed state. When a check box is in its mixed state:

  • Clicking the box once should check the box, applying that setting (when confirmed) to all the selected objects.

  • Clicking the box a second time should uncheck the box, removing that setting (when confirmed) to all the selected objects.

  • Clicking the box a third time should return the box to its mixed state, restoring each selected object’s original value for that setting (when confirmed).

Feature request: Add ability to continue flashing different images after first one is complete

Distribution (run cat /etc/os-release):
Pop!_OS 18.04

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
popsicle-gtk

Issue/Bug Description:
As someone who uses popsicle quite a lot to image a number of different images, after writing an image to an external drive, I currently have to close the application and then relaunch it to image another drive with a different image.

I can imagine a button in the top left (opposite from the "Close" button) that would go back to the "choose an image" page.

Invalid MIME type

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="19.04"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 19.04"
VERSION_ID="19.04"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

popsicle:
  Installed: 0.1.5~1560357257~19.04~3d3d410
  Candidate: 0.1.5~1560357257~19.04~3d3d410
  Version table:
 *** 0.1.5~1560357257~19.04~3d3d410 1001
       1001 http://ppa.launchpad.net/system76/pop/ubuntu disco/main amd64 Packages
        100 /var/lib/dpkg/status

Issue/Bug Description:

Recently started getting this error while updating the system (I could probably pinpoint when, but it would take some time)

Error in file "/usr/share/applications/com.system76.Popsicle.desktop": ""application/x-cd-image" is an invalid MIME type (""application" is an unregistered media type)
Error in file "/usr/share/applications/com.system76.Popsicle.desktop": """ is an invalid MIME type (""" does not contain a subtype)

Comparing to other .desktop files, I noticed others don't have the quotation marks around their MIME types, so I removed them manually and the error is gone (probably until the next update)

Steps to reproduce (if you know):

Run a system update from the terminal (apt update && apt upgrade)

Expected behavior:

No errors

Other Notes:

"Next" button has incorrect text after "Flash Again"

Distribution (run cat /etc/os-release):
Pop!_OS 19.04

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
popsicle 0.1.5-1555345739-19.04-8ed85d6

Issue/Bug Description:
After flashing a drive once the button in the top right says "Done". After selecting "Flash Again", the button in the top right continues to say "Done" even though on the first run that button said "Next". The button should only say "Done" on the last page after flashing is complete.

Creating bootable USB devices from Windows 10 ISOs

There's a request from time to time for the ability to flash USB devices with a Windows 10 ISO. Yet since Windows 10 ISOs are not hybrid, they require special setup.

  1. Wipe the labels on the device
  2. Format the device as NTFS
  3. Mount the newly-formatted device
  4. Mount the ISO
  5. Decompress & extract the ISO's contents to the mounted USB device

Disable FLASH button if no device is selected

I accidentally clicked the NEXT button twice and triggered the FLASH button, which is in the same location on the final screen.
The action was triggered without me selecting any device to flash the ISO, so the app was stuck on the final screen with no action running, and no way to go back.
I'd suggest disabling the FLASH button if no device has been selected.
Also, a confirmation message before proceeding would add a layer of security in case of accidental clicks.
Great little app!

.back → .back-button class

My bad in the spec. The proper class is .back-button, not .back to add a back arrow to the button. As a note, this class should only be present on the devices page (when the button says, "Back"). Otherwise, it's just a normal button.

Install Location

By default the Makefile for popsicle installs popsicle-gtk at /usr/local/bin/popsicle-gtk but popsicle-pkexec expects popsicle-gtk to located to /usr/bin/popsicle-gtk. Is there a reason why in the Makefile prefix is /usr/local by default when other code seems to assume /usr or is this a bug?

Ideally, the GUI should not be run as root

The .desktop file calls popsicle-pkexec, which executes pkexec /usr/bin/popsicle-gtk. This runs the GUI code as root.

This isn't a huge issue; in theory it should be secure, and GTK seems to handle it fairly gracefully, with the program using the same GTK theme as the running user, etc. But I think this would generally be discouraged, though I can't find a quote from upstream Gnome/GTK specifically saying that.

I suppose the proper solution would be to spawn another process, given root access through polkit, that is seperate from the GUI. It could be a wrapper around he current CLI, perhaps.

Error 127 on install from cloned repo

Distribution (run cat /etc/os-release):
Manjaro Linux

Related Application and/or Package Version (run apt policy $PACKAGE NAME):
Cloned popsicle repo

Issue/Bug Description:
cargo build --manifest-path gtk/Cargo.toml --release
make: cargo: No such file or directory
make: *** [Makefile:118: target/release/popsicle-gtk] Error 127

on make && sudo make install

Steps to reproduce (if you know):
Clone the repo, sudo make && sudo make install

Expected behavior:
I'd assume the command should install popsicle

Hash freezes the application

Reproduce

  1. Open Popsicle
  2. Choose Image
  3. Change Hash type either to SHA256 or MD5

Outcome: Until it generates the Hash, the whole application freezes. We cant even move the window

  1. Assuming we previously had selected SHA256, select MD5 now
  2. Application freezes again
  3. Reselect SHA256

Outcome: Application again freezes, and i guess it tries to re-generate the hash, when it already knows it from previous generation

The "freeze" is for 3-4 seconds, so it is not unnoticeable

Drag and Drop Support

It should be possible to drag an ISO directly into the image view to designate it as the ISO to flash with.

Popsicle does not show in Pop!_Shop

On both Pop!_OS 17.10 and 18.04 you can't find Popsicle by searching for it in Pop!_Shop. I believe this might be missing appstream data.

Currently you can only install it with a terminal and this command:

sudo apt install popsicle-gtk

Run GUI as normal user

This places popsicle in the right context to allow them to browse for an ISO. Upon flashing, launch a command line executable with pkexec and use a pipe to read the status for each drive back into the GUI.

Feature Request: In-app SHA 256 sum verification

gtkhash (https://github.com/tristanheaven/gtkhash) has a nice feature where you can copy/paste the reference SHA 256 sum and verify it against the image you downloaded.

screenshot from 2019-02-25 08-38-31

The workflow in gtkhash is:

  1. Select an image under File
  2. Paste the reference SHA 256 sum under Check:
  3. Click Hash in the bottom right corner
  4. It shows the calculations happening in the bottom bar
  5. If the SHA 256 sum matches, a check mark shows on the right under SHA 256

This would be a nice feature to add to Popsicle.

[gtk] Duplicates when revisiting devices

When on the device selection page, if you select all, then go back to the image selection page, then go forward and select all again, each flash drive will be added twice.

Move spacing from CSS to properties

Any time we're using padding or margin in CSS, we should probably move to setting the margin properties on the widgets themselves instead. This makes it much easier to prototype and use the GTK inspector.

Local build instructions

It would be useful to add local development and building instructions to the README so others can contribute.

GTK3 Progress

I might could pull it off in a short time frame, if you'd like to have a GTK3 interface, in addition to the CLI.

Rendered usb media not working using CLI version

Distribution (run cat /etc/os-release):

NAME="Pop!_OS"
VERSION="19.10"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Pop!_OS 19.10"
VERSION_ID="19.10"
HOME_URL="https://system76.com/pop"
SUPPORT_URL="http://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=eoan
UBUNTU_CODENAME=eoan
LOGO=distributor-logo-pop-os

Related Application and/or Package Version (run apt policy $PACKAGE NAME):

Package files:
100 /var/lib/dpkg/status
release a=now
1001 http://ppa.launchpad.net/system76/pop/ubuntu eoan/main i386 Packages
release v=19.10,o=LP-PPA-system76-pop,a=eoan,n=eoan,l=Pop!_OS PPA,c=main,b=i386
origin ppa.launchpad.net
1001 http://ppa.launchpad.net/system76/pop/ubuntu eoan/main amd64 Packages
release v=19.10,o=LP-PPA-system76-pop,a=eoan,n=eoan,l=Pop!_OS PPA,c=main,b=amd64
origin ppa.launchpad.net
500 http://ppa.launchpad.net/mmstick76/ion-shell/ubuntu eoan/main i386 Packages
release v=19.10,o=LP-PPA-mmstick76-ion-shell,a=eoan,n=eoan,l=ion-shell,c=main,b=i386
origin ppa.launchpad.net
500 http://ppa.launchpad.net/mmstick76/ion-shell/ubuntu eoan/main amd64 Packages
release v=19.10,o=LP-PPA-mmstick76-ion-shell,a=eoan,n=eoan,l=ion-shell,c=main,b=amd64
origin ppa.launchpad.net
500 http://ppa.launchpad.net/fontforge/fontforge/ubuntu eoan/main i386 Packages
release v=19.10,o=LP-PPA-fontforge-fontforge,a=eoan,n=eoan,l=FontForge,c=main,b=i386
origin ppa.launchpad.net
500 http://ppa.launchpad.net/fontforge/fontforge/ubuntu eoan/main amd64 Packages
release v=19.10,o=LP-PPA-fontforge-fontforge,a=eoan,n=eoan,l=FontForge,c=main,b=amd64
origin ppa.launchpad.net
500 http://ppa.launchpad.net/agornostal/ulauncher/ubuntu eoan/main i386 Packages
release v=19.10,o=LP-PPA-agornostal-ulauncher,a=eoan,n=eoan,l=Ulauncher,c=main,b=i386
origin ppa.launchpad.net
500 http://ppa.launchpad.net/agornostal/ulauncher/ubuntu eoan/main amd64 Packages
release v=19.10,o=LP-PPA-agornostal-ulauncher,a=eoan,n=eoan,l=Ulauncher,c=main,b=amd64
origin ppa.launchpad.net
500 http://apt.pop-os.org/proprietary eoan/main all Packages
release v=19.10,o=system76,a=eoan,n=eoan,l=System76,c=main,b=all
origin apt.pop-os.org
500 http://apt.pop-os.org/proprietary eoan/main amd64 Packages
release v=19.10,o=system76,a=eoan,n=eoan,l=System76,c=main,b=amd64
origin apt.pop-os.org
100 http://us.archive.ubuntu.com/ubuntu eoan-backports/universe i386 Packages
release v=19.10,o=Ubuntu,a=eoan-backports,n=eoan,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
100 http://us.archive.ubuntu.com/ubuntu eoan-backports/universe amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-backports,n=eoan,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/universe i386 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/universe amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/multiverse i386 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=multiverse,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/multiverse amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=multiverse,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/restricted amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=restricted,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/main i386 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=main,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-updates/main amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-updates,n=eoan,l=Ubuntu,c=main,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/universe i386 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/universe amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/multiverse i386 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=multiverse,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/multiverse amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=multiverse,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/restricted amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=restricted,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/main i386 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=main,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan-security/main amd64 Packages
release v=19.10,o=Ubuntu,a=eoan-security,n=eoan,l=Ubuntu,c=main,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/universe i386 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=universe,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=universe,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/multiverse i386 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=multiverse,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/multiverse amd64 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=multiverse,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/restricted i386 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=restricted,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/restricted amd64 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=restricted,b=amd64
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/main i386 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=main,b=i386
origin us.archive.ubuntu.com
500 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 Packages
release v=19.10,o=Ubuntu,a=eoan,n=eoan,l=Ubuntu,c=main,b=amd64
origin us.archive.ubuntu.com
Pinned packages:

Issue/Bug Description:

I tried to use popsicle cli (using i3) to put the latest 19.10 iso (intel) on
a usb stick. Everything went right during the process except that the rendered
usb stick was not usable at all. I was able to boot from it in the BIOS but
then I had an empty prompt with an infinite blancking underscore character.

The file structure on the usb key looks okay so I have no idea what's going on.
I did not used the check option (I never test my iso files, I know I'm bad :)).
When I switched back to the pop session however I used the GUI version, same
settings etc... and I was able to get a proper working usb stick using the
exact same iso.

I'm glad you guys provide us some nice tools (CLI and GUI) and I hope that
those infos could help to solve the issue...

Steps to reproduce (if you know):

Simply grab the latest intel iso and type in a shell $ popsicle /path/to/the/iso /path/to/the/usb/device
Wait until the shell prompt ask for new commands.
Reboot on the usb stick.
You're there!

SHA256SUM incorrectly calculated

Running sha256sum in the terminal vs popsicle has different results. Terminal matches the expected sum from the current Pop!_OS testing .iso pop-os_18.04_amd64_intel_12.iso

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.