Skip to contentSkip to conversation

package/libpng: bump version to 1.6.32

PATCH New Bernd Kuhls 4 participants 6 messages Sep 2, 2017 – Sep 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/libpng: bump version to 1.6.32

Added md5 hash provided by upstream.

---
 package/libpng/libpng.hash | 7 ++++---
 package/libpng/libpng.mk   | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
package/libpng/libpng.hash +4 -3
index 4bc7b87ed..074cf5fb8 100644
@@ -1,4 +1,5 @@
-# From http://sourceforge.net/projects/libpng/files/libpng16/1.6.31/
-sha1 de695064363df331734466981ef7f6546ef516bf  libpng-1.6.31.tar.xz
+# From http://sourceforge.net/projects/libpng/files/libpng16/1.6.32/
+md5 e01be057a9369183c959b793a685ad15  libpng-1.6.32.tar.xz
+sha1 161d91d15cfd739773e0a73b41032b9f27322914  libpng-1.6.32.tar.xz
 # Locally computed:
-sha256 232a602de04916b2b5ce6f901829caf419519e6a16cc9cd7c1c91187d3ee8b41  libpng-1.6.31.tar.xz
+sha256 c918c3113de74a692f0a1526ce881dc26067763eb3915c57ef3a0f7b6886f59b  libpng-1.6.32.tar.xz
package/libpng/libpng.mk +1 -1
index 0c19b29c1..2aa021712 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBPNG_VERSION = 1.6.31
+LIBPNG_VERSION = 1.6.32
 LIBPNG_SERIES = 16
 LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.xz
 LIBPNG_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG_SERIES}/$(LIBPNG_VERSION)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/2 package/libpng: switch to cmake

We have no arch-specific options to control mips msa and powerpc vsx support so we disable these options atm to prevent build errors.

Tested using this defconfig:

BR2_PACKAGE_LIBPNG=y

                armv5-ctng-linux-gnueabi [ 1/47]: OK
              armv7-ctng-linux-gnueabihf [ 2/47]: OK
                        br-aarch64-glibc [ 3/47]: OK
                           br-arcle-hs38 [ 4/47]: OK
                            br-arm-basic [ 5/47]: OK
                  br-arm-cortex-a9-glibc [ 6/47]: OK
                   br-arm-cortex-a9-musl [ 7/47]: OK
                   br-arm-cortex-m4-full [ 8/47]: OK
                             br-arm-full [ 9/47]: OK
                    br-arm-full-nothread [10/47]: OK
                      br-arm-full-static [11/47]: OK
                            br-bfin-full [12/47]: OK
                   br-i386-pentium4-full [13/47]: OK
                br-i386-pentium-mmx-musl [14/47]: OK
                       br-m68k-5208-full [15/47]: OK
                      br-m68k-68040-full [16/47]: OK
                    br-microblazeel-full [17/47]: OK
                 br-mips32r6-el-hf-glibc [18/47]: OK
                      br-mips64-n64-full [19/47]: OK
                 br-mips64r6-el-hf-glibc [20/47]: OK
                      br-mipsel-o32-full [21/47]: OK
                          br-nios2-glibc [22/47]: OK
                      br-openrisc-uclibc [23/47]: OK
               br-powerpc-603e-basic-cpp [24/47]: OK
             br-powerpc64le-power8-glibc [25/47]: OK
               br-powerpc64-power7-glibc [26/47]: OK
                  br-powerpc-e500mc-full [27/47]: OK
                             br-sh4-full [28/47]: OK
                        br-sparc64-glibc [29/47]: OK
                         br-sparc-uclibc [30/47]: OK
                    br-x86-64-core2-full [31/47]: OK
                          br-x86-64-musl [32/47]: OK
                          br-xtensa-full [33/47]: OK
                     i686-ctng-linux-gnu [34/47]: OK
                          linaro-aarch64 [35/47]: OK
                              linaro-arm [36/47]: OK
             mips64el-ctng_n32-linux-gnu [37/47]: OK
             mips64el-ctng_n64-linux-gnu [38/47]: OK
        powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK
                     sourcery-arm-armv4t [40/47]: OK
                            sourcery-arm [41/47]: OK
                     sourcery-arm-thumb2 [42/47]: OK
                         sourcery-mips64 [43/47]: OK
                           sourcery-mips [44/47]: OK
                          sourcery-nios2 [45/47]: OK
                         sourcery-x86-64 [46/47]: OK
           x86_64-ctng_locales-linux-gnu [47/47]: OK

47 builds, 0 skipped, 0 build failed, 0 legal-info failed

---
 ...3-CMakeLists.txt-Enable-building-asm-code.patch | 40 ++++++++++++++++++++++
 package/libpng/libpng.mk                           | 22 ++++++++----
 2 files changed, 56 insertions(+), 6 deletions(-)
 create mode 100644 package/libpng/0003-CMakeLists.txt-Enable-building-asm-code.patch
package/libpng/0003-CMakeLists.txt-Enable-building-asm-code.patch new file +40 -0
new file mode 100644
index 000000000..4bc5345fe
@@ -0,0 +1,40 @@
+From b47e0f5ceb525796dd98900613f3744d45331216 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sat, 2 Sep 2017 15:09:30 +0200
+Subject: [PATCH] CMakeLists.txt: Enable building asm code
+
+NEON support is provided by filter_neon.S which is currently not build
+by cmake causing an error when linking with libpng16.so.16.32.0:
+
+[ 97%] Linking C executable pngstest
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_avg4_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_paeth3_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_up_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_avg3_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_paeth4_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_sub4_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_sub3_neon'
+
+Patch sent upstream: https://github.com/glennrp/libpng/pull/174
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4803a720d..153d6caf6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,7 @@ endif(POLICY CMP0054)
+ 
+ set(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo")
+ 
+-project(libpng C)
++project(libpng ASM C)
+ enable_testing()
+ 
+ set(PNGLIB_MAJOR 1)
+-- 
+2.11.0
+
package/libpng/libpng.mk +16 -6
index 2aa021712..6e915a47f 100644
@@ -15,17 +15,27 @@ LIBPNG_DEPENDENCIES = host-pkgconf zlib
 HOST_LIBPNG_DEPENDENCIES = host-pkgconf host-zlib
 LIBPNG_CONFIG_SCRIPTS = libpng$(LIBPNG_SERIES)-config libpng-config
 
+LIBPNG_CONF_OPTS += -DPNG_MIPS_MSA=off -DPNG_POWERPC_VSX=off
+
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBPNG_CONF_OPTS += -DPNG_SHARED=OFF -DPNG_STATIC=ON
+else ifeq ($(BR2_SHARED_LIBS),y)
+LIBPNG_CONF_OPTS += -DPNG_SHARED=ON -DPNG_STATIC=OFF
+else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+LIBPNG_CONF_OPTS += -DPNG_SHARED=ON -DPNG_STATIC=ON
+endif
+
 ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
-LIBPNG_CONF_OPTS += --enable-arm-neon
+LIBPNG_CONF_OPTS += -DPNG_ARM_NEON=on
 else
-LIBPNG_CONF_OPTS += --disable-arm-neon
+LIBPNG_CONF_OPTS += -DPNG_ARM_NEON=off
 endif
 
 ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
-LIBPNG_CONF_OPTS += --enable-intel-sse
+LIBPNG_CONF_OPTS += -DPNG_INTEL_SSE=on
 else
-LIBPNG_CONF_OPTS += --disable-intel-sse
+LIBPNG_CONF_OPTS += -DPNG_INTEL_SSE=off
 endif
 
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 package/libpng: switch to cmake

Bernd, All,

On 2017-09-02 16:29 +0200, Bernd Kuhls spake thusly:

Quoted 2 lines

We have no arch-specific options to control mips msa and powerpc vsx support so we disable these options atm to prevent build errors.

I'm not even reviewing the patch, because I noticed that a lot of switch-to-cmake patches actually broke the build one way or the other.

So I would suggest that we forgo switching the buildsyustem of package just to switch.

If upstream has changed, or there is a *compelling* reason to switch, then so be it. In this case, the commit log *must* explain the rationale for switching.

But switching for the sake of switching is a big no-no from me.

Regards,
Yann E. MORIN.

Quoted 151 lines

Tested using this defconfig:

BR2_PACKAGE_LIBPNG=y

                armv5-ctng-linux-gnueabi [ 1/47]: OK
              armv7-ctng-linux-gnueabihf [ 2/47]: OK
                        br-aarch64-glibc [ 3/47]: OK
                           br-arcle-hs38 [ 4/47]: OK
                            br-arm-basic [ 5/47]: OK
                  br-arm-cortex-a9-glibc [ 6/47]: OK
                   br-arm-cortex-a9-musl [ 7/47]: OK
                   br-arm-cortex-m4-full [ 8/47]: OK
                             br-arm-full [ 9/47]: OK
                    br-arm-full-nothread [10/47]: OK
                      br-arm-full-static [11/47]: OK
                            br-bfin-full [12/47]: OK
                   br-i386-pentium4-full [13/47]: OK
                br-i386-pentium-mmx-musl [14/47]: OK
                       br-m68k-5208-full [15/47]: OK
                      br-m68k-68040-full [16/47]: OK
                    br-microblazeel-full [17/47]: OK
                 br-mips32r6-el-hf-glibc [18/47]: OK
                      br-mips64-n64-full [19/47]: OK
                 br-mips64r6-el-hf-glibc [20/47]: OK
                      br-mipsel-o32-full [21/47]: OK
                          br-nios2-glibc [22/47]: OK
                      br-openrisc-uclibc [23/47]: OK
               br-powerpc-603e-basic-cpp [24/47]: OK
             br-powerpc64le-power8-glibc [25/47]: OK
               br-powerpc64-power7-glibc [26/47]: OK
                  br-powerpc-e500mc-full [27/47]: OK
                             br-sh4-full [28/47]: OK
                        br-sparc64-glibc [29/47]: OK
                         br-sparc-uclibc [30/47]: OK
                    br-x86-64-core2-full [31/47]: OK
                          br-x86-64-musl [32/47]: OK
                          br-xtensa-full [33/47]: OK
                     i686-ctng-linux-gnu [34/47]: OK
                          linaro-aarch64 [35/47]: OK
                              linaro-arm [36/47]: OK
             mips64el-ctng_n32-linux-gnu [37/47]: OK
             mips64el-ctng_n64-linux-gnu [38/47]: OK
        powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK
                     sourcery-arm-armv4t [40/47]: OK
                            sourcery-arm [41/47]: OK
                     sourcery-arm-thumb2 [42/47]: OK
                         sourcery-mips64 [43/47]: OK
                           sourcery-mips [44/47]: OK
                          sourcery-nios2 [45/47]: OK
                         sourcery-x86-64 [46/47]: OK
           x86_64-ctng_locales-linux-gnu [47/47]: OK

47 builds, 0 skipped, 0 build failed, 0 legal-info failed

---
 ...3-CMakeLists.txt-Enable-building-asm-code.patch | 40 ++++++++++++++++++++++
 package/libpng/libpng.mk                           | 22 ++++++++----
 2 files changed, 56 insertions(+), 6 deletions(-)
 create mode 100644 package/libpng/0003-CMakeLists.txt-Enable-building-asm-code.patch
package/libpng/0003-CMakeLists.txt-Enable-building-asm-code.patch new file +40 -0
new file mode 100644
index 000000000..4bc5345fe
@@ -0,0 +1,40 @@
+From b47e0f5ceb525796dd98900613f3744d45331216 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Sat, 2 Sep 2017 15:09:30 +0200
+Subject: [PATCH] CMakeLists.txt: Enable building asm code
+
+NEON support is provided by filter_neon.S which is currently not build
+by cmake causing an error when linking with libpng16.so.16.32.0:
+
+[ 97%] Linking C executable pngstest
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_avg4_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_paeth3_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_up_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_avg3_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_paeth4_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_sub4_neon'
+libpng16.so.16.32.0: undefined reference to `png_read_filter_row_sub3_neon'
+
+Patch sent upstream: https://github.com/glennrp/libpng/pull/174
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4803a720d..153d6caf6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,7 +31,7 @@ endif(POLICY CMP0054)
+ 
+ set(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo")
+ 
+-project(libpng C)
++project(libpng ASM C)
+ enable_testing()
+ 
+ set(PNGLIB_MAJOR 1)
+-- 
+2.11.0
+
package/libpng/libpng.mk +16 -6
index 2aa021712..6e915a47f 100644
@@ -15,17 +15,27 @@ LIBPNG_DEPENDENCIES = host-pkgconf zlib
 HOST_LIBPNG_DEPENDENCIES = host-pkgconf host-zlib
 LIBPNG_CONFIG_SCRIPTS = libpng$(LIBPNG_SERIES)-config libpng-config
 
+LIBPNG_CONF_OPTS += -DPNG_MIPS_MSA=off -DPNG_POWERPC_VSX=off
+
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBPNG_CONF_OPTS += -DPNG_SHARED=OFF -DPNG_STATIC=ON
+else ifeq ($(BR2_SHARED_LIBS),y)
+LIBPNG_CONF_OPTS += -DPNG_SHARED=ON -DPNG_STATIC=OFF
+else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+LIBPNG_CONF_OPTS += -DPNG_SHARED=ON -DPNG_STATIC=ON
+endif
+
 ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
-LIBPNG_CONF_OPTS += --enable-arm-neon
+LIBPNG_CONF_OPTS += -DPNG_ARM_NEON=on
 else
-LIBPNG_CONF_OPTS += --disable-arm-neon
+LIBPNG_CONF_OPTS += -DPNG_ARM_NEON=off
 endif
 
 ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
-LIBPNG_CONF_OPTS += --enable-intel-sse
+LIBPNG_CONF_OPTS += -DPNG_INTEL_SSE=on
 else
-LIBPNG_CONF_OPTS += --disable-intel-sse
+LIBPNG_CONF_OPTS += -DPNG_INTEL_SSE=off
 endif
 
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
Signature · 6 lines
2.11.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 2/2 package/libpng: switch to cmake

Hello,

Quoted 7 lines · Yann E. MORIN

On 2017-09-02 16:29 +0200, Bernd Kuhls spake thusly:

Quoted 2 lines

We have no arch-specific options to control mips msa and powerpc vsx support so we disable these options atm to prevent build errors.

I'm not even reviewing the patch, because I noticed that a lot of switch-to-cmake patches actually broke the build one way or the other.

Quoted 8 lines

So I would suggest that we forgo switching the buildsyustem of package just to switch.

If upstream has changed, or there is a *compelling* reason to switch, then so be it. In this case, the commit log *must* explain the rationale for switching.

But switching for the sake of switching is a big no-no from me.

I agree that there needs to be an explanation for the switch. Is upstream moving to CMake, and getting rid of autotools support in the future ? Other reason ?

Also Bernd: for libraries, a test-pkg test is by far not enough to indicate that everything is alright. Look at the switch of cmake in the lzo package that you contributed: it was bogus because it was only building the static library, and no longer the shared library. A test-pkg test doesn't catch this kind of stuff.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/2 package/libpng: bump version to 1.6.32

In reply to Bernd Kuhls

Hello,

Quoted 7 lines · Bernd Kuhls

Added md5 hash provided by upstream.

---
 package/libpng/libpng.hash | 7 ++++---
 package/libpng/libpng.mk   | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/2 package/libpng: bump version to 1.6.32

In reply to Bernd Kuhls
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Bernd" == Bernd Kuhls <[email protected]> writes:

Added md5 hash provided by upstream.

It would have been good to mention that this fixes a security issue introduced in 1.6.31, so a candidate for 2017.08.x:

Vulnerability Warning

libpng version 1.6.31 added png_handle_eXIf(), which has a null-pointer-dereference bug as well as a potential memory leak. Insofar as the function has existed for only four weeks and the chunk itself for only six, it's unlikely there are any applications affected by it at this time, but they might come into existence in the future. The vulnerability is fixed in version 1.6.32, released on 24 August 2017.

Signature · 1 line
Bye, Peter Korsgaard