Commit graph

2418 commits

Author SHA1 Message Date
Robin Gloster
00dc83bfa0
dockerTools: fix hash to accomodate the pullImage revert
(cherry picked from commit 20677fca59)
2017-09-28 14:12:10 +02:00
Robin Gloster
289358e277
Revert "dockerTools.pullImage: use skopeo to pull the image"
This reverts commit 01174c5f4d.

See https://github.com/NixOS/nixpkgs/pull/29302#issuecomment-332809092
for more information. This broke image format compatibility and
therefore amongst others mesos.

(cherry picked from commit 5c6dc717a6)
2017-09-28 14:12:10 +02:00
Robin Gloster
38fd0a2f23
Revert "dockerTools.buildImage: Switch to the format image generated by Skopeo"
This reverts commit 35f205a4b6.

This does not use a standard format and by that breaks mesos

(cherry picked from commit dabb296c76)
2017-09-28 13:21:28 +02:00
Antoine Eiche
572a0e1b12
dockerTools.examples.nix: set NIX_PAGER=cat environment variable
(cherry picked from commit ff4d7f0fd2)
2017-09-26 00:25:24 +02:00
Antoine Eiche
1231f40731
dockerTools.buildImageWithNixDb: populate the Nix Db of the image Nix store
Currently, the contents closure is copied to the layer but there is no
nix database initialization. If pkgs.nix is added in the contents,
nix-store doesn't work because there is no nix database.

From the contents of the layer, this commit generates and loads the
database in the nix store of the container. This only works if there
is no parent layer that already have a nix store (to support several
nix layers, we would have to merge nix databases of parent layers).

We also add an example to play with the nix store inside the
container. Note it seems `more` is a missing dependency of the nix
package!

(cherry picked from commit df589a438e)
2017-09-26 00:25:24 +02:00
Antoine Eiche
d41f20e9cc
dockerTools.buildImage: Switch to the format image generated by Skopeo
We were using 'Combined Image JSON + Filesystem Changeset Format' [1] to
unpack and pack image and this patch switches to the format used by the registry.

We used the 'repository' file which is not generated by Skopeo when it
pulls an image. Moreover, all information of this file are also in the
manifest.json file.
We then use the manifest.json file instead of 'repository' file. Note
also the manifest.json file is required to push an image with Skopeo.

Fix #29636

[1] 749d90e10f/image/spec/v1.1.md (combined-image-json--filesystem-changeset-format)

(cherry picked from commit 35f205a4b6)
2017-09-23 14:00:32 +02:00
Daiderd Jordan
2cbe9488ff
darwin-frameworks: move fixup setup-hook
(cherry picked from commit 5a28fd660a)
2017-09-17 19:10:14 +02:00
Daiderd Jordan
285ed1fdae
darwin-CF: use @rpath for library id and add an rpath entry for CF based on NIX_COREFOUNDATION_RPATH
(cherry picked from commit 92652b4d79)
2017-09-17 19:10:13 +02:00
Antoine Eiche
dc4178e15a
dockerTools.pullImage: use skopeo to pull the image
Before this patch, a VM was used to spawn docker that pulled the
VM. Now, the tool Skopeo does this job well so we can simplify our
dockerTools since we doesn't need Docker anymore:)

This also fixe the regression described in
https://github.com/NixOS/nixpkgs/issues/29271 : cntlm proxy doesn't
work in 17.09 while it worked in 17.03.

Note Skopeo doesn't produce the same output than docker pull so, we
have to update sha.

(cherry picked from commit 01174c5f4d)
Signed-off-by: Domen Kožar <domen@dev.si>
2017-09-17 09:27:04 +02:00
Domen Kožar
71fb65709c
vm: remove trusty-updates hash as it changes too often
(cherry picked from commit f49b7d3c88)
Signed-off-by: Domen Kožar <domen@dev.si>
2017-09-14 11:31:00 +02:00
Antoine Eiche
7c1278d94f dockerTools.pullImage: change the docker deamon readiness mechanism
To wait for the docker deamon, curl requests are sent. However, if a
http proxy is set, it will respond instead of the docker daemon.
To avoid this, we send docker ps command instead of curl command.

(cherry picked from commit 132e790735)
2017-09-13 10:40:43 +01:00
Domen Kožar
64a563f15b
vm: bump trusty-updates hash
In future we might just not use the updates if hash changes too
often.
2017-09-11 13:00:30 +02:00
Eelco Dolstra
460df30bd8
Revert "Merge pull request #28557 from obsidiansystems/binutils-wrapper"
This reverts commit 0a944b345e, reversing
changes made to 61733ed6cc.

I dislike these massive stdenv changes with unclear motivation,
especially when they involve gratuitous mass renames like NIX_CC ->
NIX_BINUTILS. The previous such rename (NIX_GCC -> NIX_CC) caused
months of pain, so let's not do that again.

(cherry picked from commit ec8d41f08c)
2017-09-07 12:53:33 +02:00
John Ericson
a23b5a1c8b macos-sierra-shared: Fix, after binutils-wrapper broke it
cctool's as needs to be told use to use gnu as, or else we'd need a
dependency cycle between cctools and clang for this case.

In general, this is not a problem because clang uses its own integrated
assembler where possible, and gnu as otherwise.

(cherry picked from commit eb326c9cb7)
2017-09-06 14:29:23 -04:00
John Ericson
b3e5bda94f binutils-wrapper: Accidentally deleted macOS Sierra reexport hack
Did this when spliting off binutils-wrapper from cc-wrapper in
40e9b2a7e6: I deleted the file instead of
moving it.

(cherry picked from commit 3601a97e3c)
2017-09-04 11:40:09 -04:00
John Ericson
28952795b7 binutils-wrapper: Import separately from cc-wrapper
(cherry picked from commit dbf6d20d64)
2017-09-03 11:30:38 -04:00
John Ericson
c2a440334e binutils-wrapper: Init
Factor a binutils wrapper out of cc-wrapper. While only LD is wrapped,
the setup hook defines environment variables on behalf of other
utilites.

(cherry picked from commit 40e9b2a7e6)
2017-09-03 11:30:38 -04:00
John Ericson
cc76444a87 cc-wrapper: Use separate mangler for "bool" variables
This avoids any `NIX_FOOBAR=1 1` not triggering conditions.

(cherry picked from commit fbb7d335db)
2017-09-03 11:30:37 -04:00
John Ericson
a1a9964c21 cc-wrapper: Pull variable mangler into utils.sh
In preparation for splitting out binutils-wrapper

(cherry picked from commit 1f5807d760)
2017-09-03 11:30:37 -04:00
John Ericson
ee7ae7b1ca cc-wrapper: Clean up dynamic linking with x86 multilib
It's better layering to do everything in ld-wrapper.

(cherry picked from commit 94c0267fc1)
2017-09-03 11:30:37 -04:00
John Ericson
54822bef11
cc-wrapper: Remove support for NIX_LDFLAGS_HARDEN
It has long been deprecated

(cherry picked from commit 3d3a6e0fac)
2017-09-03 13:48:47 +02:00
John Ericson
bf714257ba
cc-wrapper: Remove {START,EXEC}_HOOK
These are no longer used by anything

(cherry picked from commit 46fd4bcb14)
2017-09-03 13:48:42 +02:00
John Ericson
f9a8e1d3f6
mkDerivation, cc-wrapper: Check hardening flag validity in Nix
This becomes necessary if more wrappers besides cc-wrapper start
supporting hardening flags. Also good to make the warning into an
error.

Also ensure interface is being used right: Not as a string, not just in
bash.

(cherry picked from commit 97a48835b7)
2017-09-03 13:48:00 +02:00
John Ericson
432c4f8334
cc-wrapper: Remove redundant hardening
GCC just passes `-z ...` flags to ld unaltered, and they are already
passed to LD anyways. On the other hand, `-pie` affects gcc behavior
too.

(cherry picked from commit 822a8d0148)
2017-09-03 13:47:50 +02:00
Frederik Rietdijk
6d4bd78fad Merge commit '2858c41' into HEAD 2017-08-30 21:07:07 +02:00
Antoine Eiche
d4b0883ad2 vm: Add trusty-updates to the packages list 2017-08-30 02:18:56 +02:00
John Ericson
42e639066b Merge pull request #28556 from obsidiansystems/cc-wrapper-nix-cleanup
cc-wrapper: Cleanup of Nix
2017-08-26 17:48:34 -04:00
John Ericson
df7c305c4c cc-wrapper: Leverage the setup script instead of buildCommand 2017-08-25 15:10:05 -04:00
John Ericson
dc47e763c1 cc-wrapper: Use set -u for better maintainability 2017-08-25 15:10:05 -04:00
John Ericson
a470be5a16 expand-response-params: Build more normally 2017-08-25 15:10:02 -04:00
Frederik Rietdijk
656e14f64f Merge remote-tracking branch 'upstream/python-wip' into HEAD 2017-08-25 19:37:57 +02:00
John Ericson
287fce6402 expand-response-params: Pull out of cc-wrapper
No hashes were changed
2017-08-25 11:21:09 -04:00
Daniel Peebles
4f7f48fb1a Merge pull request #28521 from obsidiansystems/cc-wrapper-dead-code
cc-wrapper: Remove dead code
2017-08-24 16:05:51 -04:00
volth
0d80fabbf9 mirrors: update apache and cpan mirrors
removed dead mirrors, added new
2017-08-24 04:22:07 +00:00
Tuomas Tynkkynen
0c0fad6141 treewide: Consistently call ARM 'arm'
No need for silly differences.
2017-08-24 01:17:01 +03:00
John Ericson
08f3a60e7b cc-wrapper: Remove dead code
ccPath is only defined below, so this condition would never be true.

Worse, that's not quite true: what if somebody happend to have `/clang`
and no sandboxing. Boy, wouldn't that be annoying to debug!
2017-08-23 17:09:47 -04:00
John Ericson
0135e61b4c Merge remote-tracking branch 'upstream/master' into staging
That way the tarball job succeeds
2017-08-21 18:42:57 -04:00
John Ericson
c035711072 cc-wrapper: Remove unused params
Ensured hashes unchanged and eval succeeds in tarball job
2017-08-21 18:40:41 -04:00
Bojan Nikolic
ad8d5649a2 set +u workaround for empty arrays
libDirs can be empty, which in combination with "set -u" of
9f1e009975 will cause a variable unbound
error on old bash versions
2017-08-21 12:27:26 +01:00
Daiderd Jordan
5d3527c148
cc-wrapper: don't export CPP
CPP defaults to $(CC) -E and setting it explicitly seems to cause
issues in a number of packages like gcc and gdb.

https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
2017-08-16 21:38:32 +02:00
John Ericson
3c9cf282bb cc-wrapper: Improve set -u compliance 2017-08-14 14:44:32 -04:00
Eelco Dolstra
9eb901b70d
Merge remote-tracking branch 'origin/gcc-6' into staging 2017-08-14 11:38:00 +02:00
Frederik Rietdijk
62dac1bdd9 Merge remote-tracking branch 'upstream/master' into HEAD 2017-08-14 09:34:10 +02:00
Frederik Rietdijk
13bbaee21d Merge pull request #27881 from mimadrid/fix/http-https
Update homepage attributes: http -> https
2017-08-13 21:53:20 +02:00
Vladimír Čunát
6899c7fdb9
Merge branch 'master' into gcc-6 2017-08-12 10:09:41 +02:00
Tuomas Tynkkynen
58834f727f makeWrapper: use consistent style
All the other plain variable references (before e1d46c0c4) are without
braces.
2017-08-11 21:32:55 +03:00
Tuomas Tynkkynen
aeeb23853a stdenv: Don't move info pages to the 'man' output
Because if you were to disable man pages via 'programs.man.enable',
the "man" output wouldn't be installed and the info pages would go
missing.
2017-08-11 21:32:55 +03:00
Tuomas Tynkkynen
e4876d6e43 stdenv: Don't move man or info pages to $doc
Because .doc is normally not installed to user environments, these
manpages are unaccessible by default otherwise.
2017-08-11 21:32:54 +03:00
Domen Kožar
486e1c3c16 Merge pull request #27998 from davidak/macOS
replace "Mac OS X" and "OS X" with "macOS"
2017-08-11 13:01:36 +02:00
Daiderd Jordan
bf8c125170
cc-wrapper: fix LD_DYLD_PATH on darwin
Having multiple compilers in the build environment would result in an
invalid LD_DYLD_PATH like /usr/lib/dyld/usr/lib/dyld.
Since the path is hardcoded in XNU it can't be anything but
/usr/lib/dyld anyway.
2017-08-10 00:22:58 +02:00