Hello community, here is the log from the commit of package libxslt for openSUSE:Factory checked in at 2015-02-06 10:44:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libxslt (Old) and /work/SRC/openSUSE:Factory/.libxslt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libxslt" Changes: -------- --- /work/SRC/openSUSE:Factory/libxslt/libxslt.changes 2012-12-19 14:50:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libxslt.new/libxslt.changes 2015-02-06 10:44:11.000000000 +0100 @@ -1,0 +2,6 @@ +Sun Feb 1 06:09:25 UTC 2015 - [email protected] + +- add 0009-Make-generate-id-deterministic.patch from debian's + reproducible builds project to avoid randomness in generated IDs + +------------------------------------------------------------------- New: ---- 0009-Make-generate-id-deterministic.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libxslt-python.spec ++++++ --- /var/tmp/diff_new_pack.gGJeu3/_old 2015-02-06 10:44:12.000000000 +0100 +++ /var/tmp/diff_new_pack.gGJeu3/_new 2015-02-06 10:44:12.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libxslt-python # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++++++ libxslt.spec ++++++ --- /var/tmp/diff_new_pack.gGJeu3/_old 2015-02-06 10:44:12.000000000 +0100 +++ /var/tmp/diff_new_pack.gGJeu3/_new 2015-02-06 10:44:12.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package libxslt # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Source3: xslt-config.1.gz Patch0: %{name}-1.1.24-no-net-autobuild.patch Patch1: libxslt-config-fixes.patch +Patch2: 0009-Make-generate-id-deterministic.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libgcrypt-devel BuildRequires: libgpg-error-devel @@ -118,6 +119,7 @@ %setup -q %patch0 %patch1 +%patch2 -p1 %build autoreconf --force --install --verbose ++++++ 0009-Make-generate-id-deterministic.patch ++++++ Description: Make generate-id() return identifiers in a deterministic way generate-id() used to return identifiers based on the memory address of the node object. This unfortunately prevents documentation to be built reproducily. Instead, we now increment a static counter and store its value in the node _private on the first invocation of generate-id(). Author: Jérémy Bobbio <[email protected]> --- libxslt-1.1.28.orig/libxslt/functions.c +++ libxslt-1.1.28/libxslt/functions.c @@ -660,12 +660,11 @@ xsltFormatNumberFunction(xmlXPathParserC */ void xsltGenerateIdFunction(xmlXPathParserContextPtr ctxt, int nargs){ - static char base_address; + static unsigned long next_id = 1; xmlNodePtr cur = NULL; xmlXPathObjectPtr obj = NULL; - long val; + unsigned long val; xmlChar str[30]; - xmlDocPtr doc; if (nargs == 0) { cur = ctxt->context->node; @@ -698,31 +697,20 @@ xsltGenerateIdFunction(xmlXPathParserCon ctxt->error = XPATH_INVALID_ARITY; return; } - /* - * Okay this is ugly but should work, use the NodePtr address - * to forge the ID - */ - if (cur->type != XML_NAMESPACE_DECL) - doc = cur->doc; - else { - xmlNsPtr ns = (xmlNsPtr) cur; - - if (ns->context != NULL) - doc = ns->context; - else - doc = ctxt->context->doc; - - } if (obj) xmlXPathFreeObject(obj); - val = (long)((char *)cur - (char *)&base_address); - if (val >= 0) { - sprintf((char *)str, "idp%ld", val); - } else { - sprintf((char *)str, "idm%ld", -val); + if (cur->_private == NULL) { + cur->_private = xmlMalloc(sizeof (unsigned long)); + if (cur->_private == NULL) { + xmlGenericError(xmlGenericErrorContext, "malloc failed !\n"); + } + *((unsigned long *)cur->_private) = next_id++; } + val = *((unsigned long *)cur->_private); + + sprintf((char *)str, "id%lu", val); valuePush(ctxt, xmlXPathNewString(str)); } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
