dracut.spec: add support for builds without dist-tag
In the module-build-service, we have pieces of dracut provided by different modules ("base-runtime" provides most functionality, but we need dracut-network in "installer". Since these two modules build with separate dist-tags, we need to reduce this strict requirement to ignore the dist-tag.master
parent
a0799ffb55
commit
0344c2be13
17
dracut.spec
17
dracut.spec
|
@ -14,9 +14,11 @@
|
||||||
%define with_nbd 0
|
%define with_nbd 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define dist_free_release xxx
|
||||||
|
|
||||||
Name: dracut
|
Name: dracut
|
||||||
Version: xxx
|
Version: xxx
|
||||||
Release: xxx
|
Release: %{dist_free_release}%{?dist}
|
||||||
|
|
||||||
Summary: Initramfs generator using udev
|
Summary: Initramfs generator using udev
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
@ -136,7 +138,15 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package.
|
||||||
|
|
||||||
%package network
|
%package network
|
||||||
Summary: dracut modules to build a dracut initramfs with network support
|
Summary: dracut modules to build a dracut initramfs with network support
|
||||||
|
%if 0%{?_module_build}
|
||||||
|
# In the module-build-service, we have pieces of dracut provided by different
|
||||||
|
# modules ("base-runtime" provides most functionality, but we need
|
||||||
|
# dracut-network in "installer". Since these two modules build with separate
|
||||||
|
# dist-tags, we need to reduce this strict requirement to ignore the dist-tag.
|
||||||
|
Requires: %{name} >= %{version}-%{dist_free_release}
|
||||||
|
%else
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
Requires: iputils
|
Requires: iputils
|
||||||
Requires: iproute
|
Requires: iproute
|
||||||
Requires: dhclient
|
Requires: dhclient
|
||||||
|
@ -184,7 +194,12 @@ initramfs with dracut, which drops capabilities.
|
||||||
|
|
||||||
%package live
|
%package live
|
||||||
Summary: dracut modules to build a dracut initramfs with live image capabilities
|
Summary: dracut modules to build a dracut initramfs with live image capabilities
|
||||||
|
%if 0%{?_module_build}
|
||||||
|
# See the network subpackage comment.
|
||||||
|
Requires: %{name} >= %{version}-%{dist_free_release}
|
||||||
|
%else
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
Requires: %{name}-network = %{version}-%{release}
|
Requires: %{name}-network = %{version}-%{release}
|
||||||
Requires: tar gzip coreutils bash device-mapper curl
|
Requires: tar gzip coreutils bash device-mapper curl
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,8 @@ while(<>) {
|
||||||
if (/^Version:/) {
|
if (/^Version:/) {
|
||||||
print "Version: $tag\n";
|
print "Version: $tag\n";
|
||||||
}
|
}
|
||||||
elsif (/^Release:/) {
|
elsif (/^%define dist_free_release/) {
|
||||||
print "Release: $release%{?dist}\n";
|
print "%define dist_free_release $release\n";
|
||||||
}
|
}
|
||||||
elsif ((/^Source0:/) || (/^Source:/)) {
|
elsif ((/^Source0:/) || (/^Source:/)) {
|
||||||
print $_;
|
print $_;
|
||||||
|
|
Loading…
Reference in New Issue