Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 568992 - =app-emulation/rkt-1.0.0 version bump
Summary: =app-emulation/rkt-1.0.0 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2015-12-21 13:43 UTC by Manuel Rüger (RETIRED)
Modified: 2016-02-29 18:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
app-emulation/rkt-1.0.0.diff (rkt-1.0.0.diff,2.68 KB, patch)
2016-02-19 17:06 UTC, Kristian
Details | Diff
app-emulation/rkt-1.0.0.diff (rkt-1.0.0.diff,2.68 KB, patch)
2016-02-19 17:16 UTC, Kristian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rüger (RETIRED) gentoo-dev 2015-12-21 13:43:45 UTC
Please add a new version to the tree.
Comment 1 Alex Brandt (RETIRED) gentoo-dev 2016-02-06 15:59:51 UTC
steveeJ no longer uses Gentoo and will no longer be maintaining this ebuild.  I've sent out an announcement to gentoo-dev@ and will be marking this package as maintainer-needed in two weeks if one doesn't emerge.
Comment 2 Jesse Adelman 2016-02-08 21:47:30 UTC
Just FYI: https://lwn.net/Articles/674725/ Thanks.
Comment 3 Johan Bergström 2016-02-11 08:53:47 UTC
Not officially picking this up, but I'm declaring interest and that I will likely be spending time with rkt in the coming weeks/months. I'd hate to see it go.
Comment 4 Alex Brandt (RETIRED) gentoo-dev 2016-02-13 15:49:18 UTC
(In reply to Johan Bergström from comment #3)
> Not officially picking this up, but I'm declaring interest and that I will
> likely be spending time with rkt in the coming weeks/months. I'd hate to see
> it go.

Excellent.  I'm hopeful you'll like it enough to pick up the package. ;)
Comment 5 Kristian 2016-02-19 17:06:17 UTC
Created attachment 425924 [details, diff]
app-emulation/rkt-1.0.0.diff

diff to the in-tree 9999 ebuild for version 1.0.0. Far from finished, not even tested yet. The rkt_stage1 flags need to be checked. TPM support requires https://github.com/coreos/go-tspi.
Comment 6 Kristian 2016-02-19 17:16:28 UTC
Created attachment 425926 [details, diff]
app-emulation/rkt-1.0.0.diff

this time right direction diff
Comment 7 Zac Medico gentoo-dev 2016-02-22 00:49:42 UTC
(In reply to Kristian from comment #6)
> Created attachment 425926 [details, diff] [details, diff]
> app-emulation/rkt-1.0.0.diff
> 
> this time right direction diff

I've tested and it works for me (aside from hitting this btrfs related issue: https://github.com/coreos/rkt/issues/2175).

The configure script says you can enable multiple stage1 flavors using a comma separated list:

  --with-stage1-flavors   comma-separated list of stage1 flavors; choose from
                          'src', 'coreos', 'host', 'kvm', 'fly'; default:
                          'coreos,kvm,fly'

And you can set a default flavor:

  --with-stage1-default-flavor
                          stage1 flavor that will be loaded by default; has to
                          be listed in --with-stage1-flavors, default: first
                          from the stage1 flavors list

There's also some build configuration info here:

https://coreos.com/rkt/docs/latest/build-configure.html

Apparently you use the rkt run --stage1-* options to select a non-default flavor at runtime. See https://coreos.com/rkt/docs/latest/running-fly-stage1.html for example.

Maybe our IUSE/REQUIRED_USE settings should reflect this. The current REQUIRED_USE="^^ ( ...)" setting only allows one flavor to be selected at a time. We could change that to || ( ... ) to allow multiple flavors to be enabled at once. We might also add separate USE flags to control the default flavor.
Comment 8 Zac Medico gentoo-dev 2016-02-22 01:41:19 UTC
According to the configure script help, the 'kvm' flavor is built from the CoreOS PXE image:

  --with-coreos-local-pxe-image-path
                          path to local CoreOS PXE image, used in 'coreos' and
                          'kvm' stage1 flavors (default: empty) (the GPG
                          signature of this file will not be checked!)
  --with-coreos-local-pxe-image-systemd-version
                          version of systemd in local CoreOS PXE image, used
                          in 'coreos' and 'kvm' stage1 flavors (should be in
                          format 'v<number>', like v222)

If that's true, we should add "rkt_stage1_kvm? ( $PXE_URI -> $PXE_FILE )" to SRC_URI.
Comment 9 Zac Medico gentoo-dev 2016-02-22 01:51:54 UTC
The expected path of the pxe image is actually ${BUILDDIR}/tmp/coreos-common/pxe.img now, and we can optimize by using a symlink instead of cp:

mkdir -p "${BUILDDIR}/tmp/coreos-common" || die
ln -snf "${DISTDIR}/${PXE_FILE}" "${BUILDDIR}/tmp/coreos-common/pxe.img" || die
Comment 10 Zac Medico gentoo-dev 2016-02-22 02:27:47 UTC
The kvm flavor fails like this:

/var/tmp/portage/app-emulation/rkt-1.0.0/work/rkt-1.0.0/build-rkt-1.0.0/tmp/usr_from_kvm/kernel/linux-4.1.3/Makefile:610: arch/amd64/Makefile: No such file or directory

And it's downloading the linux-4.1.3 sources automatically, which we don't want. We'll have to figure out how to make stage1/usr_from_kvm/kernel.mk behave better. I suppose we can just remove the rkt_stage1_kvm flag until somebody gets it working properly.
Comment 11 Zac Medico gentoo-dev 2016-02-22 02:54:33 UTC
The rkt_stage1_src flag should pull in systemd sources via SRC_URI, instead of doing a git clone.
Comment 12 Zac Medico gentoo-dev 2016-02-22 04:34:55 UTC
(In reply to Zac Medico from comment #9)
> The expected path of the pxe image is actually
> ${BUILDDIR}/tmp/coreos-common/pxe.img now, and we can optimize by using a
> symlink instead of cp:
> 
> mkdir -p "${BUILDDIR}/tmp/coreos-common" || die
> ln -snf "${DISTDIR}/${PXE_FILE}" "${BUILDDIR}/tmp/coreos-common/pxe.img" ||
> die

Actually, a symlink doesn't work, because the build system calls wget anyway, triggering a sandbox violation when it tries to write to $DISTDIR via the symlink.

Once I updated the ebuild to use the correct "${BUILDDIR}/tmp/coreos-common" path, instead of downloading 794.1.0 with wget, it used version 962.0.0 from SRC_URI. With version 962.0.0, I consistently get this problem:

# rkt run --no-overlay --interactive quay.io/coreos/alpine-sh
image: using image from file /usr/share/rkt/stage1-coreos.aci
image: searching for app image quay.io/coreos/alpine-sh
image: remote fetching from URL "https://quay.io/c1/aci/quay.io/coreos/alpine-sh/latest/aci/linux/amd64/"
image: keys already exist for prefix "quay.io/coreos/alpine-sh", not fetching again
image: downloading signature from https://quay.io/c1/aci/quay.io/coreos/alpine-sh/latest/aci.asc/linux/amd64/
Downloading signature: [=======================================] 473 B/473 B
Downloading ACI: [=============================================] 2.65 MB/2.65 MB
image: signature verified:
  Quay.io ACI Converter (ACI conversion signing key) <support@quay.io>
networking: loading networks from /etc/rkt/net.d
networking: loading network default with type ptp
stage1: failed to execute "stage1/rootfs/usr/lib/ld-linux-x86-64.so.2": no such file or directory

The problem is solved by setting PXE_VERSION="794.1.0" instead.
Comment 13 Zac Medico gentoo-dev 2016-02-22 06:00:14 UTC
This is in git now:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf26f36f5a139d74f3588e8867280ec947c7fb93

The rkt_stage1_kvm, rkt_stage1_src, and rkt_stage1_host flags are not supported since they did not behave well enough for me. If anyone get's them working then please let me know (especially kvm).
Comment 14 Zac Medico gentoo-dev 2016-02-29 18:26:29 UTC
All stage1 flavors are supported in the 1.1.0 ebuild now.