[SOLVED] artools-pkg Question 13 May 2024, 09:33:07 I have a question, guysSpeaking of artools-pkg and building in a clean chroot, what is the alternative of makepkg -esr / -osr ?I mean, if I want to get the sources and extract them only without rebuilding, then make some changes to the code by hand and rebuild the package after that.Is it possible and how?Thanks Last Edit: 14 May 2024, 19:36:19 by nous
Re: artools-pkg Question Reply #1 – 13 May 2024, 10:32:00 Quote from: TheExplorer – on 13 May 2024, 09:33:07Speaking of artools-pkg and building in a clean chroot, what is the alternative of makepkg -esr / -osr ?Code: [Select]buildpkg -cRTFM:https://gitea.artixlinux.org/artix/artools/src/branch/master/README.md 1 Likes
Re: artools-pkg Question Reply #2 – 13 May 2024, 17:09:37 Quote from: lq – on 13 May 2024, 10:32:00Code: [Select]buildpkg -cYes, I've read this readme. buildpkg -c simply recreates the chroot. I couldn't find anything upon how to retrieve the sources, make changes and then continue building the package.So, after buildpkg has recreated the chroot should I make changes and then run it again or what?
Re: artools-pkg Question Reply #3 – 13 May 2024, 17:13:33 Quote from: lq – on 13 May 2024, 10:32:00RTFM:https://gitea.artixlinux.org/artix/artools/src/branch/master/README.mdAlso, why are you throwing this at me even when it doesn't have 'buildpkg -c' at all? Are you an Artix dev? That's a bit rude anyway. I asked a simple question searching for a solution and learning things. You throw 'rtfm'. Yes, I rtfm constatntly, dude. 2 Likes
Re: artools-pkg Question Reply #4 – 13 May 2024, 17:21:35 Quote from: TheExplorer – on 13 May 2024, 09:33:07I mean, if I want to get the sources and extract them only without rebuilding, then make some changes to the code by hand and rebuild the package after that.Is it possible and how?Short answer no, not possible.buildpkg is simply not meant to do this, building in chroot requires you to make a patch eventually if you want to modify sources. 1 Likes
Re: artools-pkg Question Reply #5 – 13 May 2024, 19:13:29 Quote from: TheExplorer – on 13 May 2024, 09:33:07Is it possible and how?Create a chroot with system mount binds (artix-chroot)Run artix-bootstrap in it. Install base-devel gitgit clone from gitea and if necessary checkout the stable versionUse makepkg in any setup you like.You can create a bash or python script to take a package as an argument then do the above, pause after makepkg -sro $PKG then continue once you've done your edits.One caveat atm is that https://gitea.artixlinux.org/artix/artix-bootstrap needs changes to work.I've been meaning to report it but maybe I just have?This fork should be working ? https://github.com/gripped/artix-bootstrapI actually have a python script which I call patch-hook which does much of the above. Or at least it has functions you could extract from it to suit your needs.patch-hook gets called by hooks I place in /etc/pacman.d/hooks so that whenever specific packages get upgraded patch-hook builds them again after applying my pre-existing patches. Optionally in a chroot.So similarities but not exactly what you need.I just added it to my github in case you want to see how it can be done.https://github.com/gripped/patch-hook Last Edit: 14 May 2024, 02:18:37 by gripped 1 Likes
Re: artools-pkg Question Reply #6 – 13 May 2024, 19:39:07 Quote from: artoo – on 13 May 2024, 17:21:35Short answer no, not possible.buildpkg is simply not meant to do this, building in chroot requires you to make a patch eventually if you want to modify sources.Thank you very much. That's what I wanted to hear. Also, shame on me, I forgot about patching. Awesome. I'll mark it as solved.
Re: artools-pkg Question Reply #7 – 13 May 2024, 19:42:42 Quote from: gripped – on 13 May 2024, 19:13:29Create a chroot with system mount binds (artix-chroot)Run artix-bootstrap in it. Install base-devel gitgit clone from gitea and if necessary checkout the stable versionUse makepkg in any setup you like.You can create a bash or python script to take a package as an argument then do the above, pause after makepkg -sro $PKG then continue once you've done your edits.I actually have a python script which I call patch-hook which does much of the above. Or at least it has functions you could extract from it to suit your needs.patch-hook gets called by hooks I place in /etc/pacman.d/hooks so that whenever specific packages get upgraded patch-hook builds them again after applying my pre-existing patches. Optionally in a chroot.So similarities but not exactly what you need.I just added it my github in case you want to see how it can be done.https://github.com/gripped/patch-hookThat's very informative. Thanks a ton! I'll study this too. Now I guess it'd be easier to create a patch, edit a PKGBUILD accordingly and run buildpkg like it's supposed.
Re: artools-pkg Question Reply #8 – 14 May 2024, 00:12:02 Quote from: gripped – on 13 May 2024, 19:13:29One caveat atm is that https://gitea.artixlinux.org/artix/artix-bootstrap needs changes to work.Fixed 1 Likes
Re: artools-pkg Question Reply #9 – 14 May 2024, 09:32:56 General advice, if you plan to distribute or deploy your built package to a repo which for example your local network computers all use, same as a distro package, buildpkg is the thing.If you just plan to install a built package locally for yourself and just your own computer, makepkg is fully sufficient. 1 Likes
Re: artools-pkg Question Reply #10 – 14 May 2024, 16:00:42 Quote from: TheExplorer – on 13 May 2024, 17:13:33Also, why are you throwing this at me even when it doesn't have 'buildpkg -c' at all? Are you an Artix dev? That's a bit rude anyway. I asked a simple question searching for a solution and learning things. You throw 'rtfm'. Yes, I rtfm constatntly, dude.LOLIt doesn't matter who I am, the tools are self-explanatory so you're definitely a lazy lunkhead if you can't deal with my answer.Ultimately, anyone who is bothered by RTFM won't get an answer at all.
Re: artools-pkg Question Reply #11 – 14 May 2024, 16:10:45 Quote from: artoo – on 14 May 2024, 09:32:56General advice, if you plan to distribute or deploy your built package to a repo which for example your local network computers all use, same as a distro package, buildpkg is the thing.If you just plan to install a built package locally for yourself and just your own computer, makepkg is fully sufficient.Thank you very much. I'm stumbled now a bit with missing dependencies when building xfce4-panel with buildpkg. I guess I should go with more step-by-step thingy with mkchroot and stuff and provide other repos, right?
Re: artools-pkg Question Reply #12 – 14 May 2024, 16:16:59 Quote from: lq – on 14 May 2024, 16:00:42LOLIt doesn't matter who I amYes, it matters. You're a personal insulter. Keep it up. 1 Likes
Re: artools-pkg Question Reply #13 – 14 May 2024, 16:21:42 Quote from: TheExplorer – on 14 May 2024, 16:16:59You're a personal insulter. Keep it up.A statement of fact is not an insult.
Re: artools-pkg Question Reply #14 – 14 May 2024, 17:34:18 Quote from: artoo – on 14 May 2024, 09:32:56General adviceProblem fixed. I had to edit the .conf file uncommenting and adding:Code: [Select]REPO="galaxy"Just thought at first that I had to enumerate all three repos there and couldn't figure out the format for this since there is no help for that. As it turned out, only "galaxy" is needed.Case closed, thread solved.