On 12/27/2019 6:23 PM, Vincent Lefevre wrote:
On 2019-12-27 19:49:46 +0000, Joseph Nahmias wrote:
On Fri, Dec 27, 2019 at 07:27:42PM +0000, Joseph Nahmias wrote:
The attached patch works around the issue until that is fixed.

Of course, I forgot this patch... Take 2.

Wouldn't the use of wildcards be a security issue?

+       ln -s /tmp/.wine-`id -u`/server* /tmp/wine-*/

i.e. could you end up creating wrong symbolic links?

Attached is an updated patch that does the extra work to avoid the wildcards.

In any case, this seems rather ugly to me.

Not sure precisely what you are referring to as ugly here; but in my experience, band-aids are usually placed over something ugly, if that's what you mean... The proper fix would of course have to come from within wine itself.

--Joe
diff -Nru win-iconv-0.0.8/debian/changelog win-iconv-0.0.8/debian/changelog
--- win-iconv-0.0.8/debian/changelog    2019-03-12 12:06:01.000000000 -0400
+++ win-iconv-0.0.8/debian/changelog    2019-12-29 01:11:42.000000000 -0500
@@ -1,3 +1,12 @@
+win-iconv (0.0.8-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Work around #946951 by initializing WINEPREFIX and adding a symlink,
+    closes: #921904.
+  * To speed up the build, don't install g++, only gcc is needed here.
+
+ -- Joe Nahmias <je...@debian.org>  Sun, 29 Dec 2019 01:11:42 -0500
+
 win-iconv (0.0.8-3) unstable; urgency=medium
 
   * wrap-and-sort -ast
diff -Nru win-iconv-0.0.8/debian/control win-iconv-0.0.8/debian/control
--- win-iconv-0.0.8/debian/control      2019-03-12 12:06:01.000000000 -0400
+++ win-iconv-0.0.8/debian/control      2019-12-29 01:09:11.000000000 -0500
@@ -7,7 +7,7 @@
  debhelper-compat (= 12),
 Build-Depends-Indep:
  dpkg-dev (>= 1.17.14),
- mingw-w64,
+ gcc-mingw-w64,
  wine [i386 amd64]  <!nocheck>,
 Vcs-Git: https://salsa.debian.org/debian/win-iconv.git
 Vcs-Browser: https://salsa.debian.org/debian/win-iconv
diff -Nru win-iconv-0.0.8/debian/rules win-iconv-0.0.8/debian/rules
--- win-iconv-0.0.8/debian/rules        2019-03-12 11:29:02.000000000 -0400
+++ win-iconv-0.0.8/debian/rules        2019-12-29 01:03:56.000000000 -0500
@@ -3,11 +3,13 @@
 # we do not want stackprotector because there is no implementation on mingw32:
 export DEB_BUILD_MAINT_OPTIONS = hardening=-stackprotector
 
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 ifeq ($(DEB_BUILD_ARCH),i386)
   TESTARCH=i686-w64-mingw32
 else ifeq ($(DEB_BUILD_ARCH), amd64)
   TESTARCH=x86_64-w64-mingw32
 endif
+export WINEPREFIX := $(CURDIR)/build-$(TESTARCH)/.wine
 
 %:
        dh $@
@@ -30,9 +32,17 @@
          cd .. ; \
        done
 
+override_dh_auto_test: T := $(CURDIR)/build-$(TESTARCH)/tmp
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 ifdef TESTARCH
-       cd build-$(TESTARCH) && WINEPREFIX=$(shell pwd)/build-$(TESTARCH)/.wine 
$(MAKE) CC=$(TESTARCH)-gcc AR=$(TESTARCH)-ar RANLIB=$(TESTARCH)-ranlib 
DLLTOOL=$(TESTARCH)-dlltool test
+       -wineboot -i
+       mkdir -p $(T)/`cat "${WINEPREFIX}/wineserver"`/
+       -ln -s /tmp/.wine-`id -u`/$$( \
+           printf "server-%x-%x" `stat --printf="%d %i" "${WINEPREFIX}"` \
+         ) $(T)/`cat "${WINEPREFIX}/wineserver"`/
+       $(MAKE) -C build-$(TESTARCH) CC=$(TESTARCH)-gcc AR=$(TESTARCH)-ar \
+               RANLIB=$(TESTARCH)-ranlib DLLTOOL=$(TESTARCH)-dlltool \
+               TMPDIR=$(T) test
 endif
 endif

Reply via email to