From dd5a53307297677edd508243ffa33c22900360b5 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Wed, 31 Dec 2014 18:23:06 +0000 Subject: [PATCH] Release v8.0.0. Signed-off-by: Gary V. Vaughan --- .travis.yml | 185 ++++-- ChangeLog | 552 ++++++++++++++++++ Makefile.am | 33 +- Makefile.in | 149 +++-- NEWS | 147 ++++- README | 10 +- aclocal.m4 | 1 - bootstrap | 325 +++++++++-- bootstrap.conf | 19 +- build-aux/bootstrap.in | 187 ++++-- build-aux/bootstrap.slingshot | 136 ++++- build-aux/merge-sections | 9 +- build-aux/mkrockspecs | 11 +- build-aux/release.mk | 23 +- build-aux/specl.mk | 10 +- configure | 119 ++-- configure.ac | 5 +- {docs => doc}/mkrockspecs.1 | 4 +- local.mk | 2 +- m4/ax_lua.m4 | 45 +- m4/slingshot.m4 | 42 -- rockspec.conf | 2 +- ...7-1.rockspec => slingshot-8.0.0-1.rockspec | 10 +- specs/mkrockspecs_spec.yaml | 23 +- src/merge-sections.in | 7 +- src/mkrockspecs.in | 9 +- src/src.mk | 10 +- travis.yml.in | 182 ++++-- 28 files changed, 1740 insertions(+), 517 deletions(-) rename {docs => doc}/mkrockspecs.1 (89%) delete mode 100644 m4/slingshot.m4 rename slingshot-7-1.rockspec => slingshot-8.0.0-1.rockspec (78%) diff --git a/.travis.yml b/.travis.yml index 98d8c76..b9f4df4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,69 +1,136 @@ -# Lua is not officially supported, but an erlang environment will do. -language: erlang +language: c env: global: - - PACKAGE=slingshot - - ROCKSPEC=$PACKAGE-git-1.rockspec - - LUAROCKS_CONFIG=build-aux/luarocks-config.lua - - LUAROCKS="$LUA $HOME/bin/luarocks" + - _COMPILE="libtool --mode=compile --tag=CC gcc" + - _CFLAGS="-O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX" + - _INSTALL="libtool --mode=install install -p" + - _LINK="libtool --mode=link --tag=CC gcc" + - _LIBS="-lm -Wl,-E -ldl -lreadline" + + - prefix=/usr/local + - bindir=$prefix/bin + - incdir=$prefix/include + - libdir=$prefix/lib matrix: - - LUA=lua5.1 LUA_INCDIR=/usr/include/lua5.1 LUA_SUFFIX=5.1 - - LUA=lua5.2 LUA_INCDIR=/usr/include/lua5.2 LUA_SUFFIX=5.2 - - LUA=luajit-2.0.0-beta9 LUA_INCDIR=/usr/include/luajit-2.0 LUA_SUFFIX=5.1 + - LUA=lua5.3 + - LUA=lua5.2 + - LUA=lua5.1 + - LUA=luajit -# Tool setup. -install: + +before_install: # Put back the links for libyaml, which are missing on recent Travis VMs - test -f /usr/lib/libyaml.so || sudo find /usr/lib -name 'libyaml*' -exec ln -s {} /usr/lib \; - - sudo apt-get install help2man - - sudo apt-get install luajit - - sudo apt-get install libluajit-5.1-dev - - sudo apt-get install lua5.1 - - sudo apt-get install liblua5.1-dev - - sudo apt-get install lua5.2 - - sudo apt-get install liblua5.2-dev - - # Install a luarocks beta locally for everything else. - - git clone --depth=1 https://github.com/keplerproject/luarocks.git - # LuaRocks configure --with-lua argument is just a prefix! - - ( cd luarocks; - ./configure - --prefix=$HOME --with-lua=/usr --lua-version=$LUA_SUFFIX - --lua-suffix=$LUA_SUFFIX --with-lua-include=$LUA_INCDIR; - make build; - make install; ) - -# Configure and build. + + # Fetch Lua sources. + - cd $TRAVIS_BUILD_DIR + - 'if test lua5.3 = "$LUA"; then + curl http://www.lua.org/work/lua-5.3.0-rc1.tar.gz | tar xz; + cd lua-5.3.0; + fi' + - 'if test lua5.2 = "$LUA"; then + curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz; + cd lua-5.2.3; + fi' + - 'if test lua5.1 = "$LUA"; then + curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz; + cd lua-5.1.5; + fi' + + # Unpack, compile and install Lua. + - 'if test luajit = "$LUA"; then + curl http://luajit.org/download/LuaJIT-2.0.3.tar.gz | tar xz; + cd LuaJIT-2.0.3; + make && sudo make install; + for header in lua.h luaconf.h lualib.h lauxlib.h luajit.h lua.hpp; do + if test -f /usr/local/include/luajit-2.0/$header; then + sudo ln -s /usr/local/include/luajit-2.0/$header /usr/local/include/$header; + fi; + done; + else + for src in src/*.c; do + test src/lua.c = "$src" || test src/luac.c = "$src" || eval $_COMPILE $_CFLAGS -c $src; + done; + eval $_LINK -o lib$LUA.la -version-info 0:0:0 -rpath $libdir *.lo; + sudo mkdir -p $libdir; + eval sudo $_INSTALL lib$LUA.la $libdir/lib$LUA.la; + + eval $_COMPILE $_CFLAGS -c src/lua.c; + eval $_LINK -static -o $LUA lua.lo lib$LUA.la $_LIBS; + sudo mkdir -p $bindir; + eval sudo $_INSTALL $LUA $bindir/$LUA; + + sudo mkdir -p $incdir; + for header in lua.h luaconf.h lualib.h lauxlib.h lua.hpp; do + if test -f src/$header; then + eval sudo $_INSTALL src/$header $incdir/$header; + fi; + done; + fi' + + # Fetch LuaRocks. + - cd $TRAVIS_BUILD_DIR + - 'git clone https://github.com/keplerproject/luarocks.git luarocks-2.2.0' + - cd luarocks-2.2.0 + - git checkout v2.2.0 + + # Compile and install luarocks. + - if test luajit = "$LUA"; then + ./configure --lua-suffix=jit; + else + ./configure; + fi + - 'make build && sudo make install' + + # Tidy up file droppings. + - cd $TRAVIS_BUILD_DIR + - rm -rf lua-5.3.0 lua-5.2.3 lua-5.1.5 LuaJIT-2.0.3 luarocks-2.2.0 + + +install: + # Use Lua 5.3 compatible rocks, where available. + - 'for rock in specl""; do + if test -z "$rock"; then break; fi; + if luarocks list | grep "^$rock$" >/dev/null; then continue; fi; + sudo luarocks install --server=http://rocks.moonscript.org/manifests/gvvaughan $rock; + done' + + # Build from rockspec. + - export ROCKSPEC=slingshot-8.0.0-1.rockspec + - 'test -f "$ROCKSPEC" || ROCKSPEC=slingshot-git-1.rockspec' + - sudo luarocks make $ROCKSPEC LUA="$LUA" + + # Clean up files created by root + - sudo git clean -dfx + - sudo rm -rf slingshot + + script: - # Initial bootstrap to build luarocks-config.lua, before we've - # installed our rocks. - - ./bootstrap --skip-rock-checks - - ./configure LUA="$LUA" - - make $LUAROCKS_CONFIG - LUA="$LUA" LUA_INCDIR="$LUA_INCDIR" V=1 - || cat $LUAROCKS_CONFIG config.log - - # Set Lua and Shell paths up for local luarocks tree. - # this package depends on will be installed. - - eval `$LUAROCKS path` - - export PATH=`pwd`/luarocks/bin:$PATH - - # Install extra rocks into $LUAROCKS_CONFIG rocks tree. - - $LUAROCKS install lyaml; $LUAROCKS install specl; - - # Make git rockspec for this slingshot - - make rockspecs LUAROCKS="$LUAROCKS" V=1 - || { $LUAROCKS path; cat $ROCKSPEC; } - - # The git rockspec will rerun bootstrap, and check any rock versions - # in bootstrap.conf:buildreq this time. - - $LUAROCKS make $ROCKSPEC LUA="$LUA" - - # Run self-tests in the `luarocks make` build tree. - - LUA_PATH=`pwd`'/lib/?.lua;'"${LUA_PATH-;}" - LUA_CPATH=`pwd`'/ext/?.so;'"${LUA_CPATH-;}" - LUA_INIT= LUA_INIT_5_2= - make check V=1 + - 'if test -f configure; then + touch aclocal.m4; + sleep 1; touch Makefile.in; + sleep 1; touch config.h.in; + sleep 1; touch configure; + else + ./bootstrap --verbose; + fi' + - test -f Makefile || ./configure --disable-silent-rules LUA="$LUA" + - make + - make check V=1 + + +# Run sanity checks on CI server, ignoring buggy automakes. +after_success: + - '{ _assign="="; + if grep local-checks-to-skip build-aux/sanity-cfg.mk >/dev/null; then + _assign="+="; + fi; + printf "local-checks-to-skip %s sc_vulnerable_makefile_CVE-2012-3386\n" "$_assign"; + } >> build-aux/sanity-cfg.mk' + - 'make syntax-check || : this will usually fail on the release branch' + +notifications: + slack: aspirinc:JyWeNrIdS0J5nf2Pn2BS1cih diff --git a/ChangeLog b/ChangeLog index 8e1ca08..9da5209 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,557 @@ +2014-12-31 Gary V. Vaughan + + Release version 8.0.0 + * NEWS.md: Record release date. + + bootstrap: bump minimum specl requirement to version 14. + * bootstrap.conf (buildreq): Bump Specl requirement to version 14. + + specs: correctly support VPATH builds ala make distcheck. + * specs/mkrockspecs_spec.yaml: Use the doc directory for examples + that need a directory present in $builddir. + + maint: commit git rockspec to master. + * .gitignore: Unignore git rockspec. + * slingshot-git-1.rockspec: New file. + * rockspec.conf (dependencies): Not yet Lua 5.4 ready! + + maint: remove trailing whitespace. + * NEWS.md: Remove trailing whitespace. + + configury: set slingshot_files to regenerate .travis.yml. + * bootstrap.conf (slingshot_files): Add travis.yml.in to make + sure slingshot_update_travis_yml() triggers. + * bootstrap: Regenerate. + * .travis.yml: Regenerate. + + travis: avoid erroring out on release branch. + * travis.yml.in (env): Remove ROCKSPEC setting. + (before_install): Clean up LuaJIT-2.0.3 directory droppings. + (install): If there is a release rockspec use it, falling back + to git rockspec otherwise. + (script): Autofool timestamps when we can avoid bootstrapping + on ready-to-configure release branches. + * build-aux/bootstrap.slingshot (slingshot_update_travis_yml): + Substitute for @VERSION@ when generating .travis.yml. + + travis: be careful about precious configure environment vars. + It's not safe to set things like CFLAGS and INSTALL in the global + environment, because those settings also leak into `./configure` + invocations. + * travis.yml.in (env.global): Prefix COMPILE, CFLAGS, INSTALL, + LINK and LIBS with an underscore. Adjust all references to match. + +2014-12-29 Gary V. Vaughan + + release: be sure to put NEWS back before calling automake. + * build-aux/release.mk (Makefile.in): Depend on NEWS. + + bootstrap: simplify bootstrap update warning. + It was confusing to sometimes have to `cp -f slingshot/bootstrap` + versus sometimes `mv -f bootstrap.new`. Perform the copy + automatically, and always advise using mv regardless of source. + * build-aux/bootstrap.slingshot (slingshot_require_bootstrap_uptodate): + Remove stale bootstrap.new, then copy from slingshot/bootstrap + when necessary, in order to simplify update instructions. + * bootstrap: Regenerate. + + bootstrap: remove .travis.yml.new more aggressively. + * build-aux/bootstrap.slingshot (slingshot_update_travis_yml): + Remove .travis.yml.new unconditionally before creating a new one. + (_travis_yml_out): Correct references from this... + (_G_travis_yml_out): ...to this. + * bootstrap: Regenerate. + + bootstrap: only present updated travis.yml in a git working tree. + * build-aux/bootstrap.slingshot (slingshot_update_travis_yml): + If $GIT has been disabled by $require_git, skip checks and updates + for .travis.yml. + * bootstrap: Regenerate. + +2014-12-27 Gary V. Vaughan + + bootstrap: regenerate. + + bootstrap: fix command substitution quoting. + * build-aux/bootstrap.slingshot (slingshot_update_travis_yml): + Quote command substitution correctly for multiple extra rocks. + * bootstrap: Regenerate. + + release: use AM_V_GEN for NEWS. + * build-aux/release.mk (NEWS): Add AM_V_GEN invocation to NEWS. + + release: do-release-commit-and-tag depends on NEWS. + * build-aux/release.mk (release-commit): Add NEWS dependency, so + the link is in place before running do-release-commit-and-tag. + + release: remove a stray trailing backslash. + * build-aux/release.mk (release-prep): Remove a stray trailing + backslash. + + Revert "bootstrap: make sure slingshot bootstrap overrides correctly." + This reverts commit ee7a39d8cd918549c69c161232186b6bd254ca06. + * build-aux/bootstrap.slingshot: Due to multiple section recurrences + in upstream bootstrap.in, this didn't work anyway. + * bootstrap: Regenerate. + + bootstrap: elide original require_bootstrap_uptodate setting. + The pre-merge expanded bootstrap.in from upstream has several + occurrences of many section headers, so we have to use the -e + option of our merge-sections script to elide the original + bootstrap.in definition of require_bootstrap_uptodate, so that + our improved version takes precedence. + * bootstrap.conf (require_bootstrap_uptodate): When generating + the merged bootstrap script elide require_bootstrap_uptodate + setting. + * bootstrap: Regenerate. + +2014-12-26 Gary V. Vaughan + + bootstrap: sync with upstream, for version output fix. + * build-aux/bootstrap.in: Sync with upstream. + * bootstrap: Regenerate. + +2014-12-24 Gary V. Vaughan + + bootstrap: extract PACKAGE from configure properly. + * build-aux/bootstrap.slingshot (slingshot_update_travis_yml): + Extract PACKAGE from configure properly. + * bootstrap: Regenerate. + + NEWS: Update. + + bootstrap: make sure slingshot bootstrap overrides correctly. + * build-aux/bootstrap.slingshot (require_bootstrap_uptodate): + Move to the later 'Helper functions' section to make sure the + original namesake is properly overridden. + * bootstrap: Regenerate. + + travis: move .travis.yml regeneration from configure to bootstrap. + * m4/slingshot.m4: Remove unused file. + * configure.ac (SS_CONFIG_TRAVIS): Remove. + * bootstrap.conf (travis_extra_rocks): New variable to list rocks + formerly listed in SS_CONFIG_TRAVIS parameters. + * build-aux/bootstrap.slingshot (slingshot_update_travis_yml): New + function to ensure .travis.yml doesn't go out of date. + * bootstrap: Regenerate. + + maint: use github markdown compatible multi-paragraph bullets. + * NEWS: Indent bullets an extra space so that they render + properly in the github web interface with multiple paragraph + bullet items. + + bootstrap: detect out of date bootstrap with slingshot clients. + * build-aux/bootstrap.slingshot (require_bootstrap_uptodate): A + third version of this function! The main one from upstream + bootstrap is overridden by ./bootstrap.conf to merge in the extra + functions in this file. The new one here is to automate checking + for out of date bootstrap in slingshot client projects when they + update their slingshot submodule and rebootstrap. + * bootstrap: Regenerate. + * NEWS: Update. + +2014-12-19 Gary V. Vaughan + + release: fix remaining hard-coded references to NEWS. + * build-aux/release.mk (NEWS): New rule. Link to NEWS.md etc. + (release-commit): Use readlink to follow NEWS symbolic link. + + maint: don't regenerate rockspecs for announcement. + We don't want the `GEN foo.rockspec` lines in the announcement + message. + * build-aux/release.mk (announcement): Remove rockspec dependency. + + configury: add luaexec module uninstall hook. + * Makefile.am (uninstall-luaexec-modules): Uninstall luaexec + modules, even though we didn't install the .la file that + Automake's uninstall rules rely on. + (uninstall_hooks): Add uninstall-luaexec-modules. + (uninstall-hook): Depend on uninstall_hooks. + + maint: escape comment chars in news-check-regexp. + + maint: fix news-check-regexp. + * build-aux/release.mk (news-check-regexp): Adjust for Markdown + format NEWS. + * README.md: Update NEWS format reference. + + do-release-commit-and-tag: follows NEWS symbolic link. + * build-aux/do-release-commit-and-tag (NEWS): Use readlink to + find link destination if any. + Update all clients. + + bootstrap: let submodule GNUmakefile rebootstrap rule trigger. + * build-aux/bootstrap.slingshot (slingshot_copy_files): Don't + manually bootstrap. + * bootstrap: Regenerate. + +2014-12-18 Gary V. Vaughan + + bootstrap: bootstrap slingshot submodule before make. + * build-aux/bootstrap.slingshot (slingshot_copy_files): Run + bootstrap in a freshly checked out slingshot submodule. + * bootstrap: Regenerate. + + maint: add NEWS to .gitignore. + +2014-12-18 Gary V. Vaughan + + maint: reformat NEWS.md as valid markdown. + +2014-12-18 Gary V. Vaughan + + maint: move NEWS to NEWS.md. + * NEWS: Move from here... + * NEWS.md: ...to here. + * build-aux/bootstrap.in: Sync with upstream, for NEWS.md + support. + * bootstrap: Regenerate. + + maint: move to Markdown format NEWS and release announcements. + * build-aux/do-release-commit-and-tag (noteworthy): Use a ## + prefix for new noteworthy changes lines. + * build-aux/release.mk (gl_noteworthy_news_): Update regexp. + (announcement): Generate Markdown format. + * NEWS: Reformat. + * local.mk (old_NEWS_hash): Regenerate. + + configury: avoid spurious .travis.yml regeneration. + * m4/slingshot.m4 (SS_CONFIG_TRAVIS): Use cp instead of mv to + ensure the .travis.yml timestamp is updated, avoiding spurious + remakes on multiple make reruns. + + configury: simplify regeneration rules for .travis.yml. + When called by make as just `config.status .travis.yml`, the + travis-yml-up-to-date commands did not run, and so a spurious + .travis.yml.new file dropping would appear occasionally. + * m4/slingshot.m4 (SS_CONFIG_TRAVIS): Consolidate regeneration + log entirely in the AC_CONFIG_FILES call for .travis.yml to + prevent this, and simplify accordingly. + + travis: run luarocks install as superuser. + * travis.yml.in (install): Run luarocks install as superuser. + * .travis.yml: Regenerate. + + travis: don't skip every EXTRA_ROCK. + * travis.yml.in (install): Don't skip every EXTRA_ROCK! + * .travis.yml: Regenerate. + + travis: try moonscript gvvaughan manifest first, for Lua 5.3 rocks. + * m4/slingshot.m4 (SS_CONFIG_TRAVIS): AC_SUBST arguments to this + macro as EXTRA_ROCKS without munging. + * travis.yml.in (install): Install EXTRA_ROCKS using moonscript + gvvaughan manifest first, for Lua 5.3 compatible rocks not yet + available in the moonscript root manifest. + * .travis.yml: Regenerate. + + mkrockspecs: accept and export luajit as LUA. + * src/merge-sections.in, src/mkrockspecs.in + (shell re-execute preamble): If LUA is not already in the + environment, accept a binary called luajit from the path, and + in any case re-export the discovered binary. + * build-aux/merge-sections: Regenerate. + + configury: show a warning rather than always updating .travis.yml. + Close #8. + * m4/slingshot.m4 (SS_CONFIG_TRAVIS): Save the incumbent + .travis.yml contents, and warn about impending regeneration + rather than always updating it. + * NEWS: Update. + + maint: Add missing NEWS items. + * NEWS: Reformat slightly, for easier pasting into Markdown + format GitHub release announcement. + Add forgotten items since last release. + + bootstrap: don't run `git submodule update` outside working dir. + 5cd707a was not quite correct, and would sometimes try to update + submodules in a tarball source tree. + * build-aux/bootstrap.slingshot + (slingshot_require_slingshot_submodule): If there is a .gitmodules + file, make sure it contains the slingshot submodule, and update + it to the correct version for the parent revision; incidentally + only doing a full clone of the submodule along the way if it is + entirely absent. + * bootstrap: Regenerate. + + configury: don't install .la files for Lua modules. + * Makefile.am (remove-luaexec-lafiles): New install hook for + removing .la files for Lua modules. + (install_exec_hooks): Add remove-luaexec-lafiles rule. + * NEWS: Updated. + + configury: lua modules should install to luaexec_LTLIBRARIES. + * Makefile.am (luaexec_LTLIBRARIES): Set this for appending to + from included make fragments, because we want `make install` to + put modules into e.g. /usr/local/lib/lua/5.3, not /usr/local/lib. + * NEWS: Updated. + Reported by Dennis Schridde + + configury: reset release version to 8.0.0: + * configure.ac (AC_INIT): Reset release version to 8.0.0. The + most recent pre-semantic versioning release was 7. + * build-aux/merge-sections: Regenerate. + +2014-12-17 Gary V. Vaughan + + bootstrap: always run `git submodule update -- slingshot`. + If we are in a git directory, and there is a git executable in + the user's PATH, then always synchronize the slingshot submodule + in case we changed revisions since the last bootstrap run. + * build-aux/bootstrap.slingshot + (slingshot_require_slingshot_submodule): Move the $GIT calls and + dependencies out of the inner if, so that it always triggers + when we have a git binary. + * bootstrap: Regenerate. + + travis: remove sudo owned directories from luarocks make. + * travis.yml.in (install): Remove root owned compiler objects. + (script): Rebuild user owned compiler objects. + * .travis.yml: Regenerate. + + do-release-commit-and-tag: fix version order check. + * build-aux/do-release-commit-and-tag (func_lt_ver): Check the + first version given is older than the second. + Use it instead of a case and tr combo. + + do-release-commit-and-tag: simplify func_sort_ver. + * build-aux/do-release-commit-and-tag (func_sort_ver): Use + simpler definition from bootstrap. + + travis: link luajit header into /usr/local/include. + * travis.yml.in (before_install): Link luajit headers into + /usr/local/include. + * .travis.yml: Regenerate. + + travis: use libtool --quiet mode. + * travis.yml.in (env): Use libtool --quiet mode. + * .travis.yml: Regenerate. + + travis: fix directory change for luajit. + * travis.yml.in (before_install): Fix directory change for luajit. + * .travis.yml: Regenerate. + + travis: don't forget to bootstrap and configure. + * travis.yml.in (install): Don't forget to bootstrap and configure. + * .travis.yml: Regenerate. + + travis: fix url for luajit. + * travis.yml.in: Fix url for luajit download. + * .travis.yml: Regenerate. + + maint: remove trailing whitespace. + * travis.yml.in: Remove trailing whitespace. + + travis: replace another shell && operation. + * travis.yml.in (before_insta[[): Replace another shell && + operation with an equivalent if statement. + * .travis.yml: Regenerate. + + travis: don't use $CC, travis overwrites it. + * travis.yml.in (CC, LD): Rename from these... + (COMPILE, LINK): ...to these, respectively. Adjust all callers. + * .travis.yml: Regenerate. + + travis: regenerate .travis.yml + + travis: debug failing source compilations. + + travis: be wary of && shell operator return status. + * travis.yml.in: Be wary of && shell operator return status. + * .travis.yml: Regenerate. + + travis: insert missing semicolons. + * travis.yml.in: Insert missing semicolons. + * .travis.yml: Regenerate. + + travis: regenerate .travis.yml. + * .travis.yml: Regenerate. + + travis: merge .travis/* into travis.yaml.in. + * .travis/platform.sh: Remove. + * .travis/setup_lua.sh: Remove, but move content from here... + * travis.yml.in: ...to here, reformat and simplify. + + travis: revert removal of CI syntax checks. + * travis.yml.in (script): Reinstate accidentally removed CI + syntax checks. + + travis: fix test_double_equal syntax-check failures. + * .travis/setup_lua.sh: Use portable "test x = y" expressions. + + configury: adopt semantic versioning. + * configure.ac (AC_INIT): Bump version to 9.0.0. + * build-aux/merge-sections: Regenerate. + + specs: remove debug code. + * specs/mkrockspecs_spec.yaml: Remove debug code. + + specs: don't rely on possibly missing doc directory. + * specs/mkrockspecs_spec.yaml: Use m4 as a temporary directory + with no other `.lua` files in it. + + travis: install Lua header files. + * .travis/setup_lua.sh: Install Lua header files. + + travis: spell $PLATFORM correctly. + * .travis/setup_lua.sh ($PLATFORM): not $platform. + + travis: make sure we build dynamic liblua. + * .travis/setup_lua.sh: Instead of relying on the upstream Lua + Makefile, which has no shared library targets, call libtool + directly to perform the compilations, linking and installation. + +2014-12-16 Gary V. Vaughan + + travis: ensure /usr/local/bin/$LUA is available. + * .travis/setup_lua.sh: Make a $LUA link in /usr/local/bin for + subsequent scripts that treat $LUA as the user override. + + travis: set LUAROCKS for setup_lua.sh. + * travis.yml.in (LUAROCKS_BASE): Rename from this... + (LUAROCKS): ...to this. + * .travis.yml: Regenerate. + + travis: support Lua 5.3 matrix. + * .travis/platform.sh, .travis/setup_lua.sh: New scripts to setup + lua and luarocks on travis, from luafilesystem project. + * travis.yml.in: Simplify accordingly. + (matrix): Add Lua 5.3. + * m4/slingshot.m4 (SS_CONFIG_TRAVIS): Generate EXTRA_ROCKS to + match simplified .travis.yml. + * .travis.yml: Regenerate. + + maint: preliminary Lua 5.3.x compatibility. + * configure.ac (AX_PROG_LUA): Accept Lua 5.3 interpreters. + * src/merge-sections.in, src/mkrockspecs.in: Search for lua5.3 or + lua53 when re-executing with shell preamble. + * build-aux/merge-sections: Regenerate. + + doc: don't carry upstream bootstrap.texi. + * docs/bootstrap.texi: Remove. + * README.md: Add reference to upstream project for latest docs, + and remove reference to local copy. + * src/src.mk (man_MANS): Generate mkrockspecs.1 in standard 'doc' + subdirectory. + (EXTRA_DIST, CLEANFILES): Update accordingly. + * specs/mkrockspecs_spec.yaml: Adjust 'docs' references + accordingly. + + bootstrap: sync with upstream. + Pick up recent fixes and improvements to bootstrap. + * build-aux/bootstrap.in: Copy latest bootstrap script from + https://github.com/gvvaughan/bootstrap. + * bootstrap: Regenerate. + + travis: unpack the correct luarocks tarball name. + * travis.yml.in (install): Use the correct tarball name for + github luarocks releases. + * .travis.yml: Regenerate. + + travis: fetch github releases of luarocks. + luarocks.org has intermittent downtime, which makes slingshot + using github projects fail CI checks. Use the github releases + of luarocks for Travis instead, which has much better uptime + ratios. + * .travis.yml (env): Add LUAROCKS_RELEASE. + (install): Fetch luarocks tarball from github. + * .travis.yml: Regenerate. + + travis: don't overwrite user local-checks-to-skip setting. + * travis.yml.in (script): Append to local-checks-to-skip if that + variable is already set in sanity-cfg.mk. + +2014-11-05 Gary V. Vaughan + + bootstrap: sync with upstream. + * build-aux/bootstrap.in: Sync with upstream. + * bootstrap: Regenerate. + +2014-10-25 Gary V. Vaughan + + bootstrap: sync with upstream. + * build-aux/bootstrap.in: Fetch latest upstream. + * build-aux/boostrap.slingshot (func_require_slingshot_module): + Add slingshot_path argument to git submodule init invocation. + * bootstrap: Regenerate. + From Pádraig Brady + +2014-10-19 Gary V. Vaughan + + bootstrap: sync with upstream. + * build-aux/bootstrap.in (func_require_gnulib_submodule): Add + gnulib_path argument to prevent updating all submodules. + * build-aux/boostrap.slingshot (func_require_slingshot_submodule): + Likewise for slingshot submodule updates. + * bootstrap: Regenerate. + * NEWS: Update. + Reported by Reuben Thomas + +2014-10-09 Gary V. Vaughan + + travis: quote colons in yaml. + * travis.yml.in (script): Escape : meta-character with quotes. + * .travis.yml: Regenerate. + + travis: run sanity checks during CI. + * travis.yml.in (script): Run sanity checks on CI server. + + mkrockspecs: fix unterminated string. + * src/mkrockspecs.in (default_build): Add missing quote. + + mkrockspecs: set luaexecdir at install-time. + * src/mkrockspecs.in (default_build): Set luaexecdir at install + time. + * NEWS: Update. + +2014-09-25 Gary V. Vaughan + + specl: pass useful directories in SPECL_ENV. + * Makefile.am (SPECL_ENV): Initialise to empty. + * build-aux/specl.mk (SPECL_ENV): Add various useful directories. + (specl-check-local): Simplify accordingly. + * NEWS: Update. + +2014-08-17 Gary V. Vaughan + + travis: update to latest luarocks 2.2.0 release. + * travis.yml.in (LUAROCKS_BASE): Set to luarocks-2.2.0. + (install): Use it. + * .travis.yml: Regenerate. + + travis: support slack.com notifications. + * m4/slingshot.m4 (SS_CONFIG_TRAVIS): If there is a .slackid + file, use it to append a slack notification to .travis.yml. + * .slackid: New file. + * .travis.yml: Regenerate. + * NEWS: Update. + +2014-08-03 Gary V. Vaughan + + m4: sync ax_lua.m4 with upstream. + * m4/ax_lua.m4: Sync with upstream. + +2014-08-02 Gary V. Vaughan + + m4: *really* fix one argument AX_PROG_LUA invocation. + * m4/ax_lua.m4 (_AX_LUA_CHK_VER): If version pattern match fails + return nil, to trigger `math.huge` toobig comparison. + + m4: fix one argument AX_PROG_LUA invocation. + * m4/ax_lua.m4 (_AX_LUA_CHK_VER): If toobig parameter is not + passed, default to `math.huge`. + 2014-07-31 Gary V. Vaughan + maint: regenerate merge-sections. + * build-aux/merge-sections: Regenerate. + + maint: post-release administrivia. + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * configure.ac (AC_INIT): Bump version number to 8. + * local.mk (old_NEWS_hash): Auto-update. + Release version 7 * NEWS: Record release date. diff --git a/Makefile.am b/Makefile.am index d707341..ce58fd8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,6 +24,8 @@ LUA_PATH ?= ; LUA_CPATH ?= ; +SPECL_ENV = + ## ---------- ## ## Bootstrap. ## @@ -50,8 +52,10 @@ check_local = dist_bin_SCRIPTS = dist_lua_DATA = doc_DATA = -install_exec_hooks = +install_exec_hooks = remove-luaexec-lafiles +uninstall_hooks = uninstall-luaexec-modules lib_LTLIBRARIES = +luaexec_LTLIBRARIES = man_MANS = save_release_files = @@ -71,3 +75,30 @@ check-local: $(check_local) ## ------------- ## install-exec-hook: $(install_exec_hooks) + +# Neither Lua itself, nor LuaRocks can use .la files, and LuaRocks +# actually moves such files aside anyway, so we just remove them from +# the installation directory. +remove-luaexec-lafiles: + @for la in $(luaexec_LTLIBRARIES); do \ + f=`echo "$$la" |sed 's|^.*/||'`; \ + echo rm -f $(luaexecdir)/$$f; \ + rm -f $(luaexecdir)/$$f; \ + done + + +## --------------- ## +## Uninstallation. ## +## --------------- ## + +uninstall-hook: $(uninstall_hooks) + +# We removed the .la files from luaexecdir, so the standard uninstall, +# with libtool --mode=uninstall, can't find everything anymore. +uninstall-luaexec-modules: + @for la in $(luaexec_LTLIBRARIES); do \ + base=`echo "$$la" \ + |sed 's|^.*/\(.*\)\.la|\1|'`; \ + echo rm -f $(luaexecdir)/$$base.so; \ + rm -f $(luaexecdir)/$$base.so; \ + done diff --git a/Makefile.in b/Makefile.in index a86d641..47838f8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -219,7 +219,7 @@ DIST_COMMON = $(srcdir)/local.mk $(srcdir)/src/src.mk \ $(srcdir)/build-aux/rockspecs.mk INSTALL NEWS README AUTHORS \ ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/travis.yml.in $(top_srcdir)/src/merge-sections.in \ + $(top_srcdir)/src/merge-sections.in \ $(top_srcdir)/src/mkrockspecs.in $(dist_bin_SCRIPTS) \ $(dist_lua_DATA) COPYING build-aux/install-sh \ build-aux/missing $(top_srcdir)/build-aux/install-sh \ @@ -227,14 +227,13 @@ DIST_COMMON = $(srcdir)/local.mk $(srcdir)/src/src.mk \ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_lua.m4 \ - $(top_srcdir)/m4/slingshot.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = .travis.yml build-aux/merge-sections \ - build-aux/mkrockspecs +CONFIG_CLEAN_FILES = build-aux/merge-sections build-aux/mkrockspecs CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -263,10 +262,11 @@ am__uninstall_files_from_dir = { \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(luadir)" "$(DESTDIR)$(docdir)" -LTLIBRARIES = $(lib_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(luaexecdir)" \ + "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(luadir)" \ + "$(DESTDIR)$(docdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(luaexec_LTLIBRARIES) SCRIPTS = $(bin_SCRIPTS) $(dist_bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -322,7 +322,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -EXTRA_ROCKS = @EXTRA_ROCKS@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ @@ -398,15 +397,19 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SPECL_ENV = LUA='$(LUA)' abs_top_builddir='$(abs_top_builddir)' \ + abs_top_srcdir='$(abs_top_srcdir)' \ + top_builddir='$(top_builddir)' top_srcdir='$(top_srcdir)' \ + $(NOTHING_ELSE) ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = $(LUA_INCLUDE) EXTRA_DIST = build-aux/merge-sections build-aux/mkrockspecs \ - docs/mkrockspecs.1 $(NOTHING_ELSE) $(specl_SPECS) \ + doc/mkrockspecs.1 $(NOTHING_ELSE) $(specl_SPECS) \ $(NOTHING_ELSE) build-aux/bootstrap.in \ build-aux/bootstrap.slingshot $(mkrockspecs) \ $(package_rockspec) $(rockspec_conf) $(NOTHING_ELSE) EXTRA_LTLIBRARIES = -CLEANFILES = docs/mkrockspecs.1 $(NOTHING_ELSE) +CLEANFILES = doc/mkrockspecs.1 $(NOTHING_ELSE) DISTCLEANFILES = $(luarocks_config) $(NOTHING_ELSE) MAINTAINERCLEANFILES = NOTHING_ELSE = @@ -415,11 +418,13 @@ check_local = specl-check-local dist_bin_SCRIPTS = dist_lua_DATA = doc_DATA = -install_exec_hooks = +install_exec_hooks = remove-luaexec-lafiles +uninstall_hooks = uninstall-luaexec-modules lib_LTLIBRARIES = -man_MANS = docs/mkrockspecs.1 +luaexec_LTLIBRARIES = +man_MANS = doc/mkrockspecs.1 save_release_files = $(scm_rockspec) -old_NEWS_hash = 4a4a721668a1516c046d865c7b425586 +old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e update_copyright_env = \ UPDATE_COPYRIGHT_HOLDER='(Free Software Foundation, Inc.|Gary V. Vaughan|Reuben Thomas)' \ UPDATE_COPYRIGHT_USE_INTERVALS=1 \ @@ -489,8 +494,6 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): -.travis.yml: $(top_builddir)/config.status $(srcdir)/travis.yml.in - cd $(top_builddir) && $(SHELL) ./config.status $@ build-aux/merge-sections: $(top_builddir)/config.status $(top_srcdir)/src/merge-sections.in cd $(top_builddir) && $(SHELL) ./config.status $@ build-aux/mkrockspecs: $(top_builddir)/config.status $(top_srcdir)/src/mkrockspecs.in @@ -530,6 +533,41 @@ clean-libLTLIBRARIES: echo rm -f $${locs}; \ rm -f $${locs}; \ } + +install-luaexecLTLIBRARIES: $(luaexec_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(luaexec_LTLIBRARIES)'; test -n "$(luaexecdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(luaexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(luaexecdir)" || exit 1; \ + echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$list '$(DESTDIR)$(luaexecdir)'"; \ + $(INSTALL) $(INSTALL_STRIP_FLAG) $$list "$(DESTDIR)$(luaexecdir)"; \ + } + +uninstall-luaexecLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(luaexec_LTLIBRARIES)'; test -n "$(luaexecdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(luaexecdir)/$$f'"; \ + rm -f "$(DESTDIR)$(luaexecdir)/$$f"; \ + done + +clean-luaexecLTLIBRARIES: + -test -z "$(luaexec_LTLIBRARIES)" || rm -f $(luaexec_LTLIBRARIES) + @list='$(luaexec_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -860,7 +898,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(luadir)" "$(DESTDIR)$(docdir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(luaexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(luadir)" "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -898,7 +936,8 @@ maintainer-clean-generic: -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am -clean-am: clean-generic clean-libLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libLTLIBRARIES clean-luaexecLTLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -924,7 +963,7 @@ install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-dist_binSCRIPTS \ - install-libLTLIBRARIES + install-libLTLIBRARIES install-luaexecLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am @@ -967,37 +1006,41 @@ ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-dist_binSCRIPTS \ uninstall-dist_luaDATA uninstall-docDATA \ - uninstall-libLTLIBRARIES uninstall-man - + uninstall-libLTLIBRARIES uninstall-luaexecLTLIBRARIES \ + uninstall-man + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 -.MAKE: check-am install-am install-exec-am install-strip +.MAKE: check-am install-am install-exec-am install-strip uninstall-am .PHONY: all all-am am--refresh check check-am check-local clean \ - clean-generic clean-libLTLIBRARIES cscopelist-am ctags-am dist \ - dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ - dist-xz dist-zip distcheck distclean distclean-generic \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-binSCRIPTS \ - install-data install-data-am install-dist_binSCRIPTS \ - install-dist_luaDATA install-docDATA install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-hook \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-man1 install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am tags-am uninstall uninstall-am \ - uninstall-binSCRIPTS uninstall-dist_binSCRIPTS \ - uninstall-dist_luaDATA uninstall-docDATA \ - uninstall-libLTLIBRARIES uninstall-man uninstall-man1 + clean-generic clean-libLTLIBRARIES clean-luaexecLTLIBRARIES \ + cscopelist-am ctags-am dist dist-all dist-bzip2 dist-gzip \ + dist-lzip dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-generic distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-binSCRIPTS install-data \ + install-data-am install-dist_binSCRIPTS install-dist_luaDATA \ + install-docDATA install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-luaexecLTLIBRARIES install-man install-man1 \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-binSCRIPTS uninstall-dist_binSCRIPTS \ + uninstall-dist_luaDATA uninstall-docDATA uninstall-hook \ + uninstall-libLTLIBRARIES uninstall-luaexecLTLIBRARIES \ + uninstall-man uninstall-man1 LUA_PATH ?= ; LUA_CPATH ?= ; -docs/mkrockspecs.1: build-aux/mkrockspecs Makefile - @test -d docs || mkdir docs +doc/mkrockspecs.1: build-aux/mkrockspecs Makefile + @test -d doc || mkdir doc $(AM_V_GEN)if ( touch $@.w && rm -f $@.w; ) >/dev/null 2>&1; \ then \ builddir='$(builddir)' \ @@ -1008,7 +1051,7 @@ docs/mkrockspecs.1: build-aux/mkrockspecs Makefile build-aux/mkrockspecs; \ fi specl-check-local: $(specl_SPECS) - $(SPECL_ENV) LUA=$(LUA) $(SPECL) $(SPECL_OPTS) $(specl_SPECS) + $(SPECL_ENV) $(SPECL) $(SPECL_OPTS) $(specl_SPECS) $(luarocks_config): Makefile.am @test -d build-aux || mkdir build-aux @@ -1046,6 +1089,28 @@ check-local: $(check_local) install-exec-hook: $(install_exec_hooks) +# Neither Lua itself, nor LuaRocks can use .la files, and LuaRocks +# actually moves such files aside anyway, so we just remove them from +# the installation directory. +remove-luaexec-lafiles: + @for la in $(luaexec_LTLIBRARIES); do \ + f=`echo "$$la" |sed 's|^.*/||'`; \ + echo rm -f $(luaexecdir)/$$f; \ + rm -f $(luaexecdir)/$$f; \ + done + +uninstall-hook: $(uninstall_hooks) + +# We removed the .la files from luaexecdir, so the standard uninstall, +# with libtool --mode=uninstall, can't find everything anymore. +uninstall-luaexec-modules: + @for la in $(luaexec_LTLIBRARIES); do \ + base=`echo "$$la" \ + |sed 's|^.*/\(.*\)\.la|\1|'`; \ + echo rm -f $(luaexecdir)/$$base.so; \ + rm -f $(luaexecdir)/$$base.so; \ + done + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/NEWS b/NEWS index 0e61464..52d186d 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,90 @@ -Slingshot NEWS - User visible changes. +# Slingshot NEWS - User visible changes. -* Noteworthy changes in release 7 (2014-07-31) [stable] +## Noteworthy changes in release 8.0.0 (2014-12-31) [stable] -** New Features: +### New Features: + + - Libtool built Lua modules should be appended to luaexec_LTLIBRARIES, + where non LuaRocks users will receive them in the correct directory + (likely already in their LUA_CPATH) after `sudo make install`. + + - Slingshot now supports the slack.com Travis Integration. Add + a .slackid file to the root of your project, containing your slack + token on a single line -- a notification section containing that + id will be appended to your `.travis.yml` at configure time. + + - Various build related directories are added to SPECL_ENV by default, + so that package.path and package.cpath settings can be set in your + spec_helper.lua to enforce loading from the build tree instead of + accidentally falling back to the system module paths -- especially + during the VPATH `make check` performed during `make distcheck`. You + might want to write something like this in `spec_helper.lua`: + + ```lua + local std = require "specl.std" + + local builddir = os.getenv "top_builddir" or "." + local srcdir = os.getenv "top_srcdir" or "." + + package.path = std.package.normalize ( + top_builddir .. "/lib/mymodule/?.lua", + top_srcdir .. "/lib/mymodule/?.lua", + package.path) + + mymodule = require "mymodule" + ``` + + This ensures that, no matter what LuaRocks does to the package paths, + nor whether you run `specl` by hand with auto-discovery, or via the + `make check` or `make distcheck` rules... by the time you require + your module from the development tree, the package path has the right + directories at the front. + + - Unused libtool .la files for Lua modules are no longer installed. + + - Update to latest upstream `ax_lua.m4`. + + - Update to latest upstream `bootstrap`. + + - Travis CI overhaul: Uses latest LuaRocks 2.2.0 with each of Lua + 5.3.0(rc1), 5.2.3, 5.1.5 and luajit-2.0.3, only building the Lua + version needed in each run. We also run `make syntax-check` on the + CI server after successful tests. + + - Instead of overwriting .travis.yml unconditionally, show a warning + explaining how to update it when it changes, like bootstrap. + + - Markdown format NEWS and announcements. + +### Incompatible Changes: + + - SPECL_ENV is now set (to empty) by default, and should be augmented + with += in local.mk. + + - SS_CONFIG_TRAVIS is no longer supported. Any additional travis rocks + you were passing there should now be listed in a travis_extra_rocks + variable in `bootstrap.conf` instead. + +### Bug Fixes: + + - We no longer assume autotooled installations will put modules in + --libdir (although that will continue to work), but also set + luaexecdir at install-time for `ax_lua.m4` compatibility. + + - Version comparison in `build-aux/do-release-commit-and-tag` now + works correctly. + + - bootstrap now updates only gnulib and slingshot git submodules as + expected. + + - Slingshot bootstrap really does perform an automatic out of date + check of client bootstrap against latest slingshot submodule + bootstrap script now - after updating to this version! + + +## Noteworthy changes in release 7 (2014-07-31) [stable] + +### New Features: - Slingshot `make release` now requires a LuaRocks binary that supports the upload command (such as the 2.2.0 beta release) and uses that to @@ -11,7 +93,9 @@ Slingshot NEWS - User visible changes. upload fails due to a missing api-key, then make sure you have one at rocks.moonscript.org/settings and call make like this: + ``` make upload API_KEY=0123456789abcdefghijklmnopqrstuvwxyzABCDE + ``` - `mkrockspecs` accepts a new `--branch` option for generating a git/scm rockspec that pulls that branch instead of master. @@ -29,7 +113,9 @@ Slingshot NEWS - User visible changes. rockspec version checks can be short-circuited by setting an APPVAR in bootstrap's environment, e.g: + ```bash LDOC=`pwd`/luarocks/bin/ldoc ./bootstrap + ``` - Slingshot bootstrap accepts a new `--luarocks-tree` option to check a particular tree for prerequisite rocks. @@ -40,7 +126,7 @@ Slingshot NEWS - User visible changes. - Remove m4/ax_compare_version.m4 and dependencies, resulting in a slightly faster and smaller configure. -** Bugs fixed: +### Bugs fixed: - `bootstrap` now has `slingshot_copy` merged in correctly. @@ -48,9 +134,9 @@ Slingshot NEWS - User visible changes. `foo/bar/init.lua` pattern. -* Noteworthy changes in release 6 (2014-01-04) [stable] +## Noteworthy changes in release 6 (2014-01-04) [stable] -** New Features: +### New Features: - A manually entered list of modules in rockspec.conf now creates "builtin" autoconfless builds in the main rockspec @@ -61,15 +147,16 @@ Slingshot NEWS - User visible changes. than in an installed subtree, but unit tests need access to the module subtree which is only visible in the build directory). -** Incompatible Changes: +### Incompatible Changes: - `bootstrap.slingshot` is now automatically merged into the `bootstrap` script, so you shouldn't copy it into your project tree anymore, or add the glue to run it to your `bootstrap.conf`. -* Noteworthy changes in release 5 (2013-12-08) [stable] -** New Features: +## Noteworthy changes in release 5 (2013-12-08) [stable] + +### New Features: - The announcement message is formatted for easier pasting into github release notes. @@ -78,7 +165,7 @@ Slingshot NEWS - User visible changes. - Travis builds will now use the latest upstream luarocks 2.1.1 release. -** Bugs fixed: +### Bugs fixed: - Specifying additional SPECL_OPTS in local.mk now works properly. - Announcement message shows luarocks install command correctly. @@ -88,16 +175,16 @@ Slingshot NEWS - User visible changes. - Fixed a typo in maint.mk no-submodule-changes rule. -* Noteworthy changes in release 4 (2013-08-29) [stable] +## Noteworthy changes in release 4 (2013-08-29) [stable] -** New Features: +### New Features: - mkrockspecs uses luaposix to search the module root tree for lua sources if it is available, which is a lot faster than spawning a shell to list the contents of each subdirectory, and reading the results back over a pipe. -** Bugs Fixed: +### Bugs Fixed: - Submodules pulled to the release branch are removed before unpacking the release tarball. @@ -109,9 +196,9 @@ Slingshot NEWS - User visible changes. - Fixed many fine typos. -* Noteworthy changes in release 3 (2013-05-19) [stable] +## Noteworthy changes in release 3 (2013-05-19) [stable] -** New Features: +### New Features: - Support Specl automation with `include build-aux/specl.mk` @@ -125,12 +212,14 @@ Slingshot NEWS - User visible changes. Slingshot mkrockspec invocations setting `mkrockspecs_args` appropriately in your `local.mk`: + ``` mkrockspecs_args = --module-dir lib + ``` - Works with lyaml 4 and newer, which now returns all documents in the YAML stream as a table. -** Bugs Fixed: +### Bugs Fixed: - Don't forget to distribute .autom4te.cfg file. @@ -138,36 +227,44 @@ Slingshot NEWS - User visible changes. perform a segregated 5.1 install with the system luarocks to avoid incompatibilities on Travis CI. -** Incompatible Changes: +### Incompatible Changes: - `mail` wrapper removed. Rockspec announcement sent with a link to the rockspec rather than as an attachment. -* Noteworthy changes in release 2 (2013-04-28) [beta] -** New Features: +## Noteworthy changes in release 2 (2013-04-28) [beta] + +### New Features: - No longer depend on `woger`. + - New `mail` wrapper script to provide a POSIX mail API wrapped around mutt. Currently Mac OS X specific (which is the main system that doesn't ship a POSIX mail compatible command). + - Split local and origin rules to support, eg: + + ``` $ make beta - ...manually check local trees... + # manually check local trees... $ make push - ...manually check github zipball and released rockspec files... - ...maunally edit ~/announce--... + # manually check github zipball and released rockspec files... + # manually edit ~/announce--... $ make mail + ``` + - Port of gnulib project sanity checks hooked into release rules by `include build-aux/sanity.mk`. -** Bugs Fixed: +### Bugs Fixed: - Newly created release branch is now branched from the v1 tag rather than the "Post-release administrivia" commit. - Include maintainer support files in release, so that Travis CI has everything it needs to work on the release branch too. -* Noteworthy changes in release 1 (2013-04-28) [beta] -** Initial proof-of concept for shared Lua RockSpec framework. +## Noteworthy changes in release 1 (2013-04-28) [beta] + + - Initial proof-of concept for shared Lua RockSpec framework. diff --git a/README b/README index 16042c8..71f687f 100644 --- a/README +++ b/README @@ -35,12 +35,8 @@ slingshot managed files nominated into your project tree. quite a lot larger than the GNU implementation. Note that the [Slingshot][] `bootstrap` script has extra functions - compared to the Libtool `bootstrap` on which it is based, and the - two are **not** interchangable! - - * `docs/bootstrap.texi`: - - texinfo documentation for `bootstrap`. + compared to the [standard `bootstrap`](https://github.com/gvvaughan/bootstrap) + on which it is based, and the two are **not** interchangable! Alternatively, pick and choose whichever of the following files you want to make use of into your project, and either list them in a @@ -121,7 +117,7 @@ about automatically keeping them in sync with future releases): `~/.autom4te.cfg` to turn off the cache globally. In addition to the files above, slingshot expects you to maintain your -release notes in a GNU format NEWS file, such as the one used by +release notes in a Markdown format NEWS file, such as the one used by slingshot itself, and a revision controlled `.prev-version` file with the previous release version number. `release.mk` will maintain these files for you once you have them in place. diff --git a/aclocal.m4 b/aclocal.m4 index 277766d..267246d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -736,4 +736,3 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ax_lua.m4]) -m4_include([m4/slingshot.m4]) diff --git a/bootstrap b/bootstrap index 575ce48..90a6a3c 100755 --- a/bootstrap +++ b/bootstrap @@ -820,30 +820,31 @@ slingshot_require_slingshot_submodule () else $require_slingshot_dotgitmodules - if test -f .gitmodules && test -f "slingshot/src/mkrockspecs.in" - then - : All present and correct. - - else + if test -f .gitmodules; then $require_slingshot_path $require_slingshot_url - trap slingshot_cleanup 1 2 13 15 + if test -f "slingshot/src/mkrockspecs.in"; then + : All present and correct. - shallow= - $GIT clone -h 2>&1 |func_grep_q -- --depth \ - && shallow='--depth 365' + else + trap slingshot_cleanup 1 2 13 15 - func_show_eval "$GIT clone $shallow '$slingshot_url' '$slingshot_path'" \ - slingshot_cleanup + shallow= + $GIT clone -h 2>&1 |func_grep_q -- --depth \ + && shallow='--depth 365' - # FIXME: Solaris /bin/sh will try to execute '-' if any of - # these signals are caught after this. - trap - 1 2 13 15 + func_show_eval "$GIT clone $shallow '$slingshot_url' '$slingshot_path'" \ + slingshot_cleanup + + # FIXME: Solaris /bin/sh will try to execute '-' if any of + # these signals are caught after this. + trap - 1 2 13 15 + fi # Make sure we've checked out the correct revision of slingshot. - func_show_eval "$GIT submodule init" \ - && func_show_eval "$GIT submodule update" \ + func_show_eval "$GIT submodule init -- $slingshot_path" \ + && func_show_eval "$GIT submodule update -- $slingshot_path" \ || func_fatal_error "Unable to update slingshot submodule." fi fi @@ -852,6 +853,49 @@ slingshot_require_slingshot_submodule () } +# require_bootstrap_uptodate +# -------------------------- +# Complain if the version of bootstrap in the build-aux directory differs +# from the one we are running. +require_bootstrap_uptodate=slingshot_require_bootstrap_uptodate +slingshot_require_bootstrap_uptodate () +{ + $debug_cmd + + $require_slingshot_submodule + + _G_slingshot_bootstrap=slingshot/bootstrap + + rm -f $progname.new + + if test -f "$_G_slingshot_bootstrap"; then + if func_cmp_s "$progpath" "$_G_slingshot_bootstrap"; then + func_verbose "bootstrap script up to date" + else + cp -f $_G_slingshot_bootstrap $progname.new + func_warning upgrade "\ +An updated slingshot bootstrap script is ready for you in +'$progname.new'. After you've verified that you want the +changes, you can update with: + mv -f $progname.new $progname + ./$progname + +Or you can disable this check permanently by adding the +following to 'bootstrap.conf': + require_bootstrap_uptodate=:" + fi + else + func_warning upgrade "\ +Your slingshot submodule appears to be damagedi, so I can't tell +whether your bootstrap has gone out of sync. Please check for +and undo any local changes, or revert to the slingshot revision +you were using previously, and rerun this script." + fi + + require_bootstrap_uptodate=: +} + + # slingshot_cleanup # ----------------- # Recursively delete everything at $slingshot_path. @@ -2424,7 +2468,7 @@ test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser # Set a version string. -scriptversion=2014-01-04.01; # UTC +scriptversion=2014-12-03.16; # UTC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -2569,6 +2613,69 @@ func_autoconf_configure () } +# func_tool_version_output CMD [FATAL-ERROR-MSG] +# ---------------------------------------------- +# Attempt to run 'CMD --version', discarding errors. The output can be +# ignored by redirecting stdout, and this function used simply to test +# whether the command exists and exits normally when passed a +# '--version' argument. +# When FATAL-ERROR-MSG is given, then this function will display the +# message and exit if running 'CMD --version' returns a non-zero exit +# status. +func_tool_version_output () +{ + $debug_cmd + + _G_cmd=$1 + _G_fatal_error_msg=$2 + + # Some tools, like 'git2cl' produce thousands of lines of output + # unless stdin is /dev/null - in that case we want to return + # successfully without saving all of that output. Other tools, + # such as 'help2man' exit with a non-zero status when stdin comes + # from /dev/null, so we re-execute without /dev/null if that + # happens. This means that occasionally, the output from both calls + # ends up in the result, but the alternative would be to discard the + # output from one call, and hope the other produces something useful. + { $_G_cmd --version /dev/null + _G_status=$? + + test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \ + && func_fatal_error "$_G_fatal_error_msg" + + (exit $_G_status) +} + + +# func_tool_version_number CMD [FATAL-ERROR-MSG] +# ---------------------------------------------- +# Pass arguments to func_tool_version_output, but set +# $func_tool_version_number_result to the last dot delimited digit string +# on the first line of output. +func_tool_version_number () +{ + $debug_cmd + + _G_verout=`func_tool_version_output "$@"` + _G_status=$? + + # A version number starts with a digit following a space on the first + # line of output from `--version`. + _G_verout=`echo "$_G_verout" |sed 1q` + if test -n "$_G_verout"; then + _G_vernum=`expr "$_G_verout" : '.* \([0-9][^ ]*\)'` + fi + + if test -n "$_G_vernum"; then + printf '%s\n' "$_G_vernum" + else + printf '%s\n' "$_G_verout" + fi + + (exit $_G_status) +} + + # func_find_tool ENVVAR NAMES... # ------------------------------ # Search for a required program. Use the value of ENVVAR, if set, @@ -2586,16 +2693,44 @@ func_find_tool () if test -n "$_G_find_tool_res"; then _G_find_tool_error_prefix="\$$find_tool_envvar: " else + _G_find_tool_res= + _G_bestver= for _G_prog do - if func_tool_version_output $_G_prog >/dev/null; then - _G_find_tool_res=$_G_prog - break - fi + _G_find_tool_save_IFS=$IFS + IFS=: + for _G_dir in $PATH; do + IFS=$_G_find_tool_save_IFS + _G_progpath=$_G_dir/$_G_prog + test -r "$_G_progpath" && { + _G_curver=`func_tool_version_number $_G_progpath` + case $_G_bestver,$_G_curver in + ,) + # first non--version responsive prog sticks! + test -n "$_G_progpath" || _G_find_tool_res=$_G_progpath + ;; + ,*) + # first --version responsive prog beats non--version responsive! + _G_find_tool_res=$_G_progpath + _G_bestver=$_G_curver + ;; + *,*) + # another --version responsive prog must be newer to beat previous one! + test "x$_G_curver" = "x$_G_bestver" \ + || func_lt_ver "$_G_curver" "$_G_bestver" \ + || { + _G_find_tool_res=$_G_progpath + _G_bestver=$_G_curver + } + ;; + esac + } + done + IFS=$_G_find_tool_save_IFS done fi if test -n "$_G_find_tool_res"; then - func_tool_version_output >/dev/null $_G_find_tool_res "\ + func_tool_version_number >/dev/null $_G_find_tool_res "\ ${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'" # Make sure the result is exported to the environment for children @@ -2610,39 +2745,6 @@ One of these is required: } -# func_tool_version_output CMD [FATAL-ERROR-MSG] -# ---------------------------------------------- -# Attempt to run 'CMD --version', discarding errors. The output can be -# ignored by redirecting stdout, and this function used simply to test -# whether the command exists and exits normally when passed a -# '--version' argument. -# When FATAL-ERROR-MSG is given, then this function will display the -# message and exit if running 'CMD --version' returns a non-zero exit -# status. -func_tool_version_output () -{ - $debug_cmd - - _G_cmd=$1 - _G_fatal_error_msg=$2 - - # Some tools, like 'git2cl' produce thousands of lines of output - # unless stdin is /dev/null - in that case we want to return - # successfully without saving all of that output. Other tools, - # such as 'help2man' exit with a non-zero status when stdin comes - # from /dev/null, so we re-execute without /dev/null if that - # happens. This means that occasionally, the output from both calls - # ends up in the result, but the alternative would be to discard the - # output from one call, and hope the other produces something useful. - { $_G_cmd --version /dev/null - _G_status=$? - - test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \ - && func_fatal_error "$_G_fatal_error_msg" - - (exit $_G_status) -} - ## -------------------- ## ## Resource management. ## @@ -2908,7 +3010,7 @@ test extract-trace = "$progname" && func_main "$@" # End: # Set a version string for *this* script. -scriptversion=2014-01-04.01; # UTC +scriptversion=2014-11-04.13; # UTC ## ------------------- ## @@ -3034,10 +3136,13 @@ func_reconfigure () $require_automake_options - # Automake (without 'foreign' option) requires that README exists. + # Automake (without 'foreign' option) requires that NEWS & README exist. case " $automake_options " in " foreign ") ;; - *) func_ensure_README ;; + *) + func_ensure_NEWS + func_ensure_README + ;; esac # Ensure ChangeLog presence. @@ -3336,6 +3441,7 @@ slingshot_copy_files () $require_slingshot_submodule # Make sure we have the latest mkrockspecs + # (the rebootstrap rule in slingshot/GNUmakefile autoruns). make -C slingshot build-aux/mkrockspecs # Update in-tree links. @@ -3367,6 +3473,65 @@ slingshot_ensure_changelog () func_add_hook func_prep slingshot_ensure_changelog +# slingshot_update_travis_yml +# --------------------------- +# When 'travis.yml.in' is listed in $slingshot_files, complain if +# regenerating '.travis.yml' would change it. +slingshot_update_travis_yml () +{ + $debug_cmd + + $require_git + + _G_travis_yml_in=travis.yml.in + _G_travis_yml_out=.travis.yml + + rm -f "$_G_travis_yml_out.new" + + test true = "$GIT" || { + case " "`echo $slingshot_files`" " in + *" travis.yml.in "*) + # Remove trailing blanks so as not to trip sc_trailing_blank in syntax check + test -f "$_G_travis_yml_in" && { + $slingshot_require_travis_extra_rocks + + eval `grep '^ *PACKAGE=' configure | sed 1q` + eval `grep '^ *VERSION=' configure | sed 1q` + + cat "$_G_travis_yml_in" | + sed 's| *$||' | + sed "s|@EXTRA_ROCKS@|`echo $travis_extra_rocks`|g" | + sed "s|@PACKAGE@|$PACKAGE|g" | + sed "s|@VERSION@|$VERSION|g" + + if test -f .slackid; then + read slackid < .slackid + printf '%s\n' '' 'notifications:' " slack: $slackid" + fi + } > "$_G_travis_yml_out.new" + + if test -f "$_G_travis_yml_out"; then + if func_cmp_s "$_G_travis_yml_out" "$_G_travis_yml_out.new"; then + func_verbose "$_G_travis_yml_out is up to date" + rm -f "$_G_travis_yml_out.new" + else + func_warning upgrade "\ +An updated $_G_travis_yml_out script is ready for you in +'$_G_travis_yml_out.new'. After you've verified that you want +the changes, you can update with: + mv -f $_G_travis_yml_out.new $_G_travis_yml_out" + fi + else + func_verbose "creating '$_G_travis_yml_out'" + mv -f "$_G_travis_yml_out.new" "$_G_travis_yml_out" + fi + ;; + esac + } +} +func_add_hook func_fini slingshot_update_travis_yml + + # slingshot_check_rockstree_path # ------------------------------ # Show a warning at the end of bootstrap if --luarocks-tree was passed @@ -3529,6 +3694,29 @@ EOT } +# func_ensure_NEWS +# ---------------- +# Without AM_INIT_AUTOMAKE([foreign]), automake will not run to +# completion with no NEWS file, even though NEWS.md or NEWS.txt +# is often preferable. +func_ensure_NEWS () +{ + $debug_cmd + + test -f NEWS || { + _G_NEWS= + for _G_news in NEWS.txt NEWS.md NEWS.rst; do + test -f "$_G_news" && break + done + + test -f "$_G_news" && $LN_S $_G_news NEWS + func_verbose "$LN_S $_G_news NEWS" + } + + return 0 +} + + # func_ensure_README # ------------------ # Without AM_INIT_AUTOMAKE([foreign]), automake will not run to @@ -3852,7 +4040,7 @@ func_require_autopoint () # -------------------------- # Complain if the version of bootstrap in the gnulib directory differs # from the one we are running. -require_bootstrap_uptodate=func_require_bootstrap_uptodate + func_require_bootstrap_uptodate () { $debug_cmd @@ -4054,7 +4242,7 @@ func_require_buildreq_patch () # The ugly find invocation is necessary to exit with non-zero # status for old find binaries that don't support -exec fully. if test ! -d "$local_gl_dir" \ - || find "$local_gl_dir" -name *.diff -exec false {} \; ; then : + || find "$local_gl_dir" -name "*.diff" -exec false {} \; ; then : else func_append buildreq 'patch - http://www.gnu.org/s/patch ' @@ -4206,7 +4394,7 @@ func_require_git () $opt_skip_git && GIT=true test true = "$GIT" || { - if test -f .git; then + if test -d .git/.; then ($GIT --version) >/dev/null 2>&1 || GIT=true fi } @@ -4424,8 +4612,8 @@ func_require_gnulib_submodule () fi # Make sure we've checked out the correct revision of gnulib. - func_show_eval "$GIT submodule init" \ - && func_show_eval "$GIT submodule update" \ + func_show_eval "$GIT submodule init -- $gnulib_path" \ + && func_show_eval "$GIT submodule update -- $gnulib_path" \ || func_fatal_error "Unable to update gnulib submodule." fi @@ -4529,6 +4717,9 @@ func_require_libtoolize () func_find_tool LIBTOOLIZE libtoolize glibtoolize } + test -n "$LIBTOOLIZE" || func_fatal_error "\ +Please install GNU Libtool, or 'export LIBTOOLIZE=/path/to/libtoolize'." + func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'" # Make sure the search result is visible to subshells @@ -4766,6 +4957,9 @@ func_require_patch () func_find_tool PATCH gpatch patch } + test -n "$PATCH" || func_fatal_error "\ +Please install GNU Patch, or 'export PATCH=/path/to/gnu/patch'." + func_verbose "export PATCH='$PATCH'" # Make sure the search result is visible to subshells @@ -5257,7 +5451,7 @@ func_check_tool () ;; *) save_IFS=$IFS - IFS=: + IFS=${PATH_SEPARATOR-:} for _G_check_tool_path in $PATH; do IFS=$save_IFS if test -x "$_G_check_tool_path/$1"; then @@ -5403,6 +5597,9 @@ func_update_po_files () # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+. func_find_tool SHA1SUM sha1sum gsha1sum shasum sha1 + test -n "$SHA1SUM" || func_fatal_error "\ +Please install GNU Coreutils, or 'export SHA1SUM=/path/to/sha1sum'." + _G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'` test '*' = "$_G_langs" && _G_langs=x for _G_po in $_G_langs; do diff --git a/bootstrap.conf b/bootstrap.conf index e070fb4..071258e 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -32,9 +32,18 @@ # Build prerequisites buildreq=' - git 1.7.0 http://git-scm.com - help2man 1.29 http://www.gnu.org/s/help2man - specl 5 http://luarocks.org/repositories/rocks/specl-9-1.rockspec + git 1.7.0 http://git-scm.com + help2man 1.29 http://www.gnu.org/s/help2man + specl 14 http://rocks.moonscript.org/manifests/gvvaughan/specl-14-1.rockspec +' + +# Prequisite rocks that need to be installed for travis builds to work. +travis_extra_rocks=' + specl +' + +slingshot_files=' + travis.yml.in ' # No need to do any gnulib-tooling here. @@ -74,7 +83,9 @@ repository, so that I can tell you when bootstrap needs rebuilding." else rm -f bootstrap.new - $build_aux/merge-sections $build_aux/bootstrap.slingshot < $build_aux/bootstrap.in > bootstrap.new + $build_aux/merge-sections \ + -e '^require_bootstrap_uptodate=.*$' '' \ + $build_aux/bootstrap.slingshot < $build_aux/bootstrap.in > bootstrap.new if func_cmp_s "$progpath" bootstrap.new; then rm -f bootstrap.new diff --git a/build-aux/bootstrap.in b/build-aux/bootstrap.in index 2094e73..51fb1a9 100755 --- a/build-aux/bootstrap.in +++ b/build-aux/bootstrap.in @@ -2155,7 +2155,7 @@ test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser # Set a version string. -scriptversion=2014-01-04.01; # UTC +scriptversion=2014-12-03.16; # UTC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -2224,6 +2224,69 @@ func_autoconf_configure () } +# func_tool_version_output CMD [FATAL-ERROR-MSG] +# ---------------------------------------------- +# Attempt to run 'CMD --version', discarding errors. The output can be +# ignored by redirecting stdout, and this function used simply to test +# whether the command exists and exits normally when passed a +# '--version' argument. +# When FATAL-ERROR-MSG is given, then this function will display the +# message and exit if running 'CMD --version' returns a non-zero exit +# status. +func_tool_version_output () +{ + $debug_cmd + + _G_cmd=$1 + _G_fatal_error_msg=$2 + + # Some tools, like 'git2cl' produce thousands of lines of output + # unless stdin is /dev/null - in that case we want to return + # successfully without saving all of that output. Other tools, + # such as 'help2man' exit with a non-zero status when stdin comes + # from /dev/null, so we re-execute without /dev/null if that + # happens. This means that occasionally, the output from both calls + # ends up in the result, but the alternative would be to discard the + # output from one call, and hope the other produces something useful. + { $_G_cmd --version /dev/null + _G_status=$? + + test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \ + && func_fatal_error "$_G_fatal_error_msg" + + (exit $_G_status) +} + + +# func_tool_version_number CMD [FATAL-ERROR-MSG] +# ---------------------------------------------- +# Pass arguments to func_tool_version_output, but set +# $func_tool_version_number_result to the last dot delimited digit string +# on the first line of output. +func_tool_version_number () +{ + $debug_cmd + + _G_verout=`func_tool_version_output "$@"` + _G_status=$? + + # A version number starts with a digit following a space on the first + # line of output from `--version`. + _G_verout=`echo "$_G_verout" |sed 1q` + if test -n "$_G_verout"; then + _G_vernum=`expr "$_G_verout" : '.* \([0-9][^ ]*\)'` + fi + + if test -n "$_G_vernum"; then + printf '%s\n' "$_G_vernum" + else + printf '%s\n' "$_G_verout" + fi + + (exit $_G_status) +} + + # func_find_tool ENVVAR NAMES... # ------------------------------ # Search for a required program. Use the value of ENVVAR, if set, @@ -2241,16 +2304,44 @@ func_find_tool () if test -n "$_G_find_tool_res"; then _G_find_tool_error_prefix="\$$find_tool_envvar: " else + _G_find_tool_res= + _G_bestver= for _G_prog do - if func_tool_version_output $_G_prog >/dev/null; then - _G_find_tool_res=$_G_prog - break - fi + _G_find_tool_save_IFS=$IFS + IFS=: + for _G_dir in $PATH; do + IFS=$_G_find_tool_save_IFS + _G_progpath=$_G_dir/$_G_prog + test -r "$_G_progpath" && { + _G_curver=`func_tool_version_number $_G_progpath` + case $_G_bestver,$_G_curver in + ,) + # first non--version responsive prog sticks! + test -n "$_G_progpath" || _G_find_tool_res=$_G_progpath + ;; + ,*) + # first --version responsive prog beats non--version responsive! + _G_find_tool_res=$_G_progpath + _G_bestver=$_G_curver + ;; + *,*) + # another --version responsive prog must be newer to beat previous one! + test "x$_G_curver" = "x$_G_bestver" \ + || func_lt_ver "$_G_curver" "$_G_bestver" \ + || { + _G_find_tool_res=$_G_progpath + _G_bestver=$_G_curver + } + ;; + esac + } + done + IFS=$_G_find_tool_save_IFS done fi if test -n "$_G_find_tool_res"; then - func_tool_version_output >/dev/null $_G_find_tool_res "\ + func_tool_version_number >/dev/null $_G_find_tool_res "\ ${_G_find_tool_error_prefix}Cannot run '$_G_find_tool_res --version'" # Make sure the result is exported to the environment for children @@ -2265,39 +2356,6 @@ One of these is required: } -# func_tool_version_output CMD [FATAL-ERROR-MSG] -# ---------------------------------------------- -# Attempt to run 'CMD --version', discarding errors. The output can be -# ignored by redirecting stdout, and this function used simply to test -# whether the command exists and exits normally when passed a -# '--version' argument. -# When FATAL-ERROR-MSG is given, then this function will display the -# message and exit if running 'CMD --version' returns a non-zero exit -# status. -func_tool_version_output () -{ - $debug_cmd - - _G_cmd=$1 - _G_fatal_error_msg=$2 - - # Some tools, like 'git2cl' produce thousands of lines of output - # unless stdin is /dev/null - in that case we want to return - # successfully without saving all of that output. Other tools, - # such as 'help2man' exit with a non-zero status when stdin comes - # from /dev/null, so we re-execute without /dev/null if that - # happens. This means that occasionally, the output from both calls - # ends up in the result, but the alternative would be to discard the - # output from one call, and hope the other produces something useful. - { $_G_cmd --version /dev/null - _G_status=$? - - test 0 -ne "$_G_status" && test -n "$_G_fatal_error_msg" \ - && func_fatal_error "$_G_fatal_error_msg" - - (exit $_G_status) -} - ## -------------------- ## ## Resource management. ## @@ -2563,7 +2621,7 @@ test extract-trace = "$progname" && func_main "$@" # End: # Set a version string for *this* script. -scriptversion=2014-01-04.01; # UTC +scriptversion=2014-11-04.13; # UTC ## ------------------- ## @@ -2689,10 +2747,13 @@ func_reconfigure () $require_automake_options - # Automake (without 'foreign' option) requires that README exists. + # Automake (without 'foreign' option) requires that NEWS & README exist. case " $automake_options " in " foreign ") ;; - *) func_ensure_README ;; + *) + func_ensure_NEWS + func_ensure_README + ;; esac # Ensure ChangeLog presence. @@ -3021,6 +3082,29 @@ EOT } +# func_ensure_NEWS +# ---------------- +# Without AM_INIT_AUTOMAKE([foreign]), automake will not run to +# completion with no NEWS file, even though NEWS.md or NEWS.txt +# is often preferable. +func_ensure_NEWS () +{ + $debug_cmd + + test -f NEWS || { + _G_NEWS= + for _G_news in NEWS.txt NEWS.md NEWS.rst; do + test -f "$_G_news" && break + done + + test -f "$_G_news" && $LN_S $_G_news NEWS + func_verbose "$LN_S $_G_news NEWS" + } + + return 0 +} + + # func_ensure_README # ------------------ # Without AM_INIT_AUTOMAKE([foreign]), automake will not run to @@ -3546,7 +3630,7 @@ func_require_buildreq_patch () # The ugly find invocation is necessary to exit with non-zero # status for old find binaries that don't support -exec fully. if test ! -d "$local_gl_dir" \ - || find "$local_gl_dir" -name *.diff -exec false {} \; ; then : + || find "$local_gl_dir" -name "*.diff" -exec false {} \; ; then : else func_append buildreq 'patch - http://www.gnu.org/s/patch ' @@ -3698,7 +3782,7 @@ func_require_git () $opt_skip_git && GIT=true test true = "$GIT" || { - if test -f .git; then + if test -d .git/.; then ($GIT --version) >/dev/null 2>&1 || GIT=true fi } @@ -3916,8 +4000,8 @@ func_require_gnulib_submodule () fi # Make sure we've checked out the correct revision of gnulib. - func_show_eval "$GIT submodule init" \ - && func_show_eval "$GIT submodule update" \ + func_show_eval "$GIT submodule init -- $gnulib_path" \ + && func_show_eval "$GIT submodule update -- $gnulib_path" \ || func_fatal_error "Unable to update gnulib submodule." fi @@ -4021,6 +4105,9 @@ func_require_libtoolize () func_find_tool LIBTOOLIZE libtoolize glibtoolize } + test -n "$LIBTOOLIZE" || func_fatal_error "\ +Please install GNU Libtool, or 'export LIBTOOLIZE=/path/to/libtoolize'." + func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'" # Make sure the search result is visible to subshells @@ -4258,6 +4345,9 @@ func_require_patch () func_find_tool PATCH gpatch patch } + test -n "$PATCH" || func_fatal_error "\ +Please install GNU Patch, or 'export PATCH=/path/to/gnu/patch'." + func_verbose "export PATCH='$PATCH'" # Make sure the search result is visible to subshells @@ -4749,7 +4839,7 @@ func_check_tool () ;; *) save_IFS=$IFS - IFS=: + IFS=${PATH_SEPARATOR-:} for _G_check_tool_path in $PATH; do IFS=$save_IFS if test -x "$_G_check_tool_path/$1"; then @@ -4895,6 +4985,9 @@ func_update_po_files () # Find sha1sum, named gsha1sum on MacPorts, and shasum on MacOS 10.6+. func_find_tool SHA1SUM sha1sum gsha1sum shasum sha1 + test -n "$SHA1SUM" || func_fatal_error "\ +Please install GNU Coreutils, or 'export SHA1SUM=/path/to/sha1sum'." + _G_langs=`cd $_G_ref_po_dir && echo *.po|$SED 's|\.po||g'` test '*' = "$_G_langs" && _G_langs=x for _G_po in $_G_langs; do diff --git a/build-aux/bootstrap.slingshot b/build-aux/bootstrap.slingshot index 3ff5ac1..803464d 100644 --- a/build-aux/bootstrap.slingshot +++ b/build-aux/bootstrap.slingshot @@ -334,6 +334,7 @@ slingshot_copy_files () $require_slingshot_submodule # Make sure we have the latest mkrockspecs + # (the rebootstrap rule in slingshot/GNUmakefile autoruns). make -C slingshot build-aux/mkrockspecs # Update in-tree links. @@ -365,6 +366,65 @@ slingshot_ensure_changelog () func_add_hook func_prep slingshot_ensure_changelog +# slingshot_update_travis_yml +# --------------------------- +# When 'travis.yml.in' is listed in $slingshot_files, complain if +# regenerating '.travis.yml' would change it. +slingshot_update_travis_yml () +{ + $debug_cmd + + $require_git + + _G_travis_yml_in=travis.yml.in + _G_travis_yml_out=.travis.yml + + rm -f "$_G_travis_yml_out.new" + + test true = "$GIT" || { + case " "`echo $slingshot_files`" " in + *" travis.yml.in "*) + # Remove trailing blanks so as not to trip sc_trailing_blank in syntax check + test -f "$_G_travis_yml_in" && { + $slingshot_require_travis_extra_rocks + + eval `grep '^ *PACKAGE=' configure | sed 1q` + eval `grep '^ *VERSION=' configure | sed 1q` + + cat "$_G_travis_yml_in" | + sed 's| *$||' | + sed "s|@EXTRA_ROCKS@|`echo $travis_extra_rocks`|g" | + sed "s|@PACKAGE@|$PACKAGE|g" | + sed "s|@VERSION@|$VERSION|g" + + if test -f .slackid; then + read slackid < .slackid + printf '%s\n' '' 'notifications:' " slack: $slackid" + fi + } > "$_G_travis_yml_out.new" + + if test -f "$_G_travis_yml_out"; then + if func_cmp_s "$_G_travis_yml_out" "$_G_travis_yml_out.new"; then + func_verbose "$_G_travis_yml_out is up to date" + rm -f "$_G_travis_yml_out.new" + else + func_warning upgrade "\ +An updated $_G_travis_yml_out script is ready for you in +'$_G_travis_yml_out.new'. After you've verified that you want +the changes, you can update with: + mv -f $_G_travis_yml_out.new $_G_travis_yml_out" + fi + else + func_verbose "creating '$_G_travis_yml_out'" + mv -f "$_G_travis_yml_out.new" "$_G_travis_yml_out" + fi + ;; + esac + } +} +func_add_hook func_fini slingshot_update_travis_yml + + # slingshot_check_rockstree_path # ------------------------------ # Show a warning at the end of bootstrap if --luarocks-tree was passed @@ -508,30 +568,31 @@ slingshot_require_slingshot_submodule () else $require_slingshot_dotgitmodules - if test -f .gitmodules && test -f "slingshot/src/mkrockspecs.in" - then - : All present and correct. - - else + if test -f .gitmodules; then $require_slingshot_path $require_slingshot_url - trap slingshot_cleanup 1 2 13 15 + if test -f "slingshot/src/mkrockspecs.in"; then + : All present and correct. - shallow= - $GIT clone -h 2>&1 |func_grep_q -- --depth \ - && shallow='--depth 365' + else + trap slingshot_cleanup 1 2 13 15 + + shallow= + $GIT clone -h 2>&1 |func_grep_q -- --depth \ + && shallow='--depth 365' - func_show_eval "$GIT clone $shallow '$slingshot_url' '$slingshot_path'" \ - slingshot_cleanup + func_show_eval "$GIT clone $shallow '$slingshot_url' '$slingshot_path'" \ + slingshot_cleanup - # FIXME: Solaris /bin/sh will try to execute '-' if any of - # these signals are caught after this. - trap - 1 2 13 15 + # FIXME: Solaris /bin/sh will try to execute '-' if any of + # these signals are caught after this. + trap - 1 2 13 15 + fi # Make sure we've checked out the correct revision of slingshot. - func_show_eval "$GIT submodule init" \ - && func_show_eval "$GIT submodule update" \ + func_show_eval "$GIT submodule init -- $slingshot_path" \ + && func_show_eval "$GIT submodule update -- $slingshot_path" \ || func_fatal_error "Unable to update slingshot submodule." fi fi @@ -540,6 +601,49 @@ slingshot_require_slingshot_submodule () } +# require_bootstrap_uptodate +# -------------------------- +# Complain if the version of bootstrap in the build-aux directory differs +# from the one we are running. +require_bootstrap_uptodate=slingshot_require_bootstrap_uptodate +slingshot_require_bootstrap_uptodate () +{ + $debug_cmd + + $require_slingshot_submodule + + _G_slingshot_bootstrap=slingshot/bootstrap + + rm -f $progname.new + + if test -f "$_G_slingshot_bootstrap"; then + if func_cmp_s "$progpath" "$_G_slingshot_bootstrap"; then + func_verbose "bootstrap script up to date" + else + cp -f $_G_slingshot_bootstrap $progname.new + func_warning upgrade "\ +An updated slingshot bootstrap script is ready for you in +'$progname.new'. After you've verified that you want the +changes, you can update with: + mv -f $progname.new $progname + ./$progname + +Or you can disable this check permanently by adding the +following to 'bootstrap.conf': + require_bootstrap_uptodate=:" + fi + else + func_warning upgrade "\ +Your slingshot submodule appears to be damagedi, so I can't tell +whether your bootstrap has gone out of sync. Please check for +and undo any local changes, or revert to the slingshot revision +you were using previously, and rerun this script." + fi + + require_bootstrap_uptodate=: +} + + # slingshot_cleanup # ----------------- # Recursively delete everything at $slingshot_path. diff --git a/build-aux/merge-sections b/build-aux/merge-sections index 382c837..e99a710 100755 --- a/build-aux/merge-sections +++ b/build-aux/merge-sections @@ -29,11 +29,13 @@ SH=--[[ # -*- mode: lua; -*- ## ==================================================================== -_lua_version_re='"Lua 5."[12]*' -_lua_binaries='lua lua5.2 lua52 lua5.1 lua51' +_lua_version_re='"Lua 5."[123]*' +_lua_binaries='lua lua5.3 lua53 lua5.2 lua52 luajit lua5.1 lua51' +export LUA export LUA_INIT export LUA_INIT_5_2 +export LUA_INIT_5_3 export LUA_PATH export LUA_CPATH @@ -86,6 +88,7 @@ test -n "$LUA" || { LUA_INIT= LUA_INIT_5_2= +LUA_INIT_5_3= # Reexecute using the interpreter suppiled in LUA, or found above. exec "$LUA" "$0" "$@" @@ -145,7 +148,7 @@ Report bugs to http://github.com/gvvaughan/slingshot/issues.]]) end prog["--version"] = function () - print [[merge-sections (slingshot) 7 + print [[merge-sections (slingshot) 8.0.0 Written by Gary V. Vaughan , 2014 Copyright (C) 2014, Gary V. Vaughan diff --git a/build-aux/mkrockspecs b/build-aux/mkrockspecs index ca8fde2..b4115f3 100755 --- a/build-aux/mkrockspecs +++ b/build-aux/mkrockspecs @@ -29,11 +29,13 @@ SH=--[[ # -*- mode: lua; -*- ## ==================================================================== -_lua_version_re='"Lua 5."[12]*' -_lua_binaries='lua lua5.2 lua52 lua5.1 lua51' +_lua_version_re='"Lua 5."[123]*' +_lua_binaries='lua lua5.3 lua53 lua5.2 lua52 luajit lua5.1 lua51' +export LUA export LUA_INIT export LUA_INIT_5_2 +export LUA_INIT_5_3 export LUA_PATH export LUA_CPATH @@ -86,6 +88,7 @@ test -n "$LUA" || { LUA_INIT= LUA_INIT_5_2= +LUA_INIT_5_3= # Reexecute using the interpreter suppiled in LUA, or found above. exec "$LUA" "$0" "$@" @@ -155,7 +158,7 @@ Report bugs to http://github.com/gvvaughan/slingshot/issues.]]) end prog["--version"] = function () - print [[mkrockspecs (slingshot) 7 + print [[mkrockspecs (slingshot) 8.0.0 Written by Gary V. Vaughan , 2013 Copyright (C) 2013, Gary V. Vaughan @@ -359,7 +362,7 @@ default.build = default.build or { "LUA='$(LUA)' LUA_INCLUDE='-I$(LUA_INCDIR)' " .. configure_flags .. "--prefix='$(PREFIX)' --libdir='$(LIBDIR)' --datadir='$(LUADIR)' " .. "--datarootdir='$(PREFIX)' && make clean all", - install_command = "make install luadir='$(LUADIR)'", + install_command = "make install luadir='$(LUADIR)' luaexecdir='$(LIBDIR)'", copy_directories = {}, } diff --git a/build-aux/release.mk b/build-aux/release.mk index b31c155..c6541e8 100644 --- a/build-aux/release.mk +++ b/build-aux/release.mk @@ -76,7 +76,7 @@ _build-aux ?= build-aux my_distdir ?= $(PACKAGE)-$(VERSION) prev_version_file ?= $(srcdir)/.prev-version old_NEWS_hash-file ?= $(srcdir)/local.mk -gl_noteworthy_news_ = * Noteworthy changes in release ?.? (????-??-??) [?] +gl_noteworthy_news_ = \#\# Noteworthy changes in release ?.? (????-??-??) [?] PREV_VERSION = $(shell cat $(prev_version_file) 2>/dev/null) VERSION_REGEXP = $(subst .,\.,$(VERSION)) @@ -227,7 +227,15 @@ vc-diff-check: # of '$(_build-aux)/do-release-commit-and-tag'. # If you want to search only lines 1-10, use "1,10". news-check-lines-spec ?= 3 -news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' +news-check-regexp ?= '^\#\#.* $(VERSION_REGEXP) \($(today)\)' + +Makefile.in: NEWS + +NEWS: + $(AM_V_GEN)if test -f NEWS.md; then ln -s NEWS.md NEWS; \ + elif test -f NEWS.rst; then ln -s NEWS.rst NEWS; \ + elif test -f NEWS.txt; then ln -s NEWS.txt NEWS; \ + fi news-check: NEWS $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \ @@ -239,7 +247,7 @@ news-check: NEWS fi .PHONY: release-commit -release-commit: +release-commit: NEWS $(AM_V_GEN)cd $(srcdir) \ && $(_build-aux)/do-release-commit-and-tag \ -C $(abs_builddir) $(VERSION) $(RELEASE_TYPE) @@ -263,7 +271,7 @@ release-prep: $(scm_rockspec) $(AM_V_at)$(MAKE) update-old-NEWS-hash $(AM_V_at)perl -pi \ -e '$$. == 3 and print "$(gl_noteworthy_news_)\n\n\n"' \ - $(srcdir)/NEWS + `readlink $(srcdir)/NEWS 2>/dev/null || echo $(srcdir)/NEWS` $(AM_V_at)msg=$$($(emit-commit-log)) || exit 1; \ cd $(srcdir) && $(GIT) commit -s -m "$$msg" -a @echo '**** Release announcement in ~/announce-$(my_distdir)' @@ -300,7 +308,10 @@ GITHUB_ROCKSPEC = (source.url:gsub ("^git://github", $(_PRE)):gsub ("%.git$$", $ announcement: NEWS # Not $(AM_V_GEN) since the output of this command serves as # announcement message: else, it would start with " GEN announcement". - $(AM_V_at)$(ANNOUNCE_PRINT) 'print (description.summary)' + $(AM_V_at)printf '%s\n' \ + '# [ANN] $(PACKAGE_NAME) $(VERSION) released' \ + '' + $(AM_V_at)$(ANNOUNCE_PRINT) 'print (description.detailed)' $(AM_V_at)printf '%s\n' '' \ 'I am happy to announce release $(VERSION) of $(PACKAGE_NAME).' \ '' @@ -308,7 +319,7 @@ announcement: NEWS 'print ("$(PACKAGE_NAME)'\''s home page is at " .. description.homepage)' $(AM_V_at)printf '\n' $(AM_V_at)$(SED) -n \ - -e '/^\* Noteworthy changes in release $(PREV_VERSION)/q' \ + -e '/^\#\# Noteworthy changes in release $(PREV_VERSION)/q' \ -e p NEWS |$(SED) -e 1,2d $(AM_V_at)printf '%s\n' \ 'Install it with LuaRocks, using:' '' \ diff --git a/build-aux/specl.mk b/build-aux/specl.mk index 6cee599..1afd96a 100644 --- a/build-aux/specl.mk +++ b/build-aux/specl.mk @@ -33,9 +33,17 @@ ## Specl. ## ## ------ ## +SPECL_ENV += \ + LUA='$(LUA)' \ + abs_top_builddir='$(abs_top_builddir)' \ + abs_top_srcdir='$(abs_top_srcdir)' \ + top_builddir='$(top_builddir)' \ + top_srcdir='$(top_srcdir)' \ + $(NOTHING_ELSE) + check_local += specl-check-local specl-check-local: $(specl_SPECS) - $(SPECL_ENV) LUA=$(LUA) $(SPECL) $(SPECL_OPTS) $(specl_SPECS) + $(SPECL_ENV) $(SPECL) $(SPECL_OPTS) $(specl_SPECS) ## ------------- ## diff --git a/configure b/configure index b260871..c736e45 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Slingshot 7. +# Generated by GNU Autoconf 2.69 for Slingshot 8.0.0. # # Report bugs to . # @@ -580,14 +580,13 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Slingshot' PACKAGE_TARNAME='slingshot' -PACKAGE_VERSION='7' -PACKAGE_STRING='Slingshot 7' +PACKAGE_VERSION='8.0.0' +PACKAGE_STRING='Slingshot 8.0.0' PACKAGE_BUGREPORT='http://github.com/gvvaughan/slingshot/issues' PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS -EXTRA_ROCKS SED EGREP GREP @@ -1217,7 +1216,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Slingshot 7 to adapt to many kinds of systems. +\`configure' configures Slingshot 8.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1283,7 +1282,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Slingshot 7:";; + short | recursive ) echo "Configuration of Slingshot 8.0.0:";; esac cat <<\_ACEOF @@ -1363,7 +1362,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Slingshot configure 7 +Slingshot configure 8.0.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1380,7 +1379,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Slingshot $as_me 7, which was +It was created by Slingshot $as_me 8.0.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1759,9 +1758,9 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -$as_echo "## ----------------------- ## -## Configuring slingshot 7 ## -## ----------------------- ##" +$as_echo "## --------------------------- ## +## Configuring slingshot 8.0.0 ## +## --------------------------- ##" echo am__api_version='1.14' @@ -2250,7 +2249,7 @@ fi # Define the identity of the package. PACKAGE='slingshot' - VERSION='7' + VERSION='8.0.0' cat >>confdefs.h <<_ACEOF @@ -2483,14 +2482,16 @@ $as_echo "no" >&6; } fi - _ax_check_text="whether $LUA version >= 5.1, < 5.3" + _ax_check_text="whether $LUA version >= 5.1, < 5.4" { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 $as_echo_n "checking $_ax_check_text... " >&6; } if $LUA 2>/dev/null -e ' - function norm (v) i,j=v:match "(%d+)%.(%d+)" return 100 * i + j end - v=norm (_VERSION) - os.exit ((v >= norm ("5.1") and v < norm ("5.3")) and 0 or 1)'; then : + function norm (v) + i,j=v:match "(%d+)%.(%d+)" if i then return 100 * i + j end + end + v, toobig=norm (_VERSION), norm "5.4" or math.huge + os.exit ((v >= norm ("5.1") and v < toobig) and 0 or 1)'; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else @@ -2502,7 +2503,7 @@ fi ax_display_LUA=$LUA else - _ax_check_text="for a Lua interpreter with version >= 5.1, < 5.3" + _ax_check_text="for a Lua interpreter with version >= 5.1, < 5.4" { $as_echo "$as_me:${as_lineno-$LINENO}: checking $_ax_check_text" >&5 $as_echo_n "checking $_ax_check_text... " >&6; } if ${ax_cv_pathless_LUA+:} false; then : @@ -2519,9 +2520,11 @@ fi if $ax_cv_pathless_LUA 2>/dev/null -e ' - function norm (v) i,j=v:match "(%d+)%.(%d+)" return 100 * i + j end - v=norm (_VERSION) - os.exit ((v >= norm ("5.1") and v < norm ("5.3")) and 0 or 1)'; then : + function norm (v) + i,j=v:match "(%d+)%.(%d+)" if i then return 100 * i + j end + end + v, toobig=norm (_VERSION), norm "5.4" or math.huge + os.exit ((v >= norm ("5.1") and v < toobig) and 0 or 1)'; then : break fi @@ -2632,21 +2635,15 @@ fi - ax_lua_prefixed_path='' - _ax_package_paths=`$LUA -e 'print(package.path)' 2>/dev/null | sed 's|;|\n|g'` - for _ax_package_path in $_ax_package_paths; do - _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'` - _ax_reassembled='' - for _ax_path_part in $_ax_path_parts; do - echo "$_ax_path_part" | grep '\?' >/dev/null && break - _ax_reassembled="$_ax_reassembled/$_ax_path_part" - done - _ax_package_path=$_ax_reassembled - if echo "$_ax_package_path" | grep "^$ax_lua_prefix" >/dev/null; then - ax_lua_prefixed_path=$_ax_package_path - break - fi - done + ax_lua_prefixed_path=`$LUA 2>/dev/null -e ' + package.path:gsub ("([^;]+)", + function (p) + p = p:gsub ("%?.*$", ""):gsub ("/[^/]*$", "") + if p:match ("^$ax_lua_prefix") and (not shortest or #shortest > #p) then + shortest = p + end + end) + print (shortest or "")'` if test "x$ax_lua_prefixed_path" != 'x'; then : _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'` @@ -2678,21 +2675,15 @@ fi - ax_lua_prefixed_path='' - _ax_package_paths=`$LUA -e 'print(package.cpath)' 2>/dev/null | sed 's|;|\n|g'` - for _ax_package_path in $_ax_package_paths; do - _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'` - _ax_reassembled='' - for _ax_path_part in $_ax_path_parts; do - echo "$_ax_path_part" | grep '\?' >/dev/null && break - _ax_reassembled="$_ax_reassembled/$_ax_path_part" - done - _ax_package_path=$_ax_reassembled - if echo "$_ax_package_path" | grep "^$ax_lua_exec_prefix" >/dev/null; then - ax_lua_prefixed_path=$_ax_package_path - break - fi - done + ax_lua_prefixed_path=`$LUA 2>/dev/null -e ' + package.cpath:gsub ("([^;]+)", + function (p) + p = p:gsub ("%?.*$", ""):gsub ("/[^/]*$", "") + if p:match ("^$ax_lua_exec_prefix") and (not shortest or #shortest > #p) then + shortest = p + end + end) + print (shortest or "")'` if test "x$ax_lua_prefixed_path" != 'x'; then : _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'` @@ -2913,26 +2904,6 @@ $as_echo "$ac_cv_path_SED" >&6; } rm -f conftest.sed - - # is required by all slingshot clients for mkrockspecs. - EXTRA_ROCKS=- - for _ss_rock in lyaml specl; do - case $EXTRA_ROCKS in - *" $_ss_rock;"*) ;; # ignore duplicates - *) - test "x$PACKAGE_NAME" != "x$_ss_rock" \ - && EXTRA_ROCKS="$EXTRA_ROCKS"' $LUAROCKS install '"$_ss_rock;" - ;; - esac - done - - # Avoid empty travis commands. - test "x$EXTRA_ROCKS" != "x-" || EXTRA_ROCKS='# No extra rocks needed here;' - - - ac_config_files="$ac_config_files .travis.yml:travis.yml.in" - - ac_config_files="$ac_config_files build-aux/merge-sections:src/merge-sections.in" ac_config_files="$ac_config_files build-aux/mkrockspecs:src/mkrockspecs.in" @@ -3490,7 +3461,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Slingshot $as_me 7, which was +This file was extended by Slingshot $as_me 8.0.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3543,7 +3514,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Slingshot config.status 7 +Slingshot config.status 8.0.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -3656,7 +3627,6 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in - ".travis.yml") CONFIG_FILES="$CONFIG_FILES .travis.yml:travis.yml.in" ;; "build-aux/merge-sections") CONFIG_FILES="$CONFIG_FILES build-aux/merge-sections:src/merge-sections.in" ;; "build-aux/mkrockspecs") CONFIG_FILES="$CONFIG_FILES build-aux/mkrockspecs:src/mkrockspecs.in" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; @@ -4086,9 +4056,6 @@ which seems to be undefined. Please make sure it is defined" >&2;} case $ac_file$ac_mode in - ".travis.yml":F) - # Remove trailing blanks so as not to trip sc_trailing_blank in syntax check - sed 's| *$||' < .travis.yml > ss_tmp && mv ss_tmp .travis.yml; rm -f ss_tmp ;; "build-aux/merge-sections":F) chmod 555 build-aux/merge-sections ;; "build-aux/mkrockspecs":F) chmod 555 build-aux/mkrockspecs ;; diff --git a/configure.ac b/configure.ac index 2993bae..3077915 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ dnl along with this program. If not, see . AC_PREREQ([2.68]) dnl Initialise autoconf and automake -AC_INIT([Slingshot], [7], [http://github.com/gvvaughan/slingshot/issues]) +AC_INIT([Slingshot], [8.0.0], [http://github.com/gvvaughan/slingshot/issues]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) @@ -32,12 +32,11 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Check for programs AC_PATH_PROG([HELP2MAN], [help2man], [false]) AC_PATH_PROG([SPECL], [specl], [false]) -AX_PROG_LUA([5.1], [5.3]) +AX_PROG_LUA([5.1], [5.4]) AC_PROG_EGREP AC_PROG_SED dnl Generate output files -SS_CONFIG_TRAVIS([specl]) AC_CONFIG_FILES([build-aux/merge-sections:src/merge-sections.in], [chmod 555 build-aux/merge-sections]) AC_CONFIG_FILES([build-aux/mkrockspecs:src/mkrockspecs.in], diff --git a/docs/mkrockspecs.1 b/doc/mkrockspecs.1 similarity index 89% rename from docs/mkrockspecs.1 rename to doc/mkrockspecs.1 index b21635d..3b624fb 100644 --- a/docs/mkrockspecs.1 +++ b/doc/mkrockspecs.1 @@ -1,5 +1,5 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.45.1. -.TH MKROCKSPECS "1" "July 2014" "mkrockspecs (slingshot) 7" "User Commands" +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.4. +.TH MKROCKSPECS "1" "December 2014" "mkrockspecs (slingshot) 8.0.0" "User Commands" .SH NAME mkrockspecs \- Slingshot .SH SYNOPSIS diff --git a/local.mk b/local.mk index 846dc22..0950048 100644 --- a/local.mk +++ b/local.mk @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -old_NEWS_hash = 4a4a721668a1516c046d865c7b425586 +old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e update_copyright_env = \ UPDATE_COPYRIGHT_HOLDER='(Free Software Foundation, Inc.|Gary V. Vaughan|Reuben Thomas)' \ diff --git a/m4/ax_lua.m4 b/m4/ax_lua.m4 index bafaeef..15376af 100644 --- a/m4/ax_lua.m4 +++ b/m4/ax_lua.m4 @@ -180,7 +180,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 26 +#serial 28 dnl ========================================================================= dnl AX_PROG_LUA([MINIMUM-VERSION], [TOO-BIG-VERSION], @@ -359,9 +359,11 @@ dnl ========================================================================= AC_DEFUN([_AX_LUA_CHK_VER], [ AS_IF([$1 2>/dev/null -e ' - function norm (v) i,j=v:match "(%d+)%.(%d+)" return 100 * i + j end - v=norm (_VERSION) - os.exit ((v >= norm ("$2") and v < norm ("$3")) and 0 or 1)'], + function norm (v) + i,j=v:match "(%d+)%.(%d+)" if i then return 100 * i + j end + end + v, toobig=norm (_VERSION), norm "$3" or math.huge + os.exit ((v >= norm ("$2") and v < toobig) and 0 or 1)'], [$4], [$5]) ]) @@ -373,28 +375,19 @@ AC_DEFUN([_AX_LUA_FND_PRFX_PTH], [ dnl Invokes the Lua interpreter PROG to print the path variable dnl LUA-PATH-VARIABLE, usually package.path or package.cpath. Paths are - dnl then matched against PREFIX. The first path to begin with PREFIX is set - dnl to ax_lua_prefixed_path. - - ax_lua_prefixed_path='' - _ax_package_paths=`$1 -e 'print($3)' 2>/dev/null | sed 's|;|\n|g'` - dnl Try the paths in order, looking for the prefix. - for _ax_package_path in $_ax_package_paths; do - dnl Copy the path, up to the use of a Lua wildcard. - _ax_path_parts=`echo "$_ax_package_path" | sed 's|/|\n|g'` - _ax_reassembled='' - for _ax_path_part in $_ax_path_parts; do - echo "$_ax_path_part" | grep '\?' >/dev/null && break - _ax_reassembled="$_ax_reassembled/$_ax_path_part" - done - dnl Check the path against the prefix. - _ax_package_path=$_ax_reassembled - if echo "$_ax_package_path" | grep "^$2" >/dev/null; then - dnl Found it. - ax_lua_prefixed_path=$_ax_package_path - break - fi - done + dnl then matched against PREFIX. Then ax_lua_prefixed_path is set to the + dnl shortest sub path beginning with PREFIX up to the last directory + dnl that does not contain a '?', if any. + + ax_lua_prefixed_path=`$1 2>/dev/null -e ' + $3:gsub ("(@<:@^;@:>@+)", + function (p) + p = p:gsub ("%?.*$", ""):gsub ("/@<:@^/@:>@*$", "") + if p:match ("^$2") and (not shortest or #shortest > #p) then + shortest = p + end + end) + print (shortest or "")'` ]) diff --git a/m4/slingshot.m4 b/m4/slingshot.m4 deleted file mode 100644 index 541f8f5..0000000 --- a/m4/slingshot.m4 +++ /dev/null @@ -1,42 +0,0 @@ -dnl slingshot.m4 -dnl -dnl Copyright (c) 2013-2014 Free Software Foundation, Inc. -dnl Written by Gary V. Vaughan, 2013 -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published -dnl by the Free Software Foundation; either version 3, or (at your -dnl option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program. If not, see . - -# SS_CONFIG_TRAVIS(LUAROCKS) -# -------------------------- -# Generate .travis.yml, ensuring LUAROCKS are installed. -AC_DEFUN([SS_CONFIG_TRAVIS], [ - # is required by all slingshot clients for mkrockspecs. - EXTRA_ROCKS=- - for _ss_rock in lyaml $1; do - case $EXTRA_ROCKS in - *" $_ss_rock;"*) ;; # ignore duplicates - *) - test "x$PACKAGE_NAME" != "x$_ss_rock" \ - && EXTRA_ROCKS="$EXTRA_ROCKS"' $LUAROCKS install '"$_ss_rock;" - ;; - esac - done - - # Avoid empty travis commands. - test "x$EXTRA_ROCKS" != "x-" || EXTRA_ROCKS='# No extra rocks needed here;' - - AC_SUBST([EXTRA_ROCKS]) - AC_CONFIG_FILES([.travis.yml:travis.yml.in], [ - # Remove trailing blanks so as not to trip sc_trailing_blank in syntax check - sed 's| *$||' < .travis.yml > ss_tmp && mv ss_tmp .travis.yml; rm -f ss_tmp]) -]) diff --git a/rockspec.conf b/rockspec.conf index ab9d4f8..50fa249 100644 --- a/rockspec.conf +++ b/rockspec.conf @@ -8,5 +8,5 @@ description: A framework for automatic rockspecs creation and simplified release thereof. dependencies: -- lua >= 5.1 +- lua >= 5.1, < 5.4 - lyaml diff --git a/slingshot-7-1.rockspec b/slingshot-8.0.0-1.rockspec similarity index 78% rename from slingshot-7-1.rockspec rename to slingshot-8.0.0-1.rockspec index 66846e0..2d2486d 100644 --- a/slingshot-7-1.rockspec +++ b/slingshot-8.0.0-1.rockspec @@ -1,5 +1,5 @@ package = "slingshot" -version = "7-1" +version = "8.0.0-1" description = { detailed = "A framework for automatic rockspecs creation and simplified release thereof.", homepage = "http://github.com/gvvaughan/slingshot", @@ -7,17 +7,17 @@ description = { summary = "Slingshot releases rocks!", } source = { - dir = "slingshot-release-v7", - url = "http://github.com/gvvaughan/slingshot/archive/release-v7.zip", + dir = "slingshot-release-v8.0.0", + url = "http://github.com/gvvaughan/slingshot/archive/release-v8.0.0.zip", } dependencies = { - "lua >= 5.1", + "lua >= 5.1, < 5.4", "lyaml", } external_dependencies = nil build = { build_command = "./configure LUA='$(LUA)' LUA_INCLUDE='-I$(LUA_INCDIR)' --prefix='$(PREFIX)' --libdir='$(LIBDIR)' --datadir='$(LUADIR)' --datarootdir='$(PREFIX)' && make clean all", copy_directories = {}, - install_command = "make install luadir='$(LUADIR)'", + install_command = "make install luadir='$(LUADIR)' luaexecdir='$(LIBDIR)'", type = "command", } diff --git a/specs/mkrockspecs_spec.yaml b/specs/mkrockspecs_spec.yaml index bc42547..9bb2f57 100644 --- a/specs/mkrockspecs_spec.yaml +++ b/specs/mkrockspecs_spec.yaml @@ -87,35 +87,34 @@ describe mkrockspecs: - context for a luarocks builtin install: - it sets build.type to builtin: - expect (parse {"-m docs", "check", "0"; stdin = conf}). + expect (parse {"-m doc", "check", "0"; stdin = conf}). should_match_output '%stype = "builtin",?\n' - it creates a build.modules sub-key: - expect (parse {"-m docs", "check", "0"; stdin = conf}). + expect (parse {"-m doc", "check", "0"; stdin = conf}). should_match_output '%smodules = {' - it adds only files with .lua extension to modules sub-table: | - name = "docs/spec_check.lua" + name = "doc/spec_check.lua" f = io.open (name, "w") f:write "os.exit (1)" f:close () - expect (parse {"-m docs", "check", "0"; stdin = conf}). - should_contain_output 'spec_check = "docs/spec_check.lua",\n' - expect (parse {"-m docs", "check", "0"; stdin = conf}). + expect (parse {"-m doc", "check", "0"; stdin = conf}). + should_contain_output 'spec_check = "doc/spec_check.lua",\n' + expect (parse {"-m doc", "check", "0"; stdin = conf}). should_not_contain_output "mkrockspecs" os.remove (name) - it adds quoted module keys with non-symbol characters in module path: | - name = "docs/spec-check.lua" + name = "doc/spec-check.lua" f = io.open (name, "w") f:write "os.exit (1)" f:close () - expect (parse {"-m docs", "check", "0"; stdin = conf}). - should_contain_output '["spec-check"] = "docs/spec-check.lua",\n' - os.remove (name) + expect (parse {"-m doc", "check", "0"; stdin = conf}). + should_contain_output '["spec-check"] = "doc/spec-check.lua",\n' os.remove (name) - it adds quoted module keys with '.' separators for sub-directories: | - name = "docs/spec_check.lua" + name = "doc/spec_check.lua" f = io.open (name, "w") f:write "os.exit (1)" f:close () expect (parse {"-m .", "check", "0"; stdin = conf}). - should_contain_output '["docs.spec_check"] = "docs/spec_check.lua",\n' + should_contain_output '["doc.spec_check"] = "doc/spec_check.lua",\n' os.remove (name) diff --git a/src/merge-sections.in b/src/merge-sections.in index b5acca2..fc92ba4 100755 --- a/src/merge-sections.in +++ b/src/merge-sections.in @@ -29,11 +29,13 @@ SH=--[[ # -*- mode: lua; -*- ## ==================================================================== -_lua_version_re='"Lua 5."[12]*' -_lua_binaries='lua lua5.2 lua52 lua5.1 lua51' +_lua_version_re='"Lua 5."[123]*' +_lua_binaries='lua lua5.3 lua53 lua5.2 lua52 luajit lua5.1 lua51' +export LUA export LUA_INIT export LUA_INIT_5_2 +export LUA_INIT_5_3 export LUA_PATH export LUA_CPATH @@ -86,6 +88,7 @@ test -n "$LUA" || { LUA_INIT= LUA_INIT_5_2= +LUA_INIT_5_3= # Reexecute using the interpreter suppiled in LUA, or found above. exec "$LUA" "$0" "$@" diff --git a/src/mkrockspecs.in b/src/mkrockspecs.in index 770bf5b..7f7b6d9 100755 --- a/src/mkrockspecs.in +++ b/src/mkrockspecs.in @@ -29,11 +29,13 @@ SH=--[[ # -*- mode: lua; -*- ## ==================================================================== -_lua_version_re='"Lua 5."[12]*' -_lua_binaries='lua lua5.2 lua52 lua5.1 lua51' +_lua_version_re='"Lua 5."[123]*' +_lua_binaries='lua lua5.3 lua53 lua5.2 lua52 luajit lua5.1 lua51' +export LUA export LUA_INIT export LUA_INIT_5_2 +export LUA_INIT_5_3 export LUA_PATH export LUA_CPATH @@ -86,6 +88,7 @@ test -n "$LUA" || { LUA_INIT= LUA_INIT_5_2= +LUA_INIT_5_3= # Reexecute using the interpreter suppiled in LUA, or found above. exec "$LUA" "$0" "$@" @@ -359,7 +362,7 @@ default.build = default.build or { "LUA='$(LUA)' LUA_INCLUDE='-I$(LUA_INCDIR)' " .. configure_flags .. "--prefix='$(PREFIX)' --libdir='$(LIBDIR)' --datadir='$(LUADIR)' " .. "--datarootdir='$(PREFIX)' && make clean all", - install_command = "make install luadir='$(LUADIR)'", + install_command = "make install luadir='$(LUADIR)' luaexecdir='$(LIBDIR)'", copy_directories = {}, } diff --git a/src/src.mk b/src/src.mk index c193dd1..ddfef4e 100644 --- a/src/src.mk +++ b/src/src.mk @@ -23,10 +23,10 @@ bin_SCRIPTS += build-aux/mkrockspecs -man_MANS += docs/mkrockspecs.1 +man_MANS += doc/mkrockspecs.1 -docs/mkrockspecs.1: build-aux/mkrockspecs Makefile - @test -d docs || mkdir docs +doc/mkrockspecs.1: build-aux/mkrockspecs Makefile + @test -d doc || mkdir doc ## Exit gracefully if mkrockspecs.1 is not writeable, such as during distcheck! $(AM_V_GEN)if ( touch $@.w && rm -f $@.w; ) >/dev/null 2>&1; \ then \ @@ -46,7 +46,7 @@ docs/mkrockspecs.1: build-aux/mkrockspecs Makefile EXTRA_DIST += \ build-aux/merge-sections \ build-aux/mkrockspecs \ - docs/mkrockspecs.1 \ + doc/mkrockspecs.1 \ $(NOTHING_ELSE) @@ -55,5 +55,5 @@ EXTRA_DIST += \ ## ------------ ## CLEANFILES += \ - docs/mkrockspecs.1 \ + doc/mkrockspecs.1 \ $(NOTHING_ELSE) diff --git a/travis.yml.in b/travis.yml.in index 6644c59..e7731d6 100644 --- a/travis.yml.in +++ b/travis.yml.in @@ -1,69 +1,133 @@ -# Lua is not officially supported, but an erlang environment will do. -language: erlang +language: c env: global: - - PACKAGE=@PACKAGE@ - - ROCKSPEC=$PACKAGE-git-1.rockspec - - LUAROCKS_CONFIG=build-aux/luarocks-config.lua - - LUAROCKS="$LUA $HOME/bin/luarocks" + - _COMPILE="libtool --mode=compile --tag=CC gcc" + - _CFLAGS="-O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX" + - _INSTALL="libtool --mode=install install -p" + - _LINK="libtool --mode=link --tag=CC gcc" + - _LIBS="-lm -Wl,-E -ldl -lreadline" + + - prefix=/usr/local + - bindir=$prefix/bin + - incdir=$prefix/include + - libdir=$prefix/lib matrix: - - LUA=lua5.1 LUA_INCDIR=/usr/include/lua5.1 LUA_SUFFIX=5.1 - - LUA=lua5.2 LUA_INCDIR=/usr/include/lua5.2 LUA_SUFFIX=5.2 - - LUA=luajit-2.0.0-beta9 LUA_INCDIR=/usr/include/luajit-2.0 LUA_SUFFIX=5.1 + - LUA=lua5.3 + - LUA=lua5.2 + - LUA=lua5.1 + - LUA=luajit -# Tool setup. -install: + +before_install: # Put back the links for libyaml, which are missing on recent Travis VMs - test -f /usr/lib/libyaml.so || sudo find /usr/lib -name 'libyaml*' -exec ln -s {} /usr/lib \; - - sudo apt-get install help2man - - sudo apt-get install luajit - - sudo apt-get install libluajit-5.1-dev - - sudo apt-get install lua5.1 - - sudo apt-get install liblua5.1-dev - - sudo apt-get install lua5.2 - - sudo apt-get install liblua5.2-dev - - # Install a luarocks beta locally for everything else. - - git clone --depth=1 https://github.com/keplerproject/luarocks.git - # LuaRocks configure --with-lua argument is just a prefix! - - ( cd luarocks; - ./configure - --prefix=$HOME --with-lua=/usr --lua-version=$LUA_SUFFIX - --lua-suffix=$LUA_SUFFIX --with-lua-include=$LUA_INCDIR; - make build; - make install; ) - -# Configure and build. + + # Fetch Lua sources. + - cd $TRAVIS_BUILD_DIR + - 'if test lua5.3 = "$LUA"; then + curl http://www.lua.org/work/lua-5.3.0-rc1.tar.gz | tar xz; + cd lua-5.3.0; + fi' + - 'if test lua5.2 = "$LUA"; then + curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz; + cd lua-5.2.3; + fi' + - 'if test lua5.1 = "$LUA"; then + curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz; + cd lua-5.1.5; + fi' + + # Unpack, compile and install Lua. + - 'if test luajit = "$LUA"; then + curl http://luajit.org/download/LuaJIT-2.0.3.tar.gz | tar xz; + cd LuaJIT-2.0.3; + make && sudo make install; + for header in lua.h luaconf.h lualib.h lauxlib.h luajit.h lua.hpp; do + if test -f /usr/local/include/luajit-2.0/$header; then + sudo ln -s /usr/local/include/luajit-2.0/$header /usr/local/include/$header; + fi; + done; + else + for src in src/*.c; do + test src/lua.c = "$src" || test src/luac.c = "$src" || eval $_COMPILE $_CFLAGS -c $src; + done; + eval $_LINK -o lib$LUA.la -version-info 0:0:0 -rpath $libdir *.lo; + sudo mkdir -p $libdir; + eval sudo $_INSTALL lib$LUA.la $libdir/lib$LUA.la; + + eval $_COMPILE $_CFLAGS -c src/lua.c; + eval $_LINK -static -o $LUA lua.lo lib$LUA.la $_LIBS; + sudo mkdir -p $bindir; + eval sudo $_INSTALL $LUA $bindir/$LUA; + + sudo mkdir -p $incdir; + for header in lua.h luaconf.h lualib.h lauxlib.h lua.hpp; do + if test -f src/$header; then + eval sudo $_INSTALL src/$header $incdir/$header; + fi; + done; + fi' + + # Fetch LuaRocks. + - cd $TRAVIS_BUILD_DIR + - 'git clone https://github.com/keplerproject/luarocks.git luarocks-2.2.0' + - cd luarocks-2.2.0 + - git checkout v2.2.0 + + # Compile and install luarocks. + - if test luajit = "$LUA"; then + ./configure --lua-suffix=jit; + else + ./configure; + fi + - 'make build && sudo make install' + + # Tidy up file droppings. + - cd $TRAVIS_BUILD_DIR + - rm -rf lua-5.3.0 lua-5.2.3 lua-5.1.5 LuaJIT-2.0.3 luarocks-2.2.0 + + +install: + # Use Lua 5.3 compatible rocks, where available. + - 'for rock in @EXTRA_ROCKS@""; do + if test -z "$rock"; then break; fi; + if luarocks list | grep "^$rock$" >/dev/null; then continue; fi; + sudo luarocks install --server=http://rocks.moonscript.org/manifests/gvvaughan $rock; + done' + + # Build from rockspec. + - export ROCKSPEC=@PACKAGE@-@VERSION@-1.rockspec + - 'test -f "$ROCKSPEC" || ROCKSPEC=@PACKAGE@-git-1.rockspec' + - sudo luarocks make $ROCKSPEC LUA="$LUA" + + # Clean up files created by root + - sudo git clean -dfx + - sudo rm -rf slingshot + + script: - # Initial bootstrap to build luarocks-config.lua, before we've - # installed our rocks. - - ./bootstrap --skip-rock-checks - - ./configure LUA="$LUA" - - make $LUAROCKS_CONFIG - LUA="$LUA" LUA_INCDIR="$LUA_INCDIR" V=1 - || cat $LUAROCKS_CONFIG config.log - - # Set Lua and Shell paths up for local luarocks tree. - # this package depends on will be installed. - - eval `$LUAROCKS path` - - export PATH=`pwd`/luarocks/bin:$PATH - - # Install extra rocks into $LUAROCKS_CONFIG rocks tree. - @EXTRA_ROCKS@ - - # Make git rockspec for this @PACKAGE@ - - make rockspecs LUAROCKS="$LUAROCKS" V=1 - || { $LUAROCKS path; cat $ROCKSPEC; } - - # The git rockspec will rerun bootstrap, and check any rock versions - # in bootstrap.conf:buildreq this time. - - $LUAROCKS make $ROCKSPEC LUA="$LUA" - - # Run self-tests in the `luarocks make` build tree. - - LUA_PATH=`pwd`'/lib/?.lua;'"${LUA_PATH-;}" - LUA_CPATH=`pwd`'/ext/?.so;'"${LUA_CPATH-;}" - LUA_INIT= LUA_INIT_5_2= - make check V=1 + - 'if test -f configure; then + touch aclocal.m4; + sleep 1; touch Makefile.in; + sleep 1; touch config.h.in; + sleep 1; touch configure; + else + ./bootstrap --verbose; + fi' + - test -f Makefile || ./configure --disable-silent-rules LUA="$LUA" + - make + - make check V=1 + + +# Run sanity checks on CI server, ignoring buggy automakes. +after_success: + - '{ _assign="="; + if grep local-checks-to-skip build-aux/sanity-cfg.mk >/dev/null; then + _assign="+="; + fi; + printf "local-checks-to-skip %s sc_vulnerable_makefile_CVE-2012-3386\n" "$_assign"; + } >> build-aux/sanity-cfg.mk' + - 'make syntax-check || : this will usually fail on the release branch'