8000 build: add --with-stage1-systemd-revision option for src build by s-urbaniak · Pull Request #3362 · rkt/rkt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

build: add --with-stage1-systemd-revision option for src build #3362

Merged
merged 1 commit into from
Nov 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions Documentation/build-configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,17 @@ You may want to change it to point the build system to use some local repository

#### `--with-stage1-systemd-version`

This parameter specifies the systemd version to be built.
Version names are usually in form of `v<number>`, where number is a systemd version.
The default is `v999`.

#### `--with-stage1-systemd-revision`

This parameter takes either a tag name or a branch name.
Tag names are usually in form of `v<number>`, where number is a systemd version.
The default is `v229`.
You can use branch name `master` to test the bleeding edge version of systemd.
You can use branch name `master` to test the bleeding edge version of systemd or any working branch, or tag name.
Since arbitrary branch names do not imply which systemd version is being built, the actual systemd version
is specified using `--with-stage1-systemd-version`.
The default is `master`.

### `coreos` and `kvm` flavor

Expand Down
3 changes: 2 additions & 1 deletion Documentation/hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ To do this, use the following `configure` parameters after running `./autogen.sh
- `--with-stage1-flavors`
- `--with-stage1-default-flavor` (optional)
- `--with-stage1-systemd-version`
- `--with-stage1-systemd-revision` (optional)
- `--with-stage1-systemd-src`

For more details, see [configure script parameters documentation][build-configure].
Example:

```
./autogen.sh && ./configure --with-stage1-flavors=src --with-stage1-systemd-version=master --with-stage1-systemd-src=$HOME/src/systemd && make
./autogen.sh && ./configure --with-stage1-flavors=src --with-stage1-systemd-version=v231 --with-stage1-systemd-revision=master --with-stage1-systemd-src=$HOME/src/systemd && make
```

### Building stage1 with kvm as execution engine
Expand Down
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RKT_STAGE1_DEFAULT_IMAGE_FILENAME_IN_RKT_DIRECTORY := @RKT_STAGE1_DEFAULT_IMAGE_

RKT_STAGE1_SYSTEMD_SRC := @RKT_STAGE1_SYSTEMD_SRC@
RKT_STAGE1_SYSTEMD_VER := @RKT_STAGE1_SYSTEMD_VER@
RKT_STAGE1_SYSTEMD_REV := @RKT_STAGE1_SYSTEMD_REV@

RKT_LOCAL_COREOS_PXE_IMAGE_PATH := @RKT_LOCAL_COREOS_PXE_IMAGE_PATH@
RKT_LOCAL_COREOS_PXE_IMAGE_SYSTEMD_VER := @RKT_LOCAL_COREOS_PXE_IMAGE_SYSTEMD_VER@
Expand Down
20 changes: 19 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ AC_ARG_WITH([stage1-systemd-version],
[RKT_STAGE1_SYSTEMD_VER="${withval}"],
[RKT_STAGE1_SYSTEMD_VER='auto'])

AC_ARG_WITH([stage1-systemd-revision],
[AS_HELP_STRING([--with-stage1-systemd-revision],
[systemd revision to check out to build, used in 'src' stage1 flavor (default: the same value as --stage1-systemd-version)])],
[RKT_STAGE1_SYSTEMD_REV="${withval}"],
[RKT_STAGE1_SYSTEMD_REV='auto'])

# STAGE1 - kvm hypervisor. lkvm or/and qemu can be chosen
AC_ARG_WITH([stage1-kvm-hypervisors],
[AS_HELP_STRING([--with-stage1-kvm-hypervisors],
Expand Down Expand Up @@ -410,15 +416,25 @@ RKT_IF_HAS_VALUE([${RKT_STAGE1_FLAVORS}],[src],
[:])
AS_VAR_IF([RKT_STAGE1_SYSTEMD_VER], [auto],
dnl systemd version not specified, use default
[RKT_STAGE1_SYSTEMD_VER='v229'],
[RKT_STAGE1_SYSTEMD_VER='v999'],
dnl systemd version specified, use it
[:])
AS_VAR_IF([RKT_STAGE1_SYSTEMD_REV], [auto],
dnl systemd revision not specified, use default
[RKT_STAGE1_SYSTEMD_REV="master"],
dnl systemd revision specified, use it
[:])],
dnl we are not building src flavor
[AS_VAR_IF([RKT_STAGE1_SYSTEMD_SRC], [auto],
dnl systemd source not specified, alright, zero the value just in case
[RKT_STAGE1_SYSTEMD_SRC=''],
dnl systemd source specified, warn about it being ignored
[AC_MSG_WARN([* --with-stage1-systemd-src is ignored, src flavor is not built])])
AS_VAR_IF([RKT_STAGE1_SYSTEMD_REV], [auto],
dnl systemd source not specified, alright, zero the value just in case
[RKT_STAGE1_SYSTEMD_REV=''],
dnl systemd source specified, warn about it being ignored
[AC_MSG_WARN([* --with-stage1-systemd-revision is ignored, src flavor is not built])])
AS_VAR_IF([RKT_STAGE1_SYSTEMD_VER], [auto],
dnl systemd version not specified, alright, zero the value just in case
[RKT_STAGE1_SYSTEMD_VER=''],
Expand Down Expand Up @@ -772,6 +788,7 @@ AC_SUBST(RKT_STAGE1_DEFAULT_IMAGE_FILENAME_IN_RKT_DIRECTORY)

AC_SUBST(RKT_STAGE1_SYSTEMD_SRC)
AC_SUBST(RKT_STAGE1_SYSTEMD_VER)
AC_SUBST(RKT_STAGE1_SYSTEMD_REV)

AC_SUBST(RKT_LOCAL_COREOS_PXE_IMAGE_PATH)
AC_SUBST(RKT_LOCAL_COREOS_PXE_IMAGE_SYSTEMD_VER)
Expand Down Expand Up @@ -845,6 +862,7 @@ RKT_IF_HAS_VALUE([${RKT_STAGE1_FLAVORS}], [src],
src flavor specific build parameters

systemd git repo: '${RKT_STAGE1_SYSTEMD_SRC}'
systemd git revision: '${RKT_STAGE1_SYSTEMD_REV}'
systemd version: '${RKT_STAGE1_SYSTEMD_VER}'])])

RKT_IF_HAS_VALUE([${RKT_STAGE1_FLAVORS}], [kvm],
Expand Down
2 changes: 1 addition & 1 deletion stage1/usr_from_src/usr_from_src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ $(call generate-glob-deps,$(UFS_PATCHES_DEPS_STAMP),$(UFS_SYSTEMD_CONFIGURE_AC),
# parameters for makelib/git.mk
GCL_REPOSITORY := $(RKT_STAGE1_SYSTEMD_SRC)
GCL_DIRECTORY := $(UFS_SYSTEMD_SRCDIR)
GCL_COMMITTISH := $(RKT_STAGE1_SYSTEMD_VER)
GCL_COMMITTISH := $(RKT_STAGE1_SYSTEMD_REV)
GCL_EXPECTED_FILE := $(notdir $(UFS_SYSTEMD_CONFIGURE_AC))
GCL_TARGET := $(UFS_SYSTEMD_CONFIGURE)

Expand Down
10 changes: 9 additions & 1 deletion tests/build-and-run-tests.sh
48AE
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ function parseParameters {
echo "Only \`src\` flavor requires systemd version"
fi
;;
r)
if [[ $RKT_STAGE1_USR_FROM == "src" ]]; then
RKT_STAGE1_SYSTEMD_REV="${OPTARG}"
else
echo "Only \`src\` flavor requires systemd revision"
fi
;;
x)
FORCE=true
;;
Expand Down Expand Up @@ -133,7 +140,8 @@ function configure {
src)
./configure --with-stage1-flavors="${RKT_STAGE1_USR_FROM}" \
--with-stage1-default-flavor="${RKT_STAGE1_USR_FROM}" \
--with-stage1-systemd-version="${RKT_STAGE1_SYSTEMD_VER}" \
--with-stage1-systemd-version="${RKT_STAGE1_SYSTEMD_VER:-v999}" \
--with-stage1-systemd-revision="${RKT_STAGE1_SYSTEMD_REV:-master}" \
--enable-functional-tests --enable-tpm=auto \
--enable-insecure-go
;;
Expand Down
0