about summary refs log tree commit diff
path: root/src/libutil/archive.cc
AgeCommit message (Collapse)AuthorFilesLines
2017-02-08 Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen1-2/+0
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not every compilation unit includes config.h, we currently compile half of Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS unset. This causes major havoc with the Settings class on e.g. 32-bit ARM, where different compilation units disagree with the struct layout. E.g.: diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc @@ -166,6 +166,8 @@ void Settings::update() _get(useSubstitutes, "build-use-substitutes"); + fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); _get(buildUsersGroup, "build-users-group"); diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn) void RemoteStore::setOptions(Connection & conn) { + fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); conn.to << wopSetOptions Gave me: at Settings::update(): &useSubstitutes = 0xb6e5c5cb at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7 That was not a fun one to debug!
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-9/+9
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-9/+9
2016-10-19 Fix Darwin buildEelco Dolstra1-2/+0
Done slightly differently from https://github.com/NixOS/nix/pull/1093.
2016-09-21 printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra1-2/+2
2016-07-11 Modernize AutoCloseFDShea Levy1-8/+7
2016-06-09 Use O_CLOEXEC in most placesEelco Dolstra1-2/+2
2016-02-24 BinaryCacheStore: Implement addToStore()Eelco Dolstra1-4/+11
So now you can do $ NIX_REMOTE=file:///tmp/binary-cache nix-instantiate '<nixpkgs>' -A hello and lots of other operations.
2015-10-29 int2String() -> std::to_string()Eelco Dolstra1-1/+1
2015-07-20 More cleanupEelco Dolstra1-25/+12
2014-08-20 Use proper quotes everywhereEelco Dolstra1-9/+9
2014-08-01 Make readDirectory() return inode / file typeEelco Dolstra1-8/+7
2014-07-18 Better fix for strcasecmp on DarwinEelco Dolstra1-3/+1
2014-07-17 Ugly hack to fix building on old DarwinEelco Dolstra1-0/+3
http://hydra.nixos.org/build/12580878
2014-07-16 Get rid of a compiler warningEelco Dolstra1-1/+2
2014-07-16 Be more strict about file names in NARsEelco Dolstra1-1/+6
2014-07-16 Handle case collisions on case-insensitive systemsEelco Dolstra1-71/+92
When running NixOps under Mac OS X, we need to be able to import store paths built on Linux into the local Nix store. However, HFS+ is usually case-insensitive, so if there are directories with file names that differ only in case, then importing will fail. The solution is to add a suffix ("~nix~case~hack~<integer>") to colliding files. For instance, if we have a directory containing xt_CONNMARK.h and xt_connmark.h, then the latter will be renamed to "xt_connmark.h~nix~case~hack~1". If a store path is dumped as a NAR, the suffixes are removed. Thus, importing and exporting via a case-insensitive Nix store is round-tripping. So when NixOps calls nix-copy-closure to copy the path to a Linux machine, you get the original file names back. Closes #119.
2014-04-03 Tweak error messageEelco Dolstra1-1/+1
2014-02-27 Set up a minimal /dev in chrootsEelco Dolstra1-2/+1
Not bind-mounting the /dev from the host also solves the problem with /dev/shm being a symlink to something not in the chroot.
2013-09-17 RestoreSink: Slightly reduce the number of concurrent FDsEelco Dolstra1-0/+1
2010-05-04 * Revert r15436. This was a workaround for a bug in btrfs which seemsEelco Dolstra1-8/+0
to have been fixed now.
2009-12-17 * Include config.h before the C library headers, because it definesEelco Dolstra1-2/+2
_FILE_OFFSET_BITS=64. Without it, functions like stat() fail on large file sizes. This happened with a Nix store on squashfs: $ nix-store --dump /tmp/mnt/46wzqnk4cbdwh1dclhrpqnnz1icak6n7-local-net-cmds > /dev/null error: getting attributes of path `/tmp/mnt/46wzqnk4cbdwh1dclhrpqnnz1icak6n7-local-net-cmds': Value too large for defined data type $ stat /tmp/mnt/46wzqnk4cbdwh1dclhrpqnnz1icak6n7-local-net-cmds File: `/tmp/mnt/46wzqnk4cbdwh1dclhrpqnnz1icak6n7-local-net-cmds' Size: 0 Blocks: 36028797018963968 IO Block: 1024 regular empty file (This is a bug in squashfs or mksquashfs, but it shouldn't cause Nix to fail.)
2009-09-30 * OpenSolaris compatibility.Eelco Dolstra1-1/+6
2009-05-04 Add an ftruncate call paired with fallocate to play safe with some FSes ↵Michael Raskin1-0/+8
(namely, BtrFS fallocate sets file size to allocated size, i.e. multiple of block size)
2009-04-16 * Fix a few "comparison is always false/true due to limited range ofEelco Dolstra1-3/+3
data type" warnings on 64-bit platforms. The one in parser.y is likely to be a real bug.
2009-03-22 * NAR archives: handle files larger than 2^32 bytes. Previously itEelco Dolstra1-11/+34
would just silently store only (fileSize % 2^32) bytes. * Use posix_fallocate if available when unpacking archives. * Provide a better error message when trying to unpack something that isn't a NAR archive.
2008-12-03 * A simple API for parsing NAR archives.Eelco Dolstra1-24/+65
2006-12-12 * New primop builtins.filterSource, which can be used to filter filesEelco Dolstra1-10/+11
from a source directory. All files for which a predicate function returns true are copied to the store. Typical example is to leave out the .svn directory: stdenv.mkDerivation { ... src = builtins.filterSource (path: baseNameOf (toString path) != ".svn") ./source-dir; # as opposed to # src = ./source-dir; } This is important because the .svn directory influences the hash in a rather unpredictable and variable way.
2006-12-12 * In dumpPath(): pass a function object that allows files to beEelco Dolstra1-13/+18
selectively in/excluded from the dump.
2006-11-30 * Skeleton of the privileged worker program.Eelco Dolstra1-77/+11
* Some refactoring: put the NAR archive integer/string serialisation code in a separate file so it can be reused by the worker protocol implementation.
2006-09-04 * Use a proper namespace.Eelco Dolstra1-0/+5
* Optimise header file usage a bit. * Compile the parser as C++.
2006-08-31 * Doh! Doh! Doh!Eelco Dolstra1-1/+1
2006-08-31 * Better error checking.Eelco Dolstra1-11/+6
2004-01-15 * Catch SIGINT to terminate cleanly when the user tries to interruptEelco Dolstra1-0/+6
Nix. This is to prevent Berkeley DB from becoming wedged. Unfortunately it is not possible to throw C++ exceptions from a signal handler. In fact, you can't do much of anything except change variables of type `volatile sig_atomic_t'. So we set an interrupt flag in the signal handler and check it at various strategic locations in the code (by calling checkInterrupt()). Since this is unlikely to cover all cases (e.g., (semi-)infinite loops), sometimes SIGTERM may now be required to kill Nix.
2004-01-05 * Implemented Eelco V.'s `nix-env -I' command to specify the defaultEelco Dolstra1-4/+1
path of the Nix expression to be used with the import, upgrade, and query commands. For instance, $ nix-env -I ~/nixpkgs/pkgs/system/i686-linux.nix $ nix-env --query --available [aka -qa] sylpheed-0.9.7 bison-1.875 pango-1.2.5 subversion-0.35.1 ... $ nix-env -i sylpheed $ nix-env -u subversion There can be only one default at a time. * If the path to a Nix expression is a symlink, follow the symlink prior to resolving relative path references in the expression.
2003-11-19 * nix-env: a tool to manage user environments.Eelco Dolstra1-16/+5
* Replace all directory reading code by a generic readDirectory() function.
2003-11-18 * Source tree refactoring.Eelco Dolstra1-0/+334