diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-12-19 23:18:49 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-12-19 23:18:49 +0100 |
| commit | 9ac97e83e9d8bef310b5353c64505498c9d16ce7 (patch) | |
| tree | d10dfb8b9a2c820bb4a51e11b442058653c19806 | |
| parent | 36457566f9917dc7c0c348d012816a2ca333ef1b (diff) | |
Remove 'nix-upstream' submodule.
* nix/sync-with-upstream: Remove.
* bootstrap: Remove uses of 'git submodule' and 'sync-with-usptream'.
* .gitmodules: Remove.
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rwxr-xr-x | bootstrap | 12 | ||||
| -rwxr-xr-x | nix/sync-with-upstream | 89 |
3 files changed, 1 insertions, 103 deletions
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index dcc44626524..00000000000 --- a/.gitmodules +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | [submodule "nix-upstream"] | ||
| 2 | path = nix-upstream | ||
| 3 | url = https://github.com/NixOS/nix.git | ||
| @@ -1,15 +1,5 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | # Create the build system. | |
| 3 | # Import missing source files and create the build system. | ||
| 4 | 3 | ||
| 5 | set -e -x | 4 | set -e -x |
| 6 | |||
| 7 | top_srcdir="$PWD" | ||
| 8 | export top_srcdir | ||
| 9 | |||
| 10 | git submodule init | ||
| 11 | git submodule update | ||
| 12 | |||
| 13 | ./nix/sync-with-upstream | ||
| 14 | |||
| 15 | exec autoreconf -vfi | 5 | exec autoreconf -vfi |
diff --git a/nix/sync-with-upstream b/nix/sync-with-upstream deleted file mode 100755 index e9cb070dcce..00000000000 --- a/nix/sync-with-upstream +++ /dev/null | |||
| @@ -1,89 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # GNU Guix --- Functional package management for GNU | ||
| 3 | # Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> | ||
| 4 | # | ||
| 5 | # This file is part of GNU Guix. | ||
| 6 | # | ||
| 7 | # GNU Guix is free software; you can redistribute it and/or modify it | ||
| 8 | # under the terms of the GNU General Public License as published by | ||
| 9 | # the Free Software Foundation; either version 3 of the License, or (at | ||
| 10 | # your option) any later version. | ||
| 11 | # | ||
| 12 | # GNU Guix is distributed in the hope that it will be useful, but | ||
| 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | # GNU General Public License for more details. | ||
| 16 | # | ||
| 17 | # You should have received a copy of the GNU General Public License | ||
| 18 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | # | ||
| 21 | # Update the local copy of Nix source code needed to build the daemon. | ||
| 22 | # Assume GNU Coreutils and Git are available. | ||
| 23 | # | ||
| 24 | |||
| 25 | top_srcdir="${top_srcdir:-..}" | ||
| 26 | |||
| 27 | log() | ||
| 28 | { | ||
| 29 | echo "sync-with-upstream: $@" >&2 | ||
| 30 | } | ||
| 31 | |||
| 32 | # checked_in_p FILE | ||
| 33 | checked_in_p() | ||
| 34 | { | ||
| 35 | ( cd "$top_srcdir" ; | ||
| 36 | git ls-tree HEAD -- "nix/$1" | grep "$1" > /dev/null ) | ||
| 37 | } | ||
| 38 | |||
| 39 | if [ ! -d "$top_srcdir/build-aux" ] | ||
| 40 | then | ||
| 41 | log "\`$top_srcdir' is not the valid top-level source directory" | ||
| 42 | exit 1 | ||
| 43 | fi | ||
| 44 | |||
| 45 | set -e | ||
| 46 | for upstream_file in `cd "$top_srcdir/nix-upstream/src" ; | ||
| 47 | find . -name \*.c -or -name \*.h -or -name \*.cc -or -name \*.hh \ | ||
| 48 | -or -name \*.cpp -or -name \*.hpp -or -name \*.sql` | ||
| 49 | do | ||
| 50 | if grep "$upstream_file" "$top_srcdir/daemon.am" > /dev/null | ||
| 51 | then | ||
| 52 | if checked_in_p "$upstream_file" | ||
| 53 | then | ||
| 54 | log "skipping \`$upstream_file', which has a checked-in copy" | ||
| 55 | else | ||
| 56 | ( cd "$top_srcdir/nix-upstream/src" && \ | ||
| 57 | cp -v --parents "$upstream_file" ../../nix ) | ||
| 58 | fi | ||
| 59 | else | ||
| 60 | log "skipping \`$upstream_file', which is not used" | ||
| 61 | fi | ||
| 62 | done | ||
| 63 | |||
| 64 | # This file should be generated by our build system so remove it. | ||
| 65 | rm -fv "$top_srcdir/nix/libstore/schema.sql.hh" | ||
| 66 | |||
| 67 | cp -v "$top_srcdir/nix-upstream/COPYING" "$top_srcdir/nix" | ||
| 68 | |||
| 69 | # Generate an 'AUTHORS' file since upstream Nix no longer has one. | ||
| 70 | cat > "$top_srcdir/nix/AUTHORS" <<EOF | ||
| 71 | Most of the code is this directory was written by the following people for | ||
| 72 | the Nix project (http://nixos.org/nix). Thank you! | ||
| 73 | |||
| 74 | EOF | ||
| 75 | ( cd "$top_srcdir/nix-upstream" ; git shortlog --summary ) \ | ||
| 76 | | sed -'es/^ *[0-9]\+\(.*\)/ \1/g' \ | ||
| 77 | >> "$top_srcdir/nix/AUTHORS" | ||
| 78 | |||
| 79 | # Substitutions. | ||
| 80 | sed -i "$top_srcdir/nix/libstore/gc.cc" \ | ||
| 81 | -e 's|/nix/find-runtime-roots\.pl|/guix/list-runtime-roots|g' | ||
| 82 | |||
| 83 | # Our 'guix_hash_context' structure has a copy constructor, specifically to | ||
| 84 | # handle the use case in 'HashSink::currentHash()' where the copy of the | ||
| 85 | # context is expected to truly copy the underlying hash context. The copy | ||
| 86 | # constructor cannot be used in 'Ctx' if that's a union, so turn it into a | ||
| 87 | # structure (we can afford to two wasted words.) | ||
| 88 | sed -i "$top_srcdir/nix/libutil/hash.cc" "$top_srcdir/nix/libutil/hash.hh" \ | ||
| 89 | -e 's|union Ctx|struct Ctx|g' | ||
