From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- .../files/dosemu-1.4.1_pre20091009-dash.patch | 10 +++++ .../dosemu-1.4.1_pre20130107-fix-inline.patch | 14 +++++++ .../dosemu-1.4.1_pre20130107-flex-2.6.3.patch | 15 +++++++ .../files/dosemu-1.4.1_pre20130107-fortify.patch | 48 ++++++++++++++++++++++ .../dosemu-1.4.1_pre20130107-ia16-ldflags.patch | 44 ++++++++++++++++++++ .../files/dosemu-1.4.1_pre20130107-no-glibc.patch | 18 ++++++++ 6 files changed, 149 insertions(+) create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-dash.patch create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fix-inline.patch create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-flex-2.6.3.patch create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-ia16-ldflags.patch create mode 100644 app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-no-glibc.patch (limited to 'app-emulation/dosemu/files') diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-dash.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-dash.patch new file mode 100644 index 000000000000..c48712e68661 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20091009-dash.patch @@ -0,0 +1,10 @@ +Dash does not support 'echo -n' and breaks default config sourcing. +diff --git a/default-configure b/default-configure +index 9e4b78b..a749f63 100755 +--- a/default-configure ++++ b/default-configure +@@ -30,3 +30,3 @@ done + CONF=`cat $CONF_FILE` +-CONF=`echo -n "$CONF"| sed '/^config {/d' | sed '/^}/d' | tr '\n' ' ' ` ++CONF=`printf "%s" "$CONF"| sed '/^config {/d' | sed '/^}/d' | tr '\n' ' ' ` + diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fix-inline.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fix-inline.patch new file mode 100644 index 000000000000..9a515941b812 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fix-inline.patch @@ -0,0 +1,14 @@ +diff --git a/src/dosext/sound/sound.c b/src/dosext/sound/sound.c +index f33f78f..f429362 100644 +--- a/src/dosext/sound/sound.c ++++ b/src/dosext/sound/sound.c +@@ -173,3 +173,3 @@ void sb_cms_write (ioport_t port, Bit8u value); + +-inline void sb_mixer_register_write (Bit8u value); ++static inline void sb_mixer_register_write (Bit8u value); + void sb_mixer_data_write (Bit8u value); +@@ -840,3 +840,3 @@ void sb_cms_write (ioport_t port, Bit8u value) + +-inline void sb_mixer_register_write (Bit8u value) ++static inline void sb_mixer_register_write (Bit8u value) + { diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-flex-2.6.3.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-flex-2.6.3.patch new file mode 100644 index 000000000000..de5b00b783cf --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-flex-2.6.3.patch @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/604610 + +New flex seems to define yywrap even for non-yywrap lexers. +diff --git a/src/base/init/lexer.l.in b/src/base/init/lexer.l.in +index aeaa2e2..9e42ddf 100644 +--- a/src/base/init/lexer.l.in ++++ b/src/base/init/lexer.l.in +@@ -810,7 +810,2 @@ static void enter_includefile(char * fname) + +- +-#ifdef yywrap +- error "yywrap defined elsewere, need our own one" +-#endif +- + int yywrap(void) /* this gets called at EOF of a parsed file */ diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch new file mode 100644 index 000000000000..5daa4e9fee41 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-fortify.patch @@ -0,0 +1,48 @@ +From ff9bea065f4cc6068dcb8d6ea9423105305ca590 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 5 Aug 2013 13:03:21 +0300 +Subject: [PATCH] src/tools/tools86.c: fix stack buffer overflow in + 'change_aout' + +Detected by gcc: + +gcc -std=gnu99 -c -MP -MMD -I../../src/include -I../../src/plugin/include -Wall -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -pipe -O2 -fomit-frame-pointer -o tools86.o tools86.c +In file included from /usr/include/stdio.h:937:0, + from tools86.c:98: + In function 'fread', + inlined from 'change_aout.constprop.1' at tools86.c:174:12, + inlined from 'main' at tools86.c:391:18: + /usr/include/bits/stdio2.h:293:2: warning: call to '__fread_chk_warn' declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer [enabled by default] + return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream); + ^ +Gentoo-bug: http://bugs.gentoo.org/343577 +Signed-off-by: Sergei Trofimovich +--- + src/tools/tools86.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/tools/tools86.c b/src/tools/tools86.c +index 141610d..35a0b96 100644 +--- a/src/tools/tools86.c ++++ b/src/tools/tools86.c +@@ -137,7 +137,7 @@ struct bsd_header { /* a.out header */ + #endif + + #ifdef __linux__ +-static int header_ld86out_to_gnuasout(struct bsd_header *bsd, struct gnu_header *gnu) ++static int header_ld86out_to_gnuasout(const struct bsd_header *bsd, struct gnu_header *gnu) + { + if (bsd->a_magic[0] != 0x01 || bsd->a_magic[1] != 0x03 || + bsd->a_flags != 0x00 || bsd->a_cpu != 0x10) return -1; +@@ -171,7 +171,7 @@ static int change_aout(char *objfile, int update_symtable) + return errno; + } + #ifdef __linux__ +- if (fread(&bsd,sizeof(gnu),1,f) != 1 ) { ++ if (fread(&bsd,sizeof(bsd),1,f) != 1 ) { + fclose(f); + return -1; + } +-- +1.8.3.2 + diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-ia16-ldflags.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-ia16-ldflags.patch new file mode 100644 index 000000000000..f8c05622571c --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-ia16-ldflags.patch @@ -0,0 +1,44 @@ +Add a @IA16_LDFLAGS_EXTRA@ environment variable +to be able to pass through -no-pie. + +It's a workaround for binutils ld.gold bug: +https://bugs.gentoo.org/618366 +diff --git a/Makefile.conf.in b/Makefile.conf.in +index cd4b34d..cc29931 100644 +--- a/Makefile.conf.in ++++ b/Makefile.conf.in +@@ -55,2 +55,3 @@ ALL_LDFLAGS:=@DOSEMU_LDFLAGS@ ${LDFLAGS} + DOSBIN_LDFLAGS:=@DOSBIN_LDFLAGS@ ++IA16_LDFLAGS_EXTRA:=@IA16_LDFLAGS_EXTRA@ + LIBS:=@LIBS@ +diff --git a/configure.ac b/configure.ac +index 0f06f57..a86208e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -604,2 +604,3 @@ AC_SUBST(X_LIBS) + AC_SUBST(X_CFLAGS) ++AC_SUBST(IA16_LDFLAGS_EXTRA) + +diff --git a/src/commands/Makefile b/src/commands/Makefile +index 3139b85..c5c4607 100644 +--- a/src/commands/Makefile ++++ b/src/commands/Makefile +@@ -56,3 +56,3 @@ dosbin: $(COM1) $(COM2) $(SYS) + $(D)/%.sys: %.o +- $(LD) $(ALL_LDFLAGS) -Wl,-Ttext,0,-e,_start16,--oformat,binary -nostdlib -s -o $@ $< ++ $(LD) $(ALL_LDFLAGS) -Wl,-Ttext,0,-e,_start16,--oformat,binary -nostdlib -s $(IA16_LDFLAGS_EXTRA) -o $@ $< + chmod -x $@ +@@ -60,3 +60,3 @@ $(D)/%.sys: %.o + $(D)/%.com: %.o +- $(LD) $(ALL_LDFLAGS) -Wl,-Ttext,100,-e,_start16,--oformat,binary -nostdlib -s -o $@ $< ++ $(LD) $(ALL_LDFLAGS) -Wl,-Ttext,100,-e,_start16,--oformat,binary -nostdlib -s $(IA16_LDFLAGS_EXTRA) -o $@ $< + chmod -x $@ +diff --git a/src/plugin/commands/Makefile b/src/plugin/commands/Makefile +index 48f49d5..d3a5667 100644 +--- a/src/plugin/commands/Makefile ++++ b/src/plugin/commands/Makefile +@@ -57,3 +57,3 @@ $(STUBFULL): $(D)/generic.com ./mkcomstub + $(D)/%.com: %.o +- $(LD) $(ALL_LDFLAGS) -Wl,-Ttext,0x100,-e,_start16,--oformat,binary -nostdlib -s -o $@ $< ++ $(LD) $(ALL_LDFLAGS) -Wl,-Ttext,0x100,-e,_start16,--oformat,binary -nostdlib -s $(IA16_LDFLAGS_EXTRA) -o $@ $< + chmod -x $@ diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-no-glibc.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-no-glibc.patch new file mode 100644 index 000000000000..7c5b8a50a094 --- /dev/null +++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-no-glibc.patch @@ -0,0 +1,18 @@ +The check has no AC_MGS_RESULT finish helper +and gets called as + set `` +on gcc-6 which clutters ./configure output. + +One of fallouts of https://bugs.gentoo.org/598798 +diff --git a/configure.ac b/configure.ac +index 34a7f71..0f06f57 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -574,7 +574,2 @@ if test "$GCC" = "yes" ; then + +- AC_MSG_CHECKING(for glibc...) +- set `printf '%b\n' '#include \nXXAaZZ __GLIBC__'|${CC-cc} -E -|awk '/XXAaZZ/ {print $2}'` +- if test "$1" = "__GLIBC__"; then +- AC_MSG_ERROR([Sorry, you need glibc.]) +- fi + fi -- cgit v1.2.3