RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1337743 - Having something mounted on /mnt makes filesystem updated rpm fail to install
Summary: Having something mounted on /mnt makes filesystem updated rpm fail to install
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rpm
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florian Festi
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-20 00:45 UTC by lindahl
Modified: 2016-06-09 14:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-09 14:58:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lindahl 2016-05-20 00:45:01 UTC
Description of problem:

I happen to have something mounted on /mnt. When I tried to yum update the filesystem package failed to update with an error.

(I actually have centos, but this smells like a bug in rhel.)

How reproducible: 100%

Steps to Reproduce:

<mount something on /mnt, mine was a read-only loopback mount of a full filesystem>
...
yum -y update
...
Error unpacking rpm package filesystem-3.2-20.el7.x86_64
error: unpacking of archive failed on file /mnt: cpio: lsetfilecon
...
umount /mnt
yum -y update
<works>

You shouldn't have a hardwired /mnt in there!

Comment 2 Ondrej Vasik 2016-05-20 06:53:45 UTC
Thanks for report - definitely worth investigation. Issues with filesystem updates usually happen when something modifies permissions on the affected directory. I'll try to reproduce this based on your steps to reproduce, if not succesful, will ask for more detailed step-by-step description of your reproducer.

Comment 3 Ondrej Vasik 2016-05-20 12:40:10 UTC
Can't reproduce on my machine with the provided reproducer...
$ mount | grep mnt
/mnt/blob on /mnt/mnt type ext2 (ro,relatime,seclabel)
and reinstall of the filesystem package just works. 

Can you please check:
1) rpm -V filesystem
2) provide step by step reproducer (at least more detailed information, so I can find some differences in the scenario...

Thanks in advance!

Comment 4 Ondrej Vasik 2016-05-20 13:03:41 UTC
ah - I seem to understand now ... you mount things directly to /mnt as readonly ... but this is definitely wrong way - you should have subdir for mounting mounts...
If this is the case, filesystem package is innocent here - as you modify the permissions on the /mnt dir owned by filesystem. Therefore, update of filesystem package will fail - but this is not a bug in filesystem package, more flaw in your concept of mounting temporary mounts.

Comment 5 lindahl 2016-05-20 15:43:27 UTC
Yes, I mounted it on /mnt. This was OK for a few decades, and if you look at google for advice on mounting things loopback, you'll see quite a few examples of mounting directly on /mnt.

So sure, not a bug for someone who understands how the filesystem package works. What about the other 99%?

Comment 6 Ondrej Vasik 2016-05-23 04:31:00 UTC
Ok, if it was ok for few decades, you can blame rpm for being more strict, as there is no change in the filesystem package /mnt directory ownership in RHEL 7.

I'll reassign that to rpm, so they are aware of the impact of "being more strict" about dir conflicts. This caused similar issue with google-maps package in Fedora (as their package is poorly packaged and owns /usr with different permissions than filesystem package). I think this is really NOTABUG, but let's keep it on rpm guys.

Comment 7 Florian Festi 2016-06-09 14:58:12 UTC
There is not really a good way to deal with this from an RPM POV. RPM feaking out when not being able to lay down files properly is the right thing IMHO.

RPM offers a way to deal with RO mounted parts of the file system in /usr/lib/rpm/macros:

#       A colon separated list of paths where files should *not* be installed.
#       Usually, these are network file system mount points.
#
#%_netsharedpath

May be adding /mnt solves this for some use cases. Closing.


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