Skip to content

Commit 0ad2df8

Browse files
author
Mrunal Patel
committed
Merge pull request #17 from liangchenye/contrib
add contrib directory and mv get-stage3 to that
2 parents aad6671 + 607ee90 commit 0ad2df8

File tree

8 files changed

+68
-64
lines changed

8 files changed

+68
-64
lines changed

Makefile

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,8 @@ all:
88
install:
99
cp ocitools /usr/local/bin/ocitools
1010

11-
rootfs.tar.gz: rootfs/bin/echo
12-
tar -czf $@ -C rootfs .
13-
14-
rootfs/bin/busybox: downloads/stage3-amd64-current.tar.bz2 rootfs-files
15-
gpg --verify $<.DIGESTS.asc
16-
(cd downloads && \
17-
grep -A1 '^# SHA512 HASH' stage3-amd64-current.tar.bz2.DIGESTS.asc | \
18-
grep -v '^--' | \
19-
sha512sum -c)
20-
sudo rm -rf rootfs
21-
sudo mkdir rootfs
22-
sudo tar -xvf downloads/stage3-amd64-current.tar.bz2 -C rootfs \
23-
--no-recursion --wildcards $$(< rootfs-files)
24-
sudo touch $@
25-
26-
rootfs/bin/echo: rootfs/bin/busybox
27-
sudo sh -c 'for COMMAND in $$($< --list); do \
28-
ln -rs $< "rootfs/bin/$${COMMAND}"; \
29-
done'
30-
31-
downloads/stage3-amd64-current.tar.bz2: get-stage3.sh
32-
./$<
33-
touch downloads/stage3-amd64-*.tar.bz2
34-
3511
clean:
36-
rm -f ocitools runtimetest downloads/*
37-
sudo rm -rf rootfs
12+
rm -f ocitools runtimetest
3813

3914
.PHONY: test .gofmt .govet .golint
4015

README.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -68,41 +68,3 @@ validating rlimits
6868
validating sysctls
6969
Runtime runc passed validation
7070
```
71-
72-
Building `rootfs.tar.gz`
73-
------------------------
74-
75-
The root filesystem tarball is based on [Gentoo][]'s [amd64
76-
stage3][stage3-amd64] (which we check for a valid [GnuPG
77-
signature][gentoo-signatures]), copying a [minimal
78-
subset](rootfs-files) to the root filesytem, and adding symlinks for
79-
all BusyBox commands. To rebuild the tarball based on a newer stage3,
80-
just run:
81-
82-
```
83-
$ touch get-stage3.sh
84-
$ make rootfs.tar.gz
85-
```
86-
87-
### Getting Gentoo's Release Engineering public key
88-
89-
If `make rootfs.tar.gz` gives an error like:
90-
91-
```
92-
gpg --verify downloads/stage3-amd64-current.tar.bz2.DIGESTS.asc
93-
gpg: Signature made Thu 14 Jan 2016 09:00:11 PM EST using RSA key ID 2D182910
94-
gpg: Can't check signature: public key not found
95-
```
96-
97-
you will need to [add the missing public key to your
98-
keystore][gentoo-signatures]. One way to do that is by [asking a
99-
keyserver][recv-keys]:
100-
101-
```
102-
$ gpg --keyserver pool.sks-keyservers.net --recv-keys 2D182910
103-
```
104-
105-
[Gentoo]: https://www.gentoo.org/
106-
[stage3-amd64]: http://distfiles.gentoo.org/releases/amd64/autobuilds/
107-
[gentoo-signatures]: https://www.gentoo.org/downloads/signatures/
108-
[recv-keys]: https://www.gnupg.org/documentation/manuals/gnupg/Operational-GPG-Commands.html

contrib/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ocitools contrib
2+
3+
The `contrib` directory contains various scripts, programs, and other helpful things which are not part of the core ocitools.

contrib/rootfs-builder/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
rootfs.tar.gz: rootfs/bin/echo
2+
tar -czf $@ -C rootfs .
3+
4+
rootfs/bin/busybox: downloads/stage3-amd64-current.tar.bz2 rootfs-files
5+
gpg --verify $<.DIGESTS.asc
6+
(cd downloads && \
7+
grep -A1 '^# SHA512 HASH' stage3-amd64-current.tar.bz2.DIGESTS.asc | \
8+
grep -v '^--' | \
9+
sha512sum -c)
10+
sudo rm -rf rootfs
11+
sudo mkdir rootfs
12+
sudo tar -xvf downloads/stage3-amd64-current.tar.bz2 -C rootfs \
13+
--no-recursion --wildcards $$(< rootfs-files)
14+
sudo touch $@
15+
16+
rootfs/bin/echo: rootfs/bin/busybox
17+
sudo sh -c 'for COMMAND in $$($< --list); do \
18+
ln -rs $< "rootfs/bin/$${COMMAND}"; \
19+
done'
20+
21+
downloads/stage3-amd64-current.tar.bz2: get-stage3.sh
22+
./$<
23+
touch downloads/stage3-amd64-*.tar.bz2
24+
25+
clean:
26+
rm -f downloads/*
27+
sudo rm -rf rootfs

contrib/rootfs-builder/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Building `rootfs.tar.gz`
2+
------------------------
3+
4+
The root filesystem tarball is based on [Gentoo][]'s [amd64
5+
stage3][stage3-amd64] (which we check for a valid [GnuPG
6+
signature][gentoo-signatures]), copying a [minimal
7+
subset](rootfs-files) to the root filesytem, and adding symlinks for
8+
all BusyBox commands. To rebuild the tarball based on a newer stage3,
9+
just run:
10+
11+
```
12+
$ touch get-stage3.sh
13+
$ make rootfs.tar.gz
14+
```
15+
16+
### Getting Gentoo's Release Engineering public key
17+
18+
If `make rootfs.tar.gz` gives an error like:
19+
20+
```
21+
gpg --verify downloads/stage3-amd64-current.tar.bz2.DIGESTS.asc
22+
gpg: Signature made Thu 14 Jan 2016 09:00:11 PM EST using RSA key ID 2D182910
23+
gpg: Can't check signature: public key not found
24+
```
25+
26+
you will need to [add the missing public key to your
27+
keystore][gentoo-signatures]. One way to do that is by [asking a
28+
keyserver][recv-keys]:
29+
30+
```
31+
$ gpg --keyserver pool.sks-keyservers.net --recv-keys 2D182910
32+
```
33+
34+
[Gentoo]: https://www.gentoo.org/
35+
[stage3-amd64]: http://distfiles.gentoo.org/releases/amd64/autobuilds/
36+
[gentoo-signatures]: https://www.gentoo.org/downloads/signatures/
37+
[recv-keys]: https://www.gnupg.org/documentation/manuals/gnupg/Operational-GPG-Commands.html
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)