build: clean up some more generated files Commit c1d39153da00d5525b2f7874b2d214a7f1b1bb86 added a cc-wrapper script to help generate CTF data for all objects, which is generated by configure. Remove it in the distclean target so we don't leave a stray file hanging around. Commit 48ce41a447c354b8a20b769e4aa5b502ba5bcc09 added a pkgbuild.sh script, to be used to build packages for newer versions of macOS, supplementing the buildpkg.sh that was previously used. Clean it up in distclean as well (buildpkg.sh was already listed). Also clean up AFS_component_version_number.c in libuafs/Makefile.common.in. These issues were detected while resolving https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1048470 . Change-Id: I0fea00924a998ee316d48cf76103ea9871a34c6b Reviewed-on: https://gerrit.openafs.org/15605 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
remove vestigial reference to 'sia' Commit 21006bb844a3 oops-sias-dead-20080906 removed references to 'sia' from the tree, but overlooked the reference in the clean2 rule. This results in a harmless error from 'make clean', or any target with 'clean' as a dependency: /bin/sh: line 0: cd: sia: No such file or directory make[1]: [clean2] Error 1 (ignored) Remove this last reference to eliminate the error. Change-Id: Ic2827998e3b272acc7714238d0755c5ec2ad2b95 Reviewed-on: https://gerrit.openafs.org/14890 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests: Introduce 'make check TESTS=test/name' Currently 'make check' always runs all tests. We can run individual tests manually, but doing so is a bit cumbersome to do under the same environment as 'make check', since doing so means running something like this: $ MAKECHECK=1 $(abs_top_srcdir)/tests/libwrap @TOP_OBJDIR@/lib \ ./runtests opr/fmt util/ktime To make it easier to run single tests introduce a way of calling 'make check' like this: $ make check TESTS='opr/fmt util/ktime' Which will run the same commands as 'make check', but will run runtests with only the specified tests, instead of running the default list. Some makefiles currently use a "TESTS" or "tests" variable to list their test binaries; rename them all to "BINS" to avoid conflicting with this new use for "TESTS" and to make our makefiles a little more consistent. Change-Id: I427f83be0d4571794644a97123bcd1f32427bd05 Reviewed-on: https://gerrit.openafs.org/14317 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@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>
auth_depinstall: Add rxgk_depinstall as dependency In a clean workspace, a 'make libuafs' fails to build due a missing header file 'rx/rxgk_types.h' since the file rxgk_types.h was not installed in the includes directory. The libuafs target consumes rxgk_types.h (installed by rxgk_depinstall) indirectly via auth/cellconfig.p.h that includes rxgk_types.h. make libuafs ... In file included from .../src/afs/UKERNEL/afs_usrops.c:27: .../include/afs/cellconfig.h:49:10: fatal error: rx/rxgk_types.h: No such file or directory Add rxgk_depinstall to the list of dependencies for the auth_depinstall target in the top Makefile to reflect the header dependency. Change-Id: I01239396c4a5c162b75a29a8e6aaf602b3c1ebb9 Reviewed-on: https://gerrit.openafs.org/14609 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>
build: Add rpm target Add a top-level makefile target to build RPMs for Red Hat distributions from the currently checked out commit. The resulting rpms are placed in the packages/rpmbuild/RPMS/<arch> directory. The rpm target is intended to be a convenience for testing changes to the rpm packaging or generating packages for local testing. Change-Id: Id951eb2b03629be59f6258e89e8356fe1fde1ff5 Reviewed-on: https://gerrit.openafs.org/14114 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
makesrpm: Support custom version strings The makesrpm.pl script generates a source RPM by creating a temporary rpmbuild workspace, populating the SOURCES and SPECS directories in that workspace, running rpmbuild to build the source RPM, and finally copying the resulting source RPM out of the temporary workspace. The name of the source RPM file created by rpmbuild depends on the package version and release strings. Unfortunately, the format of the source RPM file name changed around OpenAFS 1.6.0, so makesrpm.pl has special logic to find the version string and extra code depending on the detected OpenAFS version. Instead of trying to predict the name of the resulting source RPM file from the OpenAFS version string, and having different logic for old versions of OpenAFS, use a filename glob to find resulting source RPM file name in the temporary rpmbuild workspace. Remove the major, minor, and patch level variables, which were only used to guess the name of the resulting source RPM file name. Convert '-' characters to '_' in the package version and package release, since the '-' character is reserved by rpm as a field separator. While here, add the --dir option to specify the path of the generated source RPM, and change the 'srpm' makefile target to use the new --dir option, instead of changing the current directory before running makesrpm.pl. Also, add a dependency on the 'dist' makefile target, since the the source and document tarballs are required to build the source RPM. Add pod documentation and add the --help (-h) option to print a brief help message, and add the --man option to print the full man page. With this change, we can build a source RPM even when the .version file in the src.tar.bz file has a custom format or was created from a checkout of the master branch or other non-release reference. Change-Id: I7320afe6ac1f77d4dd38fcc194d41678fde5c950 Reviewed-on: https://gerrit.openafs.org/14116 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
make-release: Create output directory if needed Automatically create the --dir directory if it does not already exist, which makes this script slightly easier to use. Remove the now uneeded mkdir from the top-level makefile. Change-Id: I1f4561120a70263b0b2b194e65fec55fb5666f40 Reviewed-on: https://gerrit.openafs.org/14115 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests: Explicitly build target 'all' by default Commit 68f40643 (Build tests by default) added new targets in our top-level Makefile, that caused us to effectively run 'cd tests && make' as part of the default build. Since no explicit target is provided, 'make' tries to build the first target in the given Makefile. On some platforms (such as *BSD), 'make' finds the first defined target as a pattern rule (%.c) from our included makefiles, and tries to build the target %.c, which it cannot do. This causes the build to fail with: cd tests && make make[3]: don't know how to make %.c. Stop To fix this, just explicitly build the 'all' target when we build our tests by default. Change-Id: I319271482685ec35087c470d95fdcaec6e1d8c47 Reviewed-on: https://gerrit.openafs.org/13993 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Build tests by default While it's not feasible to run all of our tests by default during the build, we should be able to at least make sure the tests can build. So, make the default build targets also build our tests, by making the 'finale' target build the tests. Change-Id: Ieadd48ba2774526de8a13136e6cc8a50434ed2f5 Reviewed-on: https://gerrit.openafs.org/13941 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Add rxgk support to userok Change-Id: I5da2a89532453b6bec61fc87218a61455e39f6f0 Reviewed-on: https://gerrit.openafs.org/10576 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Build rxgk support into libafsrpc Add a dependency on the appropriate $(GSSAPI_LIBS) and link in the librxgk_pic.la helper. Careful control of what functions are exposed allows static linking to continue to work when rxgk is disabled, though a stub is needed for the case of rxgk_GetServerInfo, so that there is a symbol present to satisfy the export symbol list. Consumers of libafsrpc.a need not be modified in accordance with this change. Change-Id: I76c0329ba842fb0d4d66534810b114a0813c90a0 Reviewed-on: https://gerrit.openafs.org/10591 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Add rxgk_GetServerInfo stub Provide a stub function that libafsrpc can export when rxgk support is disabled. (It always returns failure, of course.) Change-Id: Id9f816d25c1a8f56995ec185ae83db0924de0010 Reviewed-on: https://gerrit.openafs.org/12721 Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
rxdebug: Add rxgk support Change-Id: I6ffeb7b36f41816ca1c3d12bb5e8097dd5d7a3fd Reviewed-on: https://gerrit.openafs.org/12940 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove alpha_dux/alpha_osf references Several files were still referencing the alpha_dux* and alpha_osf* sysnames. The code for these platforms has been removed, so get rid of this cruft. Change-Id: I042fcc29be322bf557829974242553bb6d5b2be4 Reviewed-on: https://gerrit.openafs.org/13339 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Add rxgk_crypto_rfc3961.c rxgk wrappers around an external crypto library, in this case, our in-tree rfc3961 library. Primitives for encryption/decryption and MIC/VerifyMIC, ways to generate and free rxgk_key objects, etc.. Change-Id: I7525086043baf54f5c3019b3f5ab3495760c4236 Reviewed-on: https://gerrit.openafs.org/10565 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
OPENAFS-SA-2018-001 audit: support butc types Add support for several complex butc types to enable butc auditing. Change-Id: I6aedd933cf5330cda40aae6f33827ae65409df32
Configure glue for rxgk Add an --enable-rxgk switch to control whether the feature is used. For the sake of buildbot coverage, we still attempt to build the core subdirectory provided that a sufficiently usable GSS-API library is available, but do not install anything when rxgk is disabled at configure time. Future commits will use the configure argument to control the behavior of other rxgk-aware code in the tree. We provide a few new symbols to conditionally compile code for rxgk. The two new high-level symbols are: - AFS_RXGK_ENV: when defined, rxgk is available - AFS_RXGK_GSS_ENV: when defined, we can use GSS-API calls AFS_RXGK_GSS_ENV is turned on only for userspace pthread builds. For now, AFS_RXGK_ENV is only turned on for userspace pthread builds, and non-ukernel kernel builds. This effectively disables rxgk integration in any ukernel or LWP code, but this can be changed in the future by changing when AFS_RXGK_ENV is defined. Change-Id: Iab661d47aac77c1a238e809362015b869752df18 Reviewed-on: https://gerrit.openafs.org/10564 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com>
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>