Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pngquant for openSUSE:Factory checked in at 2021-06-25 15:01:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pngquant (Old) and /work/SRC/openSUSE:Factory/.pngquant.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pngquant" Fri Jun 25 15:01:06 2021 rev:8 rq:901438 version:2.15.1 Changes: -------- --- /work/SRC/openSUSE:Factory/pngquant/pngquant.changes 2020-12-30 17:12:15.740827611 +0100 +++ /work/SRC/openSUSE:Factory/.pngquant.new.2625/pngquant.changes 2021-06-25 15:01:29.688163057 +0200 @@ -1,0 +2,6 @@ +Sun Jun 6 12:59:12 UTC 2021 - Dirk M??ller <[email protected]> + +- update to 2.15.0: + - speed and quality improvements + +------------------------------------------------------------------- Old: ---- pngquant-2.13.1.tar.gz New: ---- pngquant-2.15.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pngquant.spec ++++++ --- /var/tmp/diff_new_pack.P5G8eC/_old 2021-06-25 15:01:30.108163569 +0200 +++ /var/tmp/diff_new_pack.P5G8eC/_new 2021-06-25 15:01:30.108163569 +0200 @@ -1,7 +1,7 @@ # # spec file for package pngquant # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: pngquant -Version: 2.13.1 +Version: 2.15.1 Release: 0 Summary: Tool for lossy compression of PNG images License: GPL-3.0-or-later ++++++ pngquant-2.13.1.tar.gz -> pngquant-2.15.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/CHANGELOG new/pngquant-2.15.1/CHANGELOG --- old/pngquant-2.13.1/CHANGELOG 2020-11-22 14:20:47.000000000 +0100 +++ new/pngquant-2.15.1/CHANGELOG 2021-05-13 11:30:18.000000000 +0200 @@ -1,5 +1,6 @@ -version 2.13 - - small speed and quality improvements +version 2.13-2.15 +------------ + - speed and quality improvements version 2.12 ------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/Cargo.toml new/pngquant-2.15.1/Cargo.toml --- old/pngquant-2.13.1/Cargo.toml 2020-11-22 14:20:47.000000000 +0100 +++ new/pngquant-2.15.1/Cargo.toml 2021-05-13 11:30:18.000000000 +0200 @@ -1,5 +1,5 @@ [package] -version = "2.13.0" +version = "2.15.1" authors = ["Kornel Lesin??ski <[email protected]>"] build = "rust/build.rs" categories = ["multimedia::images"] @@ -19,26 +19,26 @@ path = "rust/bin.rs" [build-dependencies] -cc = "1.0.38" -dunce = "1.0.0" +cc = "1.0.66" +dunce = "1.0.1" [dependencies] -getopts = "0.2.19" -libc = "0.2.60" -libpng-sys = "1.1.5" -wild = "2.0.2" +getopts = "0.2.21" +libc = "0.2.82" +libpng-sys = "1.1.8" +wild = "2.0.4" [dependencies.cocoa_image] optional = true -version = "1.0.0" +version = "1.0.4" [dependencies.imagequant-sys] path = "lib" -version = "2.13.0" +version = "3.0.2" [dependencies.lcms2-sys] optional = true -version = "3.1.1" +version = "3.1.6" [dependencies.openmp-sys] optional = true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/Makefile new/pngquant-2.15.1/Makefile --- old/pngquant-2.13.1/Makefile 2020-11-22 14:20:47.000000000 +0100 +++ new/pngquant-2.15.1/Makefile 2021-05-13 11:30:18.000000000 +0200 @@ -41,13 +41,15 @@ test -n "$(VERSION)" make -C $(LIQSRCDIR) cargo rm -rf $(TARFILE) $(TARNAME) - mkdir -p $(TARNAME)/lib/rust $(TARNAME)/lib/msvc-dist $(TARNAME)/rust + mkdir -p $(TARNAME)/lib/rust $(TARNAME)/lib/msvc-dist $(TARNAME)/rust $(TARNAME)/test/img cp $(DISTFILES) $(TARNAME) cp rust/*.rs $(TARNAME)/rust/ cp $(LIBDISTFILES) $(TARNAME)/lib cp $(LIQSRCDIR)/rust-sys/*.rs $(TARNAME)/lib/rust/ cp $(LIQSRCDIR)/msvc-dist/*.[ch] $(TARNAME)/lib/msvc-dist/ - tar -czf $(TARFILE) --numeric-owner --exclude='._*' $(TARNAME) + cp test/test.c test/test.sh $(TARNAME)/test/ + cp test/img/*.png $(TARNAME)/test/img/ + find $(TARNAME) -type f | rev | sort | rev | tar -czf $(TARFILE) --numeric-owner --exclude='._*' --files-from=- rm -rf $(TARNAME) -shasum $(TARFILE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/pngquant.c new/pngquant-2.15.1/pngquant.c --- old/pngquant-2.13.1/pngquant.c 2020-11-22 14:20:47.000000000 +0100 +++ new/pngquant-2.15.1/pngquant.c 2021-05-13 11:30:18.000000000 +0200 @@ -40,10 +40,11 @@ #include <math.h> #if defined(_WIN32) || defined(WIN32) || defined(__WIN32__) -# include <fcntl.h> /* O_BINARY */ -# include <io.h> /* setmode() */ +#include <fcntl.h> /* O_BINARY */ +#include <io.h> /* setmode() */ +#include <locale.h> /* UTF-8 locale */ #else -# include <unistd.h> +#include <unistd.h> #endif #ifdef _OPENMP @@ -57,7 +58,7 @@ #include "libimagequant.h" /* if it fails here, run: git submodule update; ./configure; or add -Ilib to compiler flags */ #include "pngquant_opts.h" -char *PNGQUANT_VERSION = LIQ_VERSION_STRING " (July 2019)"; +char *PNGQUANT_VERSION = LIQ_VERSION_STRING " (May 2021)"; static pngquant_error prepare_output_image(liq_result *result, liq_image *input_image, rwpng_color_transform tag, png8_image *output_image); static void set_palette(liq_result *result, png8_image *output_image); @@ -231,6 +232,10 @@ return SUCCESS; } +#if defined(_WIN32) || defined(WIN32) || defined(__WIN32__) + setlocale(LC_ALL, ".65001"); // issue #376; set UTF-8 for Unicode filenames +#endif + liq_attr *liq = liq_attr_create(); if (!liq) { @@ -495,7 +500,7 @@ if (options->skip_if_larger) { // this is very rough approximation, but generally avoid losing more quality than is gained in file size. // Quality is raised to 1.5, because even greater savings are needed to justify big quality loss. - // but >50% savings are considered always worthwile in order to allow low quality conversions to work at all + // but >50% savings are considered always worthwhile in order to allow low quality conversions to work at all const double quality = quality_percent/100.0; const double expected_reduced_size = pow(quality, 1.5); output_image.maximum_file_size = (input_image_rwpng.file_size-1) * (expected_reduced_size < 0.5 ? 0.5 : expected_reduced_size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/pngquant.spec new/pngquant-2.15.1/pngquant.spec --- old/pngquant-2.13.1/pngquant.spec 2020-11-22 14:20:47.000000000 +0100 +++ new/pngquant-2.15.1/pngquant.spec 2021-05-13 11:30:18.000000000 +0200 @@ -1,15 +1,15 @@ Name: pngquant -Version: 2.13.1 +Version: 2.15.1 Release: 1%{?dist} Summary: PNG quantization tool for reducing image file size # New code is under GPL, forked from old BSD-like License: GPLv3+ and BSD URL: https://pngquant.org Source0: https://github.com/kornelski/pngquant/archive/%{version}.tar.gz -BuildRequires: libpng-devel%{?_isa} >= 1.4.20 +BuildRequires: libpng-devel%{?_isa} >= 1.6.0 BuildRequires: zlib-devel%{?_isa} >= 1.2.3-1 BuildRequires: gcc%{?_isa} >= 4.2-1 -Requires: libpng%{?_isa} >= 1.4.20 +Requires: libpng%{?_isa} >= 1.6.0 Requires: zlib%{?isa} >= 1.2.3-1 %description diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/snapcraft.yaml new/pngquant-2.15.1/snapcraft.yaml --- old/pngquant-2.13.1/snapcraft.yaml 2020-11-22 14:20:47.000000000 +0100 +++ new/pngquant-2.15.1/snapcraft.yaml 2021-05-13 11:30:18.000000000 +0200 @@ -1,5 +1,5 @@ name: pngquant -version: 2.13.1 +version: 2.15.1 summary: pngquant description: | Lossy PNG compressor ??? pngquant command based @@ -18,7 +18,7 @@ pngquant: source-type: git source: https://github.com/kornelski/pngquant.git - source-tag: 2.13.1 + source-tag: 2.15.1 plugin: autotools configflags: - --with-openmp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/test/fuzzer.c new/pngquant-2.15.1/test/fuzzer.c --- old/pngquant-2.13.1/test/fuzzer.c 1970-01-01 01:00:00.000000000 +0100 +++ new/pngquant-2.15.1/test/fuzzer.c 2021-05-13 11:30:18.000000000 +0200 @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> +#include <stdbool.h> +#include "rwpng.h" +#include "libimagequant.h" +#include "pngquant_opts.h" + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + if (size < 2) + return 0; + + char img[256]; + sprintf(img, "/tmp/libfuzzer.png"); + + FILE *fp = fopen(img, "wb"); + if (!fp) + return 0; + fwrite(data, size, 1, fp); + fclose(fp); + + liq_attr *attr = liq_attr_create(); + png24_image tmp = {.width=0}; + liq_image *input_image = NULL; + read_image(attr, img, false, &tmp, &input_image, true, true, false); + + liq_attr_destroy(attr); + if(input_image!=NULL){ + liq_image_destroy(input_image); + } + rwpng_free_image24(&tmp); + unlink(img); + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pngquant-2.13.1/test/oss_fuzz_build.sh new/pngquant-2.15.1/test/oss_fuzz_build.sh --- old/pngquant-2.13.1/test/oss_fuzz_build.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/pngquant-2.15.1/test/oss_fuzz_build.sh 2021-05-13 11:30:18.000000000 +0200 @@ -0,0 +1,52 @@ +#!/bin/bash -eu + +# Build libpng +pushd $SRC/pngquant/libpng +cat scripts/pnglibconf.dfa | \ + sed -e "s/option WARNING /option WARNING disabled/" \ +> scripts/pnglibconf.dfa.temp +mv scripts/pnglibconf.dfa.temp scripts/pnglibconf.dfa +autoreconf -f -i +./configure \ + --prefix="$WORK" \ + --disable-shared \ + --enable-static \ + LDFLAGS="-L$WORK/lib" \ + CPPFLAGS="-I$WORK/include" +make -j$(nproc) +make install +popd + +cd $SRC/pngquant + +# Remove "static" from read_image +sed 's/static pngquant_error read_image/pngquant_error read_image/g' -i pngquant.c + +# Build pngquant +make -j$(nproc) V=1 + +# Rename "main()" to "main2" and compile +# pngquant.c again. Otherwise libfuzzer will complain +sed 's/int main(/int main2(/g' -i pngquant.c +$CC $CFLAGS -c pngquant.c -o pngquant.o -I. -O3 \ + -DNDEBUG -DUSE_SSE=1 -msse -mfpmath=sse \ + -Wno-unknown-pragmas -I./lib -I./libpng \ + -I/usr/include + +# Collect all .o files into fuzz_lib.a +find . -name "*.o" -exec ar rcs fuzz_lib.a {} \; + +# Build the fuzzer(s) +$CC $CFLAGS -c test/fuzzer.c -o fuzzer.o -I. \ + -O3 -DNDEBUG -DUSE_SSE=1 -msse -mfpmath=sse \ + -Wno-unknown-pragmas -I./lib -I./libpng \ + -I/usr/include + +$CC $CFLAGS fuzzer.o -I. -O3 -DNDEBUG -DUSE_SSE=1 \ + -msse -mfpmath=sse -Wno-unknown-pragmas \ + ./lib/libimagequant.a ./libpng/.libs/libpng16.a \ + -L/usr/lib/x86_64-linux-gnu -lz -lm $LIB_FUZZING_ENGINE \ + fuzz_lib.a -o $OUT/fuzzer + +# Create seed corpus +zip $OUT/fuzzer_seed_corpus.zip $SRC/pngquant/test/img/test.png
