[ptxdist] [PATCH 3/3] mosh: add upstream patch to fix build error
With recent protobuf versions, a c++11 build error occurs. This adds the upstream patch to fix it. Signed-off-by: Clemens Gruber --- ...-protobuf-version-3.6.0-is-installed.patch | 983 ++ patches/mosh-1.3.2/autogen.sh | 1 + patches/mosh-1.3.2/series | 4 + 3 files changed, 988 insertions(+) create mode 100644 patches/mosh-1.3.2/0001-Require-C-11-if-protobuf-version-3.6.0-is-installed.patch create mode 12 patches/mosh-1.3.2/autogen.sh create mode 100644 patches/mosh-1.3.2/series diff --git a/patches/mosh-1.3.2/0001-Require-C-11-if-protobuf-version-3.6.0-is-installed.patch b/patches/mosh-1.3.2/0001-Require-C-11-if-protobuf-version-3.6.0-is-installed.patch new file mode 100644 index 0..e33cbfb4c --- /dev/null +++ b/patches/mosh-1.3.2/0001-Require-C-11-if-protobuf-version-3.6.0-is-installed.patch @@ -0,0 +1,983 @@ +From: John Hood +Date: Mon, 23 Jul 2018 01:37:26 -0400 +Subject: [PATCH] Require C++11 if protobuf version >= 3.6.0 is installed + +This shouldn't require C++11 when not required. + +This hack may not always detect when C++11 *is* required, +in which case a little autoconf tweaking may be needed +to get a good compile. +--- + configure.ac| 3 + + m4/ax_cxx_compile_stdcxx.m4 | 948 + 2 files changed, 951 insertions(+) + create mode 100644 m4/ax_cxx_compile_stdcxx.m4 + +diff --git a/configure.ac b/configure.ac +index 3ad983d2eefe..52a1ad4c371b 100644 +--- a/configure.ac b/configure.ac +@@ -20,6 +20,9 @@ AS_IF([test x"$PROTOC" = x], + # automake 1.12 seems to require this, but automake 1.11 doesn't recognize it + m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) + ++AS_IF([pkg-config --atleast-version 3.6.0 protobuf], ++ [AX_CXX_COMPILE_STDCXX([11], [noext])]) ++ + WARNING_CXXFLAGS="" + PICKY_CXXFLAGS="" + DISTCHECK_CXXFLAGS="" +diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 +new file mode 100644 +index ..9e9eaedaaad3 +--- /dev/null b/m4/ax_cxx_compile_stdcxx.m4 +@@ -0,0 +1,948 @@ ++# === ++# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html ++# === ++# ++# SYNOPSIS ++# ++# AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) ++# ++# DESCRIPTION ++# ++# Check for baseline language coverage in the compiler for the specified ++# version of the C++ standard. If necessary, add switches to CXX and ++# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) ++# or '14' (for the C++14 standard). ++# ++# The second argument, if specified, indicates whether you insist on an ++# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. ++# -std=c++11). If neither is specified, you get whatever works, with ++# preference for an extended mode. ++# ++# The third argument, if specified 'mandatory' or if left unspecified, ++# indicates that baseline support for the specified C++ standard is ++# required and that the macro should error out if no mode with that ++# support is found. If specified 'optional', then configuration proceeds ++# regardless, after defining HAVE_CXX${VERSION} if and only if a ++# supporting mode is found. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Benjamin Kosnik ++# Copyright (c) 2012 Zack Weinberg ++# Copyright (c) 2013 Roy Stogner ++# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov ++# Copyright (c) 2015 Paul Norman ++# Copyright (c) 2015 Moritz Klammler ++# Copyright (c) 2016, 2018 Krzesimir Nowak ++# ++# 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 10 ++ ++dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro ++dnl (serial version number 13). ++ ++AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl ++ m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], ++[$1], [14], [ax_cxx_compile_alternatives="14 1y"], ++[$1], [17], [ax_cxx_compile_alternatives="17 1z"], ++[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl ++ m4_if([$2], [], [], ++[$2], [ext], [], ++[$2], [noext], [], ++[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl ++ m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], ++[$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], ++[$3], [optional], [ax_cxx_compile_cxx$1_required=false], ++[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) ++ AC_LANG_PUSH([C++])dnl ++ ac_success=no ++ ++ m4_if([$2], [noext], [], [dnl ++ if test x$ac_success = xno; then ++for
[ptxdist] [PATCH 2/3] grpc: version bump 1.18.0 -> 1.21.0
One of the two patches is no longer necessary. Signed-off-by: Clemens Gruber --- ...llow-passing-a-pre-existing-grpc_cpp.patch | 48 --- patches/grpc-1.18.0/series| 6 --- .../0001-Add-pkg-config-files.patch} | 0 patches/grpc-1.21.0/series| 5 ++ rules/grpc.make | 7 +-- rules/host-grpc.make | 2 + 6 files changed, 11 insertions(+), 57 deletions(-) delete mode 100644 patches/grpc-1.18.0/0001-CMakeLists.txt-allow-passing-a-pre-existing-grpc_cpp.patch delete mode 100644 patches/grpc-1.18.0/series rename patches/{grpc-1.18.0/0002-Add-pkg-config-files.patch => grpc-1.21.0/0001-Add-pkg-config-files.patch} (100%) create mode 100644 patches/grpc-1.21.0/series diff --git a/patches/grpc-1.18.0/0001-CMakeLists.txt-allow-passing-a-pre-existing-grpc_cpp.patch b/patches/grpc-1.18.0/0001-CMakeLists.txt-allow-passing-a-pre-existing-grpc_cpp.patch deleted file mode 100644 index 82658fd27..0 --- a/patches/grpc-1.18.0/0001-CMakeLists.txt-allow-passing-a-pre-existing-grpc_cpp.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Robert Rose -Date: Wed, 28 Nov 2018 09:41:52 -0800 -Subject: [PATCH] CMakeLists.txt: allow passing a pre-existing grpc_cpp_plugin - -The grpc_cpp_plugin is meant to be executed during the build process -of grpc. As such, in cross-compilation contexts, this program needs to -be built for the host machine and not the target machine. In order to -allow this, this commit adds an option gRPC_NATIVE_CPP_PLUGIN that can -be passed on the command line, with the path to an existing -grpc_cpp_plugin binary. If not passed, grpc_cpp_plugin is built as -usual. - -Signed-off-by: Robert Rose - CMakeLists.txt | 13 + - 1 file changed, 13 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b39e6f8e8852..9d9be187bda7 100644 a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -13228,6 +13228,18 @@ target_link_libraries(grpc_cli - endif (gRPC_BUILD_TESTS) - if (gRPC_BUILD_CODEGEN) - -+if (gRPC_NATIVE_CPP_PLUGIN) -+ -+add_executable(grpc_cpp_plugin -+ IMPORTED -+) -+ -+set_property(TARGET grpc_cpp_plugin -+ PROPERTY IMPORTED_LOCATION ${gRPC_NATIVE_CPP_PLUGIN} -+) -+ -+else() -+ - add_executable(grpc_cpp_plugin - src/compiler/cpp_plugin.cc - ) -@@ -13263,6 +13275,7 @@ if (gRPC_INSTALL) - ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} - ) - endif() -+endif() - - endif (gRPC_BUILD_CODEGEN) - if (gRPC_BUILD_CODEGEN) diff --git a/patches/grpc-1.18.0/series b/patches/grpc-1.18.0/series deleted file mode 100644 index fa19512af..0 --- a/patches/grpc-1.18.0/series +++ /dev/null @@ -1,6 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-CMakeLists.txt-allow-passing-a-pre-existing-grpc_cpp.patch -0002-Add-pkg-config-files.patch -#tag:upstream --start-number 100 -# 61bf82594774e0a1ed5c10c258776dcf - git-ptx-patches magic diff --git a/patches/grpc-1.18.0/0002-Add-pkg-config-files.patch b/patches/grpc-1.21.0/0001-Add-pkg-config-files.patch similarity index 100% rename from patches/grpc-1.18.0/0002-Add-pkg-config-files.patch rename to patches/grpc-1.21.0/0001-Add-pkg-config-files.patch diff --git a/patches/grpc-1.21.0/series b/patches/grpc-1.21.0/series new file mode 100644 index 0..f855d43a1 --- /dev/null +++ b/patches/grpc-1.21.0/series @@ -0,0 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-Add-pkg-config-files.patch +#tag:upstream --start-number 100 +# bb88160543076859dd8fb26f54d571b1 - git-ptx-patches magic diff --git a/rules/grpc.make b/rules/grpc.make index 18aaff0cd..0f662b582 100644 --- a/rules/grpc.make +++ b/rules/grpc.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_GRPC) += grpc # # Paths and names # -GRPC_VERSION := 1.18.0 -GRPC_MD5 := 520c545189fad05966c147c42e8280cc +GRPC_VERSION := 1.21.0 +GRPC_MD5 := 9203f75a9a118684d2dd23500eabd2dd GRPC := grpc-$(GRPC_VERSION) GRPC_SUFFIX:= tar.gz GRPC_URL := https://github.com/grpc/grpc/archive/v$(GRPC_VERSION).$(GRPC_SUFFIX) @@ -39,14 +39,15 @@ GRPC_CONF_OPT := \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_CXX_FLAGS='-Wno-error=ignored-qualifiers' \ -DgRPC_BACKWARDS_COMPATIBILITY_MODE=OFF \ + -DgRPC_BENCHMARK_PROVIDER=none \ -DgRPC_BUILD_CSHARP_EXT=OFF \ -DgRPC_BUILD_TESTS=OFF \ -D_gRPC_CARES_LIBRARIES=cares \ -DgRPC_CARES_PROVIDER=none \ + -DgRPC_GFLAGS_PROVIDER=none \ -DgRPC_PROTOBUF_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ - -DgRPC_NATIVE_CPP_PLUGIN=$(PTXDIST_SYSROOT_HOST)/bin/grpc_cpp_plugin \ -DPROTOBUF_PROTOC_EXECUTABLE=$(PTXDIST_SYSROOT_HOST)/bin/protoc # diff --git a/rules/host-grpc.make b/rules/host-grpc.make index 7d7ad9f69..5efa354f6 100644 --- a/rules/host-grpc.make +++
[ptxdist] [PATCH 1/3] protobuf: version bump 3.6.1 -> 3.7.1
The patch is no longer necessary. Signed-off-by: Clemens Gruber --- ...batomic-when-necessary-eg.-on-armv6l.patch | 58 --- patches/protobuf-all-3.6.1/autogen.sh | 1 - patches/protobuf-all-3.6.1/series | 4 -- rules/protobuf.make | 4 +- 4 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 patches/protobuf-all-3.6.1/0001-Link-to-libatomic-when-necessary-eg.-on-armv6l.patch delete mode 12 patches/protobuf-all-3.6.1/autogen.sh delete mode 100644 patches/protobuf-all-3.6.1/series diff --git a/patches/protobuf-all-3.6.1/0001-Link-to-libatomic-when-necessary-eg.-on-armv6l.patch b/patches/protobuf-all-3.6.1/0001-Link-to-libatomic-when-necessary-eg.-on-armv6l.patch deleted file mode 100644 index 4ac4a9a56..0 --- a/patches/protobuf-all-3.6.1/0001-Link-to-libatomic-when-necessary-eg.-on-armv6l.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Ben Wolsieffer -Date: Thu, 4 Oct 2018 20:25:10 -0400 -Subject: [PATCH] Link to libatomic when necessary (eg. on armv6l) - - configure.ac| 16 - src/Makefile.am | 4 ++-- - 2 files changed, 18 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 7d6682764950..56bbef6009af 100644 a/configure.ac -+++ b/configure.ac -@@ -165,6 +165,22 @@ AS_IF([test "$with_zlib" != no], [ - ]) - AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1]) - -+dnl On some platforms, std::atomic needs a helper library -+AC_MSG_CHECKING(whether -latomic is needed) -+AC_LINK_IFELSE([AC_LANG_SOURCE([[ -+ #include -+ #include -+ std::atomic v; -+ int main() { -+return v; -+ } -+]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes) -+AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC) -+if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then -+ LIBATOMIC_LIBS="-latomic" -+fi -+AC_SUBST([LIBATOMIC_LIBS]) -+ - AS_IF([test "$with_protoc" != "no"], [ - PROTOC=$with_protoc - AS_IF([test "$with_protoc" = "yes"], [ -diff --git a/src/Makefile.am b/src/Makefile.am -index 4bb77452f203..0a59b3147be8 100644 a/src/Makefile.am -+++ b/src/Makefile.am -@@ -163,7 +163,7 @@ nobase_include_HEADERS = \ - - lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la - --libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) -+libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) - libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined - if HAVE_LD_VERSION_SCRIPT - libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map -@@ -209,7 +209,7 @@ libprotobuf_lite_la_SOURCES = \ - google/protobuf/io/zero_copy_stream.cc \ - google/protobuf/io/zero_copy_stream_impl_lite.cc - --libprotobuf_la_LIBADD = $(PTHREAD_LIBS) -+libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) - libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined - if HAVE_LD_VERSION_SCRIPT - libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map diff --git a/patches/protobuf-all-3.6.1/autogen.sh b/patches/protobuf-all-3.6.1/autogen.sh deleted file mode 12 index 9f8a4cb7d..0 --- a/patches/protobuf-all-3.6.1/autogen.sh +++ /dev/null @@ -1 +0,0 @@ -../autogen.sh \ No newline at end of file diff --git a/patches/protobuf-all-3.6.1/series b/patches/protobuf-all-3.6.1/series deleted file mode 100644 index b238a9cca..0 --- a/patches/protobuf-all-3.6.1/series +++ /dev/null @@ -1,4 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-Link-to-libatomic-when-necessary-eg.-on-armv6l.patch -# 9e36f76040f8c202ae5b588b48401b69 - git-ptx-patches magic diff --git a/rules/protobuf.make b/rules/protobuf.make index eae8aa1af..dd7b42386 100644 --- a/rules/protobuf.make +++ b/rules/protobuf.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_PROTOBUF) += protobuf # # Paths and names # -PROTOBUF_VERSION := 3.6.1 -PROTOBUF_MD5 := d4c50a611ac6486c6433eb53e3f60d1f +PROTOBUF_VERSION := 3.7.1 +PROTOBUF_MD5 := cda6ae370a5df941f8aa837c8a0292ba PROTOBUF := protobuf-all-$(PROTOBUF_VERSION) PROTOBUF_SUFFIX:= tar.gz PROTOBUF_URL := https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)/$(PROTOBUF).$(PROTOBUF_SUFFIX) -- 2.21.0 ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] setting default root password
Thank you. On Thu, May 23, 2019 at 12:28 AM Juergen Borleis wrote: > Hi Ramesh, > > On Thursday 23 May 2019 09:01:38 Ramesh Rayanki wrote: > >How to set the default root password as non empty while building bsp > > using ptxdist ? Currently, it uses empty password. > > Provide a ready-to-use "shadow" file in "projectroot/etc/shadow" which > contains the encrypted password. You can start with a copy of the PTXdist > variant and add the password manually to it. > > Regards, > Jürgen > > -- > Pengutronix e.K. | Juergen Borleis > | > Industrial Linux Solutions | http://www.pengutronix.de/ > | > ___ ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] setting default root password
Hi Ramesh, On Thursday 23 May 2019 09:01:38 Ramesh Rayanki wrote: >How to set the default root password as non empty while building bsp > using ptxdist ? Currently, it uses empty password. Provide a ready-to-use "shadow" file in "projectroot/etc/shadow" which contains the encrypted password. You can start with a copy of the PTXdist variant and add the password manually to it. Regards, Jürgen -- Pengutronix e.K. | Juergen Borleis | Industrial Linux Solutions | http://www.pengutronix.de/ | ___ ptxdist mailing list ptxdist@pengutronix.de
[ptxdist] setting default root password
Hi How to set the default root password as non empty while building bsp using ptxdist ? Currently, it uses empty password. Thanks Ramesh ___ ptxdist mailing list ptxdist@pengutronix.de