public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/bind] rawhide: Prepare devel subpackage installable multiple times
@ 2026-07-01  9:47 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-07-01  9:47 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/bind
            Branch : rawhide
            Commit : a166e83cd089c6181cb2c46693b1e9797aae149c
            Author : Petr Menšík <pemensik@redhat.com>
            Date   : 2026-06-24T15:24:31+02:00
            Stats  : +45/-18 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/bind/c/a166e83cd089c6181cb2c46693b1e9797aae149c?branch=rawhide

            Log:
            Prepare devel subpackage installable multiple times

Only bind-dyndb-ldap uses devel package. Move includes and libraries to
contain major version. That should allow to install both bind9.18-devel
and bind9.20-devel at the same time. Needed to build multiple
bind-dyndb-ldap plugin versions for different variants.

Adjusted to bind 9.18 main component.

---
diff --git a/bind.spec b/bind.spec
index b4f8094..6856c08 100644
--- a/bind.spec
+++ b/bind.spec
@@ -48,6 +48,16 @@
 ## The order of libs is important. See lib/Makefile.in for details
 %define bind_export_libs isc dns isccfg irs
 %{!?_export_dir:%global _export_dir /bind9-export/}
+
+%define major_ver() %{lua: \
+  local ver = rpm.expand("%{1}"); \
+  local s, e; \
+  s, e = string.find(ver, "^%d+[.]%d+"); \
+  if (s and e) then \
+    print(string.sub(ver, s, e)); \
+  end; \
+}
+
 # libisc-nosym requires to be linked with unresolved symbols
 # When libisc-nosym linking is fixed, it can be defined to 1
 # Visit https://bugzilla.redhat.com/show_bug.cgi?id=1540300
@@ -88,7 +98,7 @@ License:  MPL-2.0 AND ISC AND MIT AND BSD-3-Clause AND BSD-2-Clause
 # Before rebasing bind, ensure bind-dyndb-ldap is ready to be rebuild and use side-tag with it.
 # Updating just bind will cause freeipa-dns-server package to be uninstallable.
 Version:  9.18.50
-Release:  1%{?dist}
+Release:  2%{?dist}
 Epoch:    32
 Url:      https://www.isc.org/downloads/bind/
 #
@@ -335,6 +345,13 @@ in HTML and PDF format.
 
 %endif
 
+# Extract major version 9.x
+%global mver %{major_ver %{version}}
+
+# customize include directory
+%global bind_include %{_includedir}/bind%{mver}
+
+
 %prep
 %if 0%{?fedora}
 # RHEL does not yet support this verification
@@ -399,7 +416,7 @@ export LIBDIR_SUFFIX
   --localstatedir=%{_var} \
   --with-pic \
   --disable-static \
-  --includedir=%{_includedir}/bind9 \
+  --includedir=%{bind_include} \
   --with-tuning=large \
   --with-libidn2 \
 %if %{with GEOIP2}
@@ -594,6 +611,12 @@ ln -s ../bin/{named-checkconf,named-checkzone,named-compilezone} %{buildroot}%{_
 # Remove libtool .la files:
 find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
 
+pushd ${RPM_BUILD_ROOT}/%{_libdir}
+  for LIB in isccc ns dns isc isccfg irs bind9; do
+    mv "lib${LIB}.so" "lib${LIB}-%{mver}.so"
+  done
+popd
+
 # 9.16.4 installs even manual pages for tools not generated
 %if %{without DNSTAP}
 rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/dnstap-read.1* || true
@@ -876,22 +899,23 @@ fi;
 %{_mandir}/man1/dnssec*.1*
 
 %files devel
-%{_libdir}/libbind9.so
-%{_libdir}/libisccc.so
-%{_libdir}/libns.so
-%{_libdir}/libdns.so
-%{_libdir}/libirs.so
-%{_libdir}/libisc.so
-%{_libdir}/libisccfg.so
-%dir %{_includedir}/bind9
-%{_includedir}/bind9/bind9
-%{_includedir}/bind9/isccc
-%{_includedir}/bind9/ns
-%{_includedir}/bind9/dns
-%{_includedir}/bind9/dst
-%{_includedir}/bind9/irs
-%{_includedir}/bind9/isc
-%{_includedir}/bind9/isccfg
+%{_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
+%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}/isccfg
+%{bind_include}/bind9
 
 %files chroot
 %config(noreplace) %{_sysconfdir}/named-chroot.files
@@ -944,6 +968,9 @@ fi;
 %endif
 
 %changelog
+* Wed Jun 17 2026 Petr Menšík <pemensik@redhat.com> - 32:9.18.50-2
+- Prepare devel subpackage installable multiple times
+
 * Wed Jun 17 2026 Petr Menšík <pemensik@redhat.com> - 32:9.18.50-1
 - Update to 9.18.50 (rhbz#2489833)
 - Remove rwtab files

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

only message in thread, other threads:[~2026-07-01  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-01  9:47 [rpms/bind] rawhide: Prepare devel subpackage installable multiple times 

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