Commit 8be1464b authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Switch RPM provides from bitful to archful

While ultimately the goal is to automate virtual provides and requires
to the extent of out-of-tree modules, considering that for now package
maintainers would have to manually adjust their requirements, they
couldn't easily manage either 32bit or 64bit dependencies in a single
Requires tag. While we don't ship 32bit packages, distributions like
Fedora do.

Now a user can easily target the right architecture on a multilib system
with a single dependency:

    Requires: varnishd(abi)%{?_isa} = sha1

This is already part of the upgrade notes I'm redacting and I will amend
the wiki accordingly.
parent 6e512d88
......@@ -10,9 +10,7 @@ FIND_PROVIDES=$1
shift
VMOD_VERSION=" = ${VERSION%.*}" # remove arch
ABI_BITS=
test "$(rpm --eval %__isa_bits)" -eq 64 && ABI_BITS='(64bit)'
ABI_ISA=$(rpm --eval '%{?_isa}')
expand_macro() {
cpp - -Iinclude <<-EOF |
......@@ -32,8 +30,8 @@ varnishd_provides() (
VRT_MINOR=$(expand_macro VRT_MINOR_VERSION | tr -c -d '[0-9]')
cat <<-EOF
varnishd(abi)$ABI_BITS = $ABI
varnishd(vrt)$ABI_BITS = $VRT_MAJOR.$VRT_MINOR
varnishd(abi)$ABI_ISA = $ABI
varnishd(vrt)$ABI_ISA = $VRT_MAJOR.$VRT_MINOR
EOF
)
......@@ -47,7 +45,7 @@ do
*/libvmod_*.so)
VMOD=${FILE##*/libvmod_}
VMOD=${VMOD%.so}
printf 'vmod(%s)%s%s\n' "$VMOD" "$ABI_BITS" "$VMOD_VERSION"
printf 'vmod(%s)%s%s\n' "$VMOD" "$ABI_ISA" "$VMOD_VERSION"
;;
*)
printf "%s\n" "$FILE" | $FIND_PROVIDES "$@"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment