$OSTYPE is "linux" on OpenSUSE 13.2. uname should be more reliable.
$OSTYPE was introduced for OS X in commit cb78269. Also, disable
functional tests on non-Linux.
Fixes: https://github.com/coreos/rkt/issues/1005
When building stage1 from sources with RKT_STAGE1_USR_FROM=src,
it is now possible to choose which systemd tag or branch should be
built:
$ export RKT_STAGE1_USR_FROM=src
$ export RKT_STAGE1_SYSTEMD_SRC=git://anongit.freedesktop.org/systemd/systemd
$ export RKT_STAGE1_SYSTEMD_VER=v215
$ ./build
By default, it still fetch the upstream git repository with tag v215 as
before. So defining the new variables is not necessary.
It is also possible to build against a local systemd repository:
$ export RKT_STAGE1_USR_FROM=src
$ export RKT_STAGE1_SYSTEMD_SRC=/home/user/git/systemd
$ export RKT_STAGE1_SYSTEMD_VER=HEAD
$ ./build
This should help developers to test newer systemd versions.
The patches in stage1/rootfs/usr_from_src/patches/ are versioned: the
subdirectory used is defined by $RKT_STAGE1_SYSTEMD_VER. If "HEAD" is
used, the master patchset will be selected.
RKT_STAGE1_USR_FROM=none ./build
When rkt is built in this way, users will need to get stage1.aci from
another source and either move it to the correct directory or use the
option "-stage1-image=".
Currently only systemd is being built from source, toggled from the
top-level build script by setting RKT_STAGE1_USR_FROM=src, e.g:
RKT_STAGE1_USR_FROM=src ./build
The default stage1 continues to be coreos-derived, but may be explicitly
specified via:
RKT_STAGE1_USR_FROM=coreos ./build
The stage1 init program has been modified to introspect the "flavor" of
stage1 at runtime, which influences how it invokes systemd-nspawn.
A small series of patches are included to give systemd-nspawn the
functionalities enabled via LD_PRELOAD of the shim in the coreos-derived
stage1.
The systemd source is cloned at build time the first time an
RKT_STAGE1_USR_FROM=src build is performed, at this time the same version
as the coreos image provided is being used, but this can be bumped in the
future.
This introduces the ability to set the default stage1 image path for
`rkt run` by setting the environment variable RKT_STAGE1_IMAGE at build
time (i.e when invoking ./build).
The variable should be set to the fully qualified path at which rkt can
find the stage1 image - for example:
RKT_STAGE1_IMAGE=/usr/lib/rkt/stage1.aci ./build
Rocket will use this environment variable to set the default value for
the stage1-image flag. If the value is _not_ set, it will continue to
use the heuristic it does today to guess the location of the stage1
image, by looking for a file called stage1.aci that is in the same
directory as rkt itself.
Without this, go throws an error about no source files available because
all of the source files for github.com/vishvananda/netlink/nl end in
"_linux.go".
Take two at getting the spec vendored into Rocket with Godep.
Since actool is used during the construction of the stage1.aci, it
really needs to be vendored too to prevent any unexpected divergence
between whatever version the user happens to have in their PATH. Thus,
we introduce a silly dummy package (stage1/dummy.go) to coerce Godep
into vendoring actool. This also requires a slight rearrangement of the
appc repo, moving some functionality from actool itself into the aci
package.
- Convert ipamanager into IPAM plugin (static) that uses env
variables instead of cmd line args
- Make bridge and veth plugins call out to IPAM plugin
- Refacor code around the new IPAM plugins
One may now specify an alternative stage1 in a style like run and fetch:
rkt run --stage1-image foo.com/rocket/stage1 app
--stage1-image defaults to "stage1.aci" within the same directory as the rkt
binary. This is discovered at runtime via "/proc/self/exe"; as long as the rkt
executable and stage1.aci share a directory it should "just work" regardless of
the directory's location and where rkt is executed from.
- Move metadatasvc into rkt as a subcommand
- Add option to spawn metadatasvc from rkt run
- Register container with metadatasvc
- Removes anti-spoofing logic -- this belongs in the network plugin
Fixes#33
Simplifying the plugin interface. No more HTTP interface and plugin
configs. Plugin type maps to executable name in stage1 rootfs or
on host in a well known dir. Env vars are used for parameter passing
to the plugin. Also, default net conf is kept in stage1 rootfs to make
private networking work "out of the box".
* Move stage1/*.go to stage1/init/
* Split stage1/mkrootfs.sh's logical components into subdirs of
stage1/rootfs:
- Deriving tree from CoreOS image and caching: rootfs/usr
* Cache management in cache.sh
* File extraction and picking in mkbase.sh
* File inclusions split under usr/manifest.d
- Fakesdboot: rootfs/shim/
* Renamed to 'shim' since we've gone past just tricking nspawn
- Root compositing and aggregation of odds and ends: rootfs/aggregate
* Introduction of Makefiles for every component and a simple recursive
parallel-capable make for the rootfs tip.
* Update toplevel build script to invoke make on stage1/rootfs and find
init sources in stage1/init, .gitignore additions as well.
* Removed stage1/mkrootfs.sh
Since the image cache has moved there will be an image download on first build
in the new arrangement. The caching has also been improved to handle CoreOS
image revision changes by naming the cached signature with a hash of the URL.
The appc spec has moved! Its new home is at https://github.com/appc/spec
This removes the spec (since it has already been migrated), and adds
placeholders linking to the new repo. It also updates rocket to
reference the spec repo _directly_ (i.e. NOT godepped). This means that
people will need to maintain the spec in their gopath for now when
building rocket.
This introduces build tags to allow the actual rkt binary to be built on
platforms other than Linux. This does not change our current focus of rocket
being targeted at the Linux/amd64 platform, but means that users on e.g.
OS X and other operating systems can at least use `rkt fetch` to
retrieve ACI images and so forth.