pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44713: net/mDNSResponder patch failure on Linux



>Number:         44713
>Category:       pkg
>Synopsis:       net/mDNSResponder patch failure on Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 12 11:50:00 +0000 2011
>Originator:     Gregoire Sutre
>Release:        n/a
>Organization:
>Environment:
Debian GNU/Linux amd64 (testing)
Linux tahoe 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux

>Description:
The net/mDNSResponder patch `patches/patch-Clients_dns-sd.c' does not
apply on my Linux box.  After some digging, it turns out that this
patch applies with fuzz factor 1:

$ cd pkgsrc/net/mDNSResponder
$ bmake extract
...
$ /usr/bin/patch -F0 -d /tmp/pkgsrc/net/mDNSResponder/work/mDNSResponder-258.14 
-E -p0 -b -V simple -z .orig < patches/patch-Clients_dns-sd.c
patching file Clients/dns-sd.c
Hunk #1 FAILED at 169.
1 out of 1 hunk FAILED -- saving rejects to file Clients/dns-sd.c.rej
$ /usr/bin/patch -F1 -d /tmp/pkgsrc/net/mDNSResponder/work/mDNSResponder-258.14 
-E -p0 -b -V simple -z .orig < patches/patch-Clients_dns-sd.c
patching file Clients/dns-sd.c
Hunk #1 succeeded at 169 with fuzz 1.

$ /usr/bin/patch --version
patch 2.6.1
Copyright (C) 1988 Larry Wall
Copyright (C) 2003, 2009 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall and Paul Eggert


For the record, I could confirm on a NetBSD -current box that GNU patch
(v. 2.5.4) uses a fuzz factor of one for this patch file, while NetBSD
patch (v. 2.0-12u8-NetBSD) uses no fuzz factor.


>How-To-Repeat:
On a Debian GNU/Linux box with a pkgsrc installation, run the following
commands:

$ cd pkgsrc/net/mDNSResponder
$ bmake
=> Bootstrap dependency digest>=20010302: found digest-20080510
=> Bootstrap dependency tnftp-[0-9]*: found tnftp-20070806
=> Checksum SHA1 OK for mDNSResponder-258.14.tar.gz
=> Checksum RMD160 OK for mDNSResponder-258.14.tar.gz
===> Installing dependencies for mDNSResponder-258.14
==========================================================================
The supported build options for mDNSResponder are:

        inet6

You can select which build options to use by setting PKG_DEFAULT_OPTIONS
or the following variable.  Its current value is shown:

        PKG_OPTIONS.mDNSResponder (not defined)

==========================================================================
=> Build dependency flex>=2.5.4a: found flex-2.5.35nb1
===> Overriding tools for mDNSResponder-258.14
===> Extracting for mDNSResponder-258.14
===> Patching for mDNSResponder-258.14
=> Applying pkgsrc patches for mDNSResponder-258.14
1 out of 1 hunk FAILED -- saving rejects to file Clients/dns-sd.c.rej
Patch /home/sutre/pkgsrc/net/mDNSResponder/patches/patch-Clients_dns-sd.c failed
ERROR: Patching failed due to modified or broken patch file(s):
ERROR:  /home/sutre/pkgsrc/net/mDNSResponder/patches/patch-Clients_dns-sd.c
*** Error code 1

Stop.
bmake: stopped in /home/sutre/pkgsrc/net/mDNSResponder
*** Error code 1

Stop.
bmake: stopped in /home/sutre/pkgsrc/net/mDNSResponder

>Fix:
The following patch fixes the problem for me.  It was obtained by
regenerating the patches with mkpatches on a NetBSD box.

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/mDNSResponder/distinfo,v
retrieving revision 1.26
diff -u -r1.26 distinfo
--- distinfo    24 Feb 2011 22:42:20 -0000      1.26
+++ distinfo    12 Mar 2011 11:13:54 -0000
@@ -3,7 +3,7 @@
 SHA1 (mDNSResponder-258.14.tar.gz) = 2a34794ff9a5184ce1e57ccea4001b5af6635f7b
 RMD160 (mDNSResponder-258.14.tar.gz) = fbd9dcfa84dbeb9de379066958a0b509af074dbc
 Size (mDNSResponder-258.14.tar.gz) = 1833244 bytes
-SHA1 (patch-Clients_dns-sd.c) = 7668343367e4b0bbe50dd98ed12db9d37edca740
+SHA1 (patch-Clients_dns-sd.c) = bd866bfba6baa95f31275629c20a2b7a9e8a667a
 SHA1 (patch-aa) = 3f31f10ab6bf0d3ec72b56791cc4db5f24bfeb0b
 SHA1 (patch-ab) = 8567d3a9849377fdfd1fd98f1b0dd164561bb6c9
 SHA1 (patch-ac) = 3fb065c49ed434f031ea29214ec4140b24f8da64
Index: patches/patch-Clients_dns-sd.c
===================================================================
RCS file: /cvsroot/pkgsrc/net/mDNSResponder/patches/patch-Clients_dns-sd.c,v
retrieving revision 1.2
diff -u -r1.2 patch-Clients_dns-sd.c
--- patches/patch-Clients_dns-sd.c      24 Feb 2011 22:42:20 -0000      1.2
+++ patches/patch-Clients_dns-sd.c      12 Mar 2011 11:13:54 -0000
@@ -2,8 +2,7 @@
 
 --- Clients/dns-sd.c.orig      2010-05-15 00:16:11.000000000 +0000
 +++ Clients/dns-sd.c
-@@ -169,9 +169,20 @@ cl dns-sd.c -I../mDNSShared -DNOT_HAVE_G
-       #include <netinet/in.h>         // For struct sockaddr_in()
+@@ -170,8 +170,19 @@ cl dns-sd.c -I../mDNSShared -DNOT_HAVE_G
        #include <arpa/inet.h>          // For inet_addr()
        #include <net/if.h>                     // For if_nametoindex()
        static const char kFilePathSep = '/';



Home | Main Index | Thread Index | Old Index