Apply personal patches when running pacman -Syu?

There’s a few packages that I use that I have created personal patches for. When one of these packages gets updated I need to manually change the PKGBUILD to the new version, SHA, etc. Is there any way to have a local patch applied to a package every time a new version of the package is release?

Rustmilian,
@Rustmilian@lemmy.world avatar

See my calamaris package

Dirk,
@Dirk@lemmy.ml avatar

Instead of manually patching the package maybe create an own/local package for it and maintain it on your own and include your patches.

EddyBot,

this task is easy on gentoo but hard anywhere else
in the past I checked package updates via nvchecker, grabed the latest PKGBUILD via ABS, applied the patch, compiled the package and sent it to my custom repository
if you add the repository higher in your pacman.conf it will grab it from that first

but this a huge pita, even going through the route of maintaining an AUR package is simpler

Laser,

this task is easy on gentoo but hard anywhere else

Not true, it’s also doable on NixOS: nixos.wiki/wiki/Overlays#Adding_patches

cbarrick,

Pacman downloads and installs binary packages. You cannot use it to build packages with custom patches.

backhdlp,
@backhdlp@iusearchlinux.fyi avatar

I think pacman hooks could help you

victorz,

Could you explain more? Sounds interesting. I thought hooks were only actions applied post install?

backhdlp,
@backhdlp@iusearchlinux.fyi avatar

I’m not very familiar with them, I mostly just know they exist. wiki.archlinux.org/title/Pacman#Hooks has information on them

I also just found this wiki page wiki.archlinux.org/title/Patching_packages btw, might help maybe

  • All
  • Subscribed
  • Moderated
  • Favorites
  • archlinux@lemmy.ml
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines