unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob d60406f1e81c2e3a661532c737adf7bc4637215f 2639 bytes (raw)
name: nix/sync-with-upstream 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 
#!/bin/sh
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

#
# Update the local copy of Nix source code needed to build the daemon.
# Assume GNU Coreutils and Git are available.
#

top_srcdir="${top_srcdir:-..}"

log()
{
    echo "sync-with-upstream: $@" >&2
}

# checked_in_p FILE
checked_in_p()
{
    ( cd "$top_srcdir" ;
	git ls-tree HEAD -- "nix/$1" | grep "$1" > /dev/null )
}

if [ ! -d "$top_srcdir/build-aux" ]
then
    log "\`$top_srcdir' is not the valid top-level source directory"
    exit 1
fi

set -e
for upstream_file in `cd "$top_srcdir/nix-upstream/src" ;
  find . -name \*.c -or -name \*.h -or -name \*.cc -or -name \*.hh \
         -or -name \*.cpp -or -name \*.hpp -or -name \*.sql`
do
    if grep "$upstream_file" "$top_srcdir/daemon.am" > /dev/null
    then
    	if checked_in_p "$upstream_file"
    	then
    	    log "skipping \`$upstream_file', which has a checked-in copy"
    	else
    	    ( cd "$top_srcdir/nix-upstream/src" && \
    		cp -v --parents "$upstream_file" ../../nix )
    	fi
    else
    	log "skipping \`$upstream_file', which is not used"
    fi
done

# This file should be generated by our build system so remove it.
rm -fv "$top_srcdir/nix/libstore/schema.sql.hh"

cp -v "$top_srcdir/nix-upstream/COPYING" "$top_srcdir/nix"
cp -v "$top_srcdir/nix-upstream/AUTHORS" "$top_srcdir/nix"

# Substitutions.
sed -i "$top_srcdir/nix/libstore/gc.cc"					\
    -e 's|/nix/find-runtime-roots\.pl|/guix/list-runtime-roots|g'


patch -p 1 << EOF
--- a/nix/libstore/globals.hh	2013-11-30 18:13:33.000000000 +0100
+++ b/nix/libstore/globals.hh	2013-11-30 18:15:32.000000000 +0100
@@ -53,6 +53,9 @@
     /* File name of the socket the daemon listens to.  */
     Path nixDaemonSocketFile;
 
+    /* File name of the to which the daemon PID will be written.  */
+    Path nixDaemonPidFile;
+
     /* Whether to keep temporary directories of failed builds. */
     bool keepFailed;
EOF
 

debug log:

solving d60406f ...
found d60406f in https://yhetil.org/guix-devel/20131208111345.GA5130@intra/
found 535763d in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100755 535763d6024e3517407ead09ca81e880bda5b6aa	nix/sync-with-upstream

applying [1/1] https://yhetil.org/guix-devel/20131208111345.GA5130@intra/
diff --git a/nix/sync-with-upstream b/nix/sync-with-upstream
index 535763d..d60406f 100755

1:17: trailing whitespace.
 
1:24: trailing whitespace.
 
Checking patch nix/sync-with-upstream...
1:24: new blank line at EOF.
+
Applied patch nix/sync-with-upstream cleanly.
warning: 3 lines add whitespace errors.

index at:
100755 d60406f1e81c2e3a661532c737adf7bc4637215f	nix/sync-with-upstream

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).