[pkg-wine-party] [wine] 02/08: Generate the correct SERVER_PROTOCOL_VERSION.

Jens Reyer jreyer-guest at moszumanska.debian.org
Sat Oct 8 12:18:03 UTC 2016


This is an automated email from the git hooks/post-receive script.

jreyer-guest pushed a commit to branch stretch
in repository wine.

commit aaba14bc9730646c98354dedabcfe3e058294adc
Author: Jens Reyer <jre.winesim at gmail.com>
Date:   Tue Sep 20 15:30:12 2016 +0200

    Generate the correct SERVER_PROTOCOL_VERSION.
    
    Closes in development: #836911
    Closes: #836566
    
    SERVER_PROTOCOL_VERSION is used to check if the running server's
    and the client's version match. It is set in
    include/wine/server_protocol.h (490 in 1.8.4), and increased by
    1 by make_requests. But we clean server_protocol.h because it is
    generated, so SERVER_PROTOCOL_VERSION in Debian is always 1.
    
    To fix this retrieve SERVER_PROTOCOL_VERSION on upstream import
    before server_protocol.h is cleaned, and store it (decreased by
    1) in request.patch. make_request will then regenerate
    server_protocol.h with the correct SERVER_PROTOCOL_VERSION.
    
    # Conflicts:
    #	debian/changelog
    #	debian/patches/generate/request.patch
    
    Note cherrypick: Change initial version in requests.patch to 490
    and adapt bug numbers.
---
 debian/changelog                      |  1 +
 debian/patches/generate/request.patch | 19 +++++++++++++++++--
 debian/scripts/import                 |  8 ++++++++
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index bf36980..948c8c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ wine (1.8.4-2) UNRELEASED; urgency=medium
 
   * Cherrypick changes from master:
     - Make libc6-dev dependency portable.
+    - Generate the correct SERVER_PROTOCOL_VERSION (closes: #836566).
 
  -- Jens Reyer <jre.winesim at gmail.com>  Fri, 23 Sep 2016 14:09:58 +0200
 
diff --git a/debian/patches/generate/request.patch b/debian/patches/generate/request.patch
index 9c3f1c9..dbaa0bf 100644
--- a/debian/patches/generate/request.patch
+++ b/debian/patches/generate/request.patch
@@ -3,7 +3,22 @@ author: Michael Gilbert <mgilbert at debian.org>
 
 --- a/tools/make_requests
 +++ b/tools/make_requests
-@@ -437,7 +437,7 @@ foreach my $err (sort keys %errors)
+@@ -270,13 +270,7 @@ sub PARSE_REQUESTS()
+ 
+ sub GET_PROTOCOL_VERSION()
+ {
+-    my $protocol = 0;
+-    open SERVER_PROT, "include/wine/server_protocol.h" or return 0;
+-    while (<SERVER_PROT>)
+-    {
+-        if (/^\#define SERVER_PROTOCOL_VERSION (\d+)/) { $protocol = $1; last; }
+-    }
+-    close SERVER_PROT;
++    my $protocol = 489;
+     return $protocol;
+ }
+ 
+@@ -437,7 +431,7 @@ foreach my $err (sort keys %errors)
  push @trace_lines, "    { NULL, 0 }\n";
  push @trace_lines, "};\n";
  
@@ -12,7 +27,7 @@ author: Michael Gilbert <mgilbert at debian.org>
                   "### make_requests begin ###",
                   "### make_requests end ###",
                   @trace_lines );
-@@ -464,7 +464,7 @@ foreach my $type (sort keys %formats)
+@@ -464,7 +458,7 @@ foreach my $type (sort keys %formats)
  push @request_lines, @asserts;
  push @request_lines, "\n#endif  /* WANT_REQUEST_HANDLERS */\n";
  
diff --git a/debian/scripts/import b/debian/scripts/import
index c28c689..3d530ab 100755
--- a/debian/scripts/import
+++ b/debian/scripts/import
@@ -49,3 +49,11 @@ dch -v "$version-1" "New upstream release $version, released $release_date."
 sed -n 's/^  - \(.*\)/- \1/p' ANNOUNCE | while read line; do
   dch $line
 done
+
+# set upstream's SERVER_PROTOCOL_VERSION in request.patch
+# this is usually stored in include/wine/server_protocol.h, but we clean that file because it is generated
+proto_version=$(expr $(grep "#define SERVER_PROTOCOL_VERSION" include/wine/server_protocol.h | cut -d\  -f 3) - 1)
+[ "$proto_version" -lt 32767 ] || {
+    echo "error: proto_version $proto_version is not valid."
+    exit 1;}
+sed -i "s|\(+    my \$protocol = \)[[:digit:]]*;|\1${proto_version};|" debian/patches/generate/request.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wine/wine.git



More information about the pkg-wine-party mailing list