Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Welcome?: Re-writing makeUSB.sh in Python 3 or 2+3? #247

Open
hartwork opened this issue Feb 18, 2019 · 7 comments
Open

Welcome?: Re-writing makeUSB.sh in Python 3 or 2+3? #247

hartwork opened this issue Feb 18, 2019 · 7 comments

Comments

@hartwork
Copy link

Hi!

I was wondering if you're open to re-writing makeUSB.sh in Python 3 or 2+3 or to review pull requests in that direction. It would include a test suite with close to 100% line coverage to protect against regressions and also PyPI integration to ease installation and free extra visibility. I'm aware there is Bats for Bash testing but Bash is not the best long term choice for non-trivial software aiming at waterproof error handling in my eyes(, and I do like Bash).

What do you think?

Best, Sebastian

@aguslr
Copy link
Owner

aguslr commented Mar 2, 2019

Hi, @hartwork!

I'm glad you enjoy the project enough to be willing to put some effort into porting to Python my hack of a script. 😄

I'll admit it was never meant to be more than an automated tool for several commands that should be run by hand. However, it seems that it has received more attention that it ever deserved and its shortcomings have come to light.

As an alternative, I would suggest creating its own project and using this one as a submodule or a subtree to pull the scripts. This way we can keep the focus on the scripts here, which is what the project is really about, and leave the configuration tool (be it a shell script or a Python one) as a separate repository.

I'll be glad to collaborate in any way I can (although Python is not my forte) and be sure to add a link in this project's README and documentation.

Keep me posted and thanks for your interest.

@probonopd
Copy link

probonopd commented Mar 2, 2019

Maybe it could even be rewritten purely in grub.cfg itself. The advantage would be that you could copy in a new ISO and without running any scripts it would be bootable immediately.

Check out
https://kanotix.com/files/fix/tmp/search-iso/custom.cfg

Seemingly GRUB can search for ISOs itself:
http://git.acritox.com/kanotix/commit/config/binary_grub/grub.cfg?id=6cf6a6fa203d2bbb9bb51fbe58ab7d4914dd2c45

So it looks like we can do without a static GRUB config:
https://kanotix.com/files/fix/kanotix-usb/

Reference:
probonopd/SystemImageKit#43

@aguslr
Copy link
Owner

aguslr commented Mar 2, 2019

@probonopd, what do you mean a solution written purely in grub.cfg? That'd only work after the pendrive is set up and GRUB is installed, while @hartwork is talking about the script for doing the set-up.

@probonopd
Copy link

Yes, one would of course still need a script that sets up GRUB initially. But that script would have to run just one time, and thereafter one could add ISO file after ISO file without having to re-run anything.

@aguslr
Copy link
Owner

aguslr commented Mar 2, 2019

That is already the case for ISOs that are supported. We are doing more or less what Kanotix is doing, only that their custom.cfg searches in all devices for different directories.

@probonopd
Copy link

Ah, didn't realize this 👍

@hartwork
Copy link
Author

hartwork commented Mar 4, 2019

Hi @aguslr ,

thinking more about a potential future, I consider these aspects key right now:

  • a single tool rather than two, i.e. keeping the Bash one or replacing it
  • getting good code coverage on that single tool
  • with increased bus factor, ideally

With that said, I'm not sure if there is a good way to get Bash covered in the sense of software testing line coverage, yet. If Python is not your thing, maybe there's another language that we could pick for a re-write that's not just "a sibling to Python", e.g. not Perl or Ruby. Compared to Bash and Python, there might be need for providing binaries with some other languages. How would you feel about Rust or Go? Other ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants