diff mbox series

[meta-oe,scarthgap] giflib: upgrade to version 5.2.2

Message ID 20240614140101.641467-1-nikhil.r@kpit.com
State New
Headers show
Series [meta-oe,scarthgap] giflib: upgrade to version 5.2.2 | expand

Commit Message

Nikhil R June 14, 2024, 2:01 p.m. UTC
Upgrade to latest version giflib v5.2.2.

This version fixes bugs listed in link below:
Link: https://sourceforge.net/p/giflib/code/ci/5.2.2/tree/NEWS

Fixes for CVE-2023-48161, CVE-2022-28506, CVE-2023-39742
Link: https://clients.neighbourhood.ie/yocto/1-40.html#:~:text=CVE%2D2023%2D39742%3A%20giflib%3Agiflib%2Dnative

Added dependency on ImageMagick which includes "convert" utility,
to ensure availability of required tool during compilation process.

Add patch to rename binary used in Makefile from
"convert" to "convert.im7" as installed by imagemagick package.

Signed-off-by: Bhabu Bindu <bhabubindu@kpit.com>
---
 ...x_to_convert_binary_used_in_Makefile.patch | 42 +++++++++++++++++++
 .../{giflib_5.2.1.bb => giflib_5.2.2.bb}      |  9 ++--
 2 files changed, 48 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
 rename meta-oe/recipes-devtools/giflib/{giflib_5.2.1.bb => giflib_5.2.2.bb} (65%)

Comments

Martin Jansa July 8, 2024, 11:16 a.m. UTC | #1
This seems to break build with gold, because libutil.so is built with
empty soname param (libgif.so is fine):

giflib-5.2.2 $ grep soname ../temp/log.do_compile
ccache aarch64-webos-linux-gcc  -mcpu=cortex-a72+crc
-mbranch-protection=standard -fstack-protector-strong  -O2
-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
-Werror=return-type --sysroot=/OE/lge/build/webos/styhe
ad/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot
-std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -shared -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map
-fmacro-prefix-map=/OE/lge/build/webos/styhea
d/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
 -
fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2
/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
-fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot=
 -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos
-linux/giflib/5.2.2/recipe-sysroot=
-fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot-native=
 -Wl,-z,relro,-z,now -Wl,-soname -Wl,libgif.so.7 -o libgif.so
dgif_lib.o egif_l
ib.o gifalloc.o gif_err.o gif_font.o gif_hash.o openbsd-reallocarray.o
ccache aarch64-webos-linux-gcc  -mcpu=cortex-a72+crc
-mbranch-protection=standard -fstack-protector-strong  -O2
-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
-Werror=return-type --sysroot=/OE/lge/build/webos/styhe
ad/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot
-std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -shared -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map
-fmacro-prefix-map=/OE/lge/build/webos/styhea
d/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
 -
fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
 -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2
/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
-fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot=
 -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos
-linux/giflib/5.2.2/recipe-sysroot=
-fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot-native=
 -Wl,-z,relro,-z,now -Wl,-soname -Wl, -o libutil.so qprintf.o
quantize.o getarg
.o

giflib-5.2.2 $ grep -R LIBGIFSOMAJOR .
./Makefile:LIBGIFSOMAJOR        = libgif.$(SOEXTENSION).$(LIBMAJOR)
./Makefile:LIBGIFSOMAJOR   = libgif.$(LIBMAJOR).$(SOEXTENSION)
./Makefile:     $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname
-Wl,$(LIBGIFSOMAJOR) -o $(LIBGIFSO) $(OBJECTS)
./Makefile:     rm -f $(LIBGIFSOMAJOR)
./Makefile:     ln -sf $(LIBGIFSOVER) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSOMAJOR)"
./Makefile:     ln -sf $(LIBGIFSOMAJOR) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSO)"
./Makefile:             rm -f libgif.a $(LIBGIFSO) $(LIBGIFSOMAJOR)
$(LIBGIFSOVER)

but
giflib-5.2.2 $ grep -R LIBUTILMAJOR .
./Makefile:     $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname
-Wl,$(LIBUTILMAJOR) -o $(LIBUTILSO) $(UOBJECTS)

causing:

11.4.0/ld: fatal error: -soname: must take a non-empty argument
collect2: error: ld returned 1 exit status
make: *** [Makefile:112: libutil.so] Error 1

lld doesn't seem to fail with empty -soname argument, but gold does.

See https://sourceforge.net/p/giflib/bugs/143/
introduced in:
https://sourceforge.net/p/giflib/code/ci/b65c7ac2905c0842e7977a7b51d83af4486ca7b8/

I think LIBUTILMAJOR should be LIBUTILSOMAJOR


On Fri, Jun 14, 2024 at 4:01 PM nikhil via lists.openembedded.org
<nikhilar2410=gmail.com@lists.openembedded.org> wrote:
>
> Upgrade to latest version giflib v5.2.2.
>
> This version fixes bugs listed in link below:
> Link: https://sourceforge.net/p/giflib/code/ci/5.2.2/tree/NEWS
>
> Fixes for CVE-2023-48161, CVE-2022-28506, CVE-2023-39742
> Link: https://clients.neighbourhood.ie/yocto/1-40.html#:~:text=CVE%2D2023%2D39742%3A%20giflib%3Agiflib%2Dnative
>
> Added dependency on ImageMagick which includes "convert" utility,
> to ensure availability of required tool during compilation process.
>
> Add patch to rename binary used in Makefile from
> "convert" to "convert.im7" as installed by imagemagick package.
>
> Signed-off-by: Bhabu Bindu <bhabubindu@kpit.com>
> ---
>  ...x_to_convert_binary_used_in_Makefile.patch | 42 +++++++++++++++++++
>  .../{giflib_5.2.1.bb => giflib_5.2.2.bb}      |  9 ++--
>  2 files changed, 48 insertions(+), 3 deletions(-)
>  create mode 100644 meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
>  rename meta-oe/recipes-devtools/giflib/{giflib_5.2.1.bb => giflib_5.2.2.bb} (65%)
>
> diff --git a/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
> new file mode 100644
> index 000000000..a01b28ac6
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
> @@ -0,0 +1,42 @@
> +Subject: Modify binary name "convert" to "convert.im7"
> +
> +The change is needed to resolve the below compilation error
> +after giflib version upgrade. Log data follows:
> +| DEBUG: Executing shell function do_compile
> +| NOTE: make -j 8
> +| make -C doc
> +| make[1]: Entering directory '../giflib/5.2.2/giflib-5.2.2/doc'
> +| convert ../pic/gifgrid.gif -resize 50x50 giflib-logo.gif
> +| make[1]: convert: No such file or directory
> +| make[1]: *** [Makefile:46: giflib-logo.gif] Error 127
> +| make[1]: Leaving directory '../giflib/5.2.2/giflib-5.2.2/doc'
> +| make: *** [Makefile:93: all] Error 2
> +| ERROR: oe_runmake failed
> +
> +Added dependency on ImageMagick which includes "convert" utility,
> +to ensure availability of required tool during compilation process.
> +
> +This patch updates the binary name used in Makefile from
> +"convert" to "convert.im7" for resizing the logo image used in HTML
> +documentation as Imagemagick installs binary in this format.
> +
> +Below commits justify the cause of adding the suffix to binaries
> +provided by ImageMagic package:
> +https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=dcbb49f707e7ad9bf755dd3275ffc442154b8144
> +https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=6e0c24e9b3f9d430dec57f61f8c12c74bca5375d
> +
> +Signed-off-by:   Bhabu Bindu <bhabubindu@kpit.com>
> +Upstream-Status: Inappropriate [OE specific]
> +
> +===================================================================
> +--- a/doc/Makefile
> ++++ b/doc/Makefile
> +@@ -43,7 +43,7 @@
> +
> + # Logo image file for HTML docs
> + giflib-logo.gif: ../pic/gifgrid.gif
> +-      convert $^ -resize 50x50 $@
> ++      convert.im7 $^ -resize 50x50 $@
> +
> + # Philosophical choice: the website gets the internal manual pages
> + allhtml: $(XMLALL:.xml=.html) giflib-logo.gif
> diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
> similarity index 65%
> rename from meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb
> rename to meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
> index 79afe9a70..7d8a175fe 100644
> --- a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb
> +++ b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
> @@ -5,10 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a"
>
>  CVE_PRODUCT = "giflib_project:giflib"
>
> -DEPENDS = "xmlto-native"
> +DEPENDS = "xmlto-native imagemagick-native"
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \
> +           file://add_suffix_to_convert_binary_used_in_Makefile.patch"
> +
> +SRC_URI[sha256sum] = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb"
>
> -SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz"
> -SRC_URI[sha256sum] = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd"
>
>  do_install() {
>      # using autotools's default will end up in /usr/local
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#110909): https://lists.openembedded.org/g/openembedded-devel/message/110909
> Mute This Topic: https://lists.openembedded.org/mt/106670583/3617156
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Martin Jansa July 8, 2024, 11:21 a.m. UTC | #2
And please use valid e-mail addresses when sending patches I got 2
rejects from bindu @kpit.com

Your message to bhabubindu@kpit.com has been blocked. See technical
details below for more information.
The response from the remote server was:

550 5.4.1 Recipient address rejected: Access denied.
[SG2PEPF000B66CD.apcprd03.prod.outlook.com 2024-07-08T11:16:59.022Z
08DC9E0559B2D7AA]

Your message to bindu.bhabu@kpit.com has been blocked. See technical
details below for more information.
The response from the remote server was:

550 5.4.1 Recipient address rejected: Access denied.
[SG2PEPF000B66CD.apcprd03.prod.outlook.com 2024-07-08T11:16:58.834Z
08DC9E0559B2D7AA]

On Mon, Jul 8, 2024 at 1:16 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> This seems to break build with gold, because libutil.so is built with
> empty soname param (libgif.so is fine):
>
> giflib-5.2.2 $ grep soname ../temp/log.do_compile
> ccache aarch64-webos-linux-gcc  -mcpu=cortex-a72+crc
> -mbranch-protection=standard -fstack-protector-strong  -O2
> -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
> -Werror=return-type --sysroot=/OE/lge/build/webos/styhe
> ad/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot
> -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -shared -Wl,-O1
> -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map
> -fmacro-prefix-map=/OE/lge/build/webos/styhea
> d/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
>  -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
>  -
> fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
>  -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2
> /giflib-5.2.2=/usr/src/debug/giflib/5.2.2
> -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot=
>  -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos
> -linux/giflib/5.2.2/recipe-sysroot=
> -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot-native=
>  -Wl,-z,relro,-z,now -Wl,-soname -Wl,libgif.so.7 -o libgif.so
> dgif_lib.o egif_l
> ib.o gifalloc.o gif_err.o gif_font.o gif_hash.o openbsd-reallocarray.o
> ccache aarch64-webos-linux-gcc  -mcpu=cortex-a72+crc
> -mbranch-protection=standard -fstack-protector-strong  -O2
> -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security
> -Werror=return-type --sysroot=/OE/lge/build/webos/styhe
> ad/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot
> -std=gnu99 -fPIC -Wall -Wno-format-truncation -O2 -shared -Wl,-O1
> -Wl,--hash-style=gnu -Wl,--as-needed -fcanon-prefix-map
> -fmacro-prefix-map=/OE/lge/build/webos/styhea
> d/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
>  -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
>  -
> fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/giflib-5.2.2=/usr/src/debug/giflib/5.2.2
>  -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2
> /giflib-5.2.2=/usr/src/debug/giflib/5.2.2
> -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot=
>  -fmacro-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos
> -linux/giflib/5.2.2/recipe-sysroot=
> -fdebug-prefix-map=/OE/lge/build/webos/styhead/BUILD/work/raspberrypi4_64-webos-linux/giflib/5.2.2/recipe-sysroot-native=
>  -Wl,-z,relro,-z,now -Wl,-soname -Wl, -o libutil.so qprintf.o
> quantize.o getarg
> .o
>
> giflib-5.2.2 $ grep -R LIBGIFSOMAJOR .
> ./Makefile:LIBGIFSOMAJOR        = libgif.$(SOEXTENSION).$(LIBMAJOR)
> ./Makefile:LIBGIFSOMAJOR   = libgif.$(LIBMAJOR).$(SOEXTENSION)
> ./Makefile:     $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname
> -Wl,$(LIBGIFSOMAJOR) -o $(LIBGIFSO) $(OBJECTS)
> ./Makefile:     rm -f $(LIBGIFSOMAJOR)
> ./Makefile:     ln -sf $(LIBGIFSOVER) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSOMAJOR)"
> ./Makefile:     ln -sf $(LIBGIFSOMAJOR) "$(DESTDIR)$(LIBDIR)/$(LIBGIFSO)"
> ./Makefile:             rm -f libgif.a $(LIBGIFSO) $(LIBGIFSOMAJOR)
> $(LIBGIFSOVER)
>
> but
> giflib-5.2.2 $ grep -R LIBUTILMAJOR .
> ./Makefile:     $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname
> -Wl,$(LIBUTILMAJOR) -o $(LIBUTILSO) $(UOBJECTS)
>
> causing:
>
> 11.4.0/ld: fatal error: -soname: must take a non-empty argument
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:112: libutil.so] Error 1
>
> lld doesn't seem to fail with empty -soname argument, but gold does.
>
> See https://sourceforge.net/p/giflib/bugs/143/
> introduced in:
> https://sourceforge.net/p/giflib/code/ci/b65c7ac2905c0842e7977a7b51d83af4486ca7b8/
>
> I think LIBUTILMAJOR should be LIBUTILSOMAJOR
>
>
> On Fri, Jun 14, 2024 at 4:01 PM nikhil via lists.openembedded.org
> <nikhilar2410=gmail.com@lists.openembedded.org> wrote:
> >
> > Upgrade to latest version giflib v5.2.2.
> >
> > This version fixes bugs listed in link below:
> > Link: https://sourceforge.net/p/giflib/code/ci/5.2.2/tree/NEWS
> >
> > Fixes for CVE-2023-48161, CVE-2022-28506, CVE-2023-39742
> > Link: https://clients.neighbourhood.ie/yocto/1-40.html#:~:text=CVE%2D2023%2D39742%3A%20giflib%3Agiflib%2Dnative
> >
> > Added dependency on ImageMagick which includes "convert" utility,
> > to ensure availability of required tool during compilation process.
> >
> > Add patch to rename binary used in Makefile from
> > "convert" to "convert.im7" as installed by imagemagick package.
> >
> > Signed-off-by: Bhabu Bindu <bhabubindu@kpit.com>
> > ---
> >  ...x_to_convert_binary_used_in_Makefile.patch | 42 +++++++++++++++++++
> >  .../{giflib_5.2.1.bb => giflib_5.2.2.bb}      |  9 ++--
> >  2 files changed, 48 insertions(+), 3 deletions(-)
> >  create mode 100644 meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
> >  rename meta-oe/recipes-devtools/giflib/{giflib_5.2.1.bb => giflib_5.2.2.bb} (65%)
> >
> > diff --git a/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
> > new file mode 100644
> > index 000000000..a01b28ac6
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
> > @@ -0,0 +1,42 @@
> > +Subject: Modify binary name "convert" to "convert.im7"
> > +
> > +The change is needed to resolve the below compilation error
> > +after giflib version upgrade. Log data follows:
> > +| DEBUG: Executing shell function do_compile
> > +| NOTE: make -j 8
> > +| make -C doc
> > +| make[1]: Entering directory '../giflib/5.2.2/giflib-5.2.2/doc'
> > +| convert ../pic/gifgrid.gif -resize 50x50 giflib-logo.gif
> > +| make[1]: convert: No such file or directory
> > +| make[1]: *** [Makefile:46: giflib-logo.gif] Error 127
> > +| make[1]: Leaving directory '../giflib/5.2.2/giflib-5.2.2/doc'
> > +| make: *** [Makefile:93: all] Error 2
> > +| ERROR: oe_runmake failed
> > +
> > +Added dependency on ImageMagick which includes "convert" utility,
> > +to ensure availability of required tool during compilation process.
> > +
> > +This patch updates the binary name used in Makefile from
> > +"convert" to "convert.im7" for resizing the logo image used in HTML
> > +documentation as Imagemagick installs binary in this format.
> > +
> > +Below commits justify the cause of adding the suffix to binaries
> > +provided by ImageMagic package:
> > +https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=dcbb49f707e7ad9bf755dd3275ffc442154b8144
> > +https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=6e0c24e9b3f9d430dec57f61f8c12c74bca5375d
> > +
> > +Signed-off-by:   Bhabu Bindu <bhabubindu@kpit.com>
> > +Upstream-Status: Inappropriate [OE specific]
> > +
> > +===================================================================
> > +--- a/doc/Makefile
> > ++++ b/doc/Makefile
> > +@@ -43,7 +43,7 @@
> > +
> > + # Logo image file for HTML docs
> > + giflib-logo.gif: ../pic/gifgrid.gif
> > +-      convert $^ -resize 50x50 $@
> > ++      convert.im7 $^ -resize 50x50 $@
> > +
> > + # Philosophical choice: the website gets the internal manual pages
> > + allhtml: $(XMLALL:.xml=.html) giflib-logo.gif
> > diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
> > similarity index 65%
> > rename from meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb
> > rename to meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
> > index 79afe9a70..7d8a175fe 100644
> > --- a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb
> > +++ b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
> > @@ -5,10 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a"
> >
> >  CVE_PRODUCT = "giflib_project:giflib"
> >
> > -DEPENDS = "xmlto-native"
> > +DEPENDS = "xmlto-native imagemagick-native"
> > +
> > +SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \
> > +           file://add_suffix_to_convert_binary_used_in_Makefile.patch"
> > +
> > +SRC_URI[sha256sum] = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb"
> >
> > -SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz"
> > -SRC_URI[sha256sum] = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd"
> >
> >  do_install() {
> >      # using autotools's default will end up in /usr/local
> > --
> > 2.25.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#110909): https://lists.openembedded.org/g/openembedded-devel/message/110909
> > Mute This Topic: https://lists.openembedded.org/mt/106670583/3617156
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [martin.jansa@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
new file mode 100644
index 000000000..a01b28ac6
--- /dev/null
+++ b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch
@@ -0,0 +1,42 @@ 
+Subject: Modify binary name "convert" to "convert.im7"
+
+The change is needed to resolve the below compilation error
+after giflib version upgrade. Log data follows:
+| DEBUG: Executing shell function do_compile
+| NOTE: make -j 8
+| make -C doc
+| make[1]: Entering directory '../giflib/5.2.2/giflib-5.2.2/doc'
+| convert ../pic/gifgrid.gif -resize 50x50 giflib-logo.gif
+| make[1]: convert: No such file or directory
+| make[1]: *** [Makefile:46: giflib-logo.gif] Error 127
+| make[1]: Leaving directory '../giflib/5.2.2/giflib-5.2.2/doc'
+| make: *** [Makefile:93: all] Error 2
+| ERROR: oe_runmake failed
+
+Added dependency on ImageMagick which includes "convert" utility,
+to ensure availability of required tool during compilation process.
+
+This patch updates the binary name used in Makefile from
+"convert" to "convert.im7" for resizing the logo image used in HTML
+documentation as Imagemagick installs binary in this format.
+
+Below commits justify the cause of adding the suffix to binaries
+provided by ImageMagic package:
+https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=dcbb49f707e7ad9bf755dd3275ffc442154b8144
+https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=6e0c24e9b3f9d430dec57f61f8c12c74bca5375d
+
+Signed-off-by:   Bhabu Bindu <bhabubindu@kpit.com>
+Upstream-Status: Inappropriate [OE specific]
+
+===================================================================
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -43,7 +43,7 @@
+ 
+ # Logo image file for HTML docs
+ giflib-logo.gif: ../pic/gifgrid.gif
+-	convert $^ -resize 50x50 $@
++	convert.im7 $^ -resize 50x50 $@
+ 
+ # Philosophical choice: the website gets the internal manual pages
+ allhtml: $(XMLALL:.xml=.html) giflib-logo.gif
diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
similarity index 65%
rename from meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb
rename to meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
index 79afe9a70..7d8a175fe 100644
--- a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb
+++ b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
@@ -5,10 +5,13 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a"
 
 CVE_PRODUCT = "giflib_project:giflib"
 
-DEPENDS = "xmlto-native"
+DEPENDS = "xmlto-native imagemagick-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \
+           file://add_suffix_to_convert_binary_used_in_Makefile.patch"
+
+SRC_URI[sha256sum] = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz"
-SRC_URI[sha256sum] = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd"
 
 do_install() {
     # using autotools's default will end up in /usr/local