guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PHP on core-updates


From: Julien Lepiller
Subject: Re: PHP on core-updates
Date: Tue, 28 Feb 2017 09:03:19 +0100

On Mon, 27 Feb 2017 16:09:58 -0500
Leo Famulari <address@hidden> wrote:

> On Mon, Feb 27, 2017 at 11:24:42AM +0100, julien lepiller wrote:
> > I think php-for-gd would break with the new version (it would fail
> > to apply the patches), so I'd like to get rid of it, and use our gd
> > package instead.  
> 
> Okay, sounds good!
> 
> > I found an issue with gd that was discovered by php, reported to gd
> > and fixed in their repo. I've extracted a patch from the gd repo
> > and would like to add it to our package. I found a way to "fix" the
> > newly failing tests and reported them upstream. I've attached two
> > patches I'd like to see in core-updates. I haven't tested them yet,
> > though, but comments would be highly appreciated ;)  
> 
> It's expected that contributors test their submissions before sending
> them, or put a note in the message subject like "WIP". Please let us
> know the result of your test :)

It was going to take some time to build all dependencies, but I
wanted feedback quickly. Ok for the "WIP" thing, I'll think about that
next time. I've tried to build php and failed because it depends on glib
that fails to build on core-updates because one test hangs.

> 
> > From 6ee0afac1c72c8e92dcd0384090ead62d5e0cf8a Mon Sep 17 00:00:00
> > 2001 From: Julien Lepiller <address@hidden>
> > Date: Mon, 27 Feb 2017 11:09:11 +0100
> > Subject: [PATCH 1/2] gnu: gd: Fix an issue with XBM decoding.
> > 
> > * gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch: New
> > file.
> > * gnu/local.scm (dist_patch_DATA): Add it.
> > * gnu/packages/gd.scm (gd)[source]: Use it.  
> 
> [...]
> 
> > diff --git
> > a/gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch
> > b/gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch new
> > file mode 100644 index 0000000..bfaa4ff --- /dev/null
> > +++ b/gnu/packages/patches/gd-php-73968-Fix-109-XBM-reading.patch
> > @@ -0,0 +1,114 @@
> > +From 082c5444838ea0d84f9fb6441aefdb44d78d9bba Mon Sep 17 00:00:00
> > 2001 +From: "Christoph M. Becker" <address@hidden>
> > +Date: Fri, 20 Jan 2017 22:48:20 +0100
> > +Subject: [PATCH] Fix #109: XBM reading fails with printed error
> > +
> > +When calculating the number of required bytes of an XBM image, we
> > have +to take the line padding into account.
> > +
> > +This patch has been taken from the gd repository and binary files
> > have been +removed from the patch because our patch procedure
> > doesn't support that format. +---
> > + src/gd_xbm.c                     |   2 +-
> > + tests/xbm/CMakeLists.txt         |   1 +
> > + tests/xbm/Makemodule.am          |   5 ++++-
> > + tests/xbm/github_bug_109.c       |  35
> > +++++++++++++++++++++++++++++++++++
> > + tests/xbm/github_bug_109.xbm     |   5 +++++
> > + 5 files changed, 47 insertions(+), 2 deletions(-)
> > + create mode 100644 tests/xbm/github_bug_109.c
> > + create mode 100644 tests/xbm/github_bug_109.xbm
> > + create mode 100644 tests/xbm/github_bug_109_exp.png  
> 
> We should always include links to the upstream bug report (if one
> exists) and source of the 3rd-party patch in the patch file that is
> being added (in this case, in
> 'gd-php-73968-Fix-109-XBM-reading.patch'). This makes it more likely
> that people will review it. I'm sure you can imagine that it's
> exhausting to hunt down the origin and reasoning behind every
> 3rd-party patch.

The php bug report is this one: https://bugs.php.net/bug.php?id=73968.

> 
> I guess these are some relevant bug reports (I did not find the PHP
> report): https://bitbucket.org/libgd/gd-libgd/issues/109
> https://github.com/libgd/libgd/issues/109
> 
> And the source of the patch is this:
> https://github.com/libgd/libgd/commit/082c5444838ea0d84f9fb6441aefdb44d78d9bba
> 
> Do you know if this change have a security impact? Is XBM still used
> widely?

It was not marked as a security bug in php or gd, so I don't think so.
That patch is required for a test not to fail in php though. If you
don't like having patches around, I could also disable the test in php.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]