[PATCH] tdb: Check for sigaction in the standalone build

Amitay Isaacs amitay at gmail.com
Wed Jun 10 07:05:41 MDT 2015


Looks good.  Pushed to autobuild.

Amitay.

On Wed, Jun 10, 2015 at 10:45 PM, Volker Lendecke <Volker.Lendecke at sernet.de
> wrote:

> Hi!
>
> I'm fine with anything here, as long as it works. R-b me for
> the 3 patches moving it to libreplace.
>
> Volker
>
> On Wed, Jun 10, 2015 at 02:37:41PM +0200, Stefan (metze) Metzmacher wrote:
> > Hi,
> >
> > what about the following patches moving the checks to lib/replace.
> >
> > We only need these once for all users.
> >
> > metze
> >
> > Am 10.06.2015 um 14:20 schrieb Amitay Isaacs:
> > > Hi Volker,
> > >
> > > On Wed, Jun 10, 2015 at 9:21 PM, Volker Lendecke <
> Volker.Lendecke at sernet.de>
> > > wrote:
> > >
> > >> Hi!
> > >>
> > >> This fixes bug 11326.
> > >>
> > >> Review&push appreciated!
> > >>
> > >> Thanks,
> > >>
> > >> Volker
> > >>
> > >>
> > > I think we always want to do the check for sigaction and not just for
> > > standalone builds.  Any other project using tdb and building with waf
> might
> > > get a nasty surprise trying to use mutexes.
> > >
> > > How about following patch instead?  It adds it only if
> > > disable_tdb_mutex_locking is not true.
> > >
> > > diff --git a/lib/tdb/wscript b/lib/tdb/wscript
> > > index f63f750..ee8df5f 100644
> > > --- a/lib/tdb/wscript
> > > +++ b/lib/tdb/wscript
> > > @@ -71,6 +71,7 @@ def configure(conf):
> > >                                                   False)
> > >      if not conf.env.disable_tdb_mutex_locking:
> > >          conf.env.replace_add_global_pthread = True
> > > +        conf.CHECK_FUNCS('sigaction')
> > >      conf.RECURSE('lib/replace')
> > >
> > >      conf.env.standalone_tdb = conf.IN_LAUNCH_DIR()
> > >
> > > Amitay.
> > >
>
> > From c3b869feaafb7baf05510edcbdbe7041b3475b62 Mon Sep 17 00:00:00 2001
> > From: Stefan Metzmacher <metze at samba.org>
> > Date: Wed, 10 Jun 2015 14:33:35 +0200
> > Subject: [PATCH 1/3] lib/replace: add signal related configure checks
> >
> > These should be in a central place available for
> > all lib/replace users instead of having each caller
> > do its own checks.
> >
> > BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326
> >
> > Signed-off-by: Stefan Metzmacher <metze at samba.org>
> > ---
> >  lib/replace/wscript | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/lib/replace/wscript b/lib/replace/wscript
> > index 1b156fa..788877c 100644
> > --- a/lib/replace/wscript
> > +++ b/lib/replace/wscript
> > @@ -136,6 +136,7 @@ def configure(conf):
> >      conf.CHECK_TYPE_IN('sa_family_t', 'sys/socket.h')
> >
> >      conf.CHECK_TYPE_IN('sig_atomic_t', 'signal.h',
> define='HAVE_SIG_ATOMIC_T_TYPE')
> > +    conf.CHECK_FUNCS('sigsetmask siggetmask sigprocmask sigblock
> sigaction sigset')
> >
> >      conf.CHECK_FUNCS_IN('''inet_ntoa inet_aton inet_ntop inet_pton
> connect gethostbyname
> >                             getaddrinfo getnameinfo freeaddrinfo
> gai_strerror socketpair''',
> > --
> > 1.9.1
> >
> >
> > From 6850583f029d36af03ed2ee1820635b765b2500d Mon Sep 17 00:00:00 2001
> > From: Stefan Metzmacher <metze at samba.org>
> > Date: Wed, 10 Jun 2015 14:33:35 +0200
> > Subject: [PATCH 2/3] lib/util: remove signal related configure checks
> >
> > These are done in lib/replace now.
> >
> > BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326
> >
> > Signed-off-by: Stefan Metzmacher <metze at samba.org>
> > ---
> >  lib/util/wscript_configure | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
> > index e52ba4a..a17cb56 100644
> > --- a/lib/util/wscript_configure
> > +++ b/lib/util/wscript_configure
> > @@ -7,8 +7,6 @@ if Options.options.disable_fault_handling:
> >  # backtrace could be in libexecinfo or in libc
> >  conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo',
> checklibc=True, headers='execinfo.h')
> >
> > -conf.CHECK_FUNCS('sigprocmask sigblock sigaction')
> > -
> >  conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize',
> define='HAVE_FRSIZE', headers='sys/statvfs.h')
> >
> >  # all the different ways of doing statfs
> > --
> > 1.9.1
> >
> >
> > From d64bcd122ed21a49dbf8550b235c3e728823b296 Mon Sep 17 00:00:00 2001
> > From: Stefan Metzmacher <metze at samba.org>
> > Date: Wed, 10 Jun 2015 14:33:35 +0200
> > Subject: [PATCH 3/3] s3:wscript: remove signal related configure checks
> >
> > These are done in lib/replace now.
> >
> > BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326
> >
> > Signed-off-by: Stefan Metzmacher <metze at samba.org>
> > ---
> >  source3/wscript | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/source3/wscript b/source3/wscript
> > index 0276684..c9f3a37 100644
> > --- a/source3/wscript
> > +++ b/source3/wscript
> > @@ -83,7 +83,7 @@ def configure(conf):
> >      conf.CHECK_FUNCS('strtol strchr strupr chflags')
> >      conf.CHECK_FUNCS('getrlimit fsync fdatasync setpgid')
> >      conf.CHECK_FUNCS('setsid glob strpbrk crypt16 getauthuid')
> > -    conf.CHECK_FUNCS('sigprocmask sigblock sigaction sigset innetgr')
> > +    conf.CHECK_FUNCS('innetgr')
> >      conf.CHECK_FUNCS('initgroups select poll rdchk getgrnam getgrent
> pathconf')
> >      conf.CHECK_FUNCS('setpriv setgidx setuidx setgroups syscall
> sysconf')
> >      conf.CHECK_FUNCS('atexit grantpt posix_openpt fallocate
> posix_fallocate')
> > @@ -380,7 +380,7 @@ rdchk _read __read _readdir __readdir
> >  _seekdir __seekdir
> >  select setenv setgidx setgroups setlocale setluid
> >  setmntent setpgid setpriv setsid setuidx
> > -shmget shm_open sigaction sigblock sigprocmask sigset
> > +shmget shm_open
> >  _stat __stat statvfs
> >  strcasecmp strchr strpbrk strsignal strtol strupr sysconf sysctl
> sysctlbyname
> >  __sys_llseek syslog _telldir __telldir timegm
> > --
> > 1.9.1
> >
>
>
>
>
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
>


More information about the samba-technical mailing list