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