Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] artools-pkg Question (Read 759 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] artools-pkg Question

I have a question, guys

Speaking 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

Re: artools-pkg Question

Reply #1
Speaking of artools-pkg and building in a clean chroot, what is the alternative of makepkg -esr / -osr ?

Code: [Select]
buildpkg -c

RTFM:

https://gitea.artixlinux.org/artix/artools/src/branch/master/README.md
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: artools-pkg Question

Reply #2

Yes, 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

Also, 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.

Re: artools-pkg Question

Reply #4

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?


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.

Re: artools-pkg Question

Reply #5
Create a chroot with system mount binds (artix-chroot)
Run artix-bootstrap in it.
Install base-devel git
git clone from gitea and if necessary checkout the stable version
Use 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-bootstrap

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 to my github in case you want to see how it can be done.
https://github.com/gripped/patch-hook

Re: artools-pkg Question

Reply #6
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.

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
Create a chroot with system mount binds (artix-chroot)
Run artix-bootstrap in it.
Install base-devel git
git clone from gitea and if necessary checkout the stable version
Use 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-hook

That'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 #9
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.

Re: artools-pkg Question

Reply #10
Also, 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.

LOL

It 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.
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: artools-pkg Question

Reply #11
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.

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 #13
You're a personal insulter. Keep it up.

A statement of fact is not an insult.
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: artools-pkg Question

Reply #14


Problem 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.