1From: Steve Langasek <vorlon@netexpress.net> 2To: "Eloy A. Paris" <eloy.paris@usa.net> 3Date: Thu, 23 Aug 2001 21:20:05 -0500 (CDT) 4Subject: Re: autobuilder failure on arm for samba-2.2.1a-3 5In-Reply-To: <20010823100906.A1092@antenas> 6Message-ID: <Pine.LNX.4.30.0108231744090.11071-100000@tennyson.netexpress.net> 7MIME-Version: 1.0 8Content-Type: TEXT/PLAIN; charset=US-ASCII 9 10On Thu, 23 Aug 2001, Eloy A. Paris wrote: 11 12> On Wed, Aug 22, 2001 at 03:01:01PM -0500, Steve Langasek wrote: 13 14> > Hmm. Maybe the thing to do is to focus on getting config.cache (not log, 15> > cache) support into the package. Issues like this are frequent enough with 16> > Samba, and the configure tests add enough time to the build process, that I 17> > think there'd be much benefit in being able to step past a lot of these. 18 19> Uhhmmm... I don't know, I guess I don't like much the idea of 20> maintaining a config.cache. It looks like extra work plus a 21> compilation process that is "synthetic" or atificial. What happens if 22> the Samba Team adds a new test, or modifies the configure script, will 23> the config.cache pick those up? 24 25> In any case, you are the expert, so if you think that's the way to go, 26> and the burden far exceeds the problems we have right now I say let's 27> go for it. I am not well versed on autoconf and the configure process, 28> that's all... 29 30Well, I'll attach my work to the bottom of this message and let you judge it 31for yourself. 32 33The config.cache I'm trying to generate here is not equivalent to what 34a configure script outputs. The only values I'm including are those which 1) 35are no-brainers on any glibc-based platform, 2) are questions we need to force 36a particular value for regardless of the kernel being built against, or 3) are 37questions about specific bizarre features of proprietary Unices that we'll 38always get an answer of 'no' to. 39 40I've removed all of the config.cache variables related to headers, or to 41checks for particular libraries; I think it's pretty safe to assert that glibc 42provides basic C functions like select(), setenv(), and waitpid() on all our 43build targets, but I think it's less safe to assert that they'll always be 44provided by particular header files. 45 46So the config.cache won't automatically be updated with answers to new 47configure tests, but it also doesn't need to in order to be useful. There's 48really only a handful of variables in there that we /need/ in order to 49guarantee correctly-built packages, and if you want to leave out everything 50else, that's perfectly ok too. Everything from the fifth stanza on down is 51just a build-time speed-up for some of the slower architectures. Well, it 52also has the fringe benefit that the packages will FAIL to build if someone 53tries rebuilding for a really bizarre (non-Linux, non-glibc) architecture. I 54see that as a plus :), you may disagree, but in any case my next trick would 55be to add a global variable developers can set to bypass the provided 56config.cache. 57 58 59It is a little artificial, but the whole point of .debs is to be able to build 60binaries in a controlled environment. Right now, we don't really have control 61over what happens in the autobuilders. We have even /less/ control over what 62happens in a stable release: it's been two weeks now since I built binaries 63for bug #94380, and they haven't been uploaded to security.d.o yet. I'm 64guessing they won't be uploaded until Wichert is back from vacation, either -- 65which is fine, but it would be nice if we didn't have to worry about 66mis-builds by the security team, or about putting the security team to extra 67trouble after the fact to get packages fixed. 68 69With a pre-loaded config.cache, we can ensure that bugs of this kind don't 70happen in woody. We can take the arm autobuilder problem into our own hands, 71and not have to worry about quirkiness in the build environment. We can even 72close bug #109773, since we no longer have to worry about detecting the 73setuid() routines. 74 75 76So to me, it definitely seems worth it. But you're the maintainer, and I 77won't ask you to put anything in the package that you're not comfortable with. 78 79 80> By the way, I think I remember someone was able to build 2.2.x succesfully on 81> the ARM. If this is the case, could it be that there's something weird 82> with Phillip's setup? 83 84It could be. There are arm packages for 2.2.1a-1, so at /some/ point the 85autobuilder was able to pass the locking test. 86 87 88> P.S. How did you know about the ARM build problems? I don't see any 89> bugs about this... 90 91<http://ftp-master.debian.org/testing/>, follow the links for samba... The 92exact reference for the arm autobuilder is at 93<http://buildd.armlinux.org/~buildd/build.php?pkg=samba&ver=2.2.1a-4&arch=arm>. 94 95Regards, 96Steve Langasek 97postmodern programmer 98 99 100diff -uNrw samba-2.2.1a-bak/debian/changelog samba-2.2.1a/debian/changelog 101--- samba-2.2.1a-bak/debian/changelog Thu Aug 23 10:27:54 2001 102+++ samba-2.2.1a/debian/changelog Thu Aug 23 10:28:08 2001 103@@ -1,3 +1,12 @@ 104+samba (2.2.1a-4.1) unstable; urgency=low 105+ 106+ * Fix up the build system to avoid needing to run configure as root to 107+ answer questions we already know the answers to. 108+ * In the process, make surprising progress towards being able to 109+ cross-compile the samba packages. 110+ 111+ -- Steve Langasek <vorlon@debian.org> Wed, 22 Aug 2001 23:35:00 -0500 112+ 113 samba (2.2.1a-4) unstable; urgency=low 114 115 * Fixed typo in smbmount's mount page. 116diff -uNrw samba-2.2.1a-bak/debian/config.cache samba-2.2.1a/debian/config.cache 117--- samba-2.2.1a-bak/debian/config.cache Wed Dec 31 18:00:00 1969 118+++ samba-2.2.1a/debian/config.cache Thu Aug 23 10:28:08 2001 119@@ -0,0 +1,231 @@ 120+# 121+# 22 August 2001 Steve Langasek <vorlon@debian.org> 122+# 123+# This file is a shell script that caches the results of configure 124+# tests run on this system so they can be shared between configure 125+# scripts and configure runs. It is not useful on other systems. 126+# If it contains results you don't want to keep, you may remove or edit it. 127+# 128+# By default, configure uses ./config.cache as the cache file, 129+# creating it if it does not exist already. You can give configure 130+# the --cache-file=FILE option to use a different cache file; that is 131+# what configure does when it calls configure scripts in 132+# subdirectories, so they share the cache. 133+# Giving --cache-file=/dev/null disables caching, for debugging configure. 134+# config.status only pays attention to the cache file if you give it the 135+# --recheck option to rerun configure. 136+# 137+# 138+# This config.cache file contains a list of acceptable autoconf 139+# values which can be used in compiling Samba for Debian woody/sid. 140+# 141+# Autoconf sorts options alphabetically in its output. This file 142+# groups options logically. 143+ 144+ 145+# Load any architecture-specific settings 146+if [ -n "$DEB_HOST_GNU_TYPE" \ 147+ -a -f ../debian/config.cache.${DEB_HOST_GNU_TYPE} ]; then 148+ . ../debian/config.cache.${DEB_HOST_GNU_TYPE} 149+fi 150+ 151+ 152+# This is at the top because it's most in need of regular tweaking. 153+# These are options which are supported on 2.4 kernels, but not on 2.2 154+# kernels. 155+ 156+samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=${samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no} 157+samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=${samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no} 158+samba_cv_HAVE_KERNEL_SHARE_MODES=${samba_cv_HAVE_KERNEL_SHARE_MODES=no} 159+ 160+ 161+# These are present in 2.2 kernels, but not in 2.0... 162+ 163+samba_cv_have_setresuid=${samba_cv_have_setresuid=yes} 164+samba_cv_have_setresgid=${samba_cv_have_setresgid=yes} 165+samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=yes} 166+ 167+ 168+# POSIX ACL support not present in Linux 2.2; not allowed in the 169+# Debian packages, even if present on the build machine. 170+ 171+ac_cv_header_sys_acl_h=${ac_cv_header_sys_acl_h=no} 172+ 173+ 174+# Various basic libc/compiler stuff that it's blindingly obvious that 175+# Linux supports (now watch me get bitten for saying that) 176+ 177+ac_cv_c_const=${ac_cv_c_const=yes} 178+ac_cv_c_inline=${ac_cv_c_inline=inline} 179+samba_cv_volatile=${samba_cv_volatile=yes} 180+ac_cv_dirent_d_off=${ac_cv_dirent_d_off=yes} 181+ac_cv_func_bzero=${ac_cv_func_bzero=yes} 182+ac_cv_func_chmod=${ac_cv_func_chmod=yes} 183+ac_cv_func_chown=${ac_cv_func_chown=yes} 184+ac_cv_func_chroot=${ac_cv_func_chroot=yes} 185+ac_cv_func_connect=${ac_cv_func_connect=yes} 186+ac_cv_func_dup2=${ac_cv_func_dup2=yes} 187+ac_cv_func_execl=${ac_cv_func_execl=yes} 188+ac_cv_func_fchmod=${ac_cv_func_fchmod=yes} 189+ac_cv_func_fchown=${ac_cv_func_fchown=yes} 190+ac_cv_func_fstat=${ac_cv_func_fstat=yes} 191+ac_cv_func_fsync=${ac_cv_func_fsync=yes} 192+ac_cv_func_ftruncate=${ac_cv_func_ftruncate=yes} 193+ac_cv_func_getcwd=${ac_cv_func_getcwd=yes} 194+ac_cv_func_getgrent=${ac_cv_func_getgrent=yes} 195+ac_cv_func_getgrnam=${ac_cv_func_getgrnam=yes} 196+ac_cv_func_getspnam=${ac_cv_func_getspnam=yes} 197+ac_cv_func_glob=${ac_cv_func_glob=yes} 198+ac_cv_func_grantpt=${ac_cv_func_grantpt=yes} 199+ac_cv_func_initgroups=${ac_cv_func_initgroups=yes} 200+ac_cv_func_llseek=${ac_cv_func_llseek=yes} 201+ac_cv_func_memcmp_clean=${ac_cv_func_memcmp_clean=yes} 202+ac_cv_func_memmove=${ac_cv_func_memmove=yes} 203+ac_cv_func_memset=${ac_cv_func_memset=yes} 204+ac_cv_func_mktime=${ac_cv_func_mktime=yes} 205+ac_cv_func_pipe=${ac_cv_func_pipe=yes} 206+ac_cv_func_poll=${ac_cv_func_poll=yes} 207+ac_cv_func_pread=${ac_cv_func_pread=yes} 208+ac_cv_func_pwrite=${ac_cv_func_pwrite=yes} 209+ac_cv_func_rand=${ac_cv_func_rand=yes} 210+ac_cv_func_random=${ac_cv_func_random=yes} 211+ac_cv_func_readlink=${ac_cv_func_readlink=yes} 212+ac_cv_func_rename=${ac_cv_func_rename=yes} 213+ac_cv_func_select=${ac_cv_func_select=yes} 214+ac_cv_func_setenv=${ac_cv_func_setenv=yes} 215+ac_cv_func_setgroups=${ac_cv_func_setgroups=yes} 216+ac_cv_func_setsid=${ac_cv_func_setsid=yes} 217+ac_cv_func_sigaction=${ac_cv_func_sigaction=yes} 218+ac_cv_func_sigblock=${ac_cv_func_sigblock=yes} 219+ac_cv_func_sigprocmask=${ac_cv_func_sigprocmask=yes} 220+ac_cv_func_snprintf=${ac_cv_func_snprintf=yes} 221+ac_cv_func_srand=${ac_cv_func_srand=yes} 222+ac_cv_func_srandom=${ac_cv_func_srandom=yes} 223+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes} 224+ac_cv_func_strchr=${ac_cv_func_strchr=yes} 225+ac_cv_func_strdup=${ac_cv_func_strdup=yes} 226+ac_cv_func_strerror=${ac_cv_func_strerror=yes} 227+ac_cv_func_strftime=${ac_cv_func_strftime=yes} 228+ac_cv_func_strpbrk=${ac_cv_func_strpbrk=yes} 229+ac_cv_func_strtoul=${ac_cv_func_strtoul=yes} 230+ac_cv_func_symlink=${ac_cv_func_symlink=yes} 231+ac_cv_func_usleep=${ac_cv_func_usleep=yes} 232+ac_cv_func_utime=${ac_cv_func_utime=yes} 233+ac_cv_func_utimes=${ac_cv_func_utimes=yes} 234+ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf=yes} 235+ac_cv_func_waitpid=${ac_cv_func_waitpid=yes} 236+ac_cv_type_ino_t=${ac_cv_type_ino_t=yes} 237+ac_cv_type_mode_t=${ac_cv_type_mode_t=yes} 238+ac_cv_type_pid_t=${ac_cv_type_pid_t=yes} 239+ac_cv_type_size_t=${ac_cv_type_size_t=yes} 240+ac_cv_type_uid_t=${ac_cv_type_uid_t=yes} 241+samba_cv_socklen_t=${samba_cv_socklen_t=yes} 242+ 243+# Yes, we know Linux supports fcntl locking. Just ignore 244+# any errors caused by building on an NFS mount. 245+samba_cv_HAVE_FCNTL_LOCK=${samba_cv_HAVE_FCNTL_LOCK=yes} 246+ 247+ 248+# smbwrapper doesn't work because the glibc maintainers don't want 249+# to support transparent userland VFS. We might as well preempt 250+# any checks for shadowed symbols that are only useful for smbwrapper. 251+ 252+ac_cv_func___acl=${ac_cv_func___acl=no} 253+ac_cv_func__acl=${ac_cv_func__acl=no} 254+ac_cv_func___chdir=${ac_cv_func___chdir=no} 255+ac_cv_func__chdir=${ac_cv_func__chdir=no} 256+ac_cv_func___close=${ac_cv_func___close=no} 257+ac_cv_func__close=${ac_cv_func__close=no} 258+ac_cv_func___closedir=${ac_cv_func___closedir=no} 259+ac_cv_func__closedir=${ac_cv_func__closedir=no} 260+ac_cv_func___dup=${ac_cv_func___dup=no} 261+ac_cv_func__dup=${ac_cv_func__dup=no} 262+ac_cv_func___dup2=${ac_cv_func___dup2=no} 263+ac_cv_func__dup2=${ac_cv_func__dup2=no} 264+ac_cv_func___facl=${ac_cv_func___facl=no} 265+ac_cv_func__facl=${ac_cv_func__facl=no} 266+ac_cv_func___fchdir=${ac_cv_func___fchdir=no} 267+ac_cv_func__fchdir=${ac_cv_func__fchdir=no} 268+ac_cv_func___fcntl=${ac_cv_func___fcntl=no} 269+ac_cv_func__fcntl=${ac_cv_func__fcntl=no} 270+ac_cv_func___fork=${ac_cv_func___fork=no} 271+ac_cv_func__fork=${ac_cv_func__fork=no} 272+ac_cv_func___fstat=${ac_cv_func___fstat=no} 273+ac_cv_func__fstat=${ac_cv_func__fstat=no} 274+ac_cv_func___fstat64=${ac_cv_func___fstat64=no} 275+ac_cv_func__fstat64=${ac_cv_func__fstat64=no} 276+ac_cv_func___fxstat=${ac_cv_func___fxstat=no} 277+ac_cv_func___getcwd=${ac_cv_func___getcwd=no} 278+ac_cv_func__getcwd=${ac_cv_func__getcwd=no} 279+ac_cv_func___getdents=${ac_cv_func___getdents=no} 280+ac_cv_func__getdents=${ac_cv_func__getdents=no} 281+ac_cv_func___llseek=${ac_cv_func___llseek=no} 282+ac_cv_func___sys_llseek=${ac_cv_func___sys_llseek=no} 283+ac_cv_func__llseek=${ac_cv_func__llseek=no} 284+ac_cv_func___lseek=${ac_cv_func___lseek=no} 285+ac_cv_func__lseek=${ac_cv_func__lseek=no} 286+ac_cv_func___lstat=${ac_cv_func___lstat=no} 287+ac_cv_func__lstat=${ac_cv_func__lstat=no} 288+ac_cv_func___lstat64=${ac_cv_func___lstat64=no} 289+ac_cv_func__lstat64=${ac_cv_func__lstat64=no} 290+ac_cv_func___lxstat=${ac_cv_func___lxstat=no} 291+ac_cv_func___open=${ac_cv_func___open=no} 292+ac_cv_func__open=${ac_cv_func__open=no} 293+ac_cv_func___open64=${ac_cv_func___open64=no} 294+ac_cv_func__open64=${ac_cv_func__open64=no} 295+ac_cv_func___opendir=${ac_cv_func___opendir=no} 296+ac_cv_func__opendir=${ac_cv_func__opendir=no} 297+ac_cv_func___pread=${ac_cv_func___pread=no} 298+ac_cv_func__pread=${ac_cv_func__pread=no} 299+ac_cv_func___pread64=${ac_cv_func___pread64=no} 300+ac_cv_func__pread64=${ac_cv_func__pread64=no} 301+ac_cv_func___pwrite=${ac_cv_func___pwrite=no} 302+ac_cv_func__pwrite=${ac_cv_func__pwrite=no} 303+ac_cv_func___pwrite64=${ac_cv_func___pwrite64=no} 304+ac_cv_func__pwrite64=${ac_cv_func__pwrite64=no} 305+ac_cv_func___read=${ac_cv_func___read=no} 306+ac_cv_func__read=${ac_cv_func__read=no} 307+ac_cv_func___readdir=${ac_cv_func___readdir=no} 308+ac_cv_func__readdir=${ac_cv_func__readdir=no} 309+ac_cv_func___readdir64=${ac_cv_func___readdir64=no} 310+ac_cv_func__readdir64=${ac_cv_func__readdir64=no} 311+ac_cv_func___seekdir=${ac_cv_func___seekdir=no} 312+ac_cv_func__seekdir=${ac_cv_func__seekdir=no} 313+ac_cv_func___stat=${ac_cv_func___stat=no} 314+ac_cv_func__stat=${ac_cv_func__stat=no} 315+ac_cv_func___stat64=${ac_cv_func___stat64=no} 316+ac_cv_func__stat64=${ac_cv_func__stat64=no} 317+ac_cv_func___telldir=${ac_cv_func___telldir=no} 318+ac_cv_func__telldir=${ac_cv_func__telldir=no} 319+ac_cv_func___write=${ac_cv_func___write=no} 320+ac_cv_func__write=${ac_cv_func__write=no} 321+ac_cv_func___xstat=${ac_cv_func___xstat=no} 322+ 323+ 324+ 325+# Miscellaneous stuff that isn't, and shouldn't be, available 326+# in Debian. Those interested in building debs for other systems may 327+# need to remove some of these defines. 328+ 329+ac_cv_func_bigcrypt=${ac_cv_func_bigcrypt=no} 330+ac_cv_func_crypt16=${ac_cv_func_crypt16=no} 331+ac_cv_func_getauthuid=${ac_cv_func_getauthuid=no} 332+ac_cv_func_getprpwnam=${ac_cv_func_getprpwnam=no} 333+ac_cv_func_getpwanam=${ac_cv_func_getpwanam=no} 334+ac_cv_func_putprpwnam=${ac_cv_func_putprpwnam=no} 335+ac_cv_func_rdchk=${ac_cv_func_rdchk=no} 336+ac_cv_func_set_auth_parameters=${ac_cv_func_set_auth_parameters=no} 337+ac_cv_func_setgidx=${ac_cv_func_setgidx=no} 338+ac_cv_func_setluid=${ac_cv_func_setluid=no} 339+ac_cv_func_setpriv=${ac_cv_func_setpriv=no} 340+ac_cv_func_setuidx=${ac_cv_func_setuidx=no} 341+ac_cv_lib_sec_bigcrypt=${ac_cv_lib_sec_bigcrypt=no} 342+ac_cv_lib_sec_getprpwnam=${ac_cv_lib_sec_getprpwnam=no} 343+ac_cv_lib_sec_getspnam=${ac_cv_lib_sec_getspnam=no} 344+ac_cv_lib_sec_putprpwnam=${ac_cv_lib_sec_putprpwnam=no} 345+ac_cv_lib_sec_set_auth_parameters=${ac_cv_lib_sec_set_auth_parameters=no} 346+ac_cv_lib_security_bigcrypt=${ac_cv_lib_security_bigcrypt=no} 347+ac_cv_lib_security_getprpwnam=${ac_cv_lib_security_getprpwnam=no} 348+ac_cv_lib_security_getspnam=${ac_cv_lib_security_getspnam=no} 349+ac_cv_lib_security_putprpwnam=${ac_cv_lib_security_putprpwnam=no} 350+ac_cv_lib_security_set_auth_parameters=${ac_cv_lib_security_set_auth_parameters=no} 351diff -uNrw samba-2.2.1a-bak/debian/config.cache.alpha-linux samba-2.2.1a/debian/config.cache.alpha-linux 352--- samba-2.2.1a-bak/debian/config.cache.alpha-linux Wed Dec 31 18:00:00 1969 353+++ samba-2.2.1a/debian/config.cache.alpha-linux Thu Aug 23 10:28:08 2001 354@@ -0,0 +1,12 @@ 355+# 22 Aug 2001 Steve Langasek <vorlon@debian.org> 356+ 357+# This file contains autoconf settings specific to the alpha-linux 358+# platform that should be preloaded when building for this architecture. 359+ 360+ 361+# Linux 2.2 on Alpha doesn't have a functional setresgid() call, but 362+# Linux 2.4 does. Ensure that packages compiled for woody remain 363+# compatible with 2.2 kernels, even if the build machine is running 2.4. 364+samba_cv_have_setresgid=${samba_cv_have_setresgid=no} 365+samba_cv_USE_SETRESUID=${samba_cv_USE_SETRESUID=no} 366+samba_cv_USE_SETREUID=${samba_cv_USE_SETREUID=yes} 367diff -uNrw samba-2.2.1a-bak/debian/rules samba-2.2.1a/debian/rules 368--- samba-2.2.1a-bak/debian/rules Thu Aug 23 10:27:54 2001 369+++ samba-2.2.1a/debian/rules Thu Aug 23 10:28:08 2001 370@@ -15,6 +15,14 @@ 371 # This has to be exported to make some magic below work. 372 export DH_OPTIONS 373 374+# Set the host and build architectures for use with config.cache loading, 375+# cross-building, etc. 376+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 377+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 378+ 379+export DEB_HOST_GNU_TYPE 380+export DEB_BUILD_GNU_TYPE 381+ 382 BVARS = SMBLOGFILE=/var/log/smb NMBLOGFILE=/var/log/nmb 383 384 DESTDIR=`pwd`/debian/samba 385@@ -48,8 +56,11 @@ 386 # ./configure --with-fhs --prefix=/usr --sysconfdir=/etc \ 387 # --localstatedir=/var 388 389+ if [ -f debian/config.cache ]; then \ 390+ cp -f debian/config.cache source/config.cache; \ 391+ fi 392 # [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --exec-prefix=/usr --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp) 393- [ -f source/Makefile ] || (cd source && ./configure --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) 394+ [ -f source/Makefile ] || (cd source && ./configure --host=$(DEB_HOST_GNU_TYPE)-gnu --build=$(DEB_BUILD_GNU_TYPE)-gnu --with-fhs --prefix=/usr --sysconfdir=/etc --with-privatedir=/etc/samba --with-lockdir=/var/state/samba --localstatedir=/var --with-netatalk --with-smbmount --with-pam --with-syslog --with-sambabook --with-utmp --with-readline --with-pam_smbpass) 395 396 touch configure-stamp 397 398