[pkg-wine-party] [wine] 01/01: Generate the correct SERVER_PROTOCOL_VERSION.
Jens Reyer
jreyer-guest at moszumanska.debian.org
Tue Sep 13 19:18:13 UTC 2016
This is an automated email from the git hooks/post-receive script.
jreyer-guest pushed a commit to branch master
in repository wine.
commit 8103285d2870713930df7004a2afa292902461af
Author: Jens Reyer <jre.winesim at gmail.com>
Date: Tue Sep 13 21:17:02 2016 +0200
Generate the correct SERVER_PROTOCOL_VERSION.
Closes: #836911
Closes in stable: #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 (currently 515), 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.
---
debian/changelog | 7 +++++++
debian/patches/generate/request.patch | 23 +++++++++++++++++++----
debian/scripts/import | 8 ++++++++
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9c4058e..b7788da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+wine-development (1.9.18-2) UNRELEASED; urgency=medium
+
+ * Generate the correct SERVER_PROTOCOL_VERSION (closes: #836911, see also
+ in stable: #836566).
+
+ -- Jens Reyer <jre.winesim at gmail.com> Tue, 13 Sep 2016 21:12:17 +0200
+
wine-development (1.9.18-1) unstable; urgency=medium
[ Michael Gilbert ]
diff --git a/debian/patches/generate/request.patch b/debian/patches/generate/request.patch
index 60238fb..e008b8e 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
-@@ -436,7 +436,7 @@ foreach my $err (sort keys %errors)
+@@ -269,13 +269,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 = 514;
+ return $protocol;
+ }
+
+@@ -436,7 +430,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 );
-@@ -463,7 +463,7 @@ foreach my $type (sort keys %formats)
+@@ -463,7 +457,7 @@ foreach my $type (sort keys %formats)
push @request_lines, @asserts;
push @request_lines, "\n#endif /* WANT_REQUEST_HANDLERS */\n";
@@ -35,7 +50,7 @@ author: Michael Gilbert <mgilbert at debian.org>
DECL_HANDLER(new_process);
DECL_HANDLER(get_new_process_info);
-@@ -2309,9 +2309,8 @@ C_ASSERT( FIELD_OFFSET(struct terminate_
+@@ -2349,9 +2349,8 @@ C_ASSERT( FIELD_OFFSET(struct terminate_
C_ASSERT( FIELD_OFFSET(struct terminate_job_request, status) == 16 );
C_ASSERT( sizeof(struct terminate_job_request) == 24 );
@@ -61,7 +76,7 @@ author: Michael Gilbert <mgilbert at debian.org>
static void dump_new_process_request( const struct new_process_request *req )
{
-@@ -5310,8 +5311,7 @@ static const struct
+@@ -5395,8 +5396,7 @@ static const struct
{ NULL, 0 }
};
diff --git a/debian/scripts/import b/debian/scripts/import
index 3affb39..2728b30 100755
--- a/debian/scripts/import
+++ b/debian/scripts/import
@@ -37,3 +37,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