You are not logged in.
Hi,
I read about the (long awaited ) pacman hooks and that they will be available in pacman-5.0.
In the pacman-dev mailing-list archive (dec. 2015) I saw a thread with subject 'pacman 5 freeze' or something similar.
Don't remember exactly.
So, when can we expect pacman-5.0 in the repos?
Last edited by michis (2016-01-30 12:54:25)
Offline
When it's ready!
EDIT: I think you can install it from git now if you want.
Last edited by Head_on_a_Stick (2016-01-16 21:32:07)
Offline
The freeze topic you mentioned is here: https://lists.archlinux.org/pipermail/p … 20629.html
As noted, the strings were submitted to Transifex, so I suspect once translations are done, 5.0 will be tagged.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Ah ok, so it seems it will be in the not too far future.
Thanks for the info.
Offline
All it requires is me to finalize a few things... I have been very busy at work so this is taking longer than I hoped.
Offline
Do I see HOOKS?
Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository
Offline
All it requires is me to finalize a few things...
Nice
Thanks for the info Allan.
Offline
From the Transifex announcement:
Final strings for pacman-5.0
Hi all, Thanks for all the translating in the lead up to pacman-5.0. The translations look in good shape!
I have just pushed the final update which brings 7 new strings. I intend to make the release at the end of January, so that gives two weeks.
Thanks, Allan
Offline
Do I see HOOKS?
My reaction exactly. I have no real clue what the hook would be for, but it kind of makes me excited.
Offline
clfarron4 wrote:Do I see HOOKS?
My reaction exactly. I have no real clue what the hook would be for, but it kind of makes me excited.
I think the vision for HOOKS is to deal with nice stuff such as post-install module building etc (in the way Vi0l0's catalyst-hook package deals with fglrx module building. But imagine it just happening instead of having to mess around with a service).
Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository
Offline
I've been using kernel postinstall hooks in Debian for a while and it is very useful.
I feel like a kid at $SEASONAL_HOLIDAY waiting for this
Offline
So long as there's a hook that prints out "Arch is the best" after each individual package upgrade, I'll be happy.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I feel like a kid at $SEASONAL_HOLIDAY waiting for this
As I mentioned in the first post:
long awaited
Offline
nstgc wrote:clfarron4 wrote:Do I see HOOKS?
My reaction exactly. I have no real clue what the hook would be for, but it kind of makes me excited.
I think the vision for HOOKS is to deal with nice stuff such as post-install module building etc (in the way Vi0l0's catalyst-hook package deals with fglrx module building. But imagine it just happening instead of having to mess around with a service).
Also I believe things like updating the mime database and gtk icon cache will now be able to run once after a full pacman transaction, rather than after each and every package.
(And most post-install scripts seem to be just this -- so now most packages will be able to get away without including install scripts.)
It should also be possible to automatically compile python bytecode, rather than depending on maintainers to necessarily take care of it (could be extended by maintainers packaging modules outside /usr/lib/python*/)... as well as decreasing the size of packages which no longer have to track pyc/pyo files.
In fact, I think that is two of the major things which debian delegates to dpkg hooks??
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Creating the info page directory can also be added to that list. I expect 90% of install files to disappear.
Offline
That hook is only used in update/install packages? Or can use in prepare(), build() and package() functions
Offline
If I understand what you are asking - look at makepkg-template.
Offline
for example avoid (or call a function without write that function in the pkgbuild) things like:
prepare() {
some brawbraw
find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} +
mkdir "$srcdir/python2-path"
ln -s /usr/bin/python2 "$srcdir/python2-path/python"
some brawbraw
}
build() {
some brawbraw
export PATH="$srcdir/python2-path:$PATH"
some brawbraw
}
create_links() {
# create soname links
for _lib in $(find "${pkgdir}" -name '*.so*' | grep -v 'xorg/'); do
_soname=$(dirname "${_lib}")/$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)
_base=$(echo ${_soname} | sed -r 's/(.*).so.*/\1.so/')
[[ -e "${_soname}" ]] || ln -s $(basename "${_lib}") "${_soname}"
[[ -e "${_base}" ]] || ln -s $(basename "${_soname}") "${_base}"
done
}
package() {
some brawbraw
create_links
some brawbraw
}
prepare() {
some brawbraw
# Damm DOS
find -type f -exec perl -pi -e 's/\r\n?/\n/g' "{}" \;
}
or something using a hooks
like a eclass used in ebuild in gentoo
Last edited by sl1pkn07 (2016-01-18 08:48:46)
Offline
makepkg-template - not that anyone used it...
Offline
mmmm no, is not valid for like i mean
the templetes add in the pkgbuild the things i want avoid in the pkgbuild. i mean like a plugin of makepkg. call that pluging when invokes in the pkgbuild
for example:
pkgname=
pkgver=
pkgrel=
pkgdesc="simple configuration file class"
arch=()
license=()
depends=()
source=()
md5sums=()
url=""
options+=()
HOOKS=('python2' 'soname_links' 'dos2unix')
prepare()
cd "$srcdir/$_distdir"
use_python2
dos_to_unix
}
build() {
cd "$srcdir/$_distdir"
set_python2
make
}
check() {
cd "$srcdir/$_distdir"
make test
}
package() {
cd "$srcdir/$_distdir"
make DESTDIR="$pkgdir" install
install -Dm755 lib.so.${pkgver}
make_soname_links
}
python2.hook
use_python2() {
find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} +
mkdir "$srcdir/python2-path"
ln -s /usr/bin/python2 "$srcdir/python2-path/python"
}
set_python2() {
export PATH="$srcdir/python2-path:$PATH"
}
soname_links.hook
make_soname_links() {
for _lib in $(find "${pkgdir}" -name '*.so*); do
_soname=$(dirname "${_lib}")/$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)
_base=$(echo ${_soname} | sed -r 's/(.*).so.*/\1.so/')
[[ -e "${_soname}" ]] || ln -s $(basename "${_lib}") "${_soname}"
[[ -e "${_base}" ]] || ln -s $(basename "${_soname}") "${_base}"
done
}
dos2unix.hook
dos_to_unix() {
find -type f -exec perl -pi -e 's/\r\n?/\n/g' "{}" \;
}
Last edited by sl1pkn07 (2016-01-18 09:24:35)
Offline
It should also be possible to automatically compile python bytecode, rather than depending on maintainers to necessarily take care of it (could be extended by maintainers packaging modules outside /usr/lib/python*/)... as well as decreasing the size of packages which no longer have to track pyc/pyo files.
I hope not. Preferably, everything in /usr (except /usr/local) should be tracked by the package manager. It just makes things simpler. Hooks are useful for things that can't be done at compile time (i.e. things that depend on the state of the machine on which the package is being installed).
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
Exciting! But I need to wait for the docs and for some examples to fully appreachiate.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
makepkg-template, makepkg, pkgbuild docs in git don't mention hooks.
alpm-hooks.5.txt does.
If i understand correctly, this will work a bit like udev rules ?
pacman will install some hooks by default,and we can make our own hooks if desired ?
a few (hypothetical) examples :
package has dkms in name, run dkms-install
files ending in .ttf, post-transaction : run update fontconfig
packagename has linux in it, reboot system
package has files ending in .info : run "delete info-files"
package has files ending in exe or docx or xlsx : abort installation
Last edited by Lone_Wolf (2016-01-18 14:48:38)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Offline
a few (hypothetical) examples :
packagename has linux in it, reboot system
Saying I need to reboot would be fine, but not auto-rebooting. I'd like the opportunity to at least handle any .pacnew files first!
Offline