rpms/cups/F-9 cups-res_init.patch,NONE,1.1 cups.spec,1.421,1.422
Tim Waugh
twaugh at fedoraproject.org
Wed Sep 3 15:01:25 UTC 2008
- Previous message: rpms/cups/devel cups-res_init.patch,NONE,1.1 cups.spec,1.435,1.436
- Next message: rpms/sane-backends/devel sane-backends-1.0.19-glibc-2.7.patch, NONE, 1.1 sane-backends.spec, 1.110, 1.111 sane-backends-1.0.18-glibc-2.7.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7104
Modified Files:
cups.spec
Added Files:
cups-res_init.patch
Log Message:
* Wed Sep 3 2008 Tim Waugh <twaugh at redhat.com>
- cups-polld: reinit the resolver if we haven't yet resolved the
hostname (bug #354071).
cups-res_init.patch:
--- NEW FILE cups-res_init.patch ---
diff -up cups-1.3.8/config.h.in.res_init cups-1.3.8/config.h.in
--- cups-1.3.8/config.h.in.res_init 2008-09-03 15:59:04.000000000 +0100
+++ cups-1.3.8/config.h.in 2008-09-03 15:59:11.000000000 +0100
@@ -365,6 +365,13 @@
/*
+ * Do we have __res_init()?
+ */
+
+#undef HAVE_RES_INIT
+
+
+/*
* Do we have hstrerror()?
*/
diff -up cups-1.3.8/config-scripts/cups-network.m4.res_init cups-1.3.8/config-scripts/cups-network.m4
--- cups-1.3.8/config-scripts/cups-network.m4.res_init 2007-12-19 01:47:57.000000000 +0000
+++ cups-1.3.8/config-scripts/cups-network.m4 2008-09-03 15:59:11.000000000 +0100
@@ -18,6 +18,7 @@ AC_SEARCH_LIBS(gethostbyaddr, nsl)
AC_SEARCH_LIBS(getifaddrs, nsl, AC_DEFINE(HAVE_GETIFADDRS))
AC_SEARCH_LIBS(hstrerror, nsl socket resolv, AC_DEFINE(HAVE_HSTRERROR))
AC_SEARCH_LIBS(rresvport_af, nsl, AC_DEFINE(HAVE_RRESVPORT_AF))
+AC_SEARCH_LIBS(__res_init, resolv bind, AC_DEFINE(HAVE_RES_INIT))
# Tru64 5.1b leaks file descriptors with these functions; disable until
# we can come up with a test for this...
diff -up cups-1.3.8/configure.res_init cups-1.3.8/configure
--- cups-1.3.8/configure.res_init 2008-09-03 15:59:04.000000000 +0100
+++ cups-1.3.8/configure 2008-09-03 15:59:11.000000000 +0100
@@ -12192,6 +12192,92 @@ _ACEOF
fi
+{ echo "$as_me:$LINENO: checking for library containing __res_init" >&5
+echo $ECHO_N "checking for library containing __res_init... $ECHO_C" >&6; }
+if test "${ac_cv_search___res_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __res_init ();
+int
+main ()
+{
+return __res_init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' resolv bind; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_search___res_init=$ac_res
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search___res_init+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search___res_init+set}" = set; then
+ :
+else
+ ac_cv_search___res_init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search___res_init" >&5
+echo "${ECHO_T}$ac_cv_search___res_init" >&6; }
+ac_res=$ac_cv_search___res_init
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_RES_INIT 1
+_ACEOF
+
+fi
+
# Tru64 5.1b leaks file descriptors with these functions; disable until
# we can come up with a test for this...
diff -up cups-1.3.8/scheduler/cups-polld.c.res_init cups-1.3.8/scheduler/cups-polld.c
--- cups-1.3.8/scheduler/cups-polld.c.res_init 2008-01-08 00:16:30.000000000 +0000
+++ cups-1.3.8/scheduler/cups-polld.c 2008-09-03 15:59:11.000000000 +0100
@@ -155,6 +155,18 @@ main(int argc, /* I - Number of comm
restart_polling = 0;
httpClose(http);
+#ifdef HAVE_RES_INIT
+ if (!http)
+ {
+ /*
+ * Reinit the resolver so that it doesn't cache a previous
+ * hostname lookup failure. This fixes the situation where a
+ * network interface becomes available after polling starts.
+ */
+ __res_init ();
+ }
+#endif /* HAVE_RES_INIT */
+
if ((http = httpConnectEncrypt(argv[1], atoi(argv[2]),
cupsEncryption())) == NULL)
{
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups.spec,v
retrieving revision 1.421
retrieving revision 1.422
diff -u -r1.421 -r1.422
--- cups.spec 5 Aug 2008 08:38:35 -0000 1.421
+++ cups.spec 3 Sep 2008 15:00:55 -0000 1.422
@@ -48,6 +48,7 @@
Patch21: cups-usb-paperout.patch
Patch22: cups-getnameddest.patch
Patch23: cups-str2892.patch
+Patch24: cups-res_init.patch
Patch100: cups-lspp.patch
Epoch: 1
Url: http://www.cups.org/
@@ -166,6 +167,7 @@
%patch21 -p1 -b .usb-paperout
%patch22 -p1 -b .getnameddest
%patch23 -p1 -b .str2892
+%patch24 -p1 -b .res_init
%if %lspp
%patch100 -p1 -b .lspp
@@ -448,6 +450,10 @@
%{cups_serverbin}/daemon/cups-lpd
%changelog
+* Wed Sep 3 2008 Tim Waugh <twaugh at redhat.com>
+- cups-polld: reinit the resolver if we haven't yet resolved the
+ hostname (bug #354071).
+
* Tue Aug 5 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.8-2
- Mark template files config(noreplace) for site-local modifications
(bug #441719).
- Previous message: rpms/cups/devel cups-res_init.patch,NONE,1.1 cups.spec,1.435,1.436
- Next message: rpms/sane-backends/devel sane-backends-1.0.19-glibc-2.7.patch, NONE, 1.1 sane-backends.spec, 1.110, 1.111 sane-backends-1.0.18-glibc-2.7.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list