rpms/bind/devel bind-9.3.1-fix_no_dbus_daemon.patch, NONE, 1.1 named-dbus.conf, NONE, 1.1 named.service, NONE, 1.1 bind.spec, 1.70, 1.71
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Sep 26 23:23:20 UTC 2005
Author: jvdias
Update of /cvs/dist/rpms/bind/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19786
Modified Files:
bind.spec
Added Files:
bind-9.3.1-fix_no_dbus_daemon.patch named-dbus.conf
named.service
Log Message:
- fix bug 168302: use %{__cc} for compiling dns-keygen
- fix bug 167682: bind-chroot directory permissions
- fix issues with -D dbus option when dbus service not running or disabled
bind-9.3.1-fix_no_dbus_daemon.patch:
dbus_mgr.c | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
--- NEW FILE bind-9.3.1-fix_no_dbus_daemon.patch ---
--- bind-9.3.1/bin/named/dbus_mgr.c.fix-no-dbus-daemon 2005-09-26 16:03:25.000000000 -0400
+++ bind-9.3.1/bin/named/dbus_mgr.c 2005-09-26 18:35:36.000000000 -0400
@@ -283,6 +283,13 @@
if( mgr->timer == 0L)
{
dbus_mgr_log_err("D-BUS service disabled.");
+ isc_task_purgerange(mgr->task, 0L, ISC_SOCKEVENT_READ_READY, ISC_SOCKEVENT_SELECTED, 0L);
+ if( mgr->sockets != 0L )
+ {
+ twalk(mgr->sockets, dbus_mgr_close_socket);
+ tdestroy(mgr->sockets, dbus_mgr_destroy_socket);
+ mgr->sockets = 0L;
+ }
dbus_mgr_dbus_shutdown_handler ( mgr );
return ISC_R_SUCCESS;
}
@@ -404,8 +411,12 @@
isc_timer_detach(&(mgr->timer));
if( mgr->dbus != 0L )
{
- twalk(mgr->sockets, dbus_mgr_close_socket);
- tdestroy(mgr->sockets, dbus_mgr_destroy_socket);
+ if( mgr->sockets != 0L )
+ {
+ twalk(mgr->sockets, dbus_mgr_close_socket);
+ tdestroy(mgr->sockets, dbus_mgr_destroy_socket);
+ mgr->sockets = 0L;
+ }
dbus_svc_shutdown(mgr->dbus);
}
if( mgr->dhc_if != 0L )
@@ -441,9 +452,12 @@
if ( dbus != 0L )
{
- twalk(mgr->sockets, dbus_mgr_close_socket);
- tdestroy(mgr->sockets, dbus_mgr_destroy_socket);
- mgr->sockets = 0L;
+ if( mgr->sockets != 0L )
+ {
+ twalk(mgr->sockets, dbus_mgr_close_socket);
+ tdestroy(mgr->sockets, dbus_mgr_destroy_socket);
+ mgr->sockets = 0L;
+ }
dbus_svc_shutdown(dbus);
}
@@ -2193,8 +2207,6 @@
return;
}
- sfd->ser->ev_attributes |= ISC_EVENTATTR_NOPURGE;
-
sev = isc_socket_fd_handle_reads(sfd->sock, sfd->ser );
}else
@@ -2222,7 +2234,6 @@
isc_mem_put(mgr->mctx, sfd, sizeof(DBusMgrSocket));
return;
}
- sfd->sew->ev_attributes |= ISC_EVENTATTR_NOPURGE;
sev = isc_socket_fd_handle_writes(sfd->sock, sfd->sew );
@@ -2251,7 +2262,6 @@
isc_mem_put(mgr->mctx, sfd, sizeof(DBusMgrSocket));
return;
}
- sfd->sel->ev_attributes |= ISC_EVENTATTR_NOPURGE;
sev = isc_socket_fd_handle_selected(sfd->sock, sfd->sel );
--- NEW FILE named-dbus.conf ---
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<servicedir>/usr/share/dbus-1/services</servicedir>
<policy user="named">
<allow own="com.redhat.named"/>
<allow send_interface="com.redhat.named"/>
<allow send_destination="com.redhat.named"/>
</policy>
<policy user="root">
<allow send_interface="com.redhat.named"/>
<allow send_destination="com.redhat.named"/>
</policy>
<policy context="default">
<deny own="com.redhat.named"/>
<deny send_destination="com.redhat.named"/>
<deny send_interface="com.redhat.named"/>
</policy>
</busconfig>
--- NEW FILE named.service ---
[D-BUS Service]
Name=com.redhat.named
Exec=/usr/sbin/named
Index: bind.spec
===================================================================
RCS file: /cvs/dist/rpms/bind/devel/bind.spec,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- bind.spec 30 Aug 2005 17:02:06 -0000 1.70
+++ bind.spec 26 Sep 2005 23:23:17 -0000 1.71
@@ -1,3 +1,4 @@
+%define debug_package %{nil}
%define posix_threads 0
%{?!SDB: %define SDB 1}
%{?!LIBBIND:%define LIBBIND 1}
@@ -26,6 +27,8 @@
Source7: bind-9.3.1rc1-sdb_tools-Makefile.in
Source8: dnszone.schema
Source9: libbind-man.tar.gz
+Source10: named-dbus.conf
+Source11: named.service
# http://www.venaas.no/ldap/bind-sdb/dnszone-schema.txt
Patch: bind-9.2.0rc3-varrun.patch
Patch1: bind-9.2.1-key.patch
@@ -52,6 +55,7 @@
Patch22: bind-9.3.1-sdb_dbus.patch
Patch23: bind-9.3.1-dbus_archdep_libdir.patch
Patch24: bind-9.3.1-t_no_default_lookups.patch
+Patch25: bind-9.3.1-fix_no_dbus_daemon.patch
Requires(pre,preun): shadow-utils
Requires(post,preun): chkconfig
Requires(post): textutils, fileutils, sed, grep
@@ -219,7 +223,7 @@
%patch23 -p1 -b .dbus_archdep_libdir
%endif
%patch24 -p1 -b .-t_no_default_lookups
-
+%patch25 -p1 -b .fix_no_dbus_daemon
%build
libtoolize --copy --force; aclocal; autoconf
cp -f /usr/share/libtool/config.{guess,sub} .
@@ -254,7 +258,7 @@
--with-pic \
--with-openssl=/usr
%endif
-make
+make %{?_smp_mflags}
if [ $? -ne 0 ]; then
exit $?;
fi;
@@ -292,7 +296,7 @@
secret "@KEY@";
};
__EOF
-gcc $RPM_OPT_FLAGS -o $RPM_BUILD_ROOT/usr/sbin/dns-keygen %{SOURCE4}
+%{__cc} $RPM_OPT_FLAGS -o $RPM_BUILD_ROOT/usr/sbin/dns-keygen %{SOURCE4}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/named
#mv $RPM_BUILD_ROOT/usr/share/man/man8/named.conf.* $RPM_BUILD_ROOT/usr/share/man/man5
@@ -303,6 +307,12 @@
%if %{LIBBIND}
gunzip < %{SOURCE9} | (cd $RPM_BUILD_ROOT/usr/share; tar -xpf -)
%endif
+%if %{WITH_DBUS}
+mkdir -p $RPM_BUILD_ROOT/etc/dbus-1/system.d
+mkdir -p $RPM_BUILD_ROOT/usr/share/dbus-1/services
+cp -fp %{SOURCE10} $RPM_BUILD_ROOT/etc/dbus-1/system.d/named.conf
+cp -fp %{SOURCE11} $RPM_BUILD_ROOT/usr/share/dbus-1/services/named.service
+%endif
%if %{test}
if [ "`whoami`" = 'root' ]; then
set -e
@@ -331,6 +341,7 @@
cp -fp lib/dns/include/dns/forward.h $RPM_BUILD_ROOT/%{_includedir}/dns
cp -fp lib/isc/unix/include/isc/keyboard.h $RPM_BUILD_ROOT/%{_includedir}/isc
cp -fp lib/isc/include/isc/hash.h $RPM_BUILD_ROOT/%{_includedir}/isc
+exit 0;
%pre
/usr/sbin/groupadd -g 25 named >/dev/null 2>&1 || :;
@@ -439,6 +450,8 @@
%doc doc/arm doc/misc
%if %{WITH_DBUS}
%doc doc/README.DBUS
+%attr(644,root,root) %config /etc/dbus-1/system.d/named.conf
+%attr(644,root,root) %config /usr/share/dbus-1/services/named.service
%endif
%config(noreplace) /etc/logrotate.d/named
%attr(754,root,root) %config /etc/rc.d/init.d/named
@@ -522,10 +535,10 @@
%files chroot
%defattr(-,root,root)
-%attr(770,root,named) %dir %prefix
-%attr(770,root,named) %dir %prefix/dev
-%attr(770,root,named) %dir %prefix/etc
-%attr(770,root,named) %dir %prefix/var
+%attr(750,root,named) %dir %prefix
+%attr(750,root,named) %dir %prefix/dev
+%attr(750,root,named) %dir %prefix/etc
+%attr(750,root,named) %dir %prefix/var
%attr(770,root,named) %dir %prefix/var/run
%attr(770,named,named) %dir %prefix/var/tmp
%attr(770,named,named) %dir %prefix/var/run/named
@@ -702,6 +715,11 @@
:;
%changelog
+* Mon Sep 26 2005 Jason Vas Dias <jvdias at redhat.com> - 24.9.3.1-12
+- fix bug 168302: use %{__cc} for compiling dns-keygen
+- fix bug 167682: bind-chroot directory permissions
+- fix issues with -D dbus option when dbus service not running or disabled
+
* Tue Aug 30 2005 Jason Vas Dias <jvdias at redhat.com> - 24:9.3.1-12
- fix bug 167062: named should be started after syslogd by default
More information about the fedora-cvs-commits
mailing list