]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Include rlm_unbound in packaging
authorNick Porter <nick@portercomputing.co.uk>
Mon, 12 Feb 2024 10:34:58 +0000 (10:34 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 13 Feb 2024 11:10:12 +0000 (11:10 +0000)
Same as v3.2

debian/control.in
debian/freeradius-unbound.install [new file with mode: 0644]
debian/freeradius-unbound.lintian-overrides [new file with mode: 0644]
debian/freeradius-unbound.postinst [new file with mode: 0644]
redhat/freeradius.spec

index 52b7421ee7a8db392c3d644c15e41f65cfdd692c..b242ea9be4b58dcd8786a4a5dcae9ac0ce6552c5 100644 (file)
@@ -29,6 +29,7 @@ Build-Depends: @BUILDDEPS@ debhelper (>= 9),
  libsqlite3-dev,
  libssl-dev,
  libtalloc-dev,
+ libunbound-dev,
  libwbclient-dev,
  libykclient-dev,
  libyubikey-dev,
@@ -201,6 +202,13 @@ Description: Memcached module for FreeRADIUS server
  The FreeRADIUS server can cache data in memcached and this package
  contains the required module.
 
+Package: freeradius-unbound
+Architecture: any
+Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, ${dist:Depends}
+Description: Unbound module for FreeRADIUS server
+ This package is required to add libunbound DNS functionality to the
+ FreeRADIUS server.
+
 Package: freeradius-yubikey
 Architecture: any
 Depends: freeradius (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, ${dist:Depends}
diff --git a/debian/freeradius-unbound.install b/debian/freeradius-unbound.install
new file mode 100644 (file)
index 0000000..b9b88a5
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/freeradius/rlm_unbound.so
diff --git a/debian/freeradius-unbound.lintian-overrides b/debian/freeradius-unbound.lintian-overrides
new file mode 100644 (file)
index 0000000..4d1de6e
--- /dev/null
@@ -0,0 +1,3 @@
+# There's plenty in the description of this package to identify
+# what it does.
+freeradius-unbound: extended-description-is-probably-too-short
diff --git a/debian/freeradius-unbound.postinst b/debian/freeradius-unbound.postinst
new file mode 100644 (file)
index 0000000..091efb0
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+set -e
+
+case "$1" in
+  configure)
+        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+          invoke-rc.d freeradius force-reload || true
+        else
+          /etc/init.d/freeradius force-reload
+        fi
+       ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
index 448481c23ff7889743dd626dbaeeb5cdded1e737..a3a6e7882a1d306508ce83db2be355e9e2ddddba 100644 (file)
@@ -18,6 +18,9 @@
 # Build without Python
 %bcond_without rlm_python
 
+# Build without unbound
+%bcond_without rlm_unbound
+
 # Many distributions have extremely old versions of OpenSSL
 # if you'd like to build with the FreeRADIUS openssl packages
 # which are installed in /opt/openssl you should pass
@@ -476,6 +479,18 @@ Requires: freeradius-libfreeradius-curl = %{version}
 %description rest
 This plugin provides the ability to interact with REST APIs for the FreeRADIUS server project.
 
+%if %{with rlm_unbound}
+%package unbound
+Summary: Unbound DNS support for FreeRADIUS
+Group: System Environment/Daemons
+Requires: %{name} = %{version}-%{release}
+Requires: unbound
+BuildRequires: unbound-devel
+
+%description unbound
+This plugin provides unbound DNS support for the FreeRADIUS server project.
+%endif
+
 %if %{with rlm_lua}
 %package lua
 Summary: Lua support for FreeRADIUS
@@ -636,6 +651,7 @@ export RADIUSD_VERSION_RELEASE="%{release}"
         %{autoconf_mod_with rlm_securid} \
         %{autoconf_mod_with rlm_sigtran} \
         %{autoconf_mod_with rlm_sql_oracle} \
+       %{autoconf_mod_with rlm_unbound} \
         %{autoconf_mod_with rlm_yubikey} \
 %if %{without ldap}
         --without-libfreeradius-ldap \
@@ -756,9 +772,6 @@ touch $RPM_BUILD_ROOT/var/log/radius/{radutmp,radius.log}
 %__rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/mods-config/sql/main/oracle
 %__rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/mods-config/sql/driver/oracle
 %endif
-%if %{without rlm_unbound}
-%__rm -rf $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/mods-config/unbound
-%endif
 %__rm -rf $RPM_BUILD_ROOT/%{_libdir}/freeradius/rlm_test.so
 
 # remove header files, we don't ship a devel package and the
@@ -1110,6 +1123,10 @@ fi
 %attr(640,root,radiusd) %config(noreplace)     %{_sysconfdir}/raddb/mods-config/sql/driver/oracle
 %endif
 
+%if %{with rlm_unbound}
+%config(noreplace)     %{_sysconfdir}/raddb/mods-config/unbound/default.conf
+%endif
+
 %files utils
 %exclude /usr/bin/*_tests
 %exclude /usr/bin/unit_test_*
@@ -1236,6 +1253,13 @@ fi
 %defattr(-,root,root)
 %{_libdir}/freeradius/rlm_rest.so
 
+%if %{with rlm_unbound}
+%files unbound
+%defattr(-,root,root)
+%{_libdir}/freeradius/rlm_unbound.so
+%doc %{_mandir}/man5/rlm_unbound.5.gz
+%endif
+
 %if %{with rlm_sigtran}
 %files sigtran
 %defattr(-,root,root)