-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathost-images.spec.in
110 lines (81 loc) · 2.94 KB
/
ost-images.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
%{!?distro: %global distro el8}
%{!?release: %global release @PACKAGE_RELEASE@}
# RPM compression parameters
%{!?xz_num_threads: %global xz_num_threads 2}
%global _source_payload w9T%{xz_num_threads}.xzdio
%global _binary_payload w9T%{xz_num_threads}.xzdio
# Whether certain RPMs are built or not
%{!?with_engine_installed: %global with_engine_installed 0}
%{!?with_host_installed: %global with_host_installed 0}
%{!?with_he_installed: %global with_he_installed 0}
# Disable debuginfo package, since this is a meta-package
%global debug_package %{nil}
Name: ost-images
Version: 1
Release: %{release}
Summary: VM images needed to run OST
License: GPLv2+
Source0: %{name}-%{version}.tar.gz
Prefix: %{_datarootdir}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libguestfs-tools-c
BuildRequires: libvirt-client
BuildRequires: libvirt-daemon-config-network
BuildRequires: make
BuildRequires: qemu-img
BuildRequires: virt-install
%global base_version %{version}-%{release}
%description
VM images needed to run OST
%prep
%setup
%build
%configure --with-distro=%{distro}
%install
%make_install
%package %{distro}-base
Summary: Bare distro installation image with ssh key for root injected
Obsoletes: %{name}-%{distro}-upgrade < %{base_version}
%description %{distro}-base
Bare distro installation image with ssh key for root injected
%files %{distro}-base
%{_datarootdir}/%{name}/*.ks
%{_datarootdir}/%{name}/*_id_rsa*
%attr(444, -, -) %{_datarootdir}/%{name}/*-base.qcow2
%{_datarootdir}/%{name}/*-base-pkglist.txt
%if %{with_engine_installed}
%package %{distro}-engine-installed
Summary: Distro with ovirt-engine installed
Requires: %{name}-%{distro}-base = %{base_version}
Obsoletes: %{name}-%{distro}-engine-deps-installed < %{base_version}
%description %{distro}-engine-installed
Distro with ovirt-engine installed
%files %{distro}-engine-installed
%attr(444, -, -) %{_datarootdir}/%{name}/*-engine-installed.qcow2
%{_datarootdir}/%{name}/*-engine-installed-pkglist*.txt
%{_datarootdir}/%{name}/*-provision-engine.sh
%endif
%if %{with_host_installed}
%package %{distro}-host-installed
Summary: Distro with ovirt-host installed
Requires: %{name}-%{distro}-base = %{base_version}
Obsoletes: %{name}-%{distro}-host-deps-installed < %{base_version}
%description %{distro}-host-installed
Distro with ovirt-host installed
%files %{distro}-host-installed
%attr(444, -, -) %{_datarootdir}/%{name}/*-host-installed.qcow2
%{_datarootdir}/%{name}/*-host-installed-pkglist*.txt
%{_datarootdir}/%{name}/*-provision-host.sh
%endif
%if %{with_he_installed}
%package %{distro}-he-installed
Summary: Distro with ovirt-engine-appliance installed
Requires: %{name}-%{distro}-host-installed = %{version}-%{release}
%description %{distro}-he-installed
Distro with ovirt-engine-appliance installed
%files %{distro}-he-installed
%attr(444, -, -) %{_datarootdir}/%{name}/*-he-installed.qcow2
%{_datarootdir}/%{name}/*-he-installed-pkglist*.txt
%{_datarootdir}/%{name}/*-provision-he.sh
%endif