Skip to content

Commit

Permalink
cmdlib.sh: Switch to using OSTree layers for overlay/
Browse files Browse the repository at this point in the history
So now that we have OSTree layer capabilities in rpm-ostree
(coreos/rpm-ostree#1830), I think it
makes more sense overall to make the overlay an OSTree layer.

The fact that it *is* an RPM, but differs from all the other RPMs in
various ways will (and already has) come up multiple times when we talk
about signing, changelogs, lockfiles, overrides, etc... (See [1] and [2]
for some already filed issues). Switching to an OSTree layer sidesteps
many of those issues.

Of course, we do lose some things from moving away from RPM:
1. it's harder to determine from where the overlay files come from on a
   host system (see [3] related to this)
2. invisible to `rpm-ostree db diff` (but then again, the diff we
   currently get isn't helpful)
3. not possible to issue an advisory for it to be consumed like the rest
   of the advisories (though with the current approach, making use of
   this without going through Bodhi would've required some non-trivial
   amount of work too)

Overall though, I think those are things we could (and should strive to)
fix in rpm-ostree rather than avoiding layers entirely.

[1] coreos#544
[2] coreos#553 (comment)
[3] coreos/rpm-ostree#1789
  • Loading branch information
jlebon committed Jun 12, 2019
1 parent 0a98946 commit 7f879c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 59 deletions.
55 changes: 0 additions & 55 deletions src/build_rpm_from_dir

This file was deleted.

8 changes: 4 additions & 4 deletions src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ EOF
echo 'ref: "'"${ref}"'"' >> "${override_manifest}"
fi
if [ -d "${configdir}/overlay" ]; then
echo -n "Committing ${configdir}/overlay... "
ostree commit --repo="${tmprepo}" --tree=dir="${configdir}/overlay" -b "${name}-overlay" \
--owner-uid 0 --owner-gid 0 --no-xattrs --no-bindings --parent=none
cat >> "${override_manifest}" <<EOF
packages:
ostree-layers:
- ${name}-overlay
EOF
mkdir -p "${overridesdir}"/rpm
mkdir tmp/overlay-build
(cd tmp/overlay-build && "${DIR}"/build_rpm_from_dir "${configdir}/overlay" "${name}-overlay" "${workdir}/overrides/rpm")
fi
if [[ -n $(ls "${overridesdir}/rpm/"*.rpm 2> /dev/null) ]]; then
(cd "${overridesdir}"/rpm && createrepo_c .)
Expand Down

0 comments on commit 7f879c2

Please sign in to comment.