diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/Manifest b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/Manifest
new file mode 100644
index 0000000000..8b75e07bb5
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/Manifest
@@ -0,0 +1 @@
+DIST p11-kit-0.23.22.tar.xz 830016 BLAKE2B 4e1edfd9e2441d237c07a16c003aee5ffde38f1cf545c26e435645429f2cfa4fe7ca61cdc3c3940390aa040ba991f2ee3995b14cc31bb886d5eeffa8ed5e1721 SHA512 098819e6ca4ad9cc2a0bc2e478aea67354d051a4f03e6c7d75d13d2469b6dc7654f26b15530052f6ed51acb35531c2539e0f971b31e29e6673e857c903afb080
diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/README.md b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/README.md
new file mode 100644
index 0000000000..92a3038272
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/README.md
@@ -0,0 +1,4 @@
+We forked this package to fix the systemd user unit directory and bash
+completion directory detection in the cross-compilation scenario.
+
+These fixes could be upstreamed to gentoo.
diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/metadata.xml
new file mode 100644
index 0000000000..ff17590b69
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/metadata.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ zlogene@gentoo.org
+ Mikle Kolyada
+
+
+
+ p11-glue/p11-kit
+
+
diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/p11-kit-0.23.22.ebuild b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/p11-kit-0.23.22.ebuild
new file mode 100644
index 0000000000..b36df3db26
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/p11-kit-0.23.22.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Flatcar: inherit systemd eclass for the systemd user unit directory
+# getter, and bash-completion-r1 for bash completion directory getter.
+inherit multilib-minimal systemd bash-completion-r1
+
+DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
+HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
+SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+asn1 debug +libffi systemd +trust"
+REQUIRED_USE="trust? ( asn1 )"
+
+RDEPEND="asn1? ( >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] )
+ libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
+ systemd? ( sys-apps/systemd:= )
+ trust? ( app-misc/ca-certificates )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+pkg_setup() {
+ # disable unsafe tests, bug#502088
+ export FAKED_MODE=1
+}
+
+src_prepare() {
+ if [[ ${CHOST} == *-solaris2.* && ${CHOST##*-solaris2.} -lt 11 ]] ; then
+ # Solaris 10 and before doesn't know about XPG7 (XOPEN_SOURCE=700)
+ # drop to XPG6 to make feature_tests.h happy
+ sed -i -e '/define _XOPEN_SOURCE/s/700/600/' common/compat.c || die
+ # paths.h isn't available, oddly enough also not used albeit included
+ sed -i -e '/#include /d' trust/test-trust.c || die
+ # we don't have SUN_LEN here
+ sed -i -e 's/SUN_LEN \(([^)]\+)\)/strlen (\1->sun_path)/' \
+ p11-kit/server.c || die
+ fi
+ default
+}
+
+multilib_src_configure() {
+ # Flatcar: Override the detection of the systemd user unit
+ # directory and bash completion directory with these
+ # environment variables.
+ local -x systemduserunitdir=$(systemd_get_userunitdir)
+ local -x bashcompdir=$(get_bashcompdir)
+ ECONF_SOURCE="${S}" econf \
+ $(use_enable trust trust-module) \
+ $(use_with trust trust-paths ${EPREFIX}/etc/ssl/certs/ca-certificates.crt) \
+ $(use_enable debug) \
+ $(use_with libffi) \
+ $(use_with asn1 libtasn1) \
+ $(multilib_native_use_with systemd)
+
+ if multilib_is_native_abi; then
+ # re-use provided documentation
+ ln -s "${S}"/doc/manual/html doc/manual/html || die
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild
index d3b980b708..04d26683b6 100644
--- a/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/update_engine/update_engine-9999.ebuild
@@ -68,6 +68,12 @@ src_configure() {
$(use_enable delta_generator)
)
+ if tc-is-cross-compiler; then
+ # Override glib-genmarshal path
+ local build_pkg_config="$(tc-getBUILD_PROG PKG_CONFIG pkg-config)"
+ myconf+=(GLIB_GENMARSHAL="$("${build_pkg_config}" --variable=glib_genmarshal glib-2.0)")
+ fi
+
econf "${myconf[@]}"
}
diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/Manifest b/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/Manifest
index 92177545e8..1c633be509 100644
--- a/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/Manifest
+++ b/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/Manifest
@@ -1 +1 @@
-DIST dbus-glib-0.110.tar.gz 836497 BLAKE2B d936402bbaa5c354b2730cbace273974ec0133db052503fea2780d70b128e50e4fdf54f6ebfeed024eb5602fa3725a40627e27320a4727647299f74b2eb75c85 SHA512 c40ccf7118d4951f0e09082216ccd26f21ee906bdf96d912611d3cd29badd7ef446bea74e19f26c28ebceb9e19bb659d11c643c3e712dac499df12907be88a54
+DIST dbus-glib-0.112.tar.gz 715340 BLAKE2B 24e1c222f0116b32c109682816f6c35771647f4c63cab93a6621bd68b71ea4dca62fbf9e6bb360386b8658146dbf34b0d7dc471db7525585412d120340c4c969 SHA512 7c9f393f065dfb3d698f35e6554caf15fe539f5dd52d2b2bb6ed1770e130f5dab8e45379232520301455bae9bb77e25a109faf175153fcd4b9dd11d7de4a546e
diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/dbus-glib-0.110-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/dbus-glib-0.112.ebuild
similarity index 55%
rename from sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/dbus-glib-0.110-r1.ebuild
rename to sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/dbus-glib-0.112.ebuild
index 2540e494ef..248dee046e 100644
--- a/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/dbus-glib-0.110-r1.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/dbus-glib-0.112.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit bash-completion-r1 eutils ltprune multilib-minimal
+EAPI=7
+
+inherit autotools bash-completion-r1 multilib-minimal toolchain-funcs
DESCRIPTION="D-Bus bindings for glib"
HOMEPAGE="https://dbus.freedesktop.org/"
@@ -10,29 +11,37 @@ SRC_URI="https://dbus.freedesktop.org/releases/${PN}/${P}.tar.gz"
LICENSE="|| ( GPL-2 AFL-2.1 )"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x86-solaris"
-IUSE="debug static-libs test cros_host"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="debug static-libs test"
RESTRICT="!test? ( test )"
-CDEPEND="
+DEPEND="
>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
>=dev-libs/glib-2.40:2[${MULTILIB_USEDEP}]
>=sys-apps/dbus-1.8[${MULTILIB_USEDEP}]
"
-DEPEND="${CDEPEND}
+RDEPEND="${DEPEND}"
+BDEPEND="
+ >=dev-libs/expat-2.1.0-r3
+ >=dev-libs/glib-2.40:2
+ >=sys-apps/dbus-1.8
>=dev-util/glib-utils-2.40
>=dev-util/gtk-doc-am-1.14
virtual/pkgconfig
-"
-RDEPEND="${CDEPEND}"
+" # CBUILD dependencies are needed to make a native tool while cross-compiling.
-DOCS=( AUTHORS ChangeLog HACKING NEWS README )
+DOCS=( AUTHORS CONTRIBUTING.md NEWS README )
set_TBD() {
# out of sources build dir for make check
export TBD="${BUILD_DIR}-tests"
}
+src_prepare() {
+ default
+ eautoreconf
+}
+
multilib_src_configure() {
local myconf=(
--localstatedir="${EPREFIX}"/var
@@ -42,9 +51,16 @@ multilib_src_configure() {
$(use_enable static-libs static)
)
- # Use host tool when building cross.
- if ! use cros_host; then
- myconf+=("--with-dbus-binding-tool=/usr/bin/dbus-binding-tool")
+ # Configure a CBUILD directory to make a native build tool.
+ if tc-is-cross-compiler; then
+ mkdir "${BUILD_DIR}-build" || die
+ cd "${BUILD_DIR}-build" || die
+ ECONF_SOURCE="${S}" econf_build
+ myconf+=( --with-dbus-binding-tool="$PWD/dbus/dbus-binding-tool" )
+ cd - || die
+ # Flatcar: override glib-genmarshal path
+ local build_pkg_config="$(tc-getBUILD_PROG PKG_CONFIG pkg-config)"
+ myconf+=(GLIB_GENMARSHAL="$("${build_pkg_config}" --variable=glib_genmarshal glib-2.0)")
fi
ECONF_SOURCE="${S}" econf "${myconf[@]}"
@@ -65,6 +81,8 @@ multilib_src_configure() {
}
multilib_src_compile() {
+ tc-is-cross-compiler && emake -C "${BUILD_DIR}-build"
+
emake
if use test; then
@@ -85,7 +103,7 @@ multilib_src_install_all() {
einstalldocs
newbashcomp "${ED}"/etc/bash_completion.d/dbus-bash-completion.sh dbus-send
- rm -rf "${ED}"/etc/bash_completion.d || die
+ rm -r "${ED}"/etc/bash_completion.d || die
- prune_libtool_files
+ find "${ED}" -type f -name '*.la' -delete || die
}
diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/metadata.xml b/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/metadata.xml
index 63e7905d8e..d73e5f1efb 100644
--- a/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/metadata.xml
+++ b/sdk_container/src/third_party/coreos-overlay/dev-libs/dbus-glib/metadata.xml
@@ -1,5 +1,5 @@
-
+
freedesktop-bugs@gentoo.org
diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use
index e59b90b6a9..5c63349b15 100644
--- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use
+++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/targets/generic/package.use
@@ -28,9 +28,6 @@ net-libs/libmicrohttpd epoll
sys-boot/syslinux -custom-cflags
-# break dependency loop between pkg-config and glib
-dev-util/pkgconfig internal-glib
-
# minimize risk removing unneeded patches and networking support
app-shells/bash -net vanilla
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild
index e2fb46fa05..659aa6409b 100644
--- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild
@@ -247,6 +247,10 @@ src_configure() {
multilib-minimal_src_configure
}
+get_rootprefix() {
+ usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr"
+}
+
multilib_src_configure() {
local myconf=(
--localstatedir="${EPREFIX}/var"
@@ -258,7 +262,7 @@ multilib_src_configure() {
# make sure we get /bin:/sbin in PATH
$(meson_use split-usr)
-Dsplit-bin=true
- -Drootprefix="$(usex split-usr "${EPREFIX:-/}" "${EPREFIX}/usr")"
+ -Drootprefix="$(get_rootprefix)"
-Drootlibdir="${EPREFIX}/usr/$(get_libdir)"
# Avoid infinite exec recursion, bug 642724
-Dtelinit-path="${EPREFIX}/lib/sysvinit/telinit"
@@ -500,18 +504,18 @@ multilib_src_install_all() {
# dropped it.
}
-builddir_systemd_enable_service() {
- (
- export SYSROOT="${ED}"
- systemd_enable_service "$@"
- )
+builddir_systemd_get_systemunitdir() {
+ echo "$(get_rootprefix)/lib/systemd/system"
}
-builddir_systemd_get_systemunitdir() {
- (
- export SYSROOT="${ED}"
- systemd_get_systemunitdir
- )
+builddir_systemd_enable_service() {
+ local target=${1}
+ local service=${2}
+ local ud=$(builddir_systemd_get_systemunitdir)
+ local destname=${service##*/}
+
+ dodir "${ud}"/"${target}".wants && \
+ dosym ../"${service}" "${ud}"/"${target}".wants/"${destname}"
}
migrate_locale() {
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-auth/sssd/sssd-2.3.1-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-auth/sssd/sssd-2.3.1-r3.ebuild
index cff3ef1eaa..b7edbb9742 100644
--- a/sdk_container/src/third_party/coreos-overlay/sys-auth/sssd/sssd-2.3.1-r3.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/sys-auth/sssd/sssd-2.3.1-r3.ebuild
@@ -195,6 +195,11 @@ multilib_src_configure() {
myconf+=(
--with-initscript="systemd"
--with-systemdunitdir=$(systemd_get_systemunitdir)
+ # Flatcar: Set the systemd system
+ # configuration directory explicitly through
+ # _systemd_get_dir, as it will do the right
+ # thing in cross-compilation environment.
+ --with-systemdconfdir=$(_systemd_get_dir systemdsystemconfdir /etc/systemd/system)
)
else
myconf+=(--with-initscript="sysv")
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/Manifest
new file mode 100644
index 0000000000..cd25843c27
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/Manifest
@@ -0,0 +1 @@
+DIST btrfs-progs-v5.10.1.tar.xz 2204164 BLAKE2B ed83729754f9abd22d4d2e7ae9a7e90e80be9b63d49a4a9692e20e5939467dbd864834b71495661e1c7a1fca89e253a62fbda37f1d01d2eadecb13f5904f0dd0 SHA512 32e5b8bda1863e34613802db91946f240b2cde21288ff8f95c1807e7afd0a67c5a704aa4d2bc0d7b1ca094de6831adbfec83fe61f74e1caf6d1975be7d972f2d
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/README.md b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/README.md
new file mode 100644
index 0000000000..1b8790d15d
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/README.md
@@ -0,0 +1,9 @@
+We forked this package to override the udev rules directory. The
+configure script does not provide a way to override it, so we need to
+hack it, otherwise the configure script will figure out the wrong path
+in our builds. We do it by overriding it in Makefile.inc.in. Also, we
+change the python versions, because we still have only python 3.6.
+
+Ideal solution here would be to patch btrfs-progs to allow overriding
+the udev path and then override it in the ebuild properly, without the
+sed hacks.
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild
new file mode 100644
index 0000000000..73632e785d
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/btrfs-progs-5.10.1-r1.ebuild
@@ -0,0 +1,131 @@
+# Copyright 2008-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Flatcar: We still have python 3.6 only.
+PYTHON_COMPAT=( python3_{6..9} )
+
+# Flatcar: Inherit udev eclass, so we can get the udev directory.
+inherit bash-completion-r1 python-single-r1 udev
+
+libbtrfs_soname=0
+
+if [[ ${PV} != 9999 ]]; then
+ MY_PV="v${PV/_/-}"
+ [[ "${PV}" = *_rc* ]] || \
+ KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~mips ppc ppc64 ~riscv ~sparc x86"
+ SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+else
+ WANT_LIBTOOL=none
+ inherit autotools git-r3
+ EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git"
+ EGIT_BRANCH="devel"
+fi
+
+DESCRIPTION="Btrfs filesystem utilities"
+HOMEPAGE="https://btrfs.wiki.kernel.org"
+
+LICENSE="GPL-2"
+SLOT="0/${libbtrfs_soname}"
+IUSE="+convert doc python reiserfs static static-libs +zstd"
+
+RESTRICT=test # tries to mount repared filesystems
+
+RDEPEND="
+ dev-libs/lzo:2=
+ sys-apps/util-linux:0=[static-libs(+)?]
+ sys-libs/zlib:0=
+ convert? (
+ sys-fs/e2fsprogs:=
+ reiserfs? (
+ >=sys-fs/reiserfsprogs-3.6.27
+ )
+ )
+ python? ( ${PYTHON_DEPS} )
+ zstd? ( app-arch/zstd:0= )
+"
+DEPEND="${RDEPEND}
+ convert? ( sys-apps/acl )
+ python? (
+ $(python_gen_cond_dep '
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ ')
+ )
+ static? (
+ dev-libs/lzo:2[static-libs(+)]
+ sys-apps/util-linux:0[static-libs(+)]
+ sys-libs/zlib:0[static-libs(+)]
+ convert? (
+ sys-fs/e2fsprogs[static-libs(+)]
+ reiserfs? (
+ >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)]
+ )
+ )
+ zstd? ( app-arch/zstd:0[static-libs(+)] )
+ )
+"
+BDEPEND="
+ doc? (
+ || ( >=app-text/asciidoc-8.6.0 dev-ruby/asciidoctor )
+ app-text/docbook-xml-dtd:4.5
+ app-text/xmlto
+ )
+"
+
+if [[ ${PV} == 9999 ]]; then
+ DEPEND+=" sys-devel/gnuconfig"
+fi
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+ if [[ ${PV} == 9999 ]]; then
+ AT_M4DIR=m4 eautoreconf
+ mkdir config || die
+ local automakedir="$(autotools_run_tool --at-output automake --print-libdir)"
+ [[ -e ${automakedir} ]] || die "Could not locate automake directory"
+ ln -s "${automakedir}"/install-sh config/install-sh || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die
+ ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die
+ fi
+ # Flatcar: Replace udevdir variable with proper udev directory.
+ sed -i -e 's#^\(udevdir\s\+=\).*#\1 $(get_udevdir)#' Makefile.inc.in
+}
+
+src_configure() {
+ local myeconfargs=(
+ --bindir="${EPREFIX}"/sbin
+ $(use_enable convert)
+ $(use_enable doc documentation)
+ $(use_enable elibc_glibc backtrace)
+ $(use_enable python)
+ $(use_enable static-libs static)
+ $(use_enable zstd)
+ --with-convert=ext2$(usex reiserfs ',reiserfs' '')
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ emake V=1 all $(usev static)
+}
+
+src_install() {
+ local makeargs=(
+ $(usex python install_python '')
+ $(usex static install-static '')
+ )
+ emake V=1 DESTDIR="${D}" install "${makeargs[@]}"
+ newbashcomp btrfs-completion btrfs
+ use python && python_optimize
+
+ # install prebuilt subset of manuals
+ use doc || doman Documentation/*.[58]
+}
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/metadata.xml
new file mode 100644
index 0000000000..53a0e4c3fe
--- /dev/null
+++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/btrfs-progs/metadata.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ base-system@gentoo.org
+ Gentoo Base System
+
+
+
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md
index cfb0a6ca81..379916ebf0 100644
--- a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md
+++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/README.md
@@ -13,3 +13,8 @@ systemd[1]: lvm2-activation-early.service: Failed with result 'start-limit-hit'.
Set RemainAfterExit=yes as done for the other oneshot services to
prevent the unit from running multiple times in a row and hitting the
restart limit.
+
+
+
+We also patch the configure script to use the correct path for systemd
+util directory.
diff --git a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild
index fde27a9249..4a646e65df 100644
--- a/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild
+++ b/sdk_container/src/third_party/coreos-overlay/sys-fs/lvm2/lvm2-2.02.188-r2.ebuild
@@ -123,6 +123,13 @@ src_prepare() {
sed -i -e 's/^\(MAN7+=.*\) $(LVMTHINMAN) \(.*\)$/\1 \2/' man/Makefile.in || die
fi
+ # Flatcar: The configure script tries to detect the systemd
+ # util dir without providing a way for us to override it, so
+ # modify the script.
+ sed -i \
+ -e "s#^\(systemdutildir=\).*#\1$(systemd_get_utildir)#" \
+ configure{.ac,} || die
+
eautoreconf
}