]> Chaos Git - misc/patchrepo.git/commitdiff
Add some patches.
authorchaoskagami <chaos.kagami@gmail.com>
Wed, 23 Sep 2015 12:59:34 +0000 (08:59 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Wed, 23 Sep 2015 12:59:34 +0000 (08:59 -0400)
README.md
aria2/aria2-1.19.0-leech.patch [new file with mode: 0644]
libvpx/libvpx-1.4.0_1.3.0backcompat.patch [new file with mode: 0644]
links/links-no-egd-libressl.patch [new file with mode: 0644]
sdl/sdl-xdata.patch [new file with mode: 0644]
wget/wget-no-egd-libressl.patch [new file with mode: 0644]

index 330e261e7c21daf5b9a30821713bf19b8b92820c..938d95d42437981c9c10fa634ea1f3ca4a54a702 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,3 +4,19 @@ Or, when you run a completely unsupported system, you run into issues. Or, you j
 Everything in here is a patch meant to be applied to code. Some of these might be from distros, but hard to find. Some might be on a bug tracker. Some might be downright custom.
 
 They either fix a bug, fix a build, or change functionality. Point is, I have a lot of them.
+
+aria2/
+    aria2-1.19.0-leech.patch
+        Adds a --disable-seed option. Does what you expect.
+wget/
+    wget-no-egd-libressl.patch
+        Removes reference to egd so libressl is usable.
+libvpx/
+    libvpx-1.4.0_1.3.0backcompat.patch
+        Adds some #defines to enable *some* backcompatibility with libvpx 1.3.0. This is enough to build pale moon against it.
+links/
+    links-no-egd-libressl.patch
+        See the wget patch.
+sdl/
+    sdl-xdata.patch
+        Fixes 'Undefined symbol _XData32' which occurs in some circumstances.
diff --git a/aria2/aria2-1.19.0-leech.patch b/aria2/aria2-1.19.0-leech.patch
new file mode 100644 (file)
index 0000000..ec410ab
--- /dev/null
@@ -0,0 +1,246 @@
+===========================================================
+Non-technical version:
+
+This adds an option to disable torrent seeding -
+'--disable-seed'.
+
+Apply this with 'patch -Np1'. You'll need to run
+'autoreconf -fi' prior to configure.
+
+Also, if you report bugs to aria2, make sure they
+know you applied this. If they say "can't help you"
+then try and repro without this and report it, and if it
+is with this patch only, report it here.
+===========================================================
+Technical version:
+
+This patch introduces another seed criteria class -
+NopeSeedCriteria, which always returns true, e.g. done
+seeding.
+
+It adds a config option '--disable-seed' to well, disable
+seeding of torrents. This option gets read before all of
+the other seed options, but if any seed prefs are
+specified, they will override this force-disable behavior.
+
+The default behavior is still to seed like it was before.
+
+If like me, you have an ISP who has 1/20th the
+upload speed of download speed, it may actually speed up
+downloads. It also means said ISP can't actually say you
+uploaded an ounce of data - you didn't. On the downside; 
+you're not obeying torrent etiquette, so don't try this
+on a private tracker.
+
+This patch is relatively uninvasive. I don't expect it to
+be upstreamed, though.
+===========================================================
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/BtSetup.cc aria2-1.19.0-leech/src/BtSetup.cc
+--- aria2-1.19.0/src/BtSetup.cc        2015-05-24 05:51:12.000000000 -0400
++++ aria2-1.19.0-leech/src/BtSetup.cc  2015-09-23 06:38:52.237492798 -0400
+@@ -48,6 +48,7 @@
+ #include "PeerListenCommand.h"
+ #include "UnionSeedCriteria.h"
+ #include "TimeSeedCriteria.h"
++#include "NopeSeedCriteria.h"
+ #include "ShareRatioSeedCriteria.h"
+ #include "prefs.h"
+ #include "LogFactory.h"
+@@ -157,6 +158,13 @@
+   }
+   if(!metadataGetMode) {
+     auto unionCri = make_unique<UnionSeedCriteria>();
++
++    if(option->defined(PREF_SEED_DISABLE)) {
++      auto cdis = option->getAsBool(PREF_SEED_DISABLE);
++      if (cdis == true)
++        unionCri->addSeedCriteria(make_unique<NopeSeedCriteria>());
++    }
++
+     if(option->defined(PREF_SEED_TIME)) {
+       unionCri->addSeedCriteria(make_unique<TimeSeedCriteria>
+                                 (option->getAsInt(PREF_SEED_TIME)*60));
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/Makefile.am aria2-1.19.0-leech/src/Makefile.am
+--- aria2-1.19.0/src/Makefile.am       2015-05-24 05:51:12.000000000 -0400
++++ aria2-1.19.0-leech/src/Makefile.am 2015-09-23 06:52:20.395512735 -0400
+@@ -601,6 +601,7 @@
+       SeedCheckCommand.cc SeedCheckCommand.h\
+       SeedCriteria.h\
+       ShareRatioSeedCriteria.cc ShareRatioSeedCriteria.h\
++      NopeSeedCriteria.cc NopeSeedCriteria.h\
+       SimpleBtMessage.cc SimpleBtMessage.h\
+       TimeSeedCriteria.cc TimeSeedCriteria.h\
+       TrackerWatcherCommand.cc TrackerWatcherCommand.h\
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/NopeSeedCriteria.cc aria2-1.19.0-leech/src/NopeSeedCriteria.cc
+--- aria2-1.19.0/src/NopeSeedCriteria.cc       1969-12-31 19:00:00.000000000 -0500
++++ aria2-1.19.0-leech/src/NopeSeedCriteria.cc 2015-09-23 06:58:51.533522384 -0400
+@@ -0,0 +1,50 @@
++/* <!-- copyright */
++/*
++ * aria2 - The high speed download utility
++ *
++ * Copyright (C) 2010 Tatsuhiro Tsujikawa
++ *
++ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * In addition, as a special exception, the copyright holders give
++ * permission to link the code of portions of this program with the
++ * OpenSSL library under certain conditions as described in each
++ * individual source file, and distribute linked combinations
++ * including the two.
++ * You must obey the GNU General Public License in all respects
++ * for all of the code used other than OpenSSL.  If you modify
++ * file(s) with this exception, you may extend this exception to your
++ * version of the file(s), but you are not obligated to do so.  If you
++ * do not wish to do so, delete this exception statement from your
++ * version.  If you delete this exception statement from all source
++ * files in the program, then also delete it here.
++ */
++/* copyright --> */
++#include "NopeSeedCriteria.h"
++
++namespace aria2 {
++
++NopeSeedCriteria::NopeSeedCriteria() {}
++
++NopeSeedCriteria::~NopeSeedCriteria() {}
++
++void NopeSeedCriteria::reset() {}
++
++bool NopeSeedCriteria::evaluate()
++{
++  return true;
++}
++
++}
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/NopeSeedCriteria.h aria2-1.19.0-leech/src/NopeSeedCriteria.h
+--- aria2-1.19.0/src/NopeSeedCriteria.h        1969-12-31 19:00:00.000000000 -0500
++++ aria2-1.19.0-leech/src/NopeSeedCriteria.h  2015-09-23 06:12:47.124454187 -0400
+@@ -0,0 +1,55 @@
++/* <!-- copyright */
++/*
++ * aria2 - The high speed download utility
++ *
++ * Copyright (C) 2006 Tatsuhiro Tsujikawa
++ *
++ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ *
++ * In addition, as a special exception, the copyright holders give
++ * permission to link the code of portions of this program with the
++ * OpenSSL library under certain conditions as described in each
++ * individual source file, and distribute linked combinations
++ * including the two.
++ * You must obey the GNU General Public License in all respects
++ * for all of the code used other than OpenSSL.  If you modify
++ * file(s) with this exception, you may extend this exception to your
++ * version of the file(s), but you are not obligated to do so.  If you
++ * do not wish to do so, delete this exception statement from your
++ * version.  If you delete this exception statement from all source
++ * files in the program, then also delete it here.
++ */
++/* copyright --> */
++#ifndef D_NOPE_SEED_CRITERIA_H
++#define D_NOPE_SEED_CRITERIA_H
++
++#include "SeedCriteria.h"
++
++namespace aria2 {
++
++class NopeSeedCriteria : public SeedCriteria {
++public:
++  NopeSeedCriteria();
++
++  virtual ~NopeSeedCriteria();
++
++  virtual void reset() CXX11_OVERRIDE;
++
++  virtual bool evaluate() CXX11_OVERRIDE;
++};
++
++} // namespace aria2
++
++#endif // D_NOPE_SEED_CRITERIA_H
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/OptionHandlerFactory.cc aria2-1.19.0-leech/src/OptionHandlerFactory.cc
+--- aria2-1.19.0/src/OptionHandlerFactory.cc   2015-05-24 05:51:12.000000000 -0400
++++ aria2-1.19.0-leech/src/OptionHandlerFactory.cc     2015-09-23 06:34:53.260486902 -0400
+@@ -2242,6 +2242,15 @@
+     handlers.push_back(op);
+   }
+   {
++    OptionHandler* op(new BooleanOptionHandler
++                      (PREF_SEED_DISABLE,
++                       TEXT_SEED_DISABLE,
++                       A2_V_FALSE,
++                       OptionHandler::OPT_ARG));
++    op->addTag(TAG_BITTORRENT);
++    handlers.push_back(op);
++  }
++  {
+     OptionHandler* op(new LocalFilePathOptionHandler
+                       (PREF_TORRENT_FILE,
+                        TEXT_TORRENT_FILE,
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/prefs.cc aria2-1.19.0-leech/src/prefs.cc
+--- aria2-1.19.0/src/prefs.cc  2015-05-24 05:51:12.000000000 -0400
++++ aria2-1.19.0-leech/src/prefs.cc    2015-09-23 07:15:13.184546601 -0400
+@@ -471,6 +471,8 @@
+ PrefPtr PREF_SELECT_FILE = makePref("select-file");
+ // values: 1*digit
+ PrefPtr PREF_SEED_TIME = makePref("seed-time");
++// values: true | false
++PrefPtr PREF_SEED_DISABLE = makePref("disable-seed");
+ // values: 1*digit ['.' [ 1*digit ] ]
+ PrefPtr PREF_SEED_RATIO = makePref("seed-ratio");
+ // values: 1*digit
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/prefs.h aria2-1.19.0-leech/src/prefs.h
+--- aria2-1.19.0/src/prefs.h   2015-05-24 05:51:12.000000000 -0400
++++ aria2-1.19.0-leech/src/prefs.h     2015-09-23 06:21:50.846467600 -0400
+@@ -408,6 +408,8 @@
+ extern PrefPtr PREF_SELECT_FILE;
+ // values: 1*digit
+ extern PrefPtr PREF_SEED_TIME;
++// values: true | false
++extern PrefPtr PREF_SEED_DISABLE;
+ // values: 1*digit ['.' [ 1*digit ] ]
+ extern PrefPtr PREF_SEED_RATIO;
+ // values: 1*digit
+diff -urN -x '*.Plo' -x '*.Po' -x Makefile -x Makefile.in -x '*.pc' aria2-1.19.0/src/usage_text.h aria2-1.19.0-leech/src/usage_text.h
+--- aria2-1.19.0/src/usage_text.h      2015-05-24 05:51:12.000000000 -0400
++++ aria2-1.19.0-leech/src/usage_text.h        2015-09-23 07:14:50.546546043 -0400
+@@ -297,7 +297,12 @@
+ #define TEXT_SEED_TIME                                                  \
+   _(" --seed-time=MINUTES          Specify seeding time in minutes. Also see the\n" \
+     "                              --seed-ratio option.")
+-#define TEXT_SEED_RATIO                                                 \
++#define TEXT_SEED_DISABLE                                                  \
++  _(" --disable-seed               If no other seed time or ratio options are\n" \
++    "                              specified, this completely disables seeding\n" \
++    "                              of torrents. No data will be uploaded, and\n" \
++    "                              aria2 will exit immediately upon reaching 100%.")
++#define TEXT_SEED_RATIO \
+   _(" --seed-ratio=RATIO           Specify share ratio. Seed completed torrents\n" \
+     "                              until share ratio reaches RATIO.\n"  \
+     "                              You are strongly encouraged to specify equals or\n" \
diff --git a/libvpx/libvpx-1.4.0_1.3.0backcompat.patch b/libvpx/libvpx-1.4.0_1.3.0backcompat.patch
new file mode 100644 (file)
index 0000000..ff4dd2e
--- /dev/null
@@ -0,0 +1,47 @@
+Backwards compatibility patch for libvpx 1.3.0.
+Why they broke it - dunno. This resolves palemoon builds
+against a system libvpx 1.4.0.
+
+Also, remember to specify --size-limit=16384x16384 when
+configuring to avoid CVE-2015-1258.
+
+This can actually be applied to the system header without
+breaking compatibility ABI or API, if you care.
+
+--- a/vpx/vpx_image.h  2015-09-10 18:56:56.745789978 -0400
++++ b/vpx/vpx_image.h  2015-06-25 15:04:01.033448569 -0400
+@@ -66,6 +66,34 @@
+     VPX_IMG_FMT_I44016    = VPX_IMG_FMT_I440 | VPX_IMG_FMT_HIGHBITDEPTH
+   } vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */
++#define IMG_FMT_NONE VPX_IMG_FMT_NONE
++#define IMG_FMT_RGB24 VPX_IMG_FMT_RGB24
++#define IMG_FMT_RGB32 VPX_IMG_FMT_RGB32
++#define IMG_FMT_RGB565 VPX_IMG_FMT_RGB565
++#define IMG_FMT_RGB555 VPX_IMG_FMT_RGB555
++#define IMG_FMT_UYVY VPX_IMG_FMT_UYVY
++#define IMG_FMT_YUY2 VPX_IMG_FMT_YUY2
++#define IMG_FMT_YVYU VPX_IMG_FMT_YVYU
++#define IMG_FMT_BGR24 VPX_IMG_FMT_BGR24
++#define IMG_FMT_RGB32_LE VPX_IMG_FMT_RGB32_LE
++#define IMG_FMT_ARGB VPX_IMG_FMT_ARGB
++#define IMG_FMT_ARGB_LE VPX_IMG_FMT_ARGB_LE
++#define IMG_FMT_RGB565_LE VPX_IMG_FMT_RGB565_LE
++#define IMG_FMT_RGB555_LE VPX_IMG_FMT_RGB555_LE
++#define IMG_FMT_YV12 VPX_IMG_FMT_YV12
++#define IMG_FMT_I420 VPX_IMG_FMT_I420
++#define IMG_FMT_VPXYV12 VPX_IMG_FMT_VPXYV12
++#define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420
++#define IMG_FMT_I422 VPX_IMG_FMT_I422
++#define IMG_FMT_I444 VPX_IMG_FMT_I444
++#define IMG_FMT_I440 VPX_IMG_FMT_I440
++#define IMG_FMT_444A VPX_IMG_FMT_444A
++#define IMG_FMT_I42016 VPX_IMG_FMT_I42016
++#define IMG_FMT_I42216 VPX_IMG_FMT_I42216
++#define IMG_FMT_I44416 VPX_IMG_FMT_I44416
++#define IMG_FMT_I44016 VPX_IMG_FMT_I44016
++
++
+   /*!\brief List of supported color spaces */
+   typedef enum vpx_color_space {
+     VPX_CS_UNKNOWN    = 0,  /**< Unknown */
diff --git a/links/links-no-egd-libressl.patch b/links/links-no-egd-libressl.patch
new file mode 100644 (file)
index 0000000..2a106f3
--- /dev/null
@@ -0,0 +1,20 @@
+Disables use of EGD in the links text browser.
+
+diff -ur links-2.9/https.c b/https.c
+--- links-2.9/https.c  2013-09-20 17:17:00.000000000 -0400
++++ b/https.c  2015-09-21 05:49:16.768082372 -0400
+@@ -36,11 +36,9 @@
+               unsigned os_pool_size;
+               const unsigned char *f = (const unsigned char *)RAND_file_name(cast_char f_randfile, sizeof(f_randfile));
+-              if (f && RAND_egd(cast_const_char f) < 0) {
+-                      /* Not an EGD, so read and write to it */
+-                      if (RAND_load_file(cast_const_char f_randfile, -1))
+-                              RAND_write_file(cast_const_char f_randfile);
+-              }
++              /* Not an EGD, so read and write to it */
++              if (RAND_load_file(cast_const_char f_randfile, -1))
++                      RAND_write_file(cast_const_char f_randfile);
+               os_seed_random(&os_pool, &os_pool_size);
+               if (os_pool_size) RAND_add(os_pool, os_pool_size, os_pool_size);
diff --git a/sdl/sdl-xdata.patch b/sdl/sdl-xdata.patch
new file mode 100644 (file)
index 0000000..61e6fd5
--- /dev/null
@@ -0,0 +1,54 @@
+Newer Xorg versions have changed a few things.
+This allows SDL to build with a newer Xlib without
+missing symbol issues.
+
+diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in
+--- a/configure.in     Wed Apr 17 00:56:53 2013 -0700
++++ b/configure.in     Sun Jun 02 20:48:53 2013 +0600
+@@ -1169,6 +1169,17 @@
+             if test x$definitely_enable_video_x11_xrandr = xyes; then
+                 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
+             fi
++            AC_MSG_CHECKING(for const parameter to _XData32)
++            have_const_param_xdata32=no
++            AC_TRY_COMPILE([
++              #include <X11/Xlibint.h>
++              extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
++            ],[
++            ],[
++            have_const_param_xdata32=yes
++            AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
++            ])
++            AC_MSG_RESULT($have_const_param_xdata32)
+         fi
+     fi
+ }
+
+diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in
+--- a/include/SDL_config.h.in  Wed Apr 17 00:56:53 2013 -0700
++++ b/include/SDL_config.h.in  Sun Jun 02 20:48:53 2013 +0600
+@@ -283,6 +283,7 @@
+ #undef SDL_VIDEO_DRIVER_WINDIB
+ #undef SDL_VIDEO_DRIVER_WSCONS
+ #undef SDL_VIDEO_DRIVER_X11
++#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
+ #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
+ #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
+
+diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h
+--- a/src/video/x11/SDL_x11sym.h       Wed Apr 17 00:56:53 2013 -0700
++++ b/src/video/x11/SDL_x11sym.h       Sun Jun 02 20:48:53 2013 +0600
+@@ -165,7 +165,11 @@
+  */
+ #ifdef LONG64
+ SDL_X11_MODULE(IO_32BIT)
++#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
++#else
+ SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
++#endif
+ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
+ #endif
+
diff --git a/wget/wget-no-egd-libressl.patch b/wget/wget-no-egd-libressl.patch
new file mode 100644 (file)
index 0000000..e95c456
--- /dev/null
@@ -0,0 +1,23 @@
+This patch fixes building wget against libressl.
+It isn't actually that hard, really...
+
+We remove the RAND_status call because doing it twice
+in a row is redundant.
+
+diff -ur a/src/openssl.c b/src/openssl.c
+--- a/src/openssl.c    2014-10-27 04:15:33.000000000 -0400
++++ b/src/openssl.c    2015-09-20 17:14:50.616006063 -0400
+@@ -89,13 +89,6 @@
+   if (RAND_status ())
+     return;
+-  /* Get random data from EGD if opt.egd_file was used.  */
+-  if (opt.egd_file && *opt.egd_file)
+-    RAND_egd (opt.egd_file);
+-
+-  if (RAND_status ())
+-    return;
+-
+ #ifdef WINDOWS
+   /* Under Windows, we can try to seed the PRNG using screen content.
+      This may or may not work, depending on whether we'll calling Wget