diff --git a/.travis.yml b/.travis.yml index 63c390606..45a7cb153 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ script: - ./configure --enable-debug --disable-flto - make - make test - - (cd testdata; ../testcode/mini_tdir.sh exe clang-analysis.tdir ; if grep -e "warning:" -e "error:" result.clang-analysis ; then exit 1; else exit 0; fi) + - (cd testdata/clang-analysis.tdir; bash clang-analysis.test) diff --git a/README.md b/README.md new file mode 100644 index 000000000..51fed73e9 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Unbound + +[![Travis Build Status](https://travis-ci.org/NLnetLabs/unbound.svg?branch=master)](https://travis-ci.org/NLnetLabs/unbound) + +Unbound is a validating, recursive, caching DNS resolver. It is designed to be +fast and lean and incorporates modern features based on open standards. If you +have any feedback, we would love to hear from you. Don’t hesitate to +[create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new) +or post a message on the [Unbound mailing list](https://nlnetlabs.nl/mailman/listinfo/unbound-users). +You can lean more about Unbound by reading our +[documentation](https://nlnetlabs.nl/documentation/unbound/). + +## Compiling + +Make sure you have the C toolchain, OpenSSL and its include files, and libexpat +installed. Unbound can be compiled and installed using: + +``` +./configure && make && make install +``` + +You can use libevent if you want. libevent is useful when using many (10000) +outgoing ports. By default max 256 ports are opened at the same time and the +builtin alternative is equally capable and a little faster. + +Use the `--with-libevent=dir` configure option to compile Unbound with libevent +support. + +## Unbound configuration + +All of Unbound's configuration options are described in the man pages, which +will be installed and are available on the Unbound +[documentation page](https://nlnetlabs.nl/documentation/unbound/). + +An example configuration file is located in +[doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --git a/doc/Changelog b/doc/Changelog index 5c06e446e..e85b4c1d2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +1 May 2019: Wouter + - Update makedist for git. + - Nicer travis output for clang analysis. + 25 April 2019: Wouter - Fix wrong query name in local zone redirect answers with a CNAME, the copy of the local alias is in unpacked form. diff --git a/makedist.sh b/makedist.sh index 302553e67..f538f8d02 100755 --- a/makedist.sh +++ b/makedist.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Build unbound distribution tar from the SVN repository. +# Build unbound distribution tar from the git repository. # # Copyright (c) 2007, NLnet Labs. All rights reserved. # @@ -42,7 +42,7 @@ cwd=`pwd` # Utility functions. usage () { cat >&2 < Build a release candidate, the given string will be added to the version number (which will then be unbound-rc) - -d SVN_root Retrieve the unbound source from the specified repository. - Detected from svn working copy if not specified. + -u git_url Retrieve the source from the specified repository url. + Detected from the working copy if not specified. + -b git_branch Retrieve the the specified branch or tag. + Detected from the working copy if not specified. -wssl openssl.xx.tar.gz Also build openssl from tarball for windows dist. -wxp expat.xx.tar.gz Also build expat from tarball for windows dist. -w32 32bit windows compile. @@ -115,16 +117,20 @@ replace_version () { replace_text "$1" "VERSION_MICRO\],\[$v1" "VERSION_MICRO\],\[$v2" } -check_svn_root () { - # Check if SVNROOT is specified. - if [ -z "$SVNROOT" ]; then - if svn info 2>&1 | grep "not a working copy" >/dev/null; then - if test -z "$SVNROOT"; then - error "SVNROOT must be specified (using -d)" - fi +check_git_repo () { + # Check if git repo and branch are specified. + if [ -z "$GITREPO" ]; then + if git status 2>&1 | grep "not a git repository" >/dev/null; then + error "specify repo (using -u) or use settings detected by starting from working copy directory" else - eval `svn info | grep 'URL:' | sed -e 's/URL: /url=/' | head -1` - SVNROOT="$url" + GITREPO="`git config --get remote.origin.url`" + fi + fi + if [ -z "$GITBRANCH" ]; then + if git status 2>&1 | grep "not a git repository" >/dev/null; then + error "specify branch (using -b) or use settings detected by starting from working copy directory" + else + GITBRANCH="`git branch | grep '^\*' | sed -e 's/^\* //'`" fi fi } @@ -189,8 +195,12 @@ while [ "$1" ]; do "-h") usage ;; - "-d") - SVNROOT="$2" + "-u") + GITREPO="$2" + shift + ;; + "-b") + GITBRANCH="$2" shift ;; "-s") @@ -242,7 +252,7 @@ if [ "$DOWIN" = "yes" ]; then cross_flag="" shared_cross_flag="" - check_svn_root + check_git_repo create_temp_dir # crosscompile openssl for windows. @@ -301,10 +311,13 @@ if [ "$DOWIN" = "yes" ]; then cd .. fi - info "SVNROOT is $SVNROOT" - info "Exporting source from SVN." - svn export "$SVNROOT" unbound || error_cleanup "SVN command failed" - cd unbound || error_cleanup "Unbound not exported correctly from SVN" + info "GITREPO is $GITREPO" + info "GITBRANCH is $GITBRANCH" + info "Exporting source from git." + info "git clone --depth=1 --no-tags -b $GITBRANCH $GITREPO unbound" + git clone --depth=1 --no-tags -b $GITBRANCH $GITREPO unbound || error_cleanup "git clone failed" + cd unbound || error_cleanup "Unbound not exported correctly from git" + rm -rf .git || error_cleanup "Failed to remove .git tracking information" # on a re-configure the cache may no longer be valid... if test -f mingw32-config.cache; then rm mingw32-config.cache; fi @@ -429,20 +442,24 @@ if [ "$DOWIN" = "yes" ]; then exit 0 fi -check_svn_root +check_git_repo # Start the packaging process. -info "SVNROOT is $SVNROOT" -info "SNAPSHOT is $SNAPSHOT" +info "GITREPO is $GITREPO" +info "GITBRANCH is $GITBRANCH" +info "SNAPSHOT is $SNAPSHOT" #question "Do you wish to continue with these settings?" || error "User abort." create_temp_dir -info "Exporting source from SVN." -svn export "$SVNROOT" unbound || error_cleanup "SVN command failed" +info "Exporting source from git." +# --depth=1 and --no-tags reduce the download size. +info "git clone --depth=1 --no-tags -b $GITBRANCH $GITREPO unbound" +git clone --depth=1 --no-tags -b $GITBRANCH $GITREPO unbound || error_cleanup "git clone failed" -cd unbound || error_cleanup "Unbound not exported correctly from SVN" +cd unbound || error_cleanup "Unbound not exported correctly from git" +rm -rf .git || error_cleanup "Failed to remove .git tracking information" info "Adding libtool utils (libtoolize)." libtoolize -c --install || libtoolize -c || error_cleanup "Libtoolize failed."