Bug 1415451 - fish fails to install during %post in Fedora 25 Atomic Host
Summary: fish fails to install during %post in Fedora 25 Atomic Host
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: fish
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Andy Lutomirski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1352154
TreeView+ depends on / blocked
 
Reported: 2017-01-22 07:17 UTC by Andrew Toskin
Modified: 2019-05-28 19:05 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 19:05:51 UTC


Attachments (Terms of Use)

Description Andrew Toskin 2017-01-22 07:17:19 UTC
I'm trying out the Atomic Host edition of Fedora 25, and just starting to acquaint myself with the new tools, so please let me know if I'm making a dumb mistake here...

I previously installed Nginx and a couple other applications. Nginx seems to work as it should, though for some reason I continue to see messages printed about it whenever I do other rpm-ostree operations. However, I got an *error* when I tried to install fish:

↪  sudo rpm-ostree install fish

Checking out tree cec64bd... done

Downloading metadata: [=================================================================] 100%
Resolving dependencies... done
Will download: 1 package (1.6 MB)

  Downloading from fedora: [============================================================] 100%

Importing: [============================================================================] 100%
Overlaying... done
Running %prein for nginx-filesystem...... done
Running %post for bc...... done
Running %post for fish...... error: Running %post for fish: Executing bwrap: Child process exited with code 1


"Running %post for fish" sounds to me like it's failing during the %post section of the package's RPM spec file. But fish installs without issue using dnf on my desktop. So I guess this means there's an issue with the spec file and how rpm-ostree handles packages compared to dnf?

I'm running Fedora 25 Atomic in virt-manager. Let me know how I can provide any other debugging information that would help.

Comment 1 Andy Lutomirski 2017-01-23 18:21:08 UTC
This should work if I understand ostree correctly.  The %post scriptlet writes to sysconfdir, but that should be okay, I think.  Given that the error comes from bwrap, I'm assuming that this is an rpm-ostree bug.

Feel free to assign back to fish if there's something that fish could do better.

Comment 2 Colin Walters 2017-01-23 18:26:27 UTC
This is another instance of https://bugzilla.redhat.com/show_bug.cgi?id=1367587 but for fish.

Comment 3 Colin Walters 2017-01-23 18:27:37 UTC
Andy, see https://bugzilla.redhat.com/show_bug.cgi?id=1352154#c0 for more information.

Comment 4 Andy Lutomirski 2017-01-23 18:43:36 UTC
I suppose I could work around this in fish, but: could rofiles-fuse learn about O_APPEND?  The current scriptlet in fish follows the packaging guideline's recommendation (or at least it did) and works more or less atomically.

Also, will %postun have the same problem?

Comment 5 Colin Walters 2017-01-23 18:48:30 UTC
I think with O_APPEND one could still get corrupted config files if interrupted halfway, and obviously a corrupted /etc/shells would be bad.  So it's just general best practice to do the "atomic file replace" pattern.

I'll see about getting the guidelines changed.

As far as %postun - rpm-ostree doesn't run them and likely never will.  Removing a package is constructing a new tree where that package isn't present.  In general, a major goal of rpm-ostree is to be anti-hysteresis <https://en.wikipedia.org/wiki/Hysteresis>

Comment 6 Andy Lutomirski 2017-01-23 19:22:04 UTC
I think I disagree for technical reasons.

For atomic-file-replace, the scriptlet will do, roughly:

cp /etc/shells /tmp/foo
echo whatever >>/tmp/foo
mv -f /tmp/foo /etc/shells

With O_APPEND support, that would change to:

open("/etc/shells", O_APPEND | ...);
# The FUSE helper copies the file and returns a writable fd
write(...);

In either case, if a different process writes to the file in between the copy and the replace, that write will get lost.  If nothing else writes to the file, everything is fine.  As a practical matter, the actual behavior should be essentially identical in both variants.

Comment 7 Andy Lutomirski 2017-01-23 19:26:31 UTC
Also, actually making the change to the scriptlet seems likely to be a bit of a pain.  I would want to make sure that, on non-ostree systems, the mode, label, etc of /etc/shells isn't changed by the scriptlet.  This is a bit awkward.

Comment 8 Colin Walters 2017-01-23 19:27:39 UTC
I completely agree that we could make that change in rofiles-fuse.  In fact, that would take us farther down the "more like overlayfs" path.

But if you look at the evolution of overlayfs, there are some really awful hacks there due to it doing in kernel space what IMO is clearly better done in userspace.

See e.g. http://marc.info/?l=linux-fsdevel&m=148458878412049&w=2

Comment 9 Colin Walters 2017-01-23 19:55:53 UTC
(FTR, I'd like to not rely on FUSE either, but rather have http://www.spinics.net/lists/linux-fsdevel/msg75085.html )

Comment 10 Fedora End Of Life 2017-11-16 18:39:11 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 11 Fedora End Of Life 2017-12-12 10:48:16 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Colin Walters 2017-12-12 14:39:06 UTC
Still applicable with F27.

Comment 13 Fedora End Of Life 2018-02-20 15:22:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 14 Ben Cotton 2019-05-02 19:18:16 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 15 Ben Cotton 2019-05-02 22:08:20 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 16 Andrew Toskin 2019-05-09 01:12:46 UTC
I never tested this in Fedora 29 (the last OSTree-based release to still be called Atomic Host), but `sudo rpm-ostree install fish` works fine for me in a virtual machine of Fedora 30 Silverblue.

Comment 17 Ben Cotton 2019-05-28 19:05:51 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.