public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bind] f45: Fix plugin path, add alternatives to devel libs
@ 2026-08-26  8:34 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-26  8:34 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/bind
            Branch : f45
            Commit : 2e2533ed0cc1f74d40d315d439bcc5e003f12fa6
            Author : Petr Menšík <pemensik@redhat.com>
            Date   : 2026-08-25T14:36:15+02:00
            Stats  : +28/-12 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/bind/c/2e2533ed0cc1f74d40d315d439bcc5e003f12fa6?branch=f45

            Log:
            Fix plugin path, add alternatives to devel libs

Devel libs detection from bind-dyndb-ldap needs working
_libdir/libdns.so. Provide extra symlink to that. But requires
additional change on bind-dyndb-ldap change to follow those links.

---
diff --git a/bind.spec b/bind.spec
index 08979b6..37d3425 100644
--- a/bind.spec
+++ b/bind.spec
@@ -757,6 +757,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/bind9
 %global main_bin8 named rndc{,-confgen}
 %global main_bin1 named{-journalprint,-checkconf,-rrchecker} mdig
 %global dnssec_utils_bin1 dnssec-{cds,dsfromkey,importkey,keyfromlabel,keygen,revoke,settime,signzone,verify}
+%global devel_lib lib{bind9,dns,irs,isc,isccc,isccfg,ns}
 %global main_man5 named.conf rndc.conf
 %global main_unit named.service named-setup-rndc.service
 %global main_lib filter-{a,aaaa}
@@ -787,8 +788,13 @@ mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/bind9
 %define altflibexec() \\\
   --follower %{_libexecdir}/%{1} %{upname}-%{1} %{_libexecdir}/%{name}/%{1}
 
+# This is for devel subpackage only, not plugins {1} (_libdir/)libname.so
+%define altflib() \\\
+  --follower %{_libdir}/%{1}.so %{upname}-%{1}.so %{_libdir}/%{1}%{program_suffix}.so
+
+# This is only for bind plugins, which have also man page
 %define altflibman() \\\
-  --follower %{_libdir}/bind/%{1}.so %{upname}-%{1}.so %{_libdir}/bind/%{1}.so%{program_suffix} \\\
+  --follower %{_libdir}/bind/%{1}.so %{upname}-%{1}.so %{_libdir}/bind/%{1}%{program_suffix}.so \\\
   --follower %{_mandir}/man%{2}/%{1}.%{2}%{manext} %{upname}-%{1}.%{2} %{_mandir}/man%{2}/%{1}%{program_suffix}.%{2}%{manext}
 
 %define altrmbinman() \
@@ -992,13 +998,22 @@ fi
 
 %post devel
 %if "%{program_suffix}" != ""
-  alternatives --install %{_includedir}/bind9 %{upname}-includedir %{bind_include} %{alternatives_prio}
+  ALTS=""
+  for BIN in %{devel_lib}; do
+    BINX="%{_libdir}/${BIN}.so"
+    if ! [ -L "$BINX" ] && [ -f "$BINX" ] && [ -x "$BINX" ]; then
+      rm -f -- "$BINX"
+    fi
+    ALTS+="%{altflib $BIN}"
+  done
+  alternatives --install %{_includedir}/bind9 %{upname}-devel %{bind_include} %{alternatives_prio} \
+    ${ALTS}
 %endif
 
 %postun devel
 %if "%{program_suffix}" != ""
 if [ $1 -eq 0 ] ; then
-  alternatives --remove %{upname}-includedir %{bind_include}
+  alternatives --remove %{upname}-devel %{bind_include}
 fi
 %endif
 %end
@@ -1198,23 +1213,24 @@ fi;
 %ghost %attr(0644,-,-) %{_mandir}/man1/%{dnssec_utils_bin1}.1%{manext}
 
 %files devel
-%{_libdir}/libbind9-%{mver}.so
-%{_libdir}/libisccc-%{mver}.so
-%{_libdir}/libns-%{mver}.so
-%{_libdir}/libdns-%{mver}.so
-%{_libdir}/libisc-%{mver}.so
-%{_libdir}/libisccfg-%{mver}.so
-%{_libdir}/libirs-%{mver}.so
+%{_libdir}/%{devel_lib}%{program_suffix}.so
 %ghost %attr(0755,-,-) %{_includedir}/bind9
+%ghost %attr(0755,-,-) %{_libdir}/libbind9.so
+%ghost %attr(0755,-,-) %{_libdir}/libdns.so
+%ghost %attr(0755,-,-) %{_libdir}/libirs.so
+%ghost %attr(0755,-,-) %{_libdir}/libisc.so
+%ghost %attr(0755,-,-) %{_libdir}/libisccc.so
+%ghost %attr(0755,-,-) %{_libdir}/libisccfg.so
+%ghost %attr(0755,-,-) %{_libdir}/libns.so
 %dir %{bind_include}
-%{bind_include}/isccc
-%{bind_include}/ns
 %{bind_include}/bind9
 %{bind_include}/dns
 %{bind_include}/dst
 %{bind_include}/irs
 %{bind_include}/isc
+%{bind_include}/isccc
 %{bind_include}/isccfg
+%{bind_include}/ns
 
 %files chroot
 %config(noreplace) %{_sysconfdir}/named-chroot.files

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-26  8:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26  8:34 [rpms/bind] f45: Fix plugin path, add alternatives to devel libs 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox