r15863 - in packages/trunk/pokerth/debian: . patches

Markus Koschany apo at moszumanska.debian.org
Tue Aug 23 20:52:58 UTC 2016


Author: apo
Date: 2016-08-23 20:52:57 +0000 (Tue, 23 Aug 2016)
New Revision: 15863

Added:
   packages/trunk/pokerth/debian/patches/qmake-gcc-6.patch
   packages/trunk/pokerth/debian/patches/std-ifstream-and-std-ofstream.patch
   packages/trunk/pokerth/debian/pokerth-server.README.Debian
   packages/trunk/pokerth/debian/pokerth-server.links
   packages/trunk/pokerth/debian/pokerth-server.lintian-overrides
   packages/trunk/pokerth/debian/pokerth-server.postinst
   packages/trunk/pokerth/debian/pokerth-server.postrm
   packages/trunk/pokerth/debian/pokerth-server.service
   packages/trunk/pokerth/debian/pokerth_server.6
Removed:
   packages/trunk/pokerth/debian/pokerth_server.1
Modified:
   packages/trunk/pokerth/debian/changelog
   packages/trunk/pokerth/debian/control
   packages/trunk/pokerth/debian/copyright
   packages/trunk/pokerth/debian/patches/03_use_--as-needed.patch
   packages/trunk/pokerth/debian/patches/10_fix_ftbfs_with_new_libircclient.patch
   packages/trunk/pokerth/debian/patches/qtsingleapplication-qt55-ftbfs.patch
   packages/trunk/pokerth/debian/patches/series
   packages/trunk/pokerth/debian/pokerth-data.links
   packages/trunk/pokerth/debian/pokerth-server.manpages
   packages/trunk/pokerth/debian/pokerth.install
   packages/trunk/pokerth/debian/rules
Log:
Release pokerth 1.1.1-4


Modified: packages/trunk/pokerth/debian/changelog
===================================================================
--- packages/trunk/pokerth/debian/changelog	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/changelog	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,3 +1,31 @@
+pokerth (1.1.1-4) unstable; urgency=medium
+
+  * Team upload.
+  * Declare compliance with Debian Policy 3.9.8.
+  * wrap-and-sort -sa.
+  * Vcs-Browser: Use https.
+  * Switch from ttf-dejavu-core to fonts-dejavu-core.
+  * Add qmake-gcc-6.patch and std-ifstream-and-std-ofstream.patch and fix
+    build failures with GCC-6. (Closes: #812290, #828116)
+  * d/rules: Add QMAKE_CXXFLAGS+="-std=gnu++98" flag to configure and force
+    building with the older gnu++98 standard.
+  * d/rules: export DEB_BUILD_MAINT_OPTIONS = hardening=+all.
+  * Add pokerth-server.service file and support systemd. (Closes: #772931)
+  * d/control: pokerth-server: Depend on pokerth-data and adduser.
+  * Add pokerth-server.postinst and pokerth-server.postrm maintainer scripts
+    and start the server with system user _pokerth in
+    /var/games/pokerth-server.
+  * Add pokerth-server.links and symlink required data into
+    /var/games/pokerth-server. (Closes: #772929)
+  * Build with --parallel.
+  * Build with systemd and build-depend on dh-systemd.
+  * Install pokerth_server man page into section 6 (games).
+  * Add pokerth-server.lintian-overrides because we ship a service file
+    already.
+  * Add README.Debian file for pokerth-server.
+
+ -- Markus Koschany <apo at debian.org>  Tue, 23 Aug 2016 22:19:15 +0200
+
 pokerth (1.1.1-3) unstable; urgency=medium
 
   * Update d/copyright, thanks lintian.

Modified: packages/trunk/pokerth/debian/control
===================================================================
--- packages/trunk/pokerth/debian/control	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/control	2016-08-23 20:52:57 UTC (rev 15863)
@@ -2,26 +2,45 @@
 Section: games
 Priority: optional
 Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
-Uploaders: Evgeni Golov <evgeni at debian.org>
-Build-Depends: debhelper (>= 9),
+Uploaders:
+ Evgeni Golov <evgeni at debian.org>
+Build-Depends:
+ debhelper (>= 9),
+ dh-systemd,
+ libboost-date-time-dev (>= 1.42.0),
+ libboost-filesystem-dev (>= 1.42.0),
+ libboost-iostreams-dev (>= 1.42.0),
+ libboost-program-options-dev (>= 1.42.0),
+ libboost-random-dev (>= 1.42.0),
+ libboost-regex-dev (>= 1.42.0),
+ libboost-system-dev (>= 1.42.0),
+ libboost-thread-dev (>= 1.42.0),
+ libcurl4-gnutls-dev,
+ libgcrypt20-dev,
+ libgsasl7-dev,
+ libircclient-dev (>= 1.8-1~),
+ libprotobuf-dev,
+ libqt4-dev [x32],
+ libsdl-mixer1.2-dev,
+ libsdl1.2-dev,
+ libsqlite3-dev,
+ libtinyxml-dev,
+ protobuf-compiler,
  qtbase5-dev [!x32],
- libqt4-dev [x32],
- qtchooser, libgsasl7-dev, libsdl1.2-dev,
- libsdl-mixer1.2-dev, libcurl4-gnutls-dev, libsqlite3-dev,
- libboost-filesystem-dev (>= 1.42.0), libboost-thread-dev (>= 1.42.0),
- libboost-iostreams-dev (>= 1.42.0), libboost-system-dev (>= 1.42.0),
- libboost-program-options-dev (>= 1.42.0), libboost-date-time-dev (>= 1.42.0),
- libboost-regex-dev (>= 1.42.0), libboost-random-dev (>= 1.42.0),
- libircclient-dev (>= 1.8-1~), libtinyxml-dev, libprotobuf-dev,
- protobuf-compiler, libgcrypt20-dev
-Standards-Version: 3.9.6
+ qtchooser
+Standards-Version: 3.9.8
 Vcs-Svn: svn://anonscm.debian.org/pkg-games/packages/trunk/pokerth/
-Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-games/packages/trunk/pokerth/
+Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/pokerth/
 Homepage: http://www.pokerth.net/
 
 Package: pokerth
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, pokerth-data (= ${source:Version}), gsfonts-x11, ttf-dejavu-core
+Depends:
+ gsfonts-x11,
+ pokerth-data (= ${source:Version}),
+ fonts-dejavu-core,
+ ${misc:Depends},
+ ${shlibs:Depends}
 Description: Texas hold'em game
  pokerth is a free implementation of the Texas hold'em poker game which is
  mostly played in casinos and has a growing popularity worldwide. Texas hold'em
@@ -30,7 +49,11 @@
 
 Package: pokerth-server
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends:
+ adduser,
+ pokerth-data (= ${source:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends}
 Description: Texas hold'em game - server
  pokerth is a free implementation of the Texas hold'em poker game which is
  mostly played in casinos and has a growing popularity worldwide. Texas hold'em
@@ -43,7 +66,8 @@
 
 Package: pokerth-data
 Architecture: all
-Depends: ${misc:Depends}
+Depends:
+ ${misc:Depends}
 Description: Texas hold'em game - common data files
  pokerth is a free implementation of the Texas hold'em poker game which is
  mostly played in casinos and has a growing popularity worldwide. Texas hold'em

Modified: packages/trunk/pokerth/debian/copyright
===================================================================
--- packages/trunk/pokerth/debian/copyright	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/copyright	2016-08-23 20:52:57 UTC (rev 15863)
@@ -34,7 +34,7 @@
 Copyright: Vaucher Philippe 2007
 License: BSL-1
 
-Files: src/third_party/websocketpp/websocketpp/* 
+Files: src/third_party/websocketpp/websocketpp/*
 Copyright: 2013 Peter Thorson
 License: BSD-3-clause
 
@@ -57,7 +57,7 @@
 Files: src/third_party/sqlite3/*
 Copyright: none
 License: public-domain
- The author disclaims copyright to this source code.  
+ The author disclaims copyright to this source code.
 
 Files: data/fonts/DejaVuSans-Bold.ttf
 Copyright: 2003 Bitstream, Inc.

Modified: packages/trunk/pokerth/debian/patches/03_use_--as-needed.patch
===================================================================
--- packages/trunk/pokerth/debian/patches/03_use_--as-needed.patch	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/patches/03_use_--as-needed.patch	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,9 +1,17 @@
-Author: Evgeni Golov <sargentd at die-welt.net>
-Description: Re-enable --as-needed for pokerth, after it was removed as default
+From: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
+Date: Tue, 23 Aug 2016 17:50:06 +0200
+Subject: _use_--as-needed
+
 from the libqt4-dev package. *NOTE: updated for 0.9.1 upstream release
---- PokerTH-0.9.1-src-orig/pokerth_game.pro
-+++ PokerTH-0.9.1-src/pokerth_game.pro
-@@ -22,6 +22,8 @@
+---
+ pokerth_game.pro | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/pokerth_game.pro b/pokerth_game.pro
+index d660452..e3ddb03 100644
+--- a/pokerth_game.pro
++++ b/pokerth_game.pro
+@@ -26,6 +26,8 @@ DEFINES += ENABLE_IPV6 TIXML_USE_STL BOOST_FILESYSTEM_DEPRECATED
  DEFINES += PREFIX=\"$${PREFIX}\"
  TARGET = pokerth
  

Modified: packages/trunk/pokerth/debian/patches/10_fix_ftbfs_with_new_libircclient.patch
===================================================================
--- packages/trunk/pokerth/debian/patches/10_fix_ftbfs_with_new_libircclient.patch	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/patches/10_fix_ftbfs_with_new_libircclient.patch	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,16 +1,15 @@
-Description: fix FTBFS with new libircclient
- The current version of libircclient-dev drops the libircclient/ prefix on its
- include files. Update the #includes used by pokerth to follow this change.
-Bug: https://github.com/pokerth/pokerth/issues/282
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759851
-Forwarded: not-needed
-Last-Update: 2014-09-13
+From: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
+Date: Tue, 23 Aug 2016 17:50:06 +0200
+Subject: _fix_ftbfs_with_new_libircclient
+
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: pokerth-1.1.1/src/net/common/ircthread.cpp
-===================================================================
---- pokerth-1.1.1.orig/src/net/common/ircthread.cpp
-+++ pokerth-1.1.1/src/net/common/ircthread.cpp
+ src/net/common/ircthread.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/net/common/ircthread.cpp b/src/net/common/ircthread.cpp
+index 5b8cad2..9fe5798 100644
+--- a/src/net/common/ircthread.cpp
++++ b/src/net/common/ircthread.cpp
 @@ -32,14 +32,14 @@
  #include <net/socket_helper.h>
  #include <net/ircthread.h>

Added: packages/trunk/pokerth/debian/patches/qmake-gcc-6.patch
===================================================================
--- packages/trunk/pokerth/debian/patches/qmake-gcc-6.patch	                        (rev 0)
+++ packages/trunk/pokerth/debian/patches/qmake-gcc-6.patch	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,86 @@
+From: Markus Koschany <apo at debian.org>
+Date: Tue, 23 Aug 2016 17:50:52 +0200
+Subject: qmake gcc-6
+
+---
+ chatcleaner.pro      | 1 -
+ pokerth_db.pro       | 1 -
+ pokerth_game.pro     | 1 -
+ pokerth_lib.pro      | 2 +-
+ pokerth_protocol.pro | 1 -
+ pokerth_server.pro   | 1 -
+ 6 files changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/chatcleaner.pro b/chatcleaner.pro
+index 6d63b4a..56070d8 100644
+--- a/chatcleaner.pro
++++ b/chatcleaner.pro
+@@ -49,7 +49,6 @@ win32 {
+ !win32{
+ 	##### My release static build options
+ 	#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
+-	INCLUDEPATH += $${PREFIX}/include
+ }
+ mac {
+ 	# make it x86_64 only
+diff --git a/pokerth_db.pro b/pokerth_db.pro
+index 7c2d142..c524ee3 100644
+--- a/pokerth_db.pro
++++ b/pokerth_db.pro
+@@ -49,7 +49,6 @@ win32{
+ !win32{
+ 	##### My release static build options
+ 	#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
+-	INCLUDEPATH += $${PREFIX}/include
+ }
+ 
+ mac{
+diff --git a/pokerth_game.pro b/pokerth_game.pro
+index e3ddb03..e0e8660 100644
+--- a/pokerth_game.pro
++++ b/pokerth_game.pro
+@@ -404,7 +404,6 @@ unix:!mac {
+ 	# #### My release static build options
+ 	# QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
+ 	# QMAKE_LFLAGS += -Wl,--gc-sections
+-	INCLUDEPATH += $${PREFIX}/include
+ 	QMAKE_LIBDIR += lib
+ 	!android{
+ 		LIBPATH += $${PREFIX}/lib /opt/gsasl/lib
+diff --git a/pokerth_lib.pro b/pokerth_lib.pro
+index 6db489d..498d06e 100644
+--- a/pokerth_lib.pro
++++ b/pokerth_lib.pro
+@@ -243,7 +243,7 @@ win32{
+ !win32{
+ 	##### My release static build options
+ 	#QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
+-	INCLUDEPATH += $${PREFIX}/include /opt/gsasl/include
++	INCLUDEPATH += /opt/gsasl/include
+ }
+ 
+ mac{
+diff --git a/pokerth_protocol.pro b/pokerth_protocol.pro
+index 7a331df..2ead0ec 100644
+--- a/pokerth_protocol.pro
++++ b/pokerth_protocol.pro
+@@ -33,7 +33,6 @@ win32 {
+ 	DEFINES += _WIN32_WINNT=0x0501
+ }
+ unix : !mac {
+-        INCLUDEPATH += $${PREFIX}/include
+ 	system(protoc pokerth.proto --cpp_out=src/third_party/protobuf)
+ 	system(protoc chatcleaner.proto --cpp_out=src/third_party/protobuf)
+ 	system(protoc pokerth.proto --java_out=tests/src)
+diff --git a/pokerth_server.pro b/pokerth_server.pro
+index 706475f..43b30f3 100644
+--- a/pokerth_server.pro
++++ b/pokerth_server.pro
+@@ -174,7 +174,6 @@ unix : !mac {
+ 	#QMAKE_LFLAGS += -Wl,--gc-sections
+ 
+ 	LIBPATH += lib $${PREFIX}/lib /opt/gsasl/lib
+-	INCLUDEPATH += $${PREFIX}/include
+ 	LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
+ 	BOOST_FS = boost_filesystem boost_filesystem-mt
+ 	BOOST_THREAD = boost_thread boost_thread-mt

Modified: packages/trunk/pokerth/debian/patches/qtsingleapplication-qt55-ftbfs.patch
===================================================================
--- packages/trunk/pokerth/debian/patches/qtsingleapplication-qt55-ftbfs.patch	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/patches/qtsingleapplication-qt55-ftbfs.patch	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,7 +1,6 @@
-From 731f5f05f54065a67fa7c9f9bc8fe992390cb979 Mon Sep 17 00:00:00 2001
 From: Felix Hammer <f.hammer at web.de>
 Date: Fri, 7 Aug 2015 00:57:51 +0200
-Subject: [PATCH] Qt 5.5.0 patch for qtsingleapplication
+Subject: Qt 5.5.0 patch for qtsingleapplication
 
 ---
  src/third_party/qtsingleapplication/qtlocalpeer.cpp | 1 +

Modified: packages/trunk/pokerth/debian/patches/series
===================================================================
--- packages/trunk/pokerth/debian/patches/series	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/patches/series	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,3 +1,5 @@
 03_use_--as-needed.patch
 10_fix_ftbfs_with_new_libircclient.patch
 qtsingleapplication-qt55-ftbfs.patch
+qmake-gcc-6.patch
+std-ifstream-and-std-ofstream.patch

Added: packages/trunk/pokerth/debian/patches/std-ifstream-and-std-ofstream.patch
===================================================================
--- packages/trunk/pokerth/debian/patches/std-ifstream-and-std-ofstream.patch	                        (rev 0)
+++ packages/trunk/pokerth/debian/patches/std-ifstream-and-std-ofstream.patch	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,151 @@
+From: Jonathan Wakely <github at kayari.org>
+Date: Thu, 26 Nov 2015 16:27:52 +0000
+Subject: Qualify std::ifstream and std::ofstream
+
+Starting with Boost 1.60.0 <boost/filesystem.hpp> includes
+<boost/filesystem/fstream.hpp>, which declares ifstream and ofstream
+types that make the unqualified names ifstream and ofstream ambiguous.
+The names must be qualified to refer to the std versions.
+
+Upstream pull request at: https://github.com/pokerth/pokerth/pull/299
+---
+ src/core/common/avatarmanager.cpp    | 4 ++--
+ src/core/common/loghelper_server.cpp | 6 +++---
+ src/net/common/clientstate.cpp       | 4 ++--
+ src/net/common/clientthread.cpp      | 4 ++--
+ src/net/common/downloaderthread.cpp  | 2 +-
+ src/pokerth_server.cpp               | 2 +-
+ src/zlib_compress.cpp                | 4 ++--
+ 7 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/core/common/avatarmanager.cpp b/src/core/common/avatarmanager.cpp
+index d9b9fd4..d137a5c 100644
+--- a/src/core/common/avatarmanager.cpp
++++ b/src/core/common/avatarmanager.cpp
+@@ -61,7 +61,7 @@ using namespace std;
+ using namespace boost::filesystem;
+ 
+ struct AvatarFileState {
+-	ifstream		inputStream;
++	std::ifstream		inputStream;
+ };
+ 
+ AvatarManager::AvatarManager(bool useExternalServer, const std::string &externalServerAddress,
+@@ -363,7 +363,7 @@ AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFil
+ 				path tmpPath(cacheDir);
+ 				tmpPath /= (md5buf.ToString() + ext);
+ 				string fileName(tmpPath.file_string());
+-				ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc);
++				std::ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc);
+ 				if (!o.fail()) {
+ 					o.write((const char *)data, size);
+ 					o.close();
+diff --git a/src/core/common/loghelper_server.cpp b/src/core/common/loghelper_server.cpp
+index f79e4ca..a0d0350 100644
+--- a/src/core/common/loghelper_server.cpp
++++ b/src/core/common/loghelper_server.cpp
+@@ -67,7 +67,7 @@ void
+ internal_log_err(const string &msg)
+ {
+ 	if (!g_logFile.empty()) {
+-		ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
++		std::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
+ 		if (!o.fail()) {
+ 			o << second_clock::local_time() << " ERR: " << msg;
+ 			o.flush();
+@@ -80,7 +80,7 @@ internal_log_msg(const std::string &msg)
+ {
+ 	if (g_logLevel) {
+ 		if (!g_logFile.empty()) {
+-			ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
++			std::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
+ 			if (!o.fail())
+ 				o << second_clock::local_time() << " MSG: " << msg;
+ 		}
+@@ -92,7 +92,7 @@ internal_log_level(const std::string &msg, int logLevel)
+ {
+ 	if (g_logLevel >= logLevel) {
+ 		if (!g_logFile.empty()) {
+-			ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
++			std::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
+ 			if (!o.fail())
+ 				o << second_clock::local_time() << " OUT: " << msg;
+ 		}
+diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp
+index 84921ce..58fd5fb 100644
+--- a/src/net/common/clientstate.cpp
++++ b/src/net/common/clientstate.cpp
+@@ -302,8 +302,8 @@ ClientStateReadingServerList::Enter(boost::shared_ptr<ClientThread> client)
+ 
+ 		// Unzip the file using zlib.
+ 		try {
+-			ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary);
+-			ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc);
++			std::ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary);
++			std::ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc);
+ 			boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
+ 			in.push(boost::iostreams::zlib_decompressor());
+ 			in.push(inFile);
+diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp
+index c36e94a..45b79cb 100644
+--- a/src/net/common/clientthread.cpp
++++ b/src/net/common/clientthread.cpp
+@@ -1604,7 +1604,7 @@ void
+ ClientThread::ReadSessionGuidFromFile()
+ {
+ 	string guidFileName(GetContext().GetCacheDir() + TEMP_GUID_FILENAME);
+-	ifstream guidStream(guidFileName.c_str(), ios::in | ios::binary);
++	std::ifstream guidStream(guidFileName.c_str(), ios::in | ios::binary);
+ 	if (guidStream.good()) {
+ 		std::vector<char> tmpGuid(CLIENT_GUID_SIZE);
+ 		guidStream.read(&tmpGuid[0], CLIENT_GUID_SIZE);
+@@ -1616,7 +1616,7 @@ void
+ ClientThread::WriteSessionGuidToFile() const
+ {
+ 	string guidFileName(GetContext().GetCacheDir() + TEMP_GUID_FILENAME);
+-	ofstream guidStream(guidFileName.c_str(), ios::out | ios::trunc | ios::binary);
++	std::ofstream guidStream(guidFileName.c_str(), ios::out | ios::trunc | ios::binary);
+ 	if (guidStream.good()) {
+ 		guidStream.write(GetContext().GetSessionGuid().c_str(), GetContext().GetSessionGuid().size());
+ 	}
+diff --git a/src/net/common/downloaderthread.cpp b/src/net/common/downloaderthread.cpp
+index e58e3f8..56a9526 100644
+--- a/src/net/common/downloaderthread.cpp
++++ b/src/net/common/downloaderthread.cpp
+@@ -96,7 +96,7 @@ DownloaderThread::Main()
+ 				// Previous download was finished.
+ 				if (m_curDownloadData) {
+ 					path filepath(m_curDownloadData->filename);
+-					ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary);
++					std::ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary);
+ 					// Find out file size.
+ 					// Not fully portable, but works on win/linux/mac.
+ 					instream.seekg(0, ios_base::beg);
+diff --git a/src/pokerth_server.cpp b/src/pokerth_server.cpp
+index 3b93d46..450a47e 100644
+--- a/src/pokerth_server.cpp
++++ b/src/pokerth_server.cpp
+@@ -161,7 +161,7 @@ main(int argc, char *argv[])
+ 		pidFile = tmpPidPath.directory_string();
+ 	}
+ 	{
+-		ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
++		std::ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
+ 		if (!pidStream.fail())
+ 			pidStream << getpid();
+ 		else
+diff --git a/src/zlib_compress.cpp b/src/zlib_compress.cpp
+index e3fd72d..4b04817 100644
+--- a/src/zlib_compress.cpp
++++ b/src/zlib_compress.cpp
+@@ -59,8 +59,8 @@ main(int argc, char *argv[])
+ 		return 2;
+ 	}
+ 	try {
+-		ifstream inFile(inputFilePath.directory_string().c_str(), ios_base::in);
+-		ofstream outFile(outputFilePath.directory_string().c_str(), ios_base::out | ios_base::binary);
++		std::ifstream inFile(inputFilePath.directory_string().c_str(), ios_base::in);
++		std::ofstream outFile(outputFilePath.directory_string().c_str(), ios_base::out | ios_base::binary);
+ 		boost::iostreams::filtering_streambuf<boost::iostreams::output> out;
+ 		out.push(boost::iostreams::zlib_compressor());
+ 		out.push(outFile);

Modified: packages/trunk/pokerth/debian/pokerth-data.links
===================================================================
--- packages/trunk/pokerth/debian/pokerth-data.links	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/pokerth-data.links	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,3 +1,3 @@
 /usr/share/fonts/X11/Type1/c059013l.pfb /usr/share/games/pokerth/fonts/c059013l.pfb
 /usr/share/fonts/X11/Type1/n019003l.pfb /usr/share/games/pokerth/fonts/n019003l.pfb
-/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf /usr/share/games/pokerth/fonts/VeraBd.ttf
+/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf /usr/share/games/pokerth/fonts/VeraBd.ttf

Added: packages/trunk/pokerth/debian/pokerth-server.README.Debian
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.README.Debian	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.README.Debian	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,18 @@
+PokerTH for Debian
+==================
+
+Debian's PokerTH server supports systemd. The pokerth-server service runs a
+dedicated server as the user "_pokerth". This is a simple setup suitable for
+running one server on a machine.
+
+The user's home directory is /var/games/pokerth-server, so you can find PokerTH
+files in the /var/games/pokerth-server/.pokerth directory.
+
+Start the server with systemctl start pokerth-server.
+
+Disabling the server
+-------------------------
+
+To disable the service, use the facilities provided by systemd.
+
+    systemd disable pokerth-server.service

Added: packages/trunk/pokerth/debian/pokerth-server.links
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.links	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.links	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,2 @@
+usr/share/games/pokerth     var/games/pokerth-server/data
+usr/games/pokerth_server    var/games/pokerth-server/pokerth_server

Added: packages/trunk/pokerth/debian/pokerth-server.lintian-overrides
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.lintian-overrides	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.lintian-overrides	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,3 @@
+# We ship a service file and I think these warnings are unwarranted
+pokerth-server: init.d-script-not-included-in-package
+pokerth-server: init.d-script-not-marked-as-conffile

Modified: packages/trunk/pokerth/debian/pokerth-server.manpages
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.manpages	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/pokerth-server.manpages	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1 +1 @@
-debian/pokerth_server.1
+debian/pokerth_server.6

Added: packages/trunk/pokerth/debian/pokerth-server.postinst
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.postinst	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.postinst	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+  configure)
+    if ! getent passwd _pokerth >/dev/null; then
+      adduser --disabled-password --quiet --system \
+        --home /var/games/pokerth-server --no-create-home \
+        --gecos "PokertTH dedicated server" \
+        --ingroup games --force-badname _pokerth
+    fi
+    install -d /var/games
+    install -d /var/games/pokerth-server
+    chown _pokerth:games /var/games/pokerth-server
+  ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+  ;;
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+#DEBHELPER#

Added: packages/trunk/pokerth/debian/pokerth-server.postrm
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.postrm	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.postrm	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+
+if [ "$1" = "purge" ] ; then
+    rm -r /var/games/pokerth-server
+    rmdir --ignore-fail-on-non-empty /var/games
+fi
+
+#DEBHELPER#

Added: packages/trunk/pokerth/debian/pokerth-server.service
===================================================================
--- packages/trunk/pokerth/debian/pokerth-server.service	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth-server.service	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,16 @@
+[Unit]
+Description=PokerTH multiplayer server
+Documentation=man:pokerth_server(6)
+After=network.target
+RequiresMountsFor=/var/games/pokerth-server
+
+[Service]
+Type=forking
+Restart=on-failure
+User=_pokerth
+ExecStart=/var/games/pokerth-server/pokerth_server
+PIDFile=/var/games/pokerth-server/.pokerth/log-files/pokerth.pid
+StandardOutput=null
+
+[Install]
+WantedBy=multi-user.target

Modified: packages/trunk/pokerth/debian/pokerth.install
===================================================================
--- packages/trunk/pokerth/debian/pokerth.install	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/pokerth.install	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,4 +1,4 @@
+debian/pokerth.xpm usr/share/pixmaps/
 pokerth usr/games
 pokerth.desktop usr/share/applications/
 pokerth.png usr/share/pixmaps/
-debian/pokerth.xpm usr/share/pixmaps/

Deleted: packages/trunk/pokerth/debian/pokerth_server.1
===================================================================
--- packages/trunk/pokerth/debian/pokerth_server.1	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/pokerth_server.1	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,27 +0,0 @@
-.TH POKERTH "1" "March 2008" "PokerTH server 0.6.1" "User Commands"
-.SH NAME
-pokerth_server \- multiplayer and multigame server for PokerTH
-.SH SYNOPSIS
-.B pokerth_server \fR[ \fB\-h\fR | \fB\-\-help\fR ] [ \fB\-v\fR | \fB\-\-version\fR ]
-[ \fB\-p\fR | \fB\-\-pid\-file\fR\fI pid-file \fR] [ \fB\-\-readonly\-config\fR ]
-.SH DESCRIPTION
-This is the PokerTH server, which is needed for hosting own multiplayer games.
-Network protocol version 4.1
-.SH OPTIONS
-.TP
-\fB\-h\fR [ \fB\-\-help\fR ]
-produce help message
-.TP
-\fB\-v\fR [ \fB\-\-version\fR ]
-print version string
-.TP
-\fB\-p\fR [ \fB\-\-pid\-file\fR ] \fIpid-file\fR
-create pid\-file in different location
-.TP
-\fB\-\-readonly\-config\fR
-treat config file as read\-only
-.SH AUTHOR
-pokerth and pokerth_server were written by Felix Hammer, Florian Thauer and Lothar May.
-.PP
-This manual page was written by Evgeni Golov <sargentd at die-welt.net>,
-for the Debian project (but may be used by others).

Added: packages/trunk/pokerth/debian/pokerth_server.6
===================================================================
--- packages/trunk/pokerth/debian/pokerth_server.6	                        (rev 0)
+++ packages/trunk/pokerth/debian/pokerth_server.6	2016-08-23 20:52:57 UTC (rev 15863)
@@ -0,0 +1,27 @@
+.TH POKERTH "6" "March 2008" "PokerTH server 0.6.1" "User Commands"
+.SH NAME
+pokerth_server \- multiplayer and multigame server for PokerTH
+.SH SYNOPSIS
+.B pokerth_server \fR[ \fB\-h\fR | \fB\-\-help\fR ] [ \fB\-v\fR | \fB\-\-version\fR ]
+[ \fB\-p\fR | \fB\-\-pid\-file\fR\fI pid-file \fR] [ \fB\-\-readonly\-config\fR ]
+.SH DESCRIPTION
+This is the PokerTH server, which is needed for hosting own multiplayer games.
+Network protocol version 4.1
+.SH OPTIONS
+.TP
+\fB\-h\fR [ \fB\-\-help\fR ]
+produce help message
+.TP
+\fB\-v\fR [ \fB\-\-version\fR ]
+print version string
+.TP
+\fB\-p\fR [ \fB\-\-pid\-file\fR ] \fIpid-file\fR
+create pid\-file in different location
+.TP
+\fB\-\-readonly\-config\fR
+treat config file as read\-only
+.SH AUTHOR
+pokerth and pokerth_server were written by Felix Hammer, Florian Thauer and Lothar May.
+.PP
+This manual page was written by Evgeni Golov <sargentd at die-welt.net>,
+for the Debian project (but may be used by others).

Modified: packages/trunk/pokerth/debian/rules
===================================================================
--- packages/trunk/pokerth/debian/rules	2016-08-22 18:10:41 UTC (rev 15862)
+++ packages/trunk/pokerth/debian/rules	2016-08-23 20:52:57 UTC (rev 15863)
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
-
 #export DH_VERBOSE=1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 qt4_architectures := x32
 ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), $(qt4_architectures)))
@@ -12,10 +12,10 @@
 export QT_SELECT=$(qt)
 
 %:
-	dh $@
+	dh $@ --parallel --with systemd
 
 override_dh_auto_configure:
-	dh_auto_configure -- pokerth.pro
+	dh_auto_configure -- pokerth.pro QMAKE_CXXFLAGS+="-std=gnu++98"
 	# upstream tarball has wrong permissions
 	find data -type f -exec chmod 644 {} \;
 




More information about the Pkg-games-commits mailing list