You are not logged in.
I've done some hooks which run on pacman -Syu. But how to create hooks which trigger whenever I execute makepkg? It's meant for installing/updating AUR packages.
Last edited by equalizer876 (2021-06-02 22:54:40)
Offline
What do you mean by "hook"? How would you use this?
Certainly, makepkg won't run libalpm hooks.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I want to create a hook to copy files from one place to another. When I use 'makepkg -i' would it also run pacman -U? Should I use pacman -U to trigger a hook?
Last edited by equalizer876 (2021-06-03 10:26:00)
Offline
"makepkg -i" will [ i ]nstall the package w/ pacman and that will trigger pacman hooks you have.
Your answer however doesn't really describe the problem - do you need some action for the build process or for the installation of the package?
For the latter: that has nothing to do w/ makepkg.
Offline
The actions are for the installation of the package. Whenever I update an AUR package, I want to automatically copy some files to another place and avoid to trigger this simple command whenever I install/update packages from official repositories.
Offline
that has nothing to do w/ makepkg
I want to automatically copy some files to another place and avoid to trigger this simple command whenever I install/update packages from official repositories.
That's not a thing. Your hook could check whether the package is in the repo, but it still has to be called.
Or: your properly match the hooks type/target.
Or: you just run "makepkg -i && copy_some_files.sh"
Offline
makepkg builds packages. pacman installs them. No matter where they come from. Start with understanding that, then the rest should follow.
Online
The actions are for the installation of the package... I want to automatically copy some files to another place and avoid to trigger this simple command whenever I install/update packages from official repositories.
This has been extremely vague - or even an X-Y question - from the start. Stop making everyone ask for more details. I'm quite confident that your goals are not a national security issue.
What package? What files? From what place to what other place, and why? Why would this be triggered when you install / update packages from the repos? Does the AUR package you are referring to conflict with a repo package that you also have installed? Is that why you want to move files? If so, this will fail and there are much easier solutions (i.e., fix the PKGBUILD).
Last edited by Trilby (2021-06-03 14:45:48)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
This has been extremely vague - or even an X-Y question - from the start. Stop making everyone ask for more details. I'm quite confident that your goals are not a national security issue.
I'll be screwed if I post all informations, but let's do it anyway. A Flatpak application can't open files in /usr/share. I installed some extensions from AUR and those are placed in /usr/share. Now I just need to cp those extensions into my home folder and the Flatpak application is able to open them. I already asked on the Github page of that Flatpak application and they answered it couldn't be helped.
Now to automate this cp command whenever the extensions are updated. I don't use AUR helpers. Only doing 'makepkg -sirc' to update AUR packages Maybe this would do?
[Trigger]
Type = Path
Operation = Install
Target = usr/share/extension1
Target = usr/share/extension2
Target = usr/share/extension3
[Action]
Description = Copy extensions to home...
When = PostTransaction
Exec = /.../CopyExtensions.sh
I guess NeedsTargets in [Action] would require to meet all Target conditions at the same time?
When I look into https://archlinux.org/pacman/alpm-hooks.5.html then I could also do Type = Package and Operation = Upgrade.
Last edited by equalizer876 (2021-06-03 15:33:26)
Offline
I'll be screwed if I post all informations
More so if you don't. Why can't the flatpak application open files in /usr/share? Do you need to change their ownership or group membership? Again, be specific. What flatpak, what are the actual error messages?
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Linking to the bug report on github would save repeating all the information included there and avoid some of this guesswork.
Offline
https://github.com/flathub/com.github.E … /issues/26
Now happy? One workaround would be the pacman hook I think. Another one?
Offline
You could symlink or bind-mount the relevant paths.
Or you use https://aur.archlinux.org/packages/ungoogled-chromium/
Also this isn't to make anyone "happy" but to avoid dances around the problem, check the stickies in the newbie corner.
Offline
You could symlink or bind-mount the relevant paths.
Or you use https://aur.archlinux.org/packages/ungoogled-chromium/
Symlink didn't work, but I'll try bind-mount next time. Compiling a whole browser takes a lot of computing time so I figured why not just using a compiled package. Then I would trust flathub more than pacman binaries of single users.
Also this isn't to make anyone "happy"
I know and I'm thankful for your help, but I still couldn't resist it. Sorry
Last edited by equalizer876 (2021-06-03 22:31:56)
Offline