AnarchyLinux / installer

Anarchy Linux - A simple and intuitive Arch Linux installer. https://anarchyinstaller.org/
GNU General Public License v2.0
1.22k stars 157 forks source link

duplicate variable #970

Closed yousefvand closed 4 years ago

yousefvand commented 4 years ago

Description

Duplicate variable assignment removed.

Affected issues

None

Pull request checklist

erazemk commented 4 years ago

Thanks :)

yousefvand commented 4 years ago

My pleasure. I've added Persian translation (in persian branch of my fork) but have no idea how to contribute because I don't have the test environment yet. Persian (Farsi) is a RTL language and for example works out of the box in konsole but not in GNOME terminal without hacks.

erazemk commented 4 years ago

Umm, I have no idea if RTL languages would work just like that in a terminal (not terminal emulator like konsole), but you can test your code by compiling the iso (by running compile.sh). Be warned though, that currently some AUR packages get compiled on your PC, so you might want to uninstall those after compiling. Once you have the iso generated, you can test it in QEMU (or Gnome Boxes - a frontend for QEMU).

If you want you can also submit a draft pull request so we can discuss the contribution.

yousefvand commented 4 years ago

I have a Mate on my laptop and by inspecting compile.sh found out it was written for someone with Arch Linux and there is no docker solution to this AFAIK. I'd prefer to contribute in that path (automating compilation) if its OK (and using Archiso idea instead of the way compile.sh is doing it to come up with a clean way of ISO compilation). Meanwhile I'd submit a draft PR.

erazemk commented 4 years ago

Yup, it only works on Arch atm, but you can still compile it, if you make an Arch VM in Boxes and then compile it in there (but to be fair, it is a lot of work to get the compiled iso out of the VM and UEFI most likely won't work - I'm saying this from experience).

I've been trying to make a Docker script a while back, but mounting an ISO is not really an option so that failed. If you have any experience with Archiso though, your help porting to it would be much appreciated.

yousefvand commented 4 years ago

I was thinking of a two step change in compilation process (correct me if I'm wrong): 1) Use the current method of ISO building but move it inside a docker container (which has the executables). This way developers could have any distro to build ISO but for testing generated ISO as you said a VM can be used i.e. VirtualBox. After building such a docker image one can spin a container while sharing project folder with it (so container can see project files as part of its FS and write ISO to host FS). 2) Use Archiso (I'm not sure yet if same level of customization is supported by this method). I deferred Archiso method since much more changes to code are needed that path.

erazemk commented 4 years ago
  1. Use the current method of ISO building but move it inside a docker container (which has the executables). This way developers could have any distro to build ISO but for testing generated ISO as you said a VM can be used i.e. VirtualBox. After building such a docker image one can spin a container while sharing project folder with it (so container can see project files as part of its FS and write ISO to host FS).

I tried doing this but my docker knowledge is pretty much non-existant so I had some trouble. If you can find a way to make this work it would be great. One thing though - preferably users would be able to compile the iso without root privileges, but the problem is that in compile.sh the archiso is mounted, which requires root privileges and afaik doesn't work in docker (but I might be wrong).

Here's the copy of a now deleted docker repo for Anarchy, with the Dockerfile I tried making, in case you want a reference or a place to start (of course you don't have to use it at all):

docker-master.zip

yousefvand commented 4 years ago

...but the problem is that in compile.sh the archiso is mounted, which requires root privileges

I assumed there are workarounds to run commands as root in the container. I'll update you it this way I was able to create a working ISO. Now I'm gonna spin up a lot of nested VMs in a server (the worst case would have 3 level depth :disappointed_relieved: )