Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288536 - net-fs/samba-{libs,client,server}-3.4 sys-libs/{tbd,talloc,tevent} usage is considered harmful
Summary: net-fs/samba-{libs,client,server}-3.4 sys-libs/{tbd,talloc,tevent}
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick Lauer
Depends on:
Blocks: bad-autotools
  Show dependency tree
Reported: 2009-10-11 11:00 UTC by Peter Volkov (RETIRED)
Modified: 2009-11-04 11:50 UTC (History)
3 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2009-10-11 11:00:44 UTC
Usage of is highly discouraged. For details, please, read:

BTW, econf does not need || die at the end.
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2009-10-11 11:02:25 UTC
And instead of ./, please, either use eautoreconf or add comment why that's impossible so we could fix autotools eclass. Thanks.
Comment 2 Marcel Greter 2009-10-14 06:45:15 UTC
I did try to use eautoreconf for the samba ebuilds, but it does not seem to work (I'm no expert when it comes to autotools). I guess the problem is that this samba release is a mix from samba3 and samba4 source code (it's quite confusing and seems a bit "hacked" together).

Best result I got so far was with


AT_M4DIR="m4 ../m4 ../lib/replace ../source4" eautoreconf

> aclocal.m4:9783: error: m4_defn: undefined macro: _m4_divert_diversion

I also get this error when I try to use aclocal/autoconf directly. So it's not really a problem with eautoreconf, but with samba itself (doesn't like the aclocal). Tried quite a lot to debug but I'm out of ideas here. Samba 3.3.8 hadn't used the call, but samba 3.4.2 didn't compile here without (at least when compiling the samba3/samba4 hybrid "franky" version).
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-10-14 07:26:31 UTC
Marcel, that's not really any excuse.

That kind of diversion problem *has* to be fixed. Which part of the package gave you that? A quick glance shows me that at least tdb seems to work fine with autoreconf.

Patrick: please learn how to use package.mask when committing ebuilds that are incomplete. This is just the last in a series of problems with the new samba ebuilds.
Comment 4 Patrick Lauer gentoo-dev 2009-10-22 18:28:49 UTC
(In reply to comment #3)
> Marcel, that's not really any excuse.
> That kind of diversion problem *has* to be fixed. Which part of the package
> gave you that? A quick glance shows me that at least tdb seems to work fine
> with autoreconf.

***** autoconf *****
***** PWD: /var/tmp/portage/sys-libs/tdb-1.1.5/work/tdb-1.1.5
***** autoconf

/usr/bin/m4:aclocal.m4:1: cannot open `libreplace.m4': No such file or directory
autom4te-2.63: /usr/bin/m4 failed with exit status: 1

And I have no idea how to motivate it to work, setting AT_M4DIR doesn't seem to do anything. So if anyone feels like fixing it go ahead ...

Comment 5 Peter Volkov (RETIRED) gentoo-dev 2009-10-23 10:49:40 UTC
(In reply to comment #4)
> And I have no idea how to motivate it to work, setting AT_M4DIR doesn't seem > to do anything.

If you have no idea then debug, explore, ask others or do whatever you want. Just don't not push stupid things to the tree and if you did, fix them. Tree is not overlay keep whatever stuff you wish to have there. And if you think autotools.eclass is unable to handle this configuration, open bug and let others check. Just don't push such things to the tree.

Now, let's look at tdb ebuild:


1. This dependency moved me back to question, that you were asked on original bug: what is the reason to provide virtual/tdb? Virtuals are good for different implementations, and in this case, tdb and samba-libs[tdb] are exactly same sources. So why there is even need this virtual?

BINPROGS="bin/tdbdump bin/tdbtool bin/tdbbackup"

2. Don't pollute global environment without real necessity. Is there any?

src_prepare() {

    ./ || die " failed"

3. Why do need to run I've checked and configure script provided with package itself and generated with autoconf-2.63 are _identical_. Why on the earth you, being maintainer of this package, have not checked this? This really makes me wonder, have you even looked at the package _before_ commit?

And don't blame autotools eclass. This package does not use anything but autoconf so eauto_re_conf is not required here. Make yourself familiar with autotools, please. So

    eautoconf -Ilibreplace

does the work here. But, as I told above, this work just takes users to wait without real gain...

    sed -i \
        -e 's|CC = @CC@|CC = @CC@\
LDFLAGS = @LDFLAGS@|' \ || die "sed failed"

4. Please, explain what does this crap means? Not speaking that it can be sedded better, LDFLAGS are already in Also even if you don't patch but run sed, try to modify correctly, like:

     sed -e 's:$(SHLD_FLAGS) :$(SHLD_FLAGS) $(LDFLAGS) :' -i

Also have you sent patch upstream?

src_configure() {

    econf \
        --sysconfdir=/etc/samba \
        --localstatedir=/var \
        --enable-largefile \

5. AC_SYS_LARGEFILE is standard autoconf macros and it always enables lfs in case platform supports it. So you don't need to pass this here. A good example of violation of KISS principal.

        $(use_enable python) \
    || die "econf failed"

6. Already told you about || die. Use it thoughtfully.

src_compile() {

    emake dirs || die "emake dirs failed"
    emake showflags || die "emake showflags failed"
    emake shared-build || die "emake shared-build failed"
    if use tools ; then emake ${BINPROGS} || die "emake binaries failed"; fi
    if use python ; then emake build-python || die "emake build-python failed"; fi
    if use tdbtest ; then make bin/tdbtest || die "emake tdbtest failed"; fi


7. Do you think such things are easy to understand/maintain? Think at least a bit of those who'll follow this work and try to avoid such things. If you want to do this clean, please, sed's 'all:' and probably 'install::' targets for this. This is workaround too, but much more clean. Better solution is to patch to provide --with-tools options and push patch upstream.

And src_install looks ridiculous since make DESTDIR="${D}" install works here.

> So if anyone feels like fixing it go ahead ...

You took this package, so go ahead and continue work on it and fix crap you've commited yourself. I'm not using samba to do correct testing so it's your job and fix all other ebuilds in the tree too. Thanks.
Comment 6 Patrick Lauer gentoo-dev 2009-11-04 11:50:52 UTC
Fixed the abuse and the style issues I agreed with.