rpm spec: conditional require based of distro version Announcing the arrival of Valued...
Customizing QGIS plugins
How were pictures turned from film to a big picture in a picture frame before digital scanning?
What is Adi Shankara referring to when he says "He has Vajra marks on his feet"?
How to run automated tests after each commit?
Is there hard evidence that the grant peer review system performs significantly better than random?
Why are vacuum tubes still used in amateur radios?
Is CEO the "profession" with the most psychopaths?
A letter with no particular backstory
How to pronounce 伝統色
Lagrange four-squares theorem --- deterministic complexity
Project Euler #1 in C++
What initially awakened the Balrog?
Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?
Trademark violation for app?
Drawing spherical mirrors
Why are my pictures showing a dark band on one edge?
Does the Mueller report show a conspiracy between Russia and the Trump Campaign?
How did Fremen produce and carry enough thumpers to use Sandworms as de facto Ubers?
How to report t statistic from R
Significance of Cersei's obsession with elephants?
Draw 4 of the same figure in the same tikzpicture
Sentence with dass with three Verbs (One modal and two connected with zu)
How does the math work when buying airline miles?
How do living politicians protect their readily obtainable signatures from misuse?
rpm spec: conditional require based of distro version
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30UTC (7:30pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Which RPM fixes this failed RedHat dependency?Not able to install Statistics::Basic on RHEL5Can one require “this OR that” package in an RPM spec file?Handling yum upgrade from pkg-x.y.rpm which requires mod_python to pkg-x.(y+z).rpm with conflicts mod_pythonIncremental RPM package version “numbers” for x.y.z > x.y.z-beta (or alpha, rc, etc)rpmbuild on CentOS 6.3 64-bit - broken dependenciesHow to create Python (2.7.3) RPM package?In an RPM spec file, when a file isn't found, how to find out which %files line is at fault?Bad signatures or NOKEY errors on RPMs I just signedCannot install mysql server - Error in PREIN scriptlet in rpm package mysql55-mysql-server-5.5.32-3.el5.x86_64
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I'm trying to write a single rpm spec for RHEL/CentOS/SL 5 and 6. This spec is for python app, so there is no differences in build process. But on RHEL/CentOS5 I need to add one additional dependency.
How would I define dependency only for el5? I've tried following:
%if 0%{?redhat} == 5 || 0%{?centos} == 5
Requires: kmod-coretemp
%endif
Does not work (build on CentOS5 does not adds kmod-coretemp dependency).
I've tried also following:
%if %{?dist} == "el5"
It reports with syntax error. I'm sure dist macro is set and contains 'el5'. But I'm not sure what is the syntax of if conditionals in rpm? rpmguide does not have detailed answer.
redhat centos5 rpm
add a comment |
I'm trying to write a single rpm spec for RHEL/CentOS/SL 5 and 6. This spec is for python app, so there is no differences in build process. But on RHEL/CentOS5 I need to add one additional dependency.
How would I define dependency only for el5? I've tried following:
%if 0%{?redhat} == 5 || 0%{?centos} == 5
Requires: kmod-coretemp
%endif
Does not work (build on CentOS5 does not adds kmod-coretemp dependency).
I've tried also following:
%if %{?dist} == "el5"
It reports with syntax error. I'm sure dist macro is set and contains 'el5'. But I'm not sure what is the syntax of if conditionals in rpm? rpmguide does not have detailed answer.
redhat centos5 rpm
add a comment |
I'm trying to write a single rpm spec for RHEL/CentOS/SL 5 and 6. This spec is for python app, so there is no differences in build process. But on RHEL/CentOS5 I need to add one additional dependency.
How would I define dependency only for el5? I've tried following:
%if 0%{?redhat} == 5 || 0%{?centos} == 5
Requires: kmod-coretemp
%endif
Does not work (build on CentOS5 does not adds kmod-coretemp dependency).
I've tried also following:
%if %{?dist} == "el5"
It reports with syntax error. I'm sure dist macro is set and contains 'el5'. But I'm not sure what is the syntax of if conditionals in rpm? rpmguide does not have detailed answer.
redhat centos5 rpm
I'm trying to write a single rpm spec for RHEL/CentOS/SL 5 and 6. This spec is for python app, so there is no differences in build process. But on RHEL/CentOS5 I need to add one additional dependency.
How would I define dependency only for el5? I've tried following:
%if 0%{?redhat} == 5 || 0%{?centos} == 5
Requires: kmod-coretemp
%endif
Does not work (build on CentOS5 does not adds kmod-coretemp dependency).
I've tried also following:
%if %{?dist} == "el5"
It reports with syntax error. I'm sure dist macro is set and contains 'el5'. But I'm not sure what is the syntax of if conditionals in rpm? rpmguide does not have detailed answer.
redhat centos5 rpm
redhat centos5 rpm
edited Jul 6 '15 at 6:19
masegaloeh
16.3k74085
16.3k74085
asked Jun 23 '11 at 9:24
rvsrvs
3,36711926
3,36711926
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Dist tag packaging guidelines
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
1
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
add a comment |
The Fedora wiki, as usual, provides the best guidelines about packaging. Take a look at the Packaging:DistTag page. You can use the %{el5} variable and a shorthand conditional to ensure that the relevent Require line is used when building packages for EL5.
%{?el5:Requires: kmod-coretemp}
You'll probably want to add the dist tag to the version field to avoid later confusion between packages:
Release: 1%{?dist}
See Purpose of the Dist Tag.
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
1
If they're not present then you may need to install the packageredhat-rpm-configfrom Yum.
– Dan Carley
Jun 23 '11 at 12:03
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f283330%2frpm-spec-conditional-require-based-of-distro-version%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Dist tag packaging guidelines
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
1
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
add a comment |
Dist tag packaging guidelines
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
1
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
add a comment |
Dist tag packaging guidelines
Dist tag packaging guidelines
answered Jun 23 '11 at 9:34
Ignacio Vazquez-AbramsIgnacio Vazquez-Abrams
39.5k46377
39.5k46377
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
1
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
add a comment |
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
1
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
hm, it doesn't show the tags for centos in that page.
– dothebart
Oct 27 '16 at 7:32
1
1
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
@dothebart: "RHEL n (all variants)"
– Ignacio Vazquez-Abrams
Oct 27 '16 at 12:59
add a comment |
The Fedora wiki, as usual, provides the best guidelines about packaging. Take a look at the Packaging:DistTag page. You can use the %{el5} variable and a shorthand conditional to ensure that the relevent Require line is used when building packages for EL5.
%{?el5:Requires: kmod-coretemp}
You'll probably want to add the dist tag to the version field to avoid later confusion between packages:
Release: 1%{?dist}
See Purpose of the Dist Tag.
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
1
If they're not present then you may need to install the packageredhat-rpm-configfrom Yum.
– Dan Carley
Jun 23 '11 at 12:03
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
add a comment |
The Fedora wiki, as usual, provides the best guidelines about packaging. Take a look at the Packaging:DistTag page. You can use the %{el5} variable and a shorthand conditional to ensure that the relevent Require line is used when building packages for EL5.
%{?el5:Requires: kmod-coretemp}
You'll probably want to add the dist tag to the version field to avoid later confusion between packages:
Release: 1%{?dist}
See Purpose of the Dist Tag.
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
1
If they're not present then you may need to install the packageredhat-rpm-configfrom Yum.
– Dan Carley
Jun 23 '11 at 12:03
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
add a comment |
The Fedora wiki, as usual, provides the best guidelines about packaging. Take a look at the Packaging:DistTag page. You can use the %{el5} variable and a shorthand conditional to ensure that the relevent Require line is used when building packages for EL5.
%{?el5:Requires: kmod-coretemp}
You'll probably want to add the dist tag to the version field to avoid later confusion between packages:
Release: 1%{?dist}
See Purpose of the Dist Tag.
The Fedora wiki, as usual, provides the best guidelines about packaging. Take a look at the Packaging:DistTag page. You can use the %{el5} variable and a shorthand conditional to ensure that the relevent Require line is used when building packages for EL5.
%{?el5:Requires: kmod-coretemp}
You'll probably want to add the dist tag to the version field to avoid later confusion between packages:
Release: 1%{?dist}
See Purpose of the Dist Tag.
edited 12 mins ago
Alberto Chiusole
1033
1033
answered Jun 23 '11 at 9:43
Dan CarleyDan Carley
22.2k34468
22.2k34468
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
1
If they're not present then you may need to install the packageredhat-rpm-configfrom Yum.
– Dan Carley
Jun 23 '11 at 12:03
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
add a comment |
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
1
If they're not present then you may need to install the packageredhat-rpm-configfrom Yum.
– Dan Carley
Jun 23 '11 at 12:03
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
Thanks! Well, my system does not have this for some reason, but I've defined macro manually. Sorry, marking Ignacio answer as accepted, as it was first one.
– rvs
Jun 23 '11 at 11:28
1
1
If they're not present then you may need to install the package
redhat-rpm-config from Yum.– Dan Carley
Jun 23 '11 at 12:03
If they're not present then you may need to install the package
redhat-rpm-config from Yum.– Dan Carley
Jun 23 '11 at 12:03
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
It's installed, but still no macros. I believe it's centos-specific, as on another rhel5 machines they are in place.
– rvs
Jun 23 '11 at 14:08
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f283330%2frpm-spec-conditional-require-based-of-distro-version%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown