xdeb-org / xdeb

XDEB - Convert deb (Debian) packages to xbps (Void Linux)
MIT License
305 stars 16 forks source link

Automating the process (xdeb-install) #22

Open thetredev opened 1 year ago

thetredev commented 1 year ago

Hi, just wanted to make you aware that I wrote a wrapper to automate xdeb: https://github.com/thetredev/xdeb-install

If you have any suggestions for me, please let me know. Also, if you don't want to be involved in any way, also let me know. Thank you!

toluschr commented 1 year ago

First of all, sorry for my late reply and thank you for the effort you put into improving xdeb. I think xdeb-install has a lot of potential and don't mind being involved at all. Here are some suggestions that came to my mind while having a brief look at the source code:

  1. Specifications should provide a post_unpack or modify_destdir function to modify package contents for better compatibility
  2. The user should be able to specify either a file or a custom download url
  3. If a given package name does not have a specification, a default one be used instead (Requires 2.)
  4. xdeb-install needs more package specifications
  5. Your project could well be used to automate testing, if there will be future versions of xdeb
thetredev commented 1 year ago

Thanks for your feedback! Highly appreciated!

My code is probably not verbatim enough, but steps 2 and 3 should already be implemented. I'll see what I can do primarily about step 1, improving steps 2 and 3 as a secondary along the way. Step 4 will take the longest time obviously.

I'm working on it in my spare time, so I guess the best way of updating you with the progress is via this thread. Will keep you posted.

thetredev commented 9 months ago

I finally got around to working on it again. Since the whole package specification thing got a lot more complex than I expected, I rewrote the whole thing in Go, and I also created a separate repository to hold package specifications: https://github.com/thetredev/xdeb-install-repositories/

Nearly all your points are fixed in my opinion. Only one is missing is the first. Can you elaborate on post_unpack and modify_destdir? Thanks!

toluschr commented 9 months ago

Just tested it and must say, I'm quite impressed and I'll definitely be using the xdeb-install wrapper over xdeb in the future!

If I recall correctly, I meant that if a package provides lets say /usr/share/xyz/bin/xyz, the wrapper should be able to link/move it to /bin/xyz using a post_unpack "hook".

thetredev commented 9 months ago

Thank you for the feedback. Gotcha, I'm not sure if I can implement that right now, will probably take some time.

thetredev commented 9 months ago

Can you give me an example package to work with?