Bug 143836

Summary: libselinux .spec file causes error during rpm or yum install
Product: [Fedora] Fedora Reporter: Mickey Stein <yekkim>
Component: libselinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: sundaram
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 1.19.4-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-04 23:30:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Updates the .spec file of the source rpm (libselinux-1.19.3-3.src.rpm) none

Description Mickey Stein 2004-12-29 17:11:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041109 Firefox/1.0

Description of problem:
The following error is generated by this command:

$ yum update libselinux libselinux-devel

---

Repository development already added, not adding again
Repository updates-released already added, not adding again
Repository base already added, not adding again
Setting up Update Process
Setting up Repo:  development
repomd.xml                100% |=========================| 1.1 kB    00:00
Setting up Repo:  base
repomd.xml                100% |=========================| 1.1 kB    00:00
Setting up Repo:  updates-released
repomd.xml                100% |=========================|  951 B    00:00
Reading repository metadata in from local files
developmen: ################################################## 3643/3643
base      : ################################################## 2622/2622
updates-re: ################################################## 408/408
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package libselinux.i386 0:1.19.3-3 set to be updated
---> Package libselinux-devel.i386 0:1.19.3-3 set to be updated
--> Running transaction check
--> Processing Dependency: libselinux = %{epoch}:1.19.3-3 for package:
libselinu
x-devel
Traceback (most recent call last):
  File "/usr/bin/yum", line 7, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 104, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 219,
in buildTra
nsaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 187,
in resolveD
eps
    (checkdep, missing, conflict, errormsgs) = self._processReq(dep)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 271,
in _process
Req
    CheckDeps, missingdep =
self._requiringFromTransaction(requiringPkg, require
mentTuple, errormsgs)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 420,
in _requiri
ngFromTransaction
    provSack = self.whatProvides(needname, needflags, needversion)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 65, in
whatProvi
des
    (r_e, r_v, r_r) = rpmUtils.miscutils.stringToVersion(version)
  File "/usr/lib/python2.4/site-packages/rpmUtils/miscutils.py", line
307, in st
ringToVersion
    epoch = string.atol(verstring[:i])
  File "/usr/lib/python2.4/string.py", line 419, in atol
    return _long(s, base)
ValueError: invalid literal for long(): %{epoch}

----end of error text -----

Without knowing the reason why this line of the .src.rpm specfile is
at fault, it appears to be the culprit:

Requires: libselinux = %{epoch}:%{version}-%{release}

So I changed it to a simpler (maybe older) version as follows:

Requires: libselinux = %{version}

----

Patch attached for the .spec file in the .src.rpm. 

All comments appreciated. I'd be curious to know the intent of the
'epoch' part of the original specfile. I've not been able to figure it
out yet nor whether what I did changed the intent, but it installs
without trouble after the change. 

Mick



Version-Release number of selected component (if applicable):
libselinux-1.19.3-3 libselinux-devel-1.19.3-3

How reproducible:
Always

Steps to Reproduce:
1. yum install(or update) libsel* (on the rawhide tree)
2. or -- rpm -Uvh libsel*.rpm (where they're manually taken from the
rawhide tree of today (29-Dec)
3.
    

Actual Results:  The error is in the bug description

Expected Results:  Successful install.

Additional info:

This is a fedora rawhide system completely up to date as of 29-Dec.
Kernel is 2.6.10-bk2.

Comment 1 Daniel Walsh 2004-12-29 17:13:10 UTC
Fixed in libselinux-1.19.4-1

Comment 2 Mickey Stein 2004-12-29 17:16:48 UTC
Created attachment 109165 [details]
Updates the .spec file of the source rpm (libselinux-1.19.3-3.src.rpm)

If its determined this patch is ok, then after patching the following command
will rebuild the .rpm's:

$rpmbuild --bb *.spec (with the patch & *.gz files moved appropriately)

Comment 3 Mickey Stein 2004-12-29 17:18:01 UTC
Ok Dan, had a feeling this would be fixed before I could bug it ;)