diff --git a/entrypoint.sh b/entrypoint.sh index f4e3ad05..3bd45d1d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -71,6 +71,12 @@ commit_id="$( <${dir}/meta.json jq -r '."ostree-commit"' )" mkdir /srv/repo curl -L "${tar_url}" | tar xf - -C /srv/repo/ --no-same-owner +# Remove all refs except ${REF} so that bootstrap pivot would not be confused +set -x +ostree --repo=/srv/repo refs | grep -v "${REF}" | xargs -n1 ostree --repo=/srv/repo refs --delete +ostree --repo=/srv/repo refs +exit 1 + # use repos from FCOS rm -rf /etc/yum.repos.d ostree --repo=/srv/repo checkout "${REF}" --subpath /usr/etc/yum.repos.d --user-mode /etc/yum.repos.d @@ -119,3 +125,5 @@ cp -rvf /srv/addons/* /tmp/working/ # build new commit coreos-assembler dev-overlay --repo /srv/repo --rev "${REF}" --add-tree /tmp/working --output-ref "${REF}" +ostree --repo=/srv/repo refs +exit 1 diff --git a/overlay/usr/lib/tmpfiles.d/etc.conf b/overlay/usr/lib/tmpfiles.d/etc.conf new file mode 100644 index 00000000..9b1b252c --- /dev/null +++ b/overlay/usr/lib/tmpfiles.d/etc.conf @@ -0,0 +1,12 @@ + # This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# See tmpfiles.d(5) for details +L /etc/os-release - - - - ../usr/lib/os-release +L+ /etc/mtab - - - - ../proc/self/mounts +C! /etc/nsswitch.conf - - - - +C! /etc/pam.d - - - - +C! /etc/issue - - - -