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 diff --git a/AUTHORS b/AUTHORS index b551498..bce7b27 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,2 @@ Jim Garlick +Jim Silva diff --git a/INSTALL b/INSTALL index 7d1c323..2099840 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +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 @@ -12,8 +12,8 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + 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 @@ -226,6 +226,11 @@ order to use an ANSI C compiler: 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 @@ -304,9 +309,10 @@ 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: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -362,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - 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..9d08fbf 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 = INSTALL DISCLAIMER README.md netroot.spec diff --git a/NEWS b/NEWS index afc0106..387ba6f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +======================================================================= +Release Notes - netroot-0.3.0 03 Aug 2016 +======================================================================= + +* Fix dracut module path (issue #6) + +======================================================================= +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 ======================================================================= 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." 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/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]) 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/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/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..82373d4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,21 +1,43 @@ ## # 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_MACRO_DIR([config]) AC_CONFIG_SRCDIR([NEWS]) AC_CANONICAL_SYSTEM -X_AC_META 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 +## +# Specialized install directories +## +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]) + +adl_RECURSIVE_EVAL(["$sysconfdir/kernel/postinst.d"], [postinstdir]) +AC_SUBST([postinstdir]) + +adl_RECURSIVE_EVAL(["$sysconfdir/kernel/prerm.d"], [prermdir]) +AC_SUBST([prermdir]) + +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]) + ## # Epilogue ## diff --git a/dracut.nbd9/Makefile.am b/dracut.nbd9/Makefile.am index 79dd3f3..6a46949 100644 --- a/dracut.nbd9/Makefile.am +++ b/dracut.nbd9/Makefile.am @@ -1,18 +1,9 @@ -dracutmoddir = @X_EXEC_PREFIX@/lib/dracut/modules.d/95nbd9 +nbd9moddir = $(dracutmoddir)/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 = \ +nbd9mod_SCRIPTS = \ nbd9root.sh \ parse-nbd9root.sh \ munge-cleanup.sh \ module-setup.sh + +EXTRA_DIST = $(nbd9mod_SCRIPTS) 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 b575cce..2ce107e 100644 --- a/netroot.spec.in +++ b/netroot.spec.in @@ -1,7 +1,6 @@ -%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 @@ -19,6 +18,7 @@ Requires(post): syslinux BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} %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 +%configure --with-bootdir=%{bootdir} --with-dracutmoddir=%{dracutmoddir} make