Bug 984643 - allow idmap-plugin symlink to be managed by the "alternatives" system
allow idmap-plugin symlink to be managed by the "alternatives" system
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cifs-utils (Show other bugs)
7.0
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Sachin Prabhu
Chao Ye
:
Depends On: 984088
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-15 11:32 EDT by Jeff Layton
Modified: 2014-06-18 03:43 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 984088
Environment:
Last Closed: 2014-06-13 06:40:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Layton 2013-07-15 11:32:17 EDT
+++ This bug was initially created as a clone of Bug #984088 +++

Currently cifs-utils tracks what plugin to use via a symlink in /etc/cifs-utils. We already have another facility for these sorts of symlinks in /etc/alternatives. Change it to use a symlink in that directory instead.

--- Additional comment from Jeff Layton on 2013-07-15 09:32:10 EDT ---

Ok, slight difference here...

The alternatives system relies on double-indirection, so we basically need to change /etc/cifs-utils/idmap-plugin to an "alternative" (a symlink that points into /etc/alternatives). The "alternatives" command takes care of the rest.

The only tricky part is that the old idmap-plugin is listed as a %config(noreplace) in the old package. So we need to change that to a %ghost directive to make sure the removal of the old package doesn't remove the symlink created in the %post script by the alternatives command.

I'll hopefully have this fixed in rawhide today...

--- Additional comment from Jeff Layton on 2013-07-15 09:40:31 EDT ---

Ok, new package pushed to rawhide and it seems to do the right thing. Closing with resolution of RAWHIDE.
Comment 2 Jeff Layton 2013-07-17 08:29:40 EDT
Fixed in cifs-utils-6.1-3.el7
Comment 4 Jian Li 2014-01-01 22:10:31 EST
Verified on cifs-utils-6.2-4.el7.x86_64, it use alternative systems

[root@hp-dl388g8-18 rpms]# rpm -q cifs-utils 
cifs-utils-6.2-4.el7.x86_64
[root@hp-dl388g8-18 rpms]# ls -l /etc/alternatives/cifs-idmap-plugin  /etc/cifs-utils/idmap-plugin  -l 
lrwxrwxrwx. 1 root root 32 Jan  1 22:03 /etc/alternatives/cifs-idmap-plugin -> /usr/lib64/cifs-utils/idmapwb.so
lrwxrwxrwx. 1 root root 35 Jan  1 22:03 /etc/cifs-utils/idmap-plugin -> /etc/alternatives/cifs-idmap-plugin

Check cifs-utils-6.0-1.el7, it doesn't use alternative

[root@hp-dl388g8-18 rpms]# ls -l /etc/alternatives/cifs-idmap-plugin  /etc/cifs-utils/idmap-plugin  -l 
ls: cannot access /etc/alternatives/cifs-idmap-plugin: No such file or directory
lrwxrwxrwx. 1 root root 32 Jan  1 22:08 /etc/cifs-utils/idmap-plugin -> /usr/lib64/cifs-utils/idmapwb.so
[root@hp-dl388g8-18 rpms]# rpm -q cifs-utils 
cifs-utils-6.0-1.el7.x86_64
Comment 6 Ludek Smid 2014-06-13 06:40:07 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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