This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via 41388a63395686ab690b4e98e75732f00a2678d3 (commit) via 3d8ec84d15ad5fae4650f908105cf53a5f17ca51 (commit) via 795c469a96e5b4323ec89e2007612b31a0301195 (commit) via 0979d287d32d1ed72499f0838401b219d9007e0f (commit) via 244d946c96c214cf1005a283af8135b85d546e96 (commit) via f60dfe5251735f7b5d88d829e75cb27ff048f025 (commit) via 3e4070b5fc826db3cdfd9e2274262e80c38bc5dd (commit) via 2802053dfd80ef22f58a96ede29d88ce86c5e014 (commit) via 565c8efba5203cb0ef11b109f930ca88589ab75f (commit) via 6f6c9c65b3e4a73b2483c126f25fe700ae193b72 (commit) via 6efed435d7a64e996bc18a45c107dfa20b1199c8 (commit) via f1a8635ba4381a1e2869cec59793a781522f160c (commit) via 2c1bf7849fbe4c6192cd4f709cf486e4a292ced2 (commit) via d261ead01d4debcd2a5950c1e0a23cd9bff314a2 (commit) via 932a6a7aa0f87b8f87cdcec8b9b6be4d90e9c2ab (commit) from 3d7693a24f5c1d88cfa288dbf4b2789c663f9c41 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 41388a63395686ab690b4e98e75732f00a2678d3 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jan 29 10:29:44 2018 +0000
openssl: Update to 1.1.0g
This patch adds a compat package for openssl 1.0.2 which will be dropped when 1.0.2 is EOL. We leave the headers here because there will be applications that can't be built against openssl 1.1.0, yet.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 3d8ec84d15ad5fae4650f908105cf53a5f17ca51 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jan 29 10:28:54 2018 +0000
python3: Update to 3.6.4
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 795c469a96e5b4323ec89e2007612b31a0301195 Author: Michael Tremer michael.tremer@ipfire.org Date: Mon Jan 29 10:28:27 2018 +0000
clamav: Update to 0.99.3
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 0979d287d32d1ed72499f0838401b219d9007e0f Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jan 28 17:36:27 2018 +0000
git: Update to 2.16.1
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 244d946c96c214cf1005a283af8135b85d546e96 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jan 28 17:33:56 2018 +0000
pcre2: New package
This is a fork of PCRE with a new API and enhanced capabilities.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit f60dfe5251735f7b5d88d829e75cb27ff048f025 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jan 28 17:33:30 2018 +0000
pcre: Update to 8.41
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 3e4070b5fc826db3cdfd9e2274262e80c38bc5dd Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jan 28 16:10:25 2018 +0000
binutils: Update to 2.30
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 2802053dfd80ef22f58a96ede29d88ce86c5e014 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Jan 28 15:51:08 2018 +0000
gcc: Update to version 7.3.0
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 565c8efba5203cb0ef11b109f930ca88589ab75f Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Jan 25 22:03:29 2018 +0000
glib2: Update to version 2.55.1
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 6f6c9c65b3e4a73b2483c126f25fe700ae193b72 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Jan 25 20:40:08 2018 +0000
glibc: Drop some patches
glibc has been a bit unstable and we are going to drop patches that we don't essentially need in the hope to mitigate any random segfaults.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 6efed435d7a64e996bc18a45c107dfa20b1199c8 Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Jan 25 20:12:33 2018 +0000
hostapd: Update to version 2.6
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit f1a8635ba4381a1e2869cec59793a781522f160c Author: Michael Tremer michael.tremer@ipfire.org Date: Thu Jan 25 19:57:07 2018 +0000
vsftpd: Drop package
This has been dropped from IPFire 2 as well because upstream is not maintaaining this very actively any more.
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 2c1bf7849fbe4c6192cd4f709cf486e4a292ced2 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 24 16:36:01 2018 +0000
gmp: Update to version 6.1.2
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit d261ead01d4debcd2a5950c1e0a23cd9bff314a2 Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 24 16:35:47 2018 +0000
mpfr: Update to version 4.0.0
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
commit 932a6a7aa0f87b8f87cdcec8b9b6be4d90e9c2ab Author: Michael Tremer michael.tremer@ipfire.org Date: Wed Jan 24 15:13:40 2018 +0000
unbound: Update to version 1.6.8
Signed-off-by: Michael Tremer michael.tremer@ipfire.org
-----------------------------------------------------------------------
Summary of changes: binutils/binutils.nm | 10 +- binutils/patches/binutils-2.26-lto.patch | 2419 -------------------- .../binutils-2.27-relro-on-by-default.patch | 13 - clamav/clamav.nm | 15 +- .../openssl.nm => compat-openssl/compat-openssl.nm | 90 +- {openssl => compat-openssl}/openssl.cnf | 0 .../patches/openssl-0.9.8a-no-rpath.patch | 0 .../patches/openssl-1.0.0-beta4-ca-dir.patch | 0 .../patches/openssl-1.0.0-beta5-enginesdir.patch | 0 .../patches/openssl-1.0.2a-version.patch | 0 .../patches/openssl-1.0.2e-rpmbuild.patch | 25 +- gcc/gcc.nm | 29 +- git/git.nm | 41 +- glib2/glib2.nm | 2 +- glibc/glibc.nm | 2 +- .../glibc-fedora-elf-init-hidden_undef.patch | 30 - glibc/patches/glibc-fedora-elf-rh737223.patch | 15 - .../glibc-fedora-i386-tls-direct-seg-refs.patch | 18 - glibc/patches/glibc-fedora-ldd.patch | 42 - glibc/patches/glibc-fedora-linux-tcsetattr.patch | 48 - glibc/patches/glibc-fedora-nis-rh188246.patch | 21 - glibc/patches/glibc-fedora-nptl-linklibc.patch | 25 - glibc/patches/glibc-rh819430.patch | 78 - glibc/patches/glibc-rh952799.patch | 181 -- gmp/gmp.nm | 2 +- hostapd/hostapd.nm | 2 +- mpfr/mpfr.nm | 2 +- openssl/openssl.nm | 130 +- openssl/patches/openssl-1.1.0-build.patch | 73 + openssl/patches/openssl-1.1.0-ca-dir.patch | 24 + openssl/patches/openssl-1.1.0-defaults.patch | 51 + openssl/patches/openssl-1.1.0-disable-ssl3.patch | 86 + openssl/patches/openssl-1.1.0-no-html.patch | 12 + openssl/patches/openssl-1.1.0g-tests.patch | 33 + pcre/pcre.nm | 2 +- pcre2/pcre2.nm | 103 + python3/python3.nm | 2 +- unbound/unbound.nm | 2 +- vsftpd/patches/1-vsftpd-build_ssl.patch | 13 - vsftpd/patches/2-vsftpd-libs-3.patch | 13 - vsftpd/patches/3-vsftpd-pam_hostname-1.patch | 58 - vsftpd/patches/4-vsftpd-close-std-fds.patch | 14 - vsftpd/patches/5-vsftpd-configuration-1.patch | 416 ---- vsftpd/patches/vsftpd-2.2.0-openssl.patch | 15 - vsftpd/systemd/vsftpd.service | 9 - vsftpd/vsftpd.conf | 50 - vsftpd/vsftpd.nm | 60 - vsftpd/vsftpd.pam | 8 - vsftpd/vsftpd.user_list | 0 49 files changed, 558 insertions(+), 3726 deletions(-) delete mode 100644 binutils/patches/binutils-2.26-lto.patch delete mode 100644 binutils/patches/binutils-2.27-relro-on-by-default.patch copy openssl/openssl.nm => compat-openssl/compat-openssl.nm (57%) rename {openssl => compat-openssl}/openssl.cnf (100%) rename {openssl => compat-openssl}/patches/openssl-0.9.8a-no-rpath.patch (100%) rename {openssl => compat-openssl}/patches/openssl-1.0.0-beta4-ca-dir.patch (100%) rename {openssl => compat-openssl}/patches/openssl-1.0.0-beta5-enginesdir.patch (100%) rename {openssl => compat-openssl}/patches/openssl-1.0.2a-version.patch (100%) rename openssl/patches/openssl-1.0.2c-rpmbuild.patch => compat-openssl/patches/openssl-1.0.2e-rpmbuild.patch (92%) delete mode 100644 glibc/patches/glibc-fedora-elf-init-hidden_undef.patch delete mode 100644 glibc/patches/glibc-fedora-elf-rh737223.patch delete mode 100644 glibc/patches/glibc-fedora-i386-tls-direct-seg-refs.patch delete mode 100644 glibc/patches/glibc-fedora-ldd.patch delete mode 100644 glibc/patches/glibc-fedora-linux-tcsetattr.patch delete mode 100644 glibc/patches/glibc-fedora-nis-rh188246.patch delete mode 100644 glibc/patches/glibc-fedora-nptl-linklibc.patch delete mode 100644 glibc/patches/glibc-rh819430.patch delete mode 100644 glibc/patches/glibc-rh952799.patch create mode 100644 openssl/patches/openssl-1.1.0-build.patch create mode 100644 openssl/patches/openssl-1.1.0-ca-dir.patch create mode 100644 openssl/patches/openssl-1.1.0-defaults.patch create mode 100644 openssl/patches/openssl-1.1.0-disable-ssl3.patch create mode 100644 openssl/patches/openssl-1.1.0-no-html.patch create mode 100644 openssl/patches/openssl-1.1.0g-tests.patch create mode 100644 pcre2/pcre2.nm delete mode 100644 vsftpd/patches/1-vsftpd-build_ssl.patch delete mode 100644 vsftpd/patches/2-vsftpd-libs-3.patch delete mode 100644 vsftpd/patches/3-vsftpd-pam_hostname-1.patch delete mode 100644 vsftpd/patches/4-vsftpd-close-std-fds.patch delete mode 100644 vsftpd/patches/5-vsftpd-configuration-1.patch delete mode 100644 vsftpd/patches/vsftpd-2.2.0-openssl.patch delete mode 100644 vsftpd/systemd/vsftpd.service delete mode 100644 vsftpd/vsftpd.conf delete mode 100644 vsftpd/vsftpd.nm delete mode 100644 vsftpd/vsftpd.pam delete mode 100644 vsftpd/vsftpd.user_list
Difference in files: diff --git a/binutils/binutils.nm b/binutils/binutils.nm index 2d860b494..81e7884a2 100644 --- a/binutils/binutils.nm +++ b/binutils/binutils.nm @@ -4,7 +4,7 @@ ###############################################################################
name = binutils -version = 2.29.1 +version = 2.30 release = 1
maintainer = Michael Tremer michael.tremer@ipfire.org @@ -18,7 +18,9 @@ description tools for the manipulation of object code in various object file formats. end
-source_dl = http://ftp.gnu.org/gnu/binutils/ +source_dl = https://ftp.gnu.org/gnu/binutils/ \ + https://sourceware.org/pub/binutils/releases/ +sources = %{thisapp}.tar.xz
build requires @@ -63,7 +65,9 @@ build --disable-static \ --enable-64-bit-bfd \ --enable-plugins \ - --with-bugurl="http://bugzilla.ipfire.org/" + --with-bugurl="http://bugzilla.ipfire.org/" \ + --enable-relro=yes \ + --enable-lto
build cd %{DIR_SRC}/binutils-build diff --git a/binutils/patches/binutils-2.26-lto.patch b/binutils/patches/binutils-2.26-lto.patch deleted file mode 100644 index abe74e820..000000000 --- a/binutils/patches/binutils-2.26-lto.patch +++ /dev/null @@ -1,2419 +0,0 @@ -diff -rup binutils-2.26.orig/bfd/bfd.c binutils-2.26/bfd/bfd.c ---- binutils-2.26.orig/bfd/bfd.c 2016-02-19 09:35:36.231000625 +0000 -+++ binutils-2.26/bfd/bfd.c 2016-02-19 09:35:54.901106498 +0000 -@@ -57,6 +57,14 @@ CODE_FRAGMENT - . bfd_byte data[1]; - . }; - . -+.enum bfd_lto_object_type -+. { -+. lto_non_object, -+. lto_non_ir_object, -+. lto_ir_object, -+. lto_mixed_object -+. }; -+. - .struct bfd - .{ - . {* The filename the application opened the BFD with. *} -@@ -227,6 +235,9 @@ CODE_FRAGMENT - . {* Set if this is a plugin output file. *} - . unsigned int lto_output : 1; - . -+. {* LTO object type. *} -+. ENUM_BITFIELD (bfd_lto_object_type) lto_type : 2; -+. - . {* Set to dummy BFD created when claimed by a compiler plug-in - . library. *} - . bfd *plugin_dummy_bfd; -@@ -252,6 +263,9 @@ CODE_FRAGMENT - . {* The last section on the section list. *} - . struct bfd_section *section_last; - . -+. {* The object-only section on the section list. *} -+. struct bfd_section *object_only_section; -+. - . {* The number of sections. *} - . unsigned int section_count; - . -@@ -2270,3 +2284,36 @@ bfd_convert_section_contents (bfd *ibfd, - *ptr_size = size; - return TRUE; - } -+ -+/* -+FUNCTION -+ bfd_group_signature -+ -+SYNOPSIS -+ asymbol *bfd_group_signature (asection *group, asymbol **isympp); -+ -+DESCRIPTION -+ Return a pointer to the symbol used as a signature for GROUP. -+*/ -+ -+asymbol * -+bfd_group_signature (asection *group, asymbol **isympp) -+{ -+ bfd *abfd = group->owner; -+ Elf_Internal_Shdr *ghdr; -+ -+ if (bfd_get_flavour (abfd) != bfd_target_elf_flavour) -+ return NULL; -+ -+ ghdr = &elf_section_data (group)->this_hdr; -+ if (ghdr->sh_link < elf_numsections (abfd)) -+ { -+ const struct elf_backend_data *bed = get_elf_backend_data (abfd); -+ Elf_Internal_Shdr *symhdr = elf_elfsections (abfd) [ghdr->sh_link]; -+ -+ if (symhdr->sh_type == SHT_SYMTAB -+ && ghdr->sh_info < symhdr->sh_size / bed->s->sizeof_sym) -+ return isympp[ghdr->sh_info - 1]; -+ } -+ return NULL; -+} -diff -rup binutils-2.26.orig/bfd/bfd-in2.h binutils-2.26/bfd/bfd-in2.h ---- binutils-2.26.orig/bfd/bfd-in2.h 2016-02-19 09:35:36.280000903 +0000 -+++ binutils-2.26/bfd/bfd-in2.h 2016-02-19 09:35:54.900106492 +0000 -@@ -1654,6 +1657,9 @@ extern asection _bfd_std_section[4]; - #define BFD_COM_SECTION_NAME "*COM*" - #define BFD_IND_SECTION_NAME "*IND*" - -+/* GNU object-only section name. */ -+#define GNU_OBJECT_ONLY_SECTION_NAME ".gnu_object_only" -+ - /* Pointer to the common section. */ - #define bfd_com_section_ptr (&_bfd_std_section[0]) - /* Pointer to the undefined section. */ -@@ -6511,6 +6517,14 @@ struct bfd_build_id - bfd_byte data[1]; - }; - -+enum bfd_lto_object_type -+ { -+ lto_non_object, -+ lto_non_ir_object, -+ lto_ir_object, -+ lto_mixed_object -+ }; -+ - struct bfd - { - /* The filename the application opened the BFD with. */ -@@ -6681,6 +6695,9 @@ struct bfd - /* Set if this is a plugin output file. */ - unsigned int lto_output : 1; - -+ /* LTO object type. */ -+ ENUM_BITFIELD (bfd_lto_object_type) lto_type : 2; -+ - /* Set to dummy BFD created when claimed by a compiler plug-in - library. */ - bfd *plugin_dummy_bfd; -@@ -6706,6 +6723,9 @@ struct bfd - /* The last section on the section list. */ - struct bfd_section *section_last; - -+ /* The object-only section on the section list. */ -+ struct bfd_section *object_only_section; -+ - /* The number of sections. */ - unsigned int section_count; - -@@ -7026,6 +7046,8 @@ bfd_boolean bfd_convert_section_contents - (bfd *ibfd, asection *isec, bfd *obfd, - bfd_byte **ptr, bfd_size_type *ptr_size); - -+asymbol *bfd_group_signature (asection *group, asymbol **isympp); -+ - /* Extracted from archive.c. */ - symindex bfd_get_next_mapent - (bfd *abfd, symindex previous, carsym **sym); -diff -rup binutils-2.26.orig/bfd/elf.c binutils-2.26/bfd/elf.c ---- binutils-2.26.orig/bfd/elf.c 2016-02-19 09:35:36.280000903 +0000 -+++ binutils-2.26/bfd/elf.c 2016-02-19 09:35:54.904106515 +0000 -@@ -2387,6 +2387,7 @@ static const struct bfd_elf_special_sect - { STRING_COMMA_LEN (".gnu.linkonce.b"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, - { STRING_COMMA_LEN (".gnu.lto_"), -1, SHT_PROGBITS, SHF_EXCLUDE }, - { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, -+ { STRING_COMMA_LEN (".gnu_object_only"), 0, SHT_GNU_OBJECT_ONLY, SHF_EXCLUDE }, - { STRING_COMMA_LEN (".gnu.version"), 0, SHT_GNU_versym, 0 }, - { STRING_COMMA_LEN (".gnu.version_d"), 0, SHT_GNU_verdef, 0 }, - { STRING_COMMA_LEN (".gnu.version_r"), 0, SHT_GNU_verneed, 0 }, -diff -rup binutils-2.26.orig/bfd/format.c binutils-2.26/bfd/format.c ---- binutils-2.26.orig/bfd/format.c 2016-02-19 09:35:36.265000818 +0000 -+++ binutils-2.26/bfd/format.c 2016-02-19 09:36:21.420256880 +0000 -@@ -46,6 +46,9 @@ SUBSECTION - #include "sysdep.h" - #include "bfd.h" - #include "libbfd.h" -+#if BFD_SUPPORTS_PLUGINS -+#include "plugin.h" -+#endif - - /* IMPORT from targets.c. */ - extern const size_t _bfd_target_vector_entries; -@@ -179,6 +182,33 @@ bfd_preserve_finish (bfd *abfd ATTRIBUTE - preserve->marker = NULL; - } - -+/* Set lto_type in ABFD. */ -+ -+static void -+bfd_set_lto_type (bfd *abfd) -+{ -+ if (abfd->format == bfd_object -+ && abfd->lto_type == lto_non_object -+ && (abfd->flags & (DYNAMIC | EXEC_P)) == 0) -+ { -+ asection *sec; -+ enum bfd_lto_object_type type = lto_non_ir_object; -+ for (sec = abfd->sections; sec != NULL; sec = sec->next) -+ { -+ if (strcmp (sec->name, GNU_OBJECT_ONLY_SECTION_NAME) == 0) -+ { -+ type = lto_mixed_object; -+ abfd->object_only_section = sec; -+ break; -+ } -+ else if (type != lto_ir_object -+ && strncmp (sec->name, ".gnu.lto_", 9) == 0) -+ type = lto_ir_object; -+ } -+ abfd->lto_type = type; -+ } -+} -+ - /* - FUNCTION - bfd_check_format_matches -@@ -221,7 +251,10 @@ bfd_check_format_matches (bfd *abfd, bfd - } - - if (abfd->format != bfd_unknown) -- return abfd->format == format; -+ { -+ bfd_set_lto_type (abfd); -+ return abfd->format == format; -+ } - - if (matching != NULL || *bfd_associated_vector != NULL) - { -@@ -285,6 +318,13 @@ bfd_check_format_matches (bfd *abfd, bfd - || (*target)->match_priority > best_match) - continue; - -+#if BFD_SUPPORTS_PLUGINS -+ /* If the plugin target is explicitly specified when a BFD file -+ is opened, don't check it twice. */ -+ if (bfd_plugin_specified_p () && bfd_plugin_target_p (*target)) -+ continue; -+#endif -+ - /* If we already tried a match, the bfd is modified and may - have sections attached, which will confuse the next - _bfd_check_format call. */ -@@ -449,6 +489,8 @@ bfd_check_format_matches (bfd *abfd, bfd - if (matching_vector) - free (matching_vector); - -+ bfd_set_lto_type (abfd); -+ - /* File position has moved, BTW. */ - return TRUE; - } -diff -rup binutils-2.26.orig/bfd/plugin.c binutils-2.26/bfd/plugin.c ---- binutils-2.26.orig/bfd/plugin.c 2016-02-19 09:35:36.271000852 +0000 -+++ binutils-2.26/bfd/plugin.c 2016-02-19 09:35:54.905106520 +0000 -@@ -130,6 +130,146 @@ register_claim_file (ld_plugin_claim_fil - return LDPS_OK; - } - -+static asection bfd_plugin_fake_text_section -+ = BFD_FAKE_SECTION (bfd_plugin_fake_text_section, 0, 0, ".text", 0); -+static asection bfd_plugin_fake_common_section -+ = BFD_FAKE_SECTION (bfd_plugin_fake_common_section, SEC_IS_COMMON, 0, -+ NULL, 0); -+ -+/* Get symbols from object only section. */ -+ -+static void -+bfd_plugin_get_symbols_in_object_only (bfd *abfd) -+{ -+ struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data; -+ const char *object_only_file; -+ bfd *nbfd; -+ long storage; -+ long object_only_nsyms, added_nsyms, i; -+ asymbol **object_only_syms, **added_syms; -+ -+ plugin_data->object_only_syms = NULL; -+ plugin_data->object_only_nsyms = 0; -+ -+ if (abfd->sections == NULL && abfd->my_archive == NULL) -+ { -+ nbfd = bfd_openr (abfd->filename, NULL); -+ if (nbfd == NULL) -+ { -+ (*_bfd_error_handler) -+ (_("%s: failed to open to extract object only section: %s"), -+ abfd->filename, bfd_errmsg (bfd_get_error ())); -+ goto error_return; -+ } -+ else if (!bfd_check_format (nbfd, bfd_object)) -+ { -+ /* There is no object only section if it isn't a bfd_object -+ file. */ -+error_return: -+ bfd_close (nbfd); -+ return; -+ } -+ } -+ else -+ { -+ if (!bfd_check_format (abfd, bfd_object)) -+ { -+ (*_bfd_error_handler) -+ (_("%B: invalid file to extract object only section: %s"), -+ abfd, bfd_errmsg (bfd_get_error ())); -+ return; -+ } -+ nbfd = abfd; -+ } -+ -+ if (nbfd->lto_type == lto_mixed_object -+ && (nbfd->flags & HAS_SYMS) != 0) -+ { -+ object_only_file = bfd_extract_object_only_section (nbfd); -+ if (object_only_file == NULL) -+ (*_bfd_error_handler) -+ (_("%B: failed to extract object only section: %s"), -+ abfd, bfd_errmsg (bfd_get_error ())); -+ } -+ else -+ object_only_file = NULL; -+ -+ /* Close the new bfd we just opened. */ -+ if (nbfd != abfd) -+ bfd_close (nbfd); -+ -+ /* Return if there is no object only section or there is no -+ symbol in object only section. */ -+ if (!object_only_file) -+ return; -+ -+ /* Open the file containing object only section. */ -+ nbfd = bfd_openr (object_only_file, NULL); -+ if (!bfd_check_format (nbfd, bfd_object)) -+ { -+ (*_bfd_error_handler) -+ (_("%B: failed to open object only section: %s"), -+ abfd, bfd_errmsg (bfd_get_error ())); -+ goto quit; -+ } -+ -+ storage = bfd_get_symtab_upper_bound (nbfd); -+ if (storage <= 0) -+ { -+ if (storage < 0) -+ (*_bfd_error_handler) -+ (_("%B: failed to get symbol table in object only section: %s"), -+ abfd, bfd_errmsg (bfd_get_error ())); -+ -+ goto quit; -+ } -+ -+ object_only_syms = (asymbol **) bfd_malloc (storage); -+ object_only_nsyms = bfd_canonicalize_symtab (nbfd, object_only_syms); -+ -+ /* FIXME: We waste some spaces if not all symbols are copied. */ -+ added_syms = (asymbol **) bfd_alloc (abfd, storage); -+ added_nsyms = 0; -+ -+ /* Copy only global symbols from object only section. */ -+ for (i = 0; i < object_only_nsyms; i++) -+ { -+ asection *sec = object_only_syms[i]->section; -+ flagword flags = object_only_syms[i]->flags; -+ asymbol *s; -+ -+ if (bfd_is_com_section (sec)) -+ sec = &bfd_plugin_fake_common_section; -+ else if (bfd_is_und_section (sec)) -+ ; -+ else if ((flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0) -+ sec = &bfd_plugin_fake_text_section; -+ else -+ continue; -+ -+ s = bfd_alloc (abfd, sizeof (asymbol)); -+ BFD_ASSERT (s); -+ added_syms[added_nsyms++] = s; -+ -+ s->section = sec; -+ s->the_bfd = abfd; -+ s->name = xstrdup (object_only_syms[i]->name); -+ s->value = 0; -+ s->flags = flags; -+ s->udata.p = NULL; -+ } -+ -+ plugin_data->object_only_syms = added_syms; -+ plugin_data->object_only_nsyms = added_nsyms; -+ -+ free (object_only_syms); -+ -+quit: -+ /* Close and remove the object only section file. */ -+ bfd_close (nbfd); -+ unlink (object_only_file); -+} -+ - static enum ld_plugin_status - add_symbols (void * handle, - int nsyms, -@@ -142,10 +282,13 @@ add_symbols (void * handle, - plugin_data->nsyms = nsyms; - plugin_data->syms = syms; - -- if (nsyms != 0) -+ abfd->tdata.plugin_data = plugin_data; -+ -+ bfd_plugin_get_symbols_in_object_only (abfd); -+ -+ if ((nsyms + plugin_data->object_only_nsyms) != 0) - abfd->flags |= HAS_SYMS; - -- abfd->tdata.plugin_data = plugin_data; - return LDPS_OK; - } - -@@ -440,7 +583,8 @@ static long - bfd_plugin_get_symtab_upper_bound (bfd *abfd) - { - struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data; -- long nsyms = plugin_data->nsyms; -+ /* Add symbols from object only section. */ -+ long nsyms = plugin_data->nsyms + plugin_data->object_only_nsyms; - - BFD_ASSERT (nsyms >= 0); - -@@ -474,12 +618,7 @@ bfd_plugin_canonicalize_symtab (bfd *abf - struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data; - long nsyms = plugin_data->nsyms; - const struct ld_plugin_symbol *syms = plugin_data->syms; -- static asection fake_section; -- static asection fake_common_section; -- int i; -- -- fake_section.name = ".text"; -- fake_common_section.flags = SEC_IS_COMMON; -+ int i, j; - - for (i = 0; i < nsyms; i++) - { -@@ -492,10 +631,11 @@ bfd_plugin_canonicalize_symtab (bfd *abf - s->name = syms[i].name; - s->value = 0; - s->flags = convert_flags (&syms[i]); -+ s->udata.p = NULL; - switch (syms[i].def) - { - case LDPK_COMMON: -- s->section = &fake_common_section; -+ s->section = &bfd_plugin_fake_common_section; - break; - case LDPK_UNDEF: - case LDPK_WEAKUNDEF: -@@ -503,15 +643,18 @@ bfd_plugin_canonicalize_symtab (bfd *abf - break; - case LDPK_DEF: - case LDPK_WEAKDEF: -- s->section = &fake_section; -+ s->section = &bfd_plugin_fake_text_section; - break; - default: - BFD_ASSERT (0); - } -- -- s->udata.p = (void *) &syms[i]; - } - -+ /* Copy symbols from object only section. */ -+ nsyms += plugin_data->object_only_nsyms; -+ for (j = 0; j < plugin_data->object_only_nsyms; j++, i++) -+ alocation[i] = plugin_data->object_only_syms[j]; -+ - return nsyms; - } - -diff -rup binutils-2.26.orig/bfd/plugin.h binutils-2.26/bfd/plugin.h ---- binutils-2.26.orig/bfd/plugin.h 2016-02-19 09:35:36.271000852 +0000 -+++ binutils-2.26/bfd/plugin.h 2016-02-19 09:35:54.906106526 +0000 -@@ -33,6 +33,8 @@ typedef struct plugin_data_struct - { - int nsyms; - const struct ld_plugin_symbol *syms; -+ int object_only_nsyms; -+ asymbol **object_only_syms; - } - plugin_data_struct; - -diff -rup binutils-2.26.orig/bfd/section.c binutils-2.26/bfd/section.c ---- binutils-2.26.orig/bfd/section.c 2016-02-19 09:35:36.276000881 +0000 -+++ binutils-2.26/bfd/section.c 2016-02-19 09:35:54.906106526 +0000 -@@ -588,6 +588,9 @@ CODE_FRAGMENT - .#define BFD_COM_SECTION_NAME "*COM*" - .#define BFD_IND_SECTION_NAME "*IND*" - . -+.{* GNU object-only section name. *} -+.#define GNU_OBJECT_ONLY_SECTION_NAME ".gnu_object_only" -+. - .{* Pointer to the common section. *} - .#define bfd_com_section_ptr (&_bfd_std_section[0]) - .{* Pointer to the undefined section. *} -diff -rup binutils-2.26.orig/binutils/readelf.c binutils-2.26/binutils/readelf.c ---- binutils-2.26.orig/binutils/readelf.c 2016-02-19 09:35:36.295000988 +0000 -+++ binutils-2.26/binutils/readelf.c 2016-02-19 09:35:54.911106554 +0000 -@@ -3900,6 +3900,7 @@ get_section_type_name (unsigned int sh_t - case 0x7ffffffd: return "AUXILIARY"; - case 0x7fffffff: return "FILTER"; - case SHT_GNU_LIBLIST: return "GNU_LIBLIST"; -+ case SHT_GNU_OBJECT_ONLY: return "GNU_OBJECT_ONLY"; - - default: - if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC)) -diff -rup binutils-2.26.orig/gas/testsuite/gas/elf/section9.d binutils-2.26/gas/testsuite/gas/elf/section9.d ---- binutils-2.26.orig/gas/testsuite/gas/elf/section9.d 2016-02-19 09:35:36.397001567 +0000 -+++ binutils-2.26/gas/testsuite/gas/elf/section9.d 2016-02-19 09:35:54.912106560 +0000 -@@ -4,4 +4,5 @@ - #... - [ ]*[.*][ ]+.gnu.lto_main[ ]+PROGBITS.*[ ]+E[ ]+.* - [ ]*[.*][ ]+.gnu.lto_.pureconst[ ]+PROGBITS.*[ ]+E[ ]+.* -+[ ]*[.*][ ]+.gnu_object_only[ ]+GNU_OBJECT_ONLY.*[ ]+E[ ]+.* - #pass -diff -rup binutils-2.26.orig/gas/testsuite/gas/elf/section9.s binutils-2.26/gas/testsuite/gas/elf/section9.s ---- binutils-2.26.orig/gas/testsuite/gas/elf/section9.s 2016-02-19 09:35:36.397001567 +0000 -+++ binutils-2.26/gas/testsuite/gas/elf/section9.s 2016-02-19 09:35:54.912106560 +0000 -@@ -2,3 +2,5 @@ - .byte 0,0,0,0 - .section .gnu.lto_.pureconst,"",%progbits - .byte 0,0,0,0 -+ .section .gnu_object_only -+ .byte 0,0,0,0 -diff -rup binutils-2.26.orig/include/bfdlink.h binutils-2.26/include/bfdlink.h ---- binutils-2.26.orig/include/bfdlink.h 2016-02-19 09:35:36.672003126 +0000 -+++ binutils-2.26/include/bfdlink.h 2016-02-19 09:35:54.913106566 +0000 -@@ -400,6 +400,12 @@ struct bfd_link_info - /* TRUE if ok to have multiple definition. */ - unsigned int allow_multiple_definition: 1; - -+ /* TRUE if .gnu_object_only section should be created. */ -+ unsigned int emit_gnu_object_only: 1; -+ -+ /* TRUE if .gnu_object_only section is being created. */ -+ unsigned int emitting_gnu_object_only: 1; -+ - /* TRUE if ok to have version with no definition. */ - unsigned int allow_undefined_version: 1; - -diff -rup binutils-2.26.orig/include/elf/common.h binutils-2.26/include/elf/common.h ---- binutils-2.26.orig/include/elf/common.h 2016-02-19 09:35:36.675003143 +0000 -+++ binutils-2.26/include/elf/common.h 2016-02-19 09:35:54.913106566 +0000 -@@ -478,6 +478,7 @@ - #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */ - #define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */ - #define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */ -+#define SHT_GNU_OBJECT_ONLY 0x6ffffff8 /* Object only */ - - /* The next three section types are defined by Solaris, and are named - SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU* -diff -rup binutils-2.26.orig/ld/emultempl/aarch64elf.em binutils-2.26/ld/emultempl/aarch64elf.em ---- binutils-2.26.orig/ld/emultempl/aarch64elf.em 2016-02-19 09:35:36.698003274 +0000 -+++ binutils-2.26/ld/emultempl/aarch64elf.em 2016-02-19 09:35:54.914106571 +0000 -@@ -271,7 +271,7 @@ gld${EMULATION_NAME}_after_allocation (v - } - - static void --gld${EMULATION_NAME}_finish (void) -+aarch64_finish (void) - { - if (!bfd_link_relocatable (&link_info)) - { -@@ -283,7 +283,7 @@ gld${EMULATION_NAME}_finish (void) - } - } - -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - } - - /* This is a convenient point to tell BFD about target specific flags. -@@ -435,4 +435,4 @@ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS= - LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse - - # Call the extra arm-elf function --LDEMUL_FINISH=gld${EMULATION_NAME}_finish -+LDEMUL_FINISH=aarch64_finish -diff -rup binutils-2.26.orig/ld/emultempl/alphaelf.em binutils-2.26/ld/emultempl/alphaelf.em ---- binutils-2.26.orig/ld/emultempl/alphaelf.em 2016-02-19 09:35:36.698003274 +0000 -+++ binutils-2.26/ld/emultempl/alphaelf.em 2016-02-19 09:35:54.914106571 +0000 -@@ -104,7 +104,7 @@ alpha_finish (void) - if (limit_32bit) - elf_elfheader (link_info.output_bfd)->e_flags |= EF_ALPHA_32BIT; - -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - } - EOF - -diff -rup binutils-2.26.orig/ld/emultempl/avrelf.em binutils-2.26/ld/emultempl/avrelf.em ---- binutils-2.26.orig/ld/emultempl/avrelf.em 2016-02-19 09:35:36.698003274 +0000 -+++ binutils-2.26/ld/emultempl/avrelf.em 2016-02-19 09:35:54.915106577 +0000 -@@ -209,7 +209,7 @@ avr_finish (void) - elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED; - } - -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - } - EOF - -diff -rup binutils-2.26.orig/ld/emultempl/elf32.em binutils-2.26/ld/emultempl/elf32.em ---- binutils-2.26.orig/ld/emultempl/elf32.em 2016-02-19 09:35:36.700003285 +0000 -+++ binutils-2.26/ld/emultempl/elf32.em 2016-02-19 09:35:54.915106577 +0000 -@@ -66,6 +66,7 @@ static void gld${EMULATION_NAME}_before_ - static void gld${EMULATION_NAME}_after_allocation (void); - static lang_output_section_statement_type *gld${EMULATION_NAME}_place_orphan - (asection *, const char *, int); -+static void gld${EMULATION_NAME}_finish (void); - EOF - - if [ "x${USE_LIBPATH}" = xyes ] ; then -@@ -1795,6 +1796,8 @@ output_rel_find (asection *sec, int isdy - in->owner, in); - } - -+static int orphan_init_done = 0; -+ - /* Place an orphan section. We use this to put random SHF_ALLOC - sections in the right segment. */ - -@@ -1803,7 +1806,7 @@ gld${EMULATION_NAME}_place_orphan (asect - const char *secname, - int constraint) - { -- static struct orphan_save hold[] = -+ static struct orphan_save orig_hold[] = - { - { ".text", - SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE, -@@ -1833,6 +1836,7 @@ gld${EMULATION_NAME}_place_orphan (asect - SEC_HAS_CONTENTS, - 0, 0, 0, 0 }, - }; -+ static struct orphan_save hold[ARRAY_SIZE (orig_hold)]; - enum orphan_save_index - { - orphan_text = 0, -@@ -1845,7 +1849,6 @@ gld${EMULATION_NAME}_place_orphan (asect - orphan_sdata, - orphan_nonalloc - }; -- static int orphan_init_done = 0; - struct orphan_save *place; - lang_output_section_statement_type *after; - lang_output_section_statement_type *os; -@@ -1924,15 +1927,22 @@ gld${EMULATION_NAME}_place_orphan (asect - - if (!orphan_init_done) - { -- struct orphan_save *ho; -+ struct orphan_save *ho, *horig; - - for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho) -+ for (ho = hold, horig = orig_hold; -+ ho < hold + ARRAY_SIZE (hold); -+ ++ho, ++horig) -+ { -+ *ho = *horig; -+ if (ho->name != NULL) - if (ho->name != NULL) - { - ho->os = lang_output_section_find (ho->name); - if (ho->os != NULL && ho->os->flags == 0) - ho->os->flags = ho->flags; - } -+ } - orphan_init_done = 1; - } - -@@ -2017,6 +2027,27 @@ gld${EMULATION_NAME}_place_orphan (asect - EOF - fi - -+fragment <<EOF -+ -+/* Final emulation specific call. */ -+ -+static void -+gld${EMULATION_NAME}_finish (void) -+{ -+EOF -+if test x"$LDEMUL_PLACE_ORPHAN" != xgld"$EMULATION_NAME"_place_orphan; then -+fragment <<EOF -+ /* Support the object-only output. */ -+ if (link_info.emit_gnu_object_only) -+ orphan_init_done = 0; -+ -+EOF -+fi -+fragment <<EOF -+ finish_default (); -+} -+EOF -+ - if test x"$LDEMUL_AFTER_ALLOCATION" != xgld"$EMULATION_NAME"_after_allocation; then - fragment <<EOF - -@@ -2503,7 +2534,7 @@ struct ld_emulation_xfer_struct ld_${EMU - ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script}, - "${EMULATION_NAME}", - "${OUTPUT_FORMAT}", -- ${LDEMUL_FINISH-finish_default}, -+ ${LDEMUL_FINISH-gld${EMULATION_NAME}_finish}, - ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL}, - ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-gld${EMULATION_NAME}_open_dynamic_archive}, - ${LDEMUL_PLACE_ORPHAN-gld${EMULATION_NAME}_place_orphan}, -diff -rup binutils-2.26.orig/ld/emultempl/ppc32elf.em binutils-2.26/ld/emultempl/ppc32elf.em ---- binutils-2.26.orig/ld/emultempl/ppc32elf.em 2016-02-19 09:35:36.699003279 +0000 -+++ binutils-2.26/ld/emultempl/ppc32elf.em 2016-02-19 09:35:54.916106583 +0000 -@@ -215,7 +215,7 @@ ppc_finish (void) - { - if (params.ppc476_workaround) - lang_for_each_statement (no_zero_padding); -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - } - - EOF -diff -rup binutils-2.26.orig/ld/emultempl/spuelf.em binutils-2.26/ld/emultempl/spuelf.em ---- binutils-2.26.orig/ld/emultempl/spuelf.em 2016-02-19 09:35:36.699003279 +0000 -+++ binutils-2.26/ld/emultempl/spuelf.em 2016-02-19 09:35:54.916106583 +0000 -@@ -416,7 +416,7 @@ spu_elf_relink (void) - /* Final emulation specific call. */ - - static void --gld${EMULATION_NAME}_finish (void) -+spu_finish (void) - { - if (is_spu_target ()) - { -@@ -432,7 +432,7 @@ gld${EMULATION_NAME}_finish (void) - einfo ("%P: --auto-overlay ignored with zero local store range\n"); - } - -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - } - - static char * -@@ -832,5 +832,5 @@ PARSE_AND_LIST_ARGS_CASES=' - - LDEMUL_AFTER_OPEN=spu_after_open - LDEMUL_BEFORE_ALLOCATION=spu_before_allocation --LDEMUL_FINISH=gld${EMULATION_NAME}_finish -+LDEMUL_FINISH=spu_finish - LDEMUL_CHOOSE_TARGET=gld${EMULATION_NAME}_choose_target -diff -rup binutils-2.26.orig/ld/ldexp.c binutils-2.26/ld/ldexp.c ---- binutils-2.26.orig/ld/ldexp.c 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldexp.c 2016-02-19 09:35:54.917106588 +0000 -@@ -1616,14 +1616,15 @@ align_n (bfd_vma value, bfd_vma align) - } - - void --ldexp_init (void) -+ldexp_init (bfd_boolean object_only) - { - /* The value "13" is ad-hoc, somewhat related to the expected number of - assignments in a linker script. */ -- if (!bfd_hash_table_init_n (&definedness_table, -- definedness_newfunc, -- sizeof (struct definedness_hash_entry), -- 13)) -+ if (!object_only -+ && !bfd_hash_table_init_n (&definedness_table, -+ definedness_newfunc, -+ sizeof (struct definedness_hash_entry), -+ 13)) - einfo (_("%P%F: can not create hash table: %E\n")); - } - -@@ -1658,7 +1659,8 @@ ldexp_finalize_syms (void) - } - - void --ldexp_finish (void) -+ldexp_finish (bfd_boolean object_only) - { -- bfd_hash_table_free (&definedness_table); -+ if (!object_only) -+ bfd_hash_table_free (&definedness_table); - } -diff -rup binutils-2.26.orig/ld/ldexp.h binutils-2.26/ld/ldexp.h ---- binutils-2.26.orig/ld/ldexp.h 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldexp.h 2016-02-19 09:35:54.917106588 +0000 -@@ -229,8 +229,8 @@ fill_type *exp_get_fill - (etree_type *, fill_type *, char *); - bfd_vma exp_get_abs_int - (etree_type *, int, char *); --void ldexp_init (void); -+void ldexp_init (bfd_boolean); - void ldexp_finalize_syms (void); --void ldexp_finish (void); -+void ldexp_finish (bfd_boolean); - - #endif -diff -rup binutils-2.26.orig/ld/ldfile.c binutils-2.26/ld/ldfile.c ---- binutils-2.26.orig/ld/ldfile.c 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldfile.c 2016-02-19 09:35:54.918106594 +0000 -@@ -313,7 +313,9 @@ success: - && !no_more_claiming - && bfd_check_format (entry->the_bfd, bfd_object)) - plugin_maybe_claim (entry); -+ else - #endif /* ENABLE_PLUGINS */ -+ cmdline_check_object_only_section (entry->the_bfd, FALSE); - - /* It opened OK, the format checked out, and the plugins have had - their chance to claim it, so this is success. */ -diff -rup binutils-2.26.orig/ld/ldlang.c binutils-2.26/ld/ldlang.c ---- binutils-2.26.orig/ld/ldlang.c 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldlang.c 2016-02-19 09:35:54.921106611 +0000 -@@ -36,6 +36,7 @@ - #include "ldctor.h" - #include "ldfile.h" - #include "ldemul.h" -+#include "ldwrite.h" - #include "fnmatch.h" - #include "demangle.h" - #include "hashtab.h" -@@ -45,6 +46,9 @@ - #include "plugin.h" - #endif /* ENABLE_PLUGINS */ - -+/* FIXME: Put it here to avoid NAME conflict from ldgram.h. */ -+#include "elf-bfd.h" -+ - #ifndef offsetof - #define offsetof(TYPE, MEMBER) ((size_t) & (((TYPE*) 0)->MEMBER)) - #endif -@@ -86,6 +93,13 @@ static void lang_do_version_exports_sect - static void lang_finalize_version_expr_head - (struct bfd_elf_version_expr_head *); - static void lang_do_memory_regions (void); -+static void cmdline_lists_init (void); -+static void cmdline_get_object_only_input_files (void); -+static void print_cmdline_list (cmdline_union_type *); -+static bfd_boolean cmdline_on_object_only_archive_list_p (bfd *); -+static cmdline_list_type cmdline_object_only_file_list; -+static cmdline_list_type cmdline_object_only_archive_list; -+static cmdline_list_type cmdline_temp_object_only_list; - - /* Exported variables. */ - const char *output_target; -@@ -1219,14 +1230,17 @@ output_section_statement_table_free (voi - /* Build enough state so that the parser can build its tree. */ - - void --lang_init (void) -+lang_init (bfd_boolean object_only) - { -- obstack_begin (&stat_obstack, 1000); -+ if (!object_only) -+ obstack_begin (&stat_obstack, 1000); - - stat_ptr = &statement_list; - - output_section_statement_table_init (); - -+ cmdline_lists_init (); -+ - lang_list_init (stat_ptr); - - lang_list_init (&input_file_chain); -@@ -2843,6 +2857,12 @@ load_symbols (lang_input_statement_type - loaded = FALSE; - } - -+ if (link_info.emitting_gnu_object_only) -+ { -+ if (!cmdline_on_object_only_archive_list_p (member)) -+ continue; -+ } -+ - subsbfd = member; - if (!(*link_info.callbacks - ->add_archive_element) (&link_info, member, -@@ -6780,10 +6800,41 @@ lang_process (void) - open_input_bfds (statement_list.head, OPEN_BFD_RESCAN); - } - } -+ else - #endif /* ENABLE_PLUGINS */ -+ if (bfd_link_relocatable (&link_info)) -+ { -+ /* Check if .gnu_object_only section should be created. */ -+ bfd *p; -+ int object_type; -+ -+ object_type = 0; -+ for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link.next) -+ { -+ object_type |= 1 << p->lto_type; -+ if ((object_type & (1 << lto_mixed_object)) != 0 -+ || ((object_type -+ & (1 << lto_non_ir_object -+ | 1 << lto_ir_object)) -+ == (1 << lto_non_ir_object | 1 << lto_ir_object))) -+ { -+ link_info.emit_gnu_object_only = TRUE; -+ break; -+ } -+ } -+ -+ if (verbose -+ && (cmdline_object_only_file_list.head -+ || cmdline_object_only_archive_list.head)) -+ { -+ info_msg (_("Object-only input files:\n ")); -+ print_cmdline_list (cmdline_object_only_file_list.head); -+ print_cmdline_list (cmdline_object_only_archive_list.head); -+ } -+ } - - /* Make sure that nobody has tried to add a symbol to this list - before now. */ - ASSERT (link_info.gc_sym_list == NULL); - - link_info.gc_sym_list = &entry_symbol; -@@ -8275,3 +8326,968 @@ lang_print_memory_usage (void) - printf (" %6.2f%%\n", percent); - } - } -+ -+static void -+cmdline_lists_init (void) -+{ -+ cmdline_object_only_file_list.tail -+ = &cmdline_object_only_file_list.head; -+ cmdline_object_only_archive_list.tail -+ = &cmdline_object_only_archive_list.head; -+ cmdline_temp_object_only_list.tail -+ = &cmdline_temp_object_only_list.head; -+} -+ -+/* Allocate an item with TYPE and DATA. */ -+ -+static cmdline_union_type * -+cmdline_list_new (cmdline_enum_type type, void *data) -+{ -+ cmdline_union_type *new_opt; -+ -+ new_opt = (cmdline_union_type *) stat_alloc (sizeof (*new_opt)); -+ new_opt->header.type = type; -+ switch (type) -+ { -+ default: -+ break; -+ case cmdline_is_file_enum: -+ new_opt->file.filename = (const char *) data; -+ break; -+ case cmdline_is_bfd_enum: -+ new_opt->abfd.abfd = (bfd *) data; -+ break; -+ } -+ return new_opt; -+} -+ -+/* Append an item with TYPE and DATA to LIST. */ -+ -+static void -+cmdline_list_append (cmdline_list_type *list, cmdline_enum_type type, -+ void *data) -+{ -+ cmdline_union_type *new_opt = cmdline_list_new (type, data); -+ new_opt->header.next = NULL; -+ *list->tail = new_opt; -+ list->tail = &new_opt->header.next; -+} -+ -+static void -+print_cmdline_list (cmdline_union_type *c) -+{ -+ for (; c != NULL; c = c->header.next) -+ switch (c->header.type) -+ { -+ default: -+ abort (); -+ case cmdline_is_file_enum: -+ info_msg (" %s", c->file.filename); -+ break; -+ case cmdline_is_bfd_enum: -+ info_msg (" [%B]", c->abfd.abfd); -+ break; -+ } -+ -+ info_msg ("\n"); -+} -+ -+/* Return TRUE if ABFD is on cmdline_object_only_archive_list. */ -+ -+static bfd_boolean -+cmdline_on_object_only_archive_list_p (bfd *abfd) -+{ -+ cmdline_union_type *c, *next; -+ bfd *archive, *obfd, *oarchive; -+ ufile_ptr origin = abfd->origin; -+ -+ archive = abfd->my_archive; -+ for (c = cmdline_object_only_archive_list.head; c != NULL; c = next) -+ { -+ if (c->header.type != cmdline_is_bfd_enum) -+ abort (); -+ -+ next = c->header.next; -+ obfd = c->abfd.abfd; -+ oarchive = obfd->my_archive; -+ -+ /* The list is grouped by archive file name and sorted by member -+ origin. */ -+ if (strcmp (archive->filename, oarchive->filename) != 0) -+ continue; -+ -+ if (origin == obfd->origin) -+ return TRUE; -+ else if (origin < obfd->origin) -+ return FALSE; -+ } -+ -+ return FALSE; -+} -+ -+/* Append an item with TYPE and DATA to cmdline_object_only_file_list -+ or cmdline_object_only_archive_list if needed. */ -+ -+static void -+cmdline_object_only_list_append (cmdline_enum_type type, void *data) -+{ -+ cmdline_union_type *c; -+ cmdline_union_type *new_opt, *next, **prev; -+ bfd *abfd, *archive; -+ bfd *obfd, *oarchive; -+ bfd *nbfd, *narchive; -+ ufile_ptr origin, norigin; -+ -+ /* Put it on cmdline_object_only_file_list if it isn't an archive -+ member. */ -+ switch (type) -+ { -+ default: -+ abort (); -+ case cmdline_is_bfd_enum: -+ abfd = (bfd *) data; -+ archive = abfd->my_archive; -+ if (archive) -+ break; -+ case cmdline_is_file_enum: -+ cmdline_list_append (&cmdline_object_only_file_list, type, data); -+ return; -+ } -+ -+ /* Put archive member on cmdline_object_only_archive_list and sort -+ the list by archive name and archive member origin. */ -+ new_opt = (cmdline_union_type *) stat_alloc (sizeof (*new_opt)); -+ new_opt->header.type = cmdline_is_bfd_enum; -+ new_opt->header.next = NULL; -+ new_opt->abfd.abfd = (bfd *) data; -+ -+ c = cmdline_object_only_archive_list.head; -+ if (c == NULL) -+ { -+ cmdline_object_only_archive_list.head = new_opt; -+ cmdline_object_only_archive_list.tail = &new_opt->header.next; -+ return; -+ } -+ -+ prev = NULL; -+ origin = abfd->origin; -+ for (; c != NULL; c = next) -+ { -+ if (c->header.type != cmdline_is_bfd_enum) -+ abort (); -+ -+ next = c->header.next; -+ -+ obfd = c->abfd.abfd; -+ oarchive = abfd->my_archive; -+ -+ if (strcmp (archive->filename, oarchive->filename) == 0) -+ { -+ bfd_boolean after; -+ -+ if (origin < obfd->origin) -+ { -+ /* Insert it before the current. */ -+ new_opt->header.next = c; -+ if (prev) -+ *prev = new_opt; -+ else -+ cmdline_object_only_archive_list.head = new_opt; -+ return; -+ } -+ -+ after = TRUE; -+ -+ /* Check origin. */ -+ while (next) -+ { -+ if (next->header.type != cmdline_is_bfd_enum) -+ abort (); -+ -+ nbfd = next->abfd.abfd; -+ norigin = nbfd->origin; -+ if (origin > norigin) -+ { -+ /* Insert it after NEXT. */ -+ break; -+ } -+ -+ narchive = nbfd->my_archive; -+ if (strcmp (archive->filename, narchive->filename) != 0) -+ { -+ /* Insert it befor NEXT. */ -+ after = FALSE; -+ break; -+ } -+ -+ c = next; -+ next = next->header.next; -+ } -+ -+ if (after && next) -+ { -+ c = next; -+ next = next->header.next; -+ } -+ -+ if (*cmdline_object_only_archive_list.tail == c->header.next) -+ cmdline_object_only_archive_list.tail -+ = &new_opt->header.next; -+ -+ prev = &c->header.next; -+ new_opt->header.next = next; -+ *prev = new_opt; -+ return; -+ } -+ -+ prev = &c->header.next; -+ } -+ -+ *cmdline_object_only_archive_list.tail = new_opt; -+ cmdline_object_only_archive_list.tail = &new_opt->header.next; -+} -+ -+/* Get object-only input files. */ -+ -+static void -+cmdline_get_object_only_input_files (void) -+{ -+ cmdline_union_type *c, *next; -+ bfd *abfd, *archive; -+ bfd *nbfd, *narchive; -+ -+ /* Add files first. */ -+ for (c = cmdline_object_only_file_list.head; -+ c != NULL; c = c->header.next) -+ switch (c->header.type) -+ { -+ default: -+ abort (); -+ case cmdline_is_file_enum: -+ lang_add_input_file (c->file.filename, -+ lang_input_file_is_file_enum, NULL); -+ break; -+ case cmdline_is_bfd_enum: -+ abfd = c->abfd.abfd; -+ if (abfd->my_archive) -+ abort (); -+ lang_add_input_file (abfd->filename, -+ lang_input_file_is_file_enum, NULL); -+ break; -+ } -+ -+ /* Add archive members next. */ -+ for (c = cmdline_object_only_archive_list.head; c != NULL; c = next) -+ { -+ if (c->header.type != cmdline_is_bfd_enum) -+ abort (); -+ -+ next = c->header.next; -+ -+ abfd = c->abfd.abfd; -+ archive = abfd->my_archive; -+ -+ /* Add the first archive of the archive member group. */ -+ lang_add_input_file (archive->filename, -+ lang_input_file_is_file_enum, NULL); -+ -+ /* Skip the rest members in the archive member group. */ -+ do -+ { -+ if (!next) -+ break; -+ -+ if (next->header.type != cmdline_is_bfd_enum) -+ abort (); -+ -+ next = next->header.next; -+ if (!next) -+ break; -+ nbfd = next->abfd.abfd; -+ narchive = nbfd->my_archive; -+ } -+ while (strcmp (archive->filename, narchive->filename) == 0); -+ } -+} -+ -+struct cmdline_arg -+{ -+ bfd *obfd; -+ asymbol **isympp; -+ int status; -+}; -+ -+/* Create a section in OBFD with the same -+ name and attributes as ISECTION in IBFD. */ -+ -+static void -+setup_section (bfd *ibfd, sec_ptr isection, void *p) -+{ -+ struct cmdline_arg *arg = (struct cmdline_arg *) p; -+ bfd *obfd = arg->obfd; -+ asymbol **isympp = arg->isympp; -+ const char *name = isection->name; -+ sec_ptr osection; -+ const char *err; -+ -+ /* Skip the object-only section. */ -+ if (ibfd->object_only_section == isection) -+ return; -+ -+ /* If we have already failed earlier on, do not keep on generating -+ complaints now. */ -+ if (arg->status) -+ return; -+ -+ osection = bfd_make_section_anyway_with_flags (obfd, name, -+ isection->flags); -+ -+ if (osection == NULL) -+ { -+ err = _("failed to create output section"); -+ goto loser; -+ } -+ -+ osection->size = isection->size; -+ osection->vma = isection->vma; -+ osection->lma = isection->lma; -+ osection->alignment_power = isection->alignment_power; -+ -+ /* Copy merge entity size. */ -+ osection->entsize = isection->entsize; -+ -+ /* This used to be mangle_section; we do here to avoid using -+ bfd_get_section_by_name since some formats allow multiple -+ sections with the same name. */ -+ isection->output_section = osection; -+ isection->output_offset = 0; -+ -+ if ((isection->flags & SEC_GROUP) != 0) -+ { -+ asymbol *gsym = bfd_group_signature (isection, isympp); -+ -+ if (gsym != NULL) -+ { -+ gsym->flags |= BSF_KEEP; -+ if (ibfd->xvec->flavour == bfd_target_elf_flavour) -+ elf_group_id (isection) = gsym; -+ } -+ } -+ -+ /* Allow the BFD backend to copy any private data it understands -+ from the input section to the output section. */ -+ if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection)) -+ { -+ err = _("failed to copy private data"); -+ goto loser; -+ } -+ -+ /* All went well. */ -+ return; -+ -+loser: -+ arg->status = 1; -+ einfo (_("%P%F: setup_section: %s: %s\n"), err, name); -+} -+ -+/* Copy the data of input section ISECTION of IBFD -+ to an output section with the same name in OBFD. -+ If stripping then don't copy any relocation info. */ -+ -+static void -+copy_section (bfd *ibfd, sec_ptr isection, void *p) -+{ -+ struct cmdline_arg *arg = (struct cmdline_arg *) p; -+ bfd *obfd = arg->obfd; -+ asymbol **isympp = arg->isympp; -+ arelent **relpp; -+ long relcount; -+ sec_ptr osection; -+ bfd_size_type size; -+ long relsize; -+ flagword flags; -+ const char *err; -+ -+ /* Skip the object-only section. */ -+ if (ibfd->object_only_section == isection) -+ return; -+ -+ /* If we have already failed earlier on, do not keep on generating -+ complaints now. */ -+ if (arg->status) -+ return; -+ -+ flags = bfd_get_section_flags (ibfd, isection); -+ if ((flags & SEC_GROUP) != 0) -+ return; -+ -+ osection = isection->output_section; -+ size = bfd_get_section_size (isection); -+ -+ if (size == 0 || osection == 0) -+ return; -+ -+ relsize = bfd_get_reloc_upper_bound (ibfd, isection); -+ -+ if (relsize < 0) -+ { -+ /* Do not complain if the target does not support relocations. */ -+ if (relsize == -1 -+ && bfd_get_error () == bfd_error_invalid_operation) -+ relsize = 0; -+ else -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ } -+ -+ if (relsize == 0) -+ bfd_set_reloc (obfd, osection, NULL, 0); -+ else -+ { -+ relpp = (arelent **) xmalloc (relsize); -+ relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, isympp); -+ if (relcount < 0) -+ { -+ err = _("relocation count is negative"); -+ goto loser; -+ } -+ -+ bfd_set_reloc (obfd, osection, -+ relcount == 0 ? NULL : relpp, relcount); -+ if (relcount == 0) -+ free (relpp); -+ } -+ -+ if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS) -+ { -+ bfd_byte *memhunk = NULL; -+ -+ if (!bfd_get_full_section_contents (ibfd, isection, &memhunk)) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ if (!bfd_set_section_contents (obfd, osection, memhunk, 0, size)) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ free (memhunk); -+ } -+ -+ /* All went well. */ -+ return; -+ -+loser: -+ einfo (_("%P%F: copy_section: %s: %s\n"), err, isection->name); -+} -+/* Open the temporary bfd created in the same directory as PATH. */ -+ -+static bfd * -+cmdline_fopen_temp (const char *path, const char *target, -+ const char *mode) -+{ -+#define template "ldXXXXXX" -+ const char *slash = strrchr (path, '/'); -+ char *tmpname; -+ size_t len; -+ int fd; -+ -+#ifdef HAVE_DOS_BASED_FILE_SYSTEM -+ { -+ /* We could have foo/bar\baz, or foo\bar, or d:bar. */ -+ char *bslash = strrchr (path, '\'); -+ -+ if (slash == NULL || (bslash != NULL && bslash > slash)) -+ slash = bslash; -+ if (slash == NULL && path[0] != '\0' && path[1] == ':') -+ slash = path + 1; -+ } -+#endif -+ -+ if (slash != (char *) NULL) -+ { -+ len = slash - path; -+ tmpname = (char *) xmalloc (len + sizeof (template) + 2); -+ memcpy (tmpname, path, len); -+ -+#ifdef HAVE_DOS_BASED_FILE_SYSTEM -+ /* If tmpname is "X:", appending a slash will make it a root -+ directory on drive X, which is NOT the same as the current -+ directory on drive X. */ -+ if (len == 2 && tmpname[1] == ':') -+ tmpname[len++] = '.'; -+#endif -+ tmpname[len++] = '/'; -+ } -+ else -+ { -+ tmpname = (char *) xmalloc (sizeof (template)); -+ len = 0; -+ } -+ -+ memcpy (tmpname + len, template, sizeof (template)); -+#undef template -+ -+#ifdef HAVE_MKSTEMP -+ fd = mkstemp (tmpname); -+#else -+ tmpname = mktemp (tmpname); -+ if (tmpname == NULL) -+ return NULL; -+ fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600); -+#endif -+ if (fd == -1) -+ return NULL; -+ return bfd_fopen (tmpname, target, mode, fd); -+} -+ -+/* Add the object-only section. */ -+ -+static void -+cmdline_add_object_only_section (bfd_byte *contents, size_t size) -+{ -+ bfd_vma start; -+ flagword flags; -+ enum bfd_architecture iarch; -+ unsigned int imach; -+ long symcount; -+ long symsize; -+ asymbol **isympp = NULL; -+ asymbol **osympp = NULL; -+ bfd *obfd = NULL, *ibfd; -+ const char *err; -+ struct arg -+ { -+ bfd *obfd; -+ asymbol **isympp; -+ int status; -+ } arg; -+ char **matching; -+ char *ofilename = NULL; -+ asection *sec; -+ -+ ibfd = bfd_openr (output_filename, output_target); -+ if (!ibfd) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ if (!bfd_check_format_matches (ibfd, bfd_object, &matching)) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ obfd = cmdline_fopen_temp (output_filename, output_target, "w"); -+ if (!obfd) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ /* To be used after bfd_close (). */ -+ ofilename = xstrdup (bfd_get_filename (obfd)); -+ -+ if (!bfd_set_format (obfd, bfd_object)) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ /* Copy the start address, flags and architecture of input file to -+ output file. */ -+ flags = bfd_get_file_flags (ibfd); -+ start = bfd_get_start_address (ibfd); -+ iarch = bfd_get_arch (ibfd); -+ imach = bfd_get_mach (ibfd); -+ if (!bfd_set_start_address (obfd, start) -+ || !bfd_set_file_flags (obfd, flags) -+ || !bfd_set_arch_mach (obfd, iarch, imach)) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ symsize = bfd_get_symtab_upper_bound (ibfd); -+ if (symsize < 0) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ isympp = (asymbol **) xmalloc (symsize); -+ symcount = bfd_canonicalize_symtab (ibfd, isympp); -+ if (symcount < 0) -+ { -+ err = bfd_errmsg (bfd_get_error ()); -+ goto loser; -+ } -+ -+ arg.obfd = obfd; -+ arg.isympp = isympp; -+ arg.status = 0; -+ -+ /* BFD mandates that all output sections be created and sizes set before -+ any output is done. Thus, we traverse all sections multiple times. */ -+ bfd_map_over_sections (ibfd, setup_section, &arg); -+ -+ if (arg.status) -+ { -+ err = _("error setting up sections"); -+ goto loser; -+ } -+ -+ /* Allow the BFD backend to copy any private data it understands -+ from the input section to the output section. */ -+ if (! bfd_copy_private_header_data (ibfd, obfd)) -+ { -+ err = _("error copying private header data"); -+ goto loser; -+ } -+ -+ /* Create the object-only section. */ -+ sec = bfd_make_section_with_flags (obfd, -+ GNU_OBJECT_ONLY_SECTION_NAME, -+ (SEC_HAS_CONTENTS -+ | SEC_READONLY -+ | SEC_DATA -+ | SEC_LINKER_CREATED)); -+ if (sec == NULL) -+ { -+ err = _("can't create object-only section"); -+ goto loser; -+ } -+ -+ if (! bfd_set_section_size (obfd, sec, size)) -+ { -+ err = _("can't set object-only section size"); -+ goto loser; -+ } -+ -+ if (ibfd->object_only_section) -+ { -+ /* Filter out the object-only section symbol. */ -+ long src_count = 0, dst_count = 0; -+ asymbol **from, **to; -+ -+ osympp = (asymbol **) xmalloc (symcount * sizeof (asymbol *)); -+ from = isympp; -+ to = osympp; -+ for (; src_count < symcount; src_count++) -+ { -+ asymbol *sym = from[src_count]; -+ if (bfd_get_section (sym) != ibfd->object_only_section) -+ to[dst_count++] = sym; -+ } -+ to[dst_count] = NULL; -+ symcount = dst_count; -+ bfd_set_symtab (obfd, osympp, symcount); -+ } -+ else -+ bfd_set_symtab (obfd, isympp, symcount); -+ -+ /* This has to happen after the symbol table has been set. */ -+ bfd_map_over_sections (ibfd, copy_section, &arg); -+ -+ if (arg.status) -+ { -+ err = _("error copying sections"); -+ goto loser; -+ } -+ -+ /* Copy the object-only section to the output. */ -+ if (! bfd_set_section_contents (obfd, sec, contents, 0, size)) -+ { -+ err = _("error adding object-only section"); -+ goto loser; -+ } -+ -+ /* Allow the BFD backend to copy any private data it understands -+ from the input BFD to the output BFD. This is done last to -+ permit the routine to look at the filtered symbol table, which is -+ important for the ECOFF code at least. */ -+ if (! bfd_copy_private_bfd_data (ibfd, obfd)) -+ { -+ err = _("error copying private BFD data"); -+ goto loser; -+ } -+ -+ if (!bfd_close (obfd)) -+ { -+ unlink (ofilename); -+ einfo (_("%P%F: failed to finish output with object-only section\n")); -+ } -+ -+ /* Must be freed after bfd_close (). */ -+ free (isympp); -+ if (osympp) -+ free (osympp); -+ -+ if (rename (ofilename, output_filename)) -+ { -+ unlink (ofilename); -+ einfo (_("%P%F: failed to rename output with object-only section\n")); -+ } -+ -+ free (ofilename); -+ return; -+ -+loser: -+ if (isympp) -+ free (isympp); -+ if (osympp) -+ free (osympp); -+ if (obfd) -+ bfd_close (obfd); -+ if (ofilename) -+ { -+ unlink (ofilename); -+ free (ofilename); -+ } -+ einfo (_("%P%F: failed to add object-only section: %s\n"), err); -+} -+ -+/* Emit the final output with object-only section. */ -+ -+void -+cmdline_emit_object_only_section (void) -+{ -+ const char *saved_output_filename = output_filename; -+ int fd; -+ size_t size, off; -+ bfd_byte *contents; -+ struct stat st; -+ -+ /* Get a temporary object-only file. */ -+ output_filename = make_temp_file (".obj-only.o"); -+ -+ had_output_filename = FALSE; -+ link_info.input_bfds = NULL; -+ link_info.input_bfds_tail = &link_info.input_bfds; -+ -+ lang_init (TRUE); -+ ldexp_init (TRUE); -+ -+ ld_parse_linker_script (); -+ -+ /* Set up the object-only output. */ -+ lang_final (); -+ -+ /* Open the object-only file for output. */ -+ lang_for_each_statement (ldlang_open_output); -+ -+ ldemul_create_output_section_statements (); -+ -+ if (!bfd_section_already_linked_table_init ()) -+ einfo (_("%P%F: Failed to create hash table\n")); -+ -+ /* Call cmdline_on_object_only_archive_list_p to check which member -+ should be loaded. */ -+ input_flags.whole_archive = TRUE; -+ -+ /* Set it to avoid adding more to cmdline lists. */ -+ link_info.emitting_gnu_object_only = TRUE; -+ -+ /* Get object-only input files. */ -+ cmdline_get_object_only_input_files (); -+ -+ /* Open object-only input files. */ -+ open_input_bfds (statement_list.head, FALSE); -+ -+ ldemul_after_open (); -+ -+ bfd_section_already_linked_table_free (); -+ -+ /* Make sure that we're not mixing architectures. We call this -+ after all the input files have been opened, but before we do any -+ other processing, so that any operations merge_private_bfd_data -+ does on the output file will be known during the rest of the -+ link. */ -+ lang_check (); -+ -+ /* Size up the common data. */ -+ lang_common (); -+ -+ /* Update wild statements. */ -+ update_wild_statements (statement_list.head); -+ -+ /* Run through the contours of the script and attach input sections -+ to the correct output sections. */ -+ map_input_to_output_sections (statement_list.head, NULL, NULL); -+ -+ /* Find any sections not attached explicitly and handle them. */ -+ lang_place_orphans (); -+ -+ /* Do anything special before sizing sections. This is where ELF -+ and other back-ends size dynamic sections. */ -+ ldemul_before_allocation (); -+ -+ /* Size up the sections. */ -+ lang_size_sections (NULL, ! RELAXATION_ENABLED); -+ -+ /* See if anything special should be done now we know how big -+ everything is. This is where relaxation is done. */ -+ ldemul_after_allocation (); -+ -+ ldemul_finish (); -+ -+ /* Make sure that the section addresses make sense. */ -+ if (command_line.check_section_addresses) -+ lang_check_section_addresses (); -+ -+ lang_end (); -+ -+ ldwrite (); -+ -+ ldexp_finish (TRUE); -+ lang_finish (); -+ -+ if (! bfd_close (link_info.output_bfd)) -+ einfo (_("%P%F:%s: final close failed on object-only output: %E\n"), -+ output_filename); -+ -+ /* Read in the object-only file. */ -+ fd = open (output_filename, O_RDONLY | O_BINARY); -+ if (fd < 0) -+ { -+ bfd_set_error (bfd_error_system_call); -+ einfo (_("%P%F:%s: cannot open object-only output: %E"), -+ output_filename); -+ } -+ -+ /* Get the object-only file size. */ -+ if (fstat (fd, &st) != 0) -+ { -+ bfd_set_error (bfd_error_system_call); -+ einfo (_("%P%F:%s: cannot stat object-only output: %E"), -+ output_filename); -+ } -+ -+ size = st.st_size; -+ off = 0; -+ contents = (bfd_byte *) xmalloc (size); -+ while (off != size) -+ { -+ ssize_t got; -+ -+ got = read (fd, contents + off, size - off); -+ if (got < 0) -+ { -+ bfd_set_error (bfd_error_system_call); -+ einfo (_("%P%F:%s: read failed on object-only output: %E"), -+ output_filename); -+ } -+ -+ off += got; -+ } -+ -+ close (fd); -+ -+ /* Remove the temporary object-only file. */ -+ unlink (output_filename); -+ -+ output_filename = saved_output_filename; -+ -+ cmdline_add_object_only_section (contents, size); -+ -+ free (contents); -+} -+ -+/* Extract the object-only section. */ -+ -+static const char * -+cmdline_extract_object_only_section (bfd *abfd) -+{ -+ const char *name = bfd_extract_object_only_section (abfd); -+ -+ if (name == NULL) -+ einfo (_("%P%F: cannot extract object-only section from %B: %E"), -+ abfd); -+ -+ /* It should be removed after it is done. */ -+ cmdline_list_append (&cmdline_temp_object_only_list, -+ cmdline_is_file_enum, (void *) name); -+ -+ return name; -+} -+ -+/* Check and handle the object-only section. */ -+ -+void -+cmdline_check_object_only_section (bfd *abfd, bfd_boolean lto) -+{ -+ const char *filename; -+ -+ if (link_info.emitting_gnu_object_only -+ || abfd->format != bfd_object) -+ return; -+ -+ if (lto) -+ { -+ /* For LTO link, we only need to extract object-only section -+ from the mixed object, add it to input, and put it on LTO -+ claimed output. */ -+ switch (abfd->lto_type) -+ { -+ default: -+ abort (); -+ case lto_mixed_object: -+ filename = cmdline_extract_object_only_section (abfd); -+ lang_add_input_file (filename, -+ lang_input_file_is_file_enum, NULL); -+ break; -+ case lto_non_ir_object: -+ case lto_ir_object: -+ break; -+ } -+ } -+ else if (bfd_link_relocatable (&link_info)) -+ { -+ /* For non-LTO relocatable link, we need to append non-IR object -+ file and the object file in object-only section to the object -+ only list. */ -+ switch (abfd->lto_type) -+ { -+ default: -+ abort (); -+ case lto_mixed_object: -+ filename = cmdline_extract_object_only_section (abfd); -+ cmdline_object_only_list_append (cmdline_is_file_enum, -+ (void *) filename); -+ break; -+ case lto_non_ir_object: -+ cmdline_object_only_list_append (cmdline_is_bfd_enum, abfd); -+ break; -+ case lto_ir_object: -+ break; -+ } -+ } -+} -+ -+/* Remove temporary object-only files. */ -+ -+void -+cmdline_remove_object_only_files (void) -+{ -+ cmdline_union_type *c; -+ -+#ifdef ENABLE_PLUGINS -+ if (plugin_save_temps) -+ return; -+#endif -+ -+ c = cmdline_temp_object_only_list.head; -+ for (; c != NULL; c = c->header.next) -+ switch (c->header.type) -+ { -+ default: -+ abort (); -+ case cmdline_is_file_enum: -+ unlink (c->file.filename); -+ break; -+ } -+} -diff -rup binutils-2.26.orig/ld/ldlang.h binutils-2.26/ld/ldlang.h ---- binutils-2.26.orig/ld/ldlang.h 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldlang.h 2016-02-19 09:35:54.921106611 +0000 -@@ -517,7 +517,7 @@ extern struct asneeded_minfo **asneeded_ - extern void (*output_bfd_hash_table_free_fn) (struct bfd_link_hash_table *); - - extern void lang_init -- (void); -+ (bfd_boolean); - extern void lang_finish - (void); - extern lang_memory_region_type * lang_memory_region_lookup -@@ -693,7 +693,48 @@ lang_ld_feature (char *); - extern void - lang_print_memory_usage (void); - - extern void - lang_add_gc_name (const char *); - -+typedef enum -+{ -+ cmdline_is_file_enum, -+ cmdline_is_bfd_enum -+} cmdline_enum_type; -+ -+typedef struct cmdline_header_struct -+{ -+ union cmdline_union *next; -+ cmdline_enum_type type; -+} cmdline_header_type; -+ -+typedef struct cmdline_file_struct -+{ -+ cmdline_header_type header; -+ const char *filename; -+} cmdline_file_type; -+ -+typedef struct cmdline_bfd_struct -+{ -+ cmdline_header_type header; -+ bfd *abfd; -+} cmdline_bfd_type; -+ -+typedef union cmdline_union -+{ -+ cmdline_header_type header; -+ cmdline_file_type file; -+ cmdline_bfd_type abfd; -+} cmdline_union_type; -+ -+typedef struct cmdline_list -+{ -+ cmdline_union_type *head; -+ cmdline_union_type **tail; -+} cmdline_list_type; -+ -+extern void cmdline_emit_object_only_section (void); -+extern void cmdline_check_object_only_section (bfd *, bfd_boolean); -+extern void cmdline_remove_object_only_files (void); -+ - #endif -diff -rup binutils-2.26.orig/ld/ldlex.h binutils-2.26/ld/ldlex.h ---- binutils-2.26.orig/ld/ldlex.h 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldlex.h 2016-02-19 09:35:54.921106611 +0000 -@@ -134,6 +134,7 @@ enum option_values - #ifdef ENABLE_PLUGINS - OPTION_PLUGIN, - OPTION_PLUGIN_OPT, -+ OPTION_PLUGIN_SAVE_TEMPS, - #endif /* ENABLE_PLUGINS */ - OPTION_DEFAULT_SCRIPT, - OPTION_PRINT_OUTPUT_FORMAT, -diff -rup binutils-2.26.orig/ld/ldmain.c binutils-2.26/ld/ldmain.c ---- binutils-2.26.orig/ld/ldmain.c 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldmain.c 2016-02-19 09:35:54.922106617 +0000 -@@ -219,6 +219,9 @@ main (int argc, char **argv) - - xatexit (ld_cleanup); - -+ /* Remove temporary object-only files. */ -+ xatexit (cmdline_remove_object_only_files); -+ - /* Set up the sysroot directory. */ - ld_sysroot = get_sysroot (argc, argv); - if (*ld_sysroot) -@@ -291,8 +294,8 @@ main (int argc, char **argv) - default_target = ldemul_choose_target (argc, argv); - config.maxpagesize = bfd_emul_get_maxpagesize (default_target); - config.commonpagesize = bfd_emul_get_commonpagesize (default_target); -- lang_init (); -- ldexp_init (); -+ lang_init (FALSE); -+ ldexp_init (FALSE); - ldemul_before_parse (); - lang_has_input_file = FALSE; - parse_args (argc, argv); -@@ -307,34 +310,7 @@ main (int argc, char **argv) - - ldemul_set_symbols (); - -- /* If we have not already opened and parsed a linker script, -- try the default script from command line first. */ -- if (saved_script_handle == NULL -- && command_line.default_script != NULL) -- { -- ldfile_open_command_file (command_line.default_script); -- parser_input = input_script; -- yyparse (); -- } -- -- /* If we have not already opened and parsed a linker script -- read the emulation's appropriate default script. */ -- if (saved_script_handle == NULL) -- { -- int isfile; -- char *s = ldemul_get_script (&isfile); -- -- if (isfile) -- ldfile_open_default_command_file (s); -- else -- { -- lex_string = s; -- lex_redirect (s, _("built in linker script"), 1); -- } -- parser_input = input_script; -- yyparse (); -- lex_string = NULL; -- } -+ ld_parse_linker_script (); - - if (verbose) - { -@@ -445,7 +421,7 @@ main (int argc, char **argv) - fprintf (stderr, "lookup = %p val %lx\n", h, h ? h->u.def.value : 1); - } - #endif -- ldexp_finish (); -+ ldexp_finish (FALSE); - lang_finish (); - - /* Even if we're producing relocatable output, some non-fatal errors should -@@ -465,6 +441,8 @@ main (int argc, char **argv) - if (!bfd_close (link_info.output_bfd)) - einfo (_("%F%B: final close failed: %E\n"), link_info.output_bfd); - -+ link_info.output_bfd = NULL; -+ - /* If the --force-exe-suffix is enabled, and we're making an - executable file and it doesn't end in .exe, copy it to one - which does. */ -@@ -512,6 +490,9 @@ main (int argc, char **argv) - } - } - -+ if (link_info.emit_gnu_object_only) -+ cmdline_emit_object_only_section (); -+ - END_PROGRESS (program_name); - - if (config.stats) -@@ -805,7 +786,9 @@ add_archive_element (struct bfd_link_inf - *subsbfd = input->the_bfd; - } - } -+ else - #endif /* ENABLE_PLUGINS */ -+ cmdline_check_object_only_section (input->the_bfd, FALSE); - - ldlang_add_file (input); - -@@ -1484,3 +1467,38 @@ notice (struct bfd_link_info *info, - - return TRUE; - } -+ -+/* Parse the linker script. */ -+ -+void -+ld_parse_linker_script () -+{ -+ /* If we have not already opened and parsed a linker script, -+ try the default script from command line first. */ -+ if (saved_script_handle == NULL -+ && command_line.default_script != NULL) -+ { -+ ldfile_open_command_file (command_line.default_script); -+ parser_input = input_script; -+ yyparse (); -+ } -+ -+ /* If we have not already opened and parsed a linker script -+ read the emulation's appropriate default script. */ -+ if (saved_script_handle == NULL) -+ { -+ int isfile; -+ char *s = ldemul_get_script (&isfile); -+ -+ if (isfile) -+ ldfile_open_default_command_file (s); -+ else -+ { -+ lex_string = s; -+ lex_redirect (s, _("built in linker script"), 1); -+ } -+ parser_input = input_script; -+ yyparse (); -+ lex_string = NULL; -+ } -+} -diff -rup binutils-2.26.orig/ld/ldmain.h binutils-2.26/ld/ldmain.h ---- binutils-2.26.orig/ld/ldmain.h 2016-02-19 09:35:36.701003291 +0000 -+++ binutils-2.26/ld/ldmain.h 2016-02-19 09:35:54.922106617 +0000 -@@ -59,4 +59,6 @@ extern void add_wrap (const char *); - extern void add_ignoresym (struct bfd_link_info *, const char *); - extern void add_keepsyms_file (const char *); - -+extern void ld_parse_linker_script (void); -+ - #endif -diff -rup binutils-2.26.orig/ld/lexsup.c binutils-2.26/ld/lexsup.c ---- binutils-2.26.orig/ld/lexsup.c 2016-02-19 09:35:36.700003285 +0000 -+++ binutils-2.26/ld/lexsup.c 2016-02-19 09:35:54.923106623 +0000 -@@ -169,6 +169,9 @@ static const struct ld_option ld_options - '\0', N_("PLUGIN"), N_("Load named plugin"), ONE_DASH }, - { {"plugin-opt", required_argument, NULL, OPTION_PLUGIN_OPT}, - '\0', N_("ARG"), N_("Send arg to last-loaded plugin"), ONE_DASH }, -+ { {"plugin-save-temps", no_argument, NULL, OPTION_PLUGIN_SAVE_TEMPS}, -+ '\0', NULL, N_("Store plugin intermediate files permanently"), -+ ONE_DASH }, - { {"flto", optional_argument, NULL, OPTION_IGNORE}, - '\0', NULL, N_("Ignored for GCC LTO option compatibility"), - ONE_DASH }, -@@ -1020,6 +1023,9 @@ parse_args (unsigned argc, char **argv) - if (plugin_opt_plugin_arg (optarg)) - einfo (_("%P%F: bad -plugin-opt option\n")); - break; -+ case OPTION_PLUGIN_SAVE_TEMPS: -+ plugin_save_temps = TRUE; -+ break; - #endif /* ENABLE_PLUGINS */ - case 'q': - link_info.emitrelocations = TRUE; -diff -rup binutils-2.26.orig/ld/plugin.c binutils-2.26/ld/plugin.c ---- binutils-2.26.orig/ld/plugin.c 2016-02-19 09:35:36.702003296 +0000 -+++ binutils-2.26/ld/plugin.c 2016-02-19 09:35:54.923106623 +0000 -@@ -57,6 +57,9 @@ extern int errno; - /* Report plugin symbols. */ - bfd_boolean report_plugin_symbols; - -+/* Store plugin intermediate files permanently. */ -+bfd_boolean plugin_save_temps; -+ - /* The suffix to append to the name of the real (claimed) object file - when generating a dummy BFD to hold the IR symbols sent from the - plugin. For cosmetic use only; appears in maps, crefs etc. */ -@@ -1182,6 +1185,9 @@ plugin_maybe_claim (lang_input_statement - { - bfd *abfd = entry->the_bfd->plugin_dummy_bfd; - -+ /* Check object only section. */ -+ cmdline_check_object_only_section (entry->the_bfd, TRUE); -+ - /* Discard the real file's BFD and substitute the dummy one. */ - - /* We can't call bfd_close on archives. BFD archive handling -@@ -1227,14 +1233,17 @@ plugin_call_cleanup (void) - { - if (curplug->cleanup_handler && !curplug->cleanup_done) - { -- enum ld_plugin_status rv; -- curplug->cleanup_done = TRUE; -- called_plugin = curplug; -- rv = (*curplug->cleanup_handler) (); -- called_plugin = NULL; -- if (rv != LDPS_OK) -- info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"), -- curplug->name, rv); -+ if (!plugin_save_temps) -+ { -+ enum ld_plugin_status rv; -+ curplug->cleanup_done = TRUE; -+ called_plugin = curplug; -+ rv = (*curplug->cleanup_handler) (); -+ called_plugin = NULL; -+ if (rv != LDPS_OK) -+ info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"), -+ curplug->name, rv); -+ } - dlclose (curplug->dlhandle); - } - curplug = curplug->next; -diff -rup binutils-2.26.orig/ld/plugin.h binutils-2.26/ld/plugin.h ---- binutils-2.26.orig/ld/plugin.h 2016-02-19 09:35:36.702003296 +0000 -+++ binutils-2.26/ld/plugin.h 2016-02-19 09:35:54.924106628 +0000 -@@ -24,6 +24,9 @@ - /* Report plugin symbols. */ - extern bfd_boolean report_plugin_symbols; - -+/* Store plugin intermediate files permanently. */ -+extern bfd_boolean plugin_save_temps; -+ - /* Set at all symbols read time, to avoid recursively offering the plugin - its own newly-added input files and libs to claim. */ - extern bfd_boolean no_more_claiming; -diff -rup binutils-2.26.orig/ld/scripttempl/armbpabi.sc binutils-2.26/ld/scripttempl/armbpabi.sc ---- binutils-2.26.orig/ld/scripttempl/armbpabi.sc 2016-02-19 09:35:36.704003308 +0000 -+++ binutils-2.26/ld/scripttempl/armbpabi.sc 2016-02-19 09:35:54.924106628 +0000 -@@ -36,7 +36,7 @@ INTERP=".interp 0 : { *(.interp) } - PLT=".plt ${RELOCATING-0} : { *(.plt) }" - RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" - DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro .data.rel.ro.*) }" --DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" -+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }" - if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : - { -diff -rup binutils-2.26.orig/ld/scripttempl/elf32sh-symbian.sc binutils-2.26/ld/scripttempl/elf32sh-symbian.sc ---- binutils-2.26.orig/ld/scripttempl/elf32sh-symbian.sc 2016-02-19 09:35:36.705003313 +0000 -+++ binutils-2.26/ld/scripttempl/elf32sh-symbian.sc 2016-02-19 09:35:54.925106634 +0000 -@@ -88,7 +88,7 @@ fi - PLT=".plt : { *(.plt) } :dynamic :dyn" - DYNAMIC=".dynamic : { *(.dynamic) } :dynamic :dyn" - RODATA=".rodata ALIGN(4) : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" --DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.directive) *(.gnu.lto_*) }" -+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.directive) *(.gnu.lto_*) *(.gnu_object_only) }" - test -z "$GOT" && GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) } :dynamic :dyn" - INIT_ARRAY=".init_array ${RELOCATING-0} : - { -diff -rup binutils-2.26.orig/ld/scripttempl/elf64hppa.sc binutils-2.26/ld/scripttempl/elf64hppa.sc ---- binutils-2.26.orig/ld/scripttempl/elf64hppa.sc 2016-02-19 09:35:36.705003313 +0000 -+++ binutils-2.26/ld/scripttempl/elf64hppa.sc 2016-02-19 09:35:54.925106634 +0000 -@@ -132,7 +132,7 @@ fi - DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" - RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" - DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }" --DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" -+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }" - if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : - { -diff -rup binutils-2.26.orig/ld/scripttempl/elf.sc binutils-2.26/ld/scripttempl/elf.sc ---- binutils-2.26.orig/ld/scripttempl/elf.sc 2016-02-19 09:35:36.705003313 +0000 -+++ binutils-2.26/ld/scripttempl/elf.sc 2016-02-19 09:35:54.924106628 +0000 -@@ -170,7 +170,7 @@ RELA_IPLT=".rela.iplt ${RELOCATING-0} - DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" - RODATA=".${RODATA_NAME} ${RELOCATING-0} : { *(.${RODATA_NAME}${RELOCATING+ .${RODATA_NAME}.* .gnu.linkonce.r.*}) }" - DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }" --DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" -+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }" - if test -z "${NO_SMALL_DATA}"; then - SBSS=".${SBSS_NAME} ${RELOCATING-0} : - { -diff -rup binutils-2.26.orig/ld/scripttempl/elfxtensa.sc binutils-2.26/ld/scripttempl/elfxtensa.sc ---- binutils-2.26.orig/ld/scripttempl/elfxtensa.sc 2016-02-19 09:35:36.705003313 +0000 -+++ binutils-2.26/ld/scripttempl/elfxtensa.sc 2016-02-19 09:35:54.925106634 +0000 -@@ -145,7 +145,7 @@ fi - DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" - RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" - DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }" --DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" -+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }" - INIT_LIT=".init.literal 0 : { *(.init.literal) }" - INIT=".init 0 : { *(.init) }" - FINI_LIT=".fini.literal 0 : { *(.fini.literal) }" -diff -rup binutils-2.26.orig/ld/scripttempl/mep.sc binutils-2.26/ld/scripttempl/mep.sc ---- binutils-2.26.orig/ld/scripttempl/mep.sc 2016-02-19 09:35:36.706003319 +0000 -+++ binutils-2.26/ld/scripttempl/mep.sc 2016-02-19 09:35:54.926106640 +0000 -@@ -119,7 +119,7 @@ fi - DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" - RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" - DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro .data.rel.ro.*) }" --DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }" -+DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }" - if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : - { -diff -rup binutils-2.26.orig/ld/scripttempl/pep.sc binutils-2.26/ld/scripttempl/pep.sc ---- binutils-2.26.orig/ld/scripttempl/pep.sc 2016-02-19 09:35:36.706003319 +0000 -+++ binutils-2.26/ld/scripttempl/pep.sc 2016-02-19 09:35:54.926106640 +0000 -@@ -178,6 +178,7 @@ SECTIONS - *(.drectve) - ${RELOCATING+ *(.note.GNU-stack)} - ${RELOCATING+ *(.gnu.lto_*)} -+ ${RELOCATING+ *(.gnu_object_only)} - } - - .idata ${RELOCATING+BLOCK(__section_alignment__)} : -diff -rup binutils-2.26.orig/ld/scripttempl/pe.sc binutils-2.26/ld/scripttempl/pe.sc ---- binutils-2.26.orig/ld/scripttempl/pe.sc 2016-02-19 09:35:36.706003319 +0000 -+++ binutils-2.26/ld/scripttempl/pe.sc 2016-02-19 09:35:54.926106640 +0000 -@@ -165,6 +165,7 @@ SECTIONS - *(.drectve) - ${RELOCATING+ *(.note.GNU-stack)} - ${RELOCATING+ *(.gnu.lto_*)} -+ ${RELOCATING+ *(.gnu_object_only)} - } - - .idata ${RELOCATING+BLOCK(__section_alignment__)} : ---- binutils.orig/bfd/bfd-in2.h 2017-03-02 11:14:48.572979573 +0000 -+++ binutils-2.28/bfd/bfd-in2.h 2017-03-02 11:21:39.828458555 +0000 -@@ -1118,6 +1118,9 @@ bfd_boolean bfd_fill_in_gnu_debuglink_se - - char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); - -+const char *bfd_extract_object_only_section -+ (bfd *abfd); -+ - /* Extracted from libbfd.c. */ - - /* Byte swapping macros for user section data. */ ---- binutils.orig/bfd/opncls.c 2017-03-02 11:14:48.586979385 +0000 -+++ binutils-2.28/bfd/opncls.c 2017-03-02 11:23:23.546065945 +0000 -@@ -1990,3 +1990,69 @@ bfd_follow_build_id_debuglink (bfd *abfd - get_build_id_name, - check_build_id_file, &build_id); - } -+ -+/* -+FUNCTION -+ bfd_extract_object_only_section -+ -+SYNOPSIS -+ const char *bfd_extract_object_only_section -+ (bfd *abfd); -+ -+DESCRIPTION -+ -+ Takes a @var{ABFD} and extract the .gnu_object_only section into -+ a temporary file. -+ -+RETURNS -+ The name of the temporary file is returned if all is ok. -+ Otherwise <<NULL>> is returned and bfd_error is set. -+*/ -+ -+const char * -+bfd_extract_object_only_section (bfd *abfd) -+{ -+ asection *sec = abfd->object_only_section; -+ const char *name; -+ FILE *file; -+ bfd_byte *memhunk = NULL; -+ size_t off, size; -+ bfd_error_type err; -+ -+ /* Get a temporary object-only file. */ -+ name = make_temp_file (".obj-only.o"); -+ -+ /* Open the object-only file. */ -+ file = _bfd_real_fopen (name, FOPEN_WB); -+ if (!bfd_get_full_section_contents (abfd, sec, &memhunk)) -+ { -+ err = bfd_get_error (); -+ -+loser: -+ free (memhunk); -+ fclose (file); -+ unlink (name); -+ bfd_set_error (err); -+ return NULL; -+ } -+ -+ off = 0; -+ size = sec->size; -+ while (off != size) -+ { -+ size_t written, nwrite = size - off; -+ -+ written = fwrite (memhunk + off, 1, nwrite, file); -+ if (written < nwrite && ferror (file)) -+ { -+ err = bfd_error_system_call; -+ goto loser; -+ } -+ -+ off += written; -+ } -+ -+ free (memhunk); -+ fclose (file); -+ return name; -+} ---- binutils.orig/bfd/plugin.c 2017-03-02 11:37:31.572677260 +0000 -+++ binutils-2.28/bfd/plugin.c 2017-03-02 11:40:35.246209573 +0000 -@@ -132,10 +132,10 @@ register_claim_file (ld_plugin_claim_fil - } - - static asection bfd_plugin_fake_text_section -- = BFD_FAKE_SECTION (bfd_plugin_fake_text_section, 0, 0, ".text", 0); -+= BFD_FAKE_SECTION (bfd_plugin_fake_text_section, 0, ".text", 0, 0); - static asection bfd_plugin_fake_common_section -- = BFD_FAKE_SECTION (bfd_plugin_fake_common_section, SEC_IS_COMMON, 0, -- NULL, 0); -+ = BFD_FAKE_SECTION (bfd_plugin_fake_common_section, 0, -+ NULL, 0, SEC_IS_COMMON); - - /* Get symbols from object only section. */ - ---- binutils.orig/ld/emultempl/armelf.em 2017-03-02 11:58:14.632981042 +0000 -+++ binutils-2.28/ld/emultempl/armelf.em 2017-03-02 12:00:55.663819055 +0000 -@@ -414,7 +414,7 @@ gld${EMULATION_NAME}_after_allocation (v - } - - static void --gld${EMULATION_NAME}_finish (void) -+arm_finish (void) - { - struct bfd_link_hash_entry * h; - -@@ -441,7 +441,7 @@ gld${EMULATION_NAME}_finish (void) - } - } - -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - - if (params.thumb_entry_symbol) - { -@@ -790,4 +790,4 @@ LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME - LDEMUL_SET_SYMBOLS=gld"${EMULATION_NAME}"_set_symbols - - # Call the extra arm-elf function --LDEMUL_FINISH=gld${EMULATION_NAME}_finish -+LDEMUL_FINISH=arm_finish ---- binutils.orig/ld/emultempl/ppc64elf.em 2017-03-02 11:58:14.632981042 +0000 -+++ binutils-2.28/ld/emultempl/ppc64elf.em 2017-03-02 12:01:40.961210895 +0000 -@@ -561,7 +561,7 @@ gld${EMULATION_NAME}_after_allocation (v - /* Final emulation specific call. */ - - static void --gld${EMULATION_NAME}_finish (void) -+ppc_finish (void) - { - char *msg = NULL; - char *line, *endline; -@@ -592,7 +592,7 @@ gld${EMULATION_NAME}_finish (void) - if (msg != NULL) - free (msg); - -- finish_default (); -+ gld${EMULATION_NAME}_finish (); - } - - -@@ -926,4 +926,4 @@ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS= - LDEMUL_AFTER_OPEN=ppc_after_open - LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation - LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation --LDEMUL_FINISH=gld${EMULATION_NAME}_finish -+LDEMUL_FINISH=ppc_finish diff --git a/binutils/patches/binutils-2.27-relro-on-by-default.patch b/binutils/patches/binutils-2.27-relro-on-by-default.patch deleted file mode 100644 index 8d9b6c1ef..000000000 --- a/binutils/patches/binutils-2.27-relro-on-by-default.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- binutils-2.27.orig/ld/configure.tgt 2016-07-07 11:16:49.967963649 +0100 -+++ binutils-2.27/ld/configure.tgt 2016-07-07 11:17:02.252045673 +0100 -@@ -901,8 +901,8 @@ frv-*-* | hppa*-*-* | ia64-*-* | mips*-* - # FAIL: objcopy -shared -z relro (tbss2) - # FAIL: objcopy -shared -z relro (tbss3) - ;; --*-*-linux*) -- if test ${ac_default_ld_z_relro} = unset; then -+*) -+ if test x${ac_default_ld_z_relro} = xunset; then - ac_default_ld_z_relro=1 - fi - ;; diff --git a/clamav/clamav.nm b/clamav/clamav.nm index 2bb9ca646..5bcb7c382 100644 --- a/clamav/clamav.nm +++ b/clamav/clamav.nm @@ -4,7 +4,7 @@ ###############################################################################
name = clamav -version = 0.97.4 +version = 0.99.3 release = 1
groups = System Environment/Daemons @@ -24,26 +24,27 @@ description languages for detecting threats. end
-source_dl = http://downloads.sourceforge.net/clamav/ +source_dl = http://www.clamav.net/downloads/production/
CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLDAP_DEPRECATED +CXXFLAGS += -std=gnu++98
build requires bzip2-devel curl-devel gmp-devel + libxml2-devel ncurses-devel + openssl-devel + pcre-devel shadow-utils + systemd-devel zlib-devel end
configure_options += \ - --sysconfdir=/etc \ - --disable-static \ - --disable-rpath \ - --disable-silent-rules \ - --with-dbdir=/var/lib/clamav \ + --with-dbdir=%{localstatedir}/lib/clamav \ --enable-clamdtop \ --with-user=clamupdate \ --with-group=clamupdate \ diff --git a/compat-openssl/compat-openssl.nm b/compat-openssl/compat-openssl.nm new file mode 100644 index 000000000..c45089dfc --- /dev/null +++ b/compat-openssl/compat-openssl.nm @@ -0,0 +1,147 @@ +############################################################################### +# IPFire.org - An Open Source Firewall Solution # +# Copyright (C) - IPFire Development Team info@ipfire.org # +############################################################################### + +name = compat-openssl +version = 1.0.2n +release = 1 +thisapp = openssl-%{version} + +maintainer = Michael Tremer michael.tremer@ipfire.org +groups = System/Libraries +url = http://www.openssl.org/ +license = OpenSSL +summary = A general purpose cryptography library with TLS implementation. + +description + The OpenSSL toolkit provides support for secure communications between + machines. OpenSSL includes a certificate management tool and shared + libraries which provide various cryptographic algorithms and protocols. +end + +source_dl = http://openssl.org/source/ + +build + requires + bc + gnutls-devel + perl + util-linux + zlib-devel + end + + CFLAGS += -DPURIFY + export RPM_OPT_FLAGS = %{CFLAGS} %{LDFLAGS} + + prepare_cmds + sed -e 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' \ + -i crypto/opensslv.h + + find crypto/ -name Makefile -exec \ + sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} ; + + # Generate a table with the compile settings for my perusal. + touch Makefile + make TABLE PERL=/usr/bin/perl + end + + # Set default ssl_arch. + ssl_arch = linux-%{DISTRO_ARCH} + + if "%{DISTRO_ARCH}" == "i686" + # 386 implies no-sse2 + ssl_arch = linux-elf no-asm 386 + end + + if "%{DISTRO_ARCH}" == "armv5tel" + ssl_arch = linux-armv4 + end + + if "%{DISTRO_ARCH}" == "armv7hl" + ssl_arch = linux-armv4 + end + + build + ./Configure \ + --prefix=/usr \ + --openssldir=/etc/pki/tls \ + --enginesdir=%{libdir}/openssl/engines \ + shared \ + zlib-dynamic \ + enable-camellia \ + enable-md2 \ + enable-seed \ + enable-tlsext \ + enable-rfc3779 \ + no-idea \ + no-mdc2 \ + no-rc5 \ + no-ec2m \ + no-srp \ + -DSSL_FORBID_ENULL \ + %{ssl_arch} + + # Build. + make depend + make all + + # Generate hashes for the included certs. + make rehash + end + + test + # Revert ca-dir patch. Otherwise the tests will fail. + patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch + + make test + end + + install + make install INSTALL_PREFIX=%{BUILDROOT} + + # Remove man pages + rm -rfv %{BUILDROOT}%{sysconfdir}/pki/tls/man %{BUILDROOT}/usr/share/man* + + # Remove configuration files + rm -rfv %{BUILDROOT}%{sysconfdir}/pki + + # Remove engines + rm -rfv %{BUILDROOT}%{libdir}/{engines,openssl} + + # Remove binaries + rm -rfv %{BUILDROOT}%{bindir} + end +end + +packages + package %{name} + requires + ca-certificates + end + + provides + openssl = %{thisver} + end + + obsoletes + openssl <= %{thisver} + end + end + + package %{name}-devel + template DEVEL + + provides + openssl-devel = %{thisver} + end + + obsoletes + openssl-devel <= %{thisver} + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end diff --git a/openssl/openssl.cnf b/compat-openssl/openssl.cnf similarity index 100% rename from openssl/openssl.cnf rename to compat-openssl/openssl.cnf diff --git a/openssl/patches/openssl-0.9.8a-no-rpath.patch b/compat-openssl/patches/openssl-0.9.8a-no-rpath.patch similarity index 100% rename from openssl/patches/openssl-0.9.8a-no-rpath.patch rename to compat-openssl/patches/openssl-0.9.8a-no-rpath.patch diff --git a/openssl/patches/openssl-1.0.0-beta4-ca-dir.patch b/compat-openssl/patches/openssl-1.0.0-beta4-ca-dir.patch similarity index 100% rename from openssl/patches/openssl-1.0.0-beta4-ca-dir.patch rename to compat-openssl/patches/openssl-1.0.0-beta4-ca-dir.patch diff --git a/openssl/patches/openssl-1.0.0-beta5-enginesdir.patch b/compat-openssl/patches/openssl-1.0.0-beta5-enginesdir.patch similarity index 100% rename from openssl/patches/openssl-1.0.0-beta5-enginesdir.patch rename to compat-openssl/patches/openssl-1.0.0-beta5-enginesdir.patch diff --git a/openssl/patches/openssl-1.0.2a-version.patch b/compat-openssl/patches/openssl-1.0.2a-version.patch similarity index 100% rename from openssl/patches/openssl-1.0.2a-version.patch rename to compat-openssl/patches/openssl-1.0.2a-version.patch diff --git a/openssl/patches/openssl-1.0.2c-rpmbuild.patch b/compat-openssl/patches/openssl-1.0.2e-rpmbuild.patch similarity index 92% rename from openssl/patches/openssl-1.0.2c-rpmbuild.patch rename to compat-openssl/patches/openssl-1.0.2e-rpmbuild.patch index d6149625b..db1460cb7 100644 --- a/openssl/patches/openssl-1.0.2c-rpmbuild.patch +++ b/compat-openssl/patches/openssl-1.0.2e-rpmbuild.patch @@ -1,6 +1,6 @@ -diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure ---- openssl-1.0.2c/Configure.rpmbuild 2015-06-12 16:51:21.000000000 +0200 -+++ openssl-1.0.2c/Configure 2015-06-15 17:22:52.598496680 +0200 +diff -up openssl-1.0.2e/Configure.rpmbuild openssl-1.0.2e/Configure +--- openssl-1.0.2e/Configure.rpmbuild 2015-12-03 15:04:23.000000000 +0100 ++++ openssl-1.0.2e/Configure 2015-12-04 13:20:22.996835604 +0100 @@ -365,8 +365,8 @@ my %table=( #### # *-generic* is endian-neutral target, but ./config is free to @@ -12,7 +12,7 @@ diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure
####################################################################### # Note that -march is not among compiler options in below linux-armv4 -@@ -395,30 +395,30 @@ my %table=( +@@ -395,31 +395,31 @@ my %table=( # # ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8 # @@ -40,7 +40,7 @@ diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure -"linux-ppc64", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::64", -"linux-ppc64le","gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:$ppc64_asm:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::", -"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)", -+"linux-generic64","gcc:-Wall $(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:$(RPM_OPT_FLAGS):.so.$(SHLIB_SONAMEVER)", ++"linux-generic64","gcc:-Wall $(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:$(RPM_OPT_FLAGS):.so.$(SHLIB_SONAMEVER):::64", +"linux-ppc64", "gcc:-m64 -DB_ENDIAN -Wall $(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64 $(RPM_OPT_FLAGS):.so.$(SHLIB_SONAMEVER):::64", +"linux-ppc64le","gcc:-m64 -DL_ENDIAN -Wall $(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:$ppc64_asm:linux64le:dlfcn:linux-shared:-fPIC:-m64 $(RPM_OPT_FLAGS):.so.$(SHLIB_SONAMEVER):::64", +"linux-ia64", "gcc:-DL_ENDIAN -Wall $(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC:$(RPM_OPT_FLAGS):.so.$(SHLIB_SONAMEVER)", @@ -48,6 +48,7 @@ diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure -"linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::64", +"linux-x86_64", "gcc:-m64 -DL_ENDIAN -Wall $(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64 $(RPM_OPT_FLAGS):.so.$(SHLIB_SONAMEVER):::64", "linux-x86_64-clang", "clang: -m64 -DL_ENDIAN -O3 -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::64", + "debug-linux-x86_64-clang", "clang: -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::64", "linux-x86_64-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC::.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::64", "linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::x32", -"linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.$(SHLIB_MAJOR).$(SHLIB_MINOR):::64", @@ -55,7 +56,7 @@ diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure #### So called "highgprs" target for z/Architecture CPUs # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see # /proc/cpuinfo. The idea is to preserve most significant bits of -@@ -436,12 +436,12 @@ my %table=( +@@ -437,12 +437,12 @@ my %table=( #### SPARC Linux setups # Ray Miller ray.miller@computing-services.oxford.ac.uk has patiently # assisted with debugging of following two configs. @@ -71,7 +72,7 @@ diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure #### Alpha Linux with GNU C and Compaq C setups # Special notes: # - linux-alpha+bwx-gcc is ment to be used from ./config only. If you -@@ -1764,7 +1764,7 @@ while (<IN>) +@@ -1767,7 +1767,7 @@ while (<IN>) elsif ($shared_extension ne "" && $shared_extension =~ /^.s([ol]).[^.]*.[^.]*$/) { my $sotmp = $1; @@ -80,9 +81,9 @@ diff -up openssl-1.0.2c/Configure.rpmbuild openssl-1.0.2c/Configure } elsif ($shared_extension ne "" && $shared_extension =~ /^.[^.]*.[^.]*.dylib$/) { -diff -up openssl-1.0.2c/Makefile.org.rpmbuild openssl-1.0.2c/Makefile.org ---- openssl-1.0.2c/Makefile.org.rpmbuild 2015-06-12 16:51:21.000000000 +0200 -+++ openssl-1.0.2c/Makefile.org 2015-06-15 17:19:14.874510995 +0200 +diff -up openssl-1.0.2e/Makefile.org.rpmbuild openssl-1.0.2e/Makefile.org +--- openssl-1.0.2e/Makefile.org.rpmbuild 2015-12-03 15:04:23.000000000 +0100 ++++ openssl-1.0.2e/Makefile.org 2015-12-04 13:18:44.913538616 +0100 @@ -10,6 +10,7 @@ SHLIB_VERSION_HISTORY= SHLIB_MAJOR= SHLIB_MINOR= @@ -91,7 +92,7 @@ diff -up openssl-1.0.2c/Makefile.org.rpmbuild openssl-1.0.2c/Makefile.org PLATFORM=dist OPTIONS= CONFIGURE_ARGS= -@@ -338,10 +339,9 @@ clean-shared: +@@ -341,10 +342,9 @@ clean-shared: link-shared: @ set -e; for i in $(SHLIBDIRS); do \ $(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \ @@ -103,7 +104,7 @@ diff -up openssl-1.0.2c/Makefile.org.rpmbuild openssl-1.0.2c/Makefile.org done
build-shared: do_$(SHLIB_TARGET) link-shared -@@ -352,7 +352,7 @@ do_$(SHLIB_TARGET): +@@ -355,7 +355,7 @@ do_$(SHLIB_TARGET): libs="$(LIBKRB5) $$libs"; \ fi; \ $(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \ diff --git a/gcc/gcc.nm b/gcc/gcc.nm index c58dd9ebe..7f1f5432b 100644 --- a/gcc/gcc.nm +++ b/gcc/gcc.nm @@ -7,7 +7,7 @@ build_graphite = 1
name = gcc -version = 6.4.0 +version = 7.3.0 release = 1
maintainer = Michael Tremer michael.tremer@ipfire.org @@ -67,6 +67,9 @@ build # Build libcilkrts (only x86) build_libcilkrts = 0
+ # Build libmpx (only on x86_64) + build_libmpx = 0 + # A couple of configure arguments depending on the architecture and # configuration. configure_options = @@ -81,6 +84,7 @@ build build_libtsan = 1 build_libubsan = 1 build_libcilkrts = 1 + build_libmpx = 1 end
if "%{DISTRO_ARCH}" == "i686" @@ -283,7 +287,7 @@ build chmod 755 %{BUILDROOT}%{libdir}/libgomp.so.1.*
# libstdc++ - ln -svf ../../../libstdc++.so.6.0.22 ${FULLPATH}/libstdc++.so + ln -svf ../../../libstdc++.so.6.0.24 ${FULLPATH}/libstdc++.so mv -vf %{BUILDROOT}%{libdir}/lib{std,sup}c++.a ${FULLPATH}
# libquadmath @@ -320,6 +324,11 @@ build ln -svf ../../../libcilkrts.so.5.0.0 ${FULLPATH}/libcilkrts.so chmod 755 %{BUILDROOT}%{libdir}/libcilkrts.so.5.* fi + + if [ "%{build_libmpx}" = "1" ]; then + ln -svf ../../../libmpx.so.2.0.1 ${FULLPATH}/libmpx.so + ln -svf ../../../libmpxwrappers.so.2.0.1 ${FULLPATH}/libmpxwrappers.so + fi end
keep_libraries @@ -627,6 +636,22 @@ packages end end
+ if "%{build_libmpx}" == "1" + package libmpx + summary = The Memory Protection Extensions runtime libraries + description + This package contains the Memory Protection Extensions + runtime libraries which is used for -fcheck-pointer-bounds + -mmpx instrumented programs. + end + + files + %{libdir}/libmpx.so.* + %{libdir}/libmpxwrappers.so.* + end + end + end + package gcc-plugin-devel summary = Support for compiling GCC plugins. description diff --git a/git/git.nm b/git/git.nm index 9ad9bbefb..92b590f62 100644 --- a/git/git.nm +++ b/git/git.nm @@ -4,8 +4,8 @@ ###############################################################################
name = git -version = 2.6.3 -release = 3 +version = 2.16.1 +release = 1
groups = Development/Tools url = http://git-scm.com/ @@ -25,29 +25,36 @@ build asciidoc expat-devel gettext + gnupg2 + groff libcurl-devel openssl-devel + pcre2-devel perl-ExtUtils-MakeMaker perl-devel - zlib-devel + python-devel xmlto + zlib-devel end
prepare_cmds - echo "CFLAGS = %{CFLAGS}" > %{DIR_APP}/config.mak - echo "LDFLAGS = %{LDFLAGS}" > %{DIR_APP}/config.mak - echo "BLK_SHA1 = 1" >> %{DIR_APP}/config.mak - echo "NEEDS_CRYPTO_WITH_SSL = 1" >> %{DIR_APP}/config.mak - echo "NO_PYTHON = 1" >> %{DIR_APP}/config.mak - echo "NO_TCLTK = 1" >> %{DIR_APP}/config.mak - echo "ETC_GITCONFIG = /etc/gitconfig" >> %{DIR_APP}/config.mak - echo "DESTDIR = %{BUILDROOT}" >> %{DIR_APP}/config.mak - echo "INSTALL = install -p" >> %{DIR_APP}/config.mak - echo "GITWEB_PROJECTROOT = /var/lib/git" >> %{DIR_APP}/config.mak - echo "htmldir = /usr/share/doc/%{thisapp}" >> %{DIR_APP}/config.mak - echo "prefix = /usr" >> %{DIR_APP}/config.mak - echo "gitwebdir = /var/www/git" >> %{DIR_APP}/config.mak - echo "gitexecdir = lib/git-core" >> %{DIR_APP}/config.mak + cat <<EOF > config.mak + CFLAGS = %{CFLAGS} + LDFLAGS = %{LDFLAGS} + NEEDS_CRYPTO_WITH_SSL = 1 + USE_LIBPCRE2 = 1 + ETC_GITCONFIG = %{sysconfdir}/gitconfig + DESTDIR = %{BUILDROOT} + INSTALL = install -p + GITWEB_PROJECTROOT = %{localstatedir}/git + GNU_ROFF = 1 + NO_CROSS_DIRECTORY_HARDLINKS = 1 + PYTHON_PATH = %{python} + prefix = %{prefix} + gitexecdir = lib/git-core + htmldir = %{datadir}/doc + gitwebdir = %{localstatedir}/www/git + EOF
# Remove shebang from bash-completion script. sed -i '/^#!bash/,+1 d' contrib/completion/git-completion.bash diff --git a/glib2/glib2.nm b/glib2/glib2.nm index 26ad2370f..8d2f2558c 100644 --- a/glib2/glib2.nm +++ b/glib2/glib2.nm @@ -4,7 +4,7 @@ ###############################################################################
name = glib2 -ver_major = 2.50 +ver_major = 2.55 ver_minor = 1 version = %{ver_major}.%{ver_minor} release = 1 diff --git a/glibc/glibc.nm b/glibc/glibc.nm index 717c007a7..c17c336a7 100644 --- a/glibc/glibc.nm +++ b/glibc/glibc.nm @@ -5,7 +5,7 @@
name = glibc version = 2.26 -release = 2 +release = 3
maintainer = Michael Tremer michael.tremer@ipfire.org groups = System/Base diff --git a/glibc/patches/glibc-fedora-elf-init-hidden_undef.patch b/glibc/patches/glibc-fedora-elf-init-hidden_undef.patch deleted file mode 100644 index cd50d3b73..000000000 --- a/glibc/patches/glibc-fedora-elf-init-hidden_undef.patch +++ /dev/null @@ -1,30 +0,0 @@ -* Fri May 29 2003 Jakub Jelinek jakub@redhat.com 2.3.2-44 -- make __init_array_start etc. symbols in elf-init.oS hidden undefined - -diff -Nrup a/csu/elf-init.c b/csu/elf-init.c ---- a/csu/elf-init.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/csu/elf-init.c 2012-06-07 12:15:21.570319597 -0600 -@@ -63,6 +63,23 @@ extern void (*__init_array_end []) (int, - extern void (*__fini_array_start []) (void) attribute_hidden; - extern void (*__fini_array_end []) (void) attribute_hidden; - -+#if defined HAVE_VISIBILITY_ATTRIBUTE \ -+ && (defined SHARED || defined LIBC_NONSHARED) -+# define hidden_undef_2(x) #x -+# define hidden_undef_1(x) hidden_undef_2 (x) -+# define hidden_undef(x) \ -+ __asm (hidden_undef_1 (ASM_GLOBAL_DIRECTIVE) " " #x); \ -+ __asm (".hidden " #x); -+#else -+# define hidden_undef(x) -+#endif -+ -+hidden_undef (__preinit_array_start) -+hidden_undef (__preinit_array_end) -+hidden_undef (__init_array_start) -+hidden_undef (__init_array_end) -+hidden_undef (__fini_array_start) -+hidden_undef (__fini_array_end) - - /* These function symbols are provided for the .init/.fini section entry - points automagically by the linker. */ diff --git a/glibc/patches/glibc-fedora-elf-rh737223.patch b/glibc/patches/glibc-fedora-elf-rh737223.patch deleted file mode 100644 index 5ae6e3aa6..000000000 --- a/glibc/patches/glibc-fedora-elf-rh737223.patch +++ /dev/null @@ -1,15 +0,0 @@ -Binary files a/elf/.rtld.c.rej.swp and b/elf/.rtld.c.rej.swp differ -diff -Nrup a/elf/setup-vdso.h b/elf/setup-vdso.h ---- a/elf/setup-vdso.h 2012-10-10 21:34:38.000000000 -0600 -+++ b/elf/setup-vdso.h 2012-10-11 09:43:14.152958832 -0600 -@@ -93,7 +93,9 @@ setup_vdso (struct link_map *main_map __ - char *copy = malloc (len); - if (copy == NULL) - _dl_fatal_printf ("out of memory\n"); -- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); -+ l->l_libname->name = memcpy (copy, dsoname, len); -+ if (GLRO(dl_debug_mask)) -+ l->l_name = copy; - } - - /* Add the vDSO to the object list. */ diff --git a/glibc/patches/glibc-fedora-i386-tls-direct-seg-refs.patch b/glibc/patches/glibc-fedora-i386-tls-direct-seg-refs.patch deleted file mode 100644 index 80c0f0dbb..000000000 --- a/glibc/patches/glibc-fedora-i386-tls-direct-seg-refs.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -Nrup a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile ---- a/sysdeps/i386/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/i386/Makefile 2012-06-07 12:15:21.826318641 -0600 -@@ -62,6 +64,14 @@ endif - - ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS))) - defines += -DNO_TLS_DIRECT_SEG_REFS -+else -+# .a libraries are not performance critical and so we -+# build them without direct TLS segment references -+# always. -+CPPFLAGS-.o += -DNO_TLS_DIRECT_SEG_REFS -+CFLAGS-.o += -mno-tls-direct-seg-refs -+CPPFLAGS-.oS += -DNO_TLS_DIRECT_SEG_REFS -+CFLAGS-.oS += -mno-tls-direct-seg-refs - endif - - ifeq ($(subdir),elf) diff --git a/glibc/patches/glibc-fedora-ldd.patch b/glibc/patches/glibc-fedora-ldd.patch deleted file mode 100644 index 51aec739b..000000000 --- a/glibc/patches/glibc-fedora-ldd.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 83e5edd390eabe8f8e8e0d051f929b77a30c0767 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab schwab@redhat.com -Date: Fri, 18 Mar 2011 16:22:52 +0100 -Subject: [PATCH] ldd: never run file directly - -* elf/ldd.bash.in: Never run file directly. - ---- - ChangeLog | 4 ++++ - elf/ldd.bash.in | 14 +------------- - 2 files changed, 5 insertions(+), 13 deletions(-) - ---- a/elf/ldd.bash.in -+++ b/elf/ldd.bash.in -@@ -166,18 +166,6 @@ warning: you do not have execution permission for" "`$file'" >&2 - fi - done - case $ret in -- 0) -- # If the program exits with exit code 5, it means the process has been -- # invoked with __libc_enable_secure. Fall back to running it through -- # the dynamic linker. -- try_trace "$file" -- rc=$? -- if [ $rc = 5 ]; then -- try_trace "$RTLD" "$file" -- rc=$? -- fi -- [ $rc = 0 ] || result=1 -- ;; - 1) - # This can be a non-ELF binary or no binary at all. - nonelf "$file" || { -@@ -185,7 +173,7 @@ warning: you do not have execution permission for" "`$file'" >&2 - result=1 - } - ;; -- 2) -+ 0|2) - try_trace "$RTLD" "$file" || result=1 - ;; - *) diff --git a/glibc/patches/glibc-fedora-linux-tcsetattr.patch b/glibc/patches/glibc-fedora-linux-tcsetattr.patch deleted file mode 100644 index 066ac484b..000000000 --- a/glibc/patches/glibc-fedora-linux-tcsetattr.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -Nrup a/sysdeps/unix/sysv/linux/tcsetattr.c b/sysdeps/unix/sysv/linux/tcsetattr.c ---- a/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-05 07:42:49.000000000 -0600 -+++ b/sysdeps/unix/sysv/linux/tcsetattr.c 2012-06-07 12:15:21.831318623 -0600 -@@ -48,6 +48,7 @@ tcsetattr (fd, optional_actions, termios - { - struct __kernel_termios k_termios; - unsigned long int cmd; -+ int retval; - - switch (optional_actions) - { -@@ -79,6 +80,35 @@ tcsetattr (fd, optional_actions, termios - memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], - __KERNEL_NCCS * sizeof (cc_t)); - -- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); -+ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); -+ -+ if (retval == 0 && cmd == TCSETS) -+ { -+ /* The Linux kernel has a bug which silently ignore the invalid -+ c_cflag on pty. We have to check it here. */ -+ int save = errno; -+ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); -+ if (retval) -+ { -+ /* We cannot verify if the setting is ok. We don't return -+ an error (?). */ -+ __set_errno (save); -+ retval = 0; -+ } -+ else if ((termios_p->c_cflag & (PARENB | CREAD)) -+ != (k_termios.c_cflag & (PARENB | CREAD)) -+ || ((termios_p->c_cflag & CSIZE) -+ && ((termios_p->c_cflag & CSIZE) -+ != (k_termios.c_cflag & CSIZE)))) -+ { -+ /* It looks like the Linux kernel silently changed the -+ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an -+ error. */ -+ __set_errno (EINVAL); -+ retval = -1; -+ } -+ } -+ -+ return retval; - } - libc_hidden_def (tcsetattr) diff --git a/glibc/patches/glibc-fedora-nis-rh188246.patch b/glibc/patches/glibc-fedora-nis-rh188246.patch deleted file mode 100644 index 938990130..000000000 --- a/glibc/patches/glibc-fedora-nis-rh188246.patch +++ /dev/null @@ -1,21 +0,0 @@ -From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek jakub@redhat.com -Date: Mon, 1 May 2006 08:02:53 +0000 -Subject: [PATCH] Enable SETENT_BATCH_READ nis/nss option by default - -* Mon May 1 2006 Jakub Jelinek jakub@redhat.com 2.4.90-4 -- SETENT_BATCH_READ /etc/default/nss option for speeding up - some usages of NIS+ (#188246) - -diff --git a/nis/nss b/nis/nss ---- a/nis/nss -+++ b/nis/nss -@@ -25,7 +25,7 @@ - # memory with every getXXent() call. Otherwise each getXXent() call - # might result into a network communication with the server to get - # the next entry. --#SETENT_BATCH_READ=TRUE -+SETENT_BATCH_READ=TRUE - # - # ADJUNCT_AS_SHADOW - # If set to TRUE, the passwd routines in the NIS NSS module will not diff --git a/glibc/patches/glibc-fedora-nptl-linklibc.patch b/glibc/patches/glibc-fedora-nptl-linklibc.patch deleted file mode 100644 index 1a794772e..000000000 --- a/glibc/patches/glibc-fedora-nptl-linklibc.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -Nrup a/nptl/Makefile b/nptl/Makefile ---- a/nptl/Makefile 2012-06-05 07:42:49.000000000 -0600 -+++ b/nptl/Makefile 2012-06-07 12:15:21.816318678 -0600 -@@ -529,15 +529,19 @@ $(addprefix $(objpfx), \ - $(tests) $(xtests) $(test-srcs))): $(objpfx)libpthread.so \ - $(objpfx)libpthread_nonshared.a - $(objpfx)tst-unload: $(libdl) --# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so, -+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so, - # since otherwise libpthread.so comes before libc.so when linking. - $(addprefix $(objpfx), $(tests-reverse)): \ -- $(objpfx)../libc.so $(objpfx)libpthread.so \ -+ $(objpfx)linklibc.so $(objpfx)libpthread.so \ - $(objpfx)libpthread_nonshared.a - $(objpfx)../libc.so: $(common-objpfx)libc.so ; - $(addprefix $(objpfx),$(tests-static) $(xtests-static)): $(objpfx)libpthread.a - - $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so -+ -+$(objpfx)linklibc.so: $(common-objpfx)libc.so -+ ln -s ../libc.so $@ -+generated += libclink.so - else - $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a - endif diff --git a/glibc/patches/glibc-rh819430.patch b/glibc/patches/glibc-rh819430.patch deleted file mode 100644 index b22e42171..000000000 --- a/glibc/patches/glibc-rh819430.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c ---- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500 -+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400 -@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags) - # if HANDLE_MULTIBYTE - if (__builtin_expect (MB_CUR_MAX, 1) != 1) - { -+ const char *orig_pattern = pattern; - mbstate_t ps; - size_t n; - const char *p; -@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags) - alloca_used); - n = mbsrtowcs (wpattern, &p, n + 1, &ps); - if (__glibc_unlikely (n == (size_t) -1)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- return -1; -+ /* Something wrong: Fall back to single byte matching. */ -+ goto try_singlebyte; - if (p) - { - memset (&ps, '\0', sizeof (ps)); -@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags) - prepare_wpattern: - n = mbsrtowcs (NULL, &pattern, 0, &ps); - if (__glibc_unlikely (n == (size_t) -1)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- return -1; -+ /*Something wrong: Fall back to single byte matching. */ -+ goto try_singlebyte; - if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t))) - { - __set_errno (ENOMEM); -@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags) - alloca_used); - n = mbsrtowcs (wstring, &p, n + 1, &ps); - if (__glibc_unlikely (n == (size_t) -1)) -- { -- /* Something wrong. -- XXX Do we have to set `errno' to something which -- mbsrtows hasn't already done? */ -- free_return: -- free (wpattern_malloc); -- return -1; -- } -+ /* Something wrong: Fall back to single byte matching. */ -+ goto free_and_try_singlebyte; - if (p) - { - memset (&ps, '\0', sizeof (ps)); -@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags) - prepare_wstring: - n = mbsrtowcs (NULL, &string, 0, &ps); - if (__glibc_unlikely (n == (size_t) -1)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- goto free_return; -+ /* Something wrong: Fall back to singlebyte matching. */ -+ goto free_and_try_singlebyte; - if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t))) - { - free (wpattern_malloc); -@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags) - free (wpattern_malloc); - - return res; -+ free_and_try_singlebyte: -+ free(wpattern_malloc); -+ try_singlebyte: -+ pattern = orig_pattern; - } - # endif /* mbstate_t and mbsrtowcs or _LIBC. */ - diff --git a/glibc/patches/glibc-rh952799.patch b/glibc/patches/glibc-rh952799.patch deleted file mode 100644 index 9fe22aacb..000000000 --- a/glibc/patches/glibc-rh952799.patch +++ /dev/null @@ -1,181 +0,0 @@ -# -# Red Hat BZ: -# https://bugzilla.redhat.com/show_bug.cgi?id=816647 -# -# ChangeLog -# -#2013-04-30 Patsy Franklin pfrankli@redhat.com -# -# * iconv/gconv_cache.c (find_module): Demangle init_fct before -# checking for NULL. Mangle __btowc_fct if init_fct is non-NULL. -# * iconv/gconv_db.c (free_derivation): Check that __shlib_handle -# is non-NULL before demangling the end_fct. Check for NULL -# end_fct after demangling. -# (__gconv_release_step): Demangle the end_fct before checking -# it for NULL. Remove assert on __shlibc_handle != NULL. -# (gen_steps): Don't check btowc_fct for NULL before mangling. -# Demangle init_fct before checking for NULL. -# (increment_counter): Likewise -# * gconv_dl.c (__gconv_find_shlib): Don't check init_fct or -# end_fct for NULL before mangling. -# * wcsmbs/btowc.c (__btowc): Demangle btowc_fct before checking -# for NULL. -# -diff -Nrup a/iconv/gconv_cache.c b/iconv/gconv_cache.c ---- a/iconv/gconv_cache.c 2012-12-24 22:02:13.000000000 -0500 -+++ b/iconv/gconv_cache.c 2013-04-30 06:43:24.788684270 -0400 -@@ -207,17 +207,16 @@ find_module (const char *directory, cons - result->__data = NULL; - - /* Call the init function. */ -- if (result->__init_fct != NULL) -- { -- __gconv_init_fct init_fct = result->__init_fct; -+ __gconv_init_fct init_fct = result->__init_fct; - #ifdef PTR_DEMANGLE -- PTR_DEMANGLE (init_fct); -+ PTR_DEMANGLE (init_fct); - #endif -+ if (init_fct != NULL) -+ { - status = DL_CALL_FCT (init_fct, (result)); - - #ifdef PTR_MANGLE -- if (result->__btowc_fct != NULL) -- PTR_MANGLE (result->__btowc_fct); -+ PTR_MANGLE (result->__btowc_fct); - #endif - } - } -diff -Nrup a/iconv/gconv_db.c b/iconv/gconv_db.c ---- a/iconv/gconv_db.c 2012-12-24 22:02:13.000000000 -0500 -+++ b/iconv/gconv_db.c 2013-04-30 06:37:16.886521576 -0400 -@@ -179,16 +179,15 @@ free_derivation (void *p) - size_t cnt; - - for (cnt = 0; cnt < deriv->nsteps; ++cnt) -- if (deriv->steps[cnt].__counter > 0 -- && deriv->steps[cnt].__end_fct != NULL) -+ if ((deriv->steps[cnt].__counter > 0) -+ && (deriv->steps[cnt].__shlib_handle != NULL)) - { -- assert (deriv->steps[cnt].__shlib_handle != NULL); -- - __gconv_end_fct end_fct = deriv->steps[cnt].__end_fct; - #ifdef PTR_DEMANGLE - PTR_DEMANGLE (end_fct); - #endif -- DL_CALL_FCT (end_fct, (&deriv->steps[cnt])); -+ if (end_fct != NULL) -+ DL_CALL_FCT (end_fct, (&deriv->steps[cnt])); - } - - /* Free the name strings. */ -@@ -212,16 +211,12 @@ __gconv_release_step (struct __gconv_ste - if (step->__shlib_handle != NULL && --step->__counter == 0) - { - /* Call the destructor. */ -- if (step->__end_fct != NULL) -- { -- assert (step->__shlib_handle != NULL); -- -- __gconv_end_fct end_fct = step->__end_fct; -+ __gconv_end_fct end_fct = step->__end_fct; - #ifdef PTR_DEMANGLE -- PTR_DEMANGLE (end_fct); -+ PTR_DEMANGLE (end_fct); - #endif -- DL_CALL_FCT (end_fct, (step)); -- } -+ if (end_fct != NULL) -+ DL_CALL_FCT (end_fct, (step)); - - #ifndef STATIC_GCONV - /* Release the loaded module. */ -@@ -293,13 +288,11 @@ gen_steps (struct derivation_step *best, - - /* Call the init function. */ - __gconv_init_fct init_fct = result[step_cnt].__init_fct; -- if (init_fct != NULL) -- { -- assert (result[step_cnt].__shlib_handle != NULL); -- - # ifdef PTR_DEMANGLE -- PTR_DEMANGLE (init_fct); -+ PTR_DEMANGLE (init_fct); - # endif -+ if (init_fct != NULL) -+ { - status = DL_CALL_FCT (init_fct, (&result[step_cnt])); - - if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK) -@@ -312,8 +305,7 @@ gen_steps (struct derivation_step *best, - } - - # ifdef PTR_MANGLE -- if (result[step_cnt].__btowc_fct != NULL) -- PTR_MANGLE (result[step_cnt].__btowc_fct); -+ PTR_MANGLE (result[step_cnt].__btowc_fct); - # endif - } - } -@@ -393,16 +385,15 @@ increment_counter (struct __gconv_step * - - /* Call the init function. */ - __gconv_init_fct init_fct = step->__init_fct; -- if (init_fct != NULL) -- { - #ifdef PTR_DEMANGLE -- PTR_DEMANGLE (init_fct); -+ PTR_DEMANGLE (init_fct); - #endif -+ if (init_fct != NULL) -+ { - DL_CALL_FCT (init_fct, (step)); - - #ifdef PTR_MANGLE -- if (step->__btowc_fct != NULL) -- PTR_MANGLE (step->__btowc_fct); -+ PTR_MANGLE (step->__btowc_fct); - #endif - } - } -diff -Nrup a/iconv/gconv_dl.c b/iconv/gconv_dl.c ---- a/iconv/gconv_dl.c 2012-12-24 22:02:13.000000000 -0500 -+++ b/iconv/gconv_dl.c 2013-04-30 06:37:16.889521601 -0400 -@@ -132,10 +132,8 @@ __gconv_find_shlib (const char *name) - - #ifdef PTR_MANGLE - PTR_MANGLE (found->fct); -- if (found->init_fct != NULL) -- PTR_MANGLE (found->init_fct); -- if (found->end_fct != NULL) -- PTR_MANGLE (found->end_fct); -+ PTR_MANGLE (found->init_fct); -+ PTR_MANGLE (found->end_fct); - #endif - - /* We have succeeded in loading the shared object. */ -diff -Nrup a/wcsmbs/btowc.c b/wcsmbs/btowc.c ---- a/wcsmbs/btowc.c 2012-12-24 22:02:13.000000000 -0500 -+++ b/wcsmbs/btowc.c 2013-04-30 06:37:16.891521619 -0400 -@@ -47,15 +47,15 @@ __btowc (c) - /* Get the conversion functions. */ - fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); - __gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct; -+#ifdef PTR_DEMANGLE -+ if (fcts->towc->__shlib_handle != NULL) -+ PTR_DEMANGLE (btowc_fct); -+#endif - - if (__builtin_expect (fcts->towc_nsteps == 1, 1) - && __builtin_expect (btowc_fct != NULL, 1)) - { - /* Use the shortcut function. */ --#ifdef PTR_DEMANGLE -- if (fcts->towc->__shlib_handle != NULL) -- PTR_DEMANGLE (btowc_fct); --#endif - return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c)); - } - else diff --git a/gmp/gmp.nm b/gmp/gmp.nm index b81cd6abf..7bcfabe23 100644 --- a/gmp/gmp.nm +++ b/gmp/gmp.nm @@ -4,7 +4,7 @@ ###############################################################################
name = gmp -version = 6.1.0 +version = 6.1.2 release = 1
groups = System/Libraries diff --git a/hostapd/hostapd.nm b/hostapd/hostapd.nm index d169c5c02..100343a0d 100644 --- a/hostapd/hostapd.nm +++ b/hostapd/hostapd.nm @@ -4,7 +4,7 @@ ###############################################################################
name = hostapd -version = 2.5 +version = 2.6 release = 1
groups = Networking/Tools diff --git a/mpfr/mpfr.nm b/mpfr/mpfr.nm index cf3924f53..bebcd7a0c 100644 --- a/mpfr/mpfr.nm +++ b/mpfr/mpfr.nm @@ -4,7 +4,7 @@ ###############################################################################
name = mpfr -version = 3.1.5 +version = 4.0.0 release = 1
groups = System/Libraries diff --git a/openssl/openssl.nm b/openssl/openssl.nm index aaf6b5388..6b0cd8d6e 100644 --- a/openssl/openssl.nm +++ b/openssl/openssl.nm @@ -4,8 +4,8 @@ ###############################################################################
name = openssl -version = 1.0.2d -release = 4 +version = 1.1.0g +release = 1
maintainer = Michael Tremer michael.tremer@ipfire.org groups = System/Libraries @@ -23,36 +23,37 @@ source_dl = http://openssl.org/source/
build requires - bc - gnutls-devel + ca-certificates + coreutils perl - util-linux + perl(Math::BigInt) + perl(Module::Load::Conditional) + perl(Test::Harness) + perl(Test::More) + sed zlib-devel end
- CFLAGS += -DPURIFY - export RPM_OPT_FLAGS = %{CFLAGS} %{LDFLAGS} + export HASHBANGPERL = %{bindir}/perl
- prepare_cmds - sed -e 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' \ - -i crypto/opensslv.h - - find crypto/ -name Makefile -exec \ - sed 's/^ASFLAGS=/&-Wa,--noexecstack /' -i {} ; - - # Generate a table with the compile settings for my perusal. - touch Makefile - make TABLE PERL=/usr/bin/perl - end + CFLAGS += -DPURIFY -Wa,--noexecstack
# Set default ssl_arch. ssl_arch = linux-%{DISTRO_ARCH}
+ if "%{DISTRO_ARCH}" == "x86_64" + ssl_arch += enable-ec_nistp_64_gcc_128 + end + if "%{DISTRO_ARCH}" == "i686" # 386 implies no-sse2 ssl_arch = linux-elf no-asm 386 end
+ if "%{DISTRO_ARCH}" == "aarch64" + ssl_arch += enable-ec_nistp_64_gcc_128 + end + if "%{DISTRO_ARCH}" == "armv5tel" ssl_arch = linux-armv4 end @@ -63,84 +64,63 @@ build
build ./Configure \ - --prefix=/usr \ - --openssldir=/etc/pki/tls \ - --enginesdir=%{libdir}/openssl/engines \ + --prefix=%{prefix} \ + --openssldir=%{sysconfdir}/pki/tls \ shared \ - zlib-dynamic \ + zlib \ enable-camellia \ - enable-md2 \ enable-seed \ - enable-tlsext \ enable-rfc3779 \ - no-idea \ - no-mdc2 \ + enable-ssl3 \ + enable-ssl3-method \ + no-rc4 \ no-rc5 \ - no-ec2m \ - no-srp \ - -DSSL_FORBID_ENULL \ - %{ssl_arch} + %{ssl_arch} \ + ${CFLAGS} \ + ${LDFLAGS}
- # Build. - make depend + util/mkdef.pl crypto update make all
- # Generate hashes for the included certs. - make rehash + # Clean up the .pc files + for i in libcrypto.pc libssl.pc openssl.pc; do + sed -i '/^Libs.private:/{s/-L[^ ]* //;s/-Wl[^ ]* //}' $i + done end
test # Revert ca-dir patch. Otherwise the tests will fail. - patch -Np1 -R < %{DIR_PATCHES}/openssl-1.0.0-beta4-ca-dir.patch + patch -Np1 -R < %{DIR_PATCHES}/openssl-1.1.0-ca-dir.patch
make test end
install - make install build-shared INSTALL_PREFIX=%{BUILDROOT} - - # Install manpages do right place - mkdir -pv %{BUILDROOT}/usr/share - mv -v %{BUILDROOT}/etc/pki/tls/man %{BUILDROOT}/usr/share/ - - if [ -d "%{BUILDROOT}%{libdir}/engines" ]; then - mkdir -pv %{BUILDROOT}%{libdir}/openssl - mv -v %{BUILDROOT}%{libdir}/engines %{BUILDROOT}%{libdir}/openssl - fi - - mkdir -pv %{BUILDROOT}/etc/pki/CA/private - chmod -v 700 -R %{BUILDROOT}/etc/pki/CA - - mkdir -pv %{BUILDROOT}/etc/pki/tls - install -m 0644 %{DIR_SOURCE}/openssl.cnf %{BUILDROOT}/etc/pki/tls - cp -v -r certs %{BUILDROOT}/etc/pki/tls + make install DESTDIR=%{BUILDROOT}
# Rename man pages so that they don't conflict with other system man pages. pushd %{BUILDROOT}%{mandir} - for m in $(find . -type f | xargs grep -L '#include'); do - d="${m%/*}" - d="${d#./}" - m="${m##*/}" - [[ ${m} == openssl.1* ]] && continue - [[ -n "$(find -L "${d}" -type l)" ]] && exit 1 - mv ${d}/{,ssl-}${m} - - # fix up references to renamed man pages - sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:([^(, ]*(1)):ssl-\1:g' "${d}/ssl-${m}" - ln -s "ssl-${m}" "${d}/openssl-${m}" - - # locate any symlinks that point to this man page ... we assume - # that any broken links are due to the above renaming - for s in $(find -L "${d}" -type l); do - s="${s##*/}" - rm -f "${d}/${s}" - ln -s "ssl-${m}" "${d}/ssl-${s}" - ln -s "ssl-${s}" "${d}/openssl-${s}" - done + ln -svf config.5 man5/openssl.cnf.5 + for manpage in man*/*; do + if [ -L "${manpage}" ]; then + TARGET=$(ls -l "${manpage}" | awk '{ print $NF }') + ln -snf "${TARGET}ssl" "${manpage}ssl" + rm -f "${manpage}" + else + mv ${manpage} ${manpage}ssl + fi + done + for conflict in passwd rand; do + rename ${conflict} ssl${conflict} man*/${conflict}* + ln -svf ssl${conflict}.1ssl %{BUILDROOT}%{mandir}/man1/openssl-${conflict}.1ssl done - - [[ -n "$(find -L "${d}" -type l)" ]] && exit 1 # "broken manpage links found :(" popd + + # Remove dist config + rm -vf %{BUILDROOT}%{sysconfdir}/pki/tls/openssl.cnf.dist + + # Move executable stuff to %{bindir} + mv -v %{BUILDROOT}%{sysconfdir}/pki/tls/misc/{CA.pl,tsget} %{BUILDROOT}%{bindir} end end
@@ -156,7 +136,7 @@ packages
conflicts += %{name} < %{thisver}
- files += %{libdir}/openssl + files += %{libdir}/openssl %{libdir}/engines* end
package %{name}-devel diff --git a/openssl/patches/openssl-1.1.0-build.patch b/openssl/patches/openssl-1.1.0-build.patch new file mode 100644 index 000000000..bedd95796 --- /dev/null +++ b/openssl/patches/openssl-1.1.0-build.patch @@ -0,0 +1,73 @@ +diff -up openssl-1.1.0f/Configurations/unix-Makefile.tmpl.build openssl-1.1.0f/Configurations/unix-Makefile.tmpl +--- openssl-1.1.0f/Configurations/unix-Makefile.tmpl.build 2017-06-02 13:51:39.621289504 +0200 ++++ openssl-1.1.0f/Configurations/unix-Makefile.tmpl 2017-06-02 13:54:45.298654812 +0200 +@@ -553,7 +553,7 @@ uninstall_runtime: + install_man_docs: + @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1) + @echo "*** Installing manpages" +- $(PERL) $(SRCDIR)/util/process_docs.pl \ ++ TZ=UTC $(PERL) $(SRCDIR)/util/process_docs.pl \ + --destdir=$(DESTDIR)$(MANDIR) --type=man --suffix=$(MANSUFFIX) + + uninstall_man_docs: +@@ -565,7 +565,7 @@ uninstall_man_docs: + install_html_docs: + @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1) + @echo "*** Installing HTML manpages" +- $(PERL) $(SRCDIR)/util/process_docs.pl \ ++ TZ=UTC $(PERL) $(SRCDIR)/util/process_docs.pl \ + --destdir=$(DESTDIR)$(HTMLDIR) --type=html + + uninstall_html_docs: +diff -up openssl-1.1.0f/Configurations/10-main.conf.build openssl-1.1.0f/Configurations/10-main.conf +--- openssl-1.1.0f/Configurations/10-main.conf.build 2017-05-25 14:46:17.000000000 +0200 ++++ openssl-1.1.0f/Configurations/10-main.conf 2017-06-02 13:51:39.622289528 +0200 +@@ -662,6 +662,7 @@ sub vms_info { + cflags => add("-m64 -DL_ENDIAN"), + perlasm_scheme => "linux64le", + shared_ldflag => add("-m64"), ++ multilib => "64", + }, + + "linux-armv4" => { +@@ -702,6 +703,7 @@ sub vms_info { + "linux-aarch64" => { + inherit_from => [ "linux-generic64", asm("aarch64_asm") ], + perlasm_scheme => "linux64", ++ multilib => "64", + }, + "linux-arm64ilp32" => { # https://wiki.linaro.org/Platform/arm64-ilp32 + inherit_from => [ "linux-generic32", asm("aarch64_asm") ], +diff -up openssl-1.1.0g/test/evptests.txt.build openssl-1.1.0g/test/evptests.txt +--- openssl-1.1.0g/test/evptests.txt.build 2017-11-02 15:29:05.000000000 +0100 ++++ openssl-1.1.0g/test/evptests.txt 2017-11-03 16:37:01.253671494 +0100 +@@ -3707,14 +3707,6 @@ MCowBQYDK2VuAyEA3p7bfXt9wbTTW2HC7OQ1Nz+D + + PrivPubKeyPair = Bob-25519:Bob-25519-PUBLIC + +-Derive=Alice-25519 +-PeerKey=Bob-25519-PUBLIC +-SharedSecret=4A5D9D5BA4CE2DE1728E3BF480350F25E07E21C947D19E3376F09B3C1E161742 +- +-Derive=Bob-25519 +-PeerKey=Alice-25519-PUBLIC +-SharedSecret=4A5D9D5BA4CE2DE1728E3BF480350F25E07E21C947D19E3376F09B3C1E161742 +- + # Illegal sign/verify operations with X25519 key + + Sign=Alice-25519 +@@ -3727,6 +3719,14 @@ Result = KEYOP_INIT_ERROR + Function = EVP_PKEY_verify_init + Reason = operation not supported for this keytype + ++Derive=Alice-25519 ++PeerKey=Bob-25519-PUBLIC ++SharedSecret=4A5D9D5BA4CE2DE1728E3BF480350F25E07E21C947D19E3376F09B3C1E161742 ++ ++Derive=Bob-25519 ++PeerKey=Alice-25519-PUBLIC ++SharedSecret=4A5D9D5BA4CE2DE1728E3BF480350F25E07E21C947D19E3376F09B3C1E161742 ++ + ## ECDH Tests: test with randomly generated keys for all the listed curves + + diff --git a/openssl/patches/openssl-1.1.0-ca-dir.patch b/openssl/patches/openssl-1.1.0-ca-dir.patch new file mode 100644 index 000000000..421559de5 --- /dev/null +++ b/openssl/patches/openssl-1.1.0-ca-dir.patch @@ -0,0 +1,24 @@ +diff -up openssl-1.1.0-pre5/apps/CA.pl.in.ca-dir openssl-1.1.0-pre5/apps/CA.pl.in +--- openssl-1.1.0-pre5/apps/CA.pl.in.ca-dir 2016-07-18 15:19:40.118110405 +0200 ++++ openssl-1.1.0-pre5/apps/CA.pl.in 2016-07-18 15:21:06.531061337 +0200 +@@ -26,7 +26,7 @@ my $X509 = "$openssl x509"; + my $PKCS12 = "$openssl pkcs12"; + + # default openssl.cnf file has setup as per the following +-my $CATOP = "./demoCA"; ++my $CATOP = "/etc/pki/CA"; + my $CAKEY = "cakey.pem"; + my $CAREQ = "careq.pem"; + my $CACERT = "cacert.pem"; +diff -up openssl-1.1.0-pre5/apps/openssl.cnf.ca-dir openssl-1.1.0-pre5/apps/openssl.cnf +--- openssl-1.1.0-pre5/apps/openssl.cnf.ca-dir 2016-07-18 15:19:40.114110315 +0200 ++++ openssl-1.1.0-pre5/apps/openssl.cnf 2016-07-18 15:19:48.492299467 +0200 +@@ -39,7 +39,7 @@ default_ca = CA_default # The default c + #################################################################### + [ CA_default ] + +-dir = ./demoCA # Where everything is kept ++dir = /etc/pki/CA # Where everything is kept + certs = $dir/certs # Where the issued certs are kept + crl_dir = $dir/crl # Where the issued crl are kept + database = $dir/index.txt # database index file. diff --git a/openssl/patches/openssl-1.1.0-defaults.patch b/openssl/patches/openssl-1.1.0-defaults.patch new file mode 100644 index 000000000..2a88cef92 --- /dev/null +++ b/openssl/patches/openssl-1.1.0-defaults.patch @@ -0,0 +1,51 @@ +diff -up openssl-1.1.0-pre5/apps/openssl.cnf.defaults openssl-1.1.0-pre5/apps/openssl.cnf +--- openssl-1.1.0-pre5/apps/openssl.cnf.defaults 2016-04-19 16:57:52.000000000 +0200 ++++ openssl-1.1.0-pre5/apps/openssl.cnf 2016-07-18 14:22:08.252691017 +0200 +@@ -72,7 +72,7 @@ cert_opt = ca_default # Certificate fi + + default_days = 365 # how long to certify for + default_crl_days= 30 # how long before next CRL +-default_md = default # use public key default MD ++default_md = sha256 # use SHA-256 by default + preserve = no # keep passed DN ordering + + # A few difference way of specifying how similar the request should look +@@ -104,6 +104,7 @@ emailAddress = optional + #################################################################### + [ req ] + default_bits = 2048 ++default_md = sha256 + default_keyfile = privkey.pem + distinguished_name = req_distinguished_name + attributes = req_attributes +@@ -126,17 +127,18 @@ string_mask = utf8only + + [ req_distinguished_name ] + countryName = Country Name (2 letter code) +-countryName_default = AU ++countryName_default = XX + countryName_min = 2 + countryName_max = 2 + + stateOrProvinceName = State or Province Name (full name) +-stateOrProvinceName_default = Some-State ++#stateOrProvinceName_default = Default Province + + localityName = Locality Name (eg, city) ++localityName_default = Default City + + 0.organizationName = Organization Name (eg, company) +-0.organizationName_default = Internet Widgits Pty Ltd ++0.organizationName_default = Default Company Ltd + + # we can do this but it is not needed normally :-) + #1.organizationName = Second Organization Name (eg, company) +@@ -145,7 +147,7 @@ localityName = Locality Name (eg, city + organizationalUnitName = Organizational Unit Name (eg, section) + #organizationalUnitName_default = + +-commonName = Common Name (e.g. server FQDN or YOUR name) ++commonName = Common Name (eg, your name or your server's hostname) + commonName_max = 64 + + emailAddress = Email Address diff --git a/openssl/patches/openssl-1.1.0-disable-ssl3.patch b/openssl/patches/openssl-1.1.0-disable-ssl3.patch new file mode 100644 index 000000000..267c02c62 --- /dev/null +++ b/openssl/patches/openssl-1.1.0-disable-ssl3.patch @@ -0,0 +1,86 @@ +diff -up openssl-1.1.0f/apps/s_client.c.disable-ssl3 openssl-1.1.0f/apps/s_client.c +--- openssl-1.1.0f/apps/s_client.c.disable-ssl3 2017-06-05 15:42:44.838853312 +0200 ++++ openssl-1.1.0f/apps/s_client.c 2017-07-17 14:50:06.468821871 +0200 +@@ -1486,6 +1486,9 @@ int s_client_main(int argc, char **argv) + if (sdebug) + ssl_ctx_security_debug(ctx, sdebug); + ++ if (min_version == SSL3_VERSION && max_version == SSL3_VERSION) ++ SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv3); ++ + if (ssl_config) { + if (SSL_CTX_config(ctx, ssl_config) == 0) { + BIO_printf(bio_err, "Error using configuration "%s"\n", +diff -up openssl-1.1.0f/apps/s_server.c.disable-ssl3 openssl-1.1.0f/apps/s_server.c +--- openssl-1.1.0f/apps/s_server.c.disable-ssl3 2017-05-25 14:46:18.000000000 +0200 ++++ openssl-1.1.0f/apps/s_server.c 2017-07-17 14:49:50.434447583 +0200 +@@ -1614,6 +1614,10 @@ int s_server_main(int argc, char *argv[] + } + if (sdebug) + ssl_ctx_security_debug(ctx, sdebug); ++ ++ if (min_version == SSL3_VERSION && max_version == SSL3_VERSION) ++ SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv3); ++ + if (ssl_config) { + if (SSL_CTX_config(ctx, ssl_config) == 0) { + BIO_printf(bio_err, "Error using configuration "%s"\n", +diff -up openssl-1.1.0/ssl/ssl_lib.c.disable-ssl3 openssl-1.1.0/ssl/ssl_lib.c +--- openssl-1.1.0/ssl/ssl_lib.c.disable-ssl3 2016-08-25 17:29:22.000000000 +0200 ++++ openssl-1.1.0/ssl/ssl_lib.c 2016-09-08 11:08:05.252082263 +0200 +@@ -2470,6 +2470,13 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *m + * or by using the SSL_CONF library. + */ + ret->options |= SSL_OP_NO_COMPRESSION; ++ /* ++ * Disable SSLv3 by default. Applications can ++ * re-enable it by configuring ++ * SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv3); ++ * or by using the SSL_CONF library. ++ */ ++ ret->options |= SSL_OP_NO_SSLv3; + + ret->tlsext_status_type = -1; + +diff -up openssl-1.1.0/test/ssl_test.c.disable-ssl3 openssl-1.1.0/test/ssl_test.c +--- openssl-1.1.0/test/ssl_test.c.disable-ssl3 2016-09-08 11:08:05.252082263 +0200 ++++ openssl-1.1.0/test/ssl_test.c 2016-09-08 11:11:44.802005886 +0200 +@@ -258,6 +258,7 @@ static int execute_test(SSL_TEST_FIXTURE + SSL_TEST_SERVERNAME_CB_NONE) { + server2_ctx = SSL_CTX_new(TLS_server_method()); + TEST_check(server2_ctx != NULL); ++ SSL_CTX_clear_options(server2_ctx, SSL_OP_NO_SSLv3); + } + client_ctx = SSL_CTX_new(TLS_client_method()); + +@@ -266,11 +267,15 @@ static int execute_test(SSL_TEST_FIXTURE + resume_client_ctx = SSL_CTX_new(TLS_client_method()); + TEST_check(resume_server_ctx != NULL); + TEST_check(resume_client_ctx != NULL); ++ SSL_CTX_clear_options(resume_server_ctx, SSL_OP_NO_SSLv3); ++ SSL_CTX_clear_options(resume_client_ctx, SSL_OP_NO_SSLv3); + } + } + + TEST_check(server_ctx != NULL); + TEST_check(client_ctx != NULL); ++ SSL_CTX_clear_options(server_ctx, SSL_OP_NO_SSLv3); ++ SSL_CTX_clear_options(client_ctx, SSL_OP_NO_SSLv3); + + TEST_check(CONF_modules_load(conf, fixture.test_app, 0) > 0); + +diff -up openssl-1.1.0/test/ssltest_old.c.disable-ssl3 openssl-1.1.0/test/ssltest_old.c +--- openssl-1.1.0/test/ssltest_old.c.disable-ssl3 2016-08-25 17:29:23.000000000 +0200 ++++ openssl-1.1.0/test/ssltest_old.c 2016-09-08 11:08:05.253082286 +0200 +@@ -1456,6 +1456,11 @@ int main(int argc, char *argv[]) + ERR_print_errors(bio_err); + goto end; + } ++ ++ SSL_CTX_clear_options(c_ctx, SSL_OP_NO_SSLv3); ++ SSL_CTX_clear_options(s_ctx, SSL_OP_NO_SSLv3); ++ SSL_CTX_clear_options(s_ctx2, SSL_OP_NO_SSLv3); ++ + /* + * Since we will use low security ciphersuites and keys for testing set + * security level to zero by default. Tests can override this by adding diff --git a/openssl/patches/openssl-1.1.0-no-html.patch b/openssl/patches/openssl-1.1.0-no-html.patch new file mode 100644 index 000000000..f6a941ea0 --- /dev/null +++ b/openssl/patches/openssl-1.1.0-no-html.patch @@ -0,0 +1,12 @@ +diff -up openssl-1.1.0-pre5/Configurations/unix-Makefile.tmpl.nohtml openssl-1.1.0-pre5/Configurations/unix-Makefile.tmpl +--- openssl-1.1.0-pre5/Configurations/unix-Makefile.tmpl.no-html 2016-04-19 16:57:52.000000000 +0200 ++++ openssl-1.1.0-pre5/Configurations/unix-Makefile.tmpl 2016-07-18 13:58:55.060106243 +0200 +@@ -288,7 +288,7 @@ install_sw: all install_dev install_engi + + uninstall_sw: uninstall_runtime uninstall_engines uninstall_dev + +-install_docs: install_man_docs install_html_docs ++install_docs: install_man_docs + + uninstall_docs: uninstall_man_docs uninstall_html_docs + $(RM) -r -v $(DESTDIR)$(DOCDIR) diff --git a/openssl/patches/openssl-1.1.0g-tests.patch b/openssl/patches/openssl-1.1.0g-tests.patch new file mode 100644 index 000000000..c16c53311 --- /dev/null +++ b/openssl/patches/openssl-1.1.0g-tests.patch @@ -0,0 +1,33 @@ +--- openssl-1.1.0g/test/recipes/40-test_rehash.t~ 2018-01-28 19:08:01.151912658 +0000 ++++ openssl-1.1.0g/test/recipes/40-test_rehash.t 2018-01-28 19:09:19.408454430 +0000 +@@ -23,7 +23,7 @@ + plan skip_all => "test_rehash is not available on this platform" + unless run(app(["openssl", "rehash", "-help"])); + +-plan tests => 5; ++plan tests => 3; + + indir "rehash.$$" => sub { + prepare(); +@@ -42,21 +42,6 @@ + 'Testing rehash operations on empty directory'); + }, create => 1, cleanup => 1; + +-indir "rehash.$$" => sub { +- prepare(); +- chmod 0500, curdir(); +- SKIP: { +- if (!ok(!open(FOO, ">unwritable.txt"), +- "Testing that we aren't running as a privileged user, such as root")) { +- close FOO; +- skip "It's pointless to run the next test as root", 1; +- } +- isnt(run(app(["openssl", "rehash", curdir()])), 1, +- 'Testing rehash operations on readonly directory'); +- } +- chmod 0700, curdir(); # make it writable again, so cleanup works +-}, create => 1, cleanup => 1; +- + sub prepare { + my @pemsourcefiles = sort glob(srctop_file('test', "*.pem")); + my @destfiles = (); diff --git a/pcre/pcre.nm b/pcre/pcre.nm index f56c5d11d..6f54208e9 100644 --- a/pcre/pcre.nm +++ b/pcre/pcre.nm @@ -4,7 +4,7 @@ ###############################################################################
name = pcre -version = 8.39 +version = 8.41 release = 1
groups = System/Libraries diff --git a/pcre2/pcre2.nm b/pcre2/pcre2.nm new file mode 100644 index 000000000..4d890ea5c --- /dev/null +++ b/pcre2/pcre2.nm @@ -0,0 +1,103 @@ + +name = pcre2 +version = 10.30 +release = 1 + +groups = System/Libraries +url = http://www.pcre.org/ +license = BSD +summary = Perl-compatible regular expression library. + +description + PCRE2 is a re-working of the original PCRE (Perl-compatible regular + expression) library to provide an entirely new API. + + PCRE2 is written in C, and it has its own API. There are three sets of + functions, one for the 8-bit library, which processes strings of bytes, one + for the 16-bit library, which processes strings of 16-bit values, and one for + the 32-bit library, which processes strings of 32-bit values. There are no C++ + wrappers. This package provides support for strings in 8-bit and UTF-8 + encodings. Install %{name}-utf16 or %{name}-utf32 packages for the other ones. + + The distribution does contain a set of C wrapper functions for the 8-bit + library that are based on the POSIX regular expression API (see the pcre2posix + man page). These can be found in a library called libpcre2posix. Note that + this just provides a POSIX calling interface to PCRE2; the regular expressions + themselves still follow Perl syntax and semantics. The POSIX API is + restricted, and does not give full access to all of PCRE2's facilities. +end + +source_dl = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ + +build + requires + gcc-c++ + readline-devel + zlib-devel + end + + configure_options += \ + --disable-static \ + --docdir=%{datadir}/doc/pcre-%{version} \ + --disable-bsr-anycrlf \ + --disable-coverage \ + --disable-ebcdic \ + --disable-fuzz-support \ + --disable-jit-sealloc \ + --enable-jit \ + --enable-pcre2-8 \ + --enable-pcre2-16 \ + --enable-pcre2-32 \ + --enable-pcre2grep-callout \ + --enable-pcre2grep-jit \ + --disable-pcre2grep-libbz2 \ + --disable-pcre2grep-libz \ + --disable-pcre2test-libedit \ + --enable-pcre2test-libreadline \ + --disable-rebuild-chartables \ + --enable-unicode \ + --disable-valgrind + + test + export LD_LIBRARY_PATH=$(pwd)/.libs + make check + end +end + +packages + package %{name} + + template PCRE2LIB + summary = UTF-%{bits} variant of pcre2 + description + This is PCRE2 library working on UTF-%{bits} strings. + end + + files + %{libdir}/libpcre2-%{bits}.so.* + end + end + + package %{name}-utf16 + template PCRE2LIB + bits = 16 + end + + package %{name}-utf32 + template PCRE2LIB + bits = 32 + end + + package %{name}-devel + template DEVEL + + requires + %{name}-utf16 = %{thisver} + %{name}-utf32 = %{thisver} + end + end + + package %{name}-debuginfo + template DEBUGINFO + end +end diff --git a/python3/python3.nm b/python3/python3.nm index ce14fdd9b..68f807201 100644 --- a/python3/python3.nm +++ b/python3/python3.nm @@ -5,7 +5,7 @@
name = python3 major_ver = 3.6 -version = %{major_ver}.3 +version = %{major_ver}.4 release = 1 thisapp = Python-%{version}
diff --git a/unbound/unbound.nm b/unbound/unbound.nm index 241956802..6e0a0945a 100644 --- a/unbound/unbound.nm +++ b/unbound/unbound.nm @@ -4,7 +4,7 @@ ###############################################################################
name = unbound -version = 1.6.3 +version = 1.6.8 release = 1
groups = System/Daemons diff --git a/vsftpd/patches/1-vsftpd-build_ssl.patch b/vsftpd/patches/1-vsftpd-build_ssl.patch deleted file mode 100644 index ddf98a95b..000000000 --- a/vsftpd/patches/1-vsftpd-build_ssl.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up vsftpd-2.1.0/builddefs.h.build_ssl vsftpd-2.1.0/builddefs.h ---- vsftpd-2.1.0/builddefs.h.build_ssl 2009-01-08 18:49:33.000000000 +0100 -+++ vsftpd-2.1.0/builddefs.h 2009-01-08 18:49:41.000000000 +0100 -@@ -3,7 +3,7 @@ - - #undef VSF_BUILD_TCPWRAPPERS - #define VSF_BUILD_PAM --#undef VSF_BUILD_SSL -+#define VSF_BUILD_SSL - - #endif /* VSF_BUILDDEFS_H */ - - diff --git a/vsftpd/patches/2-vsftpd-libs-3.patch b/vsftpd/patches/2-vsftpd-libs-3.patch deleted file mode 100644 index a10602763..000000000 --- a/vsftpd/patches/2-vsftpd-libs-3.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up vsftpd-2.1.0/Makefile.libs vsftpd-2.1.0/Makefile ---- vsftpd-2.1.0/Makefile.libs 2009-01-08 18:55:39.000000000 +0100 -+++ vsftpd-2.1.0/Makefile 2009-01-08 18:55:57.000000000 +0100 -@@ -5,7 +5,7 @@ IFLAGS = -idirafter dummyinc - #CFLAGS = -g - CFLAGS = -O2 -Wall -W -Wshadow #-pedantic -Werror -Wconversion - --LIBS = `./vsf_findlibs.sh` -+LIBS = -lnsl -lpam -lcap -ldl -lssl - LINK = -Wl,-s - - OBJS = main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o \ - diff --git a/vsftpd/patches/3-vsftpd-pam_hostname-1.patch b/vsftpd/patches/3-vsftpd-pam_hostname-1.patch deleted file mode 100644 index ad9b13bcf..000000000 --- a/vsftpd/patches/3-vsftpd-pam_hostname-1.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -up vsftpd-2.2.0/sysdeputil.c.pam_hostname vsftpd-2.2.0/sysdeputil.c ---- vsftpd-2.2.0/sysdeputil.c.pam_hostname 2009-08-08 03:51:10.000000000 +0200 -+++ vsftpd-2.2.0/sysdeputil.c 2009-08-24 12:24:07.220623773 +0200 -@@ -16,6 +16,10 @@ - #include "tunables.h" - #include "builddefs.h" - -+/* For gethostbyaddr, inet_addr */ -+#include <netdb.h> -+#include <arpa/inet.h> -+ - /* For Linux, this adds nothing :-) */ - #include "port/porting_junk.h" - -@@ -325,6 +329,10 @@ vsf_sysdep_check_auth(struct mystr* p_us - const struct mystr* p_remote_host) - { - int retval; -+#ifdef PAM_RHOST -+ struct sockaddr_in sin; -+ struct hostent *host; -+#endif - pam_item_t item; - const char* pam_user_name = 0; - struct pam_conv the_conv = -@@ -345,7 +353,12 @@ vsf_sysdep_check_auth(struct mystr* p_us - return 0; - } - #ifdef PAM_RHOST -- retval = pam_set_item(s_pamh, PAM_RHOST, str_getbuf(p_remote_host)); -+ sin.sin_addr.s_addr = inet_addr(str_getbuf(p_remote_host)); -+ host = gethostbyaddr((char*)&sin.sin_addr.s_addr,sizeof(struct in_addr),AF_INET); -+ if (host != (struct hostent*)0) -+ retval = pam_set_item(s_pamh, PAM_RHOST, host->h_name); -+ else -+ retval = pam_set_item(s_pamh, PAM_RHOST, str_getbuf(p_remote_host)); - if (retval != PAM_SUCCESS) - { - (void) pam_end(s_pamh, retval); -@@ -558,7 +571,7 @@ vsf_sysdep_has_capabilities(void) - } - return s_runtime_has_caps; - } -- -+ - #ifndef VSF_SYSDEP_HAVE_LIBCAP - static int - do_checkcap(void) -@@ -1080,7 +1093,7 @@ vsf_sysutil_recv_fd(const int sock_fd) - msg.msg_flags = 0; - /* In case something goes wrong, set the fd to -1 before the syscall */ - p_fd = (int*)CMSG_DATA(CMSG_FIRSTHDR(&msg)); -- *p_fd = -1; -+ *p_fd = -1; - retval = recvmsg(sock_fd, &msg, 0); - if (retval != 1) - { - diff --git a/vsftpd/patches/4-vsftpd-close-std-fds.patch b/vsftpd/patches/4-vsftpd-close-std-fds.patch deleted file mode 100644 index 25cca0a1a..000000000 --- a/vsftpd/patches/4-vsftpd-close-std-fds.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up vsftpd-2.0.7/standalone.c.close-fds vsftpd-2.0.7/standalone.c ---- vsftpd-2.0.7/standalone.c.close-fds 2008-09-08 23:36:32.000000000 -0400 -+++ vsftpd-2.0.7/standalone.c 2008-09-08 23:37:53.000000000 -0400 -@@ -131,6 +131,9 @@ vsf_standalone_main(void) - die("could not bind listening IPv6 socket"); - } - } -+ vsf_sysutil_close(0); -+ vsf_sysutil_close(1); -+ vsf_sysutil_close(2); - retval = vsf_sysutil_listen(listen_sock, VSFTP_LISTEN_BACKLOG); - if (vsf_sysutil_retval_is_error(retval)) - { - diff --git a/vsftpd/patches/5-vsftpd-configuration-1.patch b/vsftpd/patches/5-vsftpd-configuration-1.patch deleted file mode 100644 index 3c465aff0..000000000 --- a/vsftpd/patches/5-vsftpd-configuration-1.patch +++ /dev/null @@ -1,416 +0,0 @@ -diff -up vsftpd-2.2.0/defs.h.configuration vsftpd-2.2.0/defs.h ---- vsftpd-2.2.0/defs.h.configuration 2009-01-07 21:22:22.000000000 +0100 -+++ vsftpd-2.2.0/defs.h 2009-08-04 07:37:01.000000000 +0200 -@@ -1,7 +1,7 @@ - #ifndef VSF_DEFS_H - #define VSF_DEFS_H - --#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd.conf" -+#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf" - - #define VSFTP_COMMAND_FD 0 - -diff -up vsftpd-2.2.0/EXAMPLE/INTERNET_SITE_NOINETD/README.configuration vsftpd-2.2.0/EXAMPLE/INTERNET_SITE_NOINETD/README ---- vsftpd-2.2.0/EXAMPLE/INTERNET_SITE_NOINETD/README.configuration 2008-02-02 02:30:40.000000000 +0100 -+++ vsftpd-2.2.0/EXAMPLE/INTERNET_SITE_NOINETD/README 2009-08-04 07:37:01.000000000 +0200 -@@ -17,7 +17,7 @@ even per-connect-IP configurability. - - To use this example config: - --1) Copy the vsftpd.conf file in this directory to /etc/vsftpd.conf. -+1) Copy the vsftpd.conf file in this directory to /etc/vsftpd/vsftpd.conf. - - 2) Start up vsftpd, e.g. - vsftpd & -@@ -51,5 +51,5 @@ in the vsftpd.conf: - listen_address=192.168.1.2 - - And launch vsftpd with a specific config file like this: --vsftpd /etc/vsftpd.conf.site1 & -+vsftpd /etc/vsftpd/vsftpd.conf.site1 & - -diff -up vsftpd-2.2.0/EXAMPLE/INTERNET_SITE/README.configuration vsftpd-2.2.0/EXAMPLE/INTERNET_SITE/README ---- vsftpd-2.2.0/EXAMPLE/INTERNET_SITE/README.configuration 2008-02-02 02:30:40.000000000 +0100 -+++ vsftpd-2.2.0/EXAMPLE/INTERNET_SITE/README 2009-08-04 07:37:01.000000000 +0200 -@@ -41,13 +41,13 @@ no_access = 192.168.1.3 - As an example of how to ban certain sites from connecting, 192.168.1.3 will - be denied access. - --banner_fail = /etc/vsftpd.busy_banner -+banner_fail = /etc/vsftpd/busy_banner - - This is the file to display to users if the connection is refused for whatever - reason (too many users, IP banned). - - Example of how to populate it: --echo "421 Server busy, please try later." > /etc/vsftpd.busy_banner -+echo "421 Server busy, please try later." > /etc/vsftpd/busy_banner - - log_on_success += PID HOST DURATION - log_on_failure += HOST -@@ -62,7 +62,7 @@ Step 2) Set up your vsftpd configuration - - An example file is supplied. Install it like this: - --cp vsftpd.conf /etc -+cp vsftpd.conf /etc/vsftpd - - Let's example the contents of the file: - -diff -up vsftpd-2.2.0/EXAMPLE/PER_IP_CONFIG/README.configuration vsftpd-2.2.0/EXAMPLE/PER_IP_CONFIG/README ---- vsftpd-2.2.0/EXAMPLE/PER_IP_CONFIG/README.configuration 2008-02-02 02:30:40.000000000 +0100 -+++ vsftpd-2.2.0/EXAMPLE/PER_IP_CONFIG/README 2009-08-04 07:37:01.000000000 +0200 -@@ -20,12 +20,12 @@ directory: hosts.allow. It lives at /etc - - Let's have a look at the example: - --vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd_tcp_wrap.conf -+vsftpd: 192.168.1.3: setenv VSFTPD_LOAD_CONF /etc/vsftpd/tcp_wrap.conf - vsftpd: 192.168.1.4: DENY - - The first line: - If a client connects from 192.168.1.3, then vsftpd will apply the vsftpd --config file /etc/vsftpd_tcp_wrap.conf to the session! These settings are -+config file /etc/vsftpd/tcp_wrap.conf to the session! These settings are - applied ON TOP of the default vsftpd.conf. - This is obviously very powerful. You might use this to apply different - access restrictions for some IPs (e.g. the ability to upload). -diff -up vsftpd-2.2.0/EXAMPLE/VIRTUAL_USERS/README.configuration vsftpd-2.2.0/EXAMPLE/VIRTUAL_USERS/README ---- vsftpd-2.2.0/EXAMPLE/VIRTUAL_USERS/README.configuration 2008-02-02 02:30:40.000000000 +0100 -+++ vsftpd-2.2.0/EXAMPLE/VIRTUAL_USERS/README 2009-08-04 07:37:01.000000000 +0200 -@@ -15,7 +15,7 @@ See example file "logins.txt" - this spe - "fred" with password "bar". - Whilst logged in as root, create the actual database file like this: - --db_load -T -t hash -f logins.txt /etc/vsftpd_login.db -+db_load -T -t hash -f logins.txt /etc/vsftpd/login.db - (Requires the Berkeley db program installed). - NOTE: Many systems have multiple versions of "db" installed, so you may - need to use e.g. db3_load for correct operation. This is known to affect -@@ -23,10 +23,10 @@ some Debian systems. The core issue is t - database to be a specific db version (often db3, whereas db4 may be installed - on your system). - --This will create /etc/vsftpd_login.db. Obviously, you may want to make sure -+This will create /etc/vsftpd/login.db. Obviously, you may want to make sure - the permissions are restricted: - --chmod 600 /etc/vsftpd_login.db -+chmod 600 /etc/vsftpd/login.db - - For more information on maintaing your login database, look around for - documentation on "Berkeley DB", e.g. -@@ -37,8 +37,8 @@ Step 2) Create a PAM file which uses you - - See the example file vsftpd.pam. It contains two lines: - --auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login --account required /lib/security/pam_userdb.so db=/etc/vsftpd_login -+auth required /lib/security/pam_userdb.so db=/etc/vsftpd/login -+account required /lib/security/pam_userdb.so db=/etc/vsftpd/login - - This tells PAM to authenticate users using our new database. Copy this PAM - file to the PAM directory - typically /etc/pam.d/ -@@ -108,9 +108,9 @@ pasv_max_port=30999 - These put a port range on passive FTP incoming requests - very useful if - you are configuring a firewall. - --Copy the example vsftpd.conf file to /etc: -+Copy the example vsftpd.conf file to /etc/vsftpd: - --cp vsftpd.conf /etc/ -+cp vsftpd.conf /etc/vsftpd/ - - - Step 5) Start up vsftpd. -diff -up vsftpd-2.2.0/FAQ.configuration vsftpd-2.2.0/FAQ ---- vsftpd-2.2.0/FAQ.configuration 2009-02-18 23:33:04.000000000 +0100 -+++ vsftpd-2.2.0/FAQ 2009-08-04 07:37:01.000000000 +0200 -@@ -34,7 +34,7 @@ needs this user to run bits of itself wi - Q) Help! Local users cannot log in. - A) There are various possible problems. - A1) By default, vsftpd disables any logins other than anonymous logins. Put --local_enable=YES in your /etc/vsftpd.conf to allow local users to log in. -+local_enable=YES in your /etc/vsftpd/vsftpd.conf to allow local users to log in. - A2) vsftpd tries to link with PAM. (Run "ldd vsftpd" and look for libpam to - find out whether this has happened or not). If vsftpd links with PAM, then - you will need to have a PAM file installed for the vsftpd service. There is -@@ -46,12 +46,12 @@ system have a "shadow.h" file in the inc - A4) If you are not using PAM, then vsftpd will do its own check for a valid - user shell in /etc/shells. You may need to disable this if you use an invalid - shell to disable logins other than FTP logins. Put check_shell=NO in your --/etc/vsftpd.conf. -+/etc/vsftpd/vsftpd.conf. - - Q) Help! Uploads or other write commands give me "500 Unknown command.". - A) By default, write commands, including uploads and new directories, are - disabled. This is a security measure. To enable writes, put write_enable=YES --in your /etc/vsftpd.conf. -+in your /etc/vsftpd/vsftpd.conf. - - Q) Help! What are the security implications referred to in the - "chroot_local_user" option? -@@ -87,7 +87,7 @@ A2) Alternatively, run as many copies as - mode. Use "listen_address=x.x.x.x" to set the virtual IP. - - Q) Help! Does vsftpd support virtual users? --A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd.conf. This -+A) Yes, via PAM integration. Set "guest_enable=YES" in /etc/vsftpd/vsftpd.conf. This - has the effect of mapping every non-anonymous successful login to the local - username specified in "guest_username". Then, use PAM and (e.g.) its pam_userdb - module to provide authentication against an external (i.e. non-/etc/passwd) -diff -up vsftpd-2.2.0/INSTALL.configuration vsftpd-2.2.0/INSTALL ---- vsftpd-2.2.0/INSTALL.configuration 2008-02-02 02:30:39.000000000 +0100 -+++ vsftpd-2.2.0/INSTALL 2009-08-04 07:37:01.000000000 +0200 -@@ -56,14 +56,14 @@ cp vsftpd.8 /usr/local/man/man8 - - "make install" doesn't copy the sample config file. It is recommended you - do this: --cp vsftpd.conf /etc -+cp vsftpd.conf /etc/vsftpd - - Step 4) Smoke test (without an inetd). - - vsftpd can run standalone or via an inetd (such as inetd or xinetd). You will - typically get more control running vsftpd from an inetd. But first we will run - it without, so we can check things are going well so far. --Edit /etc/vsftpd.conf, and add this line at the bottom: -+Edit /etc/vsftpd/vsftpd.conf, and add this line at the bottom: - - listen=YES - -@@ -135,11 +135,11 @@ cp RedHat/vsftpd.pam /etc/pam.d/ftp - Step 7) Customize your configuration - - As well as the above three pre-requisites, you are recommended to install a --config file. The default location for the config file is /etc/vsftpd.conf. -+config file. The default location for the config file is /etc/vsftpd/vsftpd.conf. - There is a sample vsftpd.conf in the distribution tarball. You probably want --to copy that to /etc/vsftpd.conf as a basis for modification, i.e.: -+to copy that to /etc/vsftpd/vsftpd.conf as a basis for modification, i.e.: - --cp vsftpd.conf /etc -+cp vsftpd.conf /etc/vsftpd - - The default configuration allows neither local user logins nor anonymous - uploads. You may wish to change these defaults. -diff -up vsftpd-2.2.0/README.configuration vsftpd-2.2.0/README ---- vsftpd-2.2.0/README.configuration 2009-07-07 22:23:22.000000000 +0200 -+++ vsftpd-2.2.0/README 2009-08-04 07:37:01.000000000 +0200 -@@ -37,3 +37,8 @@ All configuration options are documented - Various example configurations are discussed in the EXAMPLE directory. - Frequently asked questions are tackled in the FAQ file. - -+Important Note -+============== -+The location of configuration files was changed to /etc/vsftpd/. If you want -+to migrate your old conf files from /etc (files vsftpd.xxxx.rpmsave) use -+/etc/vsfptd/vsftpd_conf_migrate.sh -diff -up vsftpd-2.2.0/tunables.c.configuration vsftpd-2.2.0/tunables.c ---- vsftpd-2.2.0/tunables.c.configuration 2009-07-15 22:08:27.000000000 +0200 -+++ vsftpd-2.2.0/tunables.c 2009-08-04 07:37:01.000000000 +0200 -@@ -186,7 +186,7 @@ tunables_load_defaults() - tunable_listen_ipv6 = 0; - tunable_dual_log_enable = 0; - tunable_syslog_enable = 0; -- tunable_background = 0; -+ tunable_background = 1; - tunable_virtual_use_local_privs = 0; - tunable_session_support = 0; - tunable_download_enable = 1; -@@ -254,11 +254,11 @@ tunables_load_defaults() - install_str_setting(".message", &tunable_message_file); - install_str_setting("nobody", &tunable_nopriv_user); - install_str_setting(0, &tunable_ftpd_banner); -- install_str_setting("/etc/vsftpd.banned_emails", &tunable_banned_email_file); -- install_str_setting("/etc/vsftpd.chroot_list", &tunable_chroot_list_file); -+ install_str_setting("/etc/vsftpd/banned_emails", &tunable_banned_email_file); -+ install_str_setting("/etc/vsftpd/chroot_list", &tunable_chroot_list_file); - install_str_setting("ftp", &tunable_pam_service_name); - install_str_setting("ftp", &tunable_guest_username); -- install_str_setting("/etc/vsftpd.user_list", &tunable_userlist_file); -+ install_str_setting("/etc/vsftpd/user_list", &tunable_userlist_file); - install_str_setting(0, &tunable_anon_root); - install_str_setting(0, &tunable_local_root); - install_str_setting(0, &tunable_banner_file); -@@ -271,7 +271,7 @@ tunables_load_defaults() - install_str_setting(0, &tunable_hide_file); - install_str_setting(0, &tunable_deny_file); - install_str_setting(0, &tunable_user_sub_token); -- install_str_setting("/etc/vsftpd.email_passwords", -+ install_str_setting("/etc/vsftpd/email_passwords", - &tunable_email_password_file); - install_str_setting("/usr/share/ssl/certs/vsftpd.pem", - &tunable_rsa_cert_file); -diff -up vsftpd-2.2.0/vsftpd.8.configuration vsftpd-2.2.0/vsftpd.8 ---- vsftpd-2.2.0/vsftpd.8.configuration 2009-07-17 22:56:23.000000000 +0200 -+++ vsftpd-2.2.0/vsftpd.8 2009-08-04 07:40:27.000000000 +0200 -@@ -21,7 +21,7 @@ itself will listen on the network. This - recommended. It is activated by setting - .Pa listen=YES - in --.Pa /etc/vsftpd.conf . -+.Pa /etc/vsftpd/vsftpd.conf . - Direct execution of the - .Nm vsftpd - binary will then launch the FTP service ready for immediate client connections. -@@ -33,7 +33,7 @@ as root. Any command line option not sta - as a config file that will be loaded. Note that config files are loaded in the - strict order that they are encountered on the command line. - If no config files are specified, the default configuration file of --.Pa /etc/vsftpd.conf -+.Pa /etc/vsftpd/vsftpd.conf - will be loaded, after all other command line options are processed. - .Pp - Supported options are: -@@ -47,14 +47,14 @@ their appearance on the command line, in - config files. - .El - .Sh EXAMPLES --vsftpd -olisten=NO /etc/vsftpd.conf -oftpd_banner=blah -+vsftpd -olisten=NO /etc/vsftpd/vsftpd.conf -oftpd_banner=blah - .Pp - That example overrides vsftpd's built-in default for the "listen" option to be --NO, but then loads /etc/vsftpd.conf which may override that setting. Finally, -+NO, but then loads /etc/vsftpd/vsftpd.conf which may override that setting. Finally, - the "ftpd_banner" setting is set to "blah", which overrides any default vsftpd - setting and any identical setting that was in the config file. - .Sh FILES --.Pa /etc/vsftpd.conf -+.Pa /etc/vsftpd/vsftpd.conf - .Sh SEE ALSO - .Xr vsftpd.conf 5 - .end -diff -up vsftpd-2.2.0/vsftpd.conf.5.configuration vsftpd-2.2.0/vsftpd.conf.5 ---- vsftpd-2.2.0/vsftpd.conf.5.configuration 2009-07-17 22:57:04.000000000 +0200 -+++ vsftpd-2.2.0/vsftpd.conf.5 2009-08-04 07:37:01.000000000 +0200 -@@ -4,7 +4,7 @@ vsftpd.conf - config file for vsftpd - .SH DESCRIPTION - vsftpd.conf may be used to control various aspects of vsftpd's behaviour. By - default, vsftpd looks for this file at the location --.BR /etc/vsftpd.conf . -+.BR /etc/vsftpd/vsftpd.conf . - However, you may override this by specifying a command line argument to - vsftpd. The command line argument is the pathname of the configuration file - for vsftpd. This behaviour is useful because you may wish to use an advanced -@@ -110,7 +110,7 @@ When enabled, and vsftpd is started in " - the listener process. i.e. control will immediately be returned to the shell - which launched vsftpd. - --Default: NO -+Default: YES - .TP - .B check_shell - Note! This option only has an effect for non-PAM builds of vsftpd. If disabled, -@@ -138,7 +138,7 @@ chroot() jail in their home directory up - different if chroot_local_user is set to YES. In this case, the list becomes - a list of users which are NOT to be placed in a chroot() jail. - By default, the file containing this list is --/etc/vsftpd.chroot_list, but you may override this with the -+/etc/vsftpd/chroot_list, but you may override this with the - .BR chroot_list_file - setting. - -@@ -177,7 +177,7 @@ Default: NO - .B deny_email_enable - If activated, you may provide a list of anonymous password e-mail responses - which cause login to be denied. By default, the file containing this list is --/etc/vsftpd.banned_emails, but you may override this with the -+/etc/vsftpd/banned_emails, but you may override this with the - .BR banned_email_file - setting. - -@@ -433,7 +433,7 @@ anonymous logins are prevented unless th - file specified by the - .BR email_password_file - setting. The file format is one password per line, no extra whitespace. The --default filename is /etc/vsftpd.email_passwords. -+default filename is /etc/vsftpd/email_passwords. - - Default: NO - .TP -@@ -764,7 +764,7 @@ passwords which are not permitted. This - .BR deny_email_enable - is enabled. - --Default: /etc/vsftpd.banned_emails -+Default: /etc/vsftpd/banned_emails - .TP - .B banner_file - This option is the name of a file containing text to display when someone -@@ -801,7 +801,7 @@ is enabled. If the option - is enabled, then the list file becomes a list of users to NOT place in a - chroot() jail. - --Default: /etc/vsftpd.chroot_list -+Default: /etvsftpd.confc/vsftpd.chroot_list - .TP - .B cmds_allowed - This options specifies a comma separated list of allowed FTP commands (post -@@ -862,7 +862,7 @@ This option can be used to provide an al - .BR secure_email_list_enable - setting. - --Default: /etc/vsftpd.email_passwords -+Default: /etc/vsftpd/email_passwords - .TP - .B ftp_username - This is the name of the user we use for handling anonymous FTP. The home -@@ -985,10 +985,10 @@ the manual page, on a per-user basis. Us - with an example. If you set - .BR user_config_dir - to be --.BR /etc/vsftpd_user_conf -+.BR /etc/vsftpd/user_conf - and then log on as the user "chris", then vsftpd will apply the settings in - the file --.BR /etc/vsftpd_user_conf/chris -+.BR /etc/vsftpd/user_conf/chris - for the duration of the session. The format of this file is as detailed in - this manual page! PLEASE NOTE that not all settings are effective on a - per-user basis. For example, many settings only prior to the user's session -@@ -1024,7 +1024,7 @@ This option is the name of the file load - .BR userlist_enable - option is active. - --Default: /etc/vsftpd.user_list -+Default: /etc/vsftpd/user_list - .TP - .B vsftpd_log_file - This option is the name of the file to which we write the vsftpd style -diff -up vsftpd-2.2.0/vsftpd.conf.configuration vsftpd-2.2.0/vsftpd.conf ---- vsftpd-2.2.0/vsftpd.conf.configuration 2009-06-17 22:05:28.000000000 +0200 -+++ vsftpd-2.2.0/vsftpd.conf 2009-08-04 07:53:13.000000000 +0200 -@@ -1,4 +1,4 @@ --# Example config file /etc/vsftpd.conf -+# Example config file /etc/vsftpd/vsftpd.conf - # - # The default compiled in settings are fairly paranoid. This sample file - # loosens things up a bit, to make the ftp daemon more usable. -@@ -87,7 +87,7 @@ connect_from_port_20=YES - # useful for combatting certain DoS attacks. - #deny_email_enable=YES - # (default follows) --#banned_email_file=/etc/vsftpd.banned_emails -+#banned_email_file=/etc/vsftpd/banned_emails - # - # You may specify an explicit list of local users to chroot() to their home - # directory. If chroot_local_user is YES, then this list becomes a list of -@@ -95,7 +95,7 @@ connect_from_port_20=YES - #chroot_local_user=YES - #chroot_list_enable=YES - # (default follows) --#chroot_list_file=/etc/vsftpd.chroot_list -+#chroot_list_file=/etc/vsftpd/chroot_list - # - # You may activate the "-R" option to the builtin ls. This is disabled by - # default to avoid remote users being able to cause excessive I/O on large -@@ -112,3 +112,7 @@ listen=YES - # sockets, you must run two copies of vsftpd whith two configuration files. - # Make sure, that one of the listen options is commented !! - #listen_ipv6=YES -+ -+pam_service_name=vsftpd -+userlist_enable=YES -+tcp_wrappers=YES - diff --git a/vsftpd/patches/vsftpd-2.2.0-openssl.patch b/vsftpd/patches/vsftpd-2.2.0-openssl.patch deleted file mode 100644 index 23dc4980e..000000000 --- a/vsftpd/patches/vsftpd-2.2.0-openssl.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up vsftpd-2.2.0/ssl.c.openssl vsftpd-2.2.0/ssl.c ---- vsftpd-2.2.0/ssl.c.openssl 2009-01-09 21:47:05.000000000 +0100 -+++ vsftpd-2.2.0/ssl.c 2009-08-22 20:41:58.000000000 +0200 -@@ -537,7 +537,11 @@ get_ssl(struct vsf_session* p_sess, int - if (tunable_debug_ssl) - { - const char* p_ssl_version = SSL_get_cipher_version(p_ssl); -+#if OPENSSL_VERSION_NUMBER >= 0x10000000L -+ const SSL_CIPHER* p_ssl_cipher = SSL_get_current_cipher(p_ssl); -+#else - SSL_CIPHER* p_ssl_cipher = SSL_get_current_cipher(p_ssl); -+#endif - const char* p_cipher_name = SSL_CIPHER_get_name(p_ssl_cipher); - X509* p_ssl_cert = SSL_get_peer_certificate(p_ssl); - int reused = SSL_session_reused(p_ssl); diff --git a/vsftpd/systemd/vsftpd.service b/vsftpd/systemd/vsftpd.service deleted file mode 100644 index 4d1148f81..000000000 --- a/vsftpd/systemd/vsftpd.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Very Secure FTP Daemon - -[Service] -Type=forking -ExecStart=/usr/bin/vsftpd /etc/vsftpd/vsftpd.conf - -[Install] -WantedBy=multi-user.target diff --git a/vsftpd/vsftpd.conf b/vsftpd/vsftpd.conf deleted file mode 100644 index 984a30fbb..000000000 --- a/vsftpd/vsftpd.conf +++ /dev/null @@ -1,50 +0,0 @@ -# Default config for vsftpd on ipfire -background=YES -listen=YES -# -nopriv_user=vsftpd -# -local_enable=YES -write_enable=YES -# -local_umask=022 -# -#anonymous_enable=YES -#anon_upload_enable=YES -#anon_mkdir_write_enable=YES -# -dirmessage_enable=YES -# -xferlog_enable=YES -xferlog_file=/var/log/vsftpd.log -xferlog_std_format=YES -# -connect_from_port_20=YES -# -#chown_uploads=YES -#chown_username=whoever -# -idle_session_timeout=600 -data_connection_timeout=120 -# -#async_abor_enable=YES -#ascii_upload_enable=YES -#ascii_download_enable=YES -# -ftpd_banner=Welcome to IPFire FTP service. -# -chroot_local_user=YES -#chroot_list_enable=YES -secure_chroot_dir=/var/ftp/empty -# -ls_recurse_enable=YES -# -#ssl_enable=YES -#force_local_data_ssl=NO -#force_local_logins_ssl=NO -#rsa_cert_file=/etc/vsftpd.pem -# -userlist_deny=NO -userlist_enable=YES -userlist_file=/etc/vsftpd.user_list -# diff --git a/vsftpd/vsftpd.nm b/vsftpd/vsftpd.nm deleted file mode 100644 index 8eb1f4cda..000000000 --- a/vsftpd/vsftpd.nm +++ /dev/null @@ -1,60 +0,0 @@ -############################################################################### -# IPFire.org - An Open Source Firewall Solution # -# Copyright (C) - IPFire Development Team info@ipfire.org # -############################################################################### - -name = vsftpd -version = 2.3.4 -release = 3 - -groups = Networking/Daemons -url = https://security.appspot.com/vsftpd.html -license = GPLv2 with exceptions -summary = Very Secure Ftp Daemon. - -description - vsftpd is a Very Secure FTP daemon. It was written completely - from scratch. -end - -source_dl = https://security.appspot.com/downloads/ - -CFLAGS += -Wall -W -Wshadow -fstack-protector -fpie -Wextra -Werror - -build - requires - libcap-devel - openssl-devel - pam-devel - end - - prepare_cmds - # Fix an issue with DSO - sed -e "s/-lssl/& -lcrypto/" -i Makefile - end - - make_build_targets = CFLAGS='%{CFLAGS}' - - install - # Create directory layout. - mkdir -pv %{BUILDROOT}/usr/bin - mkdir -pv %{BUILDROOT}/etc/%{name} - mkdir -pv %{BUILDROOT}/usr/share/man/man5 - mkdir -pv %{BUILDROOT}/usr/share/man/man8 - - # Install files. - install -v -m 755 vsftpd %{BUILDROOT}/usr/bin - install -v -m 644 vsftpd.conf.5 %{BUILDROOT}/usr/share/man/man5 - install -v -m 644 vsftpd.8 %{BUILDROOT}/usr/share/man/man8 - cp -vf %{DIR_SOURCE}/%{name}.{conf,user_list} %{BUILDROOT}/etc/%{name} - end -end - -packages - package %{name} - end - - package %{name}-debuginfo - template DEBUGINFO - end -end diff --git a/vsftpd/vsftpd.pam b/vsftpd/vsftpd.pam deleted file mode 100644 index 03834d15b..000000000 --- a/vsftpd/vsftpd.pam +++ /dev/null @@ -1,8 +0,0 @@ -#%PAM-1.0 -session optional pam_keyinit.so force revoke -auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed -auth required pam_shells.so -auth include system-auth -account include system-auth -session include system-auth -session required pam_loginuid.so diff --git a/vsftpd/vsftpd.user_list b/vsftpd/vsftpd.user_list deleted file mode 100644 index e69de29bb..000000000
hooks/post-receive -- IPFire 3.x development tree