diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-09-30 12:01:32 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-09-30 12:05:27 +0200 |
commit | 79355ae3e84359716f5135cc7083e72246bc8bf9 (patch) | |
tree | 6b61851e2153581578bb78ef0f177b8841ee5db7 /gnu/packages/patches | |
parent | 39d6b9c99f297e14fc4f47f002be3d40556726be (diff) | |
parent | 86d8f6d3efb8300a3354735cbf06be6c01e23243 (diff) | |
download | guix-79355ae3e84359716f5135cc7083e72246bc8bf9.tar guix-79355ae3e84359716f5135cc7083e72246bc8bf9.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches')
23 files changed, 1983 insertions, 260 deletions
diff --git a/gnu/packages/patches/azr3.patch b/gnu/packages/patches/azr3.patch new file mode 100644 index 0000000000..5849383c5b --- /dev/null +++ b/gnu/packages/patches/azr3.patch @@ -0,0 +1,151 @@ +This patch adds the "sigc" and "std" namespace prefixes where needed. It also +replaces a double single-argument "bind" with a single two-argument "bind", +because the former would confuse the compiler. + +The patch has been sent to the developer on 2016-09-26. + +--- azr3-jack-1.2.3/azr3/knob.cpp 2016-09-26 10:29:27.653375902 +0200 ++++ azr3-jack-1.2.3/azr3/knob.cpp 2016-09-26 10:29:38.693430647 +0200 +@@ -44,7 +44,7 @@ + set_size_request(44, 44); + add_events(EXPOSURE_MASK | BUTTON1_MOTION_MASK | + BUTTON_PRESS_MASK | SCROLL_MASK); +- m_adj.signal_value_changed().connect(mem_fun(*this, &Knob::queue_draw)); ++ m_adj.signal_value_changed().connect(sigc::mem_fun(*this, &Knob::queue_draw)); + } + + +--- azr3-jack-1.2.3/azr3/drawbar.cpp 2016-09-26 10:27:40.632845216 +0200 ++++ azr3-jack-1.2.3/azr3/drawbar.cpp 2016-09-26 10:27:48.952886473 +0200 +@@ -37,7 +37,7 @@ + set_size_request(22, 150); + add_events(EXPOSURE_MASK | BUTTON1_MOTION_MASK | + BUTTON_PRESS_MASK | SCROLL_MASK); +- m_adj.signal_value_changed().connect(mem_fun(*this, &Drawbar::queue_draw)); ++ m_adj.signal_value_changed().connect(sigc::mem_fun(*this, &Drawbar::queue_draw)); + } + + +--- azr3-jack-1.2.3/azr3/switch.cpp 2016-09-26 10:28:48.169180111 +0200 ++++ azr3-jack-1.2.3/azr3/switch.cpp 2016-09-26 10:28:55.713217520 +0200 +@@ -49,7 +49,7 @@ + } + set_size_request(m_width, m_height); + add_events(EXPOSURE_MASK | BUTTON_PRESS_MASK | SCROLL_MASK); +- m_adj.signal_value_changed().connect(mem_fun(*this, &Switch::queue_draw)); ++ m_adj.signal_value_changed().connect(sigc::mem_fun(*this, &Switch::queue_draw)); + } + + +--- azr3-jack-1.2.3/azr3/azr3gui.cpp 2016-09-26 09:05:10.106963561 +0200 ++++ azr3-jack-1.2.3/azr3/azr3gui.cpp 2016-09-26 10:26:47.480581648 +0200 +@@ -73,19 +73,19 @@ + m_tbox = add_textbox(m_fbox, pixmap, 391, 19, 3, 140, 39); + m_tbox->add_events(SCROLL_MASK); + m_tbox->signal_scroll_display. +- connect(mem_fun(*this, &AZR3GUI::display_scroll)); ++ connect(sigc::mem_fun(*this, &AZR3GUI::display_scroll)); + m_splitpoint_adj = new Adjustment(0, 0, 1); + m_adj[n_splitpoint] = m_splitpoint_adj; + m_splitpoint_adj->signal_value_changed(). +- connect(mem_fun(*this, &AZR3GUI::splitpoint_changed)); ++ connect(sigc::mem_fun(*this, &AZR3GUI::splitpoint_changed)); + Menu* menu = create_menu(); + m_tbox->signal_button_press_event(). +- connect(bind(mem_fun(*this, &AZR3GUI::popup_menu), menu)); ++ connect(sigc::bind(sigc::mem_fun(*this, &AZR3GUI::popup_menu), menu)); + + // keyboard split switch + m_splitswitch = add_switch(m_fbox, -1, 537, 49, Switch::Mini); + m_splitswitch->get_adjustment().signal_value_changed(). +- connect(mem_fun(*this, &AZR3GUI::splitbox_clicked)); ++ connect(sigc::mem_fun(*this, &AZR3GUI::splitbox_clicked)); + + // upper knobs + add_switch(m_fbox, n_mono, 61, 105, Switch::Mini); +@@ -141,8 +141,8 @@ + // mode switcher + Widget* eb = add_clickbox(m_fbox, 14, 319, 14, 44); + eb->signal_button_press_event(). +- connect(sigc::hide(bind(bind(mem_fun(*this, &AZR3GUI::change_mode), +- ref(m_fbox)), false))); ++ connect(sigc::hide(sigc::bind(sigc::mem_fun(*this, &AZR3GUI::change_mode), ++ false, std::ref(m_fbox)))); + m_fx_widgets.push_back(eb); + + // Mr Valve controls +@@ -182,8 +182,8 @@ + // mode switcher 2 + Widget* eb2 = add_clickbox(m_vbox, 14, 53, 14, 44); + eb2->signal_button_press_event(). +- connect(sigc::hide(bind(bind(mem_fun(*this, &AZR3GUI::change_mode), +- ref(m_fbox)), true))); ++ connect(sigc::hide(sigc::bind(sigc::mem_fun(*this, &AZR3GUI::change_mode), ++ true, std::ref(m_fbox)))); + + // vibrato controls + add_switch(m_vbox, n_1_vibrato, 39, 17, Switch::Green); +@@ -352,9 +352,9 @@ + knob->set_style(s); + if (port >= 0 && port < m_adj.size()) { + knob->get_adjustment().signal_value_changed(). +- connect(compose(bind<0>(mem_fun(*this, &AZR3GUI::control_changed), port), +- mem_fun(knob->get_adjustment(), +- &Adjustment::get_value))); ++ connect(compose(sigc::bind<0>(sigc::mem_fun(*this, &AZR3GUI::control_changed), port), ++ sigc::mem_fun(knob->get_adjustment(), ++ &Adjustment::get_value))); + assert(m_adj[port] == 0); + m_adj[port] = &knob->get_adjustment(); + } +@@ -382,8 +382,8 @@ + db->set_style(s); + if (port >= 0 && port < m_adj.size()) { + db->get_adjustment().signal_value_changed(). +- connect(compose(bind<0>(mem_fun(*this, &AZR3GUI::control_changed), port), +- mem_fun(db->get_adjustment(), &Adjustment::get_value))); ++ connect(compose(sigc::bind<0>(sigc::mem_fun(*this, &AZR3GUI::control_changed), port), ++ sigc::mem_fun(db->get_adjustment(), &Adjustment::get_value))); + assert(m_adj[port] == 0); + m_adj[port] = &db->get_adjustment(); + } +@@ -397,8 +397,8 @@ + fbox.put(*sw, xoffset, yoffset); + if (port >= 0 && port < m_adj.size()) { + sw->get_adjustment().signal_value_changed(). +- connect(compose(bind<0>(mem_fun(*this, &AZR3GUI::control_changed),port), +- mem_fun(sw->get_adjustment(), &Adjustment::get_value))); ++ connect(compose(sigc::bind<0>(sigc::mem_fun(*this, &AZR3GUI::control_changed),port), ++ sigc::mem_fun(sw->get_adjustment(), &Adjustment::get_value))); + assert(m_adj[port] == 0); + m_adj[port] = &sw->get_adjustment(); + } +@@ -489,7 +489,7 @@ + oss<<setw(2)<<setfill('0')<<iter->first<<' '<<iter->second.substr(0, 23); + MenuItem* item = manage(new MenuItem(oss.str())); + item->signal_activate(). +- connect(bind(mem_fun(*this, &AZR3GUI::program_changed), iter->first)); ++ connect(sigc::bind(sigc::mem_fun(*this, &AZR3GUI::program_changed), iter->first)); + m_program_menu->items().push_back(*item); + item->show(); + item->get_child()->modify_bg(STATE_NORMAL, m_menu_bg); +@@ -503,8 +503,8 @@ + for (int i = 0; i < 128; ++i) { + MenuItem* item = manage(new MenuItem(note2str(i))); + item->signal_activate(). +- connect(bind(mem_fun(*m_splitpoint_adj, &Adjustment::set_value), +- i / 128.0)); ++ connect(sigc::bind(sigc::mem_fun(*m_splitpoint_adj, &Adjustment::set_value), ++ i / 128.0)); + m_split_menu->items().push_back(*item); + item->show(); + item->get_child()->modify_bg(STATE_NORMAL, m_menu_bg); +@@ -533,7 +533,7 @@ + + MenuItem* save_item = manage(new MenuItem("Save program")); + save_item->signal_activate(). +- connect(mem_fun(*this, &AZR3GUI::save_program)); ++ connect(sigc::mem_fun(*this, &AZR3GUI::save_program)); + save_item->show(); + save_item->get_child()->modify_fg(STATE_NORMAL, m_menu_bg); + save_item->get_child()->modify_fg(STATE_NORMAL, m_menu_fg); diff --git a/gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch b/gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch deleted file mode 100644 index ccece0f466..0000000000 --- a/gnu/packages/patches/dtc-add-missing-symbols-to-lds.patch +++ /dev/null @@ -1,59 +0,0 @@ -From a4b093f7366fdb429ca1781144d3985fa50d0fbb Mon Sep 17 00:00:00 2001 -From: Julien Grall <julien.grall@linaro.org> -Date: Tue, 17 Mar 2015 16:00:34 +0000 -Subject: [PATCH] libfdt: Add missing functions to shared library - -The commit 4e76ec7 "libfdt: Add fdt_next_subnode() to permit easy -subnode iteration" adds new functions (fdt_{first,next}_subnode) but -forgot to mark them as 'global' in the shared library. - -Signed-off-by: Julien Grall <julien.grall@linaro.org> ---- - libfdt/version.lds | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libfdt/version.lds b/libfdt/version.lds -index 80b322b..941208e 100644 ---- a/libfdt/version.lds -+++ b/libfdt/version.lds -@@ -54,6 +54,8 @@ LIBFDT_1.2 { - fdt_get_property_by_offset; - fdt_getprop_by_offset; - fdt_next_property_offset; -+ fdt_first_subnode; -+ fdt_next_subnode; - - local: - *; -From f58799be130e27cc729cb2d45566daa0bb3b8605 Mon Sep 17 00:00:00 2001 -From: David Gibson <david@gibson.dropbear.id.au> -Date: Tue, 1 Dec 2015 12:55:21 +1100 -Subject: [PATCH] libfdt: Add some missing symbols to version.lds - -Several functions in the header file were missing from the version.lds -script, meaning that they couldn't be used from a libfdt shared library. - -Reported by Ken Aaker, via github issue tracker. - -Signed-off-by: David Gibson <david@gibson.dropbear.id.au> ---- - libfdt/version.lds | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/libfdt/version.lds b/libfdt/version.lds -index f19f157..1f4e1ea 100644 ---- a/libfdt/version.lds -+++ b/libfdt/version.lds -@@ -57,6 +57,10 @@ LIBFDT_1.2 { - fdt_next_property_offset; - fdt_first_subnode; - fdt_next_subnode; -+ fdt_address_cells; -+ fdt_size_cells; -+ fdt_stringlist_contains; -+ fdt_resize; - - local: - *; --- -2.8.1 diff --git a/gnu/packages/patches/flashrom-use-libftdi1.patch b/gnu/packages/patches/flashrom-use-libftdi1.patch deleted file mode 100644 index a6051df30a..0000000000 --- a/gnu/packages/patches/flashrom-use-libftdi1.patch +++ /dev/null @@ -1,70 +0,0 @@ -Update to libftdi-1.0 is advertised as a drop-in replacement for libftdi, -running on top of libusb-1.0. This also removes indirect dependency to -libusb-0.1. - -Patch by Kyösti Mälkki <kyosti.malkki@gmail.com>. -See <http://patchwork.coreboot.org/patch/3904/>. - ---- flashrom/Makefile.orig 2013-08-13 18:00:00.000000000 -0400 -+++ flashrom/Makefile 2014-08-05 03:10:40.217145375 -0400 -@@ -492,19 +492,21 @@ - ifeq ($(CONFIG_FT2232_SPI), yes) - # This is a totally ugly hack. - FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_FT2232_SPI=1'") --NEED_FTDI := yes -+NEED_FTDI1 := yes - PROGRAMMER_OBJS += ft2232_spi.o - endif - - ifeq ($(CONFIG_USBBLASTER_SPI), yes) - # This is a totally ugly hack. - FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'CONFIG_USBBLASTER_SPI=1'") --NEED_FTDI := yes -+NEED_LIBUSB1 := yes -+NEED_FTDI1 := yes - PROGRAMMER_OBJS += usbblaster_spi.o - endif - --ifeq ($(NEED_FTDI), yes) --FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb") -+ifeq ($(NEED_FTDI1), yes) -+FTDILIBS := $(shell pkg-config --libs libftdi1 2>/dev/null || printf "%s" "-lftdi1 -lusb-1.0") -+FEATURE_CFLAGS += $(shell pkg-config --cflags libftdi1 2>/dev/null) - FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FT232H := yes" .features && printf "%s" "-D'HAVE_FT232H=1'") - FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)") - # We can't set NEED_USB here because that would transform libftdi auto-enabling -@@ -781,6 +783,7 @@ - endif - - define FTDI_TEST -+#include <stddef.h> - #include <ftdi.h> - struct ftdi_context *ftdic = NULL; - int main(int argc, char **argv) -@@ -793,6 +796,7 @@ - export FTDI_TEST - - define FTDI_232H_TEST -+#include <stddef.h> - #include <ftdi.h> - enum ftdi_chip_type type = TYPE_232H; - endef -@@ -826,15 +830,15 @@ - - features: compiler - @echo "FEATURES := yes" > .features.tmp --ifeq ($(NEED_FTDI), yes) -+ifeq ($(NEED_FTDI1), yes) - @printf "Checking for FTDI support... " - @echo "$$FTDI_TEST" > .featuretest.c -- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \ -+ @$(CC) $(CPPFLAGS) $(CFLAGS) $(FEATURE_CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \ - ( echo "found."; echo "FTDISUPPORT := yes" >> .features.tmp ) || \ - ( echo "not found."; echo "FTDISUPPORT := no" >> .features.tmp ) - @printf "Checking for FT232H support in libftdi... " - @echo "$$FTDI_232H_TEST" >> .featuretest.c -- @$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \ -+ @$(CC) $(CPPFLAGS) $(CFLAGS) $(FEATURE_CFLAGS) $(LDFLAGS) .featuretest.c -o .featuretest$(EXEC_SUFFIX) $(FTDILIBS) $(LIBS) >/dev/null 2>&1 && \ - ( echo "found."; echo "FT232H := yes" >> .features.tmp ) || \ - ( echo "not found."; echo "FT232H := no" >> .features.tmp ) - endif diff --git a/gnu/packages/patches/gnupg-fix-expired-test.patch b/gnu/packages/patches/gnupg-fix-expired-test.patch new file mode 100644 index 0000000000..ac2564f50c --- /dev/null +++ b/gnu/packages/patches/gnupg-fix-expired-test.patch @@ -0,0 +1,78 @@ +Fix a test that has an expiration date of 2016-09-17: + +https://bugs.gnupg.org/gnupg/issue2393 + +Patch adapted from upstream source repository: + +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=e584d6468a2e72cd01e55f46104f9f96b56c0b66 + +The patch has been altered by commenting out a diff that does not apply +to the version of GnuPG that we are applying it to, 2.1.13. This is +what the patch author refers to below with "This commit includes changes +to the old test as well, for those who need to backport it." We keep the +old test and comment out the new test. + +From e584d6468a2e72cd01e55f46104f9f96b56c0b66 Mon Sep 17 00:00:00 2001 +From: Justus Winter <justus@g10code.com> +Date: Thu, 23 Jun 2016 17:24:23 +0200 +Subject: [PATCH] tests/openpgp: Fake the system time for the tofu test. + +The keys in the tofu test are set to expire on 2016-09-17. Fake the +system time for this test. + +This commit includes changes to the old test as well, for those who +need to backport it. + +* tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines. +* tests/openpgp/tofu.scm: Fake system time. +* tests/openpgp/tofu.test: Likewise. + +GnuPG-bug-id: 2393 +Signed-off-by: Justus Winter <justus@g10code.com> +--- + tests/openpgp/gpg-agent.conf.tmpl | 2 -- + tests/openpgp/tofu.scm | 4 +++- + tests/openpgp/tofu.test | 3 +++ + 3 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/tests/openpgp/gpg-agent.conf.tmpl b/tests/openpgp/gpg-agent.conf.tmpl +index b3cb54f..70e1633 100644 +--- a/tests/openpgp/gpg-agent.conf.tmpl ++++ b/tests/openpgp/gpg-agent.conf.tmpl +@@ -1,4 +1,2 @@ + allow-preset-passphrase + no-grab +- +- +#diff --git a/tests/openpgp/tofu.scm b/tests/openpgp/tofu.scm +#index 24fa9df..38b6a0f 100755 +#--- a/tests/openpgp/tofu.scm +#+++ b/tests/openpgp/tofu.scm +#@@ -19,7 +19,9 @@ +# +# (load (with-path "defs.scm")) +# +#-(define GPG `(,(tool 'gpg) --no-permission-warning)) ;; w/o --always-trust +#+ ;; Redefine GPG without --always-trust and a fixed time. +#+(define GPG `(,(tool 'gpg) --no-permission-warning +#+ --faked-system-time=1466684990)) +# (define GNUPGHOME (getenv "GNUPGHOME")) +# (if (string=? "" GNUPGHOME) +# (error "GNUPGHOME not set")) +diff --git a/tests/openpgp/tofu.test b/tests/openpgp/tofu.test +index 18c1756..0d34af4 100755 +--- a/tests/openpgp/tofu.test ++++ b/tests/openpgp/tofu.test +@@ -4,6 +4,9 @@ + + # set -x + ++# Redefine GPG with a fixed time. ++GPG="$GPG --faked-system-time=1466684990" ++ + KEYS="2183839A BC15C85A EE37CF96" + + # Make sure $srcdir is set. +-- +2.10.0 + diff --git a/gnu/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch new file mode 100644 index 0000000000..f399024f1d --- /dev/null +++ b/gnu/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch @@ -0,0 +1,15 @@ +This patch replaces the environment variable "GTK_IM_MODULE" with +"GUIX_GTK2_IM_MODULE_FILE" to prevent this version of GTK+ from loading input +method modules for other major versions of GTK+. + +--- gtk+-2.24.30/gtk/gtkrc.c 2016-08-21 22:40:22.339660438 +0200 ++++ gtk+-2.24.30/gtk/gtkrc.c 2016-08-23 10:11:11.080822710 +0200 +@@ -439,7 +439,7 @@ + gchar * + gtk_rc_get_im_module_file (void) + { +- const gchar *var = g_getenv ("GTK_IM_MODULE_FILE"); ++ const gchar *var = g_getenv ("GUIX_GTK2_IM_MODULE_FILE"); + gchar *result = NULL; + + if (var) diff --git a/gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch new file mode 100644 index 0000000000..aa63a54402 --- /dev/null +++ b/gnu/packages/patches/gtk3-respect-GUIX_GTK3_IM_MODULE_FILE.patch @@ -0,0 +1,15 @@ +This patch replaces the environment variable "GTK_IM_MODULE" with +"GUIX_GTK3_IM_MODULE_FILE" to prevent this version of GTK+ from loading input +method modules for other major versions of GTK+. + +--- gtk+-3.20.3/gtk/deprecated/gtkrc.c 2016-08-21 22:40:48.168437905 +0200 ++++ gtk+-3.20.3/gtk/deprecated/gtkrc.c 2016-08-23 10:12:09.097070097 +0200 +@@ -768,7 +768,7 @@ + gchar * + gtk_rc_get_im_module_file (void) + { +- const gchar *var = g_getenv ("GTK_IM_MODULE_FILE"); ++ const gchar *var = g_getenv ("GUIX_GTK3_IM_MODULE_FILE"); + gchar *result = NULL; + + if (var) diff --git a/gnu/packages/patches/hydra-automake-1.15.patch b/gnu/packages/patches/hydra-automake-1.15.patch deleted file mode 100644 index 91c7b9202b..0000000000 --- a/gnu/packages/patches/hydra-automake-1.15.patch +++ /dev/null @@ -1,63 +0,0 @@ -This patch takes a slightly different approach to solving the issue reported -at https://github.com/NixOS/hydra/issues/200. This fix allows us to use -Automake's parallel test harness. - ---- source/configure.ac.orig 1969-12-31 18:00:01.000000000 -0600 -+++ source/configure.ac 2015-04-15 10:58:15.974679278 -0500 -@@ -33,7 +33,7 @@ - fi - ]) - --NEED_PROG(perl, perl) -+NEED_PROG([PERL], perl) - - NEED_PROG([NIX_STORE_PROGRAM], [nix-store]) - ---- source/tests/Makefile.am.orig 1969-12-31 18:00:01.000000000 -0600 -+++ source/tests/Makefile.am 2015-04-15 11:00:35.846682904 -0500 -@@ -1,19 +1,20 @@ --TESTS_ENVIRONMENT = \ -- BZR_HOME="$(abs_builddir)/data" \ -- HYDRA_DBI="dbi:SQLite:db.sqlite" \ -- HYDRA_DATA="$(abs_builddir)/data" \ -- HYDRA_HOME="$(top_srcdir)/src" \ -- HYDRA_CONFIG= \ -- NIX_REMOTE= \ -- GUIX_CONFIGURATION_DIRECTORY="$(abs_builddir)/nix/etc/nix" \ -- NIX_STATE_DIR="$(abs_builddir)/nix/var/nix" \ -- NIX_MANIFESTS_DIR="$(abs_builddir)/nix/var/nix/manifests" \ -- NIX_STORE_DIR="$(abs_builddir)/nix/store" \ -- NIX_LOG_DIR="$(abs_builddir)/nix/var/log/nix" \ -- NIX_BUILD_HOOK= \ -- PERL5LIB="$(srcdir):$(top_srcdir)/src/lib:$$PERL5LIB" \ -- PATH=$(abs_top_srcdir)/src/script:$(abs_top_srcdir)/src/c:$$PATH \ -- perl -w -+AM_TESTS_ENVIRONMENT = \ -+ BZR_HOME="$(abs_builddir)/data"; export BZR_HOME; \ -+ HYDRA_DBI="dbi:SQLite:db.sqlite"; export HYDRA_DBI; \ -+ HYDRA_DATA="$(abs_builddir)/data"; export HYDRA_DATA; \ -+ HYDRA_HOME="$(top_srcdir)/src"; export HYDRA_HOME; \ -+ HYDRA_CONFIG=; export HYDRA_CONFIG; \ -+ NIX_REMOTE=; export NIX_REMOTE; \ -+ GUIX_CONFIGURATION_DIRECTORY="$(abs_builddir)/nix/etc/nix"; export GUIX_CONFIGURATION_DIRECTORY; \ -+ NIX_STATE_DIR="$(abs_builddir)/nix/var/nix"; export NIX_STATE_DIR; \ -+ NIX_MANIFESTS_DIR="$(abs_builddir)/nix/var/nix/manifests"; export NIX_MANIFESTS_DIR; \ -+ NIX_STORE_DIR="$(abs_builddir)/nix/store"; export NIX_STORE_DIR; \ -+ NIX_LOG_DIR="$(abs_builddir)/nix/var/log/nix"; export NIX_LOG_DIR; \ -+ NIX_BUILD_HOOK=; export NIX_BUILD_HOOK; \ -+ PERL5LIB="$(srcdir):$(top_srcdir)/src/lib:$$PERL5LIB"; export PERL5LIB; \ -+ PATH=$(abs_top_srcdir)/src/script:$(abs_top_srcdir)/src/c:$$PATH; export PATH; -+LOG_COMPILER = $(PERL) -+AM_LOG_FLAGS = -w - - EXTRA_DIST = \ - $(wildcard *.pm) \ -@@ -33,7 +34,7 @@ - check_SCRIPTS = db.sqlite repos - - db.sqlite: $(top_srcdir)/src/sql/hydra-sqlite.sql -- $(TESTS_ENVIRONMENT) $(top_srcdir)/src/script/hydra-init -+ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) $(top_srcdir)/src/script/hydra-init - - repos: dirs - diff --git a/gnu/packages/patches/jbig2dec-ignore-testtest.patch b/gnu/packages/patches/jbig2dec-ignore-testtest.patch index 1bf8f7ad76..1efde8628c 100644 --- a/gnu/packages/patches/jbig2dec-ignore-testtest.patch +++ b/gnu/packages/patches/jbig2dec-ignore-testtest.patch @@ -1,14 +1,16 @@ Do not run the "testtest script", it doesn't seem to do anything and reports failiute. TODO: Actually fix the test instead of ignoring it. ---- a/Makefile.in 2010-02-02 20:13:56.000000000 +0100 -+++ b/Makefile.in 2014-09-13 17:50:10.957816767 +0200 -@@ -181,7 +181,7 @@ - - MAINTAINERCLEANFILES = config_types.h.in - --TESTS = test_sha1 test_jbig2dec.py test_huffman test_arith -+TESTS = test_sha1 test_huffman test_arith - - test_sha1_SOURCES = sha1.c sha1.h - test_sha1_CFLAGS = -DTEST +diff --git a/Makefile.in b/Makefile.in +index 0573592..1a5de77 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -93,7 +93,7 @@ host_triplet = @host@ + bin_PROGRAMS = jbig2dec$(EXEEXT) + noinst_PROGRAMS = test_sha1$(EXEEXT) test_huffman$(EXEEXT) \ + test_arith$(EXEEXT) +-TESTS = test_sha1$(EXEEXT) test_jbig2dec.py test_huffman$(EXEEXT) \ ++TESTS = test_sha1$(EXEEXT) test_huffman$(EXEEXT) \ + test_arith$(EXEEXT) + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 diff --git a/gnu/packages/patches/llvm-for-extempore.patch b/gnu/packages/patches/llvm-for-extempore.patch new file mode 100644 index 0000000000..614682c6cb --- /dev/null +++ b/gnu/packages/patches/llvm-for-extempore.patch @@ -0,0 +1,118 @@ +This patch to LLVM is required by the developers of the Extempore language. +The following explanation was posted to the extemporelang@googlegroups.com +mailing list: + +"There is an assumption in the parser that all definitions occur within the +same compilation unit - i.e. the parser has local state about what has been +parsed in this unit of work. Extempore obviously does lots of little units +rather than one big unit and this causes problems for named types that were +defined in another unit - which they always are. The patch simply checks the +current module to see if the type has been previously defined, and intervenes +appropriately if it has." + +Message-ID: <CAOjrPOqoreXuZo4ZpDBvHE7M_tgAR_V8Txq5JFjh1HnGRn2EsA@mail.gmail.com> + +--- llvm-3.7.1.src/include/llvm/MC/MCSectionCOFF.h 2015-04-11 12:11:45.000000000 +1000 ++++ llvm-3.7.1.src/include/llvm/MC/MCSectionCOFF.h 2015-09-14 09:22:56.000000000 +1000 +@@ -16,7 +16,6 @@ + + #include "llvm/ADT/StringRef.h" + #include "llvm/MC/MCSection.h" +-#include "llvm/Support/COFF.h" + + namespace llvm { + class MCSymbol; + +--- llvm-3.7.1.src/lib/AsmParser/LLParser.cpp 2015-07-11 20:30:36.000000000 +1000 ++++ llvm-3.7.1.src/lib/AsmParser/LLParser.cpp 2015-09-14 09:20:57.000000000 +1000 +@@ -1754,8 +1754,14 @@ + // If the type hasn't been defined yet, create a forward definition and + // remember where that forward def'n was seen (in case it never is defined). + if (!Entry.first) { +- Entry.first = StructType::create(Context, Lex.getStrVal()); +- Entry.second = Lex.getLoc(); ++ // this here for extempore ++ if (M->getTypeByName(Lex.getStrVal())) { ++ Entry.first = M->getTypeByName(Lex.getStrVal()); ++ Entry.second = SMLoc(); ++ } else { ++ Entry.first = StructType::create(Context, Lex.getStrVal()); ++ Entry.second = Lex.getLoc(); ++ } + } + Result = Entry.first; + Lex.Lex(); + +--- llvm-3.7.1.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp 2015-07-01 05:10:31.000000000 +1000 ++++ llvm-3.7.1.src/lib/CodeGen/TargetLoweringObjectFileImpl.cpp 2015-09-14 09:23:40.000000000 +1000 +@@ -32,6 +32,7 @@ + #include "llvm/MC/MCStreamer.h" + #include "llvm/MC/MCSymbolELF.h" + #include "llvm/MC/MCValue.h" ++#include "llvm/Support/COFF.h" + #include "llvm/Support/Dwarf.h" + #include "llvm/Support/ELF.h" + #include "llvm/Support/ErrorHandling.h" + +--- llvm-3.7.1.src/lib/ExecutionEngine/MCJIT/MCJIT.cpp 2015-07-31 02:31:16.000000000 +1000 ++++ llvm-3.7.1.src/lib/ExecutionEngine/MCJIT/MCJIT.cpp 2015-09-14 09:21:28.000000000 +1000 +@@ -524,6 +524,17 @@ + rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue())); + return rv; + } ++ if (FTy->getNumParams() == 1 && ++ RetTy->isVoidTy() && ++ FTy->getParamType(0)->isPointerTy()) { ++ GenericValue rv; ++ //void (*PF)(char *) = (void(*)(char *))(intptr_t)FPtr; ++ //printf("are symbols available: %d\n",isSymbolSearchingDisabled()); ++ void (*PF)(char *) = (void(*)(char *))FPtr; ++ char* mzone = (char*) GVTOP(ArgValues[0]); ++ PF(mzone); ++ return rv; ++ } + break; + } + } + +--- llvm-3.7.1.src/lib/MC/MCContext.cpp 2015-06-23 21:31:32.000000000 +1000 ++++ llvm-3.7.1.src/lib/MC/MCContext.cpp 2015-09-14 09:24:01.000000000 +1000 +@@ -23,6 +23,7 @@ + #include "llvm/MC/MCSymbolCOFF.h" + #include "llvm/MC/MCSymbolELF.h" + #include "llvm/MC/MCSymbolMachO.h" ++#include "llvm/Support/COFF.h" + #include "llvm/Support/ELF.h" + #include "llvm/Support/ErrorHandling.h" + #include "llvm/Support/FileSystem.h" + +--- llvm-3.7.1.src/lib/MC/MCObjectFileInfo.cpp 2015-06-25 10:28:42.000000000 +1000 ++++ llvm-3.7.1.src/lib/MC/MCObjectFileInfo.cpp 2015-09-14 09:24:17.000000000 +1000 +@@ -16,6 +16,7 @@ + #include "llvm/MC/MCSectionCOFF.h" + #include "llvm/MC/MCSectionELF.h" + #include "llvm/MC/MCSectionMachO.h" ++#include "llvm/Support/COFF.h" + using namespace llvm; + + static bool useCompactUnwind(const Triple &T) { + +--- llvm-3.7.1.src/lib/MC/MCSectionCOFF.cpp 2015-06-09 10:31:39.000000000 +1000 ++++ llvm-3.7.1.src/lib/MC/MCSectionCOFF.cpp 2015-09-14 09:24:25.000000000 +1000 +@@ -11,6 +11,7 @@ + #include "llvm/MC/MCAsmInfo.h" + #include "llvm/MC/MCContext.h" + #include "llvm/MC/MCSymbol.h" ++#include "llvm/Support/COFF.h" + #include "llvm/Support/raw_ostream.h" + using namespace llvm; + +--- llvm-3.7.1.src/lib/Target/X86/X86TargetObjectFile.cpp 2015-06-27 04:55:48.000000000 +1000 ++++ llvm-3.7.1.src/lib/Target/X86/X86TargetObjectFile.cpp 2015-09-14 09:25:03.000000000 +1000 +@@ -16,6 +16,7 @@ + #include "llvm/MC/MCSectionCOFF.h" + #include "llvm/MC/MCSectionELF.h" + #include "llvm/MC/MCValue.h" ++#include "llvm/Support/COFF.h" + #include "llvm/Support/Dwarf.h" + #include "llvm/Target/TargetLowering.h" diff --git a/gnu/packages/patches/lua51-pkgconfig.patch b/gnu/packages/patches/lua51-pkgconfig.patch new file mode 100644 index 0000000000..5b03adaaaa --- /dev/null +++ b/gnu/packages/patches/lua51-pkgconfig.patch @@ -0,0 +1,101 @@ +Enables generating Lua's pkg-config file. + +http://lua-users.org/lists/lua-l/2015-03/msg00338.html + +--- a/Makefile 2016-08-16 19:44:27.363614964 +0200 ++++ b/Makefile 2016-08-16 19:49:22.623070005 +0200 +@@ -13,6 +13,7 @@ + INSTALL_BIN= $(INSTALL_TOP)/bin + INSTALL_INC= $(INSTALL_TOP)/include + INSTALL_LIB= $(INSTALL_TOP)/lib ++INSTALL_PC= $(INSTALL_LIB)/pkgconfig + INSTALL_MAN= $(INSTALL_TOP)/man/man1 + # + # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with +@@ -41,9 +42,12 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + # What to install. +-TO_BIN= lua luac ++INTERPRETER= lua ++COMPILER= luac ++TO_BIN= $(INTERPRETER) $(COMPILER) + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp + TO_LIB= liblua.a liblua.so liblua.so.${V} ++TO_PC= lua-$(V).pc + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -52,17 +56,22 @@ + + all: $(PLAT) + +-$(PLATS) clean: ++$(PLATS): + cd src && $(MAKE) $@ V=$(V) R=$(R) + ++clean: ++ cd src && $(MAKE) $@ ++ $(RM) $(TO_PC) ++ + test: dummy + src/lua test/hello.lua + +-install: dummy +- cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) ++install: dummy $(TO_PC) ++ cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_PC) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) ++ cd src && $(INSTALL_DATA) ../$(TO_PC) $(INSTALL_PC) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + + ranlib: +@@ -95,6 +104,7 @@ + @echo "INSTALL_BIN = $(INSTALL_BIN)" + @echo "INSTALL_INC = $(INSTALL_INC)" + @echo "INSTALL_LIB = $(INSTALL_LIB)" ++ @echo "INSTALL_PC = $(INSTALL_PC)" + @echo "INSTALL_MAN = $(INSTALL_MAN)" + @echo "INSTALL_LMOD = $(INSTALL_LMOD)" + @echo "INSTALL_CMOD = $(INSTALL_CMOD)" +@@ -111,6 +121,7 @@ + @echo "TO_BIN = $(TO_BIN)" + @echo "TO_INC = $(TO_INC)" + @echo "TO_LIB = $(TO_LIB)" ++ @echo "TO_PC = $(TO_PC)" + @echo "TO_MAN = $(TO_MAN)" + + # echo config parameters as Lua code +@@ -122,7 +133,29 @@ + @$(MAKE) echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/' + @echo "-- EOF" + ++pc: ++ @echo 'prefix=$(INSTALL_TOP)' ++ @echo 'libdir=$(INSTALL_LIB)' ++ @echo 'includedir=$(INSTALL_INC)' ++ @echo 'bindir=$(INSTALL_BIN)' ++ @echo ++ @echo 'INSTALL_LMOD=$(INSTALL_LMOD)' ++ @echo 'INSTALL_CMOD=$(INSTALL_CMOD)' ++ @echo 'INTERPRETER=$${bindir}/$(INTERPRETER)' ++ @echo 'COMPILER=$${bindir}/$(COMPILER)' ++ @echo ++ @echo 'Name: Lua' ++ @echo 'Description: A powerful, fast, lightweight, embeddable scripting language' ++ @echo 'Version: $(R)' ++ @echo ++ @echo 'Libs: -L$${libdir} -llua -lm' ++ @echo 'Cflags: -I$${includedir}' ++ ++pkg-config: $(TO_PC) ++$(TO_PC): ++ @$(MAKE) -s pc > $@ ++ + # list targets that do not create files (but not all makes understand .PHONY) +-.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho ++.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho pkg-config + + # (end of Makefile) diff --git a/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch b/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch new file mode 100644 index 0000000000..cd8136b701 --- /dev/null +++ b/gnu/packages/patches/mupdf-build-with-openjpeg-2.1.patch @@ -0,0 +1,38 @@ +Make it possible to build MuPDF with OpenJPEG 2.1, which is the latest +release series and contains many important bug fixes. + +Patch adapted from Debian: + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=745246 + +And related to this upstream commit: + +http://git.ghostscript.com/?p=mupdf.git;a=commit;h=f88bfe2e62dbadb96d4f52d7aa025f0a516078da + +diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c +index 6b92e5c..72dea50 100644 +--- a/source/fitz/load-jpx.c ++++ b/source/fitz/load-jpx.c +@@ -1,13 +1,5 @@ + #include "mupdf/fitz.h" + +-/* Without the definition of OPJ_STATIC, compilation fails on windows +- * due to the use of __stdcall. We believe it is required on some +- * linux toolchains too. */ +-#define OPJ_STATIC +-#ifndef _MSC_VER +-#define OPJ_HAVE_STDINT_H +-#endif +- + #include <openjpeg.h> + + static void fz_opj_error_callback(const char *msg, void *client_data) +@@ -117,7 +109,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs + opj_stream_set_read_function(stream, fz_opj_stream_read); + opj_stream_set_skip_function(stream, fz_opj_stream_skip); + opj_stream_set_seek_function(stream, fz_opj_stream_seek); +- opj_stream_set_user_data(stream, &sb); ++ opj_stream_set_user_data(stream, &sb, NULL); + /* Set the length to avoid an assert */ + opj_stream_set_user_data_length(stream, size); + diff --git a/gnu/packages/patches/mysql-fix-failing-test.patch b/gnu/packages/patches/mysql-fix-failing-test.patch deleted file mode 100644 index 730d138c18..0000000000 --- a/gnu/packages/patches/mysql-fix-failing-test.patch +++ /dev/null @@ -1,57 +0,0 @@ -Fix spurious test failure: -https://bugs.mysql.com/bug.php?id=81868 - -Copied from Fedora: -https://pkgs.fedoraproject.org/cgit/rpms/community-mysql.git/diff/community-mysql-5.7.13-pfs-oom-unittest.patch?id=a51381c6f98b9cd6855bc89ba93398a949ef7098 - -commit 6c23035b52284c2575f297311dfd0278bcbb0dd1 -Author: Christopher Powers <chris.powers@oracle.com> -Date: Mon May 2 19:43:31 2016 +0100 - - Bug#23186653 PERFORMANCE SCHEMA UNIT TESTS PFS_INSTR-OOM & PFS_INSTR_CLASS FAIL REGULARLY - - Two test cases pass on Windows but crash on Linux due to different init paths. - Now pass on both. - -diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc -index db74c9c..b6bc818 100644 ---- a/storage/perfschema/unittest/pfs_instr-oom-t.cc -+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc -@@ -232,12 +232,14 @@ void test_oom() - ok(cond_2 == NULL, "oom (create cond)"); - - /* Create file. */ -- stub_alloc_always_fails = false; - PFS_thread fake_thread; -+ rc = init_instruments(¶m); - fake_thread.m_filename_hash_pins= NULL; - init_file_hash(¶m); -- rc = init_instruments(¶m); -- ok(rc == 0, "instances init"); -+ -+ stub_alloc_always_fails = true; -+ file_2 = find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); -+ ok(file_2 == NULL, "oom (create file)"); - - stub_alloc_always_fails= false; - file_1= find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); -@@ -245,10 +247,6 @@ void test_oom() - release_file(file_1); - cleanup_instruments(); - -- stub_alloc_always_fails= true; -- file_2= find_or_create_file(&fake_thread, &dummy_file_class, "dummy", 5, true); -- ok(file_2 == NULL, "oom (create file)"); -- - /* Create socket. */ - stub_alloc_always_fails = false; - rc = init_instruments(¶m); -@@ -422,7 +420,7 @@ void do_all_tests() - - int main(int, char **) - { -- plan(28); -+ plan(32); - MY_INIT("pfs_instr-oom-t"); - do_all_tests(); - return 0; diff --git a/gnu/packages/patches/onionshare-fix-install-paths.patch b/gnu/packages/patches/onionshare-fix-install-paths.patch new file mode 100644 index 0000000000..721b89f04b --- /dev/null +++ b/gnu/packages/patches/onionshare-fix-install-paths.patch @@ -0,0 +1,39 @@ +From 7afdd3366711a0c508bfb9323af8f4268ab77c9b Mon Sep 17 00:00:00 2001 +From: Efraim Flashner <efraim@flashner.co.il> +Date: Thu, 21 Jul 2016 13:22:45 +0300 +Subject: [PATCH] patch + +--- + setup.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/setup.py b/setup.py +index 8ae56fe..8b245c9 100644 +--- a/setup.py ++++ b/setup.py +@@ -91,15 +91,15 @@ setup( + include_package_data=True, + scripts=['install/scripts/onionshare', 'install/scripts/onionshare-gui'], + data_files=[ +- (os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']), +- (os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']), +- (os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']), +- (os.path.join(sys.prefix, 'share/onionshare'), [ ++ ('share/applications', ['install/onionshare.desktop']), ++ ('share/appdata', ['install/onionshare.appdata.xml']), ++ ('share/pixmaps', ['install/onionshare80.xpm']), ++ ('share/onionshare', [ + 'resources/version.txt', + 'resources/wordlist.txt' + ]), +- (os.path.join(sys.prefix, 'share/onionshare/images'), images), +- (os.path.join(sys.prefix, 'share/onionshare/locale'), locale), +- (os.path.join(sys.prefix, 'share/onionshare/html'), html) ++ ('share/onionshare/images', images), ++ ('share/onionshare/locale', locale), ++ ('share/onionshare/html', html) + ] + ) +-- +2.9.1 + diff --git a/gnu/packages/patches/openjpeg-CVE-2016-5157.patch b/gnu/packages/patches/openjpeg-CVE-2016-5157.patch new file mode 100644 index 0000000000..f83bd9b511 --- /dev/null +++ b/gnu/packages/patches/openjpeg-CVE-2016-5157.patch @@ -0,0 +1,96 @@ +Fix CVE-2016-5157 (heap overflow in opj_dwt_interleave_v() allowing execution of +arbitrary code): + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5157 +https://pdfium.googlesource.com/pdfium/+/b6befb2ed2485a3805cddea86dc7574510178ea9 +http://seclists.org/oss-sec/2016/q3/441 + +Adapted from upstream source repository: + +https://github.com/uclouvain/openjpeg/commit/e078172b1c3f98d2219c37076b238fb759c751ea + +The final hunk of the patch, affecting +'tests/nonregression/test_suite.ctest.in', had to be adjusted, since it referred +to some context that is not yet provided by a tagged release. + +From c80286a4d573ad07ccc3c8b53289c38bb8256b30 Mon Sep 17 00:00:00 2001 +From: Leo Famulari <leo@famulari.name> +Date: Fri, 9 Sep 2016 04:37:40 -0400 +Subject: [PATCH] CVE-2016-5157 adjusted to apply to 2.1.0. + +--- + src/lib/openjp2/tcd.c | 11 +++++++++++ + tests/compare_dump_files.c | 14 +++++++------- + tests/nonregression/test_suite.ctest.in | 2 ++ + 3 files changed, 20 insertions(+), 7 deletions(-) + +diff --git a/src/lib/openjp2/tcd.c b/src/lib/openjp2/tcd.c +index 12da05c..7a29c49 100644 +--- a/src/lib/openjp2/tcd.c ++++ b/src/lib/openjp2/tcd.c +@@ -696,9 +696,20 @@ static INLINE OPJ_BOOL opj_tcd_init_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no, + l_tx0 = l_cp->tx0 + p * l_cp->tdx; /* can't be greater than l_image->x1 so won't overflow */ + l_tile->x0 = (OPJ_INT32)opj_uint_max(l_tx0, l_image->x0); + l_tile->x1 = (OPJ_INT32)opj_uint_min(opj_uint_adds(l_tx0, l_cp->tdx), l_image->x1); ++ /* all those OPJ_UINT32 are casted to OPJ_INT32, let's do some sanity check */ ++ if ((l_tile->x0 < 0) || (l_tile->x1 <= l_tile->x0)) { ++ opj_event_msg(manager, EVT_ERROR, "Tile X coordinates are not supported\n"); ++ return OPJ_FALSE; ++ } + l_ty0 = l_cp->ty0 + q * l_cp->tdy; /* can't be greater than l_image->y1 so won't overflow */ + l_tile->y0 = (OPJ_INT32)opj_uint_max(l_ty0, l_image->y0); + l_tile->y1 = (OPJ_INT32)opj_uint_min(opj_uint_adds(l_ty0, l_cp->tdy), l_image->y1); ++ /* all those OPJ_UINT32 are casted to OPJ_INT32, let's do some sanity check */ ++ if ((l_tile->y0 < 0) || (l_tile->y1 <= l_tile->y0)) { ++ opj_event_msg(manager, EVT_ERROR, "Tile Y coordinates are not supported\n"); ++ return OPJ_FALSE; ++ } ++ + + /* testcase 1888.pdf.asan.35.988 */ + if (l_tccp->numresolutions == 0) { +diff --git a/tests/compare_dump_files.c b/tests/compare_dump_files.c +index 946c92a..7d22270 100644 +--- a/tests/compare_dump_files.c ++++ b/tests/compare_dump_files.c +@@ -118,10 +118,10 @@ int main(int argc, char **argv) + test_cmp_parameters inParam; + FILE *fbase=NULL, *ftest=NULL; + int same = 0; +- char lbase[256]; +- char strbase[256]; +- char ltest[256]; +- char strtest[256]; ++ char lbase[512]; ++ char strbase[512]; ++ char ltest[512]; ++ char strtest[512]; + + if( parse_cmdline_cmp(argc, argv, &inParam) == 1 ) + { +@@ -154,9 +154,9 @@ int main(int argc, char **argv) + + while (fgets(lbase, sizeof(lbase), fbase) && fgets(ltest,sizeof(ltest),ftest)) + { +- int nbase = sscanf(lbase, "%255[^\r\n]", strbase); +- int ntest = sscanf(ltest, "%255[^\r\n]", strtest); +- assert( nbase != 255 && ntest != 255 ); ++ int nbase = sscanf(lbase, "%511[^\r\n]", strbase); ++ int ntest = sscanf(ltest, "%511[^\r\n]", strtest); ++ assert( nbase != 511 && ntest != 511 ); + if( nbase != 1 || ntest != 1 ) + { + fprintf(stderr, "could not parse line from files\n" ); +diff --git a/tests/nonregression/test_suite.ctest.in b/tests/nonregression/test_suite.ctest.in +index d393e6c..90cfa43 100644 +--- a/tests/nonregression/test_suite.ctest.in ++++ b/tests/nonregression/test_suite.ctest.in +@@ -564,3 +564,5 @@ opj_decompress -i @INPUT_NR_PATH@/issue726.j2k -o @TEMP_PATH@/issue726.png + # issue 775 + !opj_decompress -i @INPUT_NR_PATH@/issue775.j2k -o @TEMP_PATH@/issue775.png + !opj_decompress -i @INPUT_NR_PATH@/issue775-2.j2k -o @TEMP_PATH@/issue775-2.png ++# issue 823 (yes, not a typo, test image is issue822) ++!opj_decompress -i @INPUT_NR_PATH@/issue822.jp2 -o @TEMP_PATH@/issue822.png +-- +2.10.0 + diff --git a/gnu/packages/patches/openjpeg-CVE-2016-7163.patch b/gnu/packages/patches/openjpeg-CVE-2016-7163.patch new file mode 100644 index 0000000000..a4a24e4ff5 --- /dev/null +++ b/gnu/packages/patches/openjpeg-CVE-2016-7163.patch @@ -0,0 +1,71 @@ +Fix CVE-2016-7613 (Integer overflow in opj_pi_create_decode allowing execution +of arbitrary code): + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7163 +https://github.com/uclouvain/openjpeg/issues/826 +http://seclists.org/oss-sec/2016/q3/442 + +Copied from upstream repository: + +https://github.com/uclouvain/openjpeg/commit/c16bc057ba3f125051c9966cf1f5b68a05681de4 +https://github.com/uclouvain/openjpeg/commit/ef01f18dfc6780b776d0674ed3e7415c6ef54d24 + +From c16bc057ba3f125051c9966cf1f5b68a05681de4 Mon Sep 17 00:00:00 2001 +From: trylab <trylab@users.noreply.github.com> +Date: Tue, 6 Sep 2016 13:55:49 +0800 +Subject: [PATCH] Fix an integer overflow issue (#809) + +Prevent an integer overflow issue in function opj_pi_create_decode of +pi.c. +--- + src/lib/openjp2/pi.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/lib/openjp2/pi.c b/src/lib/openjp2/pi.c +index cffad66..36e2ff0 100644 +--- a/src/lib/openjp2/pi.c ++++ b/src/lib/openjp2/pi.c +@@ -1237,7 +1237,13 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image, + l_current_pi = l_pi; + + /* memory allocation for include */ +- l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); ++ /* prevent an integer overflow issue */ ++ l_current_pi->include = 00; ++ if (l_step_l <= (SIZE_MAX / (l_tcp->numlayers + 1U))) ++ { ++ l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); ++ } ++ + if + (!l_current_pi->include) + { +-- +2.10.0 + +From ef01f18dfc6780b776d0674ed3e7415c6ef54d24 Mon Sep 17 00:00:00 2001 +From: Matthieu Darbois <mayeut@users.noreply.github.com> +Date: Thu, 8 Sep 2016 07:34:46 +0200 +Subject: [PATCH] Cast to size_t before multiplication + +Need to cast to size_t before multiplication otherwise overflow check is useless. +--- + src/lib/openjp2/pi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/openjp2/pi.c b/src/lib/openjp2/pi.c +index 36e2ff0..809b33d 100644 +--- a/src/lib/openjp2/pi.c ++++ b/src/lib/openjp2/pi.c +@@ -1241,7 +1241,7 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image, + l_current_pi->include = 00; + if (l_step_l <= (SIZE_MAX / (l_tcp->numlayers + 1U))) + { +- l_current_pi->include = (OPJ_INT16*) opj_calloc((l_tcp->numlayers +1) * l_step_l, sizeof(OPJ_INT16)); ++ l_current_pi->include = (OPJ_INT16*) opj_calloc((size_t)(l_tcp->numlayers + 1U) * l_step_l, sizeof(OPJ_INT16)); + } + + if +-- +2.10.0 + diff --git a/gnu/packages/patches/openssl-1.1.0-c-rehash-in.patch b/gnu/packages/patches/openssl-1.1.0-c-rehash-in.patch new file mode 100644 index 0000000000..e3a982b7a8 --- /dev/null +++ b/gnu/packages/patches/openssl-1.1.0-c-rehash-in.patch @@ -0,0 +1,19 @@ +This patch removes the explicit reference to the 'perl' binary, +such that OpenSSL does not retain a reference to Perl. + +The 'c_rehash' program is seldom used, but it is used nonetheless +to create symbolic links to certificates, for instance in the 'nss-certs' +package. + +diff --git a/tools/c_rehash.in b/tools/c_rehash.in +index 2fef627..9d40eae 100644 +--- a/tools/c_rehash.in ++++ b/tools/c_rehash.in +@@ -1,4 +1,6 @@ +-#!{- $config{hashbangperl} -} ++eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' ++ & eval 'exec perl -wS "$0" $argv:q' ++ if 0; + + # {- join("\n# ", @autowarntext) -} + # Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. diff --git a/gnu/packages/patches/p7zip-remove-unused-code.patch b/gnu/packages/patches/p7zip-remove-unused-code.patch new file mode 100644 index 0000000000..f9c782b93e --- /dev/null +++ b/gnu/packages/patches/p7zip-remove-unused-code.patch @@ -0,0 +1,959 @@ +diff --git a/C/Sha1.c b/C/Sha1.c +index 55c1c63..48b4c5d 100644 +--- a/C/Sha1.c ++++ b/C/Sha1.c +@@ -104,39 +104,6 @@ void Sha1_GetBlockDigest(CSha1 *p, const UInt32 *data, UInt32 *destDigest) + destDigest[4] = p->state[4] + e; + } + +-void Sha1_UpdateBlock_Rar(CSha1 *p, UInt32 *data, int returnRes) +-{ +- UInt32 a, b, c, d, e; +- UInt32 W[kNumW]; +- +- a = p->state[0]; +- b = p->state[1]; +- c = p->state[2]; +- d = p->state[3]; +- e = p->state[4]; +- +- RX_15 +- +- RX_1_4(R0, R1, 15); +- +- RX_20(R2, 20); +- RX_20(R3, 40); +- RX_20(R4, 60); +- +- p->state[0] += a; +- p->state[1] += b; +- p->state[2] += c; +- p->state[3] += d; +- p->state[4] += e; +- +- if (returnRes) +- { +- unsigned i; +- for (i = 0 ; i < SHA1_NUM_BLOCK_WORDS; i++) +- data[i] = W[kNumW - SHA1_NUM_BLOCK_WORDS + i]; +- } +-} +- + #define Sha1_UpdateBlock(p) Sha1_GetBlockDigest(p, p->buffer, p->state) + + void Sha1_Update(CSha1 *p, const Byte *data, size_t size) +@@ -212,46 +179,6 @@ void Sha1_Update(CSha1 *p, const Byte *data, size_t size) + } + } + +-void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size /* , int rar350Mode */) +-{ +- int returnRes = False; +- +- unsigned pos = (unsigned)p->count & 0x3F; +- p->count += size; +- +- while (size--) +- { +- unsigned pos2 = (pos & 3); +- UInt32 v = ((UInt32)*data++) << (8 * (3 - pos2)); +- UInt32 *ref = &(p->buffer[pos >> 2]); +- pos++; +- if (pos2 == 0) +- { +- *ref = v; +- continue; +- } +- *ref |= v; +- +- if (pos == SHA1_BLOCK_SIZE) +- { +- pos = 0; +- Sha1_UpdateBlock_Rar(p, p->buffer, returnRes); +- if (returnRes) +- { +- unsigned i; +- for (i = 0; i < SHA1_NUM_BLOCK_WORDS; i++) +- { +- UInt32 d = p->buffer[i]; +- Byte *prev = data + i * 4 - SHA1_BLOCK_SIZE; +- SetUi32(prev, d); +- } +- } +- // returnRes = rar350Mode; +- returnRes = True; +- } +- } +-} +- + void Sha1_Final(CSha1 *p, Byte *digest) + { + unsigned pos = (unsigned)p->count & 0x3F; +diff --git a/C/Sha1.h b/C/Sha1.h +index aa22ec3..9c45653 100644 +--- a/C/Sha1.h ++++ b/C/Sha1.h +@@ -27,8 +27,6 @@ void Sha1_GetBlockDigest(CSha1 *p, const UInt32 *data, UInt32 *destDigest); + void Sha1_Update(CSha1 *p, const Byte *data, size_t size); + void Sha1_Final(CSha1 *p, Byte *digest); + +-void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size /* , int rar350Mode */); +- + void Sha1_32_PrepareBlock(const CSha1 *p, UInt32 *block, unsigned size); + void Sha1_32_Update(CSha1 *p, const UInt32 *data, size_t size); + void Sha1_32_Final(CSha1 *p, UInt32 *digest); +diff --git a/CPP/7zip/Archive/7z/7zUpdate.cpp b/CPP/7zip/Archive/7z/7zUpdate.cpp +index a0571e7..43ad3e9 100644 +--- a/CPP/7zip/Archive/7z/7zUpdate.cpp ++++ b/CPP/7zip/Archive/7z/7zUpdate.cpp +@@ -562,7 +562,7 @@ static int CompareEmptyItems(const unsigned *p1, const unsigned *p2, void *param + } + + static const char *g_Exts = +- " 7z xz lzma ace arc arj bz tbz bz2 tbz2 cab deb gz tgz ha lha lzh lzo lzx pak rar rpm sit zoo" ++ " 7z xz lzma ace arc arj bz tbz bz2 tbz2 cab deb gz tgz ha lha lzh lzo lzx pak rpm sit zoo" + " zip jar ear war msi" + " 3gp avi mov mpeg mpg mpe wmv" + " aac ape fla flac la mp3 m4a mp4 ofr ogg pac ra rm rka shn swa tta wv wma wav" +diff --git a/CPP/7zip/Bundles/Format7zFree/makefile.list b/CPP/7zip/Bundles/Format7zFree/makefile.list +index da2056b..1dcf1a5 100644 +--- a/CPP/7zip/Bundles/Format7zFree/makefile.list ++++ b/CPP/7zip/Bundles/Format7zFree/makefile.list +@@ -87,8 +87,6 @@ SRCS=\ + ../../../../CPP/7zip/Archive/PeHandler.cpp \ + ../../../../CPP/7zip/Archive/PpmdHandler.cpp \ + ../../../../CPP/7zip/Archive/QcowHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp \ + ../../../../CPP/7zip/Archive/RpmHandler.cpp \ + ../../../../CPP/7zip/Archive/SplitHandler.cpp \ + ../../../../CPP/7zip/Archive/SquashfsHandler.cpp \ +@@ -191,9 +189,6 @@ SRCS=\ + ../../../../CPP/7zip/Crypto/MyAesReg.cpp \ + ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp \ + ../../../../CPP/7zip/Crypto/RandGen.cpp \ +- ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp \ +- ../../../../CPP/7zip/Crypto/Rar5Aes.cpp \ +- ../../../../CPP/7zip/Crypto/RarAes.cpp \ + ../../../../CPP/7zip/Crypto/WzAes.cpp \ + ../../../../CPP/7zip/Crypto/ZipCrypto.cpp \ + ../../../../CPP/7zip/Crypto/ZipStrong.cpp \ +@@ -485,10 +480,6 @@ PpmdHandler.o : ../../../../CPP/7zip/Archive/PpmdHandler.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/PpmdHandler.cpp + QcowHandler.o : ../../../../CPP/7zip/Archive/QcowHandler.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/QcowHandler.cpp +-RarHandler.o : ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp +-Rar5Handler.o : ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp + RpmHandler.o : ../../../../CPP/7zip/Archive/RpmHandler.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Archive/RpmHandler.cpp + SplitHandler.o : ../../../../CPP/7zip/Archive/SplitHandler.cpp +@@ -693,12 +684,6 @@ Pbkdf2HmacSha1.o : ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp + RandGen.o : ../../../../CPP/7zip/Crypto/RandGen.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/RandGen.cpp +-Rar20Crypto.o : ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp +-Rar5Aes.o : ../../../../CPP/7zip/Crypto/Rar5Aes.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/Rar5Aes.cpp +-RarAes.o : ../../../../CPP/7zip/Crypto/RarAes.cpp +- $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/RarAes.cpp + WzAes.o : ../../../../CPP/7zip/Crypto/WzAes.cpp + $(CXX) $(CXXFLAGS) ../../../../CPP/7zip/Crypto/WzAes.cpp + ZipCrypto.o : ../../../../CPP/7zip/Crypto/ZipCrypto.cpp +@@ -869,8 +854,6 @@ OBJS=\ + PeHandler.o \ + PpmdHandler.o \ + QcowHandler.o \ +- RarHandler.o \ +- Rar5Handler.o \ + RpmHandler.o \ + SplitHandler.o \ + SquashfsHandler.o \ +@@ -973,9 +956,6 @@ OBJS=\ + MyAesReg.o \ + Pbkdf2HmacSha1.o \ + RandGen.o \ +- Rar20Crypto.o \ +- Rar5Aes.o \ +- RarAes.o \ + WzAes.o \ + ZipCrypto.o \ + ZipStrong.o \ +diff --git a/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt b/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt +index 61f41f9..adc7117 100644 +--- a/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt ++++ b/CPP/7zip/CMAKE/Format7zFree/CMakeLists.txt +@@ -126,8 +126,6 @@ add_library(7z MODULE + "../../../../CPP/7zip/Archive/PeHandler.cpp" + "../../../../CPP/7zip/Archive/PpmdHandler.cpp" + "../../../../CPP/7zip/Archive/QcowHandler.cpp" +- "../../../../CPP/7zip/Archive/Rar/RarHandler.cpp" +- "../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp" + "../../../../CPP/7zip/Archive/RpmHandler.cpp" + "../../../../CPP/7zip/Archive/SplitHandler.cpp" + "../../../../CPP/7zip/Archive/SquashfsHandler.cpp" +@@ -230,9 +228,6 @@ add_library(7z MODULE + "../../../../CPP/7zip/Crypto/MyAesReg.cpp" + "../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp" + "../../../../CPP/7zip/Crypto/RandGen.cpp" +- "../../../../CPP/7zip/Crypto/Rar20Crypto.cpp" +- "../../../../CPP/7zip/Crypto/Rar5Aes.cpp" +- "../../../../CPP/7zip/Crypto/RarAes.cpp" + "../../../../CPP/7zip/Crypto/WzAes.cpp" + "../../../../CPP/7zip/Crypto/ZipCrypto.cpp" + "../../../../CPP/7zip/Crypto/ZipStrong.cpp" +diff --git a/CPP/7zip/Crypto/Sha1Cls.h b/CPP/7zip/Crypto/Sha1Cls.h +index 71acbde..cde4a57 100644 +--- a/CPP/7zip/Crypto/Sha1Cls.h ++++ b/CPP/7zip/Crypto/Sha1Cls.h +@@ -28,7 +28,6 @@ class CContext: public CContextBase + { + public: + void Update(const Byte *data, size_t size) throw() { Sha1_Update(&_s, data, size); } +- void UpdateRar(Byte *data, size_t size /* , bool rar350Mode */) throw() { Sha1_Update_Rar(&_s, data, size /* , rar350Mode ? 1 : 0 */); } + void Final(Byte *digest) throw() { Sha1_Final(&_s, digest); } + }; + +diff --git a/CPP/7zip/Guid.txt b/CPP/7zip/Guid.txt +index 7edab6e..cc22992 100644 +--- a/CPP/7zip/Guid.txt ++++ b/CPP/7zip/Guid.txt +@@ -151,7 +151,6 @@ Handler GUIDs: + + 01 Zip + 02 BZip2 +- 03 Rar + 04 Arj + 05 Z + 06 Lzh +@@ -168,7 +167,6 @@ Handler GUIDs: + C9 VDI + CA Qcow + CB GPT +- CC Rar5 + CD IHex + CE Hxs + CF TE +diff --git a/CPP/7zip/QMAKE/Format7zFree/Format7zFree.pro b/CPP/7zip/QMAKE/Format7zFree/Format7zFree.pro +index afa36d4..93c45c7 100644 +--- a/CPP/7zip/QMAKE/Format7zFree/Format7zFree.pro ++++ b/CPP/7zip/QMAKE/Format7zFree/Format7zFree.pro +@@ -137,8 +137,6 @@ SOURCES += \ + ../../../../CPP/7zip/Archive/PeHandler.cpp \ + ../../../../CPP/7zip/Archive/PpmdHandler.cpp \ + ../../../../CPP/7zip/Archive/QcowHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp \ + ../../../../CPP/7zip/Archive/RpmHandler.cpp \ + ../../../../CPP/7zip/Archive/SplitHandler.cpp \ + ../../../../CPP/7zip/Archive/SquashfsHandler.cpp \ +@@ -241,9 +239,6 @@ SOURCES += \ + ../../../../CPP/7zip/Crypto/MyAesReg.cpp \ + ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp \ + ../../../../CPP/7zip/Crypto/RandGen.cpp \ +- ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp \ +- ../../../../CPP/7zip/Crypto/Rar5Aes.cpp \ +- ../../../../CPP/7zip/Crypto/RarAes.cpp \ + ../../../../CPP/7zip/Crypto/WzAes.cpp \ + ../../../../CPP/7zip/Crypto/ZipCrypto.cpp \ + ../../../../CPP/7zip/Crypto/ZipStrong.cpp \ +diff --git a/CPP/7zip/QMAKE/all.pro b/CPP/7zip/QMAKE/all.pro +index a565ba8..6668619 100644 +--- a/CPP/7zip/QMAKE/all.pro ++++ b/CPP/7zip/QMAKE/all.pro +@@ -4,7 +4,6 @@ SUBDIRS = 7za \ + 7zr \ + 7z_ \ + Format7zFree \ +- Rar \ + Lzham \ + test_lib + +diff --git a/CPP/7zip/UI/Client7z/Client7z.cpp b/CPP/7zip/UI/Client7z/Client7z.cpp +index d0eca6d..7f4e6e2 100644 +--- a/CPP/7zip/UI/Client7z/Client7z.cpp ++++ b/CPP/7zip/UI/Client7z/Client7z.cpp +@@ -32,7 +32,7 @@ HINSTANCE g_hInstance = 0; + #endif + + // Tou can find the list of all GUIDs in Guid.txt file. +-// use another CLSIDs, if you want to support other formats (zip, rar, ...). ++// use another CLSIDs, if you want to support other formats (zip, ...). + // {23170F69-40C1-278A-1000-000110070000} + + DEFINE_GUID(CLSID_CFormat7z, +diff --git a/CPP/7zip/UI/Common/LoadCodecs.h b/CPP/7zip/UI/Common/LoadCodecs.h +index ac9eeac..076bd1c 100644 +--- a/CPP/7zip/UI/Common/LoadCodecs.h ++++ b/CPP/7zip/UI/Common/LoadCodecs.h +@@ -158,7 +158,6 @@ struct CArcInfoEx + void AddExts(const UString &ext, const UString &addExt); + + bool IsSplit() const { return StringsAreEqualNoCase_Ascii(Name, "Split"); } +- // bool IsRar() const { return StringsAreEqualNoCase_Ascii(Name, "Rar"); } + + CArcInfoEx(): + Flags(0), +diff --git a/CPP/7zip/UI/Common/OpenArchive.cpp b/CPP/7zip/UI/Common/OpenArchive.cpp +index 7d5b0c4..88ea5ab 100644 +--- a/CPP/7zip/UI/Common/OpenArchive.cpp ++++ b/CPP/7zip/UI/Common/OpenArchive.cpp +@@ -1063,7 +1063,6 @@ static const char * const k_Formats_with_simple_signuature[] = + { + "7z" + , "xz" +- , "rar" + , "bzip2" + , "gzip" + , "cab" +@@ -1720,29 +1719,6 @@ HRESULT CArc::OpenStream2(const COpenOptions &op) + { + // signature search was here + } +- else if (extension.IsEqualTo("000") || extension.IsEqualTo("001")) +- { +- int i = FindFormatForArchiveType(op.codecs, orderIndices, "rar"); +- if (i >= 0) +- { +- const size_t kBufSize = (1 << 10); +- byteBuffer.Alloc(kBufSize); +- size_t processedSize = kBufSize; +- RINOK(ReadStream(op.stream, byteBuffer, &processedSize)); +- if (processedSize >= 16) +- { +- const Byte *buf = byteBuffer; +- const Byte kRarHeader[] = { 0x52 , 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00 }; +- if (TestSignature(buf, kRarHeader, 7) && buf[9] == 0x73 && (buf[10] & 1) != 0) +- { +- orderIndices2.Add(orderIndices[i]); +- orderIndices[i] = -1; +- if (i >= (int)numFinded) +- numFinded++; +- } +- } +- } +- } + else + { + const size_t kBufSize = (1 << 10); +diff --git a/CPP/7zip/UI/FileManager/FM_rc.cpp b/CPP/7zip/UI/FileManager/FM_rc.cpp +index 83578ed..034feed 100644 +--- a/CPP/7zip/UI/FileManager/FM_rc.cpp ++++ b/CPP/7zip/UI/FileManager/FM_rc.cpp +@@ -821,8 +821,6 @@ REGISTER_STRINGTABLE(g_stringTable) + + ///////////////////////////////////////////////////// + +-#include "res/ParentFolder.h" +- + SevenZipPanel::SevenZipPanel(MyFrame *frame, wxWindow *parent,int id,int panelIndex) : + wxPanel(parent,id) , m_frame(frame), _wList(0) + { +@@ -840,7 +838,7 @@ REGISTER_STRINGTABLE(g_stringTable) + int sizes[] = {150, 250, 350, -1}; + wxArrayString pathArray; + wxBoxSizer *pPathSizer = new wxBoxSizer(wxHORIZONTAL); +- m_pBmpButtonParentFolder = new wxBitmapButton(this, kParentFolderID, wxGetBitmapFromMemory(PARENT_FOLDER), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW); ++ m_pBmpButtonParentFolder = new wxBitmapButton(this, kParentFolderID, wxArtProvider::GetBitmap(wxART_GO_DIR_UP, wxART_TOOLBAR, wxDefaultSize), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW); + m_pComboBoxPath = new wxComboBox(this, _comboBoxID, wxEmptyString, wxDefaultPosition, wxSize(300,-1), pathArray, wxCB_DROPDOWN | wxCB_SORT ); + pPathSizer->Add(m_pBmpButtonParentFolder, 0, wxALL|wxEXPAND, 0); + pPathSizer->Add(m_pComboBoxPath, 1, wxALL|wxEXPAND, 5); +diff --git a/CPP/ANDROID/Format7zFree/jni/Android.mk b/CPP/ANDROID/Format7zFree/jni/Android.mk +index 7c74e73..48cb4fa 100644 +--- a/CPP/ANDROID/Format7zFree/jni/Android.mk ++++ b/CPP/ANDROID/Format7zFree/jni/Android.mk +@@ -91,8 +91,6 @@ LOCAL_SRC_FILES := \ + ../../../../CPP/7zip/Archive/PeHandler.cpp \ + ../../../../CPP/7zip/Archive/PpmdHandler.cpp \ + ../../../../CPP/7zip/Archive/QcowHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/RarHandler.cpp \ +- ../../../../CPP/7zip/Archive/Rar/Rar5Handler.cpp \ + ../../../../CPP/7zip/Archive/RpmHandler.cpp \ + ../../../../CPP/7zip/Archive/SplitHandler.cpp \ + ../../../../CPP/7zip/Archive/SquashfsHandler.cpp \ +@@ -195,9 +193,6 @@ LOCAL_SRC_FILES := \ + ../../../../CPP/7zip/Crypto/MyAesReg.cpp \ + ../../../../CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp \ + ../../../../CPP/7zip/Crypto/RandGen.cpp \ +- ../../../../CPP/7zip/Crypto/Rar20Crypto.cpp \ +- ../../../../CPP/7zip/Crypto/Rar5Aes.cpp \ +- ../../../../CPP/7zip/Crypto/RarAes.cpp \ + ../../../../CPP/7zip/Crypto/WzAes.cpp \ + ../../../../CPP/7zip/Crypto/ZipCrypto.cpp \ + ../../../../CPP/7zip/Crypto/ZipStrong.cpp \ +diff --git a/ChangeLog b/ChangeLog +index daabd8e..f2a01d6 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -28,7 +28,6 @@ Version 16.00 (never published) + - 7z update bcj bugs were fixed. + - split (aaa.001) fixed + - iso loop fix +- - rar4 multivol -stdin kpidSize + - drag and drop 1<2.txt + - memory access violation fix + +@@ -80,11 +79,6 @@ Version 15.12 (never published) + - "There are no errors" string after "Test" operation inside archive. + - The bugs in LZMA SDK were fixed (but these bugs are not related directly to 7-Zip's code). + +- +- - From Windows version of 7-Zip 15.11 : +- - Some bugs were fixed. +- - 7-Zip 15.10 showed incorrect error message about missing volume for multivolume RAR archives. +- + - ..../LZHAM added + + +@@ -104,9 +98,6 @@ Version 15.10 beta + version (-m switch). + - Some bugs were fixed. + - extracting from solid wim archives worked incorrectly in some cases, +- - Also there are some minor changes. +- - 7-Zip can show the name of missing volume for multivolume RAR and VMDK archives. +- - Some internal changes with 7-Zip Benchmark. + + Version 15.09 beta + ================== +@@ -128,8 +119,6 @@ Version 15.08 beta + Version 15.07 beta + ================== + +- - "bin/Codecs/Rar29.so" renamed to "bin/Codecs/Rar.so" +- + - support for cygwin 64 bits + + - support for cygwin 64 bits with asm +@@ -153,15 +142,12 @@ Version 15.07 beta + + - From Windows version of 7-zip 15.06 beta: + +- - 7-Zip now can extract RAR5 archives. + - 7-Zip now doesn't sort files by type while adding to solid 7z archive. + new -mqs switch to sort files by type while adding to solid 7z archive. + - The BUG in 7-Zip File Manager was fixed: + The "Move" operation to open 7z archive didn't delete empty files. + - The BUG in 15.05 was fixed: + console version added some text to the end of stdout stream, is -so switch was used. +- - The BUG in 9.30 - 15.05 was fixed: +- 7-Zip could not open multivolume sfx RAR archive. + - Some bugs were fixed. + + - From Windows version of 7-zip 15.05 beta: +@@ -214,9 +200,6 @@ Version 9.38 + - bug #139 "password from commanline is visible in processes list" + Now the characters of the password are replaced with *. + +- - From Windows version of 7-zip +- - bug#138 If you extract the password with # program crashes +- 7z now supports long password in RAR 3 and 4. + + + +@@ -247,12 +230,6 @@ Version 9.22 + - #3283518 : Asm/x{32,64}/7zCrcT8U.asm introduces executable stack + + +-Version 9.20.1 +-============== +- +- - #3211479 "p7zip 9.20 - "unsupported method" with RAR files - " fixed +- "install.sh" installs again "bin/Codecs/Rar29.so" +- + Version 9.20 + ============ + +@@ -325,8 +302,6 @@ Version 9.13 + - Some bugs were fixed. + + +- - #2863580 "Crash in Rar decoder on a corrupted file" fixed +- + - #2860898 "Dereferencing a zero pointer in cab handler" fixed + + - #2860679 "Division by zero in cab decoder" fixed +@@ -455,7 +430,7 @@ Version 4.59 (never published) + - It's allowed to use -t switch for "list" and "extract" commands. + - Some bugs were fixed. + +- - Bug : wrong timestamp for files extracted from .zip or .rar archives ++ - Bug : wrong timestamp for files extracted from .zip archives + + + Version 4.58 +@@ -468,8 +443,6 @@ Version 4.58 + 2) -mcu switch: 7-Zip uses UTF-8, if there are non-ASCII symbols. + 3) -mcl switch: 7-Zip uses local code page. + - Now it's possible to store file creation time in 7z and ZIP archives (-mtc switch). +- - 7-Zip now can unpack multivolume RAR archives created with +- "old style volume names" scheme and names *.001, *.002, ... + - Now it's possible to use -mSW- and -mSW+ switches instead of -mSW=off and -mSW=on + - Some bugs were fixed. + +@@ -685,7 +658,7 @@ Version 4.44 + + - From Windows version of 7-zip 4.44 : + - 7za : Cab support +- - Speed optimizations for LZMA, Deflate, BZip2 and unRAR. ++ - Speed optimizations for LZMA, Deflate and BZip2. + - fix : now, updating a crypted header archive keeps the crypted header + + - fixes in the help displayed by 7za/7z/7zr. +@@ -805,8 +778,6 @@ Version 4.38 + + - patch #1465026 - Patch for install.sh for packagers + +- - DosDateTimeToFileTime fixed (rar format) +- + - contrib/VirtualFileSystemForMidnightCommander/u7z updated + (thank sgh_punk) + +@@ -923,8 +894,6 @@ Version 4.25 + - Some bugs were fixed + - DOCS/MANUAL/exit_codes.htm added + +- - new plugin for 7z : RAR format support (extracting only) +- + - better dependencies in makefile + + Version 4.23 +@@ -1112,9 +1081,6 @@ Version 4.10 + - new port of 7za from the source of 7za 4.10Beta for Windows + => p7zip now work on big endian CPU. + +- - 7z for Unix is not maintain anymore (because as the source of unrar plugin for 7z +- is not available, 7z is unless on Unix). +- + Version 0.91 + ============ + - add support for FreeBSD 5.2.1 +diff --git a/DOC/License.txt b/DOC/License.txt +index 0bcbe26..5b0dfaa 100644 +--- a/DOC/License.txt ++++ b/DOC/License.txt +@@ -5,15 +5,6 @@ + + 7-Zip Copyright (C) 1999-2016 Igor Pavlov. + +- Licenses for files are: +- +- 1) CPP/7zip/Compress/Rar* files: GNU LGPL + unRAR restriction +- 2) All other files: GNU LGPL +- +- The GNU LGPL + unRAR restriction means that you must follow both +- GNU LGPL rules and unRAR restriction rules. +- +- + GNU LGPL information + -------------------- + +@@ -33,21 +24,5 @@ + USA + + +- unRAR restriction +- ----------------- +- +- The decompression engine for RAR archives was developed using source +- code of unRAR program. +- All copyrights to original unRAR code are owned by Alexander Roshal. +- +- The license for original unRAR code has the following restriction: +- +- The unRAR sources cannot be used to re-create the RAR compression algorithm, +- which is proprietary. Distribution of modified unRAR sources in separate form +- or as a part of other software is permitted, provided that it is clearly +- stated in the documentation and source comments that the code may +- not be used to develop a RAR (WinRAR) compatible archiver. +- +- + -- + Igor Pavlov +diff --git a/DOC/MANUAL/cmdline/switches/update.htm b/DOC/MANUAL/cmdline/switches/update.htm +index 27385b1..0190fc1 100644 +--- a/DOC/MANUAL/cmdline/switches/update.htm ++++ b/DOC/MANUAL/cmdline/switches/update.htm +@@ -139,7 +139,7 @@ someone in another time zone.</P> + <LI>UTC file systems: NTFS
+ <LI>UTC archive formats: .zip with -mtc switch, 7z, tar, gzip2, iso, wim
+ <LI>Local time file systems : FAT, FAT32
+-<LI>Local time archive formats : rar, zip, cab
++<LI>Local time archive formats : zip, cab
+ </UL>
+
+ <H4>Examples</H4>
+diff --git a/DOC/MANUAL/general/formats.htm b/DOC/MANUAL/general/formats.htm +index 7996c5c..cd01bd6 100644 +--- a/DOC/MANUAL/general/formats.htm ++++ b/DOC/MANUAL/general/formats.htm +@@ -47,7 +47,6 @@ + <TR> <TD align="center">NSIS</TD> <TD></TD> <TD>nsis</TD> </TR>
+ <TR> <TD align="center">NTFS</TD> <TD></TD> <TD>ntfs img</TD> </TR>
+ <TR> <TD align="center">MBR</TD> <TD></TD> <TD>mbr</TD> </TR>
+- <TR> <TD align="center">RAR</TD> <TD></TD> <TD>rar r00</TD> </TR>
+ <TR> <TD align="center">RPM</TD> <TD></TD> <TD>rpm</TD></TR>
+ <TR> <TD align="center">PPMD</TD> <TD></TD> <TD>ppmd</TD> </TR>
+ <TR> <TD align="center">QCOW2</TD> <TD></TD> <TD>qcow qcow2 qcow2c</TD> </TR>
+diff --git a/DOC/Methods.txt b/DOC/Methods.txt +index 1a1c54c..daa94e2 100644 +--- a/DOC/Methods.txt ++++ b/DOC/Methods.txt +@@ -97,12 +97,6 @@ List of defined IDs + 02 - + 02 - BZip2 + +- 03 - [Rar] +- 01 - Rar1 +- 02 - Rar2 +- 03 - Rar3 +- 05 - Rar5 +- + 04 - [Arj] + 01 - Arj(1,2,3) + 02 - Arj4 +@@ -146,10 +140,6 @@ List of defined IDs + 01 - [Zip] + 01 - ZipCrypto (Main Zip crypto algo) + +- 03 - [RAR] +- 02 - +- 03 - Rar29AES (AES-128 + modified SHA-1) +- + 07 - [7z] + 01 - 7zAES (AES-256 + SHA-256) + +diff --git a/DOC/readme.txt b/DOC/readme.txt +index 4a6998c..00591d4 100644 +--- a/DOC/readme.txt ++++ b/DOC/readme.txt +@@ -9,30 +9,9 @@ + License Info + ------------ + +-7-Zip is free software distributed under the GNU LGPL +-(except for unRar code). ++7-Zip is free software distributed under the GNU LGPL. + read License.txt for more infomation about license. + +-Notes about unRAR license: +- +-Please check main restriction from unRar license: +- +- 2. The unRAR sources may be used in any software to handle RAR +- archives without limitations free of charge, but cannot be used +- to re-create the RAR compression algorithm, which is proprietary. +- Distribution of modified unRAR sources in separate form or as a +- part of other software is permitted, provided that it is clearly +- stated in the documentation and source comments that the code may +- not be used to develop a RAR (WinRAR) compatible archiver. +- +-In brief it means: +-1) You can compile and use compiled files under GNU LGPL rules, since +- unRAR license almost has no restrictions for compiled files. +- You can link these compiled files to LGPL programs. +-2) You can fix bugs in source code and use compiled fixed version. +-3) You can not use unRAR sources to re-create the RAR compression algorithm. +- +- + LZMA SDK + -------- + +@@ -96,7 +75,6 @@ DOC Documentation + --- + 7zFormat.txt - 7z format description + copying.txt - GNU LGPL license +- unRarLicense.txt - License for unRAR part of source code + src-history.txt - Sources history + Methods.txt - Compression method IDs + readme.txt - Readme file +diff --git a/DOC/src-history.txt b/DOC/src-history.txt +index 6b48c80..dda8057 100644 +--- a/DOC/src-history.txt ++++ b/DOC/src-history.txt +@@ -188,8 +188,6 @@ HISTORY of the 7-Zip source code + - 7-Zip now has 128 MB dictionary limit for 32-bit version: + It's for speed optimization: kNumLogBits = 9 + sizeof(size_t) / 2; + - TAR: 'D' link flag support. +-- 7-Zip now can unpack multivolume RAR archives created with +- "old style volume names" scheme (-vn switch) and names *.001, *.002, ... + - Fixed bugs: + - 7-Zip FM could not copy / move files to root network folders like \\COMPNAME\FOLDERNAME\ + In case of move it removed original files. +@@ -200,8 +198,6 @@ HISTORY of the 7-Zip source code + 7-zip tries to delete all extra fileds (except for WzAES). + And that code could hang. + - 7-Zip GUI didn't suggest BZip2 dictionary size used in previous run. +- - If creation time stamp was included in .RAR archive, 7-zip used creation time stamp +- as modification time stamp. + + 4.58 alpha 2 2007-12-31 + ------------------------- +@@ -251,7 +247,6 @@ HISTORY of the 7-Zip source code + stratup code, or you must add CPP/Common/CRC.cpp to your project. + - Method ID in .7z now is 63-bit integer (UInt64). + - Open error messages +-- unRar 1.5 fixed + - unShrink fixed + - BUG of 4.43 beta and 4.44 beta was fixed. + 7-Zip compressing to .zip in multi-threading mode didn't work in some cases. +@@ -433,11 +428,6 @@ HISTORY of the 7-Zip source code + contains common resurces + + +-2.30 Beta 19 2002-04-11 +-------------------------- +-- SDK/Archive/Rar/Handler.cpp +- supporting RAR29 +- + 2.30 Beta 18 2002-03-25 + ------------------------- + - SDK/Archive/Cab/MSZipDecoder.cpp +diff --git a/GUI/Contents/Info.plist b/GUI/Contents/Info.plist +index 71650e1..d60b262 100644 +--- a/GUI/Contents/Info.plist ++++ b/GUI/Contents/Info.plist +@@ -311,24 +311,6 @@ + <dict> + <key>CFBundleTypeExtensions</key> + <array> +- <string>rar</string> +- <string>RAR</string> +- <string>.r00</string> +- </array> +- <key>CFBundleTypeIconFile</key> +- <string>p7zip</string> +- <key>CFBundleTypeName</key> +- <string>Rar</string> +- <key>CFBundleTypeRole</key> +- <string>Viewer</string> +- <key>LSTypeIsPackage</key> +- <false/> +- <key>NSPersistentStoreTypeKey</key> +- <string>XML</string> +- </dict> +- <dict> +- <key>CFBundleTypeExtensions</key> +- <array> + <string>ace</string> + <string>ACE</string> + <string>.c00</string> +diff --git a/README b/README +index b76407f..c03917b 100644 +--- a/README ++++ b/README +@@ -8,7 +8,7 @@ p7zip is a port of the Windows programs 7z.exe and 7za.exe provided by 7-zip. + 7-zip is a file archiver with the highest compression ratio. + Homepage : www.7-zip.org + +- 7z uses plugins (7z.so and Codecs/Rar.so) to handle archives. ++ 7z uses plugins (7z.so) to handle archives. + 7za is a stand-alone executable (7za handles less archive formats than 7z). + 7zr is a light stand-alone executable that supports only 7z/LZMA/BCJ/BCJ2. + +@@ -63,7 +63,6 @@ BUILD : + make sfx : to build bin/7zCon.sfx (7za can now create SFX archive) + make 7z : to build bin/7z and its plugins : + - "bin/7z.so" (GNU LGPL + AES code license) +- - "bin/Codecs/Rar.so" (GNU LGPL + unRAR restriction) + make 7zr : to build bin/7zr + make all : to build bin/7za and bin/7zCon.sfx + make all2 : to build bin/7za, bin/7z (with its plugins) and bin/7zCon.sfx +@@ -74,7 +73,6 @@ BUILD : + + make 7zG : to build bin/7zG and its plugins : + - "bin/7z.so" (GNU LGPL + AES code license) +- - "bin/Codecs/Rar.so" (GNU LGPL + unRAR restriction) + make test_7zG : to test bin/7zG (extracting, archiving, ...) + + +diff --git a/Utils/bin_to_sources.py b/Utils/bin_to_sources.py +index 1be72ec..7da359a 100644 +--- a/Utils/bin_to_sources.py ++++ b/Utils/bin_to_sources.py +@@ -13,9 +13,6 @@ file0='Utils/file_7zCon_sfx.py' + dir0='CPP/7zip/UI/Console' + file0='Utils/file_7z.py' + +-dir0='CPP/7zip/Compress/Rar' +-file0='Utils/file_Codecs_Rar_so.py' +- + dir0='CPP/7zip/Bundles/Format7zFree' + file0='Utils/file_7z_so.py' + +diff --git a/Utils/file_7z_so.py b/Utils/file_7z_so.py +index 7ca9fff..43edb87 100644 +--- a/Utils/file_7z_so.py ++++ b/Utils/file_7z_so.py +@@ -111,8 +111,6 @@ files_cpp=[ + 'CPP/7zip/Archive/PeHandler.cpp', + 'CPP/7zip/Archive/PpmdHandler.cpp', + 'CPP/7zip/Archive/QcowHandler.cpp', +- 'CPP/7zip/Archive/Rar/RarHandler.cpp', +- 'CPP/7zip/Archive/Rar/Rar5Handler.cpp', + 'CPP/7zip/Archive/RpmHandler.cpp', + 'CPP/7zip/Archive/SplitHandler.cpp', + 'CPP/7zip/Archive/SquashfsHandler.cpp', +@@ -215,9 +213,6 @@ files_cpp=[ + 'CPP/7zip/Crypto/MyAesReg.cpp', + 'CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp', + 'CPP/7zip/Crypto/RandGen.cpp', +- 'CPP/7zip/Crypto/Rar20Crypto.cpp', +- 'CPP/7zip/Crypto/Rar5Aes.cpp', +- 'CPP/7zip/Crypto/RarAes.cpp', + 'CPP/7zip/Crypto/WzAes.cpp', + 'CPP/7zip/Crypto/ZipCrypto.cpp', + 'CPP/7zip/Crypto/ZipStrong.cpp', +diff --git a/Utils/generate.py b/Utils/generate.py +index 132024a..62c0456 100755 +--- a/Utils/generate.py ++++ b/Utils/generate.py +@@ -281,7 +281,6 @@ import file_7zr + import file_7zG + import file_7zFM + import file_7z_so +-import file_Codecs_Rar_so + import file_Codecs_Lzham_so + import file_LzmaCon + import file_Client7z +@@ -440,43 +439,6 @@ LOCAL_CFLAGS := -DANDROID_NDK -fexceptions \ + -I../../../include_windows + ''') + +-project_Codecs_Rar=Structure(name="Rar",name2="Rar", +- type=TYPE_DLL, +- need_AES=False, +- includedirs=includedirs_7za, +- defines=[ "EXTERNAL_CODECS", "_FILE_OFFSET_BITS=64", "_LARGEFILE_SOURCE", "_REENTRANT", "ENV_UNIX", "BREAK_HANDLER", "UNICODE", "_UNICODE", "UNIX_USE_WIN_FILE" ], +- files_c=file_Codecs_Rar_so.files_c, +- files_cpp=file_Codecs_Rar_so.files_cpp, +- cmake_end=''' +- +-find_library(DL_LIB dl) +- +-link_directories(${DL_LIB_PATH}) +- +-IF(APPLE) +- TARGET_LINK_LIBRARIES(Rar ${COREFOUNDATION_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) +-ELSE(APPLE) +- IF(HAVE_PTHREADS) +- TARGET_LINK_LIBRARIES(Rar ${CMAKE_THREAD_LIBS_INIT} dl) +- ENDIF(HAVE_PTHREADS) +-ENDIF(APPLE) +- +-''', +-android_header=r''' +-LOCAL_CFLAGS := -DANDROID_NDK -fexceptions \ +- -DNDEBUG -D_REENTRANT -DENV_UNIX \ +- -DEXTERNAL_CODECS \ +- -DBREAK_HANDLER \ +- -DUNICODE -D_UNICODE -DUNIX_USE_WIN_FILE \ +- -I../../../Windows \ +- -I../../../Common \ +- -I../../../../C \ +--I../../../myWindows \ +--I../../../ \ +--I../../../include_windows +-''') +- +- + + project_Codecs_Lzham=Structure(name="Lzham",name2="Lzham", + type=TYPE_DLL, +@@ -762,7 +724,6 @@ generate_makefile_list('../CPP/7zip/Bundles/Alone/makefile.list',project_7za) + generate_makefile_list('../CPP/7zip/Bundles/Alone7z/makefile.list',project_7zr) + generate_makefile_list('../CPP/7zip/UI/Console/makefile.list',project_7z) + generate_makefile_list('../CPP/7zip/Bundles/Format7zFree/makefile.list',project_Format7zFree) +-generate_makefile_list('../CPP/7zip/Compress/Rar/makefile.list',project_Codecs_Rar,'../../../../bin/Codecs') + generate_makefile_list('../CPP/7zip/Compress/Lzham/makefile.list',project_Codecs_Lzham,'../../../../bin/Codecs') + generate_makefile_list('../CPP/7zip/Bundles/SFXCon/makefile.list',project_7zCon_sfx) + generate_makefile_list('../CPP/7zip/UI/GUI/makefile.list',project_7zG) +@@ -776,7 +737,6 @@ generate_pro('../CPP/7zip/QMAKE/7za/7za.pro',project_7za) + generate_pro('../CPP/7zip/QMAKE/7zr/7zr.pro',project_7zr) + generate_pro('../CPP/7zip/QMAKE/7z_/7z_.pro',project_7z) + generate_pro('../CPP/7zip/QMAKE/Format7zFree/Format7zFree.pro',project_Format7zFree) +-generate_pro('../CPP/7zip/QMAKE/Rar/Rar.pro',project_Codecs_Rar) + generate_pro('../CPP/7zip/QMAKE/Lzham/Lzham.pro',project_Codecs_Lzham) + + generate_premake4('../CPP/7zip/PREMAKE/premake4.lua',project_7za) +diff --git a/contrib/qnx630sp3/qnx630sp3-shared b/contrib/qnx630sp3/qnx630sp3-shared +index 6f5481f..ea07114 100644 +--- a/contrib/qnx630sp3/qnx630sp3-shared ++++ b/contrib/qnx630sp3/qnx630sp3-shared +@@ -8,7 +8,7 @@ mv ./bin/7z ../${BIN} && mv ./bin/7za ../${BIN} && mv ./bin/7zr ../${BIN} && mv + make clean && \ + cp makefile.qnx_shared.so makefile.machine && \ + make 7z && \ +-mv ./bin/7z.so ../${BIN} && mv ./bin/Codecs/Rar.so ../${BIN}/Codecs && \ ++mv ./bin/7z.so ../${BIN} && \ + make clean && \ + mv makefile.machine.bak makefile.machine + echo "All done - look for binaries in ../${BIN}" +diff --git a/makefile b/makefile +index 745c8ed..f8e8e33 100644 +--- a/makefile ++++ b/makefile +@@ -31,7 +31,6 @@ depend: + $(MAKE) -C CPP/7zip/UI/Client7z depend + $(MAKE) -C CPP/7zip/UI/Console depend + $(MAKE) -C CPP/7zip/Bundles/Format7zFree depend +- $(MAKE) -C CPP/7zip/Compress/Rar depend + $(MAKE) -C CPP/7zip/UI/GUI depend + $(MAKE) -C CPP/7zip/UI/FileManager depend + +@@ -42,7 +41,6 @@ sfx: common + common7z:common + $(MKDIR) bin/Codecs + $(MAKE) -C CPP/7zip/Bundles/Format7zFree all +- $(MAKE) -C CPP/7zip/Compress/Rar all + + lzham:common + $(MKDIR) bin/Codecs +@@ -67,7 +65,6 @@ clean_C: + $(MAKE) -C CPP/7zip/UI/FileManager clean + $(MAKE) -C CPP/7zip/UI/GUI clean + $(MAKE) -C CPP/7zip/Bundles/Format7zFree clean +- $(MAKE) -C CPP/7zip/Compress/Rar clean + $(MAKE) -C CPP/7zip/Compress/Lzham clean + $(MAKE) -C CPP/7zip/Bundles/LzmaCon clean2 + $(MAKE) -C CPP/7zip/Bundles/AloneGCOV clean +diff --git a/makefile.oldmake b/makefile.oldmake +index afc681c..690af08 100644 +--- a/makefile.oldmake ++++ b/makefile.oldmake +@@ -31,7 +31,6 @@ depend: + cd CPP/7zip/UI/Client7z ; $(MAKE) depend + cd CPP/7zip/UI/Console ; $(MAKE) depend + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) depend +- cd CPP/7zip/Compress/Rar ; $(MAKE) depend + cd CPP/7zip/UI/GUI ; $(MAKE) depend + cd CPP/7zip/UI/FileManager ; $(MAKE) depend + +@@ -42,7 +41,6 @@ sfx: common + common7z:common + $(MKDIR) bin/Codecs + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) all +- cd CPP/7zip/Compress/Rar ; $(MAKE) all + + lzham:common + $(MKDIR) bin/Codecs +@@ -67,7 +65,6 @@ clean_C: + cd CPP/7zip/UI/FileManager ; $(MAKE) clean + cd CPP/7zip/UI/GUI ; $(MAKE) clean + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) clean +- cd CPP/7zip/Compress/Rar ; $(MAKE) clean + cd CPP/7zip/Compress/Lzham ; $(MAKE) clean + cd CPP/7zip/Bundles/LzmaCon ; $(MAKE) clean2 + cd CPP/7zip/Bundles/AloneGCOV ; $(MAKE) clean +diff --git a/makefile.qnx_shared.so b/makefile.qnx_shared.so +index abd1caf..cff5485 100644 +--- a/makefile.qnx_shared.so ++++ b/makefile.qnx_shared.so +@@ -1,5 +1,5 @@ + ################################################### +-# makefile.machine for "7z.so , Codecs/Rar.so" : ++# makefile.machine for "7z.so" : + # tested with p7zip-4.47_beta on qnx-6.3.0 sp3 x86 target + + OPTFLAGS=-O -s diff --git a/gnu/packages/patches/plink-endian-detection.patch b/gnu/packages/patches/plink-endian-detection.patch new file mode 100644 index 0000000000..4d6185512f --- /dev/null +++ b/gnu/packages/patches/plink-endian-detection.patch @@ -0,0 +1,30 @@ +This patch is borrowed from Debian's patches for plink + +Author: Peter Green <plugwash@p10link.net> +Puropose: Fallback to endian.h if all else fails on 64bit machines +Closes: #528659 +Forwarded: Shaun Purcell <plink@chgr.mgh.harvard.edu> +License: same as plink itself. +=================================================================== +--- plink-1.06.orig/Rsrv.h 2009-05-15 03:35:29.000000000 +0100 ++++ plink-1.06/Rsrv.h 2009-05-15 03:35:41.000000000 +0100 +@@ -313,7 +313,18 @@ + #define __BIG_ENDIAN__ 1 + #define SWAPEND 1 + #elif ! defined Win32 /* Windows is little-endian is most cases, anywhere else we're stuck */ +-#error "Cannot determine endianness. Make sure config.h is included or __{BIG|LITTLE}_ENDIAN__ is defined ." ++ //try endian.h before we finally bail out ++ #include <endian.h> ++ #if __BYTE_ORDER == __LITTLE_ENDIAN ++ #warning using little endian based on information from endian.h ++ #define __LITTLE_ENDIAN__ 1 ++ #elif __BYTE_ORDER == __BIG_ENDIAN ++ #warning using big endian based on information from endian.h ++ #define __BIG_ENDIAN__ 1 ++ #define SWAPEND 1 ++ #else ++ #error "Cannot determine endianness. Make sure config.h is included or __{BIG|LITTLE}_ENDIAN__ is defined ." ++ #endif + #endif + + /* FIXME: all the mess below needs more efficient implementation - the current one is so messy to work around alignment problems on some platforms like Sun and HP 9000 */ diff --git a/gnu/packages/patches/python-django-fix-testcase.patch b/gnu/packages/patches/python-django-fix-testcase.patch new file mode 100644 index 0000000000..4c1f9806d7 --- /dev/null +++ b/gnu/packages/patches/python-django-fix-testcase.patch @@ -0,0 +1,42 @@ +From 24123c31362b5f3783d84d133c160e9fe16805fe Mon Sep 17 00:00:00 2001 +From: Tim Graham <timograham@gmail.com> +Date: Mon, 1 Aug 2016 15:40:46 -0400 +Subject: [PATCH] Fixed admin_utils test failures due to translation updates. + +https://github.com/django/django/commit/24123c31362b5f3783d84d133c160e9fe16805fe + +--- + tests/admin_utils/test_logentry.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/tests/admin_utils/test_logentry.py b/tests/admin_utils/test_logentry.py +index 7798373..8259bf0 100644 +--- a/tests/admin_utils/test_logentry.py ++++ b/tests/admin_utils/test_logentry.py +@@ -59,7 +59,7 @@ class LogEntryTests(TestCase): + logentry = LogEntry.objects.filter(content_type__model__iexact='article').latest('id') + self.assertEqual(logentry.get_change_message(), 'Changed title and hist.') + with translation.override('fr'): +- self.assertEqual(logentry.get_change_message(), 'Modification de title et hist.') ++ self.assertEqual(logentry.get_change_message(), 'Title et hist modifié(s).') + + add_url = reverse('admin:admin_utils_article_add') + post_data['title'] = 'New' +@@ -117,11 +117,12 @@ class LogEntryTests(TestCase): + 'Changed domain. Added article "Article object". ' + 'Changed title for article "Article object". Deleted article "Article object".' + ) ++ + with translation.override('fr'): + self.assertEqual( + logentry.get_change_message(), +- 'Modification de domain. Article « Article object » ajouté. ' +- 'Modification de title pour l\'objet article « Article object ». Article « Article object » supprimé.' ++ "Domain modifié(s). Article « Article object » ajouté. " ++ "Title modifié(s) pour l'objet article « Article object ». Article « Article object » supprimé." + ) + + def test_logentry_get_edited_object(self): +-- +2.7.4 + diff --git a/gnu/packages/patches/slock-CVE-2016-6866.patch b/gnu/packages/patches/slock-CVE-2016-6866.patch new file mode 100644 index 0000000000..2f94b8c1a9 --- /dev/null +++ b/gnu/packages/patches/slock-CVE-2016-6866.patch @@ -0,0 +1,51 @@ +Fix CVE-2016-6866. + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6866 +https://security-tracker.debian.org/tracker/CVE-2016-6866 + +Copied from upstream source repository: +http://git.suckless.org/slock/commit/?id=d8bec0f6fdc8a246d78cb488a0068954b46fcb29 + +From d8bec0f6fdc8a246d78cb488a0068954b46fcb29 Mon Sep 17 00:00:00 2001 +From: Markus Teich <markus.teich@stusta.mhn.de> +Date: Tue, 30 Aug 2016 22:59:06 +0000 +Subject: fix CVE-2016-6866 + +--- +diff --git a/slock.c b/slock.c +index 847b328..8ed59ca 100644 +--- a/slock.c ++++ b/slock.c +@@ -123,7 +123,7 @@ readpw(Display *dpy) + readpw(Display *dpy, const char *pws) + #endif + { +- char buf[32], passwd[256]; ++ char buf[32], passwd[256], *encrypted; + int num, screen; + unsigned int len, color; + KeySym ksym; +@@ -159,7 +159,11 @@ readpw(Display *dpy, const char *pws) + #ifdef HAVE_BSD_AUTH + running = !auth_userokay(getlogin(), NULL, "auth-slock", passwd); + #else +- running = !!strcmp(crypt(passwd, pws), pws); ++ errno = 0; ++ if (!(encrypted = crypt(passwd, pws))) ++ fprintf(stderr, "slock: crypt: %s\n", strerror(errno)); ++ else ++ running = !!strcmp(encrypted, pws); + #endif + if (running) { + XBell(dpy, 100); +@@ -312,6 +316,8 @@ main(int argc, char **argv) { + + #ifndef HAVE_BSD_AUTH + pws = getpw(); ++ if (strlen(pws) < 2) ++ die("slock: failed to get user password hash.\n"); + #endif + + if (!(dpy = XOpenDisplay(NULL))) +-- +cgit v0.9.0.3-65-g4555 diff --git a/gnu/packages/patches/steghide-fixes.patch b/gnu/packages/patches/steghide-fixes.patch new file mode 100644 index 0000000000..4e7f447f9a --- /dev/null +++ b/gnu/packages/patches/steghide-fixes.patch @@ -0,0 +1,71 @@ +--- steghide-0.5.1/src/AuData.h ++++ steghide-0.5.1/src/AuData.h +@@ -26,22 +26,22 @@ + + // AuMuLawAudioData + typedef AudioDataImpl<AuMuLaw,BYTE> AuMuLawAudioData ; +-inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; } +-inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; } ++template<> inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; } ++template<> inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; } + + // AuPCM8AudioData + typedef AudioDataImpl<AuPCM8,SBYTE> AuPCM8AudioData ; +-inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; } +-inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; } ++template<> inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; } ++template<> inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; } + + // AuPCM16AudioData + typedef AudioDataImpl<AuPCM16,SWORD16> AuPCM16AudioData ; +-inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; } +-inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; } ++template<> inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; } ++template<> inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; } + + // AuPCM32AudioData + typedef AudioDataImpl<AuPCM32,SWORD32> AuPCM32AudioData ; +-inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; } +-inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; } ++template<> inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; } ++template<> inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; } + + #endif // ndef SH_AUDATA_H +--- steghide-0.5.1/src/AuSampleValues.cc ++++ steghide-0.5.1/src/AuSampleValues.cc +@@ -21,17 +21,17 @@ + #include "AuSampleValues.h" + + // AuMuLawSampleValue +-const BYTE AuMuLawSampleValue::MinValue = 0 ; +-const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ; ++template<> const BYTE AuMuLawSampleValue::MinValue = 0 ; ++template<> const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ; + + // AuPCM8SampleValue +-const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ; +-const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ; ++template<> const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ; ++template<> const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ; + + // AuPCM16SampleValue +-const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ; +-const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ; ++template<> const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ; ++template<> const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ; + + // AuPCM32SampleValue +-const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ; +-const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ; ++template<> const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ; ++template<> const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ; +--- steghide-0.5.1/src/Graph.cc ++++ steghide-0.5.1/src/Graph.cc +@@ -18,6 +18,7 @@ + * + */ + ++#include <climits> + #include <ctime> + #include <list> + #include <map> diff --git a/gnu/packages/patches/swish-e-format-security.patch b/gnu/packages/patches/swish-e-format-security.patch new file mode 100644 index 0000000000..be9d7cb8a9 --- /dev/null +++ b/gnu/packages/patches/swish-e-format-security.patch @@ -0,0 +1,33 @@ +Borrowed from Debian. + +--- swish-e-2.4.7/src/parser.c 2009-04-05 03:58:32.000000000 +0200 ++++ swish-e-2.4.7/src/parser.c 2013-06-11 13:53:08.196559035 +0200 +@@ -1760,7 +1760,7 @@ + va_start(args, msg); + vsnprintf(str, 1000, msg, args ); + va_end(args); +- xmlParserError(parse_data->ctxt, str); ++ xmlParserError(parse_data->ctxt, "%s", str); + } + + static void warning(void *data, const char *msg, ...) +@@ -1772,7 +1772,7 @@ + va_start(args, msg); + vsnprintf(str, 1000, msg, args ); + va_end(args); +- xmlParserWarning(parse_data->ctxt, str); ++ xmlParserWarning(parse_data->ctxt, "%s", str); + } + + +--- swish-e-2.4.7/src/result_output.c 2009-04-05 03:58:32.000000000 +0200 ++++ swish-e-2.4.7/src/result_output.c 2013-06-11 13:53:38.593550825 +0200 +@@ -752,7 +752,7 @@ + s = (char *) emalloc(MAXWORDLEN + 1); + n = strftime(s, (size_t) MAXWORDLEN, fmt, localtime(&(pv->value.v_date))); + if (n && f) +- fprintf(f, s); ++ fprintf(f, "%s", s); + efree(s); + } + break; diff --git a/gnu/packages/patches/swish-e-search.patch b/gnu/packages/patches/swish-e-search.patch new file mode 100644 index 0000000000..2a57a31a08 --- /dev/null +++ b/gnu/packages/patches/swish-e-search.patch @@ -0,0 +1,43 @@ +From http://swish-e.org/archive/2015-09/13295.html + +--- a/src/compress.c ++++ a/src/compress.c +@@ -995,7 +995,7 @@ void remove_worddata_longs(unsigned char *worddata,int *sz_worddata) + progerr("Internal error in remove_worddata_longs"); + + /* dst may be smaller than src. So move the data */ +- memcpy(dst,src,data_len); ++ memmove(dst,src,data_len); + + /* Increase pointers */ + src += data_len; +--- a/src/headers.c ++++ a/src/headers.c +@@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he + + case SWISH_NUMBER: + case SWISH_BOOL: +- value.number = *(unsigned long *) data_pointer; ++ value.number = *(unsigned int *) data_pointer; + + /* $$$ Ugly hack alert! */ + /* correct for removed files */ +--- a/src/swishspider ++++ a/src/swishspider +@@ -27,6 +27,7 @@ use LWP::UserAgent; + use HTTP::Status; + use HTML::Parser 3.00; + use HTML::LinkExtor; ++use Encode; + + if (scalar(@ARGV) != 2) { + print STDERR "Usage: $0 localpath url\n"; +@@ -94,7 +95,7 @@ use HTML::LinkExtor; + # Don't allow links above the base + $URI::ABS_REMOTE_LEADING_DOTS = 1; + +- $p->parse( $$content_ref ); ++ $p->parse( decode_utf8 $$content_ref ); + close( LINKS ); + + exit; |