Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include git, or gcc, or something like static-get #59

Closed
brandonros opened this issue Mar 9, 2017 · 13 comments
Closed

Include git, or gcc, or something like static-get #59

brandonros opened this issue Mar 9, 2017 · 13 comments

Comments

@brandonros
Copy link

No description provided.

@bauen1
Copy link
Contributor

bauen1 commented Mar 10, 2017

Have a look at: https://www.archlinux.org/packages/extra/x86_64/git/ git depends on a lot of things, how should such a bundle be handled ?

@brandonros
Copy link
Author

brandonros commented Mar 10, 2017 via email

@ivandavidov
Copy link
Owner

ivandavidov commented Mar 10, 2017

@brandonros - Minimal Linux Live is mostly an educational tool. The whole idea of the project is to present the basics of the infrastructure which is required for the building of Linux based operating system. Anything beyond that scope is just a nice to have feature.

Packing Git or any other software which requires a lot of dependencies is a problem which has no easy solution. Therefore, it is not at all simple to add such software in MLL. You may try to track all the dependencies (e.g. issue the ldd command on the executable and recursively apply the same command on all found dependent objects until you are done) but in this case you will end up with so much dependencies that it would have been much easier to start with Ubuntu Mini for example or any other distribution with minimal installation.

I like the idea of static-get. I'll give it a try and if it works I may add it as overlay bundle in the future. In fact, considering that the front-end of static-get is a simple shell script, you could try to add it in the default overlay structure by yourself. All you need to do is to download the latest static-get shell script and put it in the default overlay folder.

Example:

# Step 1 - Provide the static-get shell script as part of the default overlay structure
wget http://raw.githubusercontent.com/minos-org/minos-static/master/static-get
mkdir minimal_overlay/rootfs/bin
mv static-get minimal_overlay/rootfs/bin
chmod +rx minimal_overlay/rootfs/bin/static-get

# Step 2 - Build MLL
sh build_minimal_linux_live.sh

The above build procedure should generate new MLL ISO image which contains the static-get shell script in the /bin folder. You should be able to use the static-get command from any location when you boot MLL since the /bin folder is described in the default PATH.

@ivandavidov
Copy link
Owner

I created a PoC (proof of concept) build of MLL which includes the static-get script. It turned out that it doesn't work out of the box due to issues with the BusyBox version of wget. While I was working on that I also found a bug which prevented the MLL user to use both overlay bundles and stuff from the default overlay folder. It was either/or situation. It's fixed now.

Regarding static-get - it is a very promising project which will integrate well with MLL. Once there is working wget in MLL (i.e. not the default one which comes with BusyBox) you can install pretty much anything but not all static-get packages work out of the box. For example, Git currently requires you to explicitly disable the remote TLS/SSL certificate check. It's an easy fix but you have to provide it manually. Other packages don't work due to issues with the default terminal. I have no solution for this at the moment.

One more thing - static-get doesn't really install anything. It just downloads and extracts the package in some folder. After that it's up to the user to install the files/folders from the package like this:

# Assuming we are currently in MLL shell.

# Kind of install something with 'static-get'
static-get -x some-package

# Enter the 'some-package' folder.
cd some-package-v1.2.3

# Copy/install the package structure in the root folder.
cp -r * /

I won't be developing my PoC stuff for now (and I should have done it in separate Git branch). Perhaps @bauen1 will be ready with his overlay bundle for static-get in the near future.

@ivandavidov
Copy link
Owner

Yet another way to install the software that you want - just navigate to the static-get archive, browse through the available repositories, download the archive that you want and finally create new overlay bundle or just place the extracted content in the default overlay folder.

Actually this is the better way to get more mature version of wget. Instead of relying on static-get to obtain it, we can manually (i.e. via the build scripts) download & extract the wget package and include it as part of the static-get overlay bundle.

@the-djdj
Copy link
Contributor

the-djdj commented Sep 2, 2019

I came across this issue a few days back just after I discovered this project. I immediately set about trying to resolve it when I discovered it had already been done, and works as expected. I therefore have two questions;

  1. Are there immediate plans to incorporate a way to actually install the downloaded packages?
  2. If not, does this issue still need to be open?

I am a great fan of this project, and look forward to helping out where I can.

@ivandavidov
Copy link
Owner

There is no immediate plan. You are welcome to implement the installation phase if you want to and I'll be happy to merge it in the project. Apart from that, perhaps you are right that this issue doesn't have to be in "open" state at all, since the software in MLL is mostly provided by overlay bundles.

@the-djdj
Copy link
Contributor

the-djdj commented Sep 3, 2019

I'll take a look at implementing the installation phase. I have a bit of time off from my studies coming up!

@the-djdj
Copy link
Contributor

the-djdj commented Sep 4, 2019

So I've managed to get installing working by adding a -i flag to the static-get command. I've submitted a pull request to the upstream, but in the meantime I've redirected the overlay bundle to download my fork. I'm submitting a pull request now.

@ivandavidov
Copy link
Owner

@the-djdj - thanks a lot! I tested your solution and it works as expected. Some of the packages require additional packages (e.g. you have to install 'terminfo' before you use some other package) but that's expected, due to the nature of static-get.

However, additional documentation changes are required, or otherwise people won't know that they can add more software at runtime. The main README has to be enhanced, along with the other internal documentation files (config file, src/README, etc.).

@the-djdj
Copy link
Contributor

As an FYI, you can now specify an install location using static-get -i -p <location> <package>.

@ivandavidov
Copy link
Owner

Are you planning to propose your changes in the official "static-get" project?

@the-djdj
Copy link
Contributor

the-djdj commented Sep 16, 2019

My changes have been merged in, I'm just waiting on the original download link to update.

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

No branches or pull requests

4 participants