| 1 |
# |
| 2 |
# spec file for package kiwi |
| 3 |
# |
| 4 |
# Copyright (c) 2023 SUSE LLC |
| 5 |
# |
| 6 |
# All modifications and additions to the file contributed by third parties |
| 7 |
# remain the property of their copyright owners, unless otherwise agreed |
| 8 |
# upon. The license for this file, and modifications and additions to the |
| 9 |
# file, is the same license as for the pristine package itself (unless the |
| 10 |
# license for the pristine package is not an Open Source License, in which |
| 11 |
# case the license is the MIT License). An "Open Source License" is a |
| 12 |
# license that conforms to the Open Source Definition (Version 1.9) |
| 13 |
# published by the Open Source Initiative. |
| 14 |
# |
| 15 |
# Please submit bugfixes or comments via: |
| 16 |
# |
| 17 |
# https://github.com/OSInside/kiwi/issues |
| 18 |
# |
| 19 |
|
| 20 |
# If they aren't provided by a system installed macro, define them |
| 21 |
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc} |
| 22 |
|
| 23 |
%if 0%{?suse_version} && 0%{?suse_version} < 1600 |
| 24 |
%global __python3 /usr/bin/python3.11 |
| 25 |
%global python3_pkgversion 311 |
| 26 |
%else |
| 27 |
%{!?__python3: %global __python3 /usr/bin/python3} |
| 28 |
%{!?python3_pkgversion:%global python3_pkgversion 3} |
| 29 |
%endif |
| 30 |
|
| 31 |
%if %{undefined python3_sitelib} |
| 32 |
%if "%{_vendor}" == "debbuild" |
| 33 |
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") |
| 34 |
%else |
| 35 |
%global python3_sitelib %(%{__python3} -c "import sysconfig; print(sysconfig.get_path('platlib'))") |
| 36 |
%endif |
| 37 |
%endif |
| 38 |
|
| 39 |
%if %{undefined python3_version} |
| 40 |
%global python3_version %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))") |
| 41 |
%endif |
| 42 |
|
| 43 |
%if %{undefined python3_version_nodots} |
| 44 |
%global python3_version_nodots %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") |
| 45 |
%endif |
| 46 |
|
| 47 |
%if 0%{?debian} || 0%{?ubuntu} |
| 48 |
%global is_deb 1 |
| 49 |
%global pygroup python |
| 50 |
%global sysgroup admin |
| 51 |
%global develsuffix dev |
| 52 |
%else |
| 53 |
%global pygroup Development/Languages/Python |
| 54 |
%global sysgroup System/Management |
| 55 |
%global develsuffix devel |
| 56 |
%endif |
| 57 |
|
| 58 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} >= 1600 |
| 59 |
%bcond_without selinux |
| 60 |
%else |
| 61 |
%bcond_with selinux |
| 62 |
%endif |
| 63 |
|
| 64 |
Name: python-kiwi |
| 65 |
Version: %%VERSION |
| 66 |
Provides: kiwi-schema = 8.1 |
| 67 |
Release: 0 |
| 68 |
Url: https://github.com/OSInside/kiwi |
| 69 |
Summary: KIWI - Appliance Builder Next Generation |
| 70 |
License: GPL-3.0-or-later |
| 71 |
%if "%{_vendor}" == "debbuild" |
| 72 |
# Needed to set Maintainer in output debs |
| 73 |
Packager: Marcus Schaefer <[email protected]> |
| 74 |
%endif |
| 75 |
Group: %{pygroup} |
| 76 |
Source0: %{name}.tar.gz |
| 77 |
Source1: %{name}-rpmlintrc |
| 78 |
# SUSE-specific source additions (1001+) |
| 79 |
Source1001: systemd-tmpfiles-for-suse.conf |
| 80 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build |
| 81 |
%if 0%{?fedora} || 0%{?suse_version} |
| 82 |
BuildRequires: fdupes |
| 83 |
%endif |
| 84 |
%if 0%{?suse_version} |
| 85 |
BuildRequires: shadow |
| 86 |
%endif |
| 87 |
%if 0%{?debian} || 0%{?ubuntu} |
| 88 |
BuildRequires: passwd |
| 89 |
%endif |
| 90 |
# Main build requirements |
| 91 |
BuildRequires: gcc |
| 92 |
BuildRequires: make |
| 93 |
BuildRequires: python%{python3_pkgversion}-%{develsuffix} >= 3.9 |
| 94 |
BuildRequires: python%{python3_pkgversion}-build |
| 95 |
BuildRequires: python%{python3_pkgversion}-installer |
| 96 |
BuildRequires: python%{python3_pkgversion}-poetry-core >= 1.2.0 |
| 97 |
BuildRequires: python%{python3_pkgversion}-wheel |
| 98 |
# doc build requirements |
| 99 |
%if 0%{?debian} || 0%{?ubuntu} |
| 100 |
# only because of debbuild |
| 101 |
BuildRequires: python%{python3_pkgversion}-setuptools |
| 102 |
%endif |
| 103 |
BuildRequires: python%{python3_pkgversion}-typer >= 0.19.0 |
| 104 |
BuildRequires: python%{python3_pkgversion}-lxml |
| 105 |
BuildRequires: python%{python3_pkgversion}-requests |
| 106 |
BuildRequires: python%{python3_pkgversion}-simplejson |
| 107 |
%if 0%{?suse_version} |
| 108 |
BuildRequires: python%{python3_pkgversion}-Sphinx |
| 109 |
%else |
| 110 |
BuildRequires: python%{python3_pkgversion}-sphinx |
| 111 |
%endif |
| 112 |
%if 0%{?debian} || 0%{?ubuntu} |
| 113 |
BuildRequires: python%{python3_pkgversion}-sphinx-rtd-theme |
| 114 |
BuildRequires: python%{python3_pkgversion}-yaml |
| 115 |
%else |
| 116 |
BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme |
| 117 |
BuildRequires: python%{python3_pkgversion}-PyYAML |
| 118 |
%endif |
| 119 |
|
| 120 |
%description |
| 121 |
The KIWI Image System provides an operating system image builder |
| 122 |
for Linux supported hardware platforms as well as for virtualization |
| 123 |
and cloud systems like Xen, KVM, VMware, EC2 and more. |
| 124 |
|
| 125 |
%package -n kiwi-systemdeps-core |
| 126 |
Summary: KIWI - Core host system dependencies |
| 127 |
Group: %{sysgroup} |
| 128 |
Provides: kiwi-image-tbz-requires = %{version}-%{release} |
| 129 |
Obsoletes: kiwi-image-tbz-requires < %{version}-%{release} |
| 130 |
%if "%{_vendor}" != "debbuild" |
| 131 |
Provides: kiwi-image:tbz |
| 132 |
%endif |
| 133 |
%if 0%{?fedora} >= 42 |
| 134 |
Provides: kiwi-image:enclave |
| 135 |
Requires: eif_build |
| 136 |
%endif |
| 137 |
# tools conditionally used by kiwi |
| 138 |
%if 0%{?fedora} || 0%{?rhel} >= 8 |
| 139 |
Recommends: gnupg2 |
| 140 |
Recommends: apt |
| 141 |
Recommends: dpkg |
| 142 |
%endif |
| 143 |
%if 0%{?suse_version} |
| 144 |
Recommends: gpg2 |
| 145 |
%if 0%{?suse_version} >= 1650 |
| 146 |
Recommends: dnf |
| 147 |
%endif |
| 148 |
%endif |
| 149 |
# package managers required by distro |
| 150 |
%if 0%{?fedora} >= 41 || 0%{?rhel} >= 11 || 0%{?suse_version} >= 1650 |
| 151 |
Requires: dnf5 |
| 152 |
Requires: dnf5-plugins |
| 153 |
Provides: kiwi-packagemanager:dnf5 |
| 154 |
%endif |
| 155 |
%if (0%{?fedora} && 0%{?fedora} < 41) || (0%{?rhel} && 0%{?rhel} < 11) |
| 156 |
Requires: dnf4 |
| 157 |
Provides: kiwi-packagemanager:dnf |
| 158 |
Provides: kiwi-packagemanager:dnf4 |
| 159 |
Provides: kiwi-packagemanager:yum |
| 160 |
%endif |
| 161 |
%if (0%{?fedora} && 0%{?fedora} < 41) || (0%{?rhel} >= 8 && 0%{?rhel} < 11) |
| 162 |
Provides: kiwi-packagemanager:microdnf |
| 163 |
Requires: microdnf |
| 164 |
%endif |
| 165 |
%if 0%{?fedora} >= 26 || 0%{?suse_version} |
| 166 |
Requires: zypper |
| 167 |
Provides: kiwi-packagemanager:zypper |
| 168 |
%endif |
| 169 |
%if 0%{?debian} || 0%{?ubuntu} |
| 170 |
Requires: apt |
| 171 |
Requires: dpkg |
| 172 |
Requires: gnupg |
| 173 |
%endif |
| 174 |
# tools required by kiwi |
| 175 |
Requires: mtools |
| 176 |
Requires: rsync |
| 177 |
Requires: tar >= 1.2.7 |
| 178 |
Requires: cpio |
| 179 |
Requires: lsof |
| 180 |
Requires: openssl |
| 181 |
|
| 182 |
%description -n kiwi-systemdeps-core |
| 183 |
This metapackage installs the necessary system dependencies |
| 184 |
to run KIWI. |
| 185 |
|
| 186 |
%package -n kiwi-systemdeps-containers |
| 187 |
Summary: KIWI - host requirements for OCI container images |
| 188 |
Group: %{sysgroup} |
| 189 |
Provides: kiwi-image-docker-requires = %{version}-%{release} |
| 190 |
Obsoletes: kiwi-image-docker-requires < %{version}-%{release} |
| 191 |
%if "%{_vendor}" != "debbuild" |
| 192 |
Provides: kiwi-image:docker |
| 193 |
Provides: kiwi-image:oci |
| 194 |
%endif |
| 195 |
%if 0%{?suse_version} |
| 196 |
Requires: umoci |
| 197 |
%else |
| 198 |
Requires: buildah |
| 199 |
%endif |
| 200 |
Requires: skopeo |
| 201 |
|
| 202 |
%description -n kiwi-systemdeps-containers |
| 203 |
Host setup helper to pull in all packages required/useful on |
| 204 |
the build host to build OCI container images |
| 205 |
|
| 206 |
%package -n kiwi-systemdeps-containers-wsl |
| 207 |
Summary: KIWI - host requirements for WSL container images |
| 208 |
Group: %{sysgroup} |
| 209 |
Provides: kiwi-image-wsl-requires = %{version}-%{release} |
| 210 |
Obsoletes: kiwi-image-wsl-requires < %{version}-%{release} |
| 211 |
%if "%{_vendor}" != "debbuild" |
| 212 |
Provides: kiwi-image:appx |
| 213 |
Provides: kiwi-image:wsl |
| 214 |
%endif |
| 215 |
%if 0%{?suse_version} |
| 216 |
Requires: fb-util-for-appx |
| 217 |
%endif |
| 218 |
%if 0%{?fedora} || 0%{?rhel} |
| 219 |
Requires: appx-util |
| 220 |
%endif |
| 221 |
|
| 222 |
%description -n kiwi-systemdeps-containers-wsl |
| 223 |
Host setup helper to pull in all packages required/useful on |
| 224 |
the build host to build WSL container images |
| 225 |
|
| 226 |
%package -n kiwi-systemdeps-iso-media |
| 227 |
Summary: KIWI - host requirements for live and install iso images |
| 228 |
Group: %{sysgroup} |
| 229 |
Provides: kiwi-image-iso-requires = %{version}-%{release} |
| 230 |
Obsoletes: kiwi-image-iso-requires < %{version}-%{release} |
| 231 |
%if "%{_vendor}" != "debbuild" |
| 232 |
Provides: kiwi-image:iso |
| 233 |
%endif |
| 234 |
%if 0%{?suse_version} |
| 235 |
Requires: checkmedia |
| 236 |
%else |
| 237 |
Requires: isomd5sum |
| 238 |
%endif |
| 239 |
Requires: xorriso |
| 240 |
Requires: kiwi-systemdeps-core = %{version}-%{release} |
| 241 |
Requires: kiwi-systemdeps-filesystems = %{version}-%{release} |
| 242 |
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} |
| 243 |
|
| 244 |
%description -n kiwi-systemdeps-iso-media |
| 245 |
Host setup helper to pull in all packages required/useful on |
| 246 |
the build host to build live and install iso images. |
| 247 |
|
| 248 |
%package -n kiwi-systemdeps-bootloaders |
| 249 |
Summary: KIWI - host requirements for configuring bootloaders |
| 250 |
%if 0%{?suse_version} |
| 251 |
%ifarch x86_64 |
| 252 |
Requires: grub2-x86_64-efi |
| 253 |
%endif |
| 254 |
%ifarch %{ix86} x86_64 |
| 255 |
Recommends: gfxboot |
| 256 |
%endif |
| 257 |
%endif |
| 258 |
%if 0%{?fedora} || 0%{?rhel} |
| 259 |
%ifarch x86_64 |
| 260 |
Requires: grub2-efi-x64 |
| 261 |
%endif |
| 262 |
%endif |
| 263 |
%ifarch %arm aarch64 |
| 264 |
%if 0%{?fedora} || 0%{?rhel} |
| 265 |
Requires: uboot-tools |
| 266 |
%endif |
| 267 |
%if 0%{?suse_version} |
| 268 |
Requires: u-boot-tools |
| 269 |
%endif |
| 270 |
%endif |
| 271 |
%ifarch s390 s390x |
| 272 |
%if 0%{?fedora} || 0%{?rhel} |
| 273 |
Requires: s390utils |
| 274 |
%else |
| 275 |
Requires: s390-tools |
| 276 |
%if ! (0%{?debian} || 0%{?ubuntu}) |
| 277 |
Requires: grub2 |
| 278 |
%endif |
| 279 |
%endif |
| 280 |
%endif |
| 281 |
Requires: kiwi-systemdeps-core = %{version}-%{release} |
| 282 |
|
| 283 |
%description -n kiwi-systemdeps-bootloaders |
| 284 |
Host setup helper to pull in all packages required/useful on |
| 285 |
the build host for configuring bootloaders on images. |
| 286 |
|
| 287 |
%package -n kiwi-systemdeps-filesystems |
| 288 |
Summary: KIWI - host requirements for filesystems |
| 289 |
Group: %{sysgroup} |
| 290 |
Provides: kiwi-image-pxe-requires = %{version}-%{release} |
| 291 |
Obsoletes: kiwi-image-pxe-requires < %{version}-%{release} |
| 292 |
Provides: kiwi-filesystem-requires = %{version}-%{release} |
| 293 |
Obsoletes: kiwi-filesystem-requires < %{version}-%{release} |
| 294 |
%if "%{_vendor}" != "debbuild" |
| 295 |
Provides: kiwi-image:pxe |
| 296 |
Provides: kiwi-image:kis |
| 297 |
%if ! (0%{?rhel} >= 8) |
| 298 |
Provides: kiwi-filesystem:btrfs |
| 299 |
%endif |
| 300 |
Provides: kiwi-filesystem:ext2 |
| 301 |
Provides: kiwi-filesystem:ext3 |
| 302 |
Provides: kiwi-filesystem:ext4 |
| 303 |
Provides: kiwi-filesystem:squashfs |
| 304 |
Provides: kiwi-filesystem:xfs |
| 305 |
%if ! (0%{?suse_version} && 0%{?suse_version} < 1600) |
| 306 |
Provides: kiwi-filesystem:erofs |
| 307 |
Provides: kiwi-image:erofs |
| 308 |
%endif |
| 309 |
%endif |
| 310 |
Requires: dosfstools |
| 311 |
Requires: e2fsprogs |
| 312 |
Requires: xfsprogs |
| 313 |
%if ! (0%{?suse_version} && 0%{?suse_version} < 1600) |
| 314 |
Requires: erofs-utils |
| 315 |
%endif |
| 316 |
%if 0%{?suse_version} |
| 317 |
Requires: btrfsprogs |
| 318 |
%else |
| 319 |
%if ! (0%{?rhel} >= 8) |
| 320 |
Requires: btrfs-progs |
| 321 |
%endif |
| 322 |
%endif |
| 323 |
%if 0%{?suse_version} |
| 324 |
Requires: squashfs |
| 325 |
%else |
| 326 |
Requires: squashfs-tools |
| 327 |
%endif |
| 328 |
%ifnarch %{ix86} %{arm} |
| 329 |
%if "%{_vendor}" == "debbuild" |
| 330 |
Requires: qemu-utils |
| 331 |
%else |
| 332 |
%if 0%{?suse_version} |
| 333 |
Requires: qemu-tools |
| 334 |
%else |
| 335 |
Requires: qemu-img |
| 336 |
%endif |
| 337 |
%endif |
| 338 |
%endif |
| 339 |
Requires: kiwi-systemdeps-core = %{version}-%{release} |
| 340 |
|
| 341 |
%description -n kiwi-systemdeps-filesystems |
| 342 |
Host setup helper to pull in all packages required/useful on |
| 343 |
the build host to build filesystem images |
| 344 |
|
| 345 |
%package -n kiwi-systemdeps-disk-images |
| 346 |
Summary: KIWI - host requirements for disk images |
| 347 |
Group: %{sysgroup} |
| 348 |
Provides: kiwi-image-oem-requires = %{version}-%{release} |
| 349 |
Obsoletes: kiwi-image-oem-requires < %{version}-%{release} |
| 350 |
Provides: kiwi-image-vmx-requires = %{version}-%{release} |
| 351 |
Obsoletes: kiwi-image-vmx-requires < %{version}-%{release} |
| 352 |
%if "%{_vendor}" != "debbuild" |
| 353 |
Provides: kiwi-image:oem |
| 354 |
Provides: kiwi-image:vmx |
| 355 |
%endif |
| 356 |
Requires: kiwi-systemdeps-filesystems = %{version}-%{release} |
| 357 |
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} |
| 358 |
Requires: kiwi-systemdeps-iso-media = %{version}-%{release} |
| 359 |
%if 0%{?suse_version} >= 1600 |
| 360 |
Requires: binutils |
| 361 |
Requires: glibc-gconv-modules-extra |
| 362 |
%endif |
| 363 |
%if 0%{?suse_version} |
| 364 |
Requires: gptfdisk |
| 365 |
%else |
| 366 |
Requires: gdisk |
| 367 |
%endif |
| 368 |
Requires: lvm2 |
| 369 |
Requires: kpartx |
| 370 |
Requires: cryptsetup |
| 371 |
Requires: mdadm |
| 372 |
Requires: util-linux |
| 373 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} |
| 374 |
Requires: open-vmdk |
| 375 |
%endif |
| 376 |
# lsblk is part of util-linux-systemd on openSUSE |
| 377 |
%if 0%{?suse_version} |
| 378 |
Requires: util-linux-systemd |
| 379 |
%endif |
| 380 |
|
| 381 |
%description -n kiwi-systemdeps-disk-images |
| 382 |
Host setup helper to pull in all packages required/useful on |
| 383 |
the build host to build disk images |
| 384 |
|
| 385 |
%package -n kiwi-systemdeps-image-validation |
| 386 |
Summary: KIWI - host requirements for handling image descriptions better |
| 387 |
Group: %{sysgroup} |
| 388 |
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?suse_version} || 0%{?debian} || 0%{?ubuntu} |
| 389 |
Recommends: jing |
| 390 |
%endif |
| 391 |
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?suse_version} |
| 392 |
Requires: python%{python3_pkgversion}-solv |
| 393 |
%endif |
| 394 |
%if ! (0%{?rhel} && 0%{?rhel} < 8) |
| 395 |
Recommends: python%{python3_pkgversion}-anymarkup-core |
| 396 |
%endif |
| 397 |
|
| 398 |
%description -n kiwi-systemdeps-image-validation |
| 399 |
Host setup helper to pull in all packages required/useful on |
| 400 |
the build host to handling image descriptions better. This also |
| 401 |
includes reading of image descriptions for different markup |
| 402 |
languages |
| 403 |
|
| 404 |
%package -n kiwi-systemdeps |
| 405 |
Summary: KIWI - Host system dependencies |
| 406 |
Group: %{sysgroup} |
| 407 |
Requires: kiwi-systemdeps-core = %{version}-%{release} |
| 408 |
Requires: kiwi-systemdeps-bootloaders = %{version}-%{release} |
| 409 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} |
| 410 |
# None of the container build tools are available in Debian/Ubuntu |
| 411 |
Requires: kiwi-systemdeps-containers = %{version}-%{release} |
| 412 |
Requires: kiwi-systemdeps-containers-wsl = %{version}-%{release} |
| 413 |
%endif |
| 414 |
Requires: kiwi-systemdeps-filesystems = %{version}-%{release} |
| 415 |
Requires: kiwi-systemdeps-disk-images = %{version}-%{release} |
| 416 |
Requires: kiwi-systemdeps-iso-media = %{version}-%{release} |
| 417 |
%if 0%{?fedora} || 0%{?suse_version} |
| 418 |
Requires: kiwi-systemdeps-image-validation = %{version}-%{release} |
| 419 |
%endif |
| 420 |
|
| 421 |
%description -n kiwi-systemdeps |
| 422 |
Host setup helper to pull in all packages required/useful to |
| 423 |
leverage all functionality in KIWI. |
| 424 |
|
| 425 |
# python3-kiwi |
| 426 |
%package -n python%{python3_pkgversion}-kiwi |
| 427 |
Summary: KIWI - Appliance Builder Next Generation |
| 428 |
Group: %{pygroup} |
| 429 |
%if "%{python3_pkgversion}" == "3" |
| 430 |
%if 0%{?suse_version} |
| 431 |
Provides: python%{python3_version_nodots}-kiwi = %{version}-%{release} |
| 432 |
%else |
| 433 |
Provides: python%{python3_version}-kiwi = %{version}-%{release} |
| 434 |
%endif |
| 435 |
%endif |
| 436 |
Obsoletes: python2-kiwi |
| 437 |
Conflicts: python2-kiwi |
| 438 |
Conflicts: kiwi-man-pages < %{version} |
| 439 |
Requires: screen |
| 440 |
Requires: file |
| 441 |
Requires: sed |
| 442 |
Requires: bash |
| 443 |
Requires: python%{python3_pkgversion} >= 3.9 |
| 444 |
%if 0%{?ubuntu} || 0%{?debian} |
| 445 |
Requires: python%{python3_pkgversion}-yaml |
| 446 |
%else |
| 447 |
Requires: python%{python3_pkgversion}-PyYAML |
| 448 |
%endif |
| 449 |
Requires: python%{python3_pkgversion}-simplejson |
| 450 |
Requires: python%{python3_pkgversion}-typer >= 0.19.0 |
| 451 |
Requires: python%{python3_pkgversion}-lxml |
| 452 |
Requires: python%{python3_pkgversion}-requests |
| 453 |
Requires: python%{python3_pkgversion}-xmltodict |
| 454 |
%if %{with selinux} |
| 455 |
Requires: (kiwi-selinux = %{version}-%{release} if selinux-policy) |
| 456 |
%endif |
| 457 |
%if ! (0%{?rhel} && 0%{?rhel} < 8) |
| 458 |
Recommends: kiwi-man-pages |
| 459 |
%endif |
| 460 |
%if "%{_vendor}" == "debbuild" |
| 461 |
# Avoid issues with not being able to use magic Provides |
| 462 |
Requires: kiwi-systemdeps = %{version}-%{release} |
| 463 |
%else |
| 464 |
# Only require core dependencies, and allow OBS to pull the rest through magic Provides |
| 465 |
Requires: kiwi-systemdeps-core = %{version}-%{release} |
| 466 |
%if ! 0%{?el7} |
| 467 |
# Retain default expectation for local installations |
| 468 |
Recommends: kiwi-systemdeps = %{version}-%{release} |
| 469 |
%endif |
| 470 |
%endif |
| 471 |
|
| 472 |
%description -n python%{python3_pkgversion}-kiwi |
| 473 |
Python 3 library of the KIWI Image System. Provides an operating system |
| 474 |
image builder for Linux supported hardware platforms as well as for |
| 475 |
virtualization and cloud systems like Xen, KVM, VMware, EC2 and more. |
| 476 |
|
| 477 |
%if "%{_vendor}" != "debbuild" |
| 478 |
%ifarch %{ix86} x86_64 |
| 479 |
%package -n kiwi-pxeboot |
| 480 |
Summary: KIWI - PXE boot structure |
| 481 |
Requires: syslinux |
| 482 |
%if 0%{?fedora} || 0%{?rhel} |
| 483 |
Requires(pre): shadow-utils |
| 484 |
%else |
| 485 |
Requires(pre): shadow |
| 486 |
%endif |
| 487 |
%if 0%{?suse_version} >= 1550 |
| 488 |
Requires(pre): user(tftp) |
| 489 |
%endif |
| 490 |
License: GPL-3.0-or-later |
| 491 |
Group: %{sysgroup} |
| 492 |
|
| 493 |
%description -n kiwi-pxeboot |
| 494 |
This package contains the basic PXE directory structure which is |
| 495 |
needed to serve kiwi built images via PXE. |
| 496 |
%endif |
| 497 |
%endif |
| 498 |
|
| 499 |
%package -n dracut-kiwi-lib |
| 500 |
Summary: KIWI - Dracut kiwi Library |
| 501 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian} |
| 502 |
# Ubuntu 16.04 OBS environments refuse to set up due to |
| 503 |
# initramfs-tools / dracut conflict and initramfs-tools is required |
| 504 |
# to set up the build environment... |
| 505 |
BuildRequires: dracut |
| 506 |
%endif |
| 507 |
Requires: bc |
| 508 |
Requires: cryptsetup |
| 509 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?ubuntu} >= 1804 || 0%{?debian} >= 9 |
| 510 |
%if 0%{?rhel} && 0%{?rhel} < 8 |
| 511 |
Requires: btrfs-progs |
| 512 |
%else |
| 513 |
Recommends: btrfs-progs |
| 514 |
%endif |
| 515 |
Requires: gdisk |
| 516 |
Requires: dracut-network |
| 517 |
%else |
| 518 |
%if 0%{?debian} || 0%{?ubuntu} |
| 519 |
Recommends: btrfs-tools |
| 520 |
Requires: gdisk |
| 521 |
%else |
| 522 |
Requires: btrfsprogs |
| 523 |
Requires: gptfdisk |
| 524 |
%endif |
| 525 |
%endif |
| 526 |
Requires: coreutils |
| 527 |
Requires: e2fsprogs |
| 528 |
Requires: grep |
| 529 |
Requires: lvm2 |
| 530 |
Requires: mdadm |
| 531 |
Requires: util-linux |
| 532 |
# lsblk is part of util-linux-systemd on openSUSE |
| 533 |
%if 0%{?suse_version} |
| 534 |
Requires: util-linux-systemd |
| 535 |
%endif |
| 536 |
Requires: xfsprogs |
| 537 |
Requires: dialog |
| 538 |
Requires: pv |
| 539 |
Requires: curl |
| 540 |
%if 0%{?debian} || 0%{?ubuntu} |
| 541 |
Requires: xz-utils |
| 542 |
Requires: dmsetup |
| 543 |
%else |
| 544 |
Requires: xz |
| 545 |
Requires: device-mapper |
| 546 |
%endif |
| 547 |
%ifarch s390 s390x |
| 548 |
%if 0%{?fedora} || 0%{?rhel} |
| 549 |
Requires: s390utils |
| 550 |
%else |
| 551 |
Requires: s390-tools |
| 552 |
%endif |
| 553 |
Requires: parted |
| 554 |
%endif |
| 555 |
License: GPL-3.0-or-later |
| 556 |
Group: %{sysgroup} |
| 557 |
|
| 558 |
%description -n dracut-kiwi-lib |
| 559 |
This package contains a collection of methods to provide a library |
| 560 |
for tasks done in other kiwi dracut modules |
| 561 |
|
| 562 |
%package -n dracut-kiwi-oem-repart |
| 563 |
Summary: KIWI - Dracut module for oem(repart) image type |
| 564 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian} |
| 565 |
# Ubuntu 16.04 OBS environments refuse to set up due to |
| 566 |
# initramfs-tools / dracut conflict and initramfs-tools is required |
| 567 |
# to set up the build environment... |
| 568 |
BuildRequires: dracut |
| 569 |
%endif |
| 570 |
Requires: dracut-kiwi-lib = %{version}-%{release} |
| 571 |
License: GPL-3.0-or-later |
| 572 |
Group: %{sysgroup} |
| 573 |
|
| 574 |
%description -n dracut-kiwi-oem-repart |
| 575 |
This package contains the kiwi-repart dracut module which is |
| 576 |
used to repartition the oem disk image to the current disk |
| 577 |
geometry according to the setup in the kiwi image configuration |
| 578 |
|
| 579 |
%package -n dracut-kiwi-oem-dump |
| 580 |
Summary: KIWI - Dracut module for oem(install) image type |
| 581 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian} |
| 582 |
# Ubuntu 16.04 OBS environments refuse to set up due to |
| 583 |
# initramfs-tools / dracut conflict and initramfs-tools is required |
| 584 |
# to set up the build environment... |
| 585 |
BuildRequires: dracut |
| 586 |
%endif |
| 587 |
Requires: dracut-kiwi-lib = %{version}-%{release} |
| 588 |
Requires: kexec-tools |
| 589 |
Requires: gawk |
| 590 |
Requires: kpartx |
| 591 |
License: GPL-3.0-or-later |
| 592 |
Group: %{sysgroup} |
| 593 |
|
| 594 |
%description -n dracut-kiwi-oem-dump |
| 595 |
This package contains the kiwi-dump and kiwi-dump-reboot dracut |
| 596 |
modules which is used to install an oem image onto a target disk. |
| 597 |
It implements a simple installer which allows for user selected |
| 598 |
target disk or unattended installation to target. The source of |
| 599 |
the image to install could be either from media(CD/DVD/USB) or |
| 600 |
from remote |
| 601 |
|
| 602 |
%package -n dracut-kiwi-live |
| 603 |
Summary: KIWI - Dracut module for iso(live) image type |
| 604 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian} |
| 605 |
# Ubuntu 16.04 OBS environments refuse to set up due to |
| 606 |
# initramfs-tools / dracut conflict and initramfs-tools is required |
| 607 |
# to set up the build environment... |
| 608 |
BuildRequires: dracut |
| 609 |
%endif |
| 610 |
Requires: dialog |
| 611 |
Requires: xfsprogs |
| 612 |
Requires: e2fsprogs |
| 613 |
Requires: util-linux |
| 614 |
# lsblk is part of util-linux-systemd on openSUSE |
| 615 |
%if 0%{?suse_version} |
| 616 |
Requires: util-linux-systemd |
| 617 |
%endif |
| 618 |
%if 0%{?debian} || 0%{?ubuntu} |
| 619 |
Requires: dmsetup |
| 620 |
Requires: dracut-network |
| 621 |
%endif |
| 622 |
%if 0%{?fedora} || 0%{?rhel} |
| 623 |
Requires: device-mapper |
| 624 |
Requires: dracut-network |
| 625 |
%endif |
| 626 |
%if 0%{?suse_version} |
| 627 |
Requires: device-mapper |
| 628 |
%endif |
| 629 |
Requires: dracut |
| 630 |
License: GPL-3.0-or-later |
| 631 |
Group: %{sysgroup} |
| 632 |
|
| 633 |
%description -n dracut-kiwi-live |
| 634 |
This package contains the kiwi-live dracut module which is used |
| 635 |
for booting iso(live) images built with KIWI |
| 636 |
|
| 637 |
%package -n dracut-kiwi-overlay |
| 638 |
Summary: KIWI - Dracut module for vmx(+overlay) image type |
| 639 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian} |
| 640 |
# Ubuntu 16.04 OBS environments refuse to set up due to |
| 641 |
# initramfs-tools / dracut conflict and initramfs-tools is required |
| 642 |
# to set up the build environment... |
| 643 |
BuildRequires: dracut |
| 644 |
%endif |
| 645 |
Requires: dracut-kiwi-lib = %{version}-%{release} |
| 646 |
Requires: dracut |
| 647 |
License: GPL-3.0-or-later |
| 648 |
Group: %{sysgroup} |
| 649 |
|
| 650 |
%description -n dracut-kiwi-overlay |
| 651 |
This package contains the kiwi-overlay dracut module which is used |
| 652 |
for booting vmx images built with KIWI and configured to use an |
| 653 |
overlay root filesystem |
| 654 |
|
| 655 |
%package -n dracut-kiwi-verity |
| 656 |
Summary: KIWI - Dracut module for disk with embedded verity metadata |
| 657 |
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} || 0%{?debian} |
| 658 |
# Ubuntu 16.04 OBS environments refuse to set up due to |
| 659 |
# initramfs-tools / dracut conflict and initramfs-tools is required |
| 660 |
# to set up the build environment... |
| 661 |
BuildRequires: dracut |
| 662 |
%endif |
| 663 |
Requires: dracut-kiwi-lib = %{version}-%{release} |
| 664 |
Requires: dracut |
| 665 |
BuildRequires: gcc |
| 666 |
License: GPL-3.0-or-later |
| 667 |
Group: %{sysgroup} |
| 668 |
|
| 669 |
%description -n dracut-kiwi-verity |
| 670 |
This package contains the kiwi-verity dracut module which is used |
| 671 |
for booting oem images built with KIWI and configured to use an |
| 672 |
embedded verity metadata block via the embed_verity_metadata |
| 673 |
type attribute |
| 674 |
|
| 675 |
%package -n kiwi-man-pages |
| 676 |
Summary: KIWI - manual pages |
| 677 |
License: GPL-3.0-or-later |
| 678 |
Group: %{sysgroup} |
| 679 |
|
| 680 |
%description -n kiwi-man-pages |
| 681 |
Provides manual pages to describe the kiwi commands |
| 682 |
|
| 683 |
%package -n kiwi-bash-completion |
| 684 |
Summary: Bash Completion for kiwi-ng |
| 685 |
Requires: bash-completion |
| 686 |
Requires: python%{python3_pkgversion}-kiwi = %{version} |
| 687 |
%if ! (0%{?debian} || 0%{?ubuntu}) |
| 688 |
Supplements: (%{name} and bash-completion) |
| 689 |
%endif |
| 690 |
BuildArch: noarch |
| 691 |
|
| 692 |
%description -n kiwi-bash-completion |
| 693 |
Bash command line completion support for python-kiwi - completion |
| 694 |
of subcommands, parameters and keywords for the kiwi-ng command. |
| 695 |
|
| 696 |
%if %{with selinux} |
| 697 |
%package -n kiwi-selinux |
| 698 |
Summary: SELinux module for kiwi-ng |
| 699 |
License: GPL-3.0-or-later |
| 700 |
BuildArch: noarch |
| 701 |
BuildRequires: selinux-policy |
| 702 |
BuildRequires: selinux-policy-devel |
| 703 |
BuildRequires: make |
| 704 |
%{?selinux_requires} |
| 705 |
|
| 706 |
%description -n kiwi-selinux |
| 707 |
This package provides the SELinux policy module to ensure kiwi-ng |
| 708 |
runs properly under an environment with SELinux enabled. |
| 709 |
%endif |
| 710 |
|
| 711 |
%prep |
| 712 |
%setup -q -n kiwi-%{version} |
| 713 |
|
| 714 |
# Drop shebang for kiwi/xml_parse.py, as we don't intend to use it |
| 715 |
# as an independent script |
| 716 |
sed -e "s|#!/usr/bin/env python||" -i kiwi/xml_parse.py |
| 717 |
|
| 718 |
# Build documentation |
| 719 |
make -C doc man |
| 720 |
|
| 721 |
%if %{with selinux} |
| 722 |
# Build SELinux module |
| 723 |
make -C selinux SHARE="%{_datadir}" TARGETS="kiwi" |
| 724 |
%endif |
| 725 |
|
| 726 |
# Build application wheel |
| 727 |
%{__python3} -m build --no-isolation --wheel |
| 728 |
|
| 729 |
%install |
| 730 |
# Install application |
| 731 |
%{__python3} -m installer --destdir %{buildroot} %{?is_deb:--no-compile-bytecode} dist/*.whl |
| 732 |
|
| 733 |
%if 0%{?is_deb} |
| 734 |
# Fix where files were installed |
| 735 |
mv %{buildroot}%{_prefix}/local/* %{buildroot}%{_prefix} |
| 736 |
mv %{buildroot}%{_prefix}/lib/python3* %{buildroot}%{_prefix}/lib/python3 |
| 737 |
%endif |
| 738 |
|
| 739 |
# Install man-pages, completion and kiwi default configuration |
| 740 |
make buildroot=%{buildroot}/ python=%{__python3} install |
| 741 |
|
| 742 |
# Install dracut modules |
| 743 |
make buildroot=%{buildroot}/ python=%{__python3} install_dracut |
| 744 |
|
| 745 |
# Install documentation README / LICENSE |
| 746 |
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ python=%{__python3} install_package_docs |
| 747 |
|
| 748 |
# Create symlinks for correct binaries |
| 749 |
ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi |
| 750 |
ln -sr %{buildroot}%{_bindir}/kiwi-ng %{buildroot}%{_bindir}/kiwi-ng-3 |
| 751 |
|
| 752 |
%if %{with selinux} |
| 753 |
# Install SELinux module |
| 754 |
install -t %{buildroot}%{_datadir}/selinux/packages -Dpm 0644 selinux/kiwi.pp.bz2 |
| 755 |
%endif |
| 756 |
|
| 757 |
%if "%{_vendor}" != "debbuild" |
| 758 |
# kiwi pxeboot directory structure to be packed in kiwi-pxeboot |
| 759 |
%ifarch %{ix86} x86_64 |
| 760 |
%if 0%{?suse_version} >= 1600 |
| 761 |
install -D -m 755 %{SOURCE1001} %{buildroot}%{_tmpfilesdir}/kiwi-pxeboot.conf |
| 762 |
%else |
| 763 |
for i in KIWI pxelinux.cfg image upload boot; do \ |
| 764 |
mkdir -p %{buildroot}/srv/tftpboot/$i ;\ |
| 765 |
done |
| 766 |
%endif |
| 767 |
%endif |
| 768 |
%endif |
| 769 |
|
| 770 |
%if 0%{?fedora} || 0%{?suse_version} |
| 771 |
%fdupes %{buildroot}/srv/tftpboot |
| 772 |
%endif |
| 773 |
|
| 774 |
%if "%{_vendor}" != "debbuild" && 0%{?suse_version} < 1550 |
| 775 |
%ifarch %{ix86} x86_64 |
| 776 |
%pre -n kiwi-pxeboot |
| 777 |
#============================================================ |
| 778 |
# create user and group tftp if they does not exist |
| 779 |
if ! /usr/bin/getent group tftp >/dev/null; then |
| 780 |
%{_sbindir}/groupadd -r tftp |
| 781 |
fi |
| 782 |
if ! /usr/bin/getent passwd tftp >/dev/null; then |
| 783 |
%{_sbindir}/useradd -c "TFTP account" -d /srv/tftpboot -G tftp -g tftp \ |
| 784 |
-r -s /bin/false tftp |
| 785 |
fi |
| 786 |
%endif |
| 787 |
%endif |
| 788 |
|
| 789 |
%if %{with selinux} |
| 790 |
%pre -n kiwi-selinux |
| 791 |
%selinux_relabel_pre |
| 792 |
|
| 793 |
%post -n kiwi-selinux |
| 794 |
%selinux_modules_install %{_datadir}/selinux/packages/kiwi.pp.bz2 |
| 795 |
%selinux_relabel_post |
| 796 |
|
| 797 |
%posttrans -n kiwi-selinux |
| 798 |
%selinux_relabel_post |
| 799 |
|
| 800 |
%postun -n kiwi-selinux |
| 801 |
%selinux_modules_uninstall kiwi |
| 802 |
if [ $1 -eq 0 ]; then |
| 803 |
%selinux_relabel_post |
| 804 |
fi |
| 805 |
%endif |
| 806 |
|
| 807 |
%files -n kiwi-systemdeps-core |
| 808 |
# Empty metapackage |
| 809 |
|
| 810 |
%files -n kiwi-systemdeps-bootloaders |
| 811 |
# Empty metapackage |
| 812 |
|
| 813 |
%files -n kiwi-systemdeps-containers |
| 814 |
# Empty metapackage |
| 815 |
|
| 816 |
%files -n kiwi-systemdeps-containers-wsl |
| 817 |
# Empty metapackage |
| 818 |
|
| 819 |
%files -n kiwi-systemdeps-iso-media |
| 820 |
# Empty metapackage |
| 821 |
|
| 822 |
%files -n kiwi-systemdeps-filesystems |
| 823 |
# Empty metapackage |
| 824 |
|
| 825 |
%files -n kiwi-systemdeps-disk-images |
| 826 |
# Empty metapackage |
| 827 |
|
| 828 |
%files -n kiwi-systemdeps-image-validation |
| 829 |
# Empty metapackage |
| 830 |
|
| 831 |
%files -n kiwi-systemdeps |
| 832 |
# Empty metapackage |
| 833 |
|
| 834 |
%files -n python%{python3_pkgversion}-kiwi |
| 835 |
%dir %{_defaultdocdir}/python-kiwi |
| 836 |
%dir %{_usr}/share/kiwi |
| 837 |
%dir %{_usr}/share/kiwi/kiwi.yml.d |
| 838 |
%dir %_sysconfdir/kiwi.yml.d |
| 839 |
%doc %{_usr}/share/kiwi/kiwi.yml.example |
| 840 |
%{_bindir}/kiwi |
| 841 |
%{_bindir}/kiwi-ng |
| 842 |
%{_bindir}/kiwi-ng-3* |
| 843 |
%{python3_sitelib}/kiwi* |
| 844 |
%{_usr}/share/kiwi/xsl_to_v74/ |
| 845 |
%{_defaultdocdir}/python-kiwi/LICENSE |
| 846 |
%{_defaultdocdir}/python-kiwi/README |
| 847 |
|
| 848 |
%files -n kiwi-bash-completion |
| 849 |
%{_usr}/share/bash-completion/completions/kiwi-ng |
| 850 |
|
| 851 |
%files -n kiwi-man-pages |
| 852 |
%doc %{_mandir}/man8/* |
| 853 |
|
| 854 |
%files -n dracut-kiwi-lib |
| 855 |
%{_usr}/lib/dracut/modules.d/59kiwi-lib |
| 856 |
|
| 857 |
%files -n dracut-kiwi-oem-repart |
| 858 |
%{_usr}/lib/dracut/modules.d/55kiwi-repart |
| 859 |
|
| 860 |
%files -n dracut-kiwi-oem-dump |
| 861 |
%{_usr}/lib/dracut/modules.d/55kiwi-dump |
| 862 |
%{_usr}/lib/dracut/modules.d/59kiwi-dump-reboot |
| 863 |
|
| 864 |
%files -n dracut-kiwi-live |
| 865 |
%{_usr}/lib/dracut/modules.d/55kiwi-live |
| 866 |
|
| 867 |
%files -n dracut-kiwi-overlay |
| 868 |
%{_usr}/lib/dracut/modules.d/55kiwi-overlay |
| 869 |
|
| 870 |
%files -n dracut-kiwi-verity |
| 871 |
%{_usr}/lib/dracut/modules.d/50kiwi-verity |
| 872 |
%{_bindir}/kiwi-parse-verity |
| 873 |
|
| 874 |
%if "%{_vendor}" != "debbuild" |
| 875 |
%ifarch %{ix86} x86_64 |
| 876 |
|
| 877 |
%if 0%{?suse_version} >= 1600 |
| 878 |
%post -n kiwi-pxeboot |
| 879 |
%tmpfiles_create kiwi-pxeboot.conf |
| 880 |
%endif |
| 881 |
|
| 882 |
%files -n kiwi-pxeboot |
| 883 |
%if 0%{?suse_version} >= 1600 |
| 884 |
%{_tmpfilesdir}/kiwi-pxeboot.conf |
| 885 |
%ghost %dir %attr(0755,tftp,tftp) /srv/tftpboot |
| 886 |
%ghost %dir /srv/tftpboot/KIWI |
| 887 |
%ghost %dir /srv/tftpboot/pxelinux.cfg |
| 888 |
%ghost %dir /srv/tftpboot/image |
| 889 |
%ghost %dir /srv/tftpboot/upload |
| 890 |
%ghost %dir /srv/tftpboot/boot |
| 891 |
%else |
| 892 |
%if 0%{?suse_version} < 1550 |
| 893 |
%dir %attr(0755,tftp,tftp) /srv/tftpboot |
| 894 |
%endif |
| 895 |
%dir /srv/tftpboot/KIWI |
| 896 |
%dir /srv/tftpboot/pxelinux.cfg |
| 897 |
%dir /srv/tftpboot/image |
| 898 |
%dir /srv/tftpboot/upload |
| 899 |
%dir /srv/tftpboot/boot |
| 900 |
%endif |
| 901 |
%endif |
| 902 |
%endif |
| 903 |
|
| 904 |
%if %{with selinux} |
| 905 |
%files -n kiwi-selinux |
| 906 |
%doc selinux/README.md |
| 907 |
%license LICENSE |
| 908 |
%{_datadir}/selinux/packages/kiwi.pp.bz2 |
| 909 |
%endif |
| 910 |
|
| 911 |
%changelog |