autoconf: Remove/update obsolete autoconf macros Autoconf 2.70 (released in 2020-12) produces warning messages about obsolete constructs by default. Running regen.sh with autoconf 2.70 installed produces the following warnings: .. configure.ac:7: warning: The macro `AC_CONFIG_HEADER' is obsolete. configure.ac:21: warning: AC_PROG_LEX without either yywrap or noyywrap is obsolete configure.ac:21: warning: The macro `AC_HEADER_STDC' is obsolete. configure.ac:21: warning: The macro `AC_HEADER_TIME' is obsolete. .. Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS Add the noyywrap parameter to AC_PROG_LEX. Use the noyywrap option since we already provide a yywrap function in the .l sources. Remove AC_HEADER_STDC. There are no references to the the autoconf variable set by this macro. This macro was marked as obsolete prior to autoconf 2.64 with the following note: "This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro." AC_HEADER_TIME was marked as obsolete prior to autoconf 2.64 with the following note: "This macro is obsolescent, as current systems can include both files when they exist. New programs need not use this macro." The only reference that requires AC_HEADER_TIME is within the external roken code pulled from heimdal. Compiles that use the external upstream heimdal packages result in a build error if TIME_WITH_SYS_TIME is not defined: building src/crypto/hcrypto src/external/heimdal/hcrypto/camellia.c include/roken.h:803:58: error: ‘struct tm’ declared inside Update autoheader.m4 so a define for TIME_WITH_SYS_TIME is created. This avoids modifying the external heimdal/roken code. Change-Id: If4d6c0650aac617f535b35f81994b54a3b8ac021 Reviewed-on: https://gerrit.openafs.org/14838 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Remove rpctestlib There is some code in tests/rpctestlib that appears to be for testing fileserver RPCs and callback processing, added in commit 262a678d (An RPC test dispatch library for vice). However, it has never been used, it seems unlikely that it will be used anytime soon, and it's not clear if it even works (it contains many hard-coded references to interfaces and IP addresses). Just remove the unused code, and some references to rpctestlib. It can always be added back if needed (or more likely, reimplemented to be more in line with our current test framework in tests/ ). Change-Id: Ied3be7474581d8ee75ae000815bb7364d143fd31 Reviewed-on: https://gerrit.openafs.org/14617 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
doc: Look in $srcdir for documentation sources In several places, we look for documentation source files in e.g. 'doc/man-pages', 'doc/xml', etc. But if we are running an objdir build, those directories won't exist relative to the current working directory; we need to look in $srcdir to find them. So, if we're running an objdir build, our man pages and other documentation won't be installed. We don't report any error in this case (the relevant steps are just skipped), since building the documentation is optional, in case the doc sources are not present. To fix this, look in $srcdir in the various places that reference doc source files. Fixing the 'for' loops in the 'dest' and 'install' targets in doc/man-pages requires some extra cd'ing around, because $M is used as part of another path in the body of the loop. Change-Id: Ic3c90ab5e64aeefe6235efb6f6ec26080d7b3a70 Reviewed-on: https://gerrit.openafs.org/14622 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
cf: Run AFS_LT_INIT after setting CC Since libtool support was introduced for 1.8.x in commit 69f26ece (Add libtool support), we've run LT_INIT or AFS_LT_INIT early on in configure.ac. If CC isn't set, AFS_LT_INIT defaults to using gcc when it's available. On Solaris, we set CC and CFLAGS ourselves later (in osconf.m4) to use the Solaris Studio compiler, but this doesn't change the compiler that AFS_LT_INIT already chose. As a result, on Solaris if no value for CC is given during configure and gcc is available, some libtool commands will try to use gcc with CFLAGS intended for the Solaris Studio compiler, which will fail. /bin/sh ../../libtool --quiet --mode=link --tag=CC ... -mt ... gcc: error: unrecognized command line option '-mt'; did you mean '-t'? To fix this, move AFS_LT_INIT into osconf.m4 after our platform-specific macros have had a chance to set CC. Also move our checks for AR, AS, etc. to after AFS_LT_INIT, since AFS_LT_INIT sets those. Note. Without GCC installed on a Solaris system, libtool will find the Solaris Studio compiler (assuming that PATH is set up correctly) and the build will proceed successfully. Just installing the GCC package is sufficient to break the build. This commit fixes a regression from 1.6.x where having the GCC package installed on the system would not break the build. Change-Id: I6458739fa5050eb98e6980e8d7b0ebfcc62d493f Reviewed-on: https://gerrit.openafs.org/14585 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Make OpenAFS 1.9.1 Update version strings for the second 1.9.x development release. Change-Id: I318ff00f02f618e0a25571a3c957ae6a6500e65c Reviewed-on: https://gerrit.openafs.org/14560 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
vol: de-orbit test programs The updateDirInode and listVicepx utilities are obsolete; they no longer build, are severely bitrotted, and have been largely replaced by volscan. While here, also remove other objects that have not been built by default since before the original IBM import: - ILIST ilist.exe - NAMEI_PROGS nicreate, nincdec, nino, nilist Remove all of them from the tree. Change-Id: I8f68ec425cce5e84bcc5f41d598eec23102109de Reviewed-on: https://gerrit.openafs.org/13793 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Make OpenAFS 1.9.0 Update version strings for the first 1.9.x development release. Change-Id: I0d0e204ffe8d64d7c0f794f313c0f24ccea12783 Reviewed-on: https://gerrit.openafs.org/14362 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Use autoconf-archive m4 from src/external Switch to using the m4 macros from autoconf-archive in our src/external mechanism, instead of manually-copied versions in src/cf. The src/external copy of ax_gcc_func_attribute.m4 is identical to the existing copy in src/cf, so that should incur no changes. There are also a few new macros pulled in, but they are currently unused. Increase our AC_PREREQ in configure.ac to 2.64, to match the AC_PREREQ in some of the new files. Change-Id: I8acfe4df7b9a22d9b9e69004c3438034a2dacadb Reviewed-on: https://gerrit.openafs.org/14135 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
build: remove unused LINUX_PKGREL from configure.ac This change removes the unused LINUX_PKGREL definition from the configure.ac file. Commit 6a27e228bac196abada96f34ca9cd57f32e31f5c converted the setting of the RPM package version and release values in the openafs.spec file from autoconf to the makesrpm.pl script. That commit left LINUX_PKGREL in configure.ac because it was still referenced by the Debian packaging, which was still in-tree at that time. Commit ada9dba0756450993a8e57c05ddbcae7d1891582 removed the last trace of the Debian packaging, but missed the removal of the LINUX_PKGREL. Change-Id: I17aeccdb38078faa413f2cd3a935b43238982606 Reviewed-on: https://gerrit.openafs.org/14117 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Run ctfconvert/ctfmerge for all objects Commit 88cb536f (autoconf: detect ctf-tools and add ctf to libafs) introduced running ctfconvert and ctfmerge for libafs on Solaris, but didn't add any CTF data for userspace code. This commit causes the same commands to be run for every binary that we build (if the ctf tools are available). To accomplish this, also refactor how we run ctfconvert and ctfmerge. The approach in commit 88cb536f would require us to modify the makefile rule for every executable to run RUN_CTFCONVERT and RUN_CTFMERGE, which is somewhat impractical. So instead in this commit, we modify all of our *_CCRULE and *_LDRULE variables to wrap the compiler invocation with the new CC_WRAPPER script. This means our *RULE variables change from something like this: FOO_CCRULE = $(RUN_CC) $(CC) $(XXX_FLAGS) -o $@ to something like this: FOO_CCRULE = $(RUN_CC) $(CC_WRAPPER) $(CC) $(XXX_FLAGS) -o $@ CC_WRAPPER expands to the script src/config/cc-wrapper, which just runs ctfconvert or ctfmerge on the relevant files after the compiler/linker runs. If the CTF tools are not configured, CC_WRAPPER expands to nothing, to limit our impact on other platforms. This commit was developed in collaboration with mbarbosa@sinenomine.net. Change-Id: Id19ba9d739edc68f01c2db7d5caa20758ec8144a Reviewed-on: https://gerrit.openafs.org/13308 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
autoconf: Split out krb5/gss tests Move our krb5 and GSS-related autoconf tests into their own separate files, in src/cf/krb5.m4 and src/cf/gss.m4. Change-Id: I4202df5d810f2d3942fc4ffb3fd406869f68029b Reviewed-on: https://gerrit.openafs.org/13237 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
autoconf: updates and cleanup Update autoconf macros to their modern equivalents, according to what the 'autoupdate' tool does. While we're here, remove automake references that aren't being used, and remove the obsolete AC_PROG_LIBTOOL in favor of AFS_LT_INIT. Change-Id: I71066d6d72f8b1d8663e26fec83ae23d7f73f059 Reviewed-on: https://gerrit.openafs.org/12199 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Avoid libtool 'nm' errors Starting around Solaris 11.3, '/usr/bin/nm -p' starts reporting some symbols with the 'C' code. libtool cannot handle this (libtool bug #22373), which causes global_symbol_pipe in the generated libtool script to be empty. This causes a rather confusing error when we go to actually use libtool to link something ("syntax error near unexpected token '|'"; see libtool bug #20947), and prevents the build from continuing. Address this in two ways: For all Solaris 11 builds, default to /usr/sfw/bin/gnm over /usr/bin/nm. This avoids any interop issues with libtool and nm, since libtool of course works very well with GNU tooling. In addition, try to catch any nm-related errors with libtool at configure time, to provide a more helpful error message. To implement these changes, create a wrapper around LT_INIT, called AFS_LT_INIT. Change-Id: I7d47c17f9d9401dc5dcc9676279bf1e4f53554c4 Reviewed-on: https://gerrit.openafs.org/12945 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Make OpenAFS 1.8.0pre1 Update version strings for the first 1.8.0 prerelease. Change-Id: I4f534c9934f6eb1baac9a784fb7c357b19924fb0 Reviewed-on: https://gerrit.openafs.org/12470 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Mark Vitale <mvitale@sinenomine.net> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
macos: use pkgbuild to build the package on 10.10/10.11 PackageMaker is no longer part of OS X. As a result, it is not possible to build the package on OS X 10.10 and OS X 10.11 using the existing code. To solve this problem, a new script, along with a couple of new files, are provided. - pkgbuild.sh This script uses the command line tools pkgbuild and productbuild to build the package on OS X 10.10 and OS X 10.11. By default, the package built by this script will not be signed. Optionally, the package might be signed. - Distribution.xml This file is nothing more than an XML file used by productbuild. It is mainly used to configure how the installer will look and behave. - conclusion.txt Contains the text that is displayed by Installer at the end of the installation process. Only used by El Capitan and further. - Uninstall.14.15 This script can be used by OS X 10.10/10.11 users to uninstall OpenAFS. Notes: - This work is based on a patch made by Brandon Allbery <ballbery@sinenomine.net> with fixes and updates from Andrew Deason <adeason@dson.org>. - El Capitan and further prevent us from touching /usr/bin directly. As a result, /opt is used. - If the package is not signed, the user will have to disable the OS X security protections. Otherwise, the client will not work. - Now we have two different scripts to build the package on OS X. For OS X 10.10 and newer versions, pkgbuild.sh will be used. For older versions, the existing buildpkg.sh will be used. Change-Id: If8320666c553b82af450c0263f5e80a00c33e3b8 Reviewed-on: https://gerrit.openafs.org/12239 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
configure: check for some more krb5 functions We will want to create a krb5_principal object that is used as a sigil for comparison against, and need to do so in a portable fashion. krb5_parse_name and krb5_unparse_name have been around for a long time, but the counterpart krb5_free_unparsed_name is not always available, so provide compatibility for it. krb5_free_keytab_entry_contents is only a symbol in MIT krb5; we will need a compat macro on Heimdal systems where it is not present. Change-Id: I1cfe12910adac39216b8c7dd337b7e22d73555ed Reviewed-on: https://gerrit.openafs.org/11785 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
IRIX: Move src/sgistuff to platform/IRIX Change-Id: Ie7e17859c346e472af1d07adf2c359250f71d653 Reviewed-on: http://gerrit.openafs.org/11634 Reviewed-by: Daria Brashear <shadow@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove traces of Debian packaging In e34e0d1 the Debian packaging was removed. Some traces are still left, so remove those as well. Change-Id: I1d5c22181f59b2bee42dd34c9f3a043297d294a2 Reviewed-on: http://gerrit.openafs.org/11630 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove Debian packaging The packaging used for uploads to Debian is maintained on Debian infrastructure, presently at http://anonscm.debian.org/cgit/pkg-k5-afs/openafs.git . The packaging repository for any given Debian openafs source package will be listed in the Vcs-* fields in the package's control file. The version of the Debian packaging in the openafs repository will almost always be out-of-date and is not used by Debian, and the actual packaging used by Debian is easily available, so there is no purpose in maintaining Debian packaging in the OpenAFS source code repository. Change-Id: I23011315ece011e32cdddd992c4f8a176e348c67 Reviewed-on: http://gerrit.openafs.org/11621 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Retire Makefile.shared It has served its purpose, and been replaced by libtool. Change-Id: Ifb4e2f585fb4239e9138daef82dcc7f41d7f2a99 Reviewed-on: http://gerrit.openafs.org/11485 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: D Brashear <shadow@your-file-system.com>