summaryrefslogtreecommitdiff
path: root/app-text/uudeview
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-text/uudeview
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-text/uudeview')
-rw-r--r--app-text/uudeview/Manifest9
-rw-r--r--app-text/uudeview/files/uudeview-0.5.20-CVE-2004-2265.patch47
-rw-r--r--app-text/uudeview/files/uudeview-0.5.20-CVE-2008-2266.patch166
-rw-r--r--app-text/uudeview/files/uudeview-0.5.20-bugfixes.patch100
-rw-r--r--app-text/uudeview/files/uudeview-0.5.20-makefile.patch29
-rw-r--r--app-text/uudeview/files/uudeview-0.5.20-man.patch95
-rw-r--r--app-text/uudeview/files/uudeview-0.5.20-rename.patch57
-rw-r--r--app-text/uudeview/metadata.xml5
-rw-r--r--app-text/uudeview/uudeview-0.5.20-r2.ebuild44
9 files changed, 552 insertions, 0 deletions
diff --git a/app-text/uudeview/Manifest b/app-text/uudeview/Manifest
new file mode 100644
index 000000000000..ee1746422a86
--- /dev/null
+++ b/app-text/uudeview/Manifest
@@ -0,0 +1,9 @@
+AUX uudeview-0.5.20-CVE-2004-2265.patch 1788 BLAKE2B 6ee4cc768f3bab3cb4116c465d10324668e3d885a73359ff1919263843396475524f146fd747fe5748b1bf5bb52c45993c89ba8c4f8718213eb6f63d0c8efab0 SHA512 63ca3c7d98924df1a2a2c08188291cfc24870c8464bc2bb98d47315f2e28ef876cf732598b6410b2875d9875c2463fda51da959b9e1340c32baa2ec64875f46c
+AUX uudeview-0.5.20-CVE-2008-2266.patch 4595 BLAKE2B dd2ba71e43941812472729575f1481be9d93641f1868952385f7d5f69d6c63991b6856becc967d92c1ced93f0b5a68349af43b011de4ab92adacb93232b226c4 SHA512 fe6ffaf4d55f8a367cf8661ee4599f1224b2bdbf1d3659558c024e7c0d9a6ad043d7eb9631f28e4762b39a5b5e2a417b66be9e98efc7e5caeb9a286e239e486e
+AUX uudeview-0.5.20-bugfixes.patch 3575 BLAKE2B 8778f0f08fa8d8c5faabf2721c195505a53369f30d93c494080025e491121a75135f321fe5c0c117e5bfd538a7cb2d82fc64cb5584822dc9f353cd31b168bdf0 SHA512 c5e4126e9457cb94d6f014ba20e2497969a50b84d917bd31529a2a75ae5b1e9990ec946e8f8de7a83ced71e32aea7d62210416d94b765dc860902825ca6b34a3
+AUX uudeview-0.5.20-makefile.patch 895 BLAKE2B b9f2d027b71667ea78bcc9de05b3f20dfe5d04cb037f06633d7846b2f5ecfb5154736d2ff7faab01104039e9ce4b0e8b5f7c89a42f75db670d7ce2b719ed5336 SHA512 65f223af7f06a854746328354bee5f2703b0603b085a5a52a2a49f09528cffe4a4756a5bd63e86fadf266c2cf1d30691dc75661bca79cc7d122329cdf9bb71f0
+AUX uudeview-0.5.20-man.patch 3246 BLAKE2B 390d89a13080798b1ef0f902d92c82df59c10c6bb5b34eb8655ceadade0e31b0e81c100fc3e8908edf6c482c51c2560b90aaff8156b7ca805908036aa8342b77 SHA512 a940d6663563e7a91b35f5350e05b6cb7939f06d7db8767a8a5483dc82477c796a351cc03be9de49bd55513ca0b2e3203cd82c4b834caa54da9c8aae5750136b
+AUX uudeview-0.5.20-rename.patch 1736 BLAKE2B 820e32f9d2fd248ee2748e3f6173994b02074720814ec8adc6a896b72defc29ce24a356626c7bab414c516555547fe04cbaf304a52c9f141b80a836593c8638f SHA512 afb5b72bca70eb7c156584df1b44fa3cbb6cf07da97a79ff6330acb52ff102584b7a382ce779f2f695c9384d017984cabc670d31b243c0e5d916df19c6846439
+DIST uudeview-0.5.20.tar.gz 261574 BLAKE2B bd345144a87e2322c89e185d0fe5f31f1cd1ff8f73a5c5b6e585b79a0b319fcf349f2bb51f814a6d6a81e0e18271b5c37db827ba414007785b1743c64e5efe46 SHA512 d080e9c3940bad7bacd28457f21133056384a01e33ba014de42502d23f81f2c7f5fa7f6c472ce9f37bec2edb8e18d27135bf18426cf2f23188a3683558e1721c
+EBUILD uudeview-0.5.20-r2.ebuild 912 BLAKE2B 9d997326962bb763ab127d3ff492ecd408d956fedc9a2c12dfdca6924273299204da74495f1c5c96d92a77b1403443796d9fb18a40895771d28081eb500c4c37 SHA512 9466c4e4c67a71fb7e05bb4f55684c3646f8ec16c86548ab4735b9088e968db497c077099bf67a812316587a66aa57f734b8007c7f51ee72660b0332905b8f4a
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
diff --git a/app-text/uudeview/files/uudeview-0.5.20-CVE-2004-2265.patch b/app-text/uudeview/files/uudeview-0.5.20-CVE-2004-2265.patch
new file mode 100644
index 000000000000..ac1f39410e4b
--- /dev/null
+++ b/app-text/uudeview/files/uudeview-0.5.20-CVE-2004-2265.patch
@@ -0,0 +1,47 @@
++uudeview (0.5.20-2.1) unstable; urgency=low
++
++ * Fix possible (but highly unlikely) race in temporary file generation
++ (CAN-2004-2265), by passing the "x" (O_EXCL) flag to fopen when opening
++ such files. (Closes: #320541)
++
++ -- Steinar H. Gunderson <sesse@debian.org> Wed, 14 Jun 2006 18:44:05 +0200
++
+
+Index: uudeview-0.5.20/unix/uudeview.c
+===================================================================
+--- uudeview-0.5.20.orig/unix/uudeview.c
++++ uudeview-0.5.20/unix/uudeview.c
+@@ -454,7 +454,7 @@ proc_stdin (void)
+ return 0;
+ }
+
+- if ((target = fopen (stdfile, "wb")) == NULL) {
++ if ((target = fopen (stdfile, "wbx")) == NULL) {
+ fprintf (stderr, "proc_stdin: cannot open temp file %s for writing: %s\n",
+ stdfile, strerror (errno));
+ _FP_free (stdfile);
+Index: uudeview-0.5.20/uulib/uunconc.c
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uunconc.c
++++ uudeview-0.5.20/uulib/uunconc.c
+@@ -1325,9 +1325,9 @@ UUDecode (uulist *data)
+ return UURET_NODATA;
+
+ if (data->uudet == PT_ENCODED)
+- mode = "wt"; /* open text files in text mode */
++ mode = "wtx"; /* open text files in text mode */
+ else
+- mode = "wb"; /* otherwise in binary */
++ mode = "wbx"; /* otherwise in binary */
+
+ if ((data->binfile = tempnam (NULL, "uu")) == NULL) {
+ UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
+@@ -1502,7 +1502,7 @@ UUDecode (uulist *data)
+ progress.action = 0;
+ return UURET_NOMEM;
+ }
+- if ((datain = fopen (data->binfile, "rb")) == NULL) {
++ if ((datain = fopen (data->binfile, "rbx")) == NULL) {
+ UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
+ uustring (S_NOT_OPEN_FILE),
+ data->binfile, strerror (uu_errno = errno));
diff --git a/app-text/uudeview/files/uudeview-0.5.20-CVE-2008-2266.patch b/app-text/uudeview/files/uudeview-0.5.20-CVE-2008-2266.patch
new file mode 100644
index 000000000000..ba0de28dcacc
--- /dev/null
+++ b/app-text/uudeview/files/uudeview-0.5.20-CVE-2008-2266.patch
@@ -0,0 +1,166 @@
++uudeview (0.5.20-3.1) unstable; urgency=high
+...
++ * Fixed a classical tempfile symlink attack vulnerability in libuu.
++ Thanks to Nico Golde for the patch. (Closes: #480972)
+...
++ -- Marco d'Itri <md@linux.it> Wed, 21 May 2008 01:34:35 +0200
+
+Index: uudeview-0.5.20/unix/uudeview.c
+===================================================================
+--- uudeview-0.5.20.orig/unix/uudeview.c
++++ uudeview-0.5.20/unix/uudeview.c
+@@ -443,18 +443,46 @@ proc_stdin (void)
+ FILE *target;
+ size_t bytes;
+ int res;
++#define HAVE_MKSTEMP
++#ifdef HAVE_MKSTEMP
++ int tmpfd;
++ const char *tmpprefix = "uuXXXXXX";
++ char *tmpdir = NULL;
++#endif /* HAVE_MKSTEMP */
+
+ if (stdinput) {
+ fprintf (stderr, "proc_stdin: cannot process stdin twice\n");
+ return 0;
+ }
+
++#ifdef HAVE_MKSTEMP
++ if ((getuid()==geteuid()) && (getgid()==getegid())) {
++ tmpdir=getenv("TMPDIR");
++ }
++
++ if (!tmpdir) {
++ tmpdir = "/tmp";
++ }
++ stdfile = malloc(strlen(tmpdir)+strlen(tmpprefix)+2);
++
++ if (!stdfile) {
++#else
+ if ((stdfile = tempnam (NULL, "uu")) == NULL) {
++#endif
+ fprintf (stderr, "proc_stdin: cannot get temporary file\n");
+ return 0;
+ }
+
++#ifdef HAVE_MKSTEMP
++ strcpy(stdfile, tmpdir);
++ strcat(stdfile, "/");
++ strcat(stdfile, tmpprefix);
++
++ if ((tmpfd = mkstemp(stdfile)) == -1 ||
++ (target = fdopen(tmpfd, "wbx")) == NULL) {
++#else
+ if ((target = fopen (stdfile, "wbx")) == NULL) {
++#endif
+ fprintf (stderr, "proc_stdin: cannot open temp file %s for writing: %s\n",
+ stdfile, strerror (errno));
+ _FP_free (stdfile);
+Index: uudeview-0.5.20/uulib/uunconc.c
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uunconc.c
++++ uudeview-0.5.20/uulib/uunconc.c
+@@ -1311,6 +1311,12 @@ UUDecode (uulist *data)
+ char *mode, *ntmp;
+ uufile *iter;
+ size_t bytes;
++#define HAVE_MKSTEMP
++#ifdef HAVE_MKSTEMP
++ int tmpfd;
++ const char *tmpprefix = "uuXXXXXX";
++ char *tmpdir = NULL;
++#endif /* HAVE_MKSTEMP */
+
+ if (data == NULL || data->thisfile == NULL)
+ return UURET_ILLVAL;
+@@ -1329,13 +1335,35 @@ UUDecode (uulist *data)
+ else
+ mode = "wbx"; /* otherwise in binary */
+
++#ifdef HAVE_MKSTEMP
++ if ((getuid()==geteuid()) && (getgid()==getegid())) {
++ tmpdir=getenv("TMPDIR");
++ }
++
++ if (!tmpdir) {
++ tmpdir = "/tmp";
++ }
++ data->binfile = malloc(strlen(tmpdir)+strlen(tmpprefix)+2);
++
++ if (!data->binfile) {
++#else
+ if ((data->binfile = tempnam (NULL, "uu")) == NULL) {
++#endif /* HAVE_MKSTEMP */
+ UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
+ uustring (S_NO_TEMP_NAME));
+ return UURET_NOMEM;
+ }
+
++#ifdef HAVE_MKSTEMP
++ strcpy(data->binfile, tmpdir);
++ strcat(data->binfile, "/");
++ strcat(data->binfile, tmpprefix);
++
++ if ((tmpfd = mkstemp(data->binfile)) == -1 ||
++ (dataout = fdopen(tmpfd, mode)) == NULL) {
++#else
+ if ((dataout = fopen (data->binfile, mode)) == NULL) {
++#endif /* HAVE_MKSTEMP */
+ /*
+ * we couldn't create a temporary file. Usually this means that TMP
+ * and TEMP aren't set
+@@ -1343,6 +1371,12 @@ UUDecode (uulist *data)
+ UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
+ uustring (S_WR_ERR_TARGET),
+ data->binfile, strerror (uu_errno = errno));
++#ifdef HAVE_MKSTEMP
++ if (tmpfd != -1) {
++ unlink(data->binfile);
++ close(tmpfd);
++ }
++#endif /* HAVE_MKSTEMP */
+ _FP_free (data->binfile);
+ data->binfile = NULL;
+ uu_errno = errno;
+@@ -1499,7 +1533,13 @@ UUDecode (uulist *data)
+ */
+
+ if (data->uudet == BH_ENCODED && data->binfile) {
++#ifdef HAVE_MKSTEMP
++ ntmp = malloc(strlen(tmpdir)+strlen(tmpprefix)+2);
++
++ if (ntmp == NULL) {
++#else
+ if ((ntmp = tempnam (NULL, "uu")) == NULL) {
++#endif /* HAVE_MKSTEMP */
+ UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
+ uustring (S_NO_TEMP_NAME));
+ progress.action = 0;
+@@ -1513,12 +1553,27 @@ UUDecode (uulist *data)
+ free (ntmp);
+ return UURET_IOERR;
+ }
++
++#ifdef HAVE_MKSTEMP
++ strcpy(ntmp, tmpdir);
++ strcat(ntmp, "/");
++ strcat(ntmp, tmpprefix);
++ if ((tmpfd = mkstemp(ntmp)) == -1 ||
++ (dataout = fdopen(tmpfd, "wb")) == NULL) {
++#else
+ if ((dataout = fopen (ntmp, "wb")) == NULL) {
++#endif /* HAVE_MKSTEMP */
+ UUMessage (uunconc_id, __LINE__, UUMSG_ERROR,
+ uustring (S_NOT_OPEN_TARGET),
+ ntmp, strerror (uu_errno = errno));
+ progress.action = 0;
+ fclose (datain);
++#ifdef HAVE_MKSTEMP
++ if (tmpfd != -1) {
++ unlink(ntmp);
++ close(tmpfd);
++ }
++#endif /* HAVE_MKSTEMP */
+ free (ntmp);
+ return UURET_IOERR;
+ }
diff --git a/app-text/uudeview/files/uudeview-0.5.20-bugfixes.patch b/app-text/uudeview/files/uudeview-0.5.20-bugfixes.patch
new file mode 100644
index 000000000000..3056dd2af59b
--- /dev/null
+++ b/app-text/uudeview/files/uudeview-0.5.20-bugfixes.patch
@@ -0,0 +1,100 @@
++uudeview (0.5.20-3) unstable; urgency=low
++
++ * Ack NMU. (closes: Bug#373630)
++ * Don't force overwrite mode if auto-rename enabled. (closes: Bug#378076)
++ * Don't ignore special chars when parsing MIME. (closes: Bug#341440)
++ * Fix for #320541 also fixes #242999. (closes: Bug#242999)
++ * Incorporate suspicious-file patch from Peter Muir. (closes: Bug#166077)
+...
+
++ -- Chris Hanson <cph@debian.org> Tue, 15 Aug 2006 00:40:50 -0400
+
+Index: uudeview-0.5.20/unix/uudeview.c
+===================================================================
+--- uudeview-0.5.20.orig/unix/uudeview.c
++++ uudeview-0.5.20/unix/uudeview.c
+@@ -657,9 +657,6 @@ work_comline (int argc, char *argv[])
+ else switch (*(argv[number] + 1)) {
+ case '\0':
+ interact = 0;
+- if (overwrite == 0) {
+- overwrite = 1;
+- }
+ proc_stdin ();
+ break;
+ case 'a':
+@@ -699,10 +696,7 @@ work_comline (int argc, char *argv[])
+ fprintf (stderr, "WARNING: cannot interact when reading from stdin\n");
+ }
+ else {
+- interact = (*argv[number] == '+') ? 1 : 0;
+- if (overwrite == 0 && *argv[number] == '-') {
+- overwrite = 1;
+- }
++ interact = (*argv[number] == '+') ? 1 : 0;
+ }
+ break;
+ case 'm':
+@@ -773,6 +767,8 @@ work_comline (int argc, char *argv[])
+ break;
+ }
+ }
++ if (overwrite == 0 && interact == 0 && autoren == 0)
++ overwrite = 1;
+
+ return 1;
+ }
+Index: uudeview-0.5.20/uulib/uunconc.c
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uunconc.c
++++ uudeview-0.5.20/uulib/uunconc.c
+@@ -1437,6 +1437,9 @@ UUDecode (uulist *data)
+ res = UURET_IOERR;
+ break;
+ }
++ UUMessage (uunconc_id, __LINE__, UUMSG_MESSAGE,
++ uustring (S_OPEN_FILE),
++ iter->data->sfname);
+ _FP_strncpy (uugen_fnbuffer, iter->data->sfname, 1024);
+ }
+
+Index: uudeview-0.5.20/uulib/uuscan.c
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uuscan.c
++++ uudeview-0.5.20/uulib/uuscan.c
+@@ -387,10 +387,10 @@ ParseValue (char *attribute)
+ *attribute != '(' && *attribute != ')' &&
+ *attribute != '<' && *attribute != '>' &&
+ *attribute != '@' && *attribute != ',' &&
+- /* *attribute != ';' && */ *attribute != ':' &&
+- *attribute != '\\' &&*attribute != '"' &&
+- *attribute != '/' && /* *attribute != '[' &&
+- *attribute != ']' && */ *attribute != '?' &&
++ *attribute != ';' && *attribute != ':' &&
++ *attribute != '\\' && *attribute != '"' &&
++ *attribute != '/' && *attribute != '[' &&
++ *attribute != ']' && *attribute != '?' &&
+ *attribute != '=' && length < 255) {
+ *ptr++ = *attribute++;
+ length++;
+Index: uudeview-0.5.20/uulib/uustring.c
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uustring.c
++++ uudeview-0.5.20/uulib/uustring.c
+@@ -107,6 +107,7 @@ static stringmap messages[] = {
+ { S_MIME_B_NOT_FOUND, "Boundary expected on Multipart message but found EOF" },
+ { S_MIME_MULTI_DEPTH, "Multipart message nested too deep" },
+ { S_MIME_PART_MULTI, "Handling partial multipart message as plain text" },
++ { S_OPEN_FILE, "Opened file %s" },
+
+ { 0, "" }
+ };
+Index: uudeview-0.5.20/uulib/uustring.h
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uustring.h
++++ uudeview-0.5.20/uulib/uustring.h
+@@ -36,3 +36,4 @@
+ #define S_MIME_B_NOT_FOUND 35
+ #define S_MIME_MULTI_DEPTH 36
+ #define S_MIME_PART_MULTI 37
++#define S_OPEN_FILE 38
diff --git a/app-text/uudeview/files/uudeview-0.5.20-makefile.patch b/app-text/uudeview/files/uudeview-0.5.20-makefile.patch
new file mode 100644
index 000000000000..ed3cdf66374a
--- /dev/null
+++ b/app-text/uudeview/files/uudeview-0.5.20-makefile.patch
@@ -0,0 +1,29 @@
+--- Makefile.in.orig 2015-11-18 13:52:44.173432349 +0300
++++ Makefile.in 2015-11-18 13:53:39.244429093 +0300
+@@ -183,22 +183,22 @@
+
+ install: $(DOINST)
+ -for d in $(MPAGES) ; do \
+- $(INSTALL_DATA) $(srcdir)/man/$$d $(MANDIR)/man1/$$d ; \
++ $(INSTALL_DATA) $(srcdir)/man/$$d $(DESTDIR)$(MANDIR)/man1/$$d ; \
+ done
+
+ install-uudeview: uudeview
+ for d in uudeview uuenview ; do \
+- $(INSTALL_PROGRAM) unix/$$d $(BINDIR)/$$d ; \
++ $(INSTALL_PROGRAM) unix/$$d $(DESTDIR)$(BINDIR)/$$d ; \
+ done
+
+ install-tcl: xdeview
+ for d in xdeview uuwish ; do \
+- $(INSTALL_PROGRAM) tcl/$$d $(BINDIR)/$$d ; \
++ $(INSTALL_PROGRAM) tcl/$$d $(DESTDIR)$(BINDIR)/$$d ; \
+ done
+
+ install-minews: minews
+ for d in minews ; do \
+- $(INSTALL_PROGRAM) inews/$$d $(BINDIR)/$$d ; \
++ $(INSTALL_PROGRAM) inews/$$d $(DESTDIR)$(BINDIR)/$$d ; \
+ done
+
+ links: tcl/config.h unix/config.h uulib/config.h
diff --git a/app-text/uudeview/files/uudeview-0.5.20-man.patch b/app-text/uudeview/files/uudeview-0.5.20-man.patch
new file mode 100644
index 000000000000..b03e15a5a5f2
--- /dev/null
+++ b/app-text/uudeview/files/uudeview-0.5.20-man.patch
@@ -0,0 +1,95 @@
++uudeview (0.5.13-2.1) unstable; urgency=low
+...
++ * Added man page for uuwish(1).
+...
++ -- Roland Rosenfeld <roland@debian.org> Thu, 16 Sep 1999 18:48:47 +0200
+
+
++Thu Oct 24 22:12:01 1996 Martin Schulze <joey@finlandia.infodrom.north.de>
+...
++ * Corrected some manpages
+
+Index: uudeview-0.5.20/man/uudeview.1
+===================================================================
+--- uudeview-0.5.20.orig/man/uudeview.1
++++ uudeview-0.5.20/man/uudeview.1
+@@ -164,6 +164,16 @@ delivered in have different subject line
+ verbosity. Normally, the program prints some status messages
+ while reading the input files, which can be very helpful if something
+ should go wrong. Use if these messages disturb you.
++Disables progress bars. See
++.B -n
++option.
++.TP
++.B -v
++(disables Verbosity) Disables verbose messages, i.e. notes are not
++displayed, but does not remove warnings and errors. Is not as quiet as
++the
++.B -q
++(Quiet) option.
+ .TP
+ .B -n
+ No progress bars. Normally, UUDeview prints ASCII bars crawling up
+Index: uudeview-0.5.20/man/uuwish.1
+===================================================================
+--- /dev/null
++++ uudeview-0.5.20/man/uuwish.1
+@@ -0,0 +1,45 @@
++.\" Copyright (c) 1999 Roland Rosenfeld <roland@spinnaker.de>
++.\" changes Copyright (c) 2001 Chris Hanson <cph@debian.org>
++.\"
++.\" This program is free software; you can redistribute it and/or modify
++.\" it under the terms of the GNU General Public License as published by
++.\" the Free Software Foundation; either version 2 of the License, or
++.\" (at your option) any later version.
++.\"
++.\" This program is distributed in the hope that it will be useful,
++.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
++.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++.\" GNU General Public License for more details.
++.\"
++.\" You should have received a copy of the GNU General Public License
++.\" along with this program; if not, write to the Free Software
++.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++.\"
++.\" This manual page is written especially for Debian Linux.
++.\"
++.TH UUWISH 1 "February 2001" "Debian Project" "Debian GNU/Linux"
++.SH NAME
++uuwish \- A minimal wish extended by the UU commands
++.SH SYNOPSIS
++.B uuwish
++is a minimal
++.BR wish (1)
++extended by the UU commands that are available in
++.BR uudeview (1)
++and
++.BR uuenview (1).
++.B uuwish
++isn't meant to be called directly; it is a Tcl/Tk script interpreter,
++which is meant to be used by
++.BR xdeview (1).
++.SH "SEE ALSO"
++.BR xdeview (1),
++.BR uudeview (1),
++.BR uuenview (1),
++.BR wish (1).
++.SH AUTHOR
++.B uuwish
++was written by Frank Pilhofer <fp@informatik.uni-frankfurt.de>.
++.PP
++This manual page was written by Roland Rosenfeld <roland@debian.org>,
++for the Debian GNU/Linux system (but may be used by others).
+Index: uudeview-0.5.20/configure.in
+===================================================================
+--- uudeview-0.5.20.orig/configure.in
++++ uudeview-0.5.20/configure.in
+@@ -607,7 +607,7 @@ if test "x$have_minews" = "xyes" ; then
+ fi
+ if test "x$have_tk" != "xno" ; then
+ PROGS="$PROGS xdeview"
+- MPAGES="$MPAGES xdeview.1"
++ MPAGES="$MPAGES xdeview.1 uuwish.1"
+ DOINST="$DOINST install-tcl"
+ fi
+
diff --git a/app-text/uudeview/files/uudeview-0.5.20-rename.patch b/app-text/uudeview/files/uudeview-0.5.20-rename.patch
new file mode 100644
index 000000000000..c62c64c70eb3
--- /dev/null
+++ b/app-text/uudeview/files/uudeview-0.5.20-rename.patch
@@ -0,0 +1,57 @@
++uudeview (0.5.19+beta20030413-1) unstable; urgency=low
+...
++ * Use rename() in preference to copy if possible.
++ (closes: Bug#166040)
+...
++ -- Chris Hanson <cph@debian.org> Sun, 7 Sep 2003 01:05:07 -0400
+
+Index: uudeview-0.5.20/uulib/uulib.c
+===================================================================
+--- uudeview-0.5.20.orig/uulib/uulib.c
++++ uudeview-0.5.20/uulib/uulib.c
+@@ -872,7 +872,10 @@ UUDecodeToTemp (uulist *thefile)
+ }
+
+ /*
+- * decode file first to temp file, then copy it to a final location
++ * Decode file first to temp file, then copy it to a final location.
++ * A move is preferable to a copy. If the file is on the same
++ * partition, no copy is performed. This is important for large
++ * files.
+ */
+
+ int UUEXPORT
+@@ -978,6 +981,12 @@ UUDecodeFile (uulist *thefile, char *des
+ return UURET_IOERR;
+ }
+
++ if (rename(thefile->binfile, uugen_fnbuffer) == 0) {
++ fclose(source);
++ close(fildes);
++ goto finish_ok;
++ }
++
+ if ((target = fdopen (fildes, "wb")) == NULL) {
+ progress.action = 0;
+ UUMessage (uulib_id, __LINE__, UUMSG_ERROR,
+@@ -1042,6 +1051,8 @@ UUDecodeFile (uulist *thefile, char *des
+ thefile->binfile,
+ strerror (uu_errno = errno));
+ }
++
++ finish_ok:
+ _FP_free (thefile->binfile);
+ thefile->binfile = NULL;
+ thefile->state &= ~UUFILE_TMPFILE;
+@@ -1103,9 +1114,9 @@ UUInfoFile (uulist *thefile, void *opaqu
+
+ while (!feof (inpfile) &&
+ (uu_fast_scanning || ftell(inpfile) < maxpos)) {
+- if (_FP_fgets (uugen_inbuffer, 511, inpfile) == NULL)
++ if (_FP_fgets (uugen_inbuffer, 1023, inpfile) == NULL)
+ break;
+- uugen_inbuffer[511] = '\0';
++ uugen_inbuffer[1023] = '\0';
+
+ if (ferror (inpfile))
+ break;
diff --git a/app-text/uudeview/metadata.xml b/app-text/uudeview/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/app-text/uudeview/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/app-text/uudeview/uudeview-0.5.20-r2.ebuild b/app-text/uudeview/uudeview-0.5.20-r2.ebuild
new file mode 100644
index 000000000000..17446a4e771f
--- /dev/null
+++ b/app-text/uudeview/uudeview-0.5.20-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils autotools
+
+DESCRIPTION="uu, xx, base64, binhex decoder"
+HOMEPAGE="http://www.fpx.de/fp/Software/UUDeview/"
+SRC_URI="http://www.fpx.de/fp/Software/UUDeview/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="tk"
+
+RDEPEND="tk? ( dev-lang/tk:0 )"
+DEPEND="${RDEPEND}"
+
+DOCS=( HISTORY INSTALL README )
+
+PATCHES=(
+ "${FILESDIR}/${P}-bugfixes.patch"
+ "${FILESDIR}/${P}-CVE-2004-2265.patch"
+ "${FILESDIR}/${P}-CVE-2008-2266.patch"
+ "${FILESDIR}/${P}-man.patch"
+ "${FILESDIR}/${P}-rename.patch"
+ "${FILESDIR}/${P}-makefile.patch"
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ mv configure.in configure.ac || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable tk tcl) \
+ $(use_enable tk)
+}