FS#67960 - [pacman] git-lfs protocol proposal.

Attached to Project: Pacman
Opened by bartus (bartus) - Monday, 21 September 2020, 20:45 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 21 September 2020, 22:30 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

I would like to propose an extra "git-lfs+" vcs protocol for makepkg.

I've noticed there was an issue with git-lfs repository lately in `openimagedenoise` package
@FFYOO response here: https://github.com/OpenImageDenoise/oidn/issues/76#issuecomment-640953648

I've extracted `git-lfs` protocol form my AUR/openimagedenoise-{develop,git} packages and push it to AUR as `makepkg-git-lfs-proto`.
It adds `{download,extract}_git-lfs` functions which are wrappers for `{download,extract}-git` with additional `git lfs {init,fetch}` calls.
https://aur.archlinux.org/packages/makepkg-git-lfs-proto
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=openimagedenoise-develop
It works fine, but has to be installed before calling `makepkg` (`makepkg -s` won't work as `download_sources` is called before `handle_deps` installs `makepkg-git-lfs-proto`)
Moreover it requires including `git-lfs::git-lfs` in VCSCLIENTS array in `makepkg.conf`.

It would work better if was merged in `pacman` (I've tried to push patch to `pacman-dev` but got rejected by pacman-dev-owner)

I've also investigate if it can be made transparent to package maintainers, by hiding `git lfs {init,fetch}` in `download_git` function.
It was confirmed by `git-lfs` devs that it can be easily determined if any refs has git-lfs object referenced, but this solution would require abusing VCSCLIENTS array by including two packages for git (VCSCLIENTS=('git::git','git::git-lfs')

https://github.com/bartoszek/pacman/blob/9e9acbc47bf004722b69fb0ca5b7128214111077/scripts/libmakepkg/source/git.sh.in#L55
https://github.com/git-lfs/git-lfs/issues/4161

This task depends upon

Closed by  Eli Schwartz (eschwartz)
Monday, 21 September 2020, 22:30 GMT
Reason for closing:  Duplicate
Additional comments about closing:  You previously opened FS#67012 for this.
Comment by bartus (bartus) - Monday, 21 September 2020, 20:52 GMT
Beside abusing VCSCLIENTS array, hidden implementation would also requires changes to `get_vcsclient` allowing it to return multiple executables in an array, and changes to `executable_vsc` to allow examination of more than one vcs client binary presence.

Loading...