[SCM] multi-platform emulator, including NES, GB/A, Lynx, PC Engine branch, master, updated. debian/0.8.D.3-1-5-g42a677e

Stephen Kitt steve at sk2.org
Tue Nov 8 07:01:44 UTC 2011


The following commit has been merged in the master branch:
commit 7b258400bc0cf0b3087f7c587b9d2a43c2455e80
Author: Stephen Kitt <steve at sk2.org>
Date:   Tue Nov 8 01:39:37 2011 +0100

    Simplify rules using dh 9 and enable hardening.

diff --git a/debian/changelog b/debian/changelog
index b2e6833..1956c28 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ mednafen (0.8.D.3-2) unstable; urgency=low
   * Install .desktop file allowing file association, with known
     supported MIME types, as suggested by Damian Yarrick (LP: #886912;
     helps with #635538).
+  * Simplify rules using dh 9 and enable hardening.
 
  -- Stephen Kitt <steve at sk2.org>  Mon, 07 Nov 2011 23:19:44 +0100
 
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/debian/control b/debian/control
index 9453bc9..5f1e6e7 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: games
 Priority: optional
 Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
 Uploaders: Stephen Kitt <steve at sk2.org>
-Build-Depends: debhelper (>= 5), autotools-dev, x11proto-core-dev,
+Build-Depends: debhelper (>= 8.1.3), autotools-dev, x11proto-core-dev,
  libgl1-mesa-dev | libgl-dev, zlib1g-dev | libz-dev, libsdl1.2-dev,
  libsamplerate0-dev, libsdl-net1.2-dev, libcdio-dev,
  libsndfile1-dev | libsndfile-dev,
diff --git a/debian/mednafen.manpages b/debian/mednafen.manpages
new file mode 100644
index 0000000..50aafe5
--- /dev/null
+++ b/debian/mednafen.manpages
@@ -0,0 +1 @@
+debian/mednafen.6
diff --git a/debian/patches/hardening-fixes.patch b/debian/patches/hardening-fixes.patch
new file mode 100644
index 0000000..cb0aa65
--- /dev/null
+++ b/debian/patches/hardening-fixes.patch
@@ -0,0 +1,30 @@
+Description: Always use format specifier when formatting a variable string
+Author: Stephen Kitt <steve at sk2.org>
+
+--- mednafen.orig/src/ngp/TLCS-900h/TLCS900h_disassemble.cpp
++++ mednafen/src/ngp/TLCS-900h/TLCS900h_disassemble.cpp
+@@ -209,7 +209,7 @@
+ 
+ 	if (size == 0 && first == 0xC7)
+ 	{
+-		sprintf(str_r, extra);
++		sprintf(str_r, "%s", extra);
+ 		return;
+ 	}
+ 
+--- mednafen.orig/src/drivers/input.cpp
++++ mednafen/src/drivers/input.cpp
+@@ -1520,12 +1520,9 @@
+ /* Configures an individual virtual button. */
+ static int subcon(const char *text, std::vector<ButtConfig> &bc, int commandkey)
+ {
+- char buf[256];
+-
+  while(1)
+  {
+-  sprintf(buf,"%s (%d)",text,subcon_wc+1);
+-  MDFNI_DispMessage(buf);
++  MDFNI_DispMessage("%s (%d)", text, subcon_wc + 1);
+ 
+   if(subcon_tb != subcon_wc)
+   {
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3d1d63b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+hardening-fixes.patch
diff --git a/debian/rules b/debian/rules
index 4ca5301..d34186e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,79 +4,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+%:
+	dh $@
 
-CFLAGS = -Wall
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-
-ifeq "$(DEB_HOST_ARCH)" "i386"
-	CFLAGS += -mtune=i686
-endif
-
-config.status: configure
-	dh_testdir
-	# Add here commands to configure the package.
-	CFLAGS="$(CFLAGS) -Wl,-z,defs" CXXFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --disable-rpath --bindir=/usr/games
-
-build: build-stamp
-
-build-stamp:  config.status
-	dh_testdir
-
-	# Add here commands to compile the package.
-	CFLAGS="$(CFLAGS) -Wl,-z,defs" CXXFLAGS="$(CFLAGS) -Wl,-z,defs"  $(MAKE)
-
-	touch build-stamp
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp 
-
-	# Add here commands to clean up after the build process.
-	[ ! -f Makefile ] || make distclean
-
-	dh_clean config.log m4/Makefile
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k 
-	dh_installdirs
-
-	# Add here commands to install the package into debian/mednafen.
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/mednafen
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_install
-	dh_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installman debian/mednafen.6
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install 
+override_dh_auto_configure:
+	dh_auto_configure -- --bindir=/usr/games
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..c26be67
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1 @@
+mednafen source: package-needs-versioned-debhelper-build-depends 9

-- 
multi-platform emulator, including NES, GB/A, Lynx, PC Engine



More information about the Pkg-games-commits mailing list