dracut - 046-2
- add support for dist-tag less build
This commit is contained in:
parent
9e6bbe0722
commit
9336ee1ea7
75
0001.patch
Normal file
75
0001.patch
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
From 0344c2be134fbdf1019052eb314b76b7e3251d52 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harald Hoyer <harald@redhat.com>
|
||||||
|
Date: Fri, 11 Aug 2017 14:11:32 +0200
|
||||||
|
Subject: [PATCH] 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.
|
||||||
|
---
|
||||||
|
dracut.spec | 17 ++++++++++++++++-
|
||||||
|
git2spec.pl | 4 ++--
|
||||||
|
2 files changed, 18 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dracut.spec b/dracut.spec
|
||||||
|
index f6502c65..855adba6 100644
|
||||||
|
--- a/dracut.spec
|
||||||
|
+++ b/dracut.spec
|
||||||
|
@@ -14,9 +14,11 @@
|
||||||
|
%define with_nbd 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
+%define dist_free_release xxx
|
||||||
|
+
|
||||||
|
Name: dracut
|
||||||
|
Version: xxx
|
||||||
|
-Release: xxx
|
||||||
|
+Release: %{dist_free_release}%{?dist}
|
||||||
|
|
||||||
|
Summary: Initramfs generator using udev
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
@@ -136,7 +138,15 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package.
|
||||||
|
|
||||||
|
%package network
|
||||||
|
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}
|
||||||
|
+%endif
|
||||||
|
Requires: iputils
|
||||||
|
Requires: iproute
|
||||||
|
Requires: dhclient
|
||||||
|
@@ -184,7 +194,12 @@ initramfs with dracut, which drops capabilities.
|
||||||
|
|
||||||
|
%package live
|
||||||
|
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}
|
||||||
|
+%endif
|
||||||
|
Requires: %{name}-network = %{version}-%{release}
|
||||||
|
Requires: tar gzip coreutils bash device-mapper curl
|
||||||
|
|
||||||
|
diff --git a/git2spec.pl b/git2spec.pl
|
||||||
|
index 4b03a95c..0c5f3b9e 100755
|
||||||
|
--- a/git2spec.pl
|
||||||
|
+++ b/git2spec.pl
|
||||||
|
@@ -39,8 +39,8 @@ while(<>) {
|
||||||
|
if (/^Version:/) {
|
||||||
|
print "Version: $tag\n";
|
||||||
|
}
|
||||||
|
- elsif (/^Release:/) {
|
||||||
|
- print "Release: $release%{?dist}\n";
|
||||||
|
+ elsif (/^%define dist_free_release/) {
|
||||||
|
+ print "%define dist_free_release $release\n";
|
||||||
|
}
|
||||||
|
elsif ((/^Source0:/) || (/^Source:/)) {
|
||||||
|
print $_;
|
21
dracut.spec
21
dracut.spec
@ -14,9 +14,11 @@
|
|||||||
%define with_nbd 0
|
%define with_nbd 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define dist_free_release 2.git20170811
|
||||||
|
|
||||||
Name: dracut
|
Name: dracut
|
||||||
Version: 046
|
Version: 046
|
||||||
Release: 1%{?dist}
|
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}
|
||||||
@ -35,6 +37,7 @@ URL: https://dracut.wiki.kernel.org/
|
|||||||
# Source can be generated by
|
# Source can be generated by
|
||||||
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz
|
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz
|
||||||
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
|
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
|
||||||
|
Patch1: 0001.patch
|
||||||
|
|
||||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
|
|
||||||
@ -137,7 +140,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
|
||||||
@ -185,7 +196,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
|
||||||
|
|
||||||
@ -501,6 +517,9 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 11 2017 Harald Hoyer <harald@redhat.com> - 046-2
|
||||||
|
- add support for dist-tag less build
|
||||||
|
|
||||||
* Fri Aug 11 2017 Harald Hoyer <harald@redhat.com> - 046-1
|
* Fri Aug 11 2017 Harald Hoyer <harald@redhat.com> - 046-1
|
||||||
- version 046
|
- version 046
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user