You are not logged in.
Hey guys, I'm looking into bisecting something in git. I also want to use pkgbuild to package it up and test it. After an hour of fiddling, I can't get pkgbuild and makepkg to use a local source in a folder in the same directory as the pkgbuild. I want to do this to manually run git-bisect in the source folder, and then use the pkgbuild to put it together for me with the bisected code.
Is there any way to do this? If not, I think it would be a great feature to be added.
If this isn't the right place to ask/request this, let me know where to actually put it, thanks.
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I know how to git bisect, I don't know how to get pkgbuild to use the source in the folder with the pkgbuild. It doesn't seem possible, actually, I'm just wondering if someone knows something I don't.
Edit: Ah, you guys suggest just doing it in-place of the source. Well, I guess this will work. It still would be nice to be able to tell pkgbuild to use a local source copy, so my normal OS builds wouldn't be messed with.
Last edited by ThreeGen (2020-05-16 02:14:34)
Offline
I know how to git bisect, I don't know how to get pkgbuild to use the source in the folder with the pkgbuild.
That page tells you exactly how to use the source that is bisected in srcdir. I'm not sure what you mean by the source in the folder with the PKGBUILD - do you mean under 'src' or do you actually clone a second copy in the same directory as the PKGBUILD? If so, why?
Edit: Ah, you guys suggest just doing it in-place of the source. Well, I guess this will work. It still would be nice to be able to tell pkgbuild to use a local source copy, so my normal OS builds wouldn't be messed with.
This doesn't make much sense. Can you be more specific? You can also just use content in the startdir if you really wanted, occasionally people will do that when they're working on code and haven't even bothered completing the PKGBUILD, but if you already have a normally functioning PKGBUILD, why would you want to do this?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
The --noextract flag also prevents prepare() from being run.
For packages that need to execute things in prepare() (like autoreconf or patches ) to build correctly, git bisecting as outlined in that article fails.
I've had that happen a few times with VCS packages.
Making --noextract just skip extracting sources and adding a separate flag to skip prepare() could solve this, but I never filed a feature request for makepkg as it seemed to me very few users would need this .
A workaround I use is to create a separate clone of the source where only the git bisect commands are run.
In the PKGBUILD I'd add the commit_being_tested to the source line and build the package normally, then tested.
Is that similar to what you want to achieve, ThreeGen ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I've got it bisecting, but later-fixed blocking bugs are not allowing me to test since the old Mesa doesn't work with single file clang, so I'm basically giving up using any of these methods or even bisecting.
But anyway, Mesa generates some files dynamically, meaning the code isn't sane between runs, not allowing for bisecting because of changes to the tree that I don't care about losing, but block the bisect unless removed. It's not an easy process, and is really more of a hack. It would just be nice to build "I'm debugging this package, not the makepkg." into makepkg, as it's really poorly put together for actual development work sadly.
Offline
makepkg can do the bisection for you, have the source in the PKGBUILD pin to #commit=$COMMIT, and run:
git -C cloned-source bisect start --no-checkout
repeatedly run
COMMIT=$(git -C cloned-source rev-parse BISECT_HEAD) makepkg
makepkg will check out the commit referenced by $COMMIT, try to build it, etc. Tracking the bisection process happens outside of $srcdir, in the source clone located in ${SRCDEST:-$PWD}/.
Last edited by eschwartz (2020-05-21 00:13:11)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Ah, I'll have to try that later. Thanks, will report back if it was a better method for my use case.
Offline