All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/20] Do not download auto-generated patches
@ 2017-07-02 16:53 Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 01/20] docs/manual: update details about hashes Thomas Petazzoni
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Hello,

Patch https://patchwork.ozlabs.org/patch/782927/ sent by Julien
Boibessot made us realize that auto-generated patches such as the ones
provided by Github are not guaranteed to be stable over time. Indeed,
the "index" line of the patches contains short git hashes, and when
new commits are made to the Git repository, additional commits are
made, which can have short hashes conflicting with older ones, in
which case git increase the length of the "short hashes" to avoid the
conflict. This means the patch contents change, therefore its sha256
hash changes, and it breaks the download in Buildroot.

Since there is no solution to this problem, we simply decided that
auto-generated patches should not be downloaded by Buildroot using
<pkg>_PATCH, and should instead be stored in the tree.

This series:

 1. Updates the documentation about the hash file.

 2. Changes all packages that download Github.com patches. All
    packages that have a non-empty <pkg>_PATCH variable have been
    inspected, and only the ones downloading patches from Github are
    problematic.

Thomas

Thomas Petazzoni (20):
  docs/manual: update details about hashes
  efibootmgr: don't download patch from Github
  jack2: don't download patch from Github
  libstrophe: don't download patch from Github
  lxc: don't download patch from Github
  mediastreamer: don't download patch from Github
  numactl: don't download patches from Github
  openal: don't download patches from Github
  openssh: don't download patch from Github
  openzwave: don't download patch from Github
  poco: don't download patch from Github
  qt: don't download patch from Github
  rpm: don't download patches from Github
  scrub: don't download patch from Github
  sngrep: don't download patch from Github
  softether: don't download patch from Github
  systemd: don't download patches from Github
  tinycbor: on't download patch from Github
  trinity: don't download patches from Github
  wavpack: don't download patch from Github

 docs/manual/adding-packages-directory.txt          |   23 +-
 .../0001-dont-use-fshort-wchar-when-building.patch |   28 +
 ...bc.patch => 0002-Allow-build-with-uClibc.patch} |    0
 package/efibootmgr/efibootmgr.hash                 |    1 -
 package/efibootmgr/efibootmgr.mk                   |    3 -
 .../0001-Fix-initialization-in-test-iodelay.patch  |   65 +
 ...patch => 0002-Improve-check-for-ucontext.patch} |    0
 ...ce-support-depends-on-execinfo.h-existen.patch} |    0
 ...=> 0004-tests-define-__STDC_LIMIT_MACROS.patch} |    0
 package/jack2/jack2.hash                           |    1 -
 package/jack2/jack2.mk                             |    1 -
 .../libstrophe/0001-Namespace-SHA-functions.patch  |  189 ++
 ...nfable.patch => 0002-make-autoreconfable.patch} |    0
 package/libstrophe/libstrophe.hash                 |    1 -
 package/libstrophe/libstrophe.mk                   |    1 -
 .../lxc/0001-conf-fix-build-without-libcap.patch   |   31 +
 package/lxc/lxc.hash                               |    1 -
 package/lxc/lxc.mk                                 |    4 -
 ...ix-compilation-issue-with-latest-bctoobox.patch |   38 +
 package/mediastreamer/mediastreamer.hash           |    1 -
 package/mediastreamer/mediastreamer.mk             |    4 -
 ...-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch |   35 +
 ...-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch |   39 +
 package/numactl/numactl.hash                       |    2 -
 package/numactl/numactl.mk                         |    3 -
 .../0001-Build-NEON-code-with-mfpu-neon.patch      |   29 +
 ...heck-for-run-time-NEON-support-by-reading.patch |   67 +
 ...003-Properly-check-if-proc-cpuinfo-opened.patch |   24 +
 ...k-if-mfpu-neon-is-available-for-compiling.patch |   47 +
 ...tch => 0005-Fix-detection-of-C11-atomics.patch} |    0
 package/openal/openal.hash                         |    4 -
 package/openal/openal.mk                           |    5 -
 .../0001-configure-ac-detect-mips-abi.patch        |   44 +
 ...roperly-set-seccomp-audit-arch-for-mips64.patch |   63 +
 ...ch => 0003-fix-pam-uclibc-pthreads-clash.patch} |    0
 ...nclude.patch => 0004-fix-howmany-include.patch} |    0
 package/openssh/openssh.hash                       |    2 -
 package/openssh/openssh.mk                         |    6 +-
 .../openzwave/0001-Fix-compilation-of-MinOZW.patch |   37 +
 ...x-warning-on-wcsdup-implicit-declaration.patch} |    0
 ... 0003-Ensure-correct-git-repository-path.patch} |    0
 package/openzwave/openzwave.hash                   |    1 -
 package/openzwave/openzwave.mk                     |    6 -
 ...rsion-of-strerror_r-not-available-on-musl.patch |   33 +
 ...poco-add-the-staging-path-to-search-path.patch} |    0
 ...atch => 0003-fix-m68k-double-conv-detect.patch} |    0
 package/poco/poco.hash                             |    1 -
 package/poco/poco.mk                               |    1 -
 ...e-check-to-treat-alsalib-1.1.x-as-correct.patch |   29 +
 .../{0001-configure.patch => 0002-configure.patch} |    0
 ...system.patch => 0003-eglwsegl-use-system.patch} |    0
 ...-atomics.patch => 0004-fix-const-atomics.patch} |    0
 ...attr_np.patch => 0005-pthread_getattr_np.patch} |    0
 ...o-gui.patch => 0006-script-qtdbus-no-gui.patch} |    0
 ...-Add-initial-support-of-ARC-architecture.patch} |    0
 ... => 0008-Prevent-unaligned-access-on-ARC.patch} |    0
 ...on-constructor-error-for-legacy-c-compil.patch} |    0
 ...inclusion-order-when-building-statically.patch} |    0
 ...form-socklen_t-on-other-C-libraries-than.patch} |    0
 ...ith-ldl-option-only-when-it-is-supported.patch} |    0
 ...13-OpenGL-EGL-Avoid-X11-header-collision.patch} |    0
 package/qt/qt.hash                                 |    1 -
 package/qt/qt.mk                                   |    3 -
 ...ink-instead-of-compile-for-gcc-flags-test.patch |   33 +
 ...onfigure-ac-correct-stack-protector-check.patch |   45 +
 ...-to-enable-disable-sepdebugcrcfix-buildi.patch} |    0
 ...ugcrcfix.c-fix-build-with-recent-binutil.patch} |    0
 package/rpm/rpm.hash                               |    3 -
 package/rpm/rpm.mk                                 |    7 +-
 ...-sure-m4-macros-are-included-in-the-build.patch |   45 +
 package/scrub/scrub.hash                           |    1 -
 package/scrub/scrub.mk                             |    1 -
 ...001-autotools-fix-ncurses-wchar-detection.patch |  158 ++
 ...002-autotools-fix-ncurses-wchar-detection.patch |   45 +
 package/sngrep/sngrep.hash                         |    1 -
 package/sngrep/sngrep.mk                           |    4 -
 ...1-Create-autotools-plumbing-for-SoftEther.patch | 1879 ++++++++++++++++++++
 ...eate-libsoftether.so-and-dynamically-link.patch |  133 ++
 ...atch => 0003-use-fhs-install-directories.patch} |    0
 ...rking-softetherd-for-upstart-and-systemd.patch} |    0
 ...eDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch} |    0
 ...ross-compile.patch => 0006-cross-compile.patch} |    0
 .../{0005-iconv.patch => 0007-iconv.patch}         |    0
 .../{0006-librt.patch => 0008-librt.patch}         |    0
 ...onfig.patch => 0009-uclibc-ai-addrconfig.patch} |    0
 package/softether/softether.hash                   |    2 -
 package/softether/softether.mk                     |    3 -
 ...-of-null-pointer-p-question-dereferencing.patch |   28 +
 ...-resolved-simplify-alloc-size-calculation.patch |   51 +
 ...do-not-allocate-packets-with-minimum-size.patch |   48 +
 ...-getty-unit.patch => 0004-fix-getty-unit.patch} |    0
 ...atch => 0005-build-check-for-ln-relative.patch} |    0
 ...h => 0006-fix-am-path-libgcrypt-no-found.patch} |    0
 package/systemd/systemd.hash                       |    3 -
 package/systemd/systemd.mk                         |    5 -
 .../0001-Fix-static-compilation-of-json2cbor.patch |   28 +
 package/tinycbor/tinycbor.hash                     |    1 -
 package/tinycbor/tinycbor.mk                       |    4 -
 ...rspace-headers-for-ax25-instead-of-kernel.patch |   26 +
 ...002-fix-build-when_USE_BPF-is-not-defined.patch |   72 +
 .../0003-Check-for-bpf-attr-map-flags.patch        |   60 +
 ...4-get_syscall_entry-remove-SYSCALL_OFFSET.patch |   44 +
 ...x-cross-compile-detection-of-broken-ipv6.patch} |    0
 package/trinity/trinity.hash                       |    4 -
 package/trinity/trinity.mk                         |    5 -
 ...-19-new-dependency-on-wchar-t-by-removing.patch |   70 +
 package/wavpack/wavpack.hash                       |    1 -
 package/wavpack/wavpack.mk                         |    3 -
 108 files changed, 3583 insertions(+), 104 deletions(-)
 create mode 100644 package/efibootmgr/0001-dont-use-fshort-wchar-when-building.patch
 rename package/efibootmgr/{0001-Allow-build-with-uClibc.patch => 0002-Allow-build-with-uClibc.patch} (100%)
 create mode 100644 package/jack2/0001-Fix-initialization-in-test-iodelay.patch
 rename package/jack2/{0001-Improve-check-for-ucontext.patch => 0002-Improve-check-for-ucontext.patch} (100%)
 rename package/jack2/{0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch => 0003-Make-backtrace-support-depends-on-execinfo.h-existen.patch} (100%)
 rename package/jack2/{0003-tests-define-__STDC_LIMIT_MACROS.patch => 0004-tests-define-__STDC_LIMIT_MACROS.patch} (100%)
 create mode 100644 package/libstrophe/0001-Namespace-SHA-functions.patch
 rename package/libstrophe/{0001-make-autoreconfable.patch => 0002-make-autoreconfable.patch} (100%)
 create mode 100644 package/lxc/0001-conf-fix-build-without-libcap.patch
 create mode 100644 package/mediastreamer/0001-fix-compilation-issue-with-latest-bctoobox.patch
 create mode 100644 package/numactl/0001-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
 create mode 100644 package/numactl/0002-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
 create mode 100644 package/openal/0001-Build-NEON-code-with-mfpu-neon.patch
 create mode 100644 package/openal/0002-Check-for-run-time-NEON-support-by-reading.patch
 create mode 100644 package/openal/0003-Properly-check-if-proc-cpuinfo-opened.patch
 create mode 100644 package/openal/0004-Check-if-mfpu-neon-is-available-for-compiling.patch
 rename package/openal/{0001-Fix-detection-of-C11-atomics.patch => 0005-Fix-detection-of-C11-atomics.patch} (100%)
 create mode 100644 package/openssh/0001-configure-ac-detect-mips-abi.patch
 create mode 100644 package/openssh/0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch
 rename package/openssh/{0001-fix-pam-uclibc-pthreads-clash.patch => 0003-fix-pam-uclibc-pthreads-clash.patch} (100%)
 rename package/openssh/{0002-fix-howmany-include.patch => 0004-fix-howmany-include.patch} (100%)
 create mode 100644 package/openzwave/0001-Fix-compilation-of-MinOZW.patch
 rename package/openzwave/{0001-Fix-warning-on-wcsdup-implicit-declaration.patch => 0002-Fix-warning-on-wcsdup-implicit-declaration.patch} (100%)
 rename package/openzwave/{0002-Ensure-correct-git-repository-path.patch => 0003-Ensure-correct-git-repository-path.patch} (100%)
 create mode 100644 package/poco/0001-GNU-version-of-strerror_r-not-available-on-musl.patch
 rename package/poco/{0001-poco-add-the-staging-path-to-search-path.patch => 0002-poco-add-the-staging-path-to-search-path.patch} (100%)
 rename package/poco/{0002-fix-m68k-double-conv-detect.patch => 0003-fix-m68k-double-conv-detect.patch} (100%)
 create mode 100644 package/qt/0001-alsatest-fix-the-check-to-treat-alsalib-1.1.x-as-correct.patch
 rename package/qt/{0001-configure.patch => 0002-configure.patch} (100%)
 rename package/qt/{0002-eglwsegl-use-system.patch => 0003-eglwsegl-use-system.patch} (100%)
 rename package/qt/{0003-fix-const-atomics.patch => 0004-fix-const-atomics.patch} (100%)
 rename package/qt/{0004-pthread_getattr_np.patch => 0005-pthread_getattr_np.patch} (100%)
 rename package/qt/{0005-script-qtdbus-no-gui.patch => 0006-script-qtdbus-no-gui.patch} (100%)
 rename package/qt/{0006-Add-initial-support-of-ARC-architecture.patch => 0007-Add-initial-support-of-ARC-architecture.patch} (100%)
 rename package/qt/{0007-Prevent-unaligned-access-on-ARC.patch => 0008-Prevent-unaligned-access-on-ARC.patch} (100%)
 rename package/qt/{0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch => 0009-Fix-conversion-constructor-error-for-legacy-c-compil.patch} (100%)
 rename package/qt/{0009-Fix-library-inclusion-order-when-building-statically.patch => 0010-Fix-library-inclusion-order-when-building-statically.patch} (100%)
 rename package/qt/{0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch => 0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch} (100%)
 rename package/qt/{0011-Link-with-ldl-option-only-when-it-is-supported.patch => 0012-Link-with-ldl-option-only-when-it-is-supported.patch} (100%)
 rename package/qt/{0012-OpenGL-EGL-Avoid-X11-header-collision.patch => 0013-OpenGL-EGL-Avoid-X11-header-collision.patch} (100%)
 create mode 100644 package/rpm/0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
 create mode 100644 package/rpm/0002-configure-ac-correct-stack-protector-check.patch
 rename package/rpm/{0001-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch => 0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch} (100%)
 rename package/rpm/{0002-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch => 0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch} (100%)
 create mode 100644 package/scrub/0001-configure-ac-make-sure-m4-macros-are-included-in-the-build.patch
 create mode 100644 package/sngrep/0001-autotools-fix-ncurses-wchar-detection.patch
 create mode 100644 package/sngrep/0002-autotools-fix-ncurses-wchar-detection.patch
 create mode 100644 package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch
 create mode 100644 package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch
 rename package/softether/{0001-use-fhs-install-directories.patch => 0003-use-fhs-install-directories.patch} (100%)
 rename package/softether/{0002-create-non-forking-softetherd-for-upstart-and-systemd.patch => 0004-create-non-forking-softetherd-for-upstart-and-systemd.patch} (100%)
 rename package/softether/{0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch => 0005-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch} (100%)
 rename package/softether/{0004-cross-compile.patch => 0006-cross-compile.patch} (100%)
 rename package/softether/{0005-iconv.patch => 0007-iconv.patch} (100%)
 rename package/softether/{0006-librt.patch => 0008-librt.patch} (100%)
 rename package/softether/{0007-uclibc-ai-addrconfig.patch => 0009-uclibc-ai-addrconfig.patch} (100%)
 create mode 100644 package/systemd/0001-resolved-bugfix-of-null-pointer-p-question-dereferencing.patch
 create mode 100644 package/systemd/0002-resolved-simplify-alloc-size-calculation.patch
 create mode 100644 package/systemd/0003-resolved-do-not-allocate-packets-with-minimum-size.patch
 rename package/systemd/{0001-fix-getty-unit.patch => 0004-fix-getty-unit.patch} (100%)
 rename package/systemd/{0002-build-check-for-ln-relative.patch => 0005-build-check-for-ln-relative.patch} (100%)
 rename package/systemd/{0003-fix-am-path-libgcrypt-no-found.patch => 0006-fix-am-path-libgcrypt-no-found.patch} (100%)
 create mode 100644 package/tinycbor/0001-Fix-static-compilation-of-json2cbor.patch
 create mode 100644 package/trinity/0001-use-userspace-headers-for-ax25-instead-of-kernel.patch
 create mode 100644 package/trinity/0002-fix-build-when_USE_BPF-is-not-defined.patch
 create mode 100644 package/trinity/0003-Check-for-bpf-attr-map-flags.patch
 create mode 100644 package/trinity/0004-get_syscall_entry-remove-SYSCALL_OFFSET.patch
 rename package/trinity/{0001-configure-fix-cross-compile-detection-of-broken-ipv6.patch => 0005-configure-fix-cross-compile-detection-of-broken-ipv6.patch} (100%)
 create mode 100644 package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch

-- 
2.9.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 01/20] docs/manual: update details about hashes
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 02/20] efibootmgr: don't download patch from Github Thomas Petazzoni
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

This commit updates the manual about hashes, fixing a number of
issues:

 - Adding the .hash file should no longer be optional: it *must* be
   added. Therefore the wording "You can add ..." is changed to "When
   possible, you must add ...".

 - We are now checking hashes for Git downloaded packages, so fix this
   as well, and indicate more clearly which download methods have hash
   checking.

 - We no longer want to have auto-generated patches be downloaded
   through <pkg>_PATCH because such patches are not stable over time,
   and their hash can change. For example, downloading patches from
   github.com should no longer be done.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 docs/manual/adding-packages-directory.txt | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
index 08f5d42..00b2033 100644
--- a/docs/manual/adding-packages-directory.txt
+++ b/docs/manual/adding-packages-directory.txt
@@ -439,8 +439,10 @@ rules].
 [[adding-packages-hash]]
 === The +.hash+ file
 
-Optionally, you can add a third file, named +libfoo.hash+, that contains
-the hashes of the downloaded files for the +libfoo+ package.
+When possible, you must add a third file, named +libfoo.hash+, that
+contains the hashes of the downloaded files for the +libfoo+
+package. The only reason for not adding a +.hash+ file is when hash
+checking is not possible due to how the package is downloaded.
 
 The hashes stored in that file are used to validate the integrity of the
 downloaded files.
@@ -515,10 +517,17 @@ the downloaded file is left in the download directory since this
 typically indicates that the +.hash+ file is wrong but the downloaded
 file is probably OK.
 
-Sources that are downloaded from a version control system (git, subversion,
-etc...) can not have a hash, because the version control system and tar
-may not create exactly the same file (dates, files ordering...), so the
-hash could be wrong even for a valid download. Therefore, the hash check
-is entirely skipped for such sources.
+Hashes are currently checked for files fetched from http/ftp servers,
+Git repositories, files copied using scp and local files. Hashes are
+not checked for other version control systems (such as Subversion,
+CVS, etc.) because Buildroot currently does not generate reproducible
+tarballs when source code is fetched from such version control
+systems.
+
+Hashes should only be added in +.hash+ files for files that are
+guaranteed to be stable. For example, patches auto-generated by Github
+are not guaranteed to be stable, and therefore their hashes can change
+over time. Such patches should not be downloaded, and instead be added
+locally to the package folder.
 
 If the +.hash+ file is missing, then no check is done at all.
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 02/20] efibootmgr: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 01/20] docs/manual: update details about hashes Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 03/20] jack2: " Thomas Petazzoni
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0001-dont-use-fshort-wchar-when-building.patch | 28 ++++++++++++++++++++++
 ...bc.patch => 0002-Allow-build-with-uClibc.patch} |  0
 package/efibootmgr/efibootmgr.hash                 |  1 -
 package/efibootmgr/efibootmgr.mk                   |  3 ---
 4 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 package/efibootmgr/0001-dont-use-fshort-wchar-when-building.patch
 rename package/efibootmgr/{0001-Allow-build-with-uClibc.patch => 0002-Allow-build-with-uClibc.patch} (100%)

diff --git a/package/efibootmgr/0001-dont-use-fshort-wchar-when-building.patch b/package/efibootmgr/0001-dont-use-fshort-wchar-when-building.patch
new file mode 100644
index 0000000..abafcec
--- /dev/null
+++ b/package/efibootmgr/0001-dont-use-fshort-wchar-when-building.patch
@@ -0,0 +1,28 @@
+From 3466fd05c8c6f1052e0426d64eed40f8a88fd78f Mon Sep 17 00:00:00 2001
+From: steve-mcintyre <steve-github@einval.com>
+Date: Fri, 6 Jan 2017 18:18:47 +0000
+Subject: [PATCH] Don't use -fshort-wchar when building (#63)
+
+It's not needed and is causing build failures with gcc 6. Closes
+Debian bug #849651
+
+Signed-off-by: Steve McIntyre <steve@einval.com>
+[Upstream commit: https://github.com/rhinstaller/efibootmgr/commit/3466fd05c8c6f1052e0426d64eed40f8a88fd78f]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Make.defaults | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Make.defaults b/Make.defaults
+index 50f1f4d..0ac50ef 100644
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -26,7 +26,7 @@ clang_cflags =
+ gcc_cflags =
+ cflags	= $(CFLAGS) $(SUBDIR_CFLAGS) \
+ 	-Werror -Wall -Wextra -Wsign-compare -Wstrict-aliasing \
+-	-std=gnu11 -fshort-wchar -fPIC \
++	-std=gnu11 -fPIC \
+ 	-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DLOCALEDIR=\"$(localedir)\" \
+ 	-DEFIBOOTMGR_VERSION="\"$(VERSION)\"" \
+ 	$(if $(findstring clang,$(CC)),$(clang_cflags),) \
diff --git a/package/efibootmgr/0001-Allow-build-with-uClibc.patch b/package/efibootmgr/0002-Allow-build-with-uClibc.patch
similarity index 100%
rename from package/efibootmgr/0001-Allow-build-with-uClibc.patch
rename to package/efibootmgr/0002-Allow-build-with-uClibc.patch
diff --git a/package/efibootmgr/efibootmgr.hash b/package/efibootmgr/efibootmgr.hash
index 3f934ba..f71dced 100644
--- a/package/efibootmgr/efibootmgr.hash
+++ b/package/efibootmgr/efibootmgr.hash
@@ -1,3 +1,2 @@
 # locally computed hash
 sha256 3f260491e2c62e93cb6347ea6f21aaa5f93152e9e7f0269d314623769d82e473 efibootmgr-14.tar.gz
-sha256 8e91f16927d296ffebd4f7fafda2f84c0f6201aba089a35e8090abd5aacdc58e	3466fd05c8c6f1052e0426d64eed40f8a88fd78f.patch
diff --git a/package/efibootmgr/efibootmgr.mk b/package/efibootmgr/efibootmgr.mk
index a946d5f..094dd28 100644
--- a/package/efibootmgr/efibootmgr.mk
+++ b/package/efibootmgr/efibootmgr.mk
@@ -6,9 +6,6 @@
 
 EFIBOOTMGR_VERSION = 14
 EFIBOOTMGR_SITE = $(call github,rhinstaller,efibootmgr,$(EFIBOOTMGR_VERSION))
-# Patch fixes the build with gcc 6.x.
-EFIBOOTMGR_PATCH = \
-	https://github.com/rhinstaller/efibootmgr/commit/3466fd05c8c6f1052e0426d64eed40f8a88fd78f.patch
 EFIBOOTMGR_LICENSE = GPL-2.0+
 EFIBOOTMGR_LICENSE_FILES = COPYING
 EFIBOOTMGR_DEPENDENCIES = efivar $(if $(BR2_NEEDS_GETTEXT),gettext)
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 03/20] jack2: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 01/20] docs/manual: update details about hashes Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 02/20] efibootmgr: don't download patch from Github Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 04/20] libstrophe: " Thomas Petazzoni
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0001-Fix-initialization-in-test-iodelay.patch  | 65 ++++++++++++++++++++++
 ...patch => 0002-Improve-check-for-ucontext.patch} |  0
 ...ce-support-depends-on-execinfo.h-existen.patch} |  0
 ...=> 0004-tests-define-__STDC_LIMIT_MACROS.patch} |  0
 package/jack2/jack2.hash                           |  1 -
 package/jack2/jack2.mk                             |  1 -
 6 files changed, 65 insertions(+), 2 deletions(-)
 create mode 100644 package/jack2/0001-Fix-initialization-in-test-iodelay.patch
 rename package/jack2/{0001-Improve-check-for-ucontext.patch => 0002-Improve-check-for-ucontext.patch} (100%)
 rename package/jack2/{0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch => 0003-Make-backtrace-support-depends-on-execinfo.h-existen.patch} (100%)
 rename package/jack2/{0003-tests-define-__STDC_LIMIT_MACROS.patch => 0004-tests-define-__STDC_LIMIT_MACROS.patch} (100%)

diff --git a/package/jack2/0001-Fix-initialization-in-test-iodelay.patch b/package/jack2/0001-Fix-initialization-in-test-iodelay.patch
new file mode 100644
index 0000000..ee24938
--- /dev/null
+++ b/package/jack2/0001-Fix-initialization-in-test-iodelay.patch
@@ -0,0 +1,65 @@
+From ff1ed2c4524095055140370c1008a2d9cccc5645 Mon Sep 17 00:00:00 2001
+From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
+Date: Sat, 11 Jun 2016 05:35:07 +0200
+Subject: [PATCH] Fix initialization in test/iodelay.cpp
+
+jack_latency_range_t is
+
+struct _jack_latency_range {
+    jack_nframes_t min;
+    jack_nframes_t max;
+};
+
+and jack_nframes_t is
+
+typedef uint32_t        jack_nframes_t;
+
+so it's unsigned. Initialising it with -1 is invalid (at least in C++14). We cannot use {0, 0}, because latency_cb has
+
+   jack_latency_range_t range;
+   range.min = range.max = 0;
+   if ((range.min != capture_latency.min) || (range.max !=
+       capture_latency.max)) {
+       capture_latency = range;
+   }
+
+so we must not have {0, 0}, otherwise the condition would never be true.
+
+Using UINT32_MAX should be equivalent to the previous -1.
+
+[Upstream commit https://github.com/jackaudio/jack2/commit/ff1ed2c4524095055140370c1008a2d9cccc5645]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ tests/iodelay.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/tests/iodelay.cpp b/tests/iodelay.cpp
+index e1ba63fa..1ef470fd 100644
+--- a/tests/iodelay.cpp
++++ b/tests/iodelay.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <math.h>
+ #include <unistd.h>
+ #include <jack/jack.h>
+@@ -167,8 +168,8 @@ static jack_client_t  *jack_handle;
+ static jack_port_t    *jack_capt;
+ static jack_port_t    *jack_play;
+ 
+-jack_latency_range_t   capture_latency = {-1, -1};
+-jack_latency_range_t   playback_latency = {-1, -1};
++jack_latency_range_t   capture_latency = {UINT32_MAX, UINT32_MAX};
++jack_latency_range_t   playback_latency = {UINT32_MAX, UINT32_MAX};
+ 
+ void
+ latency_cb (jack_latency_callback_mode_t mode, void *arg)
+@@ -266,4 +267,4 @@ int main (int ac, char *av [])
+     return 0;
+ }
+ 
+-// --------------------------------------------------------------------------------
+\ No newline at end of file
++// --------------------------------------------------------------------------------
diff --git a/package/jack2/0001-Improve-check-for-ucontext.patch b/package/jack2/0002-Improve-check-for-ucontext.patch
similarity index 100%
rename from package/jack2/0001-Improve-check-for-ucontext.patch
rename to package/jack2/0002-Improve-check-for-ucontext.patch
diff --git a/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch b/package/jack2/0003-Make-backtrace-support-depends-on-execinfo.h-existen.patch
similarity index 100%
rename from package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch
rename to package/jack2/0003-Make-backtrace-support-depends-on-execinfo.h-existen.patch
diff --git a/package/jack2/0003-tests-define-__STDC_LIMIT_MACROS.patch b/package/jack2/0004-tests-define-__STDC_LIMIT_MACROS.patch
similarity index 100%
rename from package/jack2/0003-tests-define-__STDC_LIMIT_MACROS.patch
rename to package/jack2/0004-tests-define-__STDC_LIMIT_MACROS.patch
diff --git a/package/jack2/jack2.hash b/package/jack2/jack2.hash
index 1b981a4..ab031b9 100644
--- a/package/jack2/jack2.hash
+++ b/package/jack2/jack2.hash
@@ -1,3 +1,2 @@
 # Locally calculated
 sha256 88f1b6601b7c8950e6a2d5940b423a33ee628ae5583da40bdce3d9317d8c600d  jack2-v1.9.10.tar.gz
-sha256 f372c4300e3fb2c1ce053e47829df44f3f8b933feb820759392187723ae8e640  ff1ed2c4524095055140370c1008a2d9cccc5645.patch
diff --git a/package/jack2/jack2.mk b/package/jack2/jack2.mk
index c57ad0e..b61c5d7 100644
--- a/package/jack2/jack2.mk
+++ b/package/jack2/jack2.mk
@@ -9,7 +9,6 @@ JACK2_SITE = $(call github,jackaudio,jack2,$(JACK2_VERSION))
 JACK2_LICENSE = GPL-2.0+ (jack server), LGPL-2.1+ (jack library)
 JACK2_DEPENDENCIES = libsamplerate libsndfile alsa-lib host-python
 JACK2_INSTALL_STAGING = YES
-JACK2_PATCH = https://github.com/jackaudio/jack2/commit/ff1ed2c4524095055140370c1008a2d9cccc5645.patch
 
 JACK2_CONF_OPTS = --alsa
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 04/20] libstrophe: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 03/20] jack2: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 05/20] lxc: " Thomas Petazzoni
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../libstrophe/0001-Namespace-SHA-functions.patch  | 189 +++++++++++++++++++++
 ...nfable.patch => 0002-make-autoreconfable.patch} |   0
 package/libstrophe/libstrophe.hash                 |   1 -
 package/libstrophe/libstrophe.mk                   |   1 -
 4 files changed, 189 insertions(+), 2 deletions(-)
 create mode 100644 package/libstrophe/0001-Namespace-SHA-functions.patch
 rename package/libstrophe/{0001-make-autoreconfable.patch => 0002-make-autoreconfable.patch} (100%)

diff --git a/package/libstrophe/0001-Namespace-SHA-functions.patch b/package/libstrophe/0001-Namespace-SHA-functions.patch
new file mode 100644
index 0000000..8c3451b
--- /dev/null
+++ b/package/libstrophe/0001-Namespace-SHA-functions.patch
@@ -0,0 +1,189 @@
+From b08766c8e46956daba010044b00c97f78b598780 Mon Sep 17 00:00:00 2001
+From: Michael Santos <michael.santos@gmail.com>
+Date: Sun, 24 May 2015 10:55:02 -0400
+Subject: [PATCH] Namespace SHA functions
+
+Fix statically linking against libstrophe by renaming the internal SHA
+functions:
+
+https://github.com/strophe/libstrophe/issues/40
+
+Although the same function names are used by libstrophe and OpenSSL,
+the signatures and contexts of the SHA functions differ, resulting in
+a segfault if the OpenSSL versions are substituted.
+
+[Upstream commit: https://github.com/msantos/libstrophe/commit/b08766c8e46956daba010044b00c97f78b598780]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/auth.c  |  8 ++++----
+ src/scram.c | 22 +++++++++++-----------
+ src/sha1.c  | 30 +++++++++++++++---------------
+ src/sha1.h  |  6 +++---
+ 4 files changed, 33 insertions(+), 33 deletions(-)
+
+diff --git a/src/auth.c b/src/auth.c
+index b06f18c..3506977 100644
+--- a/src/auth.c
++++ b/src/auth.c
+@@ -1187,10 +1187,10 @@ int _handle_component_auth(xmpp_conn_t * const conn)
+     /*?Feed the session id and passphrase to the algorithm.
+      * We need to compute SHA1(session_id + passphrase)
+      */
+-    SHA1_Init(&mdctx);
+-    SHA1_Update(&mdctx, (uint8_t*)conn->stream_id, strlen(conn->stream_id));
+-    SHA1_Update(&mdctx, (uint8_t*)conn->pass, strlen(conn->pass));
+-    SHA1_Final(&mdctx, md_value);
++    xmpp_SHA1_Init(&mdctx);
++    xmpp_SHA1_Update(&mdctx, (uint8_t*)conn->stream_id, strlen(conn->stream_id));
++    xmpp_SHA1_Update(&mdctx, (uint8_t*)conn->pass, strlen(conn->pass));
++    xmpp_SHA1_Final(&mdctx, md_value);
+ 
+     digest = xmpp_alloc(conn->ctx, 2*sizeof(md_value)+1);
+     if (digest) {
+diff --git a/src/scram.c b/src/scram.c
+index 5cce168..6e420e1 100644
+--- a/src/scram.c
++++ b/src/scram.c
+@@ -37,9 +37,9 @@ static void SHA1(const uint8_t* data, size_t len,
+                  uint8_t digest[SHA1_DIGEST_SIZE])
+ {
+     SHA1_CTX ctx;
+-    SHA1_Init(&ctx);
+-    SHA1_Update(&ctx, data, len);
+-    SHA1_Final(&ctx, digest);
++    xmpp_SHA1_Init(&ctx);
++    xmpp_SHA1_Update(&ctx, data, len);
++    xmpp_SHA1_Final(&ctx, digest);
+ }
+ 
+ static void HMAC_SHA1(const uint8_t *key, size_t key_len,
+@@ -66,15 +66,15 @@ static void HMAC_SHA1(const uint8_t *key, size_t key_len,
+         key_opad[i] = key_pad[i] ^ opad;
+     }
+ 
+-    SHA1_Init(&ctx);
+-    SHA1_Update(&ctx, key_ipad, BLOCK_SIZE);
+-    SHA1_Update(&ctx, text, len);
+-    SHA1_Final(&ctx, sha_digest);
++    xmpp_SHA1_Init(&ctx);
++    xmpp_SHA1_Update(&ctx, key_ipad, BLOCK_SIZE);
++    xmpp_SHA1_Update(&ctx, text, len);
++    xmpp_SHA1_Final(&ctx, sha_digest);
+ 
+-    SHA1_Init(&ctx);
+-    SHA1_Update(&ctx, key_opad, BLOCK_SIZE);
+-    SHA1_Update(&ctx, sha_digest, SHA1_DIGEST_SIZE);
+-    SHA1_Final(&ctx, digest);
++    xmpp_SHA1_Init(&ctx);
++    xmpp_SHA1_Update(&ctx, key_opad, BLOCK_SIZE);
++    xmpp_SHA1_Update(&ctx, sha_digest, SHA1_DIGEST_SIZE);
++    xmpp_SHA1_Final(&ctx, digest);
+ }
+ 
+ static void SCRAM_SHA1_Hi(const uint8_t *text, size_t len,
+diff --git a/src/sha1.c b/src/sha1.c
+index 9af4f04..b60b325 100644
+--- a/src/sha1.c
++++ b/src/sha1.c
+@@ -202,7 +202,7 @@ static void SHA1_Transform(uint32_t state[5], const uint8_t buffer[64])
+ 
+ 
+ /* SHA1Init - Initialize new context */
+-void SHA1_Init(SHA1_CTX* context)
++void xmpp_SHA1_Init(SHA1_CTX* context)
+ {
+     /* SHA1 initialization constants */
+     context->state[0] = 0x67452301;
+@@ -215,7 +215,7 @@ void SHA1_Init(SHA1_CTX* context)
+ 
+ 
+ /* Run your data through this. */
+-void SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len)
++void xmpp_SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len)
+ {
+     size_t i, j;
+ 
+@@ -244,7 +244,7 @@ void SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len)
+ 
+ 
+ /* Add padding and return the message digest. */
+-void SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE])
++void xmpp_SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE])
+ {
+     uint32_t i;
+     uint8_t  finalcount[8];
+@@ -253,11 +253,11 @@ void SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE])
+         finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
+          >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
+     }
+-    SHA1_Update(context, (uint8_t *)"\200", 1);
++    xmpp_SHA1_Update(context, (uint8_t *)"\200", 1);
+     while ((context->count[0] & 504) != 448) {
+-        SHA1_Update(context, (uint8_t *)"\0", 1);
++        xmpp_SHA1_Update(context, (uint8_t *)"\0", 1);
+     }
+-    SHA1_Update(context, finalcount, 8);  /* Should cause a SHA1_Transform() */
++    xmpp_SHA1_Update(context, finalcount, 8);  /* Should cause a SHA1_Transform() */
+     for (i = 0; i < SHA1_DIGEST_SIZE; i++) {
+         digest[i] = (uint8_t)
+          ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+@@ -300,12 +300,12 @@ FILE* file;
+             return(-1);
+         }
+     } 
+-    SHA1_Init(&context);
++    xmpp_SHA1_Init(&context);
+     while (!feof(file)) {  /* note: what if ferror(file) */
+         i = fread(buffer, 1, 16384, file);
+-        SHA1_Update(&context, buffer, i);
++        xmpp_SHA1_Update(&context, buffer, i);
+     }
+-    SHA1_Final(&context, digest);
++    xmpp_SHA1_Final(&context, digest);
+     fclose(file);
+     for (i = 0; i < SHA1_DIGEST_SIZE/4; i++) {
+         for (j = 0; j < 4; j++) {
+@@ -358,9 +358,9 @@ int main(int argc, char** argv)
+     fprintf(stdout, "verifying SHA-1 implementation... ");
+     
+     for (k = 0; k < 2; k++){ 
+-        SHA1_Init(&context);
+-        SHA1_Update(&context, (uint8_t*)test_data[k], strlen(test_data[k]));
+-        SHA1_Final(&context, digest);
++        xmpp_SHA1_Init(&context);
++        xmpp_SHA1_Update(&context, (uint8_t*)test_data[k], strlen(test_data[k]));
++        xmpp_SHA1_Final(&context, digest);
+ 	digest_to_hex(digest, output);
+ 
+         if (strcmp(output, test_results[k])) {
+@@ -372,10 +372,10 @@ int main(int argc, char** argv)
+         }    
+     }
+     /* million 'a' vector we feed separately */
+-    SHA1_Init(&context);
++    xmpp_SHA1_Init(&context);
+     for (k = 0; k < 1000000; k++)
+-        SHA1_Update(&context, (uint8_t*)"a", 1);
+-    SHA1_Final(&context, digest);
++        xmpp_SHA1_Update(&context, (uint8_t*)"a", 1);
++    xmpp_SHA1_Final(&context, digest);
+     digest_to_hex(digest, output);
+     if (strcmp(output, test_results[2])) {
+         fprintf(stdout, "FAIL\n");
+diff --git a/src/sha1.h b/src/sha1.h
+index 10266cb..7ff48d7 100644
+--- a/src/sha1.h
++++ b/src/sha1.h
+@@ -23,9 +23,9 @@ typedef struct {
+ 
+ #define SHA1_DIGEST_SIZE 20
+ 
+-void SHA1_Init(SHA1_CTX* context);
+-void SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len);
+-void SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]);
++void xmpp_SHA1_Init(SHA1_CTX* context);
++void xmpp_SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len);
++void xmpp_SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]);
+ 
+ #ifdef __cplusplus
+ }
diff --git a/package/libstrophe/0001-make-autoreconfable.patch b/package/libstrophe/0002-make-autoreconfable.patch
similarity index 100%
rename from package/libstrophe/0001-make-autoreconfable.patch
rename to package/libstrophe/0002-make-autoreconfable.patch
diff --git a/package/libstrophe/libstrophe.hash b/package/libstrophe/libstrophe.hash
index d840303..6a2d997 100644
--- a/package/libstrophe/libstrophe.hash
+++ b/package/libstrophe/libstrophe.hash
@@ -1,3 +1,2 @@
 # Locally calculated
 sha256 08f4a85ef419a8bdf08b6afa8f7b2a0e5e180fdc9c16cede81af672ec10e21e7  libstrophe-0.8.8.tar.gz
-sha256 00936397cbb75ef168992868ae559b141b505d3a06f08163012b240390efa553  b08766c8e46956daba010044b00c97f78b598780.patch
diff --git a/package/libstrophe/libstrophe.mk b/package/libstrophe/libstrophe.mk
index 0dd7c89..4b5a10a 100644
--- a/package/libstrophe/libstrophe.mk
+++ b/package/libstrophe/libstrophe.mk
@@ -12,7 +12,6 @@ LIBSTROPHE_AUTORECONF = YES
 LIBSTROPHE_LICENSE = MIT or GPL-3.0
 LIBSTROPHE_LICENSE_FILES = MIT-LICENSE.txt GPL-LICENSE.txt
 LIBSTROPHE_INSTALL_STAGING = YES
-LIBSTROPHE_PATCH = https://github.com/msantos/libstrophe/commit/b08766c8e46956daba010044b00c97f78b598780.patch
 
 ifeq ($(BR2_PACKAGE_EXPAT),y)
 # Passing --without-libxml2 doesn't work, due to how AC_ARG_WITH is
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 05/20] lxc: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 04/20] libstrophe: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 06/20] mediastreamer: " Thomas Petazzoni
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../lxc/0001-conf-fix-build-without-libcap.patch   | 31 ++++++++++++++++++++++
 package/lxc/lxc.hash                               |  1 -
 package/lxc/lxc.mk                                 |  4 ---
 3 files changed, 31 insertions(+), 5 deletions(-)
 create mode 100644 package/lxc/0001-conf-fix-build-without-libcap.patch

diff --git a/package/lxc/0001-conf-fix-build-without-libcap.patch b/package/lxc/0001-conf-fix-build-without-libcap.patch
new file mode 100644
index 0000000..7e7c010
--- /dev/null
+++ b/package/lxc/0001-conf-fix-build-without-libcap.patch
@@ -0,0 +1,31 @@
+From bc5b27d6f6d166d2a6df47982cbe36041ce6b735 Mon Sep 17 00:00:00 2001
+From: Dima Krasner <dima@securingsam.com>
+Date: Sun, 14 May 2017 12:24:59 +0300
+Subject: [PATCH] conf: fix build without libcap
+
+Signed-off-by: Dima Krasner <samdima@securingsam.com>
+[Upstream commit: https://github.com/lxc/lxc/commit/bc5b27d6f6d166d2a6df47982cbe36041ce6b735]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/lxc/conf.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/lxc/conf.c b/src/lxc/conf.c
+index 35bdb249b..76a190120 100644
+--- a/src/lxc/conf.c
++++ b/src/lxc/conf.c
+@@ -130,6 +130,14 @@ lxc_log_define(lxc_conf, lxc);
+ #define LO_FLAGS_AUTOCLEAR 4
+ #endif
+ 
++#ifndef CAP_SETUID
++#define CAP_SETUID 7
++#endif
++
++#ifndef CAP_SETGID
++#define CAP_SETGID 6
++#endif
++
+ /* needed for cgroup automount checks, regardless of whether we
+  * have included linux/capability.h or not */
+ #ifndef CAP_SYS_ADMIN
diff --git a/package/lxc/lxc.hash b/package/lxc/lxc.hash
index 501f869..086b139 100644
--- a/package/lxc/lxc.hash
+++ b/package/lxc/lxc.hash
@@ -1,3 +1,2 @@
 # Locally calculated
 sha256	0d8e34b302cfe4c40c6c9ae5097096aa5cc2c1dfceea3f0f22e3e16c4a4e8494	lxc-2.0.8.tar.gz
-sha256	16cf466db42a45bd579bdb66efbeb63764cd93d049f05a6d8a659846cab9b47f	bc5b27d6f6d166d2a6df47982cbe36041ce6b735.patch
diff --git a/package/lxc/lxc.mk b/package/lxc/lxc.mk
index 8a200e7..03e9431 100644
--- a/package/lxc/lxc.mk
+++ b/package/lxc/lxc.mk
@@ -11,10 +11,6 @@ LXC_LICENSE_FILES = COPYING
 LXC_DEPENDENCIES = host-pkgconf
 LXC_INSTALL_STAGING = YES
 
-# This patch fixes compilation without capabilities
-LXC_PATCH = \
-	https://github.com/lxc/lxc/commit/bc5b27d6f6d166d2a6df47982cbe36041ce6b735.patch
-
 LXC_CONF_OPTS = --disable-apparmor --with-distro=buildroot \
 	--disable-python --disable-werror \
 	$(if $(BR2_PACKAGE_BASH),,--disable-bash)
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 06/20] mediastreamer: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 05/20] lxc: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 07/20] numactl: don't download patches " Thomas Petazzoni
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...ix-compilation-issue-with-latest-bctoobox.patch | 38 ++++++++++++++++++++++
 package/mediastreamer/mediastreamer.hash           |  1 -
 package/mediastreamer/mediastreamer.mk             |  4 ---
 3 files changed, 38 insertions(+), 5 deletions(-)
 create mode 100644 package/mediastreamer/0001-fix-compilation-issue-with-latest-bctoobox.patch

diff --git a/package/mediastreamer/0001-fix-compilation-issue-with-latest-bctoobox.patch b/package/mediastreamer/0001-fix-compilation-issue-with-latest-bctoobox.patch
new file mode 100644
index 0000000..7bc9733
--- /dev/null
+++ b/package/mediastreamer/0001-fix-compilation-issue-with-latest-bctoobox.patch
@@ -0,0 +1,38 @@
+From 26f884bf977977041fe6f98a0af186be1580bf22 Mon Sep 17 00:00:00 2001
+From: Simon Morlat <simon.morlat@linphone.org>
+Date: Thu, 29 Sep 2016 15:26:18 +0200
+Subject: [PATCH] fix compilation issue with latest bctoobox
+
+[Upstream commit https://github.com/BelledonneCommunications/mediastreamer2/commit/26f884bf977977041fe6f98a0af186be1580bf22]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac           | 2 +-
+ src/crypto/dtls_srtp.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7ab20a08f..244d87275 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1116,7 +1116,7 @@ fi
+ 
+ 
+ dnl check bctoolbox library
+-PKG_CHECK_MODULES(BCTOOLBOX, bctoolbox >= 0.0.0, found_bctoolbox=true, found_bctoolbox=false)
++PKG_CHECK_MODULES(BCTOOLBOX, bctoolbox >= 0.4.0, found_bctoolbox=true, found_bctoolbox=false)
+ if test "$found_bctoolbox" = "true" ; then
+ 	LIBS="$LIBS $BCTOOLBOX_LIBS"
+ 	CFLAGS="$CFLAGS $BCTOOLBOX_CFLAGS"
+diff --git a/src/crypto/dtls_srtp.c b/src/crypto/dtls_srtp.c
+index e2c8e1c44..fd37eb5cb 100644
+--- a/src/crypto/dtls_srtp.c
++++ b/src/crypto/dtls_srtp.c
+@@ -705,7 +705,7 @@ static int ms_dtls_srtp_initialise_bctbx_dtls_context(DtlsBcToolBoxContext *dtls
+ 	bctbx_ssl_config_set_authmode(dtlsContext->ssl_config, BCTBX_SSL_VERIFY_OPTIONAL);
+ 	bctbx_ssl_config_set_own_cert( dtlsContext->ssl_config, dtlsContext->crt, dtlsContext->pkey );
+ 	/* This is useless as peer would certainly be a self signed certificate and we won't verify it but avoid runtime warnings */
+-	bctbx_ssl_config_set_ca_chain(dtlsContext->ssl_config, dtlsContext->crt, NULL);
++	bctbx_ssl_config_set_ca_chain(dtlsContext->ssl_config, dtlsContext->crt);
+ 
+ 	/* we are not ready yet to actually start the ssl context, this will be done by calling bctbx_ssl_setup when stream starts */
+ 	return 0;
diff --git a/package/mediastreamer/mediastreamer.hash b/package/mediastreamer/mediastreamer.hash
index 0f1ac77..5f26b54 100644
--- a/package/mediastreamer/mediastreamer.hash
+++ b/package/mediastreamer/mediastreamer.hash
@@ -1,3 +1,2 @@
 # Locally calculated
 sha256  1144849c0c96abafb1153adf56109f0f195a9e4a53cf28cb611bbca7a9012c1a  mediastreamer-2.14.0.tar.gz
-sha256  90091ab0aa7a77381ab1ca5d88cdfa4e7f62505fb452a2bea0f70054d9d1aece  26f884bf977977041fe6f98a0af186be1580bf22.patch
diff --git a/package/mediastreamer/mediastreamer.mk b/package/mediastreamer/mediastreamer.mk
index a9e0bf7..44d9e97 100644
--- a/package/mediastreamer/mediastreamer.mk
+++ b/package/mediastreamer/mediastreamer.mk
@@ -13,10 +13,6 @@ MEDIASTREAMER_CONF_OPTS = --disable-tests --disable-glx --disable-strict
 MEDIASTREAMER_LICENSE = GPL-2.0+
 MEDIASTREAMER_LICENSE_FILES = COPYING
 
-# fix compilation issue with latest bctoolbox (touches configure.ac)
-MEDIASTREAMER_PATCH = \
-	https://github.com/BelledonneCommunications/mediastreamer2/commit/26f884bf977977041fe6f98a0af186be1580bf22.patch
-
 # patching configure.ac
 MEDIASTREAMER_AUTORECONF = YES
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 07/20] numactl: don't download patches from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 06/20] mediastreamer: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 08/20] openal: " Thomas Petazzoni
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch | 35 +++++++++++++++++++
 ...-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch | 39 ++++++++++++++++++++++
 package/numactl/numactl.hash                       |  2 --
 package/numactl/numactl.mk                         |  3 --
 4 files changed, 74 insertions(+), 5 deletions(-)
 create mode 100644 package/numactl/0001-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
 create mode 100644 package/numactl/0002-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch

diff --git a/package/numactl/0001-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch b/package/numactl/0001-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
new file mode 100644
index 0000000..ebb934f
--- /dev/null
+++ b/package/numactl/0001-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
@@ -0,0 +1,35 @@
+From 3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Fri, 12 Feb 2016 19:25:02 +0100
+Subject: [PATCH] Fix usage of __GLIBC_PREREQ for non-glibc toolchains
+
+The way __GLIBC_PREREQ() is currently used means that it's evaluated
+even if __GLIBC__ is not defined. But obviously, __GLIBC_PREREQ will
+not exist if __GLIBC__ is not defined, causing build failures on C
+libraries not defining __GLIBC__ such as the musl C library.
+
+Patch originally taken from:
+https://github.com/voidlinux/void-packages/blob/master/srcpkgs/numactl/patches/musl.patch
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+[Bernd: Reworked to fix uClibc]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Thomas: improve patch description.]
+[Upstream commit: https://github.com/numactl/numactl/commit/3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456.]
+---
+ syscall.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/syscall.c b/syscall.c
+index 4589b85..37782d9 100644
+--- a/syscall.c
++++ b/syscall.c
+@@ -115,7 +115,7 @@
+ 
+ #endif
+ 
+-#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 11)
++#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 11)
+ 
+ /* glibc 2.11 seems to have working 6 argument sycall. Use the
+    glibc supplied syscall in this case.
diff --git a/package/numactl/0002-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch b/package/numactl/0002-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
new file mode 100644
index 0000000..a98fd72
--- /dev/null
+++ b/package/numactl/0002-Fix-usage-of-GLIBC_PREREQ-for-non-glibc-toolchains.patch
@@ -0,0 +1,39 @@
+From 31dc2951c758698bff060aeae8ffd8854616183b Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Fri, 12 Feb 2016 19:25:02 +0100
+Subject: [PATCH] Fix usage of __GLIBC_PREREQ for non-glibc toolchains
+
+The way __GLIBC_PREREQ() is currently used means that it's evaluated
+even if __GLIBC__ is not defined. But obviously, __GLIBC_PREREQ will
+not exist if __GLIBC__ is not defined, causing build failures on C
+libraries not defining __GLIBC__ such as the musl C library.
+
+Patch originally taken from:
+https://github.com/voidlinux/void-packages/blob/master/srcpkgs/numactl/patches/musl.patch
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+[Bernd: Reworked to fix uClibc]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+[Thomas: improve patch description.]
+[Upstream commit: https://github.com/numactl/numactl/commit/31dc2951c758698bff060aeae8ffd8854616183b]
+---
+ syscall.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/syscall.c b/syscall.c
+index 37782d9..255853d 100644
+--- a/syscall.c
++++ b/syscall.c
+@@ -115,7 +115,11 @@
+ 
+ #endif
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 11)
++#ifndef __GLIBC_PREREQ
++# define __GLIBC_PREREQ(x,y) 0
++#endif
++
++#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 11)
+ 
+ /* glibc 2.11 seems to have working 6 argument sycall. Use the
+    glibc supplied syscall in this case.
diff --git a/package/numactl/numactl.hash b/package/numactl/numactl.hash
index 77ccfae..c36e24d 100644
--- a/package/numactl/numactl.hash
+++ b/package/numactl/numactl.hash
@@ -1,4 +1,2 @@
 # Locally calculated
 sha256	450c091235f891ee874a8651b179c30f57a1391ca5c4673354740ba65e527861	numactl-2.0.11.tar.gz
-sha256	1f4c813cc8c81fa4dfd0be959457a5c3de8fc3316bbc80de3aa1d9ef9992b2b6	3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456.patch
-sha256	0c4cb6550b46976f2a21087490420b218e62ead7d9b178120ad782d53a7ad3a6	31dc2951c758698bff060aeae8ffd8854616183b.patch
diff --git a/package/numactl/numactl.mk b/package/numactl/numactl.mk
index b43bc89..d37ee9e 100644
--- a/package/numactl/numactl.mk
+++ b/package/numactl/numactl.mk
@@ -6,9 +6,6 @@
 
 NUMACTL_VERSION = 2.0.11
 NUMACTL_SITE = ftp://oss.sgi.com/www/projects/libnuma/download
-NUMACTL_PATCH = \
-	https://github.com/numactl/numactl/commit/3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456.patch \
-	https://github.com/numactl/numactl/commit/31dc2951c758698bff060aeae8ffd8854616183b.patch
 NUMACTL_LICENSE = LGPL-2.1 (libnuma), GPL-2.0 (programs)
 NUMACTL_LICENSE_FILES = README
 NUMACTL_INSTALL_STAGING = YES
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 08/20] openal: don't download patches from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 07/20] numactl: don't download patches " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 09/20] openssh: don't download patch " Thomas Petazzoni
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0001-Build-NEON-code-with-mfpu-neon.patch      | 29 ++++++++++
 ...heck-for-run-time-NEON-support-by-reading.patch | 67 ++++++++++++++++++++++
 ...003-Properly-check-if-proc-cpuinfo-opened.patch | 24 ++++++++
 ...k-if-mfpu-neon-is-available-for-compiling.patch | 47 +++++++++++++++
 ...tch => 0005-Fix-detection-of-C11-atomics.patch} |  0
 package/openal/openal.hash                         |  4 --
 package/openal/openal.mk                           |  5 --
 7 files changed, 167 insertions(+), 9 deletions(-)
 create mode 100644 package/openal/0001-Build-NEON-code-with-mfpu-neon.patch
 create mode 100644 package/openal/0002-Check-for-run-time-NEON-support-by-reading.patch
 create mode 100644 package/openal/0003-Properly-check-if-proc-cpuinfo-opened.patch
 create mode 100644 package/openal/0004-Check-if-mfpu-neon-is-available-for-compiling.patch
 rename package/openal/{0001-Fix-detection-of-C11-atomics.patch => 0005-Fix-detection-of-C11-atomics.patch} (100%)

diff --git a/package/openal/0001-Build-NEON-code-with-mfpu-neon.patch b/package/openal/0001-Build-NEON-code-with-mfpu-neon.patch
new file mode 100644
index 0000000..090fdfc
--- /dev/null
+++ b/package/openal/0001-Build-NEON-code-with-mfpu-neon.patch
@@ -0,0 +1,29 @@
+From 27916ce3db023454a0295ee63ea196fbc246674c Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Tue, 6 Sep 2016 22:19:14 +0200
+Subject: [PATCH] Build NEON code with -mfpu=neon
+
+The ARM-specific NEON code needs to be built with -mfpu=neon to avoid
+build failures when a difference FPU is used by default by the
+compiler.
+
+Fixes issue #54.
+
+[Upstream commit: https://github.com/kcat/openal-soft/commit/27916ce3db023454a0295ee63ea196fbc246674c]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d8f15153..d92bbb7d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -767,6 +767,7 @@ IF(HAVE_ARM_NEON_H)
+         SET(HAVE_NEON 1)
+         SET(ALC_OBJS  ${ALC_OBJS} Alc/mixer_neon.c)
+         SET(CPU_EXTS "${CPU_EXTS}, Neon")
++        SET_SOURCE_FILES_PROPERTIES(Alc/mixer_neon.c PROPERTIES COMPILE_FLAGS -mfpu=neon)
+     ENDIF()
+ ENDIF()
+ IF(ALSOFT_REQUIRE_NEON AND NOT HAVE_NEON)
diff --git a/package/openal/0002-Check-for-run-time-NEON-support-by-reading.patch b/package/openal/0002-Check-for-run-time-NEON-support-by-reading.patch
new file mode 100644
index 0000000..0f61a27
--- /dev/null
+++ b/package/openal/0002-Check-for-run-time-NEON-support-by-reading.patch
@@ -0,0 +1,67 @@
+From a52cfc804813aef8e4b304e20cf843fa6907af6c Mon Sep 17 00:00:00 2001
+From: Chris Robinson <chris.kcat@gmail.com>
+Date: Wed, 7 Sep 2016 09:57:40 -0700
+Subject: [PATCH] Check for run-time NEON support by reading /proc/cpuinfo
+
+Less than ideal since documentations warn it may not list 'neon' even if it's
+really supported. However, the "proper" APIs to check for NEON extensions don't
+seem to exist in my toolchain.
+
+[Upstream commit: https://github.com/kcat/openal-soft/commit/a52cfc804813aef8e4b304e20cf843fa6907afc6]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Alc/helpers.c | 34 ++++++++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/Alc/helpers.c b/Alc/helpers.c
+index 9b6c7894..4ffda46c 100644
+--- a/Alc/helpers.c
++++ b/Alc/helpers.c
+@@ -32,6 +32,7 @@
+ #include <time.h>
+ #include <errno.h>
+ #include <stdarg.h>
++#include <ctype.h>
+ #ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+ #endif
+@@ -232,8 +233,37 @@ void FillCPUCaps(ALuint capfilter)
+ #endif
+ #endif
+ #ifdef HAVE_NEON
+-    /* Assume Neon support if compiled with it */
+-    caps |= CPU_CAP_NEON;
++    FILE *file = fopen("/proc/cpuinfo", "rt");
++    if(file)
++        ERR("Failed to open /proc/cpuinfo, cannot check for NEON support\n");
++    else
++    {
++        char buf[256];
++        while(fgets(buf, sizeof(buf), file) != NULL)
++        {
++            char *str;
++
++            if(strncmp(buf, "Features\t:", 10) != 0)
++                continue;
++
++            TRACE("Got features string:%s\n", buf+10);
++
++            str = buf;
++            while((str=strstr(str, "neon")) != NULL)
++            {
++                if(isspace(*(str-1)) && (str[4] == 0 || isspace(str[4])))
++                {
++                    caps |= CPU_CAP_NEON;
++                    break;
++                }
++                str++;
++            }
++            break;
++        }
++
++        fclose(file);
++        file = NULL;
++    }
+ #endif
+ 
+     TRACE("Extensions:%s%s%s%s%s%s\n",
diff --git a/package/openal/0003-Properly-check-if-proc-cpuinfo-opened.patch b/package/openal/0003-Properly-check-if-proc-cpuinfo-opened.patch
new file mode 100644
index 0000000..60a93c0
--- /dev/null
+++ b/package/openal/0003-Properly-check-if-proc-cpuinfo-opened.patch
@@ -0,0 +1,24 @@
+From c3c283a0b5d0130afafaa2a5b6ce6fbc30b6e6a1 Mon Sep 17 00:00:00 2001
+From: Chris Robinson <chris.kcat@gmail.com>
+Date: Thu, 8 Sep 2016 02:02:09 -0700
+Subject: [PATCH] Properly check if /proc/cpuinfo opened
+
+[Upstream commit: https://github.com/kcat/openal-soft/commit/c3c283a0b5d0130afafaa2a5b6ce6fbc30b6e6a1]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Alc/helpers.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Alc/helpers.c b/Alc/helpers.c
+index 4ffda46c..26ed535a 100644
+--- a/Alc/helpers.c
++++ b/Alc/helpers.c
+@@ -234,7 +234,7 @@ void FillCPUCaps(ALuint capfilter)
+ #endif
+ #ifdef HAVE_NEON
+     FILE *file = fopen("/proc/cpuinfo", "rt");
+-    if(file)
++    if(!file)
+         ERR("Failed to open /proc/cpuinfo, cannot check for NEON support\n");
+     else
+     {
diff --git a/package/openal/0004-Check-if-mfpu-neon-is-available-for-compiling.patch b/package/openal/0004-Check-if-mfpu-neon-is-available-for-compiling.patch
new file mode 100644
index 0000000..893a6d3
--- /dev/null
+++ b/package/openal/0004-Check-if-mfpu-neon-is-available-for-compiling.patch
@@ -0,0 +1,47 @@
+From 46b3e1d08ca10e809eb2e20b6371812958b97e1f Mon Sep 17 00:00:00 2001
+From: Chris Robinson <chris.kcat@gmail.com>
+Date: Mon, 12 Sep 2016 11:31:59 -0700
+Subject: [PATCH] Check if -mfpu=neon is available for compiling the NEON mixer
+
+[Upstream commit: https://github.com/kcat/openal-soft/commit/46b3e1d08ca10e809eb2e20b6371812958b97e1f]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ CMakeLists.txt | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d92bbb7d..0d3bb5cd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -364,6 +364,7 @@ SET(SSE_SWITCH "")
+ SET(SSE2_SWITCH "")
+ SET(SSE3_SWITCH "")
+ SET(SSE4_1_SWITCH "")
++SET(FPU_NEON_SWITCH "")
+ IF(NOT MSVC)
+     CHECK_C_COMPILER_FLAG(-msse HAVE_MSSE_SWITCH)
+     IF(HAVE_MSSE_SWITCH)
+@@ -381,6 +382,10 @@ IF(NOT MSVC)
+     IF(HAVE_MSSE4_1_SWITCH)
+         SET(SSE4_1_SWITCH "-msse4.1")
+     ENDIF()
++    CHECK_C_COMPILER_FLAG(-mfpu=neon HAVE_MFPU_NEON_SWITCH)
++    IF(HAVE_MFPU_NEON_SWITCH)
++        SET(FPU_NEON_SWITCH "-mfpu=neon")
++    ENDIF()
+ ENDIF()
+ 
+ CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(printf, 1, 2)));
+@@ -766,8 +771,11 @@ IF(HAVE_ARM_NEON_H)
+     IF(ALSOFT_CPUEXT_NEON)
+         SET(HAVE_NEON 1)
+         SET(ALC_OBJS  ${ALC_OBJS} Alc/mixer_neon.c)
++        IF(FPU_NEON_SWITCH)
++            SET_SOURCE_FILES_PROPERTIES(Alc/mixer_neon.c PROPERTIES
++                                        COMPILE_FLAGS "${FPU_NEON_SWITCH}")
++        ENDIF()
+         SET(CPU_EXTS "${CPU_EXTS}, Neon")
+-        SET_SOURCE_FILES_PROPERTIES(Alc/mixer_neon.c PROPERTIES COMPILE_FLAGS -mfpu=neon)
+     ENDIF()
+ ENDIF()
+ IF(ALSOFT_REQUIRE_NEON AND NOT HAVE_NEON)
diff --git a/package/openal/0001-Fix-detection-of-C11-atomics.patch b/package/openal/0005-Fix-detection-of-C11-atomics.patch
similarity index 100%
rename from package/openal/0001-Fix-detection-of-C11-atomics.patch
rename to package/openal/0005-Fix-detection-of-C11-atomics.patch
diff --git a/package/openal/openal.hash b/package/openal/openal.hash
index 45f1421..260f1b7 100644
--- a/package/openal/openal.hash
+++ b/package/openal/openal.hash
@@ -1,6 +1,2 @@
 # Locally calculated
 sha256	a341f8542f1f0b8c65241a17da13d073f18ec06658e1a1606a8ecc8bbc2b3314	openal-soft-1.17.2.tar.bz2
-sha256	9c9040269376aba77b1277bbae0f055aee535e14ad4a3ab4e66e39830504e83f	27916ce3db023454a0295ee63ea196fbc246674c.patch
-sha256	4621f6b79d4bbac5ce423f227c92ad1e4f833d7e1f2ff1cc3b5f03721f75b933	a52cfc804813aef8e4b304e20cf843fa6907af6c.patch
-sha256	f442da31b4001a5133f2762a5bc1e780b11d5e2d9f21b257f54695ee6d87d997	c3c283a0b5d0130afafaa2a5b6ce6fbc30b6e6a1.patch
-sha256	3691c1a327b87d5fb487841459fd00d3baaa79808ecb5e3b33b349363663640f	46b3e1d08ca10e809eb2e20b6371812958b97e1f.patch
diff --git a/package/openal/openal.mk b/package/openal/openal.mk
index 72ebee2..55bf544 100644
--- a/package/openal/openal.mk
+++ b/package/openal/openal.mk
@@ -7,11 +7,6 @@
 OPENAL_VERSION = 1.17.2
 OPENAL_SOURCE = openal-soft-$(OPENAL_VERSION).tar.bz2
 OPENAL_SITE = http://kcat.strangesoft.net/openal-releases
-OPENAL_PATCH = \
-	https://github.com/kcat/openal-soft/commit/27916ce3db023454a0295ee63ea196fbc246674c.patch \
-	https://github.com/kcat/openal-soft/commit/a52cfc804813aef8e4b304e20cf843fa6907af6c.patch \
-	https://github.com/kcat/openal-soft/commit/c3c283a0b5d0130afafaa2a5b6ce6fbc30b6e6a1.patch \
-	https://github.com/kcat/openal-soft/commit/46b3e1d08ca10e809eb2e20b6371812958b97e1f.patch
 OPENAL_LICENSE = LGPL-2.0+
 OPENAL_LICENSE_FILES = COPYING
 OPENAL_INSTALL_STAGING = YES
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 09/20] openssh: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 08/20] openal: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 10/20] openzwave: " Thomas Petazzoni
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0001-configure-ac-detect-mips-abi.patch        | 44 +++++++++++++++
 ...roperly-set-seccomp-audit-arch-for-mips64.patch | 63 ++++++++++++++++++++++
 ...ch => 0003-fix-pam-uclibc-pthreads-clash.patch} |  0
 ...nclude.patch => 0004-fix-howmany-include.patch} |  0
 package/openssh/openssh.hash                       |  2 -
 package/openssh/openssh.mk                         |  6 +--
 6 files changed, 109 insertions(+), 6 deletions(-)
 create mode 100644 package/openssh/0001-configure-ac-detect-mips-abi.patch
 create mode 100644 package/openssh/0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch
 rename package/openssh/{0001-fix-pam-uclibc-pthreads-clash.patch => 0003-fix-pam-uclibc-pthreads-clash.patch} (100%)
 rename package/openssh/{0002-fix-howmany-include.patch => 0004-fix-howmany-include.patch} (100%)

diff --git a/package/openssh/0001-configure-ac-detect-mips-abi.patch b/package/openssh/0001-configure-ac-detect-mips-abi.patch
new file mode 100644
index 0000000..0d43e6b
--- /dev/null
+++ b/package/openssh/0001-configure-ac-detect-mips-abi.patch
@@ -0,0 +1,44 @@
+From f4fcd8c788a4854d4ebae400cf55e3957f906835 Mon Sep 17 00:00:00 2001
+From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+Date: Tue, 20 Jun 2017 16:42:11 +0100
+Subject: [PATCH] configure.ac: detect MIPS ABI
+
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+[Upstream commit: ttps://github.com/openssh/openssh-portable/commit/f4fcd8c788a4854d4ebae400cf55e3957f906835]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 18079acba..f990cfe08 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -746,6 +746,27 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
+ 	fi
+ 	AC_CHECK_HEADERS([linux/seccomp.h linux/filter.h linux/audit.h], [],
+ 	    [], [#include <linux/types.h>])
++	# Obtain MIPS ABI
++	case "$host" in
++	mips*)
++		AC_COMPILE_IFELSE([
++#if _MIPS_SIM != _ABIO32
++#error
++#endif
++			],[mips_abi="o32"],[AC_COMPILE_IFELSE([
++#if _MIPS_SIM != _ABIN32
++#error
++#endif
++				],[mips_abi="n32"],[AC_COMPILE_IFELSE([
++#if _MIPS_SIM != _ABI64
++#error
++#endif
++					],[mips_abi="n64"],[AC_MSG_ERROR([unknown MIPS ABI])
++				])
++			])
++		])
++		;;
++	esac
+ 	AC_MSG_CHECKING([for seccomp architecture])
+ 	seccomp_audit_arch=
+ 	case "$host" in
diff --git a/package/openssh/0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch b/package/openssh/0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch
new file mode 100644
index 0000000..879af5e
--- /dev/null
+++ b/package/openssh/0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch
@@ -0,0 +1,63 @@
+From afc3e31b637db9dae106d4fad78f7b481c8c24e3 Mon Sep 17 00:00:00 2001
+From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+Date: Tue, 20 Jun 2017 16:42:28 +0100
+Subject: [PATCH] configure.ac: properly set seccomp_audit_arch for MIPS64
+
+Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or
+AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built
+for MIPS64. However, that's only valid for n64 ABI. The right macros for
+n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and
+AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively.
+
+Because of that an sshd built for MIPS64 n32 rejects connection attempts
+and the output of strace reveals that the problem is related to seccomp
+audit:
+
+[pid   194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57,
+filter=0x555d5da0}) = 0
+[pid   194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ?
+[pid   193] <... poll resumed> )        = 2 ([{fd=5, revents=POLLIN|POLLHUP},
+{fd=6, revents=POLLHUP}])
+[pid   194] +++ killed by SIGSYS +++
+
+This patch fixes that problem by setting the right value to
+seccomp_audit_arch taking into account the MIPS64 ABI.
+
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+[Upstream commit: https://github.com/openssh/openssh-portable/commit/afc3e31b637db9dae106d4fad78f7b481c8c24e3]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f990cfe08..5d640f679 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -801,10 +801,24 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
+ 		seccomp_audit_arch=AUDIT_ARCH_MIPSEL
+ 		;;
+ 	mips64-*)
+-		seccomp_audit_arch=AUDIT_ARCH_MIPS64
++		case "$mips_abi" in
++		"n32")
++			seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
++			;;
++		"n64")
++			seccomp_audit_arch=AUDIT_ARCH_MIPS64
++			;;
++		esac
+ 		;;
+ 	mips64el-*)
+-		seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
++		case "$mips_abi" in
++		"n32")
++			seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
++			;;
++		"n64")
++			seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
++			;;
++		esac
+ 		;;
+ 	esac
+ 	if test "x$seccomp_audit_arch" != "x" ; then
diff --git a/package/openssh/0001-fix-pam-uclibc-pthreads-clash.patch b/package/openssh/0003-fix-pam-uclibc-pthreads-clash.patch
similarity index 100%
rename from package/openssh/0001-fix-pam-uclibc-pthreads-clash.patch
rename to package/openssh/0003-fix-pam-uclibc-pthreads-clash.patch
diff --git a/package/openssh/0002-fix-howmany-include.patch b/package/openssh/0004-fix-howmany-include.patch
similarity index 100%
rename from package/openssh/0002-fix-howmany-include.patch
rename to package/openssh/0004-fix-howmany-include.patch
diff --git a/package/openssh/openssh.hash b/package/openssh/openssh.hash
index ed628fa..3685bc0 100644
--- a/package/openssh/openssh.hash
+++ b/package/openssh/openssh.hash
@@ -1,4 +1,2 @@
 # From http://www.openssh.com/txt/release-7.5 (base64 encoded)
 sha256 9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0  openssh-7.5p1.tar.gz
-sha256 310860606c4175cdfd095e724f624df27340c89a916f7a09300bcb7988d5cfbf  afc3e31b637db9dae106d4fad78f7b481c8c24e3.patch
-sha256 395aa1006967713b599555440e09f898781a5559e496223587401768ece10904  f4fcd8c788a4854d4ebae400cf55e3957f906835.patch
diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
index 24d34e8..38a32bf 100644
--- a/package/openssh/openssh.mk
+++ b/package/openssh/openssh.mk
@@ -9,11 +9,9 @@ OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable
 OPENSSH_LICENSE = BSD-3-Clause, BSD-2-Clause, Public Domain
 OPENSSH_LICENSE_FILES = LICENCE
 # Autoreconf needed due to the following patches modifying configure.ac:
-# f4fcd8c788a4854d4ebae400cf55e3957f906835.patch
-# afc3e31b637db9dae106d4fad78f7b481c8c24e3.patch
+# 0001-configure-ac-detect-mips-abi.patch
+# 0002-configure-ac-properly-set-seccomp-audit-arch-for-mips64.patch
 OPENSSH_AUTORECONF = YES
-OPENSSH_PATCH = https://github.com/openssh/openssh-portable/commit/f4fcd8c788a4854d4ebae400cf55e3957f906835.patch \
-	https://github.com/openssh/openssh-portable/commit/afc3e31b637db9dae106d4fad78f7b481c8c24e3.patch
 OPENSSH_CONF_ENV = LD="$(TARGET_CC)" LDFLAGS="$(TARGET_CFLAGS)"
 OPENSSH_CONF_OPTS = \
 	--sysconfdir=/etc/ssh \
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 10/20] openzwave: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 09/20] openssh: don't download patch " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 11/20] poco: " Thomas Petazzoni
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../openzwave/0001-Fix-compilation-of-MinOZW.patch | 37 ++++++++++++++++++++++
 ...x-warning-on-wcsdup-implicit-declaration.patch} |  0
 ... 0003-Ensure-correct-git-repository-path.patch} |  0
 package/openzwave/openzwave.hash                   |  1 -
 package/openzwave/openzwave.mk                     |  6 ----
 5 files changed, 37 insertions(+), 7 deletions(-)
 create mode 100644 package/openzwave/0001-Fix-compilation-of-MinOZW.patch
 rename package/openzwave/{0001-Fix-warning-on-wcsdup-implicit-declaration.patch => 0002-Fix-warning-on-wcsdup-implicit-declaration.patch} (100%)
 rename package/openzwave/{0002-Ensure-correct-git-repository-path.patch => 0003-Ensure-correct-git-repository-path.patch} (100%)

diff --git a/package/openzwave/0001-Fix-compilation-of-MinOZW.patch b/package/openzwave/0001-Fix-compilation-of-MinOZW.patch
new file mode 100644
index 0000000..773672e
--- /dev/null
+++ b/package/openzwave/0001-Fix-compilation-of-MinOZW.patch
@@ -0,0 +1,37 @@
+From 599e2a11c6f48dde744012ec45686c08e15f3059 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fabrice.fontaine@orange.com>
+Date: Mon, 3 Oct 2016 10:35:52 +0200
+Subject: [PATCH] Fix compilation of MinOZW (#991)
+
+LIBDIR was used in cpp/examples/MinOZW/Makefile to add dynamic
+libraries. However, as it was unset by default, the cross-compilation
+could fail if the host had a library such as libnss3.so in /.
+To fix this issue, this patch sets LIBDIR to top_buildir if it is unset
+
+Fixes:
+  http://autobuild.buildroot.net/results/68719fdf1320a69310bada6d3c47654dacdb5898
+
+Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
+[Upstream commit: https://github.com/OpenZWave/open-zwave/commit/599e2a11c6f48dde744012ec45686c08e15f3059]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ cpp/examples/MinOZW/Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/cpp/examples/MinOZW/Makefile b/cpp/examples/MinOZW/Makefile
+index e575632a3..95d684b77 100644
+--- a/cpp/examples/MinOZW/Makefile
++++ b/cpp/examples/MinOZW/Makefile
+@@ -17,9 +17,11 @@ DEBUG_LDFLAGS	:= -g
+ 
+ top_srcdir := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../../../)
+ 
++#where is put the temporary library
++LIBDIR  	?= $(top_builddir)
+ 
+ INCLUDES	:= -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/
+-LIBS =  $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/*.so $(top_builddir)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )
++LIBS =  $(wildcard $(LIBDIR)/*.so $(LIBDIR)/*.dylib $(top_builddir)/cpp/build/*.so $(top_builddir)/cpp/build/*.dylib )
+ LIBSDIR = $(abspath $(dir $(firstword $(LIBS))))
+ minozwsrc := $(notdir $(wildcard $(top_srcdir)/cpp/examples/MinOZW/*.cpp))
+ VPATH := $(top_srcdir)/cpp/examples/MinOZW
diff --git a/package/openzwave/0001-Fix-warning-on-wcsdup-implicit-declaration.patch b/package/openzwave/0002-Fix-warning-on-wcsdup-implicit-declaration.patch
similarity index 100%
rename from package/openzwave/0001-Fix-warning-on-wcsdup-implicit-declaration.patch
rename to package/openzwave/0002-Fix-warning-on-wcsdup-implicit-declaration.patch
diff --git a/package/openzwave/0002-Ensure-correct-git-repository-path.patch b/package/openzwave/0003-Ensure-correct-git-repository-path.patch
similarity index 100%
rename from package/openzwave/0002-Ensure-correct-git-repository-path.patch
rename to package/openzwave/0003-Ensure-correct-git-repository-path.patch
diff --git a/package/openzwave/openzwave.hash b/package/openzwave/openzwave.hash
index d07961e..cd1231f 100644
--- a/package/openzwave/openzwave.hash
+++ b/package/openzwave/openzwave.hash
@@ -1,3 +1,2 @@
 # Locally computed:
 sha256	abfb4c7e7728e86ba374c2e0ef7de912594eb24a8c44935457352df844530238	openzwave-V1.5.tar.gz
-sha256	98851964fd8de3dd40f00d0032b47c61c17a4cf789ad5792e14149da5ab8755e	599e2a11c6f48dde744012ec45686c08e15f3059.patch
diff --git a/package/openzwave/openzwave.mk b/package/openzwave/openzwave.mk
index a632468..38515e3 100644
--- a/package/openzwave/openzwave.mk
+++ b/package/openzwave/openzwave.mk
@@ -13,12 +13,6 @@ OPENZWAVE_LICENSE_FILES = license/license.txt license/lgpl.txt \
 OPENZWAVE_DEPENDENCIES = host-pkgconf udev
 OPENZWAVE_INSTALL_STAGING = YES
 
-# This patch fixes incorrect default value of LIBDIR:
-# http://autobuild.buildroot.net/results/68719fdf1320a69310bada6d3c47654dacdb5898
-# This patch is currently in dev branch and will be a part of v1.6
-OPENZWAVE_PATCH = \
-	https://github.com/OpenZWave/open-zwave/commit/599e2a11c6f48dde744012ec45686c08e15f3059.patch
-
 # Set instlibdir to install libopenzwave.so* in the correct directory
 # otherwise openzwave will check that /lib64 exists (on the host) to
 # know if the library should be installed in $(PREFIX)/lib or $(PREFIX)/lib64.
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 11/20] poco: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 10/20] openzwave: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 12/20] qt: " Thomas Petazzoni
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...rsion-of-strerror_r-not-available-on-musl.patch | 33 ++++++++++++++++++++++
 ...poco-add-the-staging-path-to-search-path.patch} |  0
 ...atch => 0003-fix-m68k-double-conv-detect.patch} |  0
 package/poco/poco.hash                             |  1 -
 package/poco/poco.mk                               |  1 -
 5 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 package/poco/0001-GNU-version-of-strerror_r-not-available-on-musl.patch
 rename package/poco/{0001-poco-add-the-staging-path-to-search-path.patch => 0002-poco-add-the-staging-path-to-search-path.patch} (100%)
 rename package/poco/{0002-fix-m68k-double-conv-detect.patch => 0003-fix-m68k-double-conv-detect.patch} (100%)

diff --git a/package/poco/0001-GNU-version-of-strerror_r-not-available-on-musl.patch b/package/poco/0001-GNU-version-of-strerror_r-not-available-on-musl.patch
new file mode 100644
index 0000000..c2f297f
--- /dev/null
+++ b/package/poco/0001-GNU-version-of-strerror_r-not-available-on-musl.patch
@@ -0,0 +1,33 @@
+From 30159aea4b3f6421da9d74a8bf22aad6d3bf26b4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Mon, 4 Apr 2016 20:48:43 +0200
+Subject: [PATCH] GNU version of strerror_r not available on musl
+
+The GNU version of glibc' `strerror_r` is non-portable.
+
+When the POSIX and GNU API collides musl always provides the POSIX API. That
+being the case for `strerror_r` musl does only support the POSIX version,
+despite of `_GNU_SOURCE`.
+
+[Upstream commit: https://github.com/pocoproject/poco/commit/30159aea4b3f6421da9d74a8bf22aad6d3bf26b4]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Foundation/src/Error.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Foundation/src/Error.cpp b/Foundation/src/Error.cpp
+index 6a8afb705f..00991fc0be 100644
+--- a/Foundation/src/Error.cpp
++++ b/Foundation/src/Error.cpp
+@@ -69,7 +69,10 @@ namespace Poco {
+ 		   without -D_GNU_SOURCE is needed, otherwise the GNU version is
+ 		   preferred.
+ 		*/
+-#if defined _GNU_SOURCE && !POCO_ANDROID
++		/* The GNU version of strerror_r is non-portable and not
++		   available on the musl C library.
++		 */
++#if (defined __GLIBC__ || defined __UCLIBC__) && defined _GNU_SOURCE && !POCO_ANDROID
+ 		char errmsg[256] = "";
+ 		return std::string(strerror_r(errorCode, errmsg, 256));
+ #elif (_XOPEN_SOURCE >= 600) || POCO_ANDROID
diff --git a/package/poco/0001-poco-add-the-staging-path-to-search-path.patch b/package/poco/0002-poco-add-the-staging-path-to-search-path.patch
similarity index 100%
rename from package/poco/0001-poco-add-the-staging-path-to-search-path.patch
rename to package/poco/0002-poco-add-the-staging-path-to-search-path.patch
diff --git a/package/poco/0002-fix-m68k-double-conv-detect.patch b/package/poco/0003-fix-m68k-double-conv-detect.patch
similarity index 100%
rename from package/poco/0002-fix-m68k-double-conv-detect.patch
rename to package/poco/0003-fix-m68k-double-conv-detect.patch
diff --git a/package/poco/poco.hash b/package/poco/poco.hash
index 1730f1c..c3b490e 100644
--- a/package/poco/poco.hash
+++ b/package/poco/poco.hash
@@ -1,3 +1,2 @@
 # Locally computed
 sha256  cfd311ecbc9e58accf1c4ea70170af88f92f88e73dd14944e528e7f6229e6cab  poco-poco-1.7.2-release.tar.gz
-sha256  32182791e7eac00ba367d2f22dd1dd5bfce0b6d6f76fd52f853364f98402dda3  30159aea4b3f6421da9d74a8bf22aad6d3bf26b4.patch
diff --git a/package/poco/poco.mk b/package/poco/poco.mk
index 3b27ddb..c9ddeae 100644
--- a/package/poco/poco.mk
+++ b/package/poco/poco.mk
@@ -9,7 +9,6 @@ POCO_SITE = $(call github,pocoproject,poco,$(POCO_VERSION))
 POCO_LICENSE = BSL-1.0
 POCO_LICENSE_FILES = LICENSE
 POCO_INSTALL_STAGING = YES
-POCO_PATCH = https://github.com/pocoproject/poco/commit/30159aea4b3f6421da9d74a8bf22aad6d3bf26b4.patch
 
 POCO_DEPENDENCIES = zlib pcre \
 	$(if $(BR2_PACKAGE_POCO_XML),expat) \
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 12/20] qt: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (10 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 11/20] poco: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 13/20] rpm: don't download patches " Thomas Petazzoni
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...e-check-to-treat-alsalib-1.1.x-as-correct.patch | 29 ++++++++++++++++++++++
 .../{0001-configure.patch => 0002-configure.patch} |  0
 ...system.patch => 0003-eglwsegl-use-system.patch} |  0
 ...-atomics.patch => 0004-fix-const-atomics.patch} |  0
 ...attr_np.patch => 0005-pthread_getattr_np.patch} |  0
 ...o-gui.patch => 0006-script-qtdbus-no-gui.patch} |  0
 ...-Add-initial-support-of-ARC-architecture.patch} |  0
 ... => 0008-Prevent-unaligned-access-on-ARC.patch} |  0
 ...on-constructor-error-for-legacy-c-compil.patch} |  0
 ...inclusion-order-when-building-statically.patch} |  0
 ...form-socklen_t-on-other-C-libraries-than.patch} |  0
 ...ith-ldl-option-only-when-it-is-supported.patch} |  0
 ...13-OpenGL-EGL-Avoid-X11-header-collision.patch} |  0
 package/qt/qt.hash                                 |  1 -
 package/qt/qt.mk                                   |  3 ---
 15 files changed, 29 insertions(+), 4 deletions(-)
 create mode 100644 package/qt/0001-alsatest-fix-the-check-to-treat-alsalib-1.1.x-as-correct.patch
 rename package/qt/{0001-configure.patch => 0002-configure.patch} (100%)
 rename package/qt/{0002-eglwsegl-use-system.patch => 0003-eglwsegl-use-system.patch} (100%)
 rename package/qt/{0003-fix-const-atomics.patch => 0004-fix-const-atomics.patch} (100%)
 rename package/qt/{0004-pthread_getattr_np.patch => 0005-pthread_getattr_np.patch} (100%)
 rename package/qt/{0005-script-qtdbus-no-gui.patch => 0006-script-qtdbus-no-gui.patch} (100%)
 rename package/qt/{0006-Add-initial-support-of-ARC-architecture.patch => 0007-Add-initial-support-of-ARC-architecture.patch} (100%)
 rename package/qt/{0007-Prevent-unaligned-access-on-ARC.patch => 0008-Prevent-unaligned-access-on-ARC.patch} (100%)
 rename package/qt/{0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch => 0009-Fix-conversion-constructor-error-for-legacy-c-compil.patch} (100%)
 rename package/qt/{0009-Fix-library-inclusion-order-when-building-statically.patch => 0010-Fix-library-inclusion-order-when-building-statically.patch} (100%)
 rename package/qt/{0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch => 0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch} (100%)
 rename package/qt/{0011-Link-with-ldl-option-only-when-it-is-supported.patch => 0012-Link-with-ldl-option-only-when-it-is-supported.patch} (100%)
 rename package/qt/{0012-OpenGL-EGL-Avoid-X11-header-collision.patch => 0013-OpenGL-EGL-Avoid-X11-header-collision.patch} (100%)

diff --git a/package/qt/0001-alsatest-fix-the-check-to-treat-alsalib-1.1.x-as-correct.patch b/package/qt/0001-alsatest-fix-the-check-to-treat-alsalib-1.1.x-as-correct.patch
new file mode 100644
index 0000000..4cec4bd
--- /dev/null
+++ b/package/qt/0001-alsatest-fix-the-check-to-treat-alsalib-1.1.x-as-correct.patch
@@ -0,0 +1,29 @@
+From b8f98d956501dfa4ce03a137f15d404930a56066 Mon Sep 17 00:00:00 2001
+From: Dmitry Shachnev <mitya57@gmail.com>
+Date: Sat, 5 Mar 2016 10:25:33 +0300
+Subject: [PATCH] alsatest: Fix the check to treat alsalib 1.1.x as correct
+ version
+
+Task-number: QTBUG-51681
+Change-Id: I63266c33342f02f4d1a5ea5786f5fbc5a1b421b3
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
+[Upstream commit: https://github.com/qtproject/qtbase/commit/b8f98d956501dfa4ce03a137f15d404930a56066]
+[Patch fixing ALSA detection. Taken from Qt5, but applies fine to Qt4.]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ config.tests/unix/alsa/alsatest.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.tests/unix/alsa/alsatest.cpp b/config.tests/unix/alsa/alsatest.cpp
+index cab6533977..0b45819b61 100644
+--- a/config.tests/unix/alsa/alsatest.cpp
++++ b/config.tests/unix/alsa/alsatest.cpp
+@@ -32,7 +32,7 @@
+ ****************************************************************************/
+ 
+ #include <alsa/asoundlib.h>
+-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
++#if SND_LIB_VERSION < 0x1000a  // 1.0.10
+ #error "Alsa version found too old, require >= 1.0.10"
+ #endif
+ 
diff --git a/package/qt/0001-configure.patch b/package/qt/0002-configure.patch
similarity index 100%
rename from package/qt/0001-configure.patch
rename to package/qt/0002-configure.patch
diff --git a/package/qt/0002-eglwsegl-use-system.patch b/package/qt/0003-eglwsegl-use-system.patch
similarity index 100%
rename from package/qt/0002-eglwsegl-use-system.patch
rename to package/qt/0003-eglwsegl-use-system.patch
diff --git a/package/qt/0003-fix-const-atomics.patch b/package/qt/0004-fix-const-atomics.patch
similarity index 100%
rename from package/qt/0003-fix-const-atomics.patch
rename to package/qt/0004-fix-const-atomics.patch
diff --git a/package/qt/0004-pthread_getattr_np.patch b/package/qt/0005-pthread_getattr_np.patch
similarity index 100%
rename from package/qt/0004-pthread_getattr_np.patch
rename to package/qt/0005-pthread_getattr_np.patch
diff --git a/package/qt/0005-script-qtdbus-no-gui.patch b/package/qt/0006-script-qtdbus-no-gui.patch
similarity index 100%
rename from package/qt/0005-script-qtdbus-no-gui.patch
rename to package/qt/0006-script-qtdbus-no-gui.patch
diff --git a/package/qt/0006-Add-initial-support-of-ARC-architecture.patch b/package/qt/0007-Add-initial-support-of-ARC-architecture.patch
similarity index 100%
rename from package/qt/0006-Add-initial-support-of-ARC-architecture.patch
rename to package/qt/0007-Add-initial-support-of-ARC-architecture.patch
diff --git a/package/qt/0007-Prevent-unaligned-access-on-ARC.patch b/package/qt/0008-Prevent-unaligned-access-on-ARC.patch
similarity index 100%
rename from package/qt/0007-Prevent-unaligned-access-on-ARC.patch
rename to package/qt/0008-Prevent-unaligned-access-on-ARC.patch
diff --git a/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch b/package/qt/0009-Fix-conversion-constructor-error-for-legacy-c-compil.patch
similarity index 100%
rename from package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch
rename to package/qt/0009-Fix-conversion-constructor-error-for-legacy-c-compil.patch
diff --git a/package/qt/0009-Fix-library-inclusion-order-when-building-statically.patch b/package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch
similarity index 100%
rename from package/qt/0009-Fix-library-inclusion-order-when-building-statically.patch
rename to package/qt/0010-Fix-library-inclusion-order-when-building-statically.patch
diff --git a/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch b/package/qt/0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
similarity index 100%
rename from package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
rename to package/qt/0011-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch
diff --git a/package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch b/package/qt/0012-Link-with-ldl-option-only-when-it-is-supported.patch
similarity index 100%
rename from package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch
rename to package/qt/0012-Link-with-ldl-option-only-when-it-is-supported.patch
diff --git a/package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch b/package/qt/0013-OpenGL-EGL-Avoid-X11-header-collision.patch
similarity index 100%
rename from package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch
rename to package/qt/0013-OpenGL-EGL-Avoid-X11-header-collision.patch
diff --git a/package/qt/qt.hash b/package/qt/qt.hash
index de81368..301010c 100644
--- a/package/qt/qt.hash
+++ b/package/qt/qt.hash
@@ -1,4 +1,3 @@
 # md5 http://download.qt.io/official_releases/qt/4.8/4.8.7/md5sums-4.8.7, sha256 locally computed:
 md5    d990ee66bf7ab0c785589776f35ba6ad                                 qt-everywhere-opensource-src-4.8.7.tar.gz
 sha256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 qt-everywhere-opensource-src-4.8.7.tar.gz
-sha256 e03740e20b8dbf52d163d8a4a37125e7c55b59a9a5e7cf7e89a08e07286b6135 b8f98d956501dfa4ce03a137f15d404930a56066.patch
diff --git a/package/qt/qt.mk b/package/qt/qt.mk
index 8b52208..e9af8f4 100644
--- a/package/qt/qt.mk
+++ b/package/qt/qt.mk
@@ -8,9 +8,6 @@ QT_VERSION_MAJOR = 4.8
 QT_VERSION = $(QT_VERSION_MAJOR).7
 QT_SOURCE = qt-everywhere-opensource-src-$(QT_VERSION).tar.gz
 QT_SITE = http://download.qt-project.org/official_releases/qt/$(QT_VERSION_MAJOR)/$(QT_VERSION)
-# Patch fixing ALSA detection. Taken from Qt5, but applies fine to
-# Qt4.
-QT_PATCH = https://github.com/qtproject/qtbase/commit/b8f98d956501dfa4ce03a137f15d404930a56066.patch
 QT_DEPENDENCIES = host-pkgconf
 QT_INSTALL_STAGING = YES
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 13/20] rpm: don't download patches from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (11 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 12/20] qt: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 14/20] scrub: don't download patch " Thomas Petazzoni
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...ink-instead-of-compile-for-gcc-flags-test.patch | 33 ++++++++++++++++
 ...onfigure-ac-correct-stack-protector-check.patch | 45 ++++++++++++++++++++++
 ...-to-enable-disable-sepdebugcrcfix-buildi.patch} |  0
 ...ugcrcfix.c-fix-build-with-recent-binutil.patch} |  0
 package/rpm/rpm.hash                               |  3 --
 package/rpm/rpm.mk                                 |  7 +---
 6 files changed, 80 insertions(+), 8 deletions(-)
 create mode 100644 package/rpm/0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
 create mode 100644 package/rpm/0002-configure-ac-correct-stack-protector-check.patch
 rename package/rpm/{0001-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch => 0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch} (100%)
 rename package/rpm/{0002-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch => 0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch} (100%)

diff --git a/package/rpm/0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch b/package/rpm/0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
new file mode 100644
index 0000000..6f6a2ab
--- /dev/null
+++ b/package/rpm/0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
@@ -0,0 +1,33 @@
+From b5f1895aae096836d6e8e155ee289e1b10fcabcb Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Sat, 10 Oct 2015 23:17:44 +0200
+Subject: [PATCH] configure.ac: use link instead of compile for gcc flags test
+
+The logic that tests whether gcc supports or not certain flags uses
+AC_COMPILE_IFELSE(). However, when checking for stack smashing
+protection support, an AC_LINK_IFELSE() test is needed, since the
+build might work but not the link stage if certain libraries are
+missing for proper stack smashing protection support.
+
+Therefore, this commit switches to use AC_LINK_IFELSE().
+
+[Upstream commit: https://github.com/rpm-software-management/rpm/commit/b5f1895aae096836d6e8e155ee289e1b10fcabcb]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: James Knight <james.d.knight@live.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6ece8c9fd..822294c3f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,7 @@ if test "$GCC" = yes; then
+     echo
+     for flag in $cflags_to_try; do
+         CFLAGS="$CFLAGS $flag -Werror"
+-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
++        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
+                 echo "   $flag"
+                 RPMCFLAGS="$RPMCFLAGS $flag"
+         ],[])
diff --git a/package/rpm/0002-configure-ac-correct-stack-protector-check.patch b/package/rpm/0002-configure-ac-correct-stack-protector-check.patch
new file mode 100644
index 0000000..9d2942b
--- /dev/null
+++ b/package/rpm/0002-configure-ac-correct-stack-protector-check.patch
@@ -0,0 +1,45 @@
+From c810a0aca3f1148d2072d44b91b8cc9caeb4cf19 Mon Sep 17 00:00:00 2001
+From: James Knight <james.knight@rockwellcollins.com>
+Date: Wed, 16 Nov 2016 15:54:46 -0500
+Subject: [PATCH] configure.ac: correct stack protector check
+
+If a used toolchain accepts the `-fstack-protector` option but does not
+provide a stack smashing protector implementation (ex. libssp), linking
+will fail:
+
+ .libs/rpmio.o: In function `Fdescr':
+ rpmio.c:(.text+0x672): undefined reference to `__stack_chk_fail_local'
+ .libs/rpmio.o: In function `Fdopen':
+ rpmio.c:(.text+0xce9): undefined reference to `__stack_chk_fail_local'
+ .libs/rpmio.o: In function `ufdCopy':
+ rpmio.c:(.text+0x10f7): undefined reference to `__stack_chk_fail_local'
+ ...
+
+This is a result of testing for `-fstack-protector` support using a main
+that GCC does not inject guards. GCC's manual notes that stack protector
+code is only added when "[functions] that call alloca, and functions
+with buffers larger than 8 bytes" [1]. This commit adjusts the stack
+protector check to allocate memory on the stack (via `alloca`).
+
+[1]: https://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
+
+Signed-off-by: James Knight <james.knight@rockwellcollins.com>
+[Upstream commit: https://github.com/rpm-software-management/rpm/commit/c810a0aca3f1148d2072d44b91b8cc9caeb4cf19]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a9730d3bc..b4b3fe8fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -43,7 +43,7 @@ if test "$GCC" = yes; then
+     echo
+     for flag in $cflags_to_try; do
+         CFLAGS="$CFLAGS $flag -Werror"
+-        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0;]])],[
++        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[alloca(100);]])],[
+                 echo "   $flag"
+                 RPMCFLAGS="$RPMCFLAGS $flag"
+         ],[])
diff --git a/package/rpm/0001-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch b/package/rpm/0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch
similarity index 100%
rename from package/rpm/0001-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch
rename to package/rpm/0003-Detect-bfd.h-to-enable-disable-sepdebugcrcfix-buildi.patch
diff --git a/package/rpm/0002-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch b/package/rpm/0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch
similarity index 100%
rename from package/rpm/0002-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch
rename to package/rpm/0004-tools-sepdebugcrcfix.c-fix-build-with-recent-binutil.patch
diff --git a/package/rpm/rpm.hash b/package/rpm/rpm.hash
index fd77d33..7ae9ec7 100644
--- a/package/rpm/rpm.hash
+++ b/package/rpm/rpm.hash
@@ -1,5 +1,2 @@
 # From http://rpm.org/wiki/Releases/4.13.0.1
 sha1 9566f95f38fcb214e439c552f378c2f64ba0aff9  rpm-4.13.0.1.tar.bz2
-# Locally computed
-sha256	a3e5568d721737a24141737e6036bb39ba9dfbeaa03fa4a51cc7881a243e0c5d b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch
-sha256	7ab0e08e143bb2d43d5b0553ee22ea34da15a611c597860a6110745467d20fa8 c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch
diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk
index fdaf27c..317ec14 100644
--- a/package/rpm/rpm.mk
+++ b/package/rpm/rpm.mk
@@ -11,12 +11,9 @@ RPM_SITE = http://ftp.rpm.org/releases/rpm-$(RPM_VERSION_MAJOR).x
 RPM_DEPENDENCIES = host-pkgconf berkeleydb file popt zlib
 RPM_LICENSE = GPL-2.0 or LGPL-2.0 (library only)
 RPM_LICENSE_FILES = COPYING
-RPM_PATCH = \
-	https://github.com/rpm-software-management/rpm/commit/b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch \
-	https://github.com/rpm-software-management/rpm/commit/c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch
 
-# b5f1895aae096836d6e8e155ee289e1b10fcabcb.patch
-# c810a0aca3f1148d2072d44b91b8cc9caeb4cf19.patch
+# 0001-configure-ac-use-link-instead-of-compile-for-gcc-flags-test.patch
+# 0002-configure-ac-correct-stack-protector-check.patch
 RPM_AUTORECONF = YES
 
 RPM_CONF_OPTS = \
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 14/20] scrub: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (12 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 13/20] rpm: don't download patches " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 15/20] sngrep: " Thomas Petazzoni
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-sure-m4-macros-are-included-in-the-build.patch | 45 ++++++++++++++++++++++
 package/scrub/scrub.hash                           |  1 -
 package/scrub/scrub.mk                             |  1 -
 3 files changed, 45 insertions(+), 2 deletions(-)
 create mode 100644 package/scrub/0001-configure-ac-make-sure-m4-macros-are-included-in-the-build.patch

diff --git a/package/scrub/0001-configure-ac-make-sure-m4-macros-are-included-in-the-build.patch b/package/scrub/0001-configure-ac-make-sure-m4-macros-are-included-in-the-build.patch
new file mode 100644
index 0000000..d8729b4
--- /dev/null
+++ b/package/scrub/0001-configure-ac-make-sure-m4-macros-are-included-in-the-build.patch
@@ -0,0 +1,45 @@
+From 11d30916dd9c11a26c7c8a0f6db9e6ebca301594 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Mon, 18 Jan 2016 21:45:23 +0100
+Subject: [PATCH] configure.ac: make sure m4 macros are included in the build
+
+This change prevents the following error to occur when calling
+autoreconf:
+
+  >>> scrub 2.6.1 Autoreconfiguring
+  cd /work/build/scrub/build/scrub-2.6.1/ &&  PATH="/work/build/scrub/host/bin:/work/build/scrub/host/sbin:/work/build/scrub/host/usr/bin:/work/build/scrub/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/sbin:/usr/sbin" AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp" OBJCOPY="/usr/bin/objcopy" RANLIB="/usr/bin/ranlib" CPPFLAGS="-I/work/build/scrub/host/usr/include" CFLAGS="-O2 -I/work/build/scrub/host/usr/include" CXXFLAGS="-O2 -I/work/build/scrub/host/usr/include" LDFLAGS="-L/work/build/scrub/host/lib -L/work/build/scrub/host/usr/lib -Wl,-rpath,/work/build/scrub/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/work/build/scrub/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/work/build/scrub/host/usr/lib/pkgconfig:/work/build/s
 crub/hos
 t/usr/share/pkgconfig" INTLTOOL_PERL=/usr/bin/perl ACLOCAL="/work/build/scrub/host/usr/bin/aclocal -I /work/build/scrub/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/share/aclocal" AUTOCONF="/work/build/scrub/host/usr/bin/autoconf" AUTOHEADER="/work/build/scrub/host/usr/bin/autoheader" AUTOMAKE="/work/build/scrub/host/usr/bin/automake" AUTOPOINT=/bin/true /work/build/scrub/host/usr/bin/autoreconf -f -i -I "/work/build/scrub/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/share/aclocal" -I "/work/build/scrub/host/usr/share/aclocal"
+  libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'config'.
+  libtoolize: copying file 'config/ltmain.sh'
+  libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
+  libtoolize: and rerunning libtoolize and aclocal.
+  libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
+  configure.ac:10: error possibly undefined macro: X_AC_META
+        If this token and others are legitimate, please use m4_pattern_allow.
+        See the Autoconf documentation.
+  configure.ac:11: error possibly undefined macro: X_AC_EXPAND_INSTALL_DIRS
+  configure.ac:51: error possibly undefined macro: AC_PKGCONFIG
+  configure.ac:70: error possibly undefined macro: X_AC_CHECK_PTHREADS
+  autoreconf: /work/build/scrub/host/usr/bin/autoconf failed with exit status: 1
+  package/pkg-generic.mk:185: recipe for target '/work/build/scrub/build/scrub-2.6.1/.stamp_configured' failed
+  make: *** [/work/build/scrub/build/scrub-2.6.1/.stamp_configured] Error 1
+  make: Leaving directory '/work/repos/buildroot'
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+[Upstream commit: https://github.com/chaos/scrub/commit/11d30916dd9c11a26c7c8a0f6db9e6ebca301594]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 3d71289..07eaf33 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -7,6 +7,7 @@ AC_INIT(m4_esyscmd([awk '/Name:/ {printf "%s",$2; exit}' META]),
+ AC_CONFIG_AUX_DIR([config])
+ AC_CONFIG_SRCDIR([NEWS])
+ AC_CANONICAL_SYSTEM
++AC_CONFIG_MACRO_DIR([config])
+ X_AC_META
+ X_AC_EXPAND_INSTALL_DIRS
+ 
diff --git a/package/scrub/scrub.hash b/package/scrub/scrub.hash
index 0041fd0..42f7b2f 100644
--- a/package/scrub/scrub.hash
+++ b/package/scrub/scrub.hash
@@ -1,3 +1,2 @@
 # Locally computed
 sha256  838b061b2e1932b342fb9695c5579cdff5d2d72506cb41d6d8032eba18aed969  scrub-2.6.1.tar.gz
-sha256  6a129b4e0df6ebe02d449fa481db7b75be5eff08ce518aa77edd74c6b17c5ae4  11d30916dd9c11a26c7c8a0f6db9e6ebca301594.patch
diff --git a/package/scrub/scrub.mk b/package/scrub/scrub.mk
index 0207a4c..ace19d5 100644
--- a/package/scrub/scrub.mk
+++ b/package/scrub/scrub.mk
@@ -8,7 +8,6 @@ SCRUB_VERSION = 2.6.1
 SCRUB_SITE = $(call github,chaos,scrub,$(SCRUB_VERSION))
 SCRUB_LICENSE = GPL-2.0+
 SCRUB_LICENSE_FILES = COPYING DISCLAIMER
-SCRUB_PATCH = https://github.com/chaos/scrub/commit/11d30916dd9c11a26c7c8a0f6db9e6ebca301594.patch
 
 # Fetching from the git repo, no configure/Makefile generated, and patching
 # configure.ac
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 15/20] sngrep: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (13 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 14/20] scrub: don't download patch " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 16/20] softether: " Thomas Petazzoni
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

For this package, the patch is not replaced 1:1 with what Github was
providing. Indeed, the URL
https://github.com/irontec/sngrep/pull/191/commits/4740f3341a99eaec105dee202a6fa7828212cdf1.patch
no longer exists. This pull request has been merged, so we instead use
the real upstream commits. However, the upstream developer apparently
messed up, and applied the change in two separate commits, which is
why one patch fetched from Github is replaced by this commit by two
patches in package/sngrep/.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...001-autotools-fix-ncurses-wchar-detection.patch | 158 +++++++++++++++++++++
 ...002-autotools-fix-ncurses-wchar-detection.patch |  45 ++++++
 package/sngrep/sngrep.hash                         |   1 -
 package/sngrep/sngrep.mk                           |   4 -
 4 files changed, 203 insertions(+), 5 deletions(-)
 create mode 100644 package/sngrep/0001-autotools-fix-ncurses-wchar-detection.patch
 create mode 100644 package/sngrep/0002-autotools-fix-ncurses-wchar-detection.patch

diff --git a/package/sngrep/0001-autotools-fix-ncurses-wchar-detection.patch b/package/sngrep/0001-autotools-fix-ncurses-wchar-detection.patch
new file mode 100644
index 0000000..8769096
--- /dev/null
+++ b/package/sngrep/0001-autotools-fix-ncurses-wchar-detection.patch
@@ -0,0 +1,158 @@
+From 9a6550055f828c39a4f910f631041a4883f71dc6 Mon Sep 17 00:00:00 2001
+From: Kaian <kaian@irontec.com>
+Date: Tue, 30 May 2017 11:15:49 +0200
+Subject: [PATCH] autotools: fix ncurses wchar detection
+
+[Upstream commit: https://github.com/irontec/sngrep/commit/9a6550055f828c39a4f910f631041a4883f71dc6]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile.am            |  1 +
+ configure.ac           | 15 +++++++------
+ m4/sngrep.m4           | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/curses/scrollbar.h |  5 ++---
+ src/curses/ui_panel.h  |  5 ++---
+ 5 files changed, 74 insertions(+), 13 deletions(-)
+ create mode 100644 m4/sngrep.m4
+
+diff --git a/Makefile.am b/Makefile.am
+index b0dd2a5..8cd4df7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,2 +1,3 @@
++ACLOCAL_AMFLAGS = -I m4
+ SUBDIRS=src config doc tests
+ EXTRA_DIST=bootstrap.sh
+diff --git a/configure.ac b/configure.ac
+index fe28cef..2821c55 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3,6 +3,7 @@ AC_INIT([sngrep], [1.4.3], [kaian at irontec.com], [sngrep], [http://www.irontec.co
+ AM_INIT_AUTOMAKE([1.9])
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ AC_CONFIG_HEADERS([src/config.h])
++AC_CONFIG_MACRO_DIRS([m4])
+ 
+ AC_COPYRIGHT("Irontec S.L.")
+ 
+@@ -53,13 +54,13 @@ AS_IF([test "x$enable_unicode" == "xyes"], [
+ 	# Ncurses with wide-character support
+ 	AC_DEFINE([WITH_UNICODE], [], [Compile With Unicode compatibility])
+ 
+-	AC_CHECK_HEADER([ncursesw/ncurses.h], [], [
+-	    AC_MSG_ERROR([ You need to have ncurses development files installed to compile sngrep.])
+-	])
+-
+-	AC_CHECK_LIB([ncursesw], [initscr], [], [
+-	    AC_MSG_ERROR([ You need to have libncursesw installed to compile sngrep.])
+-	])
++   SNGREP_CHECK_SCRIPT([ncursesw6], [addnwstr], [WITH_UNICODE], "ncursesw6-config",
++    SNGREP_CHECK_SCRIPT([ncursesw], [addnwstr], [WITH_UNICODE], "ncursesw5-config",
++     SNGREP_CHECK_SCRIPT([ncurses], [addnwstr], [WITH_UNICODE], "ncurses5-config",
++      SNGREP_CHECK_LIB([ncursesw6], [addnwstr], [WITH_UNICODE],
++       SNGREP_CHECK_LIB([ncursesw], [addnwstr], [WITH_UNICODE],
++        SNGREP_CHECK_LIB([ncurses], [addnwstr], [WITH_UNICODE],
++	))))))
+ 
+ 	AC_CHECK_LIB([panelw], [new_panel], [], [
+ 	    AC_MSG_ERROR([ You need to have ncurses panelw library installed to compile sngrep.])
+diff --git a/m4/sngrep.m4 b/m4/sngrep.m4
+new file mode 100644
+index 0000000..9c5377a
+--- /dev/null
++++ b/m4/sngrep.m4
+@@ -0,0 +1,61 @@
++# serial 100
++# sngrep.m4: Custom autotools macros for sngrep
++#
++# @author Adam Duskett <aduskett@codeblue.com>
++# @version 2017-05-25
++# @license GNU General Public License 3.0
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2, or (at your option)
++# any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++# 02110-1301, USA.
++#
++# As a special exception, the you may copy, distribute and modify the
++# configure scripts that are the output of Autoconf when processing
++# the Macro.  You need not follow the terms of the GNU General Public
++# License when using or distributing such scripts.
++#
++
++# SNGREP_CHECK_SCRIPT(LIBNAME, FUNCTION, DEFINE, CONFIG_SCRIPT, ELSE_PART)
++AC_DEFUN([SNGREP_CHECK_SCRIPT],
++[
++   if test ! -z "m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT)"; then
++      # to be used to set the path to *-config when cross-compiling
++      sngrep_config_script=$(m4_toupper($SNGREP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
++   else
++      sngrep_config_script=$([$4] --libs 2> /dev/null)
++   fi
++   sngrep_script_success=no
++   sngrep_save_LDFLAGS="$LDFLAGS"
++   if test ! "x$sngrep_config_script" = x; then
++      LDFLAGS="$sngrep_config_script $LDFLAGS"
++      AC_CHECK_LIB([$1], [$2], [
++         AC_DEFINE([$3], 1, [The library is present.])
++         LIBS="$sngrep_config_script $LIBS "
++         sngrep_script_success=yes
++      ], [])
++      LDFLAGS="$save_LDFLAGS"
++   fi
++   if test "x$sngrep_script_success" = xno; then
++      [$5]
++   fi
++])
++
++# SNGREP_CHECK_LIB(LIBNAME, FUNCTION, DEFINE, ELSE_PART)
++AC_DEFUN([SNGREP_CHECK_LIB],
++[
++   AC_CHECK_LIB([$1], [$2], [
++      AC_DEFINE([$3], 1, [The library is present.])
++      LIBS="-l[$1] $LIBS "
++   ], [$4])
++])
+diff --git a/src/curses/scrollbar.h b/src/curses/scrollbar.h
+index 960b936..c9fbfdc 100644
+--- a/src/curses/scrollbar.h
++++ b/src/curses/scrollbar.h
+@@ -32,10 +32,9 @@
+ 
+ #ifdef WITH_UNICODE
+ #define _X_OPEN_SOURCE_EXTENDED
+-#include <ncursesw/ncurses.h>
+-#else
+-#include <ncurses.h>
++#include <wctype.h>
+ #endif
++#include <ncurses.h>
+ 
+ //! Shorter declaration of scrollbar
+ typedef struct scrollbar scrollbar_t;
+diff --git a/src/curses/ui_panel.h b/src/curses/ui_panel.h
+index 9a4082a..549b593 100644
+--- a/src/curses/ui_panel.h
++++ b/src/curses/ui_panel.h
+@@ -33,10 +33,9 @@
+ 
+ #ifdef WITH_UNICODE
+ #define _X_OPEN_SOURCE_EXTENDED
+-#include <ncursesw/ncurses.h>
+-#else
+-#include <ncurses.h>
++#include <wctype.h>
+ #endif
++#include <ncurses.h>
+ #include <panel.h>
+ #include <form.h>
+ #include <stdbool.h>
diff --git a/package/sngrep/0002-autotools-fix-ncurses-wchar-detection.patch b/package/sngrep/0002-autotools-fix-ncurses-wchar-detection.patch
new file mode 100644
index 0000000..372f874
--- /dev/null
+++ b/package/sngrep/0002-autotools-fix-ncurses-wchar-detection.patch
@@ -0,0 +1,45 @@
+From ca6bd26fff5c679c8838c29e1e2913ccbcc0b0cd Mon Sep 17 00:00:00 2001
+From: Kaian <kaian@irontec.com>
+Date: Tue, 30 May 2017 11:15:49 +0200
+Subject: [PATCH] autotools: fix ncurses wchar detection
+
+Author: Adam Duskett <aduskett@codeblue.com>
+
+Ncurses detection is currently broken in buildroot.
+
+This patch does the following:
+ - Add SNGREP_CHECK_SCRIPT to configure.ac which checks for a
+   libname, a function in that library, sets a define if found, and
+   if not found, moves on to the next part. This is taken from the
+   htop configure.ac.
+
+ - Adds SNGREP_CHECK_LIB to configure.ac which checks for a
+   library, a function within that library, sets a define if that function
+   is found, and if not found, moves on to the next part.
+   This is taken from the htop configure.ac
+
+ - Modifies scrollbar.h and ui_panel.h to include <wctypes.h> instead of
+   <ncursesw/ncurses.h> if unicode is supported.
+
+[Upstream commit: https://github.com/irontec/sngrep/commit/ca6bd26fff5c679c8838c29e1e2913ccbcc0b0cd]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2821c55..10c83ab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,9 +1,9 @@
+ AC_PREREQ([2.59])
+ AC_INIT([sngrep], [1.4.3], [kaian at irontec.com], [sngrep], [http://www.irontec.com/])
+ AM_INIT_AUTOMAKE([1.9])
+-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ AC_CONFIG_HEADERS([src/config.h])
+-AC_CONFIG_MACRO_DIRS([m4])
++m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
++m4_ifdef([AC_CONFIG_MACRO_DIRS], AC_CONFIG_MACRO_DIRS([m4]), m4_include([m4/sngrep.m4]))
+ 
+ AC_COPYRIGHT("Irontec S.L.")
+ 
diff --git a/package/sngrep/sngrep.hash b/package/sngrep/sngrep.hash
index 5966d63..34c724b 100644
--- a/package/sngrep/sngrep.hash
+++ b/package/sngrep/sngrep.hash
@@ -1,3 +1,2 @@
 # Locally computed
 sha256 7385ac202de6d6a1feffb2fd514600563133d9dfa7fb47be052de839abcc1d52 sngrep-v1.4.3.tar.gz
-sha256 a3376abe20cca95a13ee88188ba5ba50425c93afc927cca018c50b0309ad21f9  4740f3341a99eaec105dee202a6fa7828212cdf1.patch
diff --git a/package/sngrep/sngrep.mk b/package/sngrep/sngrep.mk
index 9dda158..9b62408 100644
--- a/package/sngrep/sngrep.mk
+++ b/package/sngrep/sngrep.mk
@@ -14,10 +14,6 @@ SNGREP_DEPENDENCIES = libpcap ncurses host-pkgconf
 SNGREP_CONF_ENV += \
 	$(if $(BR2_STATIC_LIBS),LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --libs`")
 
-# This patch fixes ncurses wchar detection
-SNGREP_PATCH = \
-	https://github.com/irontec/sngrep/pull/191/commits/4740f3341a99eaec105dee202a6fa7828212cdf1.patch
-
 ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
 SNGREP_CONF_OPTS += --enable-unicode
 else
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 16/20] softether: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (14 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 15/20] sngrep: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 17/20] systemd: don't download patches " Thomas Petazzoni
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...1-Create-autotools-plumbing-for-SoftEther.patch | 1879 ++++++++++++++++++++
 ...eate-libsoftether.so-and-dynamically-link.patch |  133 ++
 ...atch => 0003-use-fhs-install-directories.patch} |    0
 ...rking-softetherd-for-upstart-and-systemd.patch} |    0
 ...eDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch} |    0
 ...ross-compile.patch => 0006-cross-compile.patch} |    0
 .../{0005-iconv.patch => 0007-iconv.patch}         |    0
 .../{0006-librt.patch => 0008-librt.patch}         |    0
 ...onfig.patch => 0009-uclibc-ai-addrconfig.patch} |    0
 package/softether/softether.hash                   |    2 -
 package/softether/softether.mk                     |    3 -
 11 files changed, 2012 insertions(+), 5 deletions(-)
 create mode 100644 package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch
 create mode 100644 package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch
 rename package/softether/{0001-use-fhs-install-directories.patch => 0003-use-fhs-install-directories.patch} (100%)
 rename package/softether/{0002-create-non-forking-softetherd-for-upstart-and-systemd.patch => 0004-create-non-forking-softetherd-for-upstart-and-systemd.patch} (100%)
 rename package/softether/{0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch => 0005-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch} (100%)
 rename package/softether/{0004-cross-compile.patch => 0006-cross-compile.patch} (100%)
 rename package/softether/{0005-iconv.patch => 0007-iconv.patch} (100%)
 rename package/softether/{0006-librt.patch => 0008-librt.patch} (100%)
 rename package/softether/{0007-uclibc-ai-addrconfig.patch => 0009-uclibc-ai-addrconfig.patch} (100%)

diff --git a/package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch b/package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch
new file mode 100644
index 0000000..587a94d
--- /dev/null
+++ b/package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch
@@ -0,0 +1,1879 @@
+From c5e5d7e93c6f3302adf5821c29c4efdb7630e418 Mon Sep 17 00:00:00 2001
+From: Darik Horn <dajhorn@vanadac.com>
+Date: Sat, 12 Apr 2014 17:46:04 -0400
+Subject: [PATCH] Create autotools plumbing for SoftEther.
+
+Add autoconf and automake capabilities to SoftEther so that it can be built
+like this:
+
+	# autoreconf --force --install
+	# ./configure
+	# make install DESTDIR=/tmp/softether
+
+All standard configure parameters are supported, plus:
+
+	# ./configure --enable-debug
+
+Autotools support makes porting, cross compiling, and optimization much easier.
+
+These GNU autoconf-archive components are used for dependency checking:
+
+  * ax_check_openssl.m4
+  * ax_check_zlib.m4
+  * ax_lib_readline.m4
+  * ax_pthread.m4
+  * ax_with_curses.m4
+
+NB: http://www.gnu.org/software/autoconf-archive/
+
+[Upstream commit: https://github.com/dajhorn/SoftEtherVPN/commit/c5e5d7e93c6f3302adf5821c29c4efdb7630e418]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile.am                    |  21 ++
+ autotools/ax_check_openssl.m4  | 124 ++++++++++
+ autotools/ax_check_zlib.m4     | 142 +++++++++++
+ autotools/ax_lib_readline.m4   | 107 +++++++++
+ autotools/ax_pthread.m4        | 332 ++++++++++++++++++++++++++
+ autotools/ax_with_curses.m4    | 518 +++++++++++++++++++++++++++++++++++++++++
+ autotools/softether.am         |  39 ++++
+ configure.ac                   |  96 ++++++++
+ configure => manual_configure  |   0
+ src/Cedar/Makefile.am          |  82 +++++++
+ src/Makefile.am                |  26 +++
+ src/Mayaqua/Makefile.am        |  43 ++++
+ src/bin/hamcore/Makefile.am    |  29 +++
+ src/hamcorebuilder/Makefile.am |  29 +++
+ src/vpnbridge/Makefile.am      |  29 +++
+ src/vpnclient/Makefile.am      |  29 +++
+ src/vpncmd/Makefile.am         |  29 +++
+ src/vpnserver/Makefile.am      |  29 +++
+ 18 files changed, 1704 insertions(+)
+ create mode 100644 Makefile.am
+ create mode 100644 autotools/ax_check_openssl.m4
+ create mode 100644 autotools/ax_check_zlib.m4
+ create mode 100644 autotools/ax_lib_readline.m4
+ create mode 100644 autotools/ax_pthread.m4
+ create mode 100644 autotools/ax_with_curses.m4
+ create mode 100644 autotools/softether.am
+ create mode 100644 configure.ac
+ rename configure => manual_configure (100%)
+ create mode 100644 src/Cedar/Makefile.am
+ create mode 100644 src/Makefile.am
+ create mode 100644 src/Mayaqua/Makefile.am
+ create mode 100644 src/bin/hamcore/Makefile.am
+ create mode 100644 src/hamcorebuilder/Makefile.am
+ create mode 100644 src/vpnbridge/Makefile.am
+ create mode 100644 src/vpnclient/Makefile.am
+ create mode 100644 src/vpncmd/Makefile.am
+ create mode 100644 src/vpnserver/Makefile.am
+
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 00000000..aa73b2ba
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,21 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++ACLOCAL_AMFLAGS = -I autotools
++include $(top_srcdir)/autotools/softether.am
++SUBDIRS = src
+diff --git a/autotools/ax_check_openssl.m4 b/autotools/ax_check_openssl.m4
+new file mode 100644
+index 00000000..a87c5a6b
+--- /dev/null
++++ b/autotools/ax_check_openssl.m4
+@@ -0,0 +1,124 @@
++# ===========================================================================
++#     http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
++#
++# DESCRIPTION
++#
++#   Look for OpenSSL in a number of default spots, or in a user-selected
++#   spot (via --with-openssl).  Sets
++#
++#     OPENSSL_INCLUDES to the include directives required
++#     OPENSSL_LIBS to the -l directives required
++#     OPENSSL_LDFLAGS to the -L or -R flags required
++#
++#   and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
++#
++#   This macro sets OPENSSL_INCLUDES such that source files should use the
++#   openssl/ directory in include directives:
++#
++#     #include <openssl/hmac.h>
++#
++# LICENSE
++#
++#   Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
++#   Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
++#
++#   Copying and distribution of this file, with or without modification, are
++#   permitted in any medium without royalty provided the copyright notice
++#   and this notice are preserved. This file is offered as-is, without any
++#   warranty.
++
++#serial 8
++
++AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
++AC_DEFUN([AX_CHECK_OPENSSL], [
++    found=false
++    AC_ARG_WITH([openssl],
++        [AS_HELP_STRING([--with-openssl=DIR],
++            [root of the OpenSSL directory])],
++        [
++            case "$withval" in
++            "" | y | ye | yes | n | no)
++            AC_MSG_ERROR([Invalid --with-openssl value])
++              ;;
++            *) ssldirs="$withval"
++              ;;
++            esac
++        ], [
++            # if pkg-config is installed and openssl has installed a .pc file,
++            # then use that information and don't search ssldirs
++            AC_PATH_PROG([PKG_CONFIG], [pkg-config])
++            if test x"$PKG_CONFIG" != x""; then
++                OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
++                if test $? = 0; then
++                    OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
++                    OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
++                    found=true
++                fi
++            fi
++
++            # no such luck; use some default ssldirs
++            if ! $found; then
++                ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
++            fi
++        ]
++        )
++
++
++    # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
++    # an 'openssl' subdirectory
++
++    if ! $found; then
++        OPENSSL_INCLUDES=
++        for ssldir in $ssldirs; do
++            AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
++            if test -f "$ssldir/include/openssl/ssl.h"; then
++                OPENSSL_INCLUDES="-I$ssldir/include"
++                OPENSSL_LDFLAGS="-L$ssldir/lib"
++                OPENSSL_LIBS="-lssl -lcrypto"
++                found=true
++                AC_MSG_RESULT([yes])
++                break
++            else
++                AC_MSG_RESULT([no])
++            fi
++        done
++
++        # if the file wasn't found, well, go ahead and try the link anyway -- maybe
++        # it will just work!
++    fi
++
++    # try the preprocessor and linker with our new flags,
++    # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
++
++    AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
++    echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
++        "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
++
++    save_LIBS="$LIBS"
++    save_LDFLAGS="$LDFLAGS"
++    save_CPPFLAGS="$CPPFLAGS"
++    LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
++    LIBS="$OPENSSL_LIBS $LIBS"
++    CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
++    AC_LINK_IFELSE(
++        [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
++        [
++            AC_MSG_RESULT([yes])
++            $1
++        ], [
++            AC_MSG_RESULT([no])
++            $2
++        ])
++    CPPFLAGS="$save_CPPFLAGS"
++    LDFLAGS="$save_LDFLAGS"
++    LIBS="$save_LIBS"
++
++    AC_SUBST([OPENSSL_INCLUDES])
++    AC_SUBST([OPENSSL_LIBS])
++    AC_SUBST([OPENSSL_LDFLAGS])
++])
+diff --git a/autotools/ax_check_zlib.m4 b/autotools/ax_check_zlib.m4
+new file mode 100644
+index 00000000..ae5705f6
+--- /dev/null
++++ b/autotools/ax_check_zlib.m4
+@@ -0,0 +1,142 @@
++# ===========================================================================
++#       http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_CHECK_ZLIB([action-if-found], [action-if-not-found])
++#
++# DESCRIPTION
++#
++#   This macro searches for an installed zlib library. If nothing was
++#   specified when calling configure, it searches first in /usr/local and
++#   then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,
++#   it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If
++#   --without-zlib is specified, the library is not searched at all.
++#
++#   If either the header file (zlib.h) or the library (libz) is not found,
++#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is
++#   not specified, the configuration exits on error, asking for a valid zlib
++#   installation directory or --without-zlib.
++#
++#   If both header file and library are found, shell commands
++#   'action-if-found' is run. If 'action-if-found' is not specified, the
++#   default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends
++#   '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls
++#   AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition
++#   for this symbol in a config.h file. Sample usage in a C/C++ source is as
++#   follows:
++#
++#     #ifdef HAVE_LIBZ
++#     #include <zlib.h>
++#     #endif /* HAVE_LIBZ */
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Loic Dachary <loic@senga.org>
++#   Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>
++#
++#   This program is free software; you can redistribute it and/or modify it
++#   under the terms of the GNU General Public License as published by the
++#   Free Software Foundation; either version 2 of the License, or (at your
++#   option) any later version.
++#
++#   This program is distributed in the hope that it will be useful, but
++#   WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++#   Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with this program. If not, see <http://www.gnu.org/licenses/>.
++#
++#   As a special exception, the respective Autoconf Macro's copyright owner
++#   gives unlimited permission to copy, distribute and modify the configure
++#   scripts that are the output of Autoconf when processing the Macro. You
++#   need not follow the terms of the GNU General Public License when using
++#   or distributing such scripts, even though portions of the text of the
++#   Macro appear in them. The GNU General Public License (GPL) does govern
++#   all other use of the material that constitutes the Autoconf Macro.
++#
++#   This special exception to the GPL applies to versions of the Autoconf
++#   Macro released by the Autoconf Archive. When you make and distribute a
++#   modified version of the Autoconf Macro, you may extend this special
++#   exception to the GPL to apply to your modified version as well.
++
++#serial 14
++
++AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])
++AC_DEFUN([AX_CHECK_ZLIB],
++#
++# Handle user hints
++#
++[AC_MSG_CHECKING(if zlib is wanted)
++zlib_places="/usr/local /usr /opt/local /sw"
++AC_ARG_WITH([zlib],
++[  --with-zlib=DIR         root directory path of zlib installation @<:@defaults to
++                          /usr/local or /usr if not found in /usr/local@:>@
++  --without-zlib          to disable zlib usage completely],
++[if test "$withval" != no ; then
++  AC_MSG_RESULT(yes)
++  if test -d "$withval"
++  then
++    zlib_places="$withval $zlib_places"
++  else
++    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
++  fi
++else
++  zlib_places=
++  AC_MSG_RESULT(no)
++fi],
++[AC_MSG_RESULT(yes)])
++
++#
++# Locate zlib, if wanted
++#
++if test -n "${zlib_places}"
++then
++	# check the user supplied or any other more or less 'standard' place:
++	#   Most UNIX systems      : /usr/local and /usr
++	#   MacPorts / Fink on OSX : /opt/local respectively /sw
++	for ZLIB_HOME in ${zlib_places} ; do
++	  if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi
++	  ZLIB_HOME=""
++	done
++
++  ZLIB_OLD_LDFLAGS=$LDFLAGS
++  ZLIB_OLD_CPPFLAGS=$CPPFLAGS
++  if test -n "${ZLIB_HOME}"; then
++        LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
++        CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
++  fi
++  AC_LANG_SAVE
++  AC_LANG_C
++  AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no])
++  AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
++  AC_LANG_RESTORE
++  if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes"
++  then
++    #
++    # If both library and header were found, action-if-found
++    #
++    m4_ifblank([$1],[
++                CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
++                LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
++                LIBS="-lz $LIBS"
++                AC_DEFINE([HAVE_LIBZ], [1],
++                          [Define to 1 if you have `z' library (-lz)])
++               ],[
++                # Restore variables
++                LDFLAGS="$ZLIB_OLD_LDFLAGS"
++                CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
++                $1
++               ])
++  else
++    #
++    # If either header or library was not found, action-if-not-found
++    #
++    m4_default([$2],[
++                AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib])
++                ])
++  fi
++fi
++])
+diff --git a/autotools/ax_lib_readline.m4 b/autotools/ax_lib_readline.m4
+new file mode 100644
+index 00000000..056f25c2
+--- /dev/null
++++ b/autotools/ax_lib_readline.m4
+@@ -0,0 +1,107 @@
++# ===========================================================================
++#      http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_LIB_READLINE
++#
++# DESCRIPTION
++#
++#   Searches for a readline compatible library. If found, defines
++#   `HAVE_LIBREADLINE'. If the found library has the `add_history' function,
++#   sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the
++#   necessary include files and sets `HAVE_READLINE_H' or
++#   `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
++#   'HAVE_HISTORY_H' if the corresponding include files exists.
++#
++#   The libraries that may be readline compatible are `libedit',
++#   `libeditline' and `libreadline'. Sometimes we need to link a termcap
++#   library for readline to work, this macro tests these cases too by trying
++#   to link with `libtermcap', `libcurses' or `libncurses' before giving up.
++#
++#   Here is an example of how to use the information provided by this macro
++#   to perform the necessary includes or declarations in a C file:
++#
++#     #ifdef HAVE_LIBREADLINE
++#     #  if defined(HAVE_READLINE_READLINE_H)
++#     #    include <readline/readline.h>
++#     #  elif defined(HAVE_READLINE_H)
++#     #    include <readline.h>
++#     #  else /* !defined(HAVE_READLINE_H) */
++#     extern char *readline ();
++#     #  endif /* !defined(HAVE_READLINE_H) */
++#     char *cmdline = NULL;
++#     #else /* !defined(HAVE_READLINE_READLINE_H) */
++#       /* no readline */
++#     #endif /* HAVE_LIBREADLINE */
++#
++#     #ifdef HAVE_READLINE_HISTORY
++#     #  if defined(HAVE_READLINE_HISTORY_H)
++#     #    include <readline/history.h>
++#     #  elif defined(HAVE_HISTORY_H)
++#     #    include <history.h>
++#     #  else /* !defined(HAVE_HISTORY_H) */
++#     extern void add_history ();
++#     extern int write_history ();
++#     extern int read_history ();
++#     #  endif /* defined(HAVE_READLINE_HISTORY_H) */
++#       /* no history */
++#     #endif /* HAVE_READLINE_HISTORY */
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Ville Laurikari <vl@iki.fi>
++#
++#   Copying and distribution of this file, with or without modification, are
++#   permitted in any medium without royalty provided the copyright notice
++#   and this notice are preserved. This file is offered as-is, without any
++#   warranty.
++
++#serial 6
++
++AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE])
++AC_DEFUN([AX_LIB_READLINE], [
++  AC_CACHE_CHECK([for a readline compatible library],
++                 ax_cv_lib_readline, [
++    ORIG_LIBS="$LIBS"
++    for readline_lib in readline edit editline; do
++      for termcap_lib in "" termcap curses ncurses; do
++        if test -z "$termcap_lib"; then
++          TRY_LIB="-l$readline_lib"
++        else
++          TRY_LIB="-l$readline_lib -l$termcap_lib"
++        fi
++        LIBS="$ORIG_LIBS $TRY_LIB"
++        AC_TRY_LINK_FUNC(readline, ax_cv_lib_readline="$TRY_LIB")
++        if test -n "$ax_cv_lib_readline"; then
++          break
++        fi
++      done
++      if test -n "$ax_cv_lib_readline"; then
++        break
++      fi
++    done
++    if test -z "$ax_cv_lib_readline"; then
++      ax_cv_lib_readline="no"
++    fi
++    LIBS="$ORIG_LIBS"
++  ])
++
++  if test "$ax_cv_lib_readline" != "no"; then
++    LIBS="$LIBS $ax_cv_lib_readline"
++    AC_DEFINE(HAVE_LIBREADLINE, 1,
++              [Define if you have a readline compatible library])
++    AC_CHECK_HEADERS(readline.h readline/readline.h)
++    AC_CACHE_CHECK([whether readline supports history],
++                   ax_cv_lib_readline_history, [
++      ax_cv_lib_readline_history="no"
++      AC_TRY_LINK_FUNC(add_history, ax_cv_lib_readline_history="yes")
++    ])
++    if test "$ax_cv_lib_readline_history" = "yes"; then
++      AC_DEFINE(HAVE_READLINE_HISTORY, 1,
++                [Define if your readline library has \`add_history'])
++      AC_CHECK_HEADERS(history.h readline/history.h)
++    fi
++  fi
++])dnl
+diff --git a/autotools/ax_pthread.m4 b/autotools/ax_pthread.m4
+new file mode 100644
+index 00000000..d383ad5c
+--- /dev/null
++++ b/autotools/ax_pthread.m4
+@@ -0,0 +1,332 @@
++# ===========================================================================
++#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
++#
++# DESCRIPTION
++#
++#   This macro figures out how to build C programs using POSIX threads. It
++#   sets the PTHREAD_LIBS output variable to the threads library and linker
++#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
++#   flags that are needed. (The user can also force certain compiler
++#   flags/libs to be tested by setting these environment variables.)
++#
++#   Also sets PTHREAD_CC to any special C compiler that is needed for
++#   multi-threaded programs (defaults to the value of CC otherwise). (This
++#   is necessary on AIX to use the special cc_r compiler alias.)
++#
++#   NOTE: You are assumed to not only compile your program with these flags,
++#   but also link it with them as well. e.g. you should link with
++#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
++#
++#   If you are only building threads programs, you may wish to use these
++#   variables in your default LIBS, CFLAGS, and CC:
++#
++#     LIBS="$PTHREAD_LIBS $LIBS"
++#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++#     CC="$PTHREAD_CC"
++#
++#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
++#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
++#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
++#
++#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
++#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
++#   PTHREAD_CFLAGS.
++#
++#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
++#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
++#   is not found. If ACTION-IF-FOUND is not specified, the default action
++#   will define HAVE_PTHREAD.
++#
++#   Please let the authors know if this macro fails on any platform, or if
++#   you have any other suggestions or comments. This macro was based on work
++#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
++#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
++#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
++#   grateful for the helpful feedback of numerous users.
++#
++#   Updated for Autoconf 2.68 by Daniel Richard G.
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
++#   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
++#
++#   This program is free software: you can redistribute it and/or modify it
++#   under the terms of the GNU General Public License as published by the
++#   Free Software Foundation, either version 3 of the License, or (at your
++#   option) any later version.
++#
++#   This program is distributed in the hope that it will be useful, but
++#   WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++#   Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with this program. If not, see <http://www.gnu.org/licenses/>.
++#
++#   As a special exception, the respective Autoconf Macro's copyright owner
++#   gives unlimited permission to copy, distribute and modify the configure
++#   scripts that are the output of Autoconf when processing the Macro. You
++#   need not follow the terms of the GNU General Public License when using
++#   or distributing such scripts, even though portions of the text of the
++#   Macro appear in them. The GNU General Public License (GPL) does govern
++#   all other use of the material that constitutes the Autoconf Macro.
++#
++#   This special exception to the GPL applies to versions of the Autoconf
++#   Macro released by the Autoconf Archive. When you make and distribute a
++#   modified version of the Autoconf Macro, you may extend this special
++#   exception to the GPL to apply to your modified version as well.
++
++#serial 21
++
++AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
++AC_DEFUN([AX_PTHREAD], [
++AC_REQUIRE([AC_CANONICAL_HOST])
++AC_LANG_PUSH([C])
++ax_pthread_ok=no
++
++# We used to check for pthread.h first, but this fails if pthread.h
++# requires special compiler flags (e.g. on True64 or Sequent).
++# It gets checked for in the link test anyway.
++
++# First of all, check if the user has set any of the PTHREAD_LIBS,
++# etcetera environment variables, and if threads linking works using
++# them:
++if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
++        save_CFLAGS="$CFLAGS"
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++        save_LIBS="$LIBS"
++        LIBS="$PTHREAD_LIBS $LIBS"
++        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
++        AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
++        AC_MSG_RESULT([$ax_pthread_ok])
++        if test x"$ax_pthread_ok" = xno; then
++                PTHREAD_LIBS=""
++                PTHREAD_CFLAGS=""
++        fi
++        LIBS="$save_LIBS"
++        CFLAGS="$save_CFLAGS"
++fi
++
++# We must check for the threads library under a number of different
++# names; the ordering is very important because some systems
++# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
++# libraries is broken (non-POSIX).
++
++# Create a list of thread flags to try.  Items starting with a "-" are
++# C compiler flags, and other items are library names, except for "none"
++# which indicates that we try without any flags at all, and "pthread-config"
++# which is a program returning the flags for the Pth emulation library.
++
++ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
++
++# The ordering *is* (sometimes) important.  Some notes on the
++# individual items follow:
++
++# pthreads: AIX (must check this before -lpthread)
++# none: in case threads are in libc; should be tried before -Kthread and
++#       other compiler flags to prevent continual compiler warnings
++# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
++# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
++# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
++# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
++# -pthreads: Solaris/gcc
++# -mthreads: Mingw32/gcc, Lynx/gcc
++# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
++#      doesn't hurt to check since this sometimes defines pthreads too;
++#      also defines -D_REENTRANT)
++#      ... -mt is also the pthreads flag for HP/aCC
++# pthread: Linux, etcetera
++# --thread-safe: KAI C++
++# pthread-config: use pthread-config program (for GNU Pth library)
++
++case ${host_os} in
++        solaris*)
++
++        # On Solaris (at least, for some versions), libc contains stubbed
++        # (non-functional) versions of the pthreads routines, so link-based
++        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
++        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
++        # a function called by this macro, so we could check for that, but
++        # who knows whether they'll stub that too in a future libc.)  So,
++        # we'll just look for -pthreads and -lpthread first:
++
++        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
++        ;;
++
++        darwin*)
++        ax_pthread_flags="-pthread $ax_pthread_flags"
++        ;;
++esac
++
++# Clang doesn't consider unrecognized options an error unless we specify
++# -Werror. We throw in some extra Clang-specific options to ensure that
++# this doesn't happen for GCC, which also accepts -Werror.
++
++AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
++save_CFLAGS="$CFLAGS"
++ax_pthread_extra_flags="-Werror"
++CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
++                  [AC_MSG_RESULT([yes])],
++                  [ax_pthread_extra_flags=
++                   AC_MSG_RESULT([no])])
++CFLAGS="$save_CFLAGS"
++
++if test x"$ax_pthread_ok" = xno; then
++for flag in $ax_pthread_flags; do
++
++        case $flag in
++                none)
++                AC_MSG_CHECKING([whether pthreads work without any flags])
++                ;;
++
++                -*)
++                AC_MSG_CHECKING([whether pthreads work with $flag])
++                PTHREAD_CFLAGS="$flag"
++                ;;
++
++                pthread-config)
++                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
++                if test x"$ax_pthread_config" = xno; then continue; fi
++                PTHREAD_CFLAGS="`pthread-config --cflags`"
++                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
++                ;;
++
++                *)
++                AC_MSG_CHECKING([for the pthreads library -l$flag])
++                PTHREAD_LIBS="-l$flag"
++                ;;
++        esac
++
++        save_LIBS="$LIBS"
++        save_CFLAGS="$CFLAGS"
++        LIBS="$PTHREAD_LIBS $LIBS"
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
++
++        # Check for various functions.  We must include pthread.h,
++        # since some functions may be macros.  (On the Sequent, we
++        # need a special flag -Kthread to make this header compile.)
++        # We check for pthread_join because it is in -lpthread on IRIX
++        # while pthread_create is in libc.  We check for pthread_attr_init
++        # due to DEC craziness with -lpthreads.  We check for
++        # pthread_cleanup_push because it is one of the few pthread
++        # functions on Solaris that doesn't have a non-functional libc stub.
++        # We try pthread_create on general principles.
++        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
++                        static void routine(void *a) { a = 0; }
++                        static void *start_routine(void *a) { return a; }],
++                       [pthread_t th; pthread_attr_t attr;
++                        pthread_create(&th, 0, start_routine, 0);
++                        pthread_join(th, 0);
++                        pthread_attr_init(&attr);
++                        pthread_cleanup_push(routine, 0);
++                        pthread_cleanup_pop(0) /* ; */])],
++                [ax_pthread_ok=yes],
++                [])
++
++        LIBS="$save_LIBS"
++        CFLAGS="$save_CFLAGS"
++
++        AC_MSG_RESULT([$ax_pthread_ok])
++        if test "x$ax_pthread_ok" = xyes; then
++                break;
++        fi
++
++        PTHREAD_LIBS=""
++        PTHREAD_CFLAGS=""
++done
++fi
++
++# Various other checks:
++if test "x$ax_pthread_ok" = xyes; then
++        save_LIBS="$LIBS"
++        LIBS="$PTHREAD_LIBS $LIBS"
++        save_CFLAGS="$CFLAGS"
++        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++
++        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
++        AC_MSG_CHECKING([for joinable pthread attribute])
++        attr_name=unknown
++        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
++            AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
++                           [int attr = $attr; return attr /* ; */])],
++                [attr_name=$attr; break],
++                [])
++        done
++        AC_MSG_RESULT([$attr_name])
++        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
++            AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
++                               [Define to necessary symbol if this constant
++                                uses a non-standard name on your system.])
++        fi
++
++        AC_MSG_CHECKING([if more special flags are required for pthreads])
++        flag=no
++        case ${host_os} in
++            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
++            osf* | hpux*) flag="-D_REENTRANT";;
++            solaris*)
++            if test "$GCC" = "yes"; then
++                flag="-D_REENTRANT"
++            else
++                # TODO: What about Clang on Solaris?
++                flag="-mt -D_REENTRANT"
++            fi
++            ;;
++        esac
++        AC_MSG_RESULT([$flag])
++        if test "x$flag" != xno; then
++            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
++        fi
++
++        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
++            [ax_cv_PTHREAD_PRIO_INHERIT], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
++                                                [[int i = PTHREAD_PRIO_INHERIT;]])],
++                    [ax_cv_PTHREAD_PRIO_INHERIT=yes],
++                    [ax_cv_PTHREAD_PRIO_INHERIT=no])
++            ])
++        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
++            [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
++
++        LIBS="$save_LIBS"
++        CFLAGS="$save_CFLAGS"
++
++        # More AIX lossage: compile with *_r variant
++        if test "x$GCC" != xyes; then
++            case $host_os in
++                aix*)
++                AS_CASE(["x/$CC"],
++                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
++                  [#handle absolute path differently from PATH based program lookup
++                   AS_CASE(["x$CC"],
++                     [x/*],
++                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
++                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
++                ;;
++            esac
++        fi
++fi
++
++test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
++
++AC_SUBST([PTHREAD_LIBS])
++AC_SUBST([PTHREAD_CFLAGS])
++AC_SUBST([PTHREAD_CC])
++
++# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
++if test x"$ax_pthread_ok" = xyes; then
++        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
++        :
++else
++        ax_pthread_ok=no
++        $2
++fi
++AC_LANG_POP
++])dnl AX_PTHREAD
+diff --git a/autotools/ax_with_curses.m4 b/autotools/ax_with_curses.m4
+new file mode 100644
+index 00000000..e4cbd31b
+--- /dev/null
++++ b/autotools/ax_with_curses.m4
+@@ -0,0 +1,518 @@
++# ===========================================================================
++#      http://www.gnu.org/software/autoconf-archive/ax_with_curses.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_WITH_CURSES
++#
++# DESCRIPTION
++#
++#   This macro checks whether a SysV or X/Open-compatible Curses library is
++#   present, along with the associated header file.  The NcursesW
++#   (wide-character) library is searched for first, followed by Ncurses,
++#   then the system-default plain Curses.  The first library found is the
++#   one returned.
++#
++#   The following options are understood: --with-ncursesw, --with-ncurses,
++#   --without-ncursesw, --without-ncurses.  The "--with" options force the
++#   macro to use that particular library, terminating with an error if not
++#   found.  The "--without" options simply skip the check for that library.
++#   The effect on the search pattern is:
++#
++#     (no options)                           - NcursesW, Ncurses, Curses
++#     --with-ncurses     --with-ncursesw     - NcursesW only [*]
++#     --without-ncurses  --with-ncursesw     - NcursesW only [*]
++#                        --with-ncursesw     - NcursesW only [*]
++#     --with-ncurses     --without-ncursesw  - Ncurses only [*]
++#     --with-ncurses                         - NcursesW, Ncurses [**]
++#     --without-ncurses  --without-ncursesw  - Curses only
++#                        --without-ncursesw  - Ncurses, Curses
++#     --without-ncurses                      - NcursesW, Curses
++#
++#   [*]  If the library is not found, abort the configure script.
++#
++#   [**] If the second library (Ncurses) is not found, abort configure.
++#
++#   The following preprocessor symbols may be defined by this macro if the
++#   appropriate conditions are met:
++#
++#     HAVE_CURSES             - if any SysV or X/Open Curses library found
++#     HAVE_CURSES_ENHANCED    - if library supports X/Open Enhanced functions
++#     HAVE_CURSES_COLOR       - if library supports color (enhanced functions)
++#     HAVE_CURSES_OBSOLETE    - if library supports certain obsolete features
++#     HAVE_NCURSESW           - if NcursesW (wide char) library is to be used
++#     HAVE_NCURSES            - if the Ncurses library is to be used
++#
++#     HAVE_CURSES_H           - if <curses.h> is present and should be used
++#     HAVE_NCURSESW_H         - if <ncursesw.h> should be used
++#     HAVE_NCURSES_H          - if <ncurses.h> should be used
++#     HAVE_NCURSESW_CURSES_H  - if <ncursesw/curses.h> should be used
++#     HAVE_NCURSES_CURSES_H   - if <ncurses/curses.h> should be used
++#
++#   (These preprocessor symbols are discussed later in this document.)
++#
++#   The following output variable is defined by this macro; it is precious
++#   and may be overridden on the ./configure command line:
++#
++#     CURSES_LIB  - library to add to xxx_LDADD
++#
++#   The library listed in CURSES_LIB is NOT added to LIBS by default. You
++#   need to add CURSES_LIB to the appropriate xxx_LDADD line in your
++#   Makefile.am.  For example:
++#
++#     prog_LDADD = @CURSES_LIB@
++#
++#   If CURSES_LIB is set on the configure command line (such as by running
++#   "./configure CURSES_LIB=-lmycurses"), then the only header searched for
++#   is <curses.h>.  The user may use the CPPFLAGS precious variable to
++#   override the standard #include search path.  If the user needs to
++#   specify an alternative path for a library (such as for a non-standard
++#   NcurseW), the user should use the LDFLAGS variable.
++#
++#   The following shell variables may be defined by this macro:
++#
++#     ax_cv_curses           - set to "yes" if any Curses library found
++#     ax_cv_curses_enhanced  - set to "yes" if Enhanced functions present
++#     ax_cv_curses_color     - set to "yes" if color functions present
++#     ax_cv_curses_obsolete  - set to "yes" if obsolete features present
++#
++#     ax_cv_ncursesw      - set to "yes" if NcursesW library found
++#     ax_cv_ncurses       - set to "yes" if Ncurses library found
++#     ax_cv_plaincurses   - set to "yes" if plain Curses library found
++#     ax_cv_curses_which  - set to "ncursesw", "ncurses", "plaincurses" or "no"
++#
++#   These variables can be used in your configure.ac to determine the level
++#   of support you need from the Curses library.  For example, if you must
++#   have either Ncurses or NcursesW, you could include:
++#
++#     AX_WITH_CURSES
++#     if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
++#         AC_MSG_ERROR([requires either NcursesW or Ncurses library])
++#     fi
++#
++#   If any Curses library will do (but one must be present and must support
++#   color), you could use:
++#
++#     AX_WITH_CURSES
++#     if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then
++#         AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
++#     fi
++#
++#   Certain preprocessor symbols and shell variables defined by this macro
++#   can be used to determine various features of the Curses library.  In
++#   particular, HAVE_CURSES and ax_cv_curses are defined if the Curses
++#   library found conforms to the traditional SysV and/or X/Open Base Curses
++#   definition.  Any working Curses library conforms to this level.
++#
++#   HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the
++#   library supports the X/Open Enhanced Curses definition.  In particular,
++#   the wide-character types attr_t, cchar_t and wint_t, the functions
++#   wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES
++#   are checked.  The Ncurses library does NOT conform to this definition,
++#   although NcursesW does.
++#
++#   HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library
++#   supports color functions and macros such as COLOR_PAIR, A_COLOR,
++#   COLOR_WHITE, COLOR_RED and init_pair().  These are NOT part of the
++#   X/Open Base Curses definition, but are part of the Enhanced set of
++#   functions.  The Ncurses library DOES support these functions, as does
++#   NcursesW.
++#
++#   HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the
++#   library supports certain features present in SysV and BSD Curses but not
++#   defined in the X/Open definition.  In particular, the functions
++#   getattrs(), getcurx() and getmaxx() are checked.
++#
++#   To use the HAVE_xxx_H preprocessor symbols, insert the following into
++#   your system.h (or equivalent) header file:
++#
++#     #if defined HAVE_NCURSESW_CURSES_H
++#     #  include <ncursesw/curses.h>
++#     #elif defined HAVE_NCURSESW_H
++#     #  include <ncursesw.h>
++#     #elif defined HAVE_NCURSES_CURSES_H
++#     #  include <ncurses/curses.h>
++#     #elif defined HAVE_NCURSES_H
++#     #  include <ncurses.h>
++#     #elif defined HAVE_CURSES_H
++#     #  include <curses.h>
++#     #else
++#     #  error "SysV or X/Open-compatible Curses header file required"
++#     #endif
++#
++#   For previous users of this macro: you should not need to change anything
++#   in your configure.ac or Makefile.am, as the previous (serial 10)
++#   semantics are still valid.  However, you should update your system.h (or
++#   equivalent) header file to the fragment shown above. You are encouraged
++#   also to make use of the extended functionality provided by this version
++#   of AX_WITH_CURSES, as well as in the additional macros
++#   AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM.
++#
++# LICENSE
++#
++#   Copyright (c) 2009 Mark Pulford <mark@kyne.com.au>
++#   Copyright (c) 2009 Damian Pietras <daper@daper.net>
++#   Copyright (c) 2012 Reuben Thomas <rrt@sc3d.org>
++#   Copyright (c) 2011 John Zaitseff <J.Zaitseff@zap.org.au>
++#
++#   This program is free software: you can redistribute it and/or modify it
++#   under the terms of the GNU General Public License as published by the
++#   Free Software Foundation, either version 3 of the License, or (at your
++#   option) any later version.
++#
++#   This program is distributed in the hope that it will be useful, but
++#   WITHOUT ANY WARRANTY; without even the implied warranty of
++#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
++#   Public License for more details.
++#
++#   You should have received a copy of the GNU General Public License along
++#   with this program. If not, see <http://www.gnu.org/licenses/>.
++#
++#   As a special exception, the respective Autoconf Macro's copyright owner
++#   gives unlimited permission to copy, distribute and modify the configure
++#   scripts that are the output of Autoconf when processing the Macro. You
++#   need not follow the terms of the GNU General Public License when using
++#   or distributing such scripts, even though portions of the text of the
++#   Macro appear in them. The GNU General Public License (GPL) does govern
++#   all other use of the material that constitutes the Autoconf Macro.
++#
++#   This special exception to the GPL applies to versions of the Autoconf
++#   Macro released by the Autoconf Archive. When you make and distribute a
++#   modified version of the Autoconf Macro, you may extend this special
++#   exception to the GPL to apply to your modified version as well.
++
++#serial 15
++
++AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
++AC_DEFUN([AX_WITH_CURSES], [
++    AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])
++    AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses],
++        [force the use of Ncurses or NcursesW])],
++        [], [with_ncurses=check])
++    AC_ARG_WITH([ncursesw], [AS_HELP_STRING([--without-ncursesw],
++        [do not use NcursesW (wide character support)])],
++        [], [with_ncursesw=check])
++
++    ax_saved_LIBS=$LIBS
++    AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes],
++        [ax_with_plaincurses=no], [ax_with_plaincurses=check])
++
++    ax_cv_curses_which=no
++
++    # Test for NcursesW
++
++    AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [
++        LIBS="$ax_saved_LIBS -lncursesw"
++
++        AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [
++            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
++                [ax_cv_ncursesw=yes], [ax_cv_ncursesw=no])
++        ])
++        AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [
++            AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library])
++        ])
++
++        AS_IF([test "x$ax_cv_ncursesw" = xyes], [
++            ax_cv_curses=yes
++            ax_cv_curses_which=ncursesw
++            CURSES_LIB="-lncursesw"
++            AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present])
++            AC_DEFINE([HAVE_CURSES],   [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
++
++            AC_CACHE_CHECK([for working ncursesw/curses.h], [ax_cv_header_ncursesw_curses_h], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@define _XOPEN_SOURCE_EXTENDED 1
++                        @%:@include <ncursesw/curses.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        chtype c = COLOR_PAIR(1) & A_COLOR;
++                        attr_t d = WA_NORMAL;
++                        cchar_t e;
++                        wint_t f;
++                        int g = getattrs(stdscr);
++                        int h = getcurx(stdscr) + getmaxx(stdscr);
++                        initscr();
++                        init_pair(1, COLOR_WHITE, COLOR_RED);
++                        wattr_set(stdscr, d, 0, NULL);
++                        wget_wch(stdscr, &f);
++                    ]])],
++                    [ax_cv_header_ncursesw_curses_h=yes],
++                    [ax_cv_header_ncursesw_curses_h=no])
++            ])
++            AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xyes], [
++                ax_cv_curses_enhanced=yes
++                ax_cv_curses_color=yes
++                ax_cv_curses_obsolete=yes
++                AC_DEFINE([HAVE_CURSES_ENHANCED],   [1], [Define to 1 if library supports X/Open Enhanced functions])
++                AC_DEFINE([HAVE_CURSES_COLOR],      [1], [Define to 1 if library supports color (enhanced functions)])
++                AC_DEFINE([HAVE_CURSES_OBSOLETE],   [1], [Define to 1 if library supports certain obsolete features])
++                AC_DEFINE([HAVE_NCURSESW_CURSES_H], [1], [Define to 1 if <ncursesw/curses.h> is present])
++            ])
++
++            AC_CACHE_CHECK([for working ncursesw.h], [ax_cv_header_ncursesw_h], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@define _XOPEN_SOURCE_EXTENDED 1
++                        @%:@include <ncursesw.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        chtype c = COLOR_PAIR(1) & A_COLOR;
++                        attr_t d = WA_NORMAL;
++                        cchar_t e;
++                        wint_t f;
++                        int g = getattrs(stdscr);
++                        int h = getcurx(stdscr) + getmaxx(stdscr);
++                        initscr();
++                        init_pair(1, COLOR_WHITE, COLOR_RED);
++                        wattr_set(stdscr, d, 0, NULL);
++                        wget_wch(stdscr, &f);
++                    ]])],
++                    [ax_cv_header_ncursesw_h=yes],
++                    [ax_cv_header_ncursesw_h=no])
++            ])
++            AS_IF([test "x$ax_cv_header_ncursesw_h" = xyes], [
++                ax_cv_curses_enhanced=yes
++                ax_cv_curses_color=yes
++                ax_cv_curses_obsolete=yes
++                AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
++                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
++                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
++                AC_DEFINE([HAVE_NCURSESW_H],      [1], [Define to 1 if <ncursesw.h> is present])
++            ])
++
++            AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h_with_ncursesw], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@define _XOPEN_SOURCE_EXTENDED 1
++                        @%:@include <ncurses.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        chtype c = COLOR_PAIR(1) & A_COLOR;
++                        attr_t d = WA_NORMAL;
++                        cchar_t e;
++                        wint_t f;
++                        int g = getattrs(stdscr);
++                        int h = getcurx(stdscr) + getmaxx(stdscr);
++                        initscr();
++                        init_pair(1, COLOR_WHITE, COLOR_RED);
++                        wattr_set(stdscr, d, 0, NULL);
++                        wget_wch(stdscr, &f);
++                    ]])],
++                    [ax_cv_header_ncurses_h_with_ncursesw=yes],
++                    [ax_cv_header_ncurses_h_with_ncursesw=no])
++            ])
++            AS_IF([test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes], [
++                ax_cv_curses_enhanced=yes
++                ax_cv_curses_color=yes
++                ax_cv_curses_obsolete=yes
++                AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
++                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
++                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
++                AC_DEFINE([HAVE_NCURSES_H],       [1], [Define to 1 if <ncurses.h> is present])
++            ])
++
++            AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno], [
++                AC_MSG_WARN([could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h])
++            ])
++        ])
++    ])
++
++    # Test for Ncurses
++
++    AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
++        LIBS="$ax_saved_LIBS -lncurses"
++
++        AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [
++            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
++                [ax_cv_ncurses=yes], [ax_cv_ncurses=no])
++        ])
++        AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [
++            AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library])
++        ])
++
++        AS_IF([test "x$ax_cv_ncurses" = xyes], [
++            ax_cv_curses=yes
++            ax_cv_curses_which=ncurses
++            CURSES_LIB="-lncurses"
++            AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present])
++            AC_DEFINE([HAVE_CURSES],  [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
++
++            AC_CACHE_CHECK([for working ncurses/curses.h], [ax_cv_header_ncurses_curses_h], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@include <ncurses/curses.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        chtype c = COLOR_PAIR(1) & A_COLOR;
++                        int g = getattrs(stdscr);
++                        int h = getcurx(stdscr) + getmaxx(stdscr);
++                        initscr();
++                        init_pair(1, COLOR_WHITE, COLOR_RED);
++                    ]])],
++                    [ax_cv_header_ncurses_curses_h=yes],
++                    [ax_cv_header_ncurses_curses_h=no])
++            ])
++            AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xyes], [
++                ax_cv_curses_color=yes
++                ax_cv_curses_obsolete=yes
++                AC_DEFINE([HAVE_CURSES_COLOR],     [1], [Define to 1 if library supports color (enhanced functions)])
++                AC_DEFINE([HAVE_CURSES_OBSOLETE],  [1], [Define to 1 if library supports certain obsolete features])
++                AC_DEFINE([HAVE_NCURSES_CURSES_H], [1], [Define to 1 if <ncurses/curses.h> is present])
++            ])
++
++            AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@include <ncurses.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        chtype c = COLOR_PAIR(1) & A_COLOR;
++                        int g = getattrs(stdscr);
++                        int h = getcurx(stdscr) + getmaxx(stdscr);
++                        initscr();
++                        init_pair(1, COLOR_WHITE, COLOR_RED);
++                    ]])],
++                    [ax_cv_header_ncurses_h=yes],
++                    [ax_cv_header_ncurses_h=no])
++            ])
++            AS_IF([test "x$ax_cv_header_ncurses_h" = xyes], [
++                ax_cv_curses_color=yes
++                ax_cv_curses_obsolete=yes
++                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
++                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
++                AC_DEFINE([HAVE_NCURSES_H],       [1], [Define to 1 if <ncurses.h> is present])
++            ])
++
++            AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno], [
++                AC_MSG_WARN([could not find a working ncurses/curses.h or ncurses.h])
++            ])
++        ])
++    ])
++
++    # Test for plain Curses (or if CURSES_LIB was set by user)
++
++    AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [
++        AS_IF([test "x$CURSES_LIB" != x], [
++            LIBS="$ax_saved_LIBS $CURSES_LIB"
++        ], [
++            LIBS="$ax_saved_LIBS -lcurses"
++        ])
++
++        AC_CACHE_CHECK([for Curses library], [ax_cv_plaincurses], [
++            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
++                [ax_cv_plaincurses=yes], [ax_cv_plaincurses=no])
++        ])
++
++        AS_IF([test "x$ax_cv_plaincurses" = xyes], [
++            ax_cv_curses=yes
++            ax_cv_curses_which=plaincurses
++            AS_IF([test "x$CURSES_LIB" = x], [
++                CURSES_LIB="-lcurses"
++            ])
++            AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
++
++            # Check for base conformance (and header file)
++
++            AC_CACHE_CHECK([for working curses.h], [ax_cv_header_curses_h], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@include <curses.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        initscr();
++                    ]])],
++                    [ax_cv_header_curses_h=yes],
++                    [ax_cv_header_curses_h=no])
++            ])
++            AS_IF([test "x$ax_cv_header_curses_h" = xyes], [
++                AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])
++
++                # Check for X/Open Enhanced conformance
++
++                AC_CACHE_CHECK([for X/Open Enhanced Curses conformance], [ax_cv_plaincurses_enhanced], [
++                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                            @%:@define _XOPEN_SOURCE_EXTENDED 1
++                            @%:@include <curses.h>
++                            @%:@ifndef _XOPEN_CURSES
++                            @%:@error "this Curses library is not enhanced"
++                            "this Curses library is not enhanced"
++                            @%:@endif
++                        ]], [[
++                            chtype a = A_BOLD;
++                            int b = KEY_LEFT;
++                            chtype c = COLOR_PAIR(1) & A_COLOR;
++                            attr_t d = WA_NORMAL;
++                            cchar_t e;
++                            wint_t f;
++                            initscr();
++                            init_pair(1, COLOR_WHITE, COLOR_RED);
++                            wattr_set(stdscr, d, 0, NULL);
++                            wget_wch(stdscr, &f);
++                        ]])],
++                        [ax_cv_plaincurses_enhanced=yes],
++                        [ax_cv_plaincurses_enhanced=no])
++                ])
++                AS_IF([test "x$ax_cv_plaincurses_enhanced" = xyes], [
++                    ax_cv_curses_enhanced=yes
++                    ax_cv_curses_color=yes
++                    AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
++                    AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
++                ])
++
++                # Check for color functions
++
++                AC_CACHE_CHECK([for Curses color functions], [ax_cv_plaincurses_color], [
++                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@define _XOPEN_SOURCE_EXTENDED 1
++                        @%:@include <curses.h>
++                        ]], [[
++                            chtype a = A_BOLD;
++                            int b = KEY_LEFT;
++                            chtype c = COLOR_PAIR(1) & A_COLOR;
++                            initscr();
++                            init_pair(1, COLOR_WHITE, COLOR_RED);
++                        ]])],
++                        [ax_cv_plaincurses_color=yes],
++                        [ax_cv_plaincurses_color=no])
++                ])
++                AS_IF([test "x$ax_cv_plaincurses_color" = xyes], [
++                    ax_cv_curses_color=yes
++                    AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
++                ])
++
++                # Check for obsolete functions
++
++                AC_CACHE_CHECK([for obsolete Curses functions], [ax_cv_plaincurses_obsolete], [
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++                        @%:@include <curses.h>
++                    ]], [[
++                        chtype a = A_BOLD;
++                        int b = KEY_LEFT;
++                        int g = getattrs(stdscr);
++                        int h = getcurx(stdscr) + getmaxx(stdscr);
++                        initscr();
++                    ]])],
++                    [ax_cv_plaincurses_obsolete=yes],
++                    [ax_cv_plaincurses_obsolete=no])
++                ])
++                AS_IF([test "x$ax_cv_plaincurses_obsolete" = xyes], [
++                    ax_cv_curses_obsolete=yes
++                    AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
++                ])
++            ])
++
++            AS_IF([test "x$ax_cv_header_curses_h" = xno], [
++                AC_MSG_WARN([could not find a working curses.h])
++            ])
++        ])
++    ])
++
++    AS_IF([test "x$ax_cv_curses"          != xyes], [ax_cv_curses=no])
++    AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [ax_cv_curses_enhanced=no])
++    AS_IF([test "x$ax_cv_curses_color"    != xyes], [ax_cv_curses_color=no])
++    AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no])
++
++    LIBS=$ax_saved_LIBS
++])dnl
+diff --git a/autotools/softether.am b/autotools/softether.am
+new file mode 100644
+index 00000000..e5e91eeb
+--- /dev/null
++++ b/autotools/softether.am
+@@ -0,0 +1,39 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++if CONFIGURE_ENABLE_DEBUG
++DEBUG_CFLAGS = -g -D_DEBUG -DDEBUG
++else
++DEBUG_CFLAGS = -DNDEBUG -DVPN_SPEED
++endif
++
++AM_CFLAGS = \
++	$(DEBUG_CFLAGS) \
++	-I$(top_srcdir)/src \
++	-I$(top_srcdir)/src/Mayaqua \
++	-I$(top_srcdir)/src/Cedar \
++	-DUNIX \
++	-DUNIX_LINUX \
++	-D_REENTRANT \
++	-DREENTRANT \
++	-D_THREAD_SAFE \
++	-D_THREADSAFE \
++	-DTHREAD_SAFE \
++	-DTHREADSAFE \
++	-D_FILE_OFFSET_BITS=64 \
++	-fsigned-char
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 00000000..4a3fc2ba
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,96 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++AC_INIT([SoftEther], [1], [http://www.vpnusers.com/], [softether], [http://www.softether.org/])
++AC_CONFIG_AUX_DIR([autotools])
++AC_CONFIG_MACRO_DIR([autotools])
++AM_INIT_AUTOMAKE([foreign -Wall -Werror])
++AM_PROG_AR
++AC_PROG_CC
++AC_PROG_LIBTOOL
++AC_CONFIG_HEADERS([softether_config.h])
++AC_CONFIG_FILES([
++	Makefile
++	src/Makefile
++	src/Mayaqua/Makefile
++	src/Cedar/Makefile
++	src/hamcorebuilder/Makefile
++	src/bin/hamcore/Makefile
++	src/vpnserver/Makefile
++	src/vpnclient/Makefile
++	src/vpnbridge/Makefile
++	src/vpncmd/Makefile
++])
++
++
++AC_ARG_ENABLE(
++	[debug],
++	AS_HELP_STRING([--enable-debug], [build SoftEther with debugging features]),
++	[debug=yes]
++)
++AM_CONDITIONAL([CONFIGURE_ENABLE_DEBUG], [test _"$debug" = _yes])
++
++
++AX_PTHREAD([
++	AC_SUBST(PTHREAD_CC)
++	AC_SUBST(PTHREAD_CFLAGS)
++	AC_SUBST(PTHREAD_LIBS)
++],[
++	AC_MSG_ERROR([pthread capabilities not found])
++])
++
++CC="$PTHREAD_CC"
++CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
++LIBS="$PTHREAD_LIBS $LIBS"
++
++
++AX_CHECK_OPENSSL([
++	AC_SUBST(OPENSSL_LIBS)
++	AC_SUBST(OPENSSL_LDFLAGS)
++],[
++	AC_MSG_ERROR([openssl not found])
++])
++
++LIBS="$LIBS $OPENSSL_LIBS"
++LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
++
++
++# This macro automatically updates build variables.
++AX_CHECK_ZLIB(, AC_MSG_ERROR([zlib not found]))
++
++
++AX_WITH_CURSES
++if test "_$ax_cv_curses" != _yes
++then
++	AC_MSG_ERROR([libcurses, libncurses, or libncursesw not found])
++else
++	AC_SUBST(CURSES_LIB)
++	LIBS="$LIBS $CURSES_LIB"
++fi
++
++
++AX_LIB_READLINE
++if test "_$ax_cv_lib_readline" = _no
++then
++	AC_MSG_ERROR([libreadline not found])
++else
++	: This macro automatically updates build variables.
++fi
++
++
++AC_OUTPUT
+diff --git a/configure b/manual_configure
+similarity index 100%
+rename from configure
+rename to manual_configure
+diff --git a/src/Cedar/Makefile.am b/src/Cedar/Makefile.am
+new file mode 100644
+index 00000000..5346537d
+--- /dev/null
++++ b/src/Cedar/Makefile.am
+@@ -0,0 +1,82 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++noinst_LTLIBRARIES = libcedar.la
++
++libcedar_la_SOURCES = \
++	Account.c \
++	Admin.c \
++	AzureClient.c \
++	AzureServer.c \
++	Bridge.c \
++	BridgeUnix.c \
++	BridgeWin32.c \
++	Cedar.c \
++	CedarPch.c \
++	Client.c \
++	CM.c \
++	Command.c \
++	Connection.c \
++	Console.c \
++	Database.c \
++	DDNS.c \
++	EM.c \
++	EtherLog.c \
++	Hub.c \
++	Interop_OpenVPN.c \
++	Interop_SSTP.c \
++	IPsec.c \
++	IPsec_EtherIP.c \
++	IPsec_IKE.c \
++	IPsec_IkePacket.c \
++	IPsec_IPC.c \
++	IPsec_L2TP.c \
++	IPsec_PPP.c \
++	IPsec_Win7.c \
++	Layer3.c \
++	Link.c \
++	Listener.c \
++	Logging.c \
++	Nat.c \
++	NativeStack.c \
++	NM.c \
++	NullLan.c \
++	Protocol.c \
++	Radius.c \
++	Remote.c \
++	Sam.c \
++	SecureInfo.c \
++	SecureNAT.c \
++	SeLowUser.c \
++	Server.c \
++	Session.c \
++	SM.c \
++	SW.c \
++	UdpAccel.c \
++	UT.c \
++	VG.c \
++	Virtual.c \
++	VLan.c \
++	VLanUnix.c \
++	VLanWin32.c \
++	WaterMark.c \
++	WebUI.c \
++	WinUi.c \
++	Wpc.c
+diff --git a/src/Makefile.am b/src/Makefile.am
+new file mode 100644
+index 00000000..dc745426
+--- /dev/null
++++ b/src/Makefile.am
+@@ -0,0 +1,26 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++# These components are built as libtool convenience libraries.
++SUBDIRS = Mayaqua Cedar
++
++# This is a nodist helper.
++SUBDIRS += hamcorebuilder
++
++# These are final build products.
++SUBDIRS += bin/hamcore vpnserver vpnclient vpnbridge vpncmd
+diff --git a/src/Mayaqua/Makefile.am b/src/Mayaqua/Makefile.am
+new file mode 100644
+index 00000000..6b8dc1a6
+--- /dev/null
++++ b/src/Mayaqua/Makefile.am
+@@ -0,0 +1,43 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++noinst_LTLIBRARIES = libmayaqua.la
++
++libmayaqua_la_SOURCES = \
++	Cfg.c \
++	Encrypt.c \
++	FileIO.c \
++	Internat.c \
++	Kernel.c \
++	Mayaqua.c \
++	Memory.c \
++	Microsoft.c \
++	Network.c \
++	Object.c \
++	OS.c \
++	Pack.c \
++	Secure.c \
++	Str.c \
++	Table.c \
++	TcpIp.c \
++	Tick64.c \
++	Tracking.c \
++	Unix.c \
++	Win32.c
+diff --git a/src/bin/hamcore/Makefile.am b/src/bin/hamcore/Makefile.am
+new file mode 100644
+index 00000000..37b0291e
+--- /dev/null
++++ b/src/bin/hamcore/Makefile.am
+@@ -0,0 +1,29 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++# This is required to use a custom build rule with -Wall and -Werror enabled.
++AUTOMAKE_OPTIONS = -Wno-override
++EXEEXT =
++HAMCOREBUILDER = $(top_builddir)/src/hamcorebuilder/hamcorebuilder
++
++sbin_PROGRAMS = hamcore.se2
++
++hamcore.se2$(EXEEXT): $(HAMCOREBUILDER)
++	$(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@
+diff --git a/src/hamcorebuilder/Makefile.am b/src/hamcorebuilder/Makefile.am
+new file mode 100644
+index 00000000..a22429f0
+--- /dev/null
++++ b/src/hamcorebuilder/Makefile.am
+@@ -0,0 +1,29 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++noinst_PROGRAMS = \
++	hamcorebuilder
++
++hamcorebuilder_SOURCES = \
++	hamcorebuilder.c
++
++hamcorebuilder_LDADD = \
++	$(top_builddir)/src/Mayaqua/libmayaqua.la \
++	$(top_builddir)/src/Cedar/libcedar.la
+diff --git a/src/vpnbridge/Makefile.am b/src/vpnbridge/Makefile.am
+new file mode 100644
+index 00000000..35fe043d
+--- /dev/null
++++ b/src/vpnbridge/Makefile.am
+@@ -0,0 +1,29 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++sbin_PROGRAMS = \
++	vpnbridge
++
++vpnbridge_SOURCES = \
++	vpnbridge.c
++
++vpnbridge_LDADD = \
++	$(top_builddir)/src/Mayaqua/libmayaqua.la \
++	$(top_builddir)/src/Cedar/libcedar.la
+diff --git a/src/vpnclient/Makefile.am b/src/vpnclient/Makefile.am
+new file mode 100644
+index 00000000..1aa55330
+--- /dev/null
++++ b/src/vpnclient/Makefile.am
+@@ -0,0 +1,29 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++sbin_PROGRAMS = \
++	vpnclient
++
++vpnclient_SOURCES = \
++	vpncsvc.c
++
++vpnclient_LDADD = \
++	$(top_builddir)/src/Mayaqua/libmayaqua.la \
++	$(top_builddir)/src/Cedar/libcedar.la
+diff --git a/src/vpncmd/Makefile.am b/src/vpncmd/Makefile.am
+new file mode 100644
+index 00000000..d8042aa2
+--- /dev/null
++++ b/src/vpncmd/Makefile.am
+@@ -0,0 +1,29 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++sbin_PROGRAMS = \
++	vpncmd
++
++vpncmd_SOURCES = \
++	vpncmd.c
++
++vpncmd_LDADD = \
++	$(top_builddir)/src/Mayaqua/libmayaqua.la \
++	$(top_builddir)/src/Cedar/libcedar.la
+diff --git a/src/vpnserver/Makefile.am b/src/vpnserver/Makefile.am
+new file mode 100644
+index 00000000..c1c33570
+--- /dev/null
++++ b/src/vpnserver/Makefile.am
+@@ -0,0 +1,29 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++sbin_PROGRAMS = \
++	vpnserver
++
++vpnserver_SOURCES = \
++	vpnserver.c
++
++vpnserver_LDADD = \
++	$(top_builddir)/src/Mayaqua/libmayaqua.la \
++	$(top_builddir)/src/Cedar/libcedar.la
diff --git a/package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch b/package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch
new file mode 100644
index 0000000..1fdf118
--- /dev/null
+++ b/package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch
@@ -0,0 +1,133 @@
+From 75625af541fd128f51079d0ffe5ef24645b8f421 Mon Sep 17 00:00:00 2001
+From: Darik Horn <dajhorn@vanadac.com>
+Date: Sun, 13 Apr 2014 12:51:15 -0400
+Subject: [PATCH] Create libsoftether.so and dynamically link the userland.
+
+Sharing object code between vpnbridge, vpnclient, vpnserver, and vpncmd
+reduces the binary size of SoftEther by 85% and its administrative memory
+footprint by 50%.
+
+[Upstream commit https://github.com/dajhorn/SoftEtherVPN/commit/75625af541fd128f51079d0ffe5ef24645b8f421]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac                 |  1 +
+ src/Makefile.am              |  7 +++++--
+ src/libsoftether/Makefile.am | 34 ++++++++++++++++++++++++++++++++++
+ src/vpnbridge/Makefile.am    |  3 +--
+ src/vpnclient/Makefile.am    |  3 +--
+ src/vpncmd/Makefile.am       |  3 +--
+ src/vpnserver/Makefile.am    |  3 +--
+ 7 files changed, 44 insertions(+), 10 deletions(-)
+ create mode 100644 src/libsoftether/Makefile.am
+
+diff --git a/configure.ac b/configure.ac
+index 4a3fc2ba..94639c44 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,6 +30,7 @@ AC_CONFIG_FILES([
+ 	src/Mayaqua/Makefile
+ 	src/Cedar/Makefile
+ 	src/hamcorebuilder/Makefile
++	src/libsoftether/Makefile
+ 	src/bin/hamcore/Makefile
+ 	src/vpnserver/Makefile
+ 	src/vpnclient/Makefile
+diff --git a/src/Makefile.am b/src/Makefile.am
+index dc745426..1d041d47 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -22,5 +22,8 @@ SUBDIRS = Mayaqua Cedar
+ # This is a nodist helper.
+ SUBDIRS += hamcorebuilder
+ 
+-# These are final build products.
+-SUBDIRS += bin/hamcore vpnserver vpnclient vpnbridge vpncmd
++# These are shared components.
++SUBDIRS += libsoftether bin/hamcore
++
++# These are the final build products.
++SUBDIRS += vpnserver vpnclient vpnbridge vpncmd
+diff --git a/src/libsoftether/Makefile.am b/src/libsoftether/Makefile.am
+new file mode 100644
+index 00000000..601920d9
+--- /dev/null
++++ b/src/libsoftether/Makefile.am
+@@ -0,0 +1,34 @@
++#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
++#
++#  This file is part of SoftEther.
++#
++#  SoftEther is free software: you can redistribute it and/or modify it under
++#  the terms of the GNU General Public License as published by the Free 
++#  Software Foundation, either version 2 of the License, or (at your option)
++#  any later version.
++#
++#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
++#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
++#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
++#  details.
++#
++#  You should have received a copy of the GNU General Public License along with
++#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
++
++
++include $(top_srcdir)/autotools/softether.am
++
++lib_LTLIBRARIES = \
++	libsoftether.la
++
++libsoftether_la_SOURCES =
++
++libsoftether_la_LDFLAGS = \
++	-avoid-version
++
++libsoftether_la_LIBTOOLFLAGS = \
++	--tag=disable-static
++
++libsoftether_la_LIBADD = \
++	$(top_builddir)/src/Mayaqua/libmayaqua.la \
++	$(top_builddir)/src/Cedar/libcedar.la
+diff --git a/src/vpnbridge/Makefile.am b/src/vpnbridge/Makefile.am
+index 35fe043d..fb91dd2d 100644
+--- a/src/vpnbridge/Makefile.am
++++ b/src/vpnbridge/Makefile.am
+@@ -25,5 +25,4 @@ vpnbridge_SOURCES = \
+ 	vpnbridge.c
+ 
+ vpnbridge_LDADD = \
+-	$(top_builddir)/src/Mayaqua/libmayaqua.la \
+-	$(top_builddir)/src/Cedar/libcedar.la
++	$(top_builddir)/src/libsoftether/libsoftether.la
+diff --git a/src/vpnclient/Makefile.am b/src/vpnclient/Makefile.am
+index 1aa55330..c225c416 100644
+--- a/src/vpnclient/Makefile.am
++++ b/src/vpnclient/Makefile.am
+@@ -25,5 +25,4 @@ vpnclient_SOURCES = \
+ 	vpncsvc.c
+ 
+ vpnclient_LDADD = \
+-	$(top_builddir)/src/Mayaqua/libmayaqua.la \
+-	$(top_builddir)/src/Cedar/libcedar.la
++	$(top_builddir)/src/libsoftether/libsoftether.la
+diff --git a/src/vpncmd/Makefile.am b/src/vpncmd/Makefile.am
+index d8042aa2..271affb0 100644
+--- a/src/vpncmd/Makefile.am
++++ b/src/vpncmd/Makefile.am
+@@ -25,5 +25,4 @@ vpncmd_SOURCES = \
+ 	vpncmd.c
+ 
+ vpncmd_LDADD = \
+-	$(top_builddir)/src/Mayaqua/libmayaqua.la \
+-	$(top_builddir)/src/Cedar/libcedar.la
++	$(top_builddir)/src/libsoftether/libsoftether.la
+diff --git a/src/vpnserver/Makefile.am b/src/vpnserver/Makefile.am
+index c1c33570..1f7b7f98 100644
+--- a/src/vpnserver/Makefile.am
++++ b/src/vpnserver/Makefile.am
+@@ -25,5 +25,4 @@ vpnserver_SOURCES = \
+ 	vpnserver.c
+ 
+ vpnserver_LDADD = \
+-	$(top_builddir)/src/Mayaqua/libmayaqua.la \
+-	$(top_builddir)/src/Cedar/libcedar.la
++	$(top_builddir)/src/libsoftether/libsoftether.la
diff --git a/package/softether/0001-use-fhs-install-directories.patch b/package/softether/0003-use-fhs-install-directories.patch
similarity index 100%
rename from package/softether/0001-use-fhs-install-directories.patch
rename to package/softether/0003-use-fhs-install-directories.patch
diff --git a/package/softether/0002-create-non-forking-softetherd-for-upstart-and-systemd.patch b/package/softether/0004-create-non-forking-softetherd-for-upstart-and-systemd.patch
similarity index 100%
rename from package/softether/0002-create-non-forking-softetherd-for-upstart-and-systemd.patch
rename to package/softether/0004-create-non-forking-softetherd-for-upstart-and-systemd.patch
diff --git a/package/softether/0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch b/package/softether/0005-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch
similarity index 100%
rename from package/softether/0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch
rename to package/softether/0005-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch
diff --git a/package/softether/0004-cross-compile.patch b/package/softether/0006-cross-compile.patch
similarity index 100%
rename from package/softether/0004-cross-compile.patch
rename to package/softether/0006-cross-compile.patch
diff --git a/package/softether/0005-iconv.patch b/package/softether/0007-iconv.patch
similarity index 100%
rename from package/softether/0005-iconv.patch
rename to package/softether/0007-iconv.patch
diff --git a/package/softether/0006-librt.patch b/package/softether/0008-librt.patch
similarity index 100%
rename from package/softether/0006-librt.patch
rename to package/softether/0008-librt.patch
diff --git a/package/softether/0007-uclibc-ai-addrconfig.patch b/package/softether/0009-uclibc-ai-addrconfig.patch
similarity index 100%
rename from package/softether/0007-uclibc-ai-addrconfig.patch
rename to package/softether/0009-uclibc-ai-addrconfig.patch
diff --git a/package/softether/softether.hash b/package/softether/softether.hash
index ecc5d25..961990b 100644
--- a/package/softether/softether.hash
+++ b/package/softether/softether.hash
@@ -1,4 +1,2 @@
 # Locally computed
 sha256 4bdcc05fcd163eea735444283264e40b86626d24fddf110aa416f2c8cb82448b softether-1e17c9bcfd7e7b31756aa5389bcbff76c2c9c88a.tar.gz
-sha256 fe5ff8f13b42737dfd5eb53f14c55aed714c380f181a1ae112055b04e8c97229 c5e5d7e93c6f3302adf5821c29c4efdb7630e418.patch
-sha256 b5a8750426387b9211754b199f7f9f6a013dba6a1cd731c210a205679ffa1d1c 75625af541fd128f51079d0ffe5ef24645b8f421.patch
diff --git a/package/softether/softether.mk b/package/softether/softether.mk
index 0222629..2ab53f9 100644
--- a/package/softether/softether.mk
+++ b/package/softether/softether.mk
@@ -6,9 +6,6 @@
 
 SOFTETHER_VERSION = 1e17c9bcfd7e7b31756aa5389bcbff76c2c9c88a
 SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN,$(SOFTETHER_VERSION))
-SOFTETHER_PATCH = \
-	https://github.com/dajhorn/SoftEtherVPN/commit/c5e5d7e93c6f3302adf5821c29c4efdb7630e418.patch \
-	https://github.com/dajhorn/SoftEtherVPN/commit/75625af541fd128f51079d0ffe5ef24645b8f421.patch
 SOFTETHER_LICENSE = GPL-2.0
 SOFTETHER_LICENSE_FILES = LICENSE
 SOFTETHER_DEPENDENCIES = host-softether openssl readline
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 17/20] systemd: don't download patches from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (15 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 16/20] softether: " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 18/20] tinycbor: on't download patch " Thomas Petazzoni
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-of-null-pointer-p-question-dereferencing.patch | 28 ++++++++++++
 ...-resolved-simplify-alloc-size-calculation.patch | 51 ++++++++++++++++++++++
 ...do-not-allocate-packets-with-minimum-size.patch | 48 ++++++++++++++++++++
 ...-getty-unit.patch => 0004-fix-getty-unit.patch} |  0
 ...atch => 0005-build-check-for-ln-relative.patch} |  0
 ...h => 0006-fix-am-path-libgcrypt-no-found.patch} |  0
 package/systemd/systemd.hash                       |  3 --
 package/systemd/systemd.mk                         |  5 ---
 8 files changed, 127 insertions(+), 8 deletions(-)
 create mode 100644 package/systemd/0001-resolved-bugfix-of-null-pointer-p-question-dereferencing.patch
 create mode 100644 package/systemd/0002-resolved-simplify-alloc-size-calculation.patch
 create mode 100644 package/systemd/0003-resolved-do-not-allocate-packets-with-minimum-size.patch
 rename package/systemd/{0001-fix-getty-unit.patch => 0004-fix-getty-unit.patch} (100%)
 rename package/systemd/{0002-build-check-for-ln-relative.patch => 0005-build-check-for-ln-relative.patch} (100%)
 rename package/systemd/{0003-fix-am-path-libgcrypt-no-found.patch => 0006-fix-am-path-libgcrypt-no-found.patch} (100%)

diff --git a/package/systemd/0001-resolved-bugfix-of-null-pointer-p-question-dereferencing.patch b/package/systemd/0001-resolved-bugfix-of-null-pointer-p-question-dereferencing.patch
new file mode 100644
index 0000000..81cecef
--- /dev/null
+++ b/package/systemd/0001-resolved-bugfix-of-null-pointer-p-question-dereferencing.patch
@@ -0,0 +1,28 @@
+From a924f43f30f9c4acaf70618dd2a055f8b0f166be Mon Sep 17 00:00:00 2001
+From: Evgeny Vereshchagin <evvers@ya.ru>
+Date: Wed, 24 May 2017 08:56:48 +0300
+Subject: [PATCH] resolved: bugfix of null pointer p->question dereferencing
+ (#6020)
+
+See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
+
+[Upstream commit: https://github.com/systemd/systemd/commit/a924f43f30f9c4acaf70618dd2a055f8b0f166be]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/resolve/resolved-dns-packet.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
+index 652970284e..240ee448f4 100644
+--- a/src/resolve/resolved-dns-packet.c
++++ b/src/resolve/resolved-dns-packet.c
+@@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
+         if (r < 0)
+                 return r;
+ 
++        if (!p->question)
++                return 0;
++
+         if (p->question->n_keys != 1)
+                 return 0;
+ 
diff --git a/package/systemd/0002-resolved-simplify-alloc-size-calculation.patch b/package/systemd/0002-resolved-simplify-alloc-size-calculation.patch
new file mode 100644
index 0000000..5fab905
--- /dev/null
+++ b/package/systemd/0002-resolved-simplify-alloc-size-calculation.patch
@@ -0,0 +1,51 @@
+From db848813bae4d28c524b3b6a7dad135e426659ce Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sun, 18 Jun 2017 16:07:57 -0400
+Subject: [PATCH] resolved: simplify alloc size calculation
+
+The allocation size was calculated in a complicated way, and for values
+close to the page size we would actually allocate less than requested.
+
+Reported by Chris Coulson <chris.coulson@canonical.com>.
+
+CVE-2017-9445
+
+[Upstream commit: https://github.com/systemd/systemd/commit/db848813bae4d28c524b3b6a7dad135e426659ce]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/resolve/resolved-dns-packet.c | 8 +-------
+ src/resolve/resolved-dns-packet.h | 2 --
+ 2 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
+index 240ee448f4..821b66e266 100644
+--- a/src/resolve/resolved-dns-packet.c
++++ b/src/resolve/resolved-dns-packet.c
+@@ -47,13 +47,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
+ 
+         assert(ret);
+ 
+-        if (mtu <= UDP_PACKET_HEADER_SIZE)
+-                a = DNS_PACKET_SIZE_START;
+-        else
+-                a = mtu - UDP_PACKET_HEADER_SIZE;
+-
+-        if (a < DNS_PACKET_HEADER_SIZE)
+-                a = DNS_PACKET_HEADER_SIZE;
++        a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
+ 
+         /* round up to next page size */
+         a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
+diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
+index 2c92392e4d..3abcaf8cf3 100644
+--- a/src/resolve/resolved-dns-packet.h
++++ b/src/resolve/resolved-dns-packet.h
+@@ -66,8 +66,6 @@ struct DnsPacketHeader {
+ /* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
+ #define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
+ 
+-#define DNS_PACKET_SIZE_START 512
+-
+ struct DnsPacket {
+         int n_ref;
+         DnsProtocol protocol;
diff --git a/package/systemd/0003-resolved-do-not-allocate-packets-with-minimum-size.patch b/package/systemd/0003-resolved-do-not-allocate-packets-with-minimum-size.patch
new file mode 100644
index 0000000..7509113
--- /dev/null
+++ b/package/systemd/0003-resolved-do-not-allocate-packets-with-minimum-size.patch
@@ -0,0 +1,48 @@
+From 88795538726a5bbfd9efc13d441cb05e1d7fc139 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Tue, 27 Jun 2017 14:20:00 -0400
+Subject: [PATCH] resolved: do not allocate packets with minimum size
+
+dns_packet_new() is sometimes called with mtu == 0, and in that case we should
+allocate more than the absolute minimum (which is the dns packet header size),
+otherwise we have to resize immediately again after appending the first data to
+the packet.
+
+This partially reverts the previous commit.
+
+[Upstream commit: https://github.com/systemd/systemd/commit/88795538726a5bbfd9efc13d441cb05e1d7fc139]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ src/resolve/resolved-dns-packet.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
+index 821b66e266..d1f0f760a4 100644
+--- a/src/resolve/resolved-dns-packet.c
++++ b/src/resolve/resolved-dns-packet.c
+@@ -28,6 +28,9 @@
+ 
+ #define EDNS0_OPT_DO (1<<15)
+ 
++#define DNS_PACKET_SIZE_START 512
++assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
++
+ typedef struct DnsPacketRewinder {
+         DnsPacket *packet;
+         size_t saved_rindex;
+@@ -47,7 +50,14 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
+ 
+         assert(ret);
+ 
+-        a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
++        /* When dns_packet_new() is called with mtu == 0, allocate more than the
++         * absolute minimum (which is the dns packet header size), to avoid
++         * resizing immediately again after appending the first data to the packet.
++         */
++        if (mtu < UDP_PACKET_HEADER_SIZE)
++                a = DNS_PACKET_SIZE_START;
++        else
++                a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
+ 
+         /* round up to next page size */
+         a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
diff --git a/package/systemd/0001-fix-getty-unit.patch b/package/systemd/0004-fix-getty-unit.patch
similarity index 100%
rename from package/systemd/0001-fix-getty-unit.patch
rename to package/systemd/0004-fix-getty-unit.patch
diff --git a/package/systemd/0002-build-check-for-ln-relative.patch b/package/systemd/0005-build-check-for-ln-relative.patch
similarity index 100%
rename from package/systemd/0002-build-check-for-ln-relative.patch
rename to package/systemd/0005-build-check-for-ln-relative.patch
diff --git a/package/systemd/0003-fix-am-path-libgcrypt-no-found.patch b/package/systemd/0006-fix-am-path-libgcrypt-no-found.patch
similarity index 100%
rename from package/systemd/0003-fix-am-path-libgcrypt-no-found.patch
rename to package/systemd/0006-fix-am-path-libgcrypt-no-found.patch
diff --git a/package/systemd/systemd.hash b/package/systemd/systemd.hash
index 77a680d..17f4c0f 100644
--- a/package/systemd/systemd.hash
+++ b/package/systemd/systemd.hash
@@ -1,5 +1,2 @@
 # sha256 locally computed
 sha256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083  systemd-233.tar.gz
-sha256 eed8fef0045876e9efa0ba6725ed9ea93654bf24d67bb5aad467a341ad375883  a924f43f30f9c4acaf70618dd2a055f8b0f166be.patch
-sha256 43c75bd161a8ef0de5db607aaceed77220f2ba4903cf44e7e9db544980420a5e  db848813bae4d28c524b3b6a7dad135e426659ce.patch
-sha256 451f7c09332479ebe4ac01612f5f034df4524e16b5bc5d1c8ddcda14e9f3cd69  88795538726a5bbfd9efc13d441cb05e1d7fc139.patch
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index a853434..f7894b2 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -19,11 +19,6 @@ SYSTEMD_DEPENDENCIES = \
 SYSTEMD_PROVIDES = udev
 SYSTEMD_AUTORECONF = YES
 
-SYSTEMD_PATCH = \
-	https://github.com/systemd/systemd/commit/a924f43f30f9c4acaf70618dd2a055f8b0f166be.patch \
-	https://github.com/systemd/systemd/commit/db848813bae4d28c524b3b6a7dad135e426659ce.patch \
-	https://github.com/systemd/systemd/commit/88795538726a5bbfd9efc13d441cb05e1d7fc139.patch
-
 # Make sure that systemd will always be built after busybox so that we have
 # a consistent init setup between two builds
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 18/20] tinycbor: on't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (16 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 17/20] systemd: don't download patches " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 19/20] trinity: don't download patches " Thomas Petazzoni
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../0001-Fix-static-compilation-of-json2cbor.patch | 28 ++++++++++++++++++++++
 package/tinycbor/tinycbor.hash                     |  1 -
 package/tinycbor/tinycbor.mk                       |  4 ----
 3 files changed, 28 insertions(+), 5 deletions(-)
 create mode 100644 package/tinycbor/0001-Fix-static-compilation-of-json2cbor.patch

diff --git a/package/tinycbor/0001-Fix-static-compilation-of-json2cbor.patch b/package/tinycbor/0001-Fix-static-compilation-of-json2cbor.patch
new file mode 100644
index 0000000..8d265d8
--- /dev/null
+++ b/package/tinycbor/0001-Fix-static-compilation-of-json2cbor.patch
@@ -0,0 +1,28 @@
+From ae608ea2735bd331ec7dcf9d89928c38f0e0c981 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 6 Mar 2017 18:59:22 +0100
+Subject: [PATCH] Fix static compilation of json2cbor
+
+json2cbor depends on cjson so tools/json2cbor/json2cbor.o must be
+before -lcjson
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream commit: https://github.com/01org/tinycbor/commit/ae608ea2735bd331ec7dcf9d89928c38f0e0c981]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 97b292c..a8cb57c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -115,7 +115,7 @@ bin/cbordump: $(CBORDUMP_SOURCES:.c=.o) lib/libtinycbor.a
+ 
+ bin/json2cbor: $(JSON2CBOR_SOURCES:.c=.o) lib/libtinycbor.a
+ 	@$(MKDIR) -p bin
+-	$(CC) -o $@ $(LDFLAGS) $(LDFLAGS_CJSON) $^ $(LDLIBS) -lm
++	$(CC) -o $@ $(LDFLAGS) $^ $(LDFLAGS_CJSON) $(LDLIBS) -lm
+ 
+ tinycbor.pc: tinycbor.pc.in
+ 	$(SED) > $@ < $< \
diff --git a/package/tinycbor/tinycbor.hash b/package/tinycbor/tinycbor.hash
index 416dce6..6cb0a6e 100644
--- a/package/tinycbor/tinycbor.hash
+++ b/package/tinycbor/tinycbor.hash
@@ -1,3 +1,2 @@
 # Locally computed:
 sha256	8e42984015d62e8323b7f2a439bde157d707e0d7ae57a6d8d5a2665247af6638	tinycbor-v0.4.1.tar.gz
-sha256	1298b80ab23ae24e85515d9f06398236d087bc76dccd0a48757fcb7e54557175	ae608ea2735bd331ec7dcf9d89928c38f0e0c981.patch
diff --git a/package/tinycbor/tinycbor.mk b/package/tinycbor/tinycbor.mk
index 1f13e7d..9c3d2eb 100644
--- a/package/tinycbor/tinycbor.mk
+++ b/package/tinycbor/tinycbor.mk
@@ -12,10 +12,6 @@ TINYCBOR_LICENSE_FILES = LICENSE
 TINYCBOR_DEPENDENCIES = host-pkgconf
 TINYCBOR_INSTALL_STAGING = YES
 
-# This patch fixes static build of json2cbor
-TINYCBOR_PATCH = \
-	https://github.com/01org/tinycbor/commit/ae608ea2735bd331ec7dcf9d89928c38f0e0c981.patch
-
 ifeq ($(BR2_PACKAGE_CJSON),y)
 TINYCBOR_DEPENDENCIES += cjson
 endif
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 19/20] trinity: don't download patches from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (17 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 18/20] tinycbor: on't download patch " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 16:53 ` [Buildroot] [PATCH 20/20] wavpack: don't download patch " Thomas Petazzoni
  2017-07-02 22:06 ` [Buildroot] [PATCH 00/20] Do not download auto-generated patches Peter Korsgaard
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...rspace-headers-for-ax25-instead-of-kernel.patch | 26 ++++++++
 ...002-fix-build-when_USE_BPF-is-not-defined.patch | 72 ++++++++++++++++++++++
 .../0003-Check-for-bpf-attr-map-flags.patch        | 60 ++++++++++++++++++
 ...4-get_syscall_entry-remove-SYSCALL_OFFSET.patch | 44 +++++++++++++
 ...x-cross-compile-detection-of-broken-ipv6.patch} |  0
 package/trinity/trinity.hash                       |  4 --
 package/trinity/trinity.mk                         |  5 --
 7 files changed, 202 insertions(+), 9 deletions(-)
 create mode 100644 package/trinity/0001-use-userspace-headers-for-ax25-instead-of-kernel.patch
 create mode 100644 package/trinity/0002-fix-build-when_USE_BPF-is-not-defined.patch
 create mode 100644 package/trinity/0003-Check-for-bpf-attr-map-flags.patch
 create mode 100644 package/trinity/0004-get_syscall_entry-remove-SYSCALL_OFFSET.patch
 rename package/trinity/{0001-configure-fix-cross-compile-detection-of-broken-ipv6.patch => 0005-configure-fix-cross-compile-detection-of-broken-ipv6.patch} (100%)

diff --git a/package/trinity/0001-use-userspace-headers-for-ax25-instead-of-kernel.patch b/package/trinity/0001-use-userspace-headers-for-ax25-instead-of-kernel.patch
new file mode 100644
index 0000000..e077bf4
--- /dev/null
+++ b/package/trinity/0001-use-userspace-headers-for-ax25-instead-of-kernel.patch
@@ -0,0 +1,26 @@
+From b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d Mon Sep 17 00:00:00 2001
+From: Dave Jones <davej@codemonkey.org.uk>
+Date: Mon, 5 Dec 2016 12:46:14 -0500
+Subject: [PATCH] use userspace headers for ax25 instead of kernel.
+
+This should solve https://bugzilla.redhat.com/show_bug.cgi?id=1400720
+
+[Upstream commit: https://github.com/kernelslacker/trinity/commit/b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ net/proto-rose.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/proto-rose.c b/net/proto-rose.c
+index ccbf294f..b277f839 100644
+--- a/net/proto-rose.c
++++ b/net/proto-rose.c
+@@ -6,7 +6,7 @@
+ #include <sys/un.h>
+ #include <netinet/in.h>
+ #include <bits/sockaddr.h>
+-#include <linux/ax25.h> /* for ax25_address in rose.h */
++#include <netax25/ax25.h> /* for ax25_address in rose.h */
+ #include <netrose/rose.h>
+ #include <stdlib.h>
+ #include "net.h"
diff --git a/package/trinity/0002-fix-build-when_USE_BPF-is-not-defined.patch b/package/trinity/0002-fix-build-when_USE_BPF-is-not-defined.patch
new file mode 100644
index 0000000..4fb2c69
--- /dev/null
+++ b/package/trinity/0002-fix-build-when_USE_BPF-is-not-defined.patch
@@ -0,0 +1,72 @@
+From f447db18b389050ecc5e66dbf549d5953633e23e Mon Sep 17 00:00:00 2001
+From: Jan Stancek <jstancek@redhat.com>
+Date: Mon, 7 Nov 2016 12:50:27 +0100
+Subject: [PATCH] fix build when USE_BPF is not defined
+
+net/bpf.o: In function `bpf_gen_filter': bpf.c:852: undefined reference to `get_rand_bpf_fd'
+
+Signed-off-by: Jan Stancek <jstancek@redhat.com>
+[Upstream commit: https://github.com/kernelslacker/trinity/commit/f447db18b389050ecc5e66dbf549d5953633e23e]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ net/bpf.c             | 3 +++
+ syscalls/prctl.c      | 4 +++-
+ syscalls/setsockopt.c | 2 ++
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/net/bpf.c b/net/bpf.c
+index 4fe94173..d6ca14bd 100644
+--- a/net/bpf.c
++++ b/net/bpf.c
+@@ -8,6 +8,7 @@
+ #include <string.h>
+ 
+ #include "bpf.h"
++#include "config.h"
+ #include "debug.h"
+ #include "log.h"
+ #include "net.h"
+@@ -17,6 +18,7 @@
+ #include "utils.h"
+ #include "compat.h"
+ 
++#ifdef USE_BPF
+ /**
+  * BPF filters are used in networking such as in pf_packet, but also
+  * in seccomp for application sand-boxing. Additionally, with arch
+@@ -885,3 +887,4 @@ void bpf_gen_filter(unsigned long **addr, unsigned long *addrlen)
+ 	if (dump_bpf)
+ 		bpf_disasm_all(bpf->filter, bpf->len);
+ }
++#endif
+diff --git a/syscalls/prctl.c b/syscalls/prctl.c
+index 02d2dbc6..cdbcdc21 100644
+--- a/syscalls/prctl.c
++++ b/syscalls/prctl.c
+@@ -45,9 +45,11 @@ static int prctl_opts[] = {
+ #ifdef USE_SECCOMP
+ static void do_set_seccomp(struct syscallrecord *rec)
+ {
+-	unsigned long *optval = NULL, optlen = 0;
++	unsigned long *optval = NULL, __unused__ optlen = 0;
+ 
++#ifdef USE_BPF
+ 	bpf_gen_seccomp(&optval, &optlen);
++#endif
+ 
+ 	rec->a2 = SECCOMP_MODE_FILTER;
+ 	rec->a3 = (unsigned long) optval;
+diff --git a/syscalls/setsockopt.c b/syscalls/setsockopt.c
+index 8189b7a8..d395e54e 100644
+--- a/syscalls/setsockopt.c
++++ b/syscalls/setsockopt.c
+@@ -48,7 +48,9 @@ static void socket_setsockopt(struct sockopt *so, __unused__ struct socket_tripl
+ 	case SO_ATTACH_FILTER: {
+ 		unsigned long *optval = NULL, optlen = 0;
+ 
++#ifdef USE_BPF
+ 		bpf_gen_filter(&optval, &optlen);
++#endif
+ 
+ 		so->optval = (unsigned long) optval;
+ 		so->optlen = optlen;
diff --git a/package/trinity/0003-Check-for-bpf-attr-map-flags.patch b/package/trinity/0003-Check-for-bpf-attr-map-flags.patch
new file mode 100644
index 0000000..ee2bc37
--- /dev/null
+++ b/package/trinity/0003-Check-for-bpf-attr-map-flags.patch
@@ -0,0 +1,60 @@
+From 87427256640f806710dd97fc807a9a896147c617 Mon Sep 17 00:00:00 2001
+From: Vinson Lee <vlee@freedesktop.org>
+Date: Sat, 12 Nov 2016 00:55:35 +0000
+Subject: [PATCH] Check for bpf_attr map_flags.
+
+map_flags is not available until Linux 4.6.
+
+Signed-off-by: Vinson Lee <vlee@freedesktop.org>
+[Upstream commit: https://github.com/kernelslacker/trinity/commit/87427256640f806710dd97fc807a9a896147c617]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure | 28 +++++++++++++++++++++++++++-
+ 1 file changed, 27 insertions(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index ca37e4ef..18d9df73 100755
+--- a/configure
++++ b/configure
+@@ -222,6 +222,33 @@ else
+ fi
+ 
+ #############################################################################################
++# is /usr/include/linux/bpf.h new enough to feature bpf
++#
++echo -n "[*] Checking if bpf_attr can use map_flags.. "
++rm -f "$TMP" || exit 1
++
++cat >"$TMP.c" << EOF
++#include <stdio.h>
++#include <linux/bpf.h>
++
++void main()
++{
++	union bpf_attr attr = {
++		.map_flags = 0,
++	};
++}
++EOF
++
++${CC} ${CFLAGS} "$TMP.c" -o "$TMP" &>"$TMP.log"
++if [ ! -x "$TMP" ]; then
++	echo $RED "[NO]" $COL_RESET
++	MISSING_DEFS=1
++else
++	echo $GREEN "[YES]" $COL_RESET
++	echo "#define USE_BPF 1" >> $CONFIGH
++fi
++
++#############################################################################################
+ 
+ check_header linux/caif/caif_socket.h USE_CAIF
+ check_header linux/if_alg.h USE_IF_ALG
+@@ -239,7 +266,6 @@ check_header execinfo.h USE_BACKTRACE
+ check_header netatalk/at.h USE_APPLETALK
+ check_header netrom/netrom.h USE_NETROM
+ check_header netrose/rose.h USE_ROSE
+-check_header linux/bpf.h USE_BPF
+ 
+ rm -f "$TMP" "$TMP.log" "$TMP.c"
+ 
diff --git a/package/trinity/0004-get_syscall_entry-remove-SYSCALL_OFFSET.patch b/package/trinity/0004-get_syscall_entry-remove-SYSCALL_OFFSET.patch
new file mode 100644
index 0000000..4c58d62
--- /dev/null
+++ b/package/trinity/0004-get_syscall_entry-remove-SYSCALL_OFFSET.patch
@@ -0,0 +1,44 @@
+From 1d9af9d07ae111c253c92112fb50000adac47a0c Mon Sep 17 00:00:00 2001
+From: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+Date: Thu, 29 Jun 2017 12:24:10 +0200
+Subject: [PATCH] get_syscall_entry: remove SYSCALL_OFFSET
+
+0-based syscall numbers are used throughout the application and the
+SYSCALL_OFFSET is only added when invoking the syscall. It is therefore
+wrong to substract the offset in get_syscall_entry, as it leads to
+dereferencing array entries at negative offsets and segfaults.
+
+Tested on MIPS32/LE.
+This change effectively reverts cc5108ff ('make get_syscall_entry take
+SYSCALL_OFFSET into account')
+
+Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
+[Upstream commit: https://github.com/kernelslacker/trinity/commit/1d9af9d07ae111c253c92112fb50000adac47a0c]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ tables.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/tables.c b/tables.c
+index e7dab85d..8090146a 100644
+--- a/tables.c
++++ b/tables.c
+@@ -673,15 +673,14 @@ int munge_tables(void)
+  */
+ struct syscallentry * get_syscall_entry(unsigned int callno, bool do32)
+ {
+-	unsigned int offset = callno - SYSCALL_OFFSET;
+ 	if (biarch == FALSE)
+-		return syscalls[offset].entry;
++		return syscalls[callno].entry;
+ 
+ 	/* biarch case */
+ 	if (do32 == TRUE)
+-		return syscalls_32bit[offset].entry;
++		return syscalls_32bit[callno].entry;
+ 	else
+-		return syscalls_64bit[offset].entry;
++		return syscalls_64bit[callno].entry;
+ }
+ 
+ /*
diff --git a/package/trinity/0001-configure-fix-cross-compile-detection-of-broken-ipv6.patch b/package/trinity/0005-configure-fix-cross-compile-detection-of-broken-ipv6.patch
similarity index 100%
rename from package/trinity/0001-configure-fix-cross-compile-detection-of-broken-ipv6.patch
rename to package/trinity/0005-configure-fix-cross-compile-detection-of-broken-ipv6.patch
diff --git a/package/trinity/trinity.hash b/package/trinity/trinity.hash
index b896158..7f48cfa 100644
--- a/package/trinity/trinity.hash
+++ b/package/trinity/trinity.hash
@@ -1,6 +1,2 @@
 # Locally calculated
 sha256 4cb2bd4049ce523fdf47490c4c18b8eb713c720d4b3b13d6ec2ae246aac908ad  trinity-1.7.tar.xz
-sha256 5601474b10973b99f6f4ecc67c8ac54000754d7110553cc81c7648bd7e73c810  b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d.patch
-sha256 1974e473113b4e79fb2ff820e2b03f475a538e43343c24ca077a04214b9e0418  f447db18b389050ecc5e66dbf549d5953633e23e.patch
-sha256 9f9846a9c257b7df7e944c8b3ea956a8e8166bba67b3ea6c231382f095753312  87427256640f806710dd97fc807a9a896147c617.patch
-sha256 e6e47e813424f6b92b5a2e8f56bbd3bae63db47b76ece81a934a9390e194cbfc  1d9af9d07ae111c253c92112fb50000adac47a0c.patch
diff --git a/package/trinity/trinity.mk b/package/trinity/trinity.mk
index 7396570..1bada39 100644
--- a/package/trinity/trinity.mk
+++ b/package/trinity/trinity.mk
@@ -10,11 +10,6 @@ TRINITY_SOURCE = trinity-$(TRINITY_VERSION).tar.xz
 TRINITY_LICENSE = GPL-2.0
 TRINITY_LICENSE_FILES = COPYING
 
-TRINITY_PATCH = https://github.com/kernelslacker/trinity/commit/b0e66a2d084ffc210bc1fc247efb4d177e9f7e3d.patch \
-		https://github.com/kernelslacker/trinity/commit/f447db18b389050ecc5e66dbf549d5953633e23e.patch \
-		https://github.com/kernelslacker/trinity/commit/87427256640f806710dd97fc807a9a896147c617.patch \
-		https://github.com/kernelslacker/trinity/commit/1d9af9d07ae111c253c92112fb50000adac47a0c.patch
-
 ifeq ($(BR2_PACKAGE_BTRFS_PROGS),y)
 TRINITY_DEPENDENCIES += btrfs-progs
 endif
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 20/20] wavpack: don't download patch from Github
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (18 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 19/20] trinity: don't download patches " Thomas Petazzoni
@ 2017-07-02 16:53 ` Thomas Petazzoni
  2017-07-02 22:06 ` [Buildroot] [PATCH 00/20] Do not download auto-generated patches Peter Korsgaard
  20 siblings, 0 replies; 22+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 16:53 UTC (permalink / raw)
  To: buildroot

Patches downloaded from Github are not stable, so bring them in the
tree.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...-19-new-dependency-on-wchar-t-by-removing.patch | 70 ++++++++++++++++++++++
 package/wavpack/wavpack.hash                       |  1 -
 package/wavpack/wavpack.mk                         |  3 -
 3 files changed, 70 insertions(+), 4 deletions(-)
 create mode 100644 package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch

diff --git a/package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch b/package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch
new file mode 100644
index 0000000..e5faf91
--- /dev/null
+++ b/package/wavpack/0001-fix-Github-issue-19-new-dependency-on-wchar-t-by-removing.patch
@@ -0,0 +1,70 @@
+From 876fc3f3907e871d0938ac6c8c5252f5f31abd1f Mon Sep 17 00:00:00 2001
+From: David Bryant <david@wavpack.com>
+Date: Thu, 16 Feb 2017 17:11:12 -0800
+Subject: [PATCH] fix GitHub issue #19 (new dependency on wchar_t) by removing
+ dependency
+
+[Upstream commit: https://github.com/dbry/WavPack/commit/876fc3f3907e871d0938ac6c8c5252f5f31abd1f]
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ cli/import_id3.c | 10 +++++-----
+ cli/wvtag.c      |  2 ++
+ 2 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/cli/import_id3.c b/cli/import_id3.c
+index 51e54ee..fc30aeb 100644
+--- a/cli/import_id3.c
++++ b/cli/import_id3.c
+@@ -34,7 +34,7 @@ static struct {
+ 
+ #define NUM_TEXT_TAG_ITEMS (sizeof (text_tag_table) / sizeof (text_tag_table [0]))
+ 
+-static int WideCharToUTF8 (const wchar_t *Wide, unsigned char *pUTF8, int len);
++static int WideCharToUTF8 (const uint16_t *Wide, unsigned char *pUTF8, int len);
+ static void Latin1ToUTF8 (void *string, int len);
+ 
+ // Import specified ID3v2.3 tag. The WavPack context accepts the tag items, and can be
+@@ -163,7 +163,7 @@ int ImportID3v2 (WavpackContext *wpc, unsigned char *tag_data, int tag_size, cha
+             }
+             else if (frame_body [0] == 1 && frame_size > 2 && frame_body [1] == 0xFF && frame_body [2] == 0xFE) {
+                 int nchars = (frame_size - 3) / 2;
+-                wchar_t *wide_string = malloc ((nchars + 1) * sizeof (wchar_t));
++                uint16_t *wide_string = malloc ((nchars + 1) * sizeof (uint16_t));
+                 unsigned char *fp = frame_body + 3;
+ 
+                 utf8_string = malloc ((nchars + 1) * 3);
+@@ -297,9 +297,9 @@ int ImportID3v2 (WavpackContext *wpc, unsigned char *tag_data, int tag_size, cha
+ // may be less than the number of characters in the wide string if the buffer
+ // length is exceeded.
+ 
+-static int WideCharToUTF8 (const wchar_t *Wide, unsigned char *pUTF8, int len)
++static int WideCharToUTF8 (const uint16_t *Wide, unsigned char *pUTF8, int len)
+ {
+-    const wchar_t *pWide = Wide;
++    const uint16_t *pWide = Wide;
+     int outndx = 0;
+ 
+     while (*pWide) {
+@@ -335,7 +335,7 @@ static int WideCharToUTF8 (const wchar_t *Wide, unsigned char *pUTF8, int len)
+ static void Latin1ToUTF8 (void *string, int len)
+ {
+     int max_chars = (int) strlen (string);
+-    wchar_t *temp = (wchar_t *) malloc ((max_chars + 1) * 2);
++    uint16_t *temp = (uint16_t *) malloc ((max_chars + 1) * sizeof (uint16_t));
+ 
+     MultiByteToWideChar (28591, 0, string, -1, temp, max_chars + 1);
+     WideCharToUTF8 (temp, (unsigned char *) string, len);
+diff --git a/cli/wvtag.c b/cli/wvtag.c
+index 6e6512a..45e621e 100644
+--- a/cli/wvtag.c
++++ b/cli/wvtag.c
+@@ -1344,7 +1344,9 @@ static void dump_UTF8_string (char *string, FILE *dst)
+ // resulting string will not fit in the specified buffer size then it is
+ // truncated.
+ 
++#if defined (_WIN32)
+ static int UTF8ToWideChar (const unsigned char *pUTF8, wchar_t *pWide);
++#endif
+ 
+ static void UTF8ToAnsi (char *string, int len)
+ {
diff --git a/package/wavpack/wavpack.hash b/package/wavpack/wavpack.hash
index 16ff08c..56ba7d8 100644
--- a/package/wavpack/wavpack.hash
+++ b/package/wavpack/wavpack.hash
@@ -1,3 +1,2 @@
 # locally computed hash
 sha256  1939627d5358d1da62bc6158d63f7ed12905552f3a799c799ee90296a7612944  wavpack-5.1.0.tar.bz2
-sha256  3890ab081dc6f8ee02161ace180381327031cc24cc6c3d71668367b7e5f6e4be  876fc3f3907e871d0938ac6c8c5252f5f31abd1f.patch
diff --git a/package/wavpack/wavpack.mk b/package/wavpack/wavpack.mk
index 485213a..c23b127 100644
--- a/package/wavpack/wavpack.mk
+++ b/package/wavpack/wavpack.mk
@@ -12,9 +12,6 @@ WAVPACK_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),,libiconv)
 WAVPACK_LICENSE = BSD-3-Clause
 WAVPACK_LICENSE_FILES = COPYING
 
-# Fetch patch from upstream to remove wchar dependency
-WAVPACK_PATCH = https://github.com/dbry/WavPack/commit/876fc3f3907e871d0938ac6c8c5252f5f31abd1f.patch
-
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 WAVPACK_CONF_OPTS += LIBS=-liconv
 endif
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Buildroot] [PATCH 00/20] Do not download auto-generated patches
  2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
                   ` (19 preceding siblings ...)
  2017-07-02 16:53 ` [Buildroot] [PATCH 20/20] wavpack: don't download patch " Thomas Petazzoni
@ 2017-07-02 22:06 ` Peter Korsgaard
  20 siblings, 0 replies; 22+ messages in thread
From: Peter Korsgaard @ 2017-07-02 22:06 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > Patch https://patchwork.ozlabs.org/patch/782927/ sent by Julien
 > Boibessot made us realize that auto-generated patches such as the ones
 > provided by Github are not guaranteed to be stable over time. Indeed,
 > the "index" line of the patches contains short git hashes, and when
 > new commits are made to the Git repository, additional commits are
 > made, which can have short hashes conflicting with older ones, in
 > which case git increase the length of the "short hashes" to avoid the
 > conflict. This means the patch contents change, therefore its sha256
 > hash changes, and it breaks the download in Buildroot.

 > Since there is no solution to this problem, we simply decided that
 > auto-generated patches should not be downloaded by Buildroot using
 > <pkg>_PATCH, and should instead be stored in the tree.

 > This series:

 >  1. Updates the documentation about the hash file.

 >  2. Changes all packages that download Github.com patches. All
 >     packages that have a non-empty <pkg>_PATCH variable have been
 >     inspected, and only the ones downloading patches from Github are
 >     problematic.

Committed series, thanks.

 >   scrub: don't download patch from Github

Notice: Something (patchwork?) wrapped the very long line in this patch, so I
had to fix it up manually.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2017-07-02 22:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-02 16:53 [Buildroot] [PATCH 00/20] Do not download auto-generated patches Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 01/20] docs/manual: update details about hashes Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 02/20] efibootmgr: don't download patch from Github Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 03/20] jack2: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 04/20] libstrophe: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 05/20] lxc: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 06/20] mediastreamer: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 07/20] numactl: don't download patches " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 08/20] openal: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 09/20] openssh: don't download patch " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 10/20] openzwave: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 11/20] poco: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 12/20] qt: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 13/20] rpm: don't download patches " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 14/20] scrub: don't download patch " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 15/20] sngrep: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 16/20] softether: " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 17/20] systemd: don't download patches " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 18/20] tinycbor: on't download patch " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 19/20] trinity: don't download patches " Thomas Petazzoni
2017-07-02 16:53 ` [Buildroot] [PATCH 20/20] wavpack: don't download patch " Thomas Petazzoni
2017-07-02 22:06 ` [Buildroot] [PATCH 00/20] Do not download auto-generated patches Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.