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

Provide docker image and binary to help contributions. #83

Closed
amtoine opened this issue Jun 6, 2022 · 14 comments · Fixed by #92
Closed

Provide docker image and binary to help contributions. #83

amtoine opened this issue Jun 6, 2022 · 14 comments · Fixed by #92
Labels
enhancement New feature or request

Comments

@amtoine
Copy link
Contributor

amtoine commented Jun 6, 2022

This is simply to move the discussion from #80 to a separate issue, as #80 is almost closed with #81 being already merged and #82 being opened 😉

@b3nj5m1n b3nj5m1n added the enhancement New feature or request label Jun 6, 2022
@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Jun 6, 2022

For those coming to this issue without context, this is about providing a standalone, static binary instead of having to compile the haskell program yourself.


I've successfully tested this on a fresh LMDE install and in an arch linux live environment.

I'd like to get a few more people to try it out before I merge this into main just to be sure, so I'll ping some contributors who've worked with the configs or the Haskell codebase, if you could try it out and let me know if it works, that would be awesome, but obviously it's not a problem if you don't.

@a2n-s @Layerex @FranzXaver @Willenbrink @o0MURDOCK0o

It should be enough to just wget the file, make it executable and run the add subcommand to verify.

cd /tmp
wget https://github.com/b3nj5m1n/xdg-ninja/releases/download/v0.2.0.0/xdgnj
sudo chmod +x xdgnj
./xdgnj add

@b3nj5m1n b3nj5m1n pinned this issue Jun 6, 2022
@o0MURDOCK0o
Copy link

Just tested it and it works.

Tested it on:

  • Arch with Haskell
  • Arch without anything
  • Ubuntu WSL on Win 10

@Willenbrink
Copy link
Contributor

Just tested it too. Running the program works fine but in the end it throws an error related to the editor:
xdgnj: EDITOR: getEnv: does not exist (no environment variable)
Perhaps you could prompt for an editor instead of failing?

Besides that everything works. Looks good!

@amtoine
Copy link
Contributor Author

amtoine commented Jun 6, 2022

I check that tomorrow after work 😋

@amtoine
Copy link
Contributor Author

amtoine commented Jun 7, 2022

Oh wow, that is amazing @b3nj5m1n!!

works like a charm on my main production machine running ArchLinux with Haskell and cabal installed 👌
does not do anything on a pure vanilla ArchLinux virtual machine though 🤔

@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Jun 7, 2022

does not do anything on a pure vanilla ArchLinux virtual machine though

Is it failing to run, or is it crashing with some kind of error message?

Thanks for trying it btw!

@amtoine
Copy link
Contributor Author

amtoine commented Jun 7, 2022

Is it failing to run, or is it crashing with some kind of error message?

oh no it is doing nothing at all, no errors, no message at whatsoever

I wish I had something to show you 😆

@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Jun 7, 2022

Is it failing to run, or is it crashing with some kind of error message?

oh no it is doing nothing at all, no errors, no message at whatsoever

I wish I had something to show you 😆

Wow that's weird, is it just a vanilla arch install (base, linux, linux-firmware packages)?

I'll try to reproduce it.

@amtoine
Copy link
Contributor Author

amtoine commented Jun 7, 2022

Wow that's weird, is it just a vanilla arch install (base, linux, linux-firmware packages)?

it should be 🤔
i always keep a vanilla arch installation inside virtualbox for that kind of purpose!
there should not be that much things in it, maybe git and vim and obviously base-devel, linux and linux-firmware

I'll try to reproduce it.

tell me it there is anything to try out, now that archinstall is up and running, that is much easier to try things in a minute 💪

@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Jun 7, 2022

i always keep a vanilla arch installation inside virtualbox for that kind of purpose!
there should not be that much things in it, maybe git and vim and obviously base-devel, linux and linux-firmware

Same here, but it works without any problems on mine. Unfortunately, I don't know what could be causing this.

When you run file xdgnj, does it tell you that it's a statically linked binary? (i.e. xdgnj: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 3.2.0, BuildID[sha1]=6578699ea985b97f91577a9b738182f8d993d4c2, stripped)

@amtoine
Copy link
Contributor Author

amtoine commented Jun 7, 2022

Same here, but it works without any problems on mine. Unfortunately, I don't know what could be causing this.

forget about that, I just can't spell the URL and forgot the -fL flags on curl to notify me if the request fails...

now i can say interesting things about the binary 😊

  • ./xdgnj prev programs/vim.json complains about glow not being installed -> works fine after sudo pacman -S glow
  • ./xdgnj edit programs/vim.json complaints about EDITOR not being defined -> works fine after export EDITOR=vim
  • same with add and EDITOR

these look like normal "errors" to me 😉

@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Jun 7, 2022

Oh thank god.

Yes, those errors are expected. They could be handled better by giving a clear error message instead of just crashing the program, but for now I'm more concerned about the binary working.

Thanks a lot for your help!

@amtoine
Copy link
Contributor Author

amtoine commented Jun 7, 2022

Yes, those errors are expected. They could be handled better by giving a clear error message instead of just crashing the program, but for now I'm more concerned about the binary working.

definitely for another time! and it looks it is working 🙏

@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Jun 9, 2022

Not everybody has responded yet, but since there haven't been any problems so far, I think it's safe to merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants