zqqw / pakku

Pacman wrapper with AUR support
GNU General Public License v3.0
39 stars 3 forks source link

Arch binary building broken #15

Closed zqqw closed 2 years ago

zqqw commented 3 years ago

There seems to be a redirect to gitlab, and the existing method to clone the build info dir fails, extra debug printout shows command used, not yet sure what the replacement should be, suggestions welcome:

$ pakku -Sz hexedit
(0/1) cloning repositories                                                               --:-- [c o  o  o  o  o  o  o  o  o  o  o  o  o  o  o  o  o  o  ]   0%
/usr/bin/git -C /tmp/pakku-username clone  -q https://git.archlinux.org/svntogit/community.git -b packages/hexedit --single-branch hexedit
fatal: unable to update url base from redirection:
  asked for: https://git.archlinux.org/svntogit/community.git/info/refs?service=git-upload-pack
   redirect: https://gitlab.archlinux.org/explore/groups
(1/1) cloning repositories                                                               00:00 [--------------------------------------------------------] 100%
error: hexedit: failed to clone git repository
micwoj92 commented 2 years ago

https://github.com/zqqw/pakku/blob/19de8f005a7d16f2b0464cf5fef2169a73b86000/src/package.nim#L94

This probably needs to be changed to https://github.com/archlinux/svntogit-community and so on

zqqw commented 2 years ago

Yes, but it's not quite that easy, because the correct version PKGBUILD (this could be different even for the current version if someone was using testing vs stable repos) has to be extracted from the downloaded git repo, which needs a different method in the new system, but I can use parts of the new Artix code. And the files are in different locations in the resulting git checkout - the git repo is downloaded to /tmp/pakku-$USER then the relevant build dir once checked out at the right version is copied to the specified directory (./packagename by default.) Also Parabola repos are different again so I'm trying not to break the existing code paths for those. And it should be possible to get any version by specifying e.g. pakku -Sz nss=3.72-2 but I noticed that currently fails because it checks using libalpm if the package exists and also uses the version number if provided, which needs fixing too. Update: -Sz is now fixed for getting any version from the available PKGBUILD's, and for using Arch repos on Artix and Arch with these commits:

https://github.com/zqqw/pakku/commit/7a3a0e3084ccdd752f52f6752b1a0e4bd46b6466

https://github.com/zqqw/pakku/commit/5953917daceaf47850c3b4a5b7bab5073b55fe19

zqqw commented 2 years ago

Patch to fix -Sn builds - it seems to work OK so far but it's had minimal testing (like only in Artix, not even tried booting into Arch yet) and often I seem to find issues later! If you build something that needs pgp keys you might need to add extra keyservers to your gpg config file, if these can't be imported the build will fail, or perhaps you could edit the PKGBUILD but it's more secure to import them if you can. Keyservers are more problematic recently after some especially helpful ones went offline. I also made the gpg part more verbose for debugging and will probably leave it like that because if there was a problem it didn't give any clue what was going on as it was before. Edit: that part of the output might not be very helpful after all. And although it still seems to be working OK it can't do alternate versions so that needs fixing. Update & edit, 14th January 2022, barring finding any last minute problems, this could well be the final patch that is committed soon for -Sn, AFAIK it's working properly and you can specify the version as detailed in the updated man page: (patch got committed)

zqqw commented 2 years ago

Closed by https://github.com/zqqw/pakku/commit/22678d286cd381763694a16643128d3f4a6451da