Commit Graph

4950 Commits

Author SHA1 Message Date
Justin Cormack
098110e3c8 Merge pull request #2597 from ijc/linuxkit-pkg-hash
linuxkit pkg: correct behaviour when user explictly specifies a hash.
2017-10-12 12:19:46 +01:00
Justin Cormack
995bde5a54 Merge pull request #2558 from deitch/raw-bios
Add support to make minimal raw bios images
2017-10-12 11:24:14 +01:00
Justin Cormack
3b07a9e793 Merge pull request #2540 from deitch/raw-efi
Add support to make raw efi images
2017-10-12 11:23:32 +01:00
Ian Campbell
4304d5f4fd linuxkit pkg: correct behaviour when user explictly specifies a hash.
With the old package.mk arrangements we would only append -dirty and -$arch to
the hash if the user didn't specify a HASH= directly. So the following would
work
    make ORG=ijc HASH=dev tag
and produce an image `ijc/«image»:dev`.

However the new equivalent:
    linuxkit pkg build -org=ijc --hash-=dev
instead produces an image `ijc/«image»:dev-dirty-$arch`. Which is undesirable.

This commit refactors the code in two main ways:

Firstly directly append `-dirty` to the hash as we extract it from git (rather
than on use in the `Tag()` method), and only do this if the user has not
specified an explicit tag. Note that we still track dirtiness in the `Pkg`
object and so will not allow a push (or release) from a dirty tree (the
makefile version would have tried this with unpredictable results), nor will we
apply the `org.opencontainers.image.revision` label to a dirty build.

Secondly if we are not pushing the image+manifest then we retag the -$arch
suffixed image without the the -$arch. This differs from the Makefile version
which would simply have built without the -$arch in the first place, I think
this is an improvement. If we are pushing the manifest-tool remains responsible
for creating the non -$arch image.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-12 10:17:56 +01:00
Rolf Neugebauer
7f8082b253 Merge pull request #2595 from zx2c4/wireguard-bump
wireguard: bump version
2017-10-12 10:17:01 +01:00
Rolf Neugebauer
b408923916 Merge pull request #2591 from dprotaso/master
fix dns not working in the docker blueprint
2017-10-11 16:13:34 +01:00
Jason A. Donenfeld
055db2d542 wireguard: bump version
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-11 16:41:47 +02:00
Rolf Neugebauer
77200864d0 Merge pull request #2592 from rn/kup
Update kernel to 4.9.54 and 4.4.91 and tweak build/kernel config
2017-10-11 15:00:32 +01:00
Rolf Neugebauer
8173300f76 Update YAML files to new kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Rolf Neugebauer
38c37276a2 kernel: Update to 4.9.54/4.4.91
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Rolf Neugebauer
b294171311 kernel: Add the firmware to the result tarball
'make firmware_install' adds the firmware blobs creating
during the build to '/lib/firmware' in the result tarball.

This should be installed along with the kernel modules.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Rolf Neugebauer
6f81297da6 kernel: Enable RANDOMIZE_BASE on arm64 kernels as well
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Ian Campbell
2eb5dfffaa Merge pull request #2589 from ijc/linuxkit-pkg-release
linuxkit pkg: Support --release option to pkg push.
2017-10-11 11:10:23 +01:00
dave
aabd10035b fix dns not working in the docker blueprint
Signed-off-by: dave <dprotaso@gmail.com>
2017-10-10 21:47:03 -04:00
Avi Deitcher
8f3e4e419d Add support to make raw efi images; simplify raw bios build
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-10 21:00:53 +03:00
Avi Deitcher
fb5383a25e simplify raw bios build
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-10-10 20:59:48 +03:00
Ian Campbell
e129b3e37d Merge pull request #2588 from ijc/linuxkit-pkg-logging
linuxkit pkg: Log before building or pushing.
2017-10-10 17:47:44 +01:00
Ian Campbell
861b2cbe80 linuxkit pkg: Support --release option to pkg push.
This overrides the default (which is to look for an exact git tag) and releases
just that.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 16:54:04 +01:00
Ian Campbell
2264bc8021 Correct typo in linuxkit pkg push help.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 16:11:48 +01:00
Ian Campbell
8f1d39cea1 Log before building or pushing.
Previously there would be a make "entering directory" hint in the logs, but
with the switch to `linuxkit pkg` that no longer occurs.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 16:05:15 +01:00
Ian Campbell
38e48d3bf4 Merge pull request #2578 from ijc/linuxkit-pkg
Bulk conversion from `pkg/package.mk` to `linuxkit pkg`
2017-10-10 14:38:58 +01:00
Ian Campbell
4df5d394e8 Bump yml
Done as follows:

    find -name build.yml | xargs dirname | while read d ; do
        t=$(linuxkit pkg show-tag $d)
        ./scripts/update-component-sha.sh --image ${t%:*} ${t#*:}
    done
    git commit -s test pkg tools blueprints examples projects/kubernetes projects/swarmd docs linuxkit.yml Makefile src

This explicitly excludes projects/* which I did not know whether to update.

Then:

    git reset --hard
    for i in init runc containerd ca-certificates sysctl dhcpcd getty rngd ; do
        o=$(git grep -h "\(image:\|-\) *linuxkit/$i:[0-9a-f]\{40\}" origin/master:linuxkit.yml | awk '// { print $2 }')
        n=$(linuxkit pkg show-tag pkg/$i)
        ./scripts/update-component-sha.sh "$o" "$n"
    done
    git commit --amend projects

This updates any projects which were using components with the same hash as the
top-level linuxkit.yml.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 13:23:45 +01:00
Ian Campbell
694a7876ef Bump test/pkg/ns/template.yml
Doing before mass update otherwise users of linuxkit/test-ns will be switched
to -dirty.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 13:21:43 +01:00
Ian Campbell
cf590bb455 test: ltp: disable content trust
Signing is not setup for this repositories. It seems it hasn't been updated
since before trust was added since the previous Makefile metadata (which was
translated in build.yml) did not contain `NOTRUST=1`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:53:38 +01:00
Ian Campbell
fbf23b4b9f New option linuxkit pkg build --force-dirty
Will tag as `-dirty` and prevent push etc even if the tree isn't actually
dirty.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:43:53 +01:00
Ian Campbell
12e6a85661 Make linuxkit pkg build on an unsupported arch a nop
Rather than a hard fail. This allows batch builds of a set of packages without
the surrounding loop needing to be away of the possibility.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:42:58 +01:00
Ian Campbell
e0b537b19e Revert "Rename poweroff to test-poweroff for consistency"
This reverts commit c889f13251.

Changing the name breaks signing.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:33:07 +01:00
Ian Campbell
57225335bc Correct manifest push without content trust
The script expects an empty second argument to mean no trust and anything else
to mean trust.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:22:24 +01:00
Ian Campbell
d055ab31d8 tools: mkimage-*: disable content trust
Signing is not setup for these repositories. It seems they haven't been updated
since before trust was added since their previous Makefile metadata (which was
translated in build.yml) did not contain `NOTRUST=1`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 10:13:15 +01:00
Ian Campbell
a237b51511 Bump alpine base across the board.
By running:

    ./scripts/update-component-sha.sh --image linuxkit/alpine ad35b6ddbc70faa07e59a9d7dee7707c08122e8d

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 09:55:45 +01:00
Ian Campbell
206fc78a6a Update alpine package
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 08:54:44 +00:00
Ian Campbell
13d11f49ba Rename "tag*" Makefile targets to "build*"
This better matches the `linuxkit pkg build` nomenclature.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:48:48 +01:00
Ian Campbell
9bb87c0091 Remove unused pkg/package.mk
All uses now converted to `linuxkit pkg`

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:40:33 +01:00
Ian Campbell
298ef8520d Convert some of projects/kubernetes/* to linuxkit pkg build
This just covers those using pkg/package.mk.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:40:00 +01:00
Ian Campbell
fc3e659f0e Convert all of pkg/* to linuxkit pkg build
This was done with the following "script":

    git rm pkg/{auditd,binfmt,init}/Makefile
    sed -e 's/IMAGE=/image: /g' -i pkg/*/Makefile
    sed -e 's/NETWORK=1/network: true/g' -i pkg/*/Makefile
    sed -e 's/ARCHES=x86_64/arches:\n  - amd64/g' -i pkg/*/Makefile
    sed -e '/DEPS:\?=/d' -i pkg/*/Makefile
    sed -e '/ARCHES=SKIP/d' -i pkg/node_exporter/Makefile
    sed -e 's/include \.\.\/package.mk//g' -i pkg/*/Makefile
    sed -e '/^$/d' -i pkg/*/Makefile
    git mv pkg/node_exporter/Makefile pkg/node_exporter/build.yml-skip
    for i in pkg/*/Makefile ; do git mv $i ${i%Makefile}build.yml ; done

and manual update of pkg/Makefile.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:26 +01:00
Ian Campbell
c889f13251 Rename poweroff to test-poweroff for consistency
This was the only one of `test/pkg` not to have a `test-` prefix.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:26 +01:00
Ian Campbell
588d095e19 Convert all of test/pkg/* to linuxkit pkg build
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:26 +01:00
Ian Campbell
624e7c82f1 Convert most of tools/* to linuxkit pkg build
tools/alpine and tools/guestfs are omitted since they do not currently use
pkg/package.mk and do their own thing. Slightly hacky arrangements are made for
these. Note that previously they were only recursed into for their default
target (push) and that behaviour is retained.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:25 +01:00
Ian Campbell
f7c50156c5 tools: pull linuxkit/guestfs by digest only (not digest+tag)
Current versions of Docker complain:

    Sending build context to Docker daemon   5.12kB
    Step 1/4 : FROM linuxkit/guestfs@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f
    ...
    Successfully tagged linuxkit/mkimage-gcp:736880776838c8f41c081276d9c017ae6adbf1bb-amd64
    Tagging linuxkit/guestfs@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f as linuxkit/guestfs:aecc40bf84ce4f4238e06934c46d7cc570a39eed@sha256:62e810869e83dabe04af7ac8fcd81d9f177d986a3424dcb9c4eb5439993c962f
    refusing to create a tag with a digest reference
    ../../pkg/package.mk:82: recipe for target 'tag-y' failed

Just use the digest for now. Perhaps someone will have time to fixup this build
properly at some point.

Make the same change to test/pkg/ltp.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:10 +01:00
Ian Campbell
ca70b7b6af Update pkg/Makefile and test/pkg/Makefile based on tools/Makefile
Using explicit targets is cleaner and easier to follow.

Also add `forcepush` to pkg and test/pkg and make `push` explicit.

The `dirs` phony was non-existent in all three cases. Likewise `$(DIR)` wasn't
used in that way in pkg or test/pkg and is nolonger used in that way in tools.

Finally, `clean` was bogus in all cases (tools cleaned a thing which never
exists and pkg and test/pkg were a syntax error).

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:20:08 +01:00
Ian Campbell
d11e49d113 Fixup linuxkit pkg debug output (space wrong side of variable)
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:19:20 +01:00
Justin Cormack
d0882b9674 Merge pull request #2571 from ijc/linuxkit-pkg
Implement package build, push and show-tag in linuxkit tool
2017-10-09 13:59:02 +01:00
Rolf Neugebauer
74e9dddb21 Merge pull request #2575 from yankcrime/openstack_metadata
[OpenStack] Metadata service support
2017-10-09 13:54:11 +01:00
Rolf Neugebauer
cca98d7944 Merge pull request #2577 from justincormack/mobyup
Update Moby tool
2017-10-09 13:53:15 +01:00
Justin Cormack
61d1906e51 Update Moby
Several fixes and updates since last update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-09 12:30:47 +01:00
Nick Jones
d73092adca
Update metadata image references
Signed-off-by: Nick Jones <nick@dischord.org>
2017-10-09 12:27:00 +01:00
Ian Campbell
2f10af2bf3 linuxkit-push-manifest is no longer required in $PATH
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 11:25:20 +01:00
Ian Campbell
896cfaab63 Rename some variables following rename of PkgSrc to Pkg
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 11:24:03 +01:00
Nick Jones
6deabe8a2f
[OpenStack] Metadata service support
This commit adds support for retrieving instance metadata on OpenStack
public clouds.

Signed-off-by: Nick Jones <nick@dischord.org>
2017-10-08 17:08:00 +01:00
Ian Campbell
4cdc90e221 Build fields default to false, rename accordingly
Added some test cases for the boolean fields because I kept getting confused.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-06 17:43:38 +01:00