Skip to contentSkip to conversation

protobuf, python-protobuf: bump to v3.5.1

PATCH New charles.hardin at storagecraft.com 3 participants 12 messages May 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 protobuf, python-protobuf: bump to v3.5.1

From: Charles Hardin <[email protected]>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

---
 package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
 package/protobuf/protobuf.hash                     |  2 +-
 package/protobuf/protobuf.mk                       |  6 +++---
 3 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch
package/protobuf/0001-convert-mipsel-to-mips.patch new file +12 -0
new file mode 100644
index 0000000000..005d818d9d
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h	2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h	2018-05-21 03:46:58.580000399 +0000
+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
package/protobuf/protobuf.hash +1 -1
index fa02440a40..d86f9758f3 100644
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
+sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
package/protobuf/protobuf.mk +3 -3
index d2782ddcfd..6120d6030d 100644
@@ -7,11 +7,11 @@
 # When bumping this package, make sure to also verify if the
 # python-protobuf package still works, as they share the same
 # version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))
 PROTOBUF_LICENSE = BSD-3-Clause
 PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES
 
 # N.B. Need to use host protoc during cross compilation.
 PROTOBUF_DEPENDENCIES = host-protobuf
Signature · 1 line
2.15.1 (Apple Git-101)
#1 lore raw

PATCH 2/4 package/c-ares: enable the host variant for a c-ares install

From: Charles Hardin <[email protected]>

gRPC needs a c-ares library for the plugins to compile against, and it isn't something that can be easily patched out. So, allow c-ares to be compiled as a host tool.

---
 package/c-ares/c-ares.mk | 1 +
 1 file changed, 1 insertion(+)
package/c-ares/c-ares.mk +1 -0
index 67254244a1..76e9687b37 100644
@@ -15,3 +15,4 @@ C_ARES_LICENSE = MIT
 C_ARES_LICENSE_FILES = ares_mkquery.c
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.15.1 (Apple Git-101)
#2 lore raw

PATCH 3/4 grpc: new package

In reply to charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

add the gRPC package from Google's github repo. This is currently just installing the C and C++ libraries on the target installation for now. Some effort could be made to add the python bindings as a subsequent patch.

This also adds a patch to specify the protoc to use since that is provided by buildroot and not the host in addition to overriding the ldconfig command since that doesn't apply to the buildroot compile.

NOTE: Consider this a reference port for anyone that is looking to get grpc into buildroot.

---
 package/Config.in                                  |  1 +
 .../grpc/0001-use-defined-env-in-makefile.patch    | 51 ++++++++++++
 package/grpc/Config.in                             | 19 +++++
 package/grpc/grpc.hash                             |  2 +
 package/grpc/grpc.mk                               | 90 ++++++++++++++++++++++
 5 files changed, 163 insertions(+)
 create mode 100644 package/grpc/0001-use-defined-env-in-makefile.patch
 create mode 100644 package/grpc/Config.in
 create mode 100644 package/grpc/grpc.hash
 create mode 100644 package/grpc/grpc.mk
package/Config.in +1 -0
index ecee4938c9..f4b9a7d7cd 100644
@@ -1506,6 +1506,7 @@ menu "Other"
 	source "package/glibmm/Config.in"
 	source "package/glm/Config.in"
 	source "package/gmp/Config.in"
+	source "package/grpc/Config.in"
 	source "package/gsl/Config.in"
 	source "package/gtest/Config.in"
 	source "package/jemalloc/Config.in"
package/grpc/0001-use-defined-env-in-makefile.patch new file +51 -0

51 lines not on this page · raw message

package/grpc/Config.in new file +19 -0
new file mode 100644
index 0000000000..feb7fb2de7
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_GRPC
+	bool "grpc"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_GFLAGS
+	select BR2_PACKAGE_GTEST
+	select BR2_PACKAGE_GTEST_GMOCK
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	help
+	  gRPC is Google's protocol buffer based implementation of a
+	  remote procedure call protocol.
+
+	  http://www.grpc.io
+
+comment "grpc needs a toolchain w/ C++, threads"
+	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
package/grpc/grpc.hash new file +2 -0
new file mode 100644
index 0000000000..9f8e6869a5
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 0068a0b11795ac89ba8f5cc7332cd8cd2870a2ee0016126f014ce0bc3004e590  grpc-v1.11.1.tar.gz
package/grpc/grpc.mk new file +90 -0

90 lines not on this page · raw message

Signature · 1 line
2.15.1 (Apple Git-101)
#3 lore raw

PATCH 3/4 grpc: new package

Hello,

Quoted 7 lines · charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

add the gRPC package from Google's github repo. This is currently just installing the C and C++ libraries on the target installation for now. Some effort could be made to add the python bindings as a subsequent patch.

Quoted 7 lines

This also adds a patch to specify the protoc to use since that is provided by buildroot and not the host in addition to overriding the ldconfig command since that doesn't apply to the buildroot compile.

NOTE: Consider this a reference port for anyone that is looking to get grpc into buildroot.

I'm not sure what this paragraph means. Does it mean you don't consider this patch to be appropriate for merging into Buildroot, and it's just provided to help others who might have the same need ?

package/grpc/0001-use-defined-env-in-makefile.patch

Quoted 5 lines
package/grpc/0001-use-defined-env-in-makefile.patch new file +0 -0
new file mode 100644
index 0000000000..9f5998404c

Please use "git format-patch" to generate this patch, and add a proper description and Signed-off-by.

Quoted 7 lines
package/grpc/Config.in new file +1 -0
new file mode 100644
index 0000000000..feb7fb2de7
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_GRPC

package/grpc/Config.in line 11

Quoted 10 lines
package/grpc/Config.in new file +10 -0
+	bool "grpc"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_GFLAGS
+	select BR2_PACKAGE_GTEST
+	select BR2_PACKAGE_GTEST_GMOCK
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB

Nit: alphabetic ordering of selects would be nice.

Quoted 10 lines
package/grpc/grpc.mk new file +4 -0
new file mode 100644
index 0000000000..9febf8ffa3
@@ -0,0 +1,90 @@
+################################################################################
+#
+# grpc
+#

package/grpc/grpc.mk line 14

Quoted 10 lines
package/grpc/grpc.mk new file +10 -0
+################################################################################
+
+GRPC_VERSION = v1.11.1
+GRPC_SITE = $(call github,grpc,grpc,$(GRPC_VERSION))
+GRPC_LICENSE = BSD-3-Clause
+GRPC_LICENSE_FILES = LICENSE
+
+# Need a host c-ares for plugins and host-protobuf during
+# the compilation
+GRPC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl

You need all of those host dependencies to build the target grpc ?

package/grpc/grpc.mk line 15

Quoted 1 line
package/grpc/grpc.mk new file +1 -0
+GRPC_DEPENDENCIES += gflags gtest c-ares openssl protobuf zlib

You can use a single assignment instead:

GPRC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl \
gflags gtest c-ares openssl protobuf zlib

package/grpc/grpc.mk line 24

Quoted 5 lines
package/grpc/grpc.mk new file +5 -0
+GRPC_CROSS_MAKE_OPTS_BASE = \
+	GRPC_CROSS_COMPILE="true" \
+	LDCONFIG=/bin/true \
+	HOST_CC="$(HOSTCC_NOCCACHE)" \
+	HOST_CXX="$(HOSTCXX_NOCCACHE)" \

Why are you using the _NOCCACHE variant here ?

package/grpc/grpc.mk line 26

Quoted 2 lines
package/grpc/grpc.mk new file +2 -0
+	HOST_LD="$(HOSTCC)" \
+	HOST_LDXX="$(HOSTCXX)" \

And not here ?

package/grpc/grpc.mk line 52

Quoted 3 lines
package/grpc/grpc.mk new file +3 -0
+define GRPC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_MAKE_OPTS) -C $(@D) \
+		static shared plugins

You're unconditionally building some shared libraries it seems, this most likely won't work in BR2_STATIC_LIBS configurations. Can you try to make sure that your package builds fine with ./utils/test-pkg ?

package/grpc/grpc.mk line 76

Quoted 12 lines
package/grpc/grpc.mk new file +12 -0
+HOST_GRPC_MAKE_OPTS = \
+	CC="$(HOSTCC)" \
+	CXX="$(HOSTCXX)" \
+	LD="$(HOSTCC)" \
+	LDXX="$(HOSTCXX)" \
+	CPPLAGS="$(HOST_CPPFLAGS)" \
+	CFLAGS="$(HOST_CFLAGS)" \
+	CXXLAGS="$(HOST_CXXFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	STRIP=/bin/true \
+	PROTOC="$(HOST_DIR)/usr/bin/protoc" \
+	prefix="$(HOST_DIR)/usr"

Prefix should be just $(HOST_DIR)

package/grpc/grpc.mk line 39

Quoted 2 lines
package/grpc/grpc.mk new file +2 -0
+
+

One too many empty line.

package/grpc/grpc.mk line 81

Quoted 3 lines
package/grpc/grpc.mk new file +3 -0
+define HOST_GRPC_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_GRPC_MAKE_OPTS) -C $(@D) \
+		static plugins

Why are you not installing the shared version here ? We generally prefer to use the shared version of libraries for host packages.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 3/4 grpc: new package

Ok.

Quoted 18 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

add the gRPC package from Google's github repo. This is currently just installing the C and C++ libraries on the target installation for now. Some effort could be made to add the python bindings as a subsequent patch.

This also adds a patch to specify the protoc to use since that is provided by buildroot and not the host in addition to overriding the ldconfig command since that doesn't apply to the buildroot compile.

Quoted 7 lines
Quoted 2 lines

NOTE: Consider this a reference port for anyone that is looking to get grpc into buildroot.

I'm not sure what this paragraph means. Does it mean you don't consider this patch to be appropriate for merging into Buildroot, and it's just provided to help others who might have the same need ?

There wasn?t an exisiting gRPC package that was up to date and this wasn?t a ?full? python, go, all the bindings - that?s what the reference was for to just get the C and C++, since that was all we needed for another application.

And since this wasn?t in buildroot - I make no assumption if it ?should? be in buildroot.

Quoted 9 lines

package/grpc/0001-use-defined-env-in-makefile.patch

Quoted 5 lines
package/grpc/0001-use-defined-env-in-makefile.patch new file +0 -0
new file mode 100644
index 0000000000..9f5998404c

Please use "git format-patch" to generate this patch, and add a proper description and Signed-off-by.

So, i normally have to patch off the tarball - I don?t patch from the upstream git repos. Which means I just do the old style ?orig dir? and ?new dir? with a diff -Naur. Do folks always checkout from github and do ?git patches? all the time now? Seems like alot of overhead.

Quoted 34 lines
Quoted 7 lines
package/grpc/Config.in new file +1 -0
new file mode 100644
index 0000000000..feb7fb2de7
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_GRPC

package/grpc/Config.in line 11

Quoted 10 lines
package/grpc/Config.in new file +10 -0
+	bool "grpc"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_GFLAGS
+	select BR2_PACKAGE_GTEST
+	select BR2_PACKAGE_GTEST_GMOCK
+	select BR2_PACKAGE_C_ARES
+	select BR2_PACKAGE_PROTOBUF
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB

Nit: alphabetic ordering of selects would be nice.

Quoted 14 lines
package/grpc/grpc.mk new file +8 -0
new file mode 100644
index 0000000000..9febf8ffa3
@@ -0,0 +1,90 @@
+################################################################################
+#
+# grpc
+#
+################################################################################
+
+GRPC_VERSION = v1.11.1
+GRPC_SITE = $(call github,grpc,grpc,$(GRPC_VERSION))
Quoted 9 lines

package/grpc/grpc.mk line 14

Quoted 6 lines
package/grpc/grpc.mk new file +6 -0
+GRPC_LICENSE = BSD-3-Clause
+GRPC_LICENSE_FILES = LICENSE
+
+# Need a host c-ares for plugins and host-protobuf during
+# the compilation
+GRPC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl

You need all of those host dependencies to build the target grpc ?

No, just the host-grpc, this list kind of got built during the debug cycle and compiles.

Quoted 7 lines

package/grpc/grpc.mk line 15

Quoted 1 line
package/grpc/grpc.mk new file +1 -0
+GRPC_DEPENDENCIES += gflags gtest c-ares openssl protobuf zlib

You can use a single assignment instead:

GPRC_DEPENDENCIES = host-grpc host-c-ares host-protobuf host-openssl \
gflags gtest c-ares openssl protobuf zlib

Quoted 8 lines

package/grpc/grpc.mk line 24

Quoted 5 lines
package/grpc/grpc.mk new file +5 -0
+GRPC_CROSS_MAKE_OPTS_BASE = \
+	GRPC_CROSS_COMPILE="true" \
+	LDCONFIG=/bin/true \
+	HOST_CC="$(HOSTCC_NOCCACHE)" \
+	HOST_CXX="$(HOSTCXX_NOCCACHE)" \

Why are you using the _NOCCACHE variant here ?

Just some debug - was shortening the command line to figure out some errors during the compile.

Quoted 5 lines

package/grpc/grpc.mk line 26

Quoted 2 lines
package/grpc/grpc.mk new file +2 -0
+	HOST_LD="$(HOSTCC)" \
+	HOST_LDXX="$(HOSTCXX)" \

And not here ?

Wasn?t debugging here.

Quoted 8 lines

package/grpc/grpc.mk line 52

Quoted 3 lines
package/grpc/grpc.mk new file +3 -0
+define GRPC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(GRPC_MAKE_OPTS) -C $(@D) \
+		static shared plugins

You're unconditionally building some shared libraries it seems, this most likely won't work in BR2_STATIC_LIBS configurations. Can you try to make sure that your package builds fine with ./utils/test-pkg ?

Yeah - not, sure the gRPC makefile does this.

Quoted 35 lines

package/grpc/grpc.mk line 76

Quoted 12 lines
package/grpc/grpc.mk new file +12 -0
+HOST_GRPC_MAKE_OPTS = \
+	CC="$(HOSTCC)" \
+	CXX="$(HOSTCXX)" \
+	LD="$(HOSTCC)" \
+	LDXX="$(HOSTCXX)" \
+	CPPLAGS="$(HOST_CPPFLAGS)" \
+	CFLAGS="$(HOST_CFLAGS)" \
+	CXXLAGS="$(HOST_CXXFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
+	STRIP=/bin/true \
+	PROTOC="$(HOST_DIR)/usr/bin/protoc" \
+	prefix="$(HOST_DIR)/usr"

Prefix should be just $(HOST_DIR)

package/grpc/grpc.mk line 39

Quoted 2 lines
package/grpc/grpc.mk new file +2 -0
+
+

One too many empty line.

package/grpc/grpc.mk line 81

Quoted 3 lines
package/grpc/grpc.mk new file +3 -0
+define HOST_GRPC_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_GRPC_MAKE_OPTS) -C $(@D) \
+		static plugins

Why are you not installing the shared version here ? We generally prefer to use the shared version of libraries for host packages.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 4/4 package/collectd: allow the grpc plugin to be configured

In reply to charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

Allow collectd to use the gRPC package since that package can now be compiled as part of buildroot. This plugin can be used to push collectd datasets over the network to other instances as needed.

---
 package/collectd/Config.in   | 6 ++++++
 package/collectd/collectd.mk | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)
package/collectd/Config.in +6 -0
index ccd3fbe13f..0848e3c343 100644
@@ -248,6 +248,12 @@ config BR2_PACKAGE_COLLECTD_GPS
 	  Reports the number of sattelites seen by and precision
 	  of a GPS receiver.
 
+config BR2_PACKAGE_COLLECTD_GRPC
+	bool "grpc"
+	select BR2_PACKAGE_GRPC
+	help
+	  Add support for the gRPC plugin for network communication
+
 config BR2_PACKAGE_COLLECTD_HUGEPAGES
 	bool "hugepages"
 	help
package/collectd/collectd.mk +3 -1
index 6c987b2e36..00efee4a18 100644
@@ -15,7 +15,7 @@ COLLECTD_LICENSE_FILES = COPYING
 # These require unmet dependencies, are fringe, pointless or deprecated
 COLLECTD_PLUGINS_DISABLE = \
 	amqp apple_sensors aquaero ascent barometer dbi dpdkstat email \
-	gmond grpc hddtemp intel_rdt ipmi java libvirt lpar lvm \
+	gmond hddtemp intel_rdt ipmi java libvirt lpar lvm \
 	madwifi mbmon mic multimeter netapp notify_desktop numa \
 	nut onewire oracle perl pf pinba powerdns python redis routeros \
 	rrdcached sigrok tape target_v5upgrade teamspeak2 ted \
@@ -73,6 +73,7 @@ COLLECTD_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
 	$(if $(BR2_PACKAGE_COLLECTD_GPS),--enable-gps,--disable-gps) \
 	$(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
+	$(if $(BR2_PACKAGE_COLLECTD_GRPC),--enable-grpc,--disable-grpc) \
 	$(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
 	$(if $(BR2_PACKAGE_COLLECTD_HUGEPAGES),--enable-hugepages,--disable-hugepages) \
 	$(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
@@ -148,6 +149,7 @@ COLLECTD_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
 	$(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
 	$(if $(BR2_PACKAGE_COLLECTD_GPS),gpsd) \
+	$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
 	$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
 	$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
 	$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
Signature · 1 line
2.15.1 (Apple Git-101)
#6 lore raw

PATCH 4/4 package/collectd: allow the grpc plugin to be configured

Hello,

Quoted 18 lines · charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

Allow collectd to use the gRPC package since that package can now be compiled as part of buildroot. This plugin can be used to push collectd datasets over the network to other instances as needed.

---
 package/collectd/Config.in   | 6 ++++++
 package/collectd/collectd.mk | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)
package/collectd/Config.in +0 -0
index ccd3fbe13f..0848e3c343 100644

package/collectd/Config.in config BR2_PACKAGE_COLLECTD_GPS · line 253

Quoted 6 lines
package/collectd/Config.in +3 -0
@@ -248,6 +248,12 @@ config BR2_PACKAGE_COLLECTD_GPS
 	  Reports the number of sattelites seen by and precision
 	  of a GPS receiver.
 
+config BR2_PACKAGE_COLLECTD_GRPC
+	bool "grpc"
+	select BR2_PACKAGE_GRPC

You need to propagate the dependencies of the gprc package here. For example, collectd doesn't need C++ support, while gprc needs C++ support.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/4 protobuf, python-protobuf: bump to v3.5.1

In reply to charles.hardin at storagecraft.com

Hi Charles,

Quoted 19 lines · charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

---
 package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
 package/protobuf/protobuf.hash                     |  2 +-
 package/protobuf/protobuf.mk                       |  6 +++---
 3 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch
package/protobuf/0001-convert-mipsel-to-mips.patch new file +0 -0
new file mode 100644
index 0000000000..005d818d9d

package/protobuf/0001-convert-mipsel-to-mips.patch line 3

Quoted 3 lines
package/protobuf/0001-convert-mipsel-to-mips.patch new file +3 -0
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h	2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h	2018-05-21 03:46:58.580000399 +0000

Patched need a description and your sign-off.

What is the upstream status of this patch? Please indicate in the patch description.

Quoted 22 lines
package/protobuf/0001-convert-mipsel-to-mips.patch new file +9 -0
+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
package/protobuf/protobuf.hash +1 -1
index fa02440a40..d86f9758f3 100644
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
+sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
package/protobuf/protobuf.mk +0 -0
index d2782ddcfd..6120d6030d 100644

package/protobuf/protobuf.mk line 11

Quoted 8 lines
package/protobuf/protobuf.mk +2 -3
@@ -7,11 +7,11 @@
 # When bumping this package, make sure to also verify if the
 # python-protobuf package still works, as they share the same
 # version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))

Why are you switching to git fetch? We prefer tarballs whenever upstream provides them which is the case here.

package/protobuf/protobuf.mk line 14

Quoted 3 lines
package/protobuf/protobuf.mk +1 -0
 PROTOBUF_LICENSE = BSD-3-Clause
 PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES

Upstream tarball includes a pre-generated configure script, so this should not be needed.

package/protobuf/protobuf.mk line 17

Quoted 2 lines
package/protobuf/protobuf.mk +0 -0
 # N.B. Need to use host protoc during cross compilation.
 PROTOBUF_DEPENDENCIES = host-protobuf

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#8 lore raw

PATCH 1/4 protobuf, python-protobuf: bump to v3.5.1

Inline.

On May 20, 2018, at 10:35 PM, Baruch Siach <baruch at tkos.co.il<mailto:[email protected]>> wrote:

Hi Charles,

On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com<mailto:[email protected]> wrote:
From: Charles Hardin <charles.hardin at storagecraft.com<mailto:[email protected]>>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

Signed-off-by Charles Hardin <charles.hardin at storagecraft.com<mailto:[email protected]>>

---

package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
package/protobuf/protobuf.hash                     |  2 +-
package/protobuf/protobuf.mk                       |  6 +++---
3 files changed, 16 insertions(+), 4 deletions(-)

create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch

package/protobuf/0001-convert-mipsel-to-mips.patch new file +3 -0
new file mode 100644
index 0000000000..005d818d9d
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h 2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h 2018-05-21 03:46:58.580000399 +0000

Patched need a description and your sign-off.

What is the upstream status of this patch? Please indicate in the patch description.

I just did this locally with no git - there is no upstream, it was just for a local build against Cavium. So, it would be nice if people upstream actually did mips - but they don?t...

+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1

package/protobuf/protobuf.hash +0 -0
index fa02440a40..d86f9758f3 100644
@@ -1,2 +1,2 @@

# Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz +sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f protobuf-v3.5.1.tar.gz

package/protobuf/protobuf.mk +0 -0
index d2782ddcfd..6120d6030d 100644
@@ -7,11 +7,11 @@

# When bumping this package, make sure to also verify if the

# python-protobuf package still works, as they share the same
# version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))

Why are you switching to git fetch? We prefer tarballs whenever upstream provides them which is the case here.

Because I was pulling a specific commit before there was a release? it happens...

PROTOBUF_LICENSE = BSD-3-Clause
PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES

Upstream tarball includes a pre-generated configure script, so this should not be needed.

Switch to GitHub is a flip to build from source - so?. if this is a release tarsal, then this isn?t needed.

# N.B. Need to use host protoc during cross compilation. PROTOBUF_DEPENDENCIES = host-protobuf

baruch

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il<mailto:[email protected]> - tel: +972.2.679.5364, http://www.tkos.co.il<http://www.tkos.co.il/> -
_______________________________________________
buildroot mailing list
buildroot at busybox.net<mailto:[email protected]>
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180521/8eb7544f/attachment.html>

#9 lore raw

PATCH 1/4 protobuf, python-protobuf: bump to v3.5.1

Hi Charles,

Please teach your email client (Outlook?) to do proper quoting on the plaintext multipart alternative of your email. If you can avoid HTML email entirely that would be be best.

My comment is inline below.

Quoted 30 lines · Charles Hardin

Inline.

On May 20, 2018, at 10:35 PM, Baruch Siach <baruch at tkos.co.il<mailto:[email protected]>> wrote:

Hi Charles,

On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com<mailto:[email protected]> wrote:
From: Charles Hardin <charles.hardin at storagecraft.com<mailto:[email protected]>>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

Signed-off-by Charles Hardin <charles.hardin at storagecraft.com<mailto:[email protected]>>

---

package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
package/protobuf/protobuf.hash                     |  2 +-
package/protobuf/protobuf.mk                       |  6 +++---
3 files changed, 16 insertions(+), 4 deletions(-)

create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch

package/protobuf/0001-convert-mipsel-to-mips.patch new file +3 -0
new file mode 100644
index 0000000000..005d818d9d
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h 2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h 2018-05-21 03:46:58.580000399 +0000
Quoted 8 lines

Patched need a description and your sign-off.

What is the upstream status of this patch? Please indicate in the patch description.

I just did this locally with no git - there is no upstream, it was just for a local build against Cavium. So, it would be nice if people upstream actually did mips - but they don?t...

In upstream I meant the Protobuf project upstream which seems to be pretty much alive and active. Have you sent this patch upstream? If so, please add a link to your submission in the patch description.

baruch

Quoted 52 lines

+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1

package/protobuf/protobuf.hash +1 -1
index fa02440a40..d86f9758f3 100644
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
+sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
package/protobuf/protobuf.mk +2 -3
index d2782ddcfd..6120d6030d 100644
@@ -7,11 +7,11 @@
 # When bumping this package, make sure to also verify if the
 # python-protobuf package still works, as they share the same
 # version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))
 

Why are you switching to git fetch? We prefer tarballs whenever upstream provides them which is the case here.

Because I was pulling a specific commit before there was a release? it happens...

PROTOBUF_LICENSE = BSD-3-Clause
PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES

Upstream tarball includes a pre-generated configure script, so this should not be needed.

Switch to GitHub is a flip to build from source - so?. if this is a release tarsal, then this isn?t needed.

# N.B. Need to use host protoc during cross compilation. PROTOBUF_DEPENDENCIES = host-protobuf

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#10 lore raw

PATCH 1/4 protobuf, python-protobuf: bump to v3.5.1

MSFT/Mimecast email filters in the cloud - not the client, it is very annoying. Have not figured out a way to bypass yet. Corporate email policies are not always the easiest thing to deal with.

Quoted 114 lines · Baruch Siach

Hi Charles,

Please teach your email client (Outlook?) to do proper quoting on the plaintext multipart alternative of your email. If you can avoid HTML email entirely that would be be best.

My comment is inline below.

Quoted 30 lines · Charles Hardin

Inline.

On May 20, 2018, at 10:35 PM, Baruch Siach <baruch at tkos.co.il<mailto:[email protected]>> wrote:

Hi Charles,

On Sun, May 20, 2018 at 10:05:47PM -0700, charles.hardin at storagecraft.com<mailto:[email protected]> wrote:
From: Charles Hardin <charles.hardin at storagecraft.com<mailto:[email protected]>>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

Signed-off-by Charles Hardin <charles.hardin at storagecraft.com<mailto:[email protected]>>

---

package/protobuf/0001-convert-mipsel-to-mips.patch | 12 ++++++++++++
package/protobuf/protobuf.hash                     |  2 +-
package/protobuf/protobuf.mk                       |  6 +++---
3 files changed, 16 insertions(+), 4 deletions(-)

create mode 100644 package/protobuf/0001-convert-mipsel-to-mips.patch

package/protobuf/0001-convert-mipsel-to-mips.patch new file +3 -0
new file mode 100644
index 0000000000..005d818d9d
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h 2017-12-20 23:07:13.000000000 +0000
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h 2018-05-21 03:46:58.580000399 +0000
Quoted 8 lines

Patched need a description and your sign-off.

What is the upstream status of this patch? Please indicate in the patch description.

I just did this locally with no git - there is no upstream, it was just for a local build against Cavium. So, it would be nice if people upstream actually did mips - but they don?t...

In upstream I meant the Protobuf project upstream which seems to be pretty much alive and active. Have you sent this patch upstream? If so, please add a link to your submission in the patch description.

baruch

Quoted 52 lines

+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1

package/protobuf/protobuf.hash +1 -1
index fa02440a40..d86f9758f3 100644
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 protobuf-cpp-3.4.1.tar.gz
+sha256 826425182ee43990731217b917c5c3ea7190cfda141af4869e6d4ad9085a740f  protobuf-v3.5.1.tar.gz
package/protobuf/protobuf.mk +2 -3
index d2782ddcfd..6120d6030d 100644
@@ -7,11 +7,11 @@
 # When bumping this package, make sure to also verify if the
 # python-protobuf package still works, as they share the same
 # version/site variables.
-PROTOBUF_VERSION = 3.4.1
-PROTOBUF_SOURCE = protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
-PROTOBUF_SITE = https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)
+PROTOBUF_VERSION = v3.5.1
+PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION))
 

Why are you switching to git fetch? We prefer tarballs whenever upstream provides them which is the case here.

Because I was pulling a specific commit before there was a release? it happens...

PROTOBUF_LICENSE = BSD-3-Clause
PROTOBUF_LICENSE_FILES = LICENSE
+PROTOBUF_AUTORECONF = YES

Upstream tarball includes a pre-generated configure script, so this should not be needed.

Switch to GitHub is a flip to build from source - so?. if this is a release tarsal, then this isn?t needed.

# N.B. Need to use host protoc during cross compilation. PROTOBUF_DEPENDENCIES = host-protobuf

baruch

Signature · 3 lines
    http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
  - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#11 lore raw

PATCH 1/4 protobuf, python-protobuf: bump to v3.5.1

In reply to charles.hardin at storagecraft.com

Hello,

Quoted 6 lines · charles.hardin at storagecraft.com

From: Charles Hardin <[email protected]>

Also, add a patch to compile for mips big endian
in addition to mips little endian.

This bump is already in the next branch:
https://git.buildroot.org/buildroot/commit/?h=next&id=454aa2da5e79ec8627f1d66ac640ec7bb04025dc.

Quoted 8 lines
package/protobuf/0001-convert-mipsel-to-mips.patch new file +2 -0
new file mode 100644
index 0000000000..005d818d9d
@@ -0,0 +1,12 @@
+diff -Naur protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h
+--- protobuf-3.5.1.orig/src/google/protobuf/stubs/platform_macros.h	2017-12-20 23:07:13.000000000 +0000

package/protobuf/0001-convert-mipsel-to-mips.patch line 12

Quoted 10 lines
package/protobuf/0001-convert-mipsel-to-mips.patch new file +10 -0
++++ protobuf-3.5.1/src/google/protobuf/stubs/platform_macros.h	2018-05-21 03:46:58.580000399 +0000
+@@ -56,7 +56,7 @@
+ #elif defined(__aarch64__)
+ #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+-#elif defined(__MIPSEL__)
++#elif defined(__mips__)
+ #if defined(__LP64__)
+ #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
+ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1

All patches require a description and Signed-off-by. Since upstream uses Git as its version control system, the patch should be generated using "git format-patch".

Quoted 3 lines

# When bumping this package, make sure to also verify if the

 # python-protobuf package still works, as they share the same
 # version/site variables.

While doing the bump, you missed this comment. No a big deal since the bump has already been done, but I thought I should point this out.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com