Bug 437613 - fileconflict
fileconflict
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gridengine (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Orion Poplawski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-15 05:21 EDT by Denise Dumas
Modified: 2008-06-05 16:24 EDT (History)
1 user (show)

See Also:
Fixed In Version: 6.1u3-7.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-05 16:24:27 EDT
Type: ---
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 Florian La Roche 2008-03-15 05:21:06 EDT
Description of problem:

fileconflict for /usr/share/man/man1/qalter.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm
fileconflict for /usr/share/man/man1/qdel.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm
fileconflict for /usr/share/man/man1/qhold.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm
fileconflict for /usr/share/man/man1/qrls.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm
fileconflict for /usr/share/man/man1/qselect.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm
fileconflict for /usr/share/man/man1/qstat.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm
fileconflict for /usr/share/man/man1/qsub.1.gz in
gridengine-6.1u3-6.fc9.i386.rpm and torque-docs-2.1.10-5.fc9.i386.rpm


regards,

Florian La Roche


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Orion Poplawski 2008-03-18 16:57:34 EDT
And:

  file /usr/bin/qalter from install of torque-client-2.1.10-1.fc8.i386 conflicts
with file from package gridengine-6.1u3-6.fc8.i386
  file /usr/bin/qdel from install of torque-client-2.1.10-1.fc8.i386 conflicts
with file from package gridengine-6.1u3-6.fc8.i386
  file /usr/bin/qhold from install of torque-client-2.1.10-1.fc8.i386 conflicts
with file from package gridengine-6.1u3-6.fc8.i386
  file /usr/bin/qrls from install of torque-client-2.1.10-1.fc8.i386 conflicts
with file from package gridengine-6.1u3-6.fc8.i386
  file /usr/bin/qselect from install of torque-client-2.1.10-1.fc8.i386
conflicts with file from package gridengine-6.1u3-6.fc8.i386
  file /usr/bin/qstat from install of torque-client-2.1.10-1.fc8.i386 conflicts
with file from package gridengine-6.1u3-6.fc8.i386
  file /usr/bin/qsub from install of torque-client-2.1.10-1.fc8.i386 conflicts
with file from package gridengine-6.1u3-6.fc8.i386


This is unsurprising since both gridengine and torque provide a queuing system.

I suppose the thing to do is to use alternatives.

Here's what I suggest:

%install
# Rename common queuing binaries and manpages for use with alternatives
for bin in qalter qdel qhold qrls qselect qstat qsub
do
    mv $RPM_BUILD_ROOT%{_bindir}/$bin $RPM_BUILD_ROOT%{_bindir}/${bin}-ge
    mv $RPM_BUILD_ROOT%{_mandir}/${bin}.1.gz \
       $RPM_BUILD_ROOT%{_mandir}/${bin}-ge.1.gz
done

%post
alternatives --install %{_bindir}/qsub qsub %{_bindir}/qsub-ge 10 \
        --slave %{_mandir}/man1/qsub.1.gz qsub-man \
                %{_mandir}/man/man1/qsub-ge.1.gz \
        --slave %{_bindir}/qalter qalter %{_bindir}/qalter-ge \
        --slave %{_mandir}/man1/qalter.1.gz qalter-man \
                %{_mandir}/man/man1/qalter-ge.1.gz \
        --slave %{_bindir}/qdel qdel %{_bindir}/qdel-ge \
        --slave %{_mandir}/man1/qdel.1.gz qdel-man \
                %{_mandir}/man/man1/qdel-ge.1.gz \
        --slave %{_bindir}/qhold qhold %{_bindir}/qhold-ge \
        --slave %{_mandir}/man1/qhold.1.gz qhold-man \
                %{_mandir}/man/man1/qhold-ge.1.gz \
        --slave %{_bindir}/qrls qrls %{_bindir}/qrls-ge \
        --slave %{_mandir}/man1/qrls.1.gz qrls-man \
                %{_mandir}/man/man1/qrls-ge.1.gz \
        --slave %{_bindir}/qselect qselect %{_bindir}/qselect-ge \
        --slave %{_mandir}/man1/qselect.1.gz qselect-man \
                %{_mandir}/man/man1/qselect-ge.1.gz \
        --slave %{_bindir}/qstat qstat %{_bindir}/qstat-ge \
        --slave %{_mandir}/man1/qstat.1.gz qstat-man \
                %{_mandir}/man/man1/qstat-ge.1.gz \

%preun
alternatives --remove qsub %{_bindir}/qsub


torque could use similar - qsub-torque.  

Garrick - what are your thoughts?

Comment 2 Orion Poplawski 2008-03-18 19:05:27 EDT
Fixed up changes:

%install
# Rename common queuing binaries and manpages for use with alternatives
for bin in qalter qdel qhold qrls qselect qstat qsub
do
    if [ -L $RPM_BUILD_ROOT%{_bindir}/$bin ]
    then
        target=`readlink $RPM_BUILD_ROOT%{_bindir}/$bin`
        rm $RPM_BUILD_ROOT%{_bindir}/$bin
        ln -s ${target}-ge $RPM_BUILD_ROOT%{_bindir}/${bin}-ge
    else
        mv $RPM_BUILD_ROOT%{_bindir}/$bin $RPM_BUILD_ROOT%{_bindir}/${bin}-ge
    fi
    mv $RPM_BUILD_ROOT%{_mandir}/man1/${bin}.1 \
       $RPM_BUILD_ROOT%{_mandir}/man1/${bin}-ge.1
done

%post
alternatives --install %{_bindir}/qsub qsub %{_bindir}/qsub-ge 10 \
        --slave %{_mandir}/man1/qsub.1.gz qsub-man \
                %{_mandir}/man1/qsub-ge.1.gz \
        --slave %{_bindir}/qalter qalter %{_bindir}/qalter-ge \
        --slave %{_mandir}/man1/qalter.1.gz qalter-man \
                %{_mandir}/man1/qalter-ge.1.gz \
        --slave %{_bindir}/qdel qdel %{_bindir}/qdel-ge \
        --slave %{_mandir}/man1/qdel.1.gz qdel-man \
                %{_mandir}/man1/qdel-ge.1.gz \
        --slave %{_bindir}/qhold qhold %{_bindir}/qhold-ge \
        --slave %{_mandir}/man1/qhold.1.gz qhold-man \
                %{_mandir}/man1/qhold-ge.1.gz \
        --slave %{_bindir}/qrls qrls %{_bindir}/qrls-ge \
        --slave %{_mandir}/man1/qrls.1.gz qrls-man \
                %{_mandir}/man1/qrls-ge.1.gz \
        --slave %{_bindir}/qselect qselect %{_bindir}/qselect-ge \
        --slave %{_mandir}/man1/qselect.1.gz qselect-man \
                %{_mandir}/man1/qselect-ge.1.gz \
        --slave %{_bindir}/qstat qstat %{_bindir}/qstat-ge \
        --slave %{_mandir}/man1/qstat.1.gz qstat-man \
                %{_mandir}/man1/qstat-ge.1.gz
Comment 3 Garrick Staples 2008-03-25 00:30:59 EDT
Is the goal to be able to actually install and use both?  I doubt that anyone
would actually use both systems at the same time.  Or is the goal to just
satisfy a meta-requirement of not having conflicts?

I also wonder about the exact list of commands to manage under alternatives. 
This is the POSIX 1003.2d list:
qalter
qdel
qhold
qmove
qmsg
qrerun
qrls
qselect
qsig
qstat
qsub
 

TORQUE has other commands that start with q:
qdisable
qenable
qmgr
qorder
qrun
qstart
qstop
qterm

Will gridengine be adding qmove, qmsg, qrerun, and qsig commands?

Another concern is the entirely unrelated 'qstat' package that tracks quake (and
others) game servers.  I'm a bit biased against qstat because I think they are
violating POSIX.
Comment 4 Garrick Staples 2008-03-25 02:06:19 EDT
I can't figure out how to add alternatives to torque without breaking updates. 
No matter what I do, the symlinks in /usr/bin don't exist after the update
transaction.

Since the new package doesn't own, for example, /usr/bin/qsub, and the old
package does, rpm removes the symlinks installed by alternatives.
Comment 5 Orion Poplawski 2008-03-27 15:49:42 EDT
The goal should be to be able to install and use both.  I'm not sure why anyone
would want to, but it should be technically feasible.  There is also a Fedora
guideline that packages should not conflict with other packages
(http://fedoraproject.org/wiki/Packaging/Conflicts).  

Florian - why are you trying to install both?

I imagine all of the POSIX 1003.2d commands should be managed via alternatives.

Not sure why you are having trouble with torque and alternatives.  If you run
the alternatives command by hand, what happens?  Do you have a test srpm somewhere?
Comment 6 Garrick Staples 2008-03-27 16:24:24 EDT
(In reply to comment #5)
> Not sure why you are having trouble with torque and alternatives.  If you run
> the alternatives command by hand, what happens?  Do you have a test srpm
somewhere?

Running alternatives by hand works fine. The problem is upgrading from existing
non-alternatives torque packages to new packages with alternatives.  The upgrade
occurs as follows (using /usr/bin/qsub as example)

/usr/bin/qsub exists and is owned by torque-1
torque-2 files are installed (/usr/bin/qsub not owned by torque-2)
torque-2 %post runs alternatives (installing /usr/bin/qsub symlink)
torque-1 cleanup removes /usr/bin/qsub

I can't come up with a way to construct new torque package such that the
symlinks actually exist after the upgrade transaction.

http://gs.speculation.org/~garrick/torque-2.1.10-6.fc9.src.rpm
Comment 8 Orion Poplawski 2008-03-31 13:57:39 EDT
Solution is to use %posttrans instead of %post (in rpm 4.4 and later - not in EL-4).
Comment 9 Orion Poplawski 2008-04-01 15:13:15 EDT
Fixed for gridengine in 6.1u3-7.fc9.
Comment 10 Garrick Staples 2008-04-17 01:22:26 EDT
I just looked at the gridengine spec file.  Don't you need to wrap %preun?

I'm doing this in torque.spec:
%preun client
if [ $1 -eq 0 ]; then
  /usr/sbin/alternatives --remove qsub %{_bindir}/qsub-torque
fi
Comment 11 Garrick Staples 2008-04-17 01:37:57 EDT
torque-2.1.10-6.fc9 is building now.  Please review.
Comment 12 Orion Poplawski 2008-04-29 16:08:12 EDT
Looks good to me.  Let's get this tagged for F-9 since the gridengine changes
are in there already.  Can you email rel-eng@fedoraproject.org?  Thanks!
Comment 13 Bug Zapper 2008-05-14 02:05:08 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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