Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 630024 - net-fs/samba-4.5.10-r1 fails to build with xsltApplySequenceConstructor: A potential infinite template recursion was detected
Summary: net-fs/samba-4.5.10-r1 fails to build with xsltApplySequenceConstructor: A po...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CVE-2017-5029
  Show dependency tree
 
Reported: 2017-09-05 19:11 UTC by Pacho Ramos
Modified: 2017-12-03 11:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (samba-4.5.10-r1:20170905-190324.log.gz,257.02 KB, application/gzip)
2017-09-05 19:11 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2017-09-05 19:11:15 UTC
Created attachment 492692 [details]
build.log.gz

I get this with libxslt-1.1.30:
[2608/2713] Generating manpages/smb.conf.5
21:09:20 runner  XML_CATALOG_FILES="file:///etc/xml/catalog file:///usr/local/share/xml/catalog file:///var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10-abi_x86_64.amd64/bin/default/docs-xml/build/catalog.xml"                                     export XML_CATALOG_FILES                                     /usr/bin/xsltproc --xinclude --stringparam noreference 0 -o default/docs-xml/manpages/smb.conf.5.xml --nonet /var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10-abi_x86_64.amd64/docs-xml/xslt/expand-sambadoc.xsl /var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10-abi_x86_64.amd64/docs-xml/manpages/smb.conf.5.xml                                     /usr/bin/xsltproc --nonet -o default/docs-xml/manpages/smb.conf.5 /var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10-abi_x86_64.amd64/docs-xml/xslt/man.xsl default/docs-xml/manpages/smb.conf.5.xml 
runtime error: file file:///usr/share/sgml/docbook/xsl-stylesheets/lib/lib.xsl line 58 element choose
xsltApplySequenceConstructor: A potential infinite template recursion was detected.
You can adjust xsltMaxDepth (--maxdepth) in order to raise the maximum number of nested template calls and variables/params (currently set to 3000).
Templates:
#0 name string.subst 
#1 name string.subst 
#2 name string.subst 
#3 name string.subst 
#4 name string.subst 
#5 name string.subst 
#6 name string.subst 
#7 name string.subst 
#8 name string.subst 
#9 name string.subst 
#10 name string.subst 
#11 name string.subst 
#12 name string.subst 
#13 name string.subst 
#14 name string.subst 
Variables:
#0
replacement 
target 
string 
#1
target 
string 
#2
string 
#3
replacement 
target 
string 
#4
target 
string 
#5
string 
#6
replacement 
target 
string 
#7
target 
string 
#8
string 
#9
replacement 
target 
string 
#10
target 
string 
#11
string 
#12
replacement 
target 
string 
#13
target 
string 
#14
string 
error: file default/docs-xml/manpages/smb.conf.5.xml
xsltRunStylesheet : run failed
Waf: Leaving directory `/var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10-abi_x86_64.amd64/bin'
Build failed:  -> task failed (err #11): 
	{task: manpages/smb.conf.5 smb.conf.5.xml,parameters.all.xml -> smb.conf.5}
 * ERROR: net-fs/samba-4.5.10-r1::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line  115:  Called src_compile
 *   environment, line 4584:  Called multilib-minimal_src_compile
 *   environment, line 2865:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 3096:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2731:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2729:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  518:  Called multilib-minimal_abi_src_compile
 *   environment, line 2859:  Called multilib_src_compile
 *   environment, line 3308:  Called waf-utils_src_compile
 *   environment, line 5607:  Called die
 * The specific snippet of code:
 *       "${WAF_BINARY}" ${_mywafconfig} ${jobs} || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=net-fs/samba-4.5.10-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/samba-4.5.10-r1::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/net-fs/samba-4.5.10-r1:20170905-190324.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-fs/samba-4.5.10-r1/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/net-fs/samba-4.5.10-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10-abi_x86_64.amd64'
 * S: '/var/tmp/portage/net-fs/samba-4.5.10-r1/work/samba-4.5.10'


It is because of this upstream change:
https://git.gnome.org/browse/libxslt/commit/?id=1c8e0e556289582fece6f1a59113a7a5bef46ba4
Comment 1 Pacho Ramos gentoo-dev 2017-09-05 19:18:28 UTC
samba-4.5.13 is also affected by this
Comment 2 Mike Gilbert gentoo-dev 2017-09-05 20:32:21 UTC
Seems like samba is missing a dependenecy on app-text/docbook-xsl-stylesheets and related packages.
Comment 3 Mike Gilbert gentoo-dev 2017-09-05 20:40:49 UTC
The samba build failure should be fixed by app-text/docbook-xsl-stylesheets-1.79.1-r2. If someone could confirm this, that would be great.
Comment 4 Pacho Ramos gentoo-dev 2017-09-06 12:20:09 UTC
(In reply to Mike Gilbert from comment #3)
> The samba build failure should be fixed by
> app-text/docbook-xsl-stylesheets-1.79.1-r2. If someone could confirm this,
> that would be great.

I confirm that it works :D

But we need to add app-text/docbook-xsl-stylesheets and dev-libs/libxslt as DEPENDs, I guess
Comment 5 Pacho Ramos gentoo-dev 2017-09-14 11:29:41 UTC
[master 349e169a083] net-fs/samba: app-text/docbook-xsl-stylesheets and dev-libs/libxslt are used at build time (#630024)
 4 files changed, 8 insertions(+)
Comment 6 Manfred Knick 2017-12-01 23:13:23 UTC
Hi, Pacho,

changing profile to 17.0
  ->  emerge -e @world,
net-fs/samba-4.5.10-r1 failed.

With your commit from comment #5 :

> [master 349e169a083] net-fs/samba:
these ebuilds do DEPEND on app-text/docbook-xsl-stylesheets now,
but without explicitly requiring 
. . . >=docbook-xsl-stylesheets-1.79.1-r2              <---    != line 77
......^^.......................^^^^^^^^^^

As Mike pointed out in comment #3 :

> The samba build failure should be fixed by
> app-text/docbook-xsl-stylesheets-1.79.1-r2
...........................................^

Upgrading to -r2, samba emerges fine without any complaints at all.
Comment 7 Michael Hofmann 2017-12-02 00:04:02 UTC
I created a stabilization request for docbook-xsl-stylesheets-1.79.1-r2: 
bug 639398.
Comment 8 Manfred Knick 2017-12-02 09:32:34 UTC
(In reply to Michael Hofmann from comment #7)
> I created a stabilization request for docbook-xsl-stylesheets-1.79.1-r2: 
> bug 639398.

You have beaten me to that: Thanks!
+1 : [ https://bugs.gentoo.org/639398#c1 ]

@ Pacho:

TEST confirmed: _all_ current versions of samba >= 4.5.10-r1 are affected.


# cd   /usr/portage/net-fs/samba

# grep "docbook-xsl-stylesheets" samba*

samba-4.5.10-r1.ebuild: app-text/docbook-xsl-stylesheets
samba-4.5.13.ebuild:    app-text/docbook-xsl-stylesheets
samba-4.5.14.ebuild:    app-text/docbook-xsl-stylesheets
samba-4.5.15.ebuild:    app-text/docbook-xsl-stylesheets
samba-4.6.11.ebuild:    app-text/docbook-xsl-stylesheets
samba-4.6.8-r1.ebuild:  app-text/docbook-xsl-stylesheets
samba-4.6.9.ebuild:     app-text/docbook-xsl-stylesheets
samba-4.7.0-r1.ebuild:  app-text/docbook-xsl-stylesheets
samba-4.7.1.ebuild:     app-text/docbook-xsl-stylesheets
samba-4.7.3.ebuild:     app-text/docbook-xsl-stylesheets
Comment 9 Pacho Ramos gentoo-dev 2017-12-02 09:56:23 UTC
The dep is correct, it's not samba the one that needs that newer revision, that revision is fixing  a bug in libxslt that causes it to fail to build with new libxslt... if you are not running the new libxslt, old docbook will work

Also, you don't need to open a new stabilization bug because bug 612194 is already handling both stabilizations (look to its stabilization field), that need to be done at the same time
Comment 10 Manfred Knick 2017-12-02 10:24:59 UTC
(In reply to Pacho Ramos from comment #9)
> The dep is correct, it's not samba the one that needs that newer revision,
> that revision is fixing  a bug in libxslt that causes it to fail to build
> with new libxslt... if you are not running the new libxslt, old docbook will
> work
> 
> Also, you don't need to open a new stabilization bug because bug 612194 is
> already handling both stabilizations (look to its stabilization field), that
> need to be done at the same time
Pacho, 
thanks for clarification 
and hint to https://bugs.gentoo.org/page.cgi?id=fields.html#status_whiteboard
which I missed.
Comment 11 Michael Hofmann 2017-12-02 11:17:19 UTC
> that revision is fixing  a bug in libxslt that causes it to fail to build
> with new libxslt...

That makes sense. Thanks!

Please take a look at bug 635938. They want to stabilize dev-libs/libxslt-1.1.30-r2, but not docbook-xsl-stylesheets-1.79.1-r2. This may lead to trouble for anyone who emerges Samba.
Comment 12 Pacho Ramos gentoo-dev 2017-12-03 11:05:37 UTC
Ah, right, I have changed that bug to try to prevent this 

see you!