From 805341c73e293a6fa0e27c8843ed5d3cf05f6fcd Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 18 May 2016 16:50:04 -0700 Subject: [PATCH 01/16] build: drop META file Drop the META file and the m4 macro for expanding it. Set AC_INIT version using git describe --always. This means we must use annotated tags from now on. Use @PACKAGE_NAME@ and @PACKAGE_VERSION@ where substitutions are needed. --- META | 5 -- Makefile.am | 2 +- config/x_ac_meta.m4 | 112 --------------------------------------- configpxe/configpxe.8.in | 2 +- configure.ac | 5 +- netroot.spec.in | 6 +-- 6 files changed, 7 insertions(+), 125 deletions(-) delete mode 100644 META delete mode 100644 config/x_ac_meta.m4 diff --git a/META b/META deleted file mode 100644 index 9a7a6c0..0000000 --- a/META +++ /dev/null @@ -1,5 +0,0 @@ -Meta: 1 -Name: netroot -Version: 0.0.1 -Release: 1 -Date: 2015-03-30 diff --git a/Makefile.am b/Makefile.am index cf469ab..eac6bcc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ SUBDIRS = boot configpxe freedos dracut.nbd9 -EXTRA_DIST = DISCLAIMER META README.md netroot.spec +EXTRA_DIST = DISCLAIMER README.md netroot.spec diff --git a/config/x_ac_meta.m4 b/config/x_ac_meta.m4 deleted file mode 100644 index e446695..0000000 --- a/config/x_ac_meta.m4 +++ /dev/null @@ -1,112 +0,0 @@ -##***************************************************************************** -## $Id: x_ac_meta.m4 525 2006-07-13 19:30:13Z dun $ -##***************************************************************************** -# AUTHOR: -# Chris Dunlap -# -# SYNOPSIS: -# X_AC_META -# -# DESCRIPTION: -# Read metadata from the META file. -##***************************************************************************** - -AC_DEFUN([X_AC_META], [ - AC_MSG_CHECKING([metadata]) - - META="$srcdir/META" - _x_ac_meta_got_file=no - if test -f "$META"; then - _x_ac_meta_got_file=yes - - META_NAME=_X_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]); - if test -n "$META_NAME"; then - AC_DEFINE_UNQUOTED([META_NAME], ["$META_NAME"], - [Define the project name.] - ) - AC_SUBST([META_NAME]) - fi - - META_VERSION=_X_AC_META_GETVAL([VERSION]); - if test -n "$META_VERSION"; then - AC_DEFINE_UNQUOTED([META_VERSION], ["$META_VERSION"], - [Define the project version.] - ) - AC_SUBST([META_VERSION]) - fi - - META_RELEASE=_X_AC_META_GETVAL([RELEASE]); - if test -n "$META_RELEASE"; then - AC_DEFINE_UNQUOTED([META_RELEASE], ["$META_RELEASE"], - [Define the project release.] - ) - AC_SUBST([META_RELEASE]) - fi - - if test -n "$META_NAME" -a -n "$META_VERSION"; then - META_ALIAS="$META_NAME-$META_VERSION" - test -n "$META_RELEASE" -a "$META_RELEASE" != "1" \ - && META_ALIAS="$META_ALIAS-$META_RELEASE" - AC_DEFINE_UNQUOTED([META_ALIAS], ["$META_ALIAS"], - [Define the project alias string (name-ver or name-ver-rel).] - ) - AC_SUBST([META_ALIAS]) - fi - - META_DATE=_X_AC_META_GETVAL([DATE]); - if test -n "$META_DATE"; then - AC_DEFINE_UNQUOTED([META_DATE], ["$META_DATE"], - [Define the project release date.] - ) - AC_SUBST([META_DATE]) - fi - - META_AUTHOR=_X_AC_META_GETVAL([AUTHOR]); - if test -n "$META_AUTHOR"; then - AC_DEFINE_UNQUOTED([META_AUTHOR], ["$META_AUTHOR"], - [Define the project author.] - ) - AC_SUBST([META_AUTHOR]) - fi - - m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$]) - META_LT_CURRENT=_X_AC_META_GETVAL([LT_CURRENT]); - META_LT_REVISION=_X_AC_META_GETVAL([LT_REVISION]); - META_LT_AGE=_X_AC_META_GETVAL([LT_AGE]); - if test -n "$META_LT_CURRENT" \ - -o -n "$META_LT_REVISION" \ - -o -n "$META_LT_AGE"; then - test -n "$META_LT_CURRENT" || META_LT_CURRENT="0" - test -n "$META_LT_REVISION" || META_LT_REVISION="0" - test -n "$META_LT_AGE" || META_LT_AGE="0" - AC_DEFINE_UNQUOTED([META_LT_CURRENT], ["$META_LT_CURRENT"], - [Define the libtool library 'current' version information.] - ) - AC_DEFINE_UNQUOTED([META_LT_REVISION], ["$META_LT_REVISION"], - [Define the libtool library 'revision' version information.] - ) - AC_DEFINE_UNQUOTED([META_LT_AGE], ["$META_LT_AGE"], - [Define the libtool library 'age' version information.] - ) - AC_SUBST([META_LT_CURRENT]) - AC_SUBST([META_LT_REVISION]) - AC_SUBST([META_LT_AGE]) - fi - fi - - AC_MSG_RESULT([$_x_ac_meta_got_file]) - ] -) - -AC_DEFUN([_X_AC_META_GETVAL], - [`perl -n\ - -e "BEGIN { \\$key=shift @ARGV; }"\ - -e "next unless s/^\s*\\$key@<:@:=@:>@//i;"\ - -e "s/^((?:@<:@^'\"#@:>@*(?:(@<:@'\"@:>@)@<:@^\2@:>@*\2)*)*)#.*/\\@S|@1/;"\ - -e "s/^\s+//;"\ - -e "s/\s+$//;"\ - -e "s/^(@<:@'\"@:>@)(.*)\1/\\@S|@2/;"\ - -e "\\$val=\\$_;"\ - -e "END { print \\$val if defined \\$val; }"\ - '$1' $META`]dnl -) diff --git a/configpxe/configpxe.8.in b/configpxe/configpxe.8.in index b06845c..14bd401 100644 --- a/configpxe/configpxe.8.in +++ b/configpxe/configpxe.8.in @@ -1,4 +1,4 @@ -.TH configpxe 8 "@META_DATE@" "@META_ALIAS@" "@META_NAME@" +.TH configpxe 8 "30 March 2015" "@PACKAGE_NAME@-@PACKAGE_VERSION@" .SH NAME configpxe \- update /boot/pxelinux.cfg .SH SYNOPSIS diff --git a/configure.ac b/configure.ac index f2aea83..0897749 100644 --- a/configure.ac +++ b/configure.ac @@ -1,12 +1,11 @@ ## # Prologue ## -AC_INIT(m4_esyscmd([awk '/Name:/ {printf "%s",$2; exit}' META]), - m4_esyscmd([awk '/Version:/ {printf "%s",$2; exit}' META])) +AC_INIT([netroot], + m4_esyscmd([git describe --always | awk '/.*/ {printf "%s",$1; exit}'])) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_SRCDIR([NEWS]) AC_CANONICAL_SYSTEM -X_AC_META X_AC_EXPAND_INSTALL_DIRS ## diff --git a/netroot.spec.in b/netroot.spec.in index b575cce..199ff75 100644 --- a/netroot.spec.in +++ b/netroot.spec.in @@ -1,7 +1,7 @@ %global dracutmoddir %{_prefix}/lib/dracut/modules.d -Name: @META_NAME@ -Version: @META_VERSION@ -Release: @META_RELEASE@%{?dist} +Name: @PACKAGE_NAME@ +Version: @PACKAGE_VERSION@ +Release: 1%{?dist} Source0: %{name}-%{version}.tar.gz License: GPL Summary: Diskless Boot Support From 6517c06a4320d0229a151165293f5fa4be034ac2 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 18 May 2016 16:53:40 -0700 Subject: [PATCH 02/16] build: allow default INSTALL to be generated Don't check in autotools products to git. --- INSTALL | 365 -------------------------------------------------------- 1 file changed, 365 deletions(-) delete mode 100644 INSTALL diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 7d1c323..0000000 --- a/INSTALL +++ /dev/null @@ -1,365 +0,0 @@ -Installation Instructions -************************* - -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. - - Copying and distribution of this file, with or without modification, -are permitted in any medium without royalty provided the copyright -notice and this notice are preserved. This file is offered as-is, -without warranty of any kind. - -Basic Installation -================== - - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following -more-detailed instructions are generic; see the `README' file for -instructions specific to this package. Some packages provide this -`INSTALL' file but do not implement all of the features documented -below. The lack of an optional feature in a given package is not -necessarily a bug. More recommendations for GNU packages can be found -in *note Makefile Conventions: (standards)Makefile Conventions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. Caching is -disabled by default to prevent problems with accidental use of stale -cache files. - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You need `configure.ac' if -you want to change it or regenerate `configure' using a newer version -of `autoconf'. - - The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. - - Running `configure' might take a while. While running, it prints - some messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package, generally using the just-built uninstalled binaries. - - 4. Type `make install' to install the programs and any data files and - documentation. When installing into a prefix owned by root, it is - recommended that the package be configured and built as a regular - user, and only the `make install' phase executed with root - privileges. - - 5. Optionally, type `make installcheck' to repeat any self-tests, but - this time using the binaries in their final installed location. - This target does not install anything. Running this target as a - regular user, particularly if the prior `make install' required - root privileges, verifies that the installation completed - correctly. - - 6. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - - 7. Often, you can also type `make uninstall' to remove the installed - files again. In practice, not all packages have tested that - uninstallation works correctly, even though it is required by the - GNU Coding Standards. - - 8. Some packages, particularly those that use Automake, provide `make - distcheck', which can by used by developers to test that all other - targets like `make install' and `make uninstall' work correctly. - This target is generally not run by end users. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c99 CFLAGS=-g LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you can use GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. This -is known as a "VPATH" build. - - With a non-GNU `make', it is safer to compile the package for one -architecture at a time in the source code directory. After you have -installed the package for one architecture, use `make distclean' before -reconfiguring for another architecture. - - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - -Installation Names -================== - - By default, `make install' installs the package's commands under -`/usr/local/bin', include files under `/usr/local/include', etc. You -can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX', where PREFIX must be an -absolute file name. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -pass the option `--exec-prefix=PREFIX' to `configure', the package uses -PREFIX as the prefix for installing programs and libraries. -Documentation and other data files still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=DIR' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. In general, the -default for these options is expressed in terms of `${prefix}', so that -specifying just `--prefix' will affect all of the other directory -specifications that were not explicitly provided. - - The most portable way to affect installation locations is to pass the -correct locations to `configure'; however, many packages provide one or -both of the following shortcuts of passing variable assignments to the -`make install' command line to change installation locations without -having to reconfigure or recompile. - - The first method involves providing an override variable for each -affected directory. For example, `make install -prefix=/alternate/directory' will choose an alternate location for all -directory configuration variables that were expressed in terms of -`${prefix}'. Any directories that were specified during `configure', -but not in terms of `${prefix}', must each be overridden at install -time for the entire installation to be relocated. The approach of -makefile variable overrides for each directory variable is required by -the GNU Coding Standards, and ideally causes no recompilation. -However, some platforms have known limitations with the semantics of -shared libraries that end up requiring recompilation when using this -method, particularly noticeable in packages that use GNU Libtool. - - The second method involves providing the `DESTDIR' variable. For -example, `make install DESTDIR=/alternate/directory' will prepend -`/alternate/directory' before all installation names. The approach of -`DESTDIR' overrides is not required by the GNU Coding Standards, and -does not work on platforms that have drive letters. On the other hand, -it does better at avoiding recompilation issues, and works well even -when some directory options were not specified in terms of `${prefix}' -at `configure' time. - -Optional Features -================= - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - - Some packages offer the ability to configure how verbose the -execution of `make' will be. For these packages, running `./configure ---enable-silent-rules' sets the default to minimal output, which can be -overridden with `make V=1'; while running `./configure ---disable-silent-rules' sets the default to verbose, which can be -overridden with `make V=0'. - -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - - On Solaris, don't put `/usr/ucb' early in your `PATH'. This -directory contains several dysfunctional programs; working variants of -these programs are available in `/usr/bin'. So, if you need `/usr/ucb' -in your `PATH', put it _after_ `/usr/bin'. - - On Haiku, software installed for all users goes in `/boot/common', -not `/usr/local'. It is recommended to use the following options: - - ./configure --prefix=/boot/common - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS - KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the option `--target=TYPE' to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). - -Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--prefix=DIR' - Use DIR as the installation prefix. *note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - From 208f9737efcc0c2a16143b3f50ea43bbdb1f4958 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 18 May 2016 16:57:15 -0700 Subject: [PATCH 03/16] build: update automake directives --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0897749..752b739 100644 --- a/configure.ac +++ b/configure.ac @@ -11,8 +11,9 @@ X_AC_EXPAND_INSTALL_DIRS ## # Automake support ## -AM_INIT_AUTOMAKE([]) -AC_CONFIG_HEADERS([config/config.h]) +AM_INIT_AUTOMAKE([subdir-objects]) +AM_SILENT_RULES([yes]) +AM_CONFIG_HEADER([config/config.h]) AM_MAINTAINER_MODE ## From 3a8b3337632270fda01f08382a4a366c126ee9e4 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 18 May 2016 17:02:48 -0700 Subject: [PATCH 04/16] build: add INSTALL to dist --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index eac6bcc..9d08fbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,3 @@ SUBDIRS = boot configpxe freedos dracut.nbd9 -EXTRA_DIST = DISCLAIMER README.md netroot.spec +EXTRA_DIST = INSTALL DISCLAIMER README.md netroot.spec From 1e567efbb40aba7c6d292a4802136347c83b8133 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 18 May 2016 19:13:51 -0700 Subject: [PATCH 05/16] autogen.sh: fix stray nfsroot ref --- autogen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 1a0e46c..32b4459 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,4 +13,4 @@ autoconf --force echo "Cleaning up ..." mv aclocal.m4 config/ rm -rf autom4te.cache -echo "Now run ./configure to configure nfsroot for your environment." +echo "Now run ./configure to configure netroot for your environment." From f16e90b9f1519793b5980b5ca6fef6fe9be70b1c Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Tue, 24 May 2016 15:11:43 -0700 Subject: [PATCH 06/16] build: update x_ac_expand_install_dirs Also pull in adl_recursive_eval.m4. --- config/adl_recursive_eval.m4 | 19 +++++++++++++++++++ config/x_ac_expand_install_dirs.m4 | 28 ++++++++++++++-------------- 2 files changed, 33 insertions(+), 14 deletions(-) create mode 100644 config/adl_recursive_eval.m4 diff --git a/config/adl_recursive_eval.m4 b/config/adl_recursive_eval.m4 new file mode 100644 index 0000000..a292735 --- /dev/null +++ b/config/adl_recursive_eval.m4 @@ -0,0 +1,19 @@ +dnl +dnl Unknown origin, but was presumably part of autoconf-archive at +dnl some point in the past. +dnl +dnl adl_RECURSIVE_EVAL(VALUE, RESULT) +dnl ================================= +dnl Interpolate the VALUE in loop until it doesn't change, +dnl and set the result to $RESULT. +dnl WARNING: It's easy to get an infinite loop with some unsane input. +AC_DEFUN([adl_RECURSIVE_EVAL], +[_lcl_receval="$1" +$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + _lcl_receval_old='' + while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do + _lcl_receval_old="[$]_lcl_receval" + eval _lcl_receval="\"[$]_lcl_receval\"" + done + echo "[$]_lcl_receval")`]) diff --git a/config/x_ac_expand_install_dirs.m4 b/config/x_ac_expand_install_dirs.m4 index d110bf2..8a462a0 100644 --- a/config/x_ac_expand_install_dirs.m4 +++ b/config/x_ac_expand_install_dirs.m4 @@ -19,72 +19,72 @@ AC_DEFUN([X_AC_EXPAND_INSTALL_DIRS], [ _x_ac_expand_install_dirs_exec_prefix="$exec_prefix" test "$exec_prefix" = NONE && exec_prefix="$prefix" - eval X_PREFIX="$prefix" + adl_RECURSIVE_EVAL(["$prefix"], [X_PREFIX]) AC_DEFINE_UNQUOTED([X_PREFIX], ["$X_PREFIX"], [Expansion of the "prefix" installation directory.]) AC_SUBST([X_PREFIX]) - eval X_EXEC_PREFIX="$exec_prefix" + adl_RECURSIVE_EVAL(["$exec_prefix"], [X_EXEC_PREFIX]) AC_DEFINE_UNQUOTED([X_EXEC_PREFIX], ["$X_EXEC_PREFIX"], [Expansion of the "exec_prefix" installation directory.]) AC_SUBST([X_EXEC_PREFIX]) - eval X_BINDIR="$bindir" + adl_RECURSIVE_EVAL(["$bindir"], [X_BINDIR]) AC_DEFINE_UNQUOTED([X_BINDIR], ["$X_BINDIR"], [Expansion of the "bindir" installation directory.]) AC_SUBST([X_BINDIR]) - eval X_SBINDIR="$sbindir" + adl_RECURSIVE_EVAL(["$sbindir"], [X_SBINDIR]) AC_DEFINE_UNQUOTED([X_SBINDIR], ["$X_SBINDIR"], [Expansion of the "sbindir" installation directory.]) AC_SUBST([X_SBINDIR]) - eval X_LIBEXECDIR="$libexecdir" + adl_RECURSIVE_EVAL(["$libexecdir"], [X_LIBEXECDIR]) AC_DEFINE_UNQUOTED([X_LIBEXECDIR], ["$X_LIBEXECDIR"], [Expansion of the "libexecdir" installation directory.]) AC_SUBST([X_LIBEXECDIR]) - eval X_DATADIR="$datadir" + adl_RECURSIVE_EVAL(["$datadir"], [X_DATADIR]) AC_DEFINE_UNQUOTED([X_DATADIR], ["$X_DATADIR"], [Expansion of the "datadir" installation directory.]) AC_SUBST([X_DATADIR]) - eval X_SYSCONFDIR="$sysconfdir" + adl_RECURSIVE_EVAL(["$sysconfdir"], [X_SYSCONFDIR]) AC_DEFINE_UNQUOTED([X_SYSCONFDIR], ["$X_SYSCONFDIR"], [Expansion of the "sysconfdir" installation directory.]) AC_SUBST([X_SYSCONFDIR]) - eval X_SHAREDSTATEDIR="$sharedstatedir" + adl_RECURSIVE_EVAL(["$sharedstatedir"], [X_SHAREDSTATEDIR]) AC_DEFINE_UNQUOTED([X_SHAREDSTATEDIR], ["$X_SHAREDSTATEDIR"], [Expansion of the "sharedstatedir" installation directory.]) AC_SUBST([X_SHAREDSTATEDIR]) - eval X_LOCALSTATEDIR="$localstatedir" + adl_RECURSIVE_EVAL(["$localstatedir"], [X_LOCALSTATEDIR]) AC_DEFINE_UNQUOTED([X_LOCALSTATEDIR], ["$X_LOCALSTATEDIR"], [Expansion of the "localstatedir" installation directory.]) AC_SUBST([X_LOCALSTATEDIR]) - eval X_LIBDIR="$libdir" + adl_RECURSIVE_EVAL(["$libdir"], [X_LIBDIR]) AC_DEFINE_UNQUOTED([X_LIBDIR], ["$X_LIBDIR"], [Expansion of the "libdir" installation directory.]) AC_SUBST([X_LIBDIR]) - eval X_INCLUDEDIR="$includedir" + adl_RECURSIVE_EVAL(["$includedir"], [X_INCLUDEDIR]) AC_DEFINE_UNQUOTED([X_INCLUDEDIR], ["$X_INCLUDEDIR"], [Expansion of the "includedir" installation directory.]) AC_SUBST([X_INCLUDEDIR]) - eval X_OLDINCLUDEDIR="$oldincludedir" + adl_RECURSIVE_EVAL(["$oldincludedir"], [X_OLDINCLUDEDIR]) AC_DEFINE_UNQUOTED([X_OLDINCLUDEDIR], ["$X_OLDINCLUDEDIR"], [Expansion of the "oldincludedir" installation directory.]) AC_SUBST([X_OLDINCLUDEDIR]) - eval X_INFODIR="$infodir" + adl_RECURSIVE_EVAL(["$infodir"], [X_INFODIR]) AC_DEFINE_UNQUOTED([X_INFODIR], ["$X_INFODIR"], [Expansion of the "infodir" installation directory.]) AC_SUBST([X_INFODIR]) - eval X_MANDIR="$mandir" + adl_RECURSIVE_EVAL(["$mandir"], [X_MANDIR]) AC_DEFINE_UNQUOTED([X_MANDIR], ["$X_MANDIR"], [Expansion of the "mandir" installation directory.]) AC_SUBST([X_MANDIR]) From 6233d05880332cd489254ea98aadea2e75e9b3d0 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Tue, 24 May 2016 15:04:10 -0700 Subject: [PATCH 07/16] build: add --with-bootdir option Instead of hardwiring /boot in several places, which breaks "make distcheck", make it configurable with a default that lives under the install prefix. The spec file can specify --bootdir=/boot --- boot/Makefile.am | 1 - configure.ac | 10 ++++++++++ freedos/Makefile.am | 2 -- netroot.spec.in | 4 ++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/boot/Makefile.am b/boot/Makefile.am index 4d935bc..77ad667 100644 --- a/boot/Makefile.am +++ b/boot/Makefile.am @@ -1,4 +1,3 @@ -bootdir = /boot boot_DATA = pxelinux.cfg pxelinux.msg EXTRA_DIST = pxelinux.cfg pxelinux.msg diff --git a/configure.ac b/configure.ac index 752b739..0cc5116 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_INIT([netroot], m4_esyscmd([git describe --always | awk '/.*/ {printf "%s",$1; exit}'])) AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_SRCDIR([NEWS]) AC_CANONICAL_SYSTEM X_AC_EXPAND_INSTALL_DIRS @@ -16,6 +17,15 @@ AM_SILENT_RULES([yes]) AM_CONFIG_HEADER([config/config.h]) AM_MAINTAINER_MODE +## +# Configure options +## +AC_ARG_WITH([bootdir], + [AS_HELP_STRING([--with-bootdir=DIR], [directory where kernel images live])], + [with_bootdir="$withval"], [with_bootdir="$libdir/boot"]) +adl_RECURSIVE_EVAL(["$with_bootdir"], [bootdir]) +AC_SUBST([bootdir]) + ## # Epilogue ## diff --git a/freedos/Makefile.am b/freedos/Makefile.am index 0098da7..8c20fcf 100644 --- a/freedos/Makefile.am +++ b/freedos/Makefile.am @@ -1,5 +1,3 @@ -bootdir = /boot - boot_DATA = freedos.img EXTRA_DIST = freedos.img diff --git a/netroot.spec.in b/netroot.spec.in index 199ff75..7aca76c 100644 --- a/netroot.spec.in +++ b/netroot.spec.in @@ -18,7 +18,7 @@ Requires(post): syslinux BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -%define bootdir /boot +%define bootdir @bootdir@ %description Diskless boot support. @@ -27,7 +27,7 @@ Diskless boot support. %setup -q -n %{name}-%{version} %build -%configure +%configure --with-bootdir=/boot make From 385a981fbf02760d6c42aba262810040fa4cb72b Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Tue, 24 May 2016 15:29:00 -0700 Subject: [PATCH 08/16] build: don't hardwire kernel/postinst.d etc Hardwiring install directories makes distcheck sad. Make them relative to $sysconfdir --- configpxe/Makefile.am | 2 -- configure.ac | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configpxe/Makefile.am b/configpxe/Makefile.am index d4feed2..069616f 100644 --- a/configpxe/Makefile.am +++ b/configpxe/Makefile.am @@ -4,10 +4,8 @@ sbin_SCRIPTS = \ man8_MANS = configpxe.8 -postinstdir = /etc/kernel/postinst.d postinst_SCRIPTS = netroot-postinst -prermdir = /etc/kernel/prerm.d prerm_SCRIPTS = netroot-prerm EXTRA_DIST = \ diff --git a/configure.ac b/configure.ac index 0cc5116..8b2b81b 100644 --- a/configure.ac +++ b/configure.ac @@ -26,6 +26,12 @@ AC_ARG_WITH([bootdir], adl_RECURSIVE_EVAL(["$with_bootdir"], [bootdir]) AC_SUBST([bootdir]) +adl_RECURSIVE_EVAL(["$sysconfdir/kernel/postinst.d"], [postinstdir]) +AC_SUBST([postinstdir]) + +adl_RECURSIVE_EVAL(["$sysconfdir/kernel/prerm.d"], [prermdir]) +AC_SUBST([prermdir]) + ## # Epilogue ## From 8d650ca4983eb407ca6eafcbe4e0692aed710997 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Tue, 24 May 2016 15:51:09 -0700 Subject: [PATCH 09/16] build: don't hardwire /usr/lib/dracut/modules.d Hardwiring dracutmoddir makes distcheck sad. Define it relative to $libdir. --- configure.ac | 5 ++++- dracut.nbd9/Makefile.am | 17 +++-------------- netroot.spec.in | 2 +- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 8b2b81b..52d88e2 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AM_CONFIG_HEADER([config/config.h]) AM_MAINTAINER_MODE ## -# Configure options +# Specialized install directories ## AC_ARG_WITH([bootdir], [AS_HELP_STRING([--with-bootdir=DIR], [directory where kernel images live])], @@ -32,6 +32,9 @@ AC_SUBST([postinstdir]) adl_RECURSIVE_EVAL(["$sysconfdir/kernel/prerm.d"], [prermdir]) AC_SUBST([prermdir]) +adl_RECURSIVE_EVAL(["$libdir/dracut/modules.d"], [dracutmoddir]) +AC_SUBST([dracutmoddir]) + ## # Epilogue ## diff --git a/dracut.nbd9/Makefile.am b/dracut.nbd9/Makefile.am index 79dd3f3..367c04f 100644 --- a/dracut.nbd9/Makefile.am +++ b/dracut.nbd9/Makefile.am @@ -1,18 +1,7 @@ -dracutmoddir = @X_EXEC_PREFIX@/lib/dracut/modules.d/95nbd9 - -# N.B. targets named 'install' and 'check' confuse automake - avoid them -install-data-local: - -$(top_srcdir)/config/install-sh -m 755 \ - module-setup.sh $(DESTDIR)$(dracutmoddir)/module-setup.sh - -$(top_srcdir)/config/install-sh -m 755 \ - parse-nbd9root.sh $(DESTDIR)$(dracutmoddir)/parse-nbd9root.sh - -$(top_srcdir)/config/install-sh -m 755 \ - munge-cleanup.sh $(DESTDIR)$(dracutmoddir)/munge-cleanup.sh - -$(top_srcdir)/config/install-sh -m 755 \ - nbd9root.sh $(DESTDIR)$(dracutmoddir)/nbd9root.sh - -EXTRA_DIST = \ +dracutmod_SCRIPTS = \ nbd9root.sh \ parse-nbd9root.sh \ munge-cleanup.sh \ module-setup.sh + +EXTRA_DIST = $(dracutmod_SCRIPTS) diff --git a/netroot.spec.in b/netroot.spec.in index 7aca76c..68db5cb 100644 --- a/netroot.spec.in +++ b/netroot.spec.in @@ -1,4 +1,3 @@ -%global dracutmoddir %{_prefix}/lib/dracut/modules.d Name: @PACKAGE_NAME@ Version: @PACKAGE_VERSION@ Release: 1%{?dist} @@ -19,6 +18,7 @@ Requires(post): syslinux BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %define bootdir @bootdir@ +%define dracutmoddir @dracutmoddir@ %description Diskless boot support. From 5ad89eaee324b7ae94344a37f9ee54bb5b8d573b Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Tue, 24 May 2016 16:09:49 -0700 Subject: [PATCH 10/16] travis-ci: run make distcheck on commit --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1ad228f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: bash + +sudo: false + +script: + - ./autogen.sh + - ./configure + - make distcheck From 718cd7475842f7ea57ce599a2dc598c4f61cc930 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Mon, 1 Aug 2016 14:32:58 -0700 Subject: [PATCH 11/16] NEWS: Update for 0.2.0 --- NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NEWS b/NEWS index afc0106..4668e85 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,13 @@ +======================================================================= +Release Notes - netroot-0.2.0 01 Aug 2016 +======================================================================= + +* Drop netroot-kdumplinks as RHEL 7 kdump uses dracut (Jim Silva) + +* Misc. build system updates and fixes + +* Enable travis-ci builds on github + ======================================================================= Release Notes - netroot-0.0.1 30 Mar 2015 ======================================================================= From 6b7109fb2729f59f70ef4c1bc77373ef3af11c07 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Mon, 1 Aug 2016 14:39:52 -0700 Subject: [PATCH 12/16] build: commit INSTALL file --- INSTALL | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 INSTALL diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..2099840 --- /dev/null +++ b/INSTALL @@ -0,0 +1,370 @@ +Installation Instructions +************************* + +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +================== + + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. + + 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. + +Installation Names +================== + + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS + KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. From 5ef60b96ba5915ebdd8f25f22fd7973a4ef25bde Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 3 Aug 2016 09:36:53 -0700 Subject: [PATCH 13/16] build: fix install paths for dracut module Fixes #6 --- configure.ac | 5 ++++- dracut.nbd9/Makefile.am | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 52d88e2..82373d4 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,10 @@ AC_SUBST([postinstdir]) adl_RECURSIVE_EVAL(["$sysconfdir/kernel/prerm.d"], [prermdir]) AC_SUBST([prermdir]) -adl_RECURSIVE_EVAL(["$libdir/dracut/modules.d"], [dracutmoddir]) +AC_ARG_WITH([dracutmoddir], + [AS_HELP_STRING([--with-dracutmoddir=DIR], [directory where dracut modules live])], + [with_dracutmoddir="$withval"], [with_dracutmoddir="$libdir/dracut/modules.d"]) +adl_RECURSIVE_EVAL(["$with_dracutmoddir"], [dracutmoddir]) AC_SUBST([dracutmoddir]) ## diff --git a/dracut.nbd9/Makefile.am b/dracut.nbd9/Makefile.am index 367c04f..6a46949 100644 --- a/dracut.nbd9/Makefile.am +++ b/dracut.nbd9/Makefile.am @@ -1,7 +1,9 @@ -dracutmod_SCRIPTS = \ +nbd9moddir = $(dracutmoddir)/95nbd9 + +nbd9mod_SCRIPTS = \ nbd9root.sh \ parse-nbd9root.sh \ munge-cleanup.sh \ module-setup.sh -EXTRA_DIST = $(dracutmod_SCRIPTS) +EXTRA_DIST = $(nbd9mod_SCRIPTS) From 6c9dffb6e781560993defdf07c89bbf04aa9df4d Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 3 Aug 2016 09:57:53 -0700 Subject: [PATCH 14/16] AUTHORS: add Jim Silva --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index b551498..bce7b27 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,2 @@ Jim Garlick +Jim Silva From 9dd7b70fbe0f470fb4f8fb882bcace129a2c9b08 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 3 Aug 2016 10:08:13 -0700 Subject: [PATCH 15/16] build: update configure options in spec file --- netroot.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netroot.spec.in b/netroot.spec.in index 68db5cb..2ce107e 100644 --- a/netroot.spec.in +++ b/netroot.spec.in @@ -17,8 +17,8 @@ Requires(post): syslinux BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} -%define bootdir @bootdir@ -%define dracutmoddir @dracutmoddir@ +%define bootdir /boot +%define dracutmoddir /usr/lib/dracut/modules.d %description Diskless boot support. @@ -27,7 +27,7 @@ Diskless boot support. %setup -q -n %{name}-%{version} %build -%configure --with-bootdir=/boot +%configure --with-bootdir=%{bootdir} --with-dracutmoddir=%{dracutmoddir} make From fd65935d25cf5664f85b06ac8d439c07080336bf Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 3 Aug 2016 10:09:09 -0700 Subject: [PATCH 16/16] NEWS: update for 0.3.0 release --- NEWS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 4668e85..387ba6f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +======================================================================= +Release Notes - netroot-0.3.0 03 Aug 2016 +======================================================================= + +* Fix dracut module path (issue #6) + ======================================================================= Release Notes - netroot-0.2.0 01 Aug 2016 =======================================================================