-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transaction: Add HIF_TRANSACTION_FLAG_OSTREE_MODE #39
Closed
cgwalters
wants to merge
1
commit into
rpm-software-management:master
from
cgwalters:transaction-ostree-mode
Closed
transaction: Add HIF_TRANSACTION_FLAG_OSTREE_MODE #39
cgwalters
wants to merge
1
commit into
rpm-software-management:master
from
cgwalters:transaction-ostree-mode
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The goal of this patch is to help support rpm-ostree package layering. The way this works is that we unpack layered packages on top of a new *hardlinked* tree. However, if any packages had scriptlets that mutate a file in place (as opposed to make-new-then-rename), that would corrupt the object store and potentially break rollback. It turns out that *most* scripts in Fedora are safe, but ultimately the way I think this should work is that only scripts in e.g. /usr/share/rpm/scriptlets which are known verified safe can be run. Anyways, if set, HIF_TRANSACTION_FLAG_OSTREE_MODE does basically two things: - Verifies before installing a package (while we have it open for GPG checks) that a package has no scripts - Disables all scripts in the RPM transaction We can't just do the latter as that would allow installing packages that didn't work (e.g. shared libraries without running ldconfig).
cgwalters
force-pushed
the
transaction-ostree-mode
branch
from
February 12, 2015 19:19
56b478b
to
4b15056
Compare
(Updated to fix regression with GPG checking) |
The intertia around the whole ecosystem is so powerful here that I've put this approach on hold, and am now planning to do coreos/rpm-ostree#107 (comment) So let's close this for now without merging, if we decide to do it later, the code will still be here. |
cgwalters
added a commit
to cgwalters/rpm-ostree
that referenced
this pull request
Jun 9, 2016
This is bringing forward an old PR for libhif: rpm-software-management/libdnf#39 Right now, we aren't running `%post` or any of the other variants. A lot of packages will work if we just ignore `%post`, others won't. Let's be conservative until we start running them, and don't imply we support things we don't yet.
cgwalters
added a commit
to cgwalters/rpm-ostree
that referenced
this pull request
Jun 13, 2016
This is bringing forward an old PR for libhif: rpm-software-management/libdnf#39 Right now, we aren't running `%post` or any of the other variants. A lot of packages will work if we just ignore `%post`, others won't. Let's be conservative until we start running them, and don't imply we support things we don't yet.
rh-atomic-bot
pushed a commit
to coreos/rpm-ostree
that referenced
this pull request
Jun 14, 2016
This is bringing forward an old PR for libhif: rpm-software-management/libdnf#39 Right now, we aren't running `%post` or any of the other variants. A lot of packages will work if we just ignore `%post`, others won't. Let's be conservative until we start running them, and don't imply we support things we don't yet. Closes: #311 Approved by: jlebon
rh-atomic-bot
pushed a commit
to coreos/rpm-ostree
that referenced
this pull request
Jun 14, 2016
This is bringing forward an old PR for libhif: rpm-software-management/libdnf#39 Right now, we aren't running `%post` or any of the other variants. A lot of packages will work if we just ignore `%post`, others won't. Let's be conservative until we start running them, and don't imply we support things we don't yet. Closes: #311 Approved by: jlebon
rh-atomic-bot
pushed a commit
to coreos/rpm-ostree
that referenced
this pull request
Jun 14, 2016
This is bringing forward an old PR for libhif: rpm-software-management/libdnf#39 Right now, we aren't running `%post` or any of the other variants. A lot of packages will work if we just ignore `%post`, others won't. Let's be conservative until we start running them, and don't imply we support things we don't yet. Closes: #311 Approved by: jlebon
rh-atomic-bot
pushed a commit
to coreos/rpm-ostree
that referenced
this pull request
Jun 15, 2016
This is bringing forward an old PR for libhif: rpm-software-management/libdnf#39 Right now, we aren't running `%post` or any of the other variants. A lot of packages will work if we just ignore `%post`, others won't. Let's be conservative until we start running them, and don't imply we support things we don't yet. Closes: #311 Approved by: jlebon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal of this patch is to help support rpm-ostree package layering.
The way this works is that we unpack layered packages on top of a new
hardlinked tree. However, if any packages had scriptlets that
mutate a file in place (as opposed to make-new-then-rename), that
would corrupt the object store and potentially break rollback.
It turns out that most scripts in Fedora are safe, but ultimately
the way I think this should work is that only scripts in e.g.
/usr/share/rpm/scriptlets
which are known verified safe can be run.
Anyways, if set, HIF_TRANSACTION_FLAG_OSTREE_MODE does basically two things:
that a package has no scripts
We can't just do the latter as that would allow installing packages
that didn't work (e.g. shared libraries without running ldconfig).