Re: Problem with sed in spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/21/2013 02:00 PM, Juan Orti Alcaine wrote:
El 2013-08-21 11:49, Paul Howarth escribió:
On 21/08/13 12:21, Juan Orti Alcaine wrote:
Hello, I'm adding a SELinux module to the gogoc package, as seen in this
draft [1], and I've received a error about the dependecies. In my spec
file I use this to extract the selinux-policy version and use it as a
dependency:

%global selinux_policyver %(%{__sed} -e
's,.*selinux-policy-\\([^/]*\\)/.*,\\1,'
/usr/share/selinux/devel/policyhelp || echo 0.0.0)

This was an attempt to grok the selinux-policy version number without
querying the rpm database (which you can't reliably do during a
package build). Unfortunately there is no upstream version number for
the policy so the one used in Fedora is just made up. More
unfortunately, the one place I was reliably able to find it (in the
policyhelp file) no longer has it. In fact I can't find it anywhere in
any of the selinux-policy-{devel,doc} files in F-20. So there's no way
I can see of expressing the necessary dependency version in any sort
of automated way.

Paul.

I see, this is because of the unversioned doc dirs in f20.

Now I'm testing this in mock and works ok:

%global selinux_policyver %(rpm -q selinux-policy | %{__sed} -e
's,selinux-policy-\\(.*\\)-.*,\\1,' || echo 0.0.0)

What's wrong about querying the version number to rpm?
rpm doesn't work reliably inside of chroots.

Can I do it?
No.

Ralf

--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux