Sync from SUSE:ALP:Source:Standard:1.0 uyuni-tools revision df2f5980078f381eb7de7002e6a18002
This commit is contained in:
commit
322b27d667
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
11
_service
Normal file
11
_service
Normal file
@ -0,0 +1,11 @@
|
||||
<services>
|
||||
<service name="extract_file" mode="disabled">
|
||||
<param name="archive">*.obscpio</param>
|
||||
<param name="files">*</param>
|
||||
</service>
|
||||
<service name="tar" mode="buildtime"/>
|
||||
<service name="recompress" mode="buildtime">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">gz</param>
|
||||
</service>
|
||||
</services>
|
BIN
uyuni-tools-git-0.1f0e1eb.obscpio
(Stored with Git LFS)
Normal file
BIN
uyuni-tools-git-0.1f0e1eb.obscpio
(Stored with Git LFS)
Normal file
Binary file not shown.
206
uyuni-tools.changes
Normal file
206
uyuni-tools.changes
Normal file
@ -0,0 +1,206 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 18 16:18:33 CEST 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.11-0
|
||||
* Require Netavark network backend for Podman
|
||||
(bsc#1224081)
|
||||
* Fix --registry option (bsc#1226436)
|
||||
* Copy the server CA certificate to the host
|
||||
* Delete /etc/uyuni/proxy folder during mgrpxy uninstall
|
||||
* Check permissions of /etc/uyuni folder to prevent Squid failures
|
||||
* Correctly prepend default namespace for mgrpxy containers
|
||||
* Re-add Podman extra args for install and migrate
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 10 18:11:27 CEST 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.10-0
|
||||
* Change --hubxmlrpc-enable to --hubxmlrpc-replicas
|
||||
* Add scale command for changing Confidential Computing
|
||||
attestation replicas
|
||||
* Ask for passwords twice
|
||||
* Add mgrpxy logs command
|
||||
* Remove the mount flags podman install command
|
||||
* Rename the --migration-image* flags to --dbupgrade-image-* to
|
||||
avoid confusion
|
||||
* Move user-defined values to service configuration files
|
||||
* Bump the push tag to 5.0.0
|
||||
* Remove /etc/systemd/system/uyuni-server.service.d/Service.conf
|
||||
during uninstallation
|
||||
* Add support for Hub XMLRPC API container
|
||||
* Enhance supportconfig file name with date to avoid conflicts
|
||||
* Exclude /var/log/lastlog from migration
|
||||
* Add registry flag
|
||||
* Set pull policy on build service
|
||||
* Compute attestation image name from base image when not
|
||||
specified
|
||||
* Add hint on uninstall dry runs that nothing has been done
|
||||
* Create groups for mgradm subcommands
|
||||
* Fix port number for billing API
|
||||
* Require podman >= 4.5.0 on RPM based systems only,
|
||||
do not require it for DEB based systems
|
||||
* Backend flag required in mgrpxy start
|
||||
* Fix mgrpxy backend detection
|
||||
* Extract PAYG data after setup to prevent a race condition
|
||||
* Fix IPv6 enabled detection (bsc#1224080)
|
||||
* Replace coco with better name in mgradm install help
|
||||
* Merge all email parameters into a single one
|
||||
* Disable all locales when running SUSEConnect register -s
|
||||
(bsc#1223483)
|
||||
* Simplify localized strings
|
||||
* Add parameters for the cloud service providers billing
|
||||
* Fix colors disabling in non-interactive runs
|
||||
* Add --purge-images flag for podman uninstalls
|
||||
* Add URL and admin username in the setup final message
|
||||
* Add support for /etc/uyuni/uyuni-tools.yaml conf file
|
||||
* Add flags for Apache and Squid tuning
|
||||
* Do not include DNS plugin in proxy uyuni net (bsc#1224127)
|
||||
* Call cloudguestregistryauth before upgrade
|
||||
* Change security-opts values to use = instead of :
|
||||
* Fix passing distro info as reference
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 06 10:00:48 CEST 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.9-0
|
||||
* Redact passwords from the API payload in traces
|
||||
* Fix build on Ubuntu 20.04 due to version change
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 03 16:32:03 CEST 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.8-0
|
||||
* Add 'mgradm support sql' command
|
||||
* Improve GPG help
|
||||
* podman-mount* flag should be used only on Server installation
|
||||
and migration
|
||||
* Add flag groups in help text
|
||||
* Attach Proxy pod to our Podman network
|
||||
* Create support ptf commands
|
||||
* Create mgrpxy upgrade command
|
||||
* Add domain for internal container network
|
||||
* Stop the Server if first user creation failed
|
||||
* Add localization support
|
||||
* Require Podman 4.5.0 for its --shm-size-systemd parameter
|
||||
* Add --podman-mount-www flag for install and migration
|
||||
* Only colorize output if outputting to a terminal
|
||||
* Fix output missing newlines due to the spinner
|
||||
* Add product version and commit id to the version output
|
||||
* Add missing whitespace between podman common arguments and
|
||||
additional ones
|
||||
* Bump the push tag to 5.0.0-RC
|
||||
* Add gpg command to mgradm
|
||||
* Hide message in stdout if SCCcredentials is missing
|
||||
(bsc#1222277)
|
||||
* Redact password in stdout and uyuni-tools.log
|
||||
* Rework distribution mapping to work with distros without
|
||||
.treeinfo data
|
||||
* Add initial installation support for Confidental Computing
|
||||
attestation container
|
||||
* Allow PAM and LDAP authentication using SSSD
|
||||
* Change pull policy default to Always during upgrade
|
||||
* Allow migration with non-root user on source server
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 16 13:33:34 CEST 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.7-0
|
||||
* Fix wrong cobbler spacewalk_authentication_endpoint property
|
||||
after upgrade or migration
|
||||
* Fix migration script using awk missing in migration image
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 08 17:40:38 CEST 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.6-0
|
||||
* Pull image from authenticated registry
|
||||
* Port 80 should be published to the port 80 of the containers.
|
||||
8080 is squid
|
||||
* Autogenerate the database password
|
||||
* Add mgrctl term command
|
||||
* Fix --version flag
|
||||
* Deny uyuni to suma upgrade and viceversa
|
||||
* Refactor upgrade to clarify script end adding post upgrade
|
||||
script (bsc#1219887)
|
||||
* Add mgradm install podman arguments to define big volumes storage
|
||||
* k8s migration use same functions as upgrade
|
||||
* Allow to use images from RPM if present
|
||||
* Schedule a system list refresh after migrate if not runned before
|
||||
* Ignore error on optional flag
|
||||
* Fix migration of multiple autoinstallable distributions
|
||||
* Obsolete uyuni-proxy-systemd-service package by mgrpxy
|
||||
* Add GitHub workflow for checking changelog
|
||||
* Allow installation using --image image:tag
|
||||
* Add command to register Peripheral server to Hub
|
||||
* Add Node exporter (9100) and Taskomatic (9800) ports to the list
|
||||
of open TCP ports
|
||||
* Fix minimal administrator password length
|
||||
* Do not assume the current host is a cluster node when getting
|
||||
kubelet version
|
||||
* Add mgrpxy start, stop and restart commands
|
||||
* Remove shm size constraints on the server
|
||||
* Add mgrpxy and mgradm status commands
|
||||
* Use uninstall commands dry run by default to avoid unintended
|
||||
removals
|
||||
* Make first user mandatory at install time
|
||||
* Add inspect and upgrade command
|
||||
* Improve error handling when exec.Command is used
|
||||
* Start/Stop/Restart command with kubernetes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 27 14:50:42 CET 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.5-0
|
||||
* Install aardvark-dns if netavark is installed (bsc#1220371)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 13 18:45:11 CET 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.4-1
|
||||
* Add mgradm start stop and restart commands
|
||||
* Do not build fish shell completion on Red Hat Enterprise Linux
|
||||
and clones
|
||||
* Stop services and database in podman server gracefully
|
||||
* tomcat and taskomatic should listen on all interfaces also in podman case
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 31 14:56:34 CET 2024 - rosuna@suse.com
|
||||
|
||||
- version 0.1.3-1
|
||||
* Add configuration help
|
||||
* Add a warning message for interactive shell
|
||||
* Accept image URLs with the tag already appended
|
||||
* Add mgradm supportconfig command
|
||||
* Verify if podman, kubectl or helm are installed before using them
|
||||
* Add migration of config files
|
||||
* Disable SELinux relabeling by Podman for migration container.
|
||||
Fixes SELinux access problems for SSH agent socket.
|
||||
* FQDN optional in command install for Podman
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 15 11:08:45 CET 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.2-1
|
||||
* Adapt the build tags also in the spec file
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 11 16:49:18 CET 2024 - marina.latini@suse.com
|
||||
|
||||
- version 0.1.1-1
|
||||
* Use tito for releasing
|
||||
* Use the latest git tag as version instead of hardcoding it
|
||||
* Comply to reuse.software rules for license documentation
|
||||
* Add shell autocompletions
|
||||
* Rename the tools to mgradm and mgrctl
|
||||
* Add postgres migration
|
||||
* Add migration of autoinstallable distributions
|
||||
* Add mgrpxy tool with install and uninstall subcommands
|
||||
* Merge /srv/www/ volumes and add one for /var/lib/salt
|
||||
* Build uyuniadm also for Tumbleweed and ALP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 13:24:46 UTC 2023 - Michele Bussolotto <michele.bussolotto@suse.com>
|
||||
|
||||
- Initial packaging of uyuni-tools 0.0.3
|
||||
* Create uyuniadm and uyunictl packages
|
||||
* Make it possible to build uyuniadm only on specific distro
|
4
uyuni-tools.obsinfo
Normal file
4
uyuni-tools.obsinfo
Normal file
@ -0,0 +1,4 @@
|
||||
name: uyuni-tools
|
||||
version: git-0.1f0e1eb
|
||||
mtime: 1718720716
|
||||
commit: 1f0e1eb416ba1218f47cb0ac01bffcb80fc6d9cc
|
516
uyuni-tools.spec
Normal file
516
uyuni-tools.spec
Normal file
@ -0,0 +1,516 @@
|
||||
#
|
||||
# spec file for package uyuni-tools
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global provider github
|
||||
%global provider_tld com
|
||||
%global org uyuni-project
|
||||
%global project uyuni-tools
|
||||
%global provider_prefix %{provider}.%{provider_tld}/%{org}/%{project}
|
||||
%global productname Uyuni
|
||||
%global version_details HEAD 1f0e1eb
|
||||
|
||||
%global namespace registry.opensuse.org/uyuni
|
||||
|
||||
%if 0%{?suse_version} >= 1600 || 0%{?sle_version} >= 150400 || 0%{?rhel} >= 8 || 0%{?fedora} >= 37 || 0%{?debian} >= 12 || 0%{?ubuntu} >= 2004
|
||||
%define adm_build 1
|
||||
%else
|
||||
%define adm_build 0
|
||||
%endif
|
||||
|
||||
%define name_adm mgradm
|
||||
%define name_ctl mgrctl
|
||||
%define name_pxy mgrpxy
|
||||
|
||||
# Completion files
|
||||
%if 0%{?debian} || 0%{?ubuntu}
|
||||
%define _zshdir %{_datarootdir}/zsh/vendor-completions
|
||||
%else
|
||||
%define _zshdir %{_datarootdir}/zsh/site-functions
|
||||
%endif
|
||||
# 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
Name: %{project}
|
||||
Version: 0.1.11
|
||||
Release: 0
|
||||
Summary: Tools for managing %{productname} container
|
||||
License: Apache-2.0
|
||||
Group: System/Management
|
||||
URL: https://%{provider_prefix}
|
||||
Source0: uyuni-tools-git-0.1f0e1eb.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: coreutils
|
||||
%if 0%{?debian} || 0%{?ubuntu}
|
||||
BuildRequires: gettext
|
||||
%endif
|
||||
# 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
BuildRequires: fish
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
BuildRequires: zsh
|
||||
# Get the proper Go version on different distros
|
||||
%if 0%{?suse_version}
|
||||
BuildRequires: golang(API) >= 1.20
|
||||
%endif
|
||||
# 0%{?suse_version}
|
||||
|
||||
%if 0%{?ubuntu}
|
||||
%define go_version 1.20
|
||||
BuildRequires: golang-%{go_version}
|
||||
%endif
|
||||
# 0%{?ubuntu}
|
||||
|
||||
%if 0%{?debian}
|
||||
BuildRequires: golang >= 1.20
|
||||
%endif
|
||||
# 0%{?debian}
|
||||
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
BuildRequires: golang >= 1.19
|
||||
%endif
|
||||
# 0%{?fedora} || 0%{?rhel}
|
||||
|
||||
|
||||
%description
|
||||
Tools for managing uyuni container.
|
||||
|
||||
|
||||
%if %{adm_build}
|
||||
|
||||
%package -n %{name_adm}
|
||||
Summary: Command line tool to install and update %{productname}
|
||||
%if 0%{?suse_version}
|
||||
Requires: (aardvark-dns if podman)
|
||||
Requires: (netavark if podman)
|
||||
%endif
|
||||
# 0%{?suse_version}
|
||||
%if "%{_vendor}" != "debbuild"
|
||||
Requires: (podman >= 4.5.0 if podman)
|
||||
%endif
|
||||
|
||||
%description -n %{name_adm}
|
||||
%{name_adm} is a convenient tool to install and update %{productname} components as containers running
|
||||
either on Podman or a Kubernetes cluster.
|
||||
|
||||
%package -n %{name_pxy}
|
||||
Summary: Command line tool to install and update %{productname} proxy
|
||||
Obsoletes: uyuni-proxy-systemd-services
|
||||
%if 0%{?suse_version}
|
||||
Requires: (netavark if podman)
|
||||
Requires: (aardvark-dns if podman)
|
||||
%endif
|
||||
# 0%{?suse_version}
|
||||
|
||||
%description -n %{name_pxy}
|
||||
%{name_pxy} is a convenient tool to install and update %{productname} proxy components as containers
|
||||
running either on Podman or a Kubernetes cluster.
|
||||
|
||||
%package -n %{name_adm}-bash-completion
|
||||
Summary: Bash Completion for %{name_adm}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_adm} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_adm} and bash-completion)
|
||||
%else
|
||||
Supplements: bash-completion
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_adm}-bash-completion
|
||||
Bash command line completion support for %{name_adm}.
|
||||
|
||||
%package -n %{name_adm}-zsh-completion
|
||||
Summary: Zsh Completion for %{name_adm}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_adm} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_adm} and zsh)
|
||||
%else
|
||||
Supplements: zsh
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_adm}-zsh-completion
|
||||
Zsh command line completion support for %{name_adm}.
|
||||
|
||||
%package -n %{name_pxy}-bash-completion
|
||||
Summary: Bash Completion for %{name_pxy}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_pxy} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_pxy} and bash-completion)
|
||||
%else
|
||||
Supplements: bash-completion
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_pxy}-bash-completion
|
||||
Bash command line completion support for %{name_pxy}.
|
||||
|
||||
%package -n %{name_pxy}-zsh-completion
|
||||
Summary: Zsh Completion for %{name_pxy}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_pxy} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_pxy} and zsh)
|
||||
%else
|
||||
Supplements: zsh
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_pxy}-zsh-completion
|
||||
Zsh command line completion support for %{name_pxy}.
|
||||
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
%package -n %{name_adm}-fish-completion
|
||||
Summary: Fish Completion for %{name_adm}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_adm} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_adm} and fish)
|
||||
%else
|
||||
Supplements: fish
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_adm}-fish-completion
|
||||
Fish command line completion support for %{name_adm}.
|
||||
|
||||
%package -n %{name_pxy}-fish-completion
|
||||
Summary: Fish Completion for %{name_pxy}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_pxy} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_pxy} and fish)
|
||||
%else
|
||||
Supplements: fish
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
|
||||
%description -n %{name_pxy}-fish-completion
|
||||
Fish command line completion support for %{name_pxy}.
|
||||
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
%endif
|
||||
# %{adm_build}
|
||||
|
||||
%package -n %{name_ctl}
|
||||
Summary: Command line tool to perform day-to-day operations on %{productname}
|
||||
|
||||
%description -n %{name_ctl}
|
||||
%{name_ctl} is a tool helping with dayly tasks on %{productname} components running as containers
|
||||
either on Podman or a Kubernetes cluster.
|
||||
|
||||
%package -n %{name_ctl}-bash-completion
|
||||
Summary: Bash Completion for %{name_ctl}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_ctl} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_ctl} and bash-completion)
|
||||
%else
|
||||
Supplements: bash-completion
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_ctl}-bash-completion
|
||||
Bash command line completion support for %{name_ctl}.
|
||||
|
||||
%package -n %{name_ctl}-zsh-completion
|
||||
Summary: Zsh Completion for %{name_ctl}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_ctl} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_ctl} and zsh)
|
||||
%else
|
||||
Supplements: zsh
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_ctl}-zsh-completion
|
||||
Zsh command line completion support for %{name_ctl}.
|
||||
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
%package -n %{name_ctl}-fish-completion
|
||||
Summary: Fish Completion for %{name_ctl}
|
||||
Group: System/Shells
|
||||
BuildArch: noarch
|
||||
Requires: %{name_ctl} = %{version}
|
||||
%if 0%{?suse_version} >= 150000
|
||||
Supplements: (%{name_ctl} and fish)
|
||||
%else
|
||||
Supplements: fish
|
||||
%endif
|
||||
# 0%{?suse_version} >= 150000
|
||||
|
||||
%description -n %{name_ctl}-fish-completion
|
||||
Fish command line completion support for %{name_ctl}.
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
# Only SUSE distros have a -lang packages, for the others they
|
||||
# will all be in the correspdonding tool package.
|
||||
%if 0%{?suse_version} || 0%{?sle_version}
|
||||
%lang_package -n %{name_ctl}
|
||||
%lang_package -n %{name_pxy}
|
||||
|
||||
%if %{adm_build}
|
||||
%lang_package -n %{name_adm}
|
||||
%endif
|
||||
# %{adm_build}
|
||||
|
||||
%endif
|
||||
# 0%{?suse_version} || 0%{?sle_version}
|
||||
|
||||
%prep
|
||||
%autosetup -n uyuni-tools-git-0.1f0e1eb -p1
|
||||
tar -zxf %{SOURCE1}
|
||||
|
||||
%build
|
||||
export GOFLAGS=-mod=vendor
|
||||
mkdir -p bin
|
||||
UTILS_PATH="%{provider_prefix}/shared/utils"
|
||||
|
||||
tag=5.0.0
|
||||
%if "%{?_default_tag}" != ""
|
||||
tag='%{_default_tag}'
|
||||
%endif
|
||||
# "%{?_default_tag}" != ""
|
||||
|
||||
pull_policy=%{!?_default_pull_policy:Always}
|
||||
%if "%{?_default_pull_policy}" != ""
|
||||
pull_policy='%{_default_pull_policy}'
|
||||
%endif
|
||||
# "%{?_default_pull_policy}" != ""
|
||||
|
||||
image=%{namespace}
|
||||
%if "%{?_default_namespace}" != ""
|
||||
namespace='%{_default_namespace}/%{_arch}'
|
||||
%endif
|
||||
# "%{?_default_namespace}" != ""
|
||||
|
||||
go_tags=""
|
||||
%if "%{?_uyuni_tools_tags}" != ""
|
||||
go_tags="-tags %{_uyuni_tools_tags}"
|
||||
%endif
|
||||
# "%{?_uyuni_tools_tags}" != ""
|
||||
|
||||
go_path=""
|
||||
%if 0%{?ubuntu}
|
||||
go_path=/usr/lib/go-%{go_version}/bin/
|
||||
%else
|
||||
%if "%{?_go_bin}" != ""
|
||||
go_path='%{_go_bin}/'
|
||||
%endif
|
||||
# "%{?_go_bin}" != ""
|
||||
|
||||
%endif
|
||||
# 0%{?ubuntu}
|
||||
|
||||
GOLD_FLAGS="-X '${UTILS_PATH}.Version=%{version} (%{version_details})' -X ${UTILS_PATH}.LocaleRoot=%{_datadir}/locale"
|
||||
if test -n "${namespace}"; then
|
||||
GOLD_FLAGS="${GOLD_FLAGS} -X ${UTILS_PATH}.DefaultNamespace=${namespace} -X ${UTILS_PATH}.DefaultTag=${tag}"
|
||||
fi
|
||||
|
||||
if test -n "${tag}"; then
|
||||
GOLD_FLAGS="${GOLD_FLAGS} -X ${UTILS_PATH}.DefaultTag=${tag}"
|
||||
fi
|
||||
|
||||
if test -n "${pull_policy}"; then
|
||||
GOLD_FLAGS="${GOLD_FLAGS} -X ${UTILS_PATH}.DefaultPullPolicy=${pull_policy}"
|
||||
fi
|
||||
|
||||
# Workaround for rpm on Fedora and EL clones not able to handle go's compressed debug symbols
|
||||
# Found compressed .debug_aranges section, not attempting dwz compression
|
||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 38
|
||||
GOLD_FLAGS="-compressdwarf=false ${GOLD_FLAGS}"
|
||||
%endif
|
||||
# 0%{?rhel} >= 8 || 0%{?fedora} >= 38
|
||||
|
||||
# Workaround for missing build-id on Fedora
|
||||
# error: Missing build-id in [...]
|
||||
%if 0%{?fedora} >= 38
|
||||
GOLD_FLAGS="-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') ${GOLD_FLAGS}"
|
||||
%endif
|
||||
# 0%{?fedora} >= 38
|
||||
|
||||
${go_path}go build ${go_tags} -ldflags "${GOLD_FLAGS}" -o ./bin ./...
|
||||
|
||||
%if ! %{adm_build}
|
||||
rm ./bin/%{name_adm}
|
||||
rm ./bin/%{name_pxy}
|
||||
%endif
|
||||
# ! %{adm_build}
|
||||
|
||||
%install
|
||||
install -m 0755 -vd %{buildroot}%{_bindir}
|
||||
install -m 0755 -vp ./bin/* %{buildroot}%{_bindir}/
|
||||
|
||||
# Generate the machine object files for localizations
|
||||
./locale/build.sh %{buildroot}%{_datadir}/locale/
|
||||
|
||||
%find_lang %{name_ctl}
|
||||
%if %{adm_build}
|
||||
%find_lang %{name_adm}
|
||||
%find_lang %{name_pxy}
|
||||
%else
|
||||
rm %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/%{name_adm}.mo
|
||||
rm %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/%{name_pxy}.mo
|
||||
%endif
|
||||
# %{adm_build}
|
||||
|
||||
# Completion files
|
||||
mkdir -p %{buildroot}%{_datarootdir}/bash-completion/completions/
|
||||
mkdir -p %{buildroot}%{_zshdir}
|
||||
|
||||
%{buildroot}/%{_bindir}/%{name_ctl} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name_ctl}
|
||||
%{buildroot}/%{_bindir}/%{name_ctl} completion zsh > %{buildroot}%{_zshdir}/_%{name_ctl}
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
mkdir -p %{buildroot}%{_datarootdir}/fish/vendor_completions.d/
|
||||
%{buildroot}/%{_bindir}/%{name_ctl} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name_ctl}.fish
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
%if %{adm_build}
|
||||
|
||||
%{buildroot}/%{_bindir}/%{name_adm} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name_adm}
|
||||
%{buildroot}/%{_bindir}/%{name_adm} completion zsh > %{buildroot}%{_zshdir}/_%{name_adm}
|
||||
|
||||
%{buildroot}/%{_bindir}/%{name_pxy} completion bash > %{buildroot}%{_datarootdir}/bash-completion/completions/%{name_pxy}
|
||||
%{buildroot}/%{_bindir}/%{name_pxy} completion zsh > %{buildroot}%{_zshdir}/_%{name_pxy}
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
%{buildroot}/%{_bindir}/%{name_adm} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name_adm}.fish
|
||||
%{buildroot}/%{_bindir}/%{name_pxy} completion fish > %{buildroot}%{_datarootdir}/fish/vendor_completions.d/%{name_pxy}.fish
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
%endif
|
||||
# %{adm_build}
|
||||
|
||||
%if %{adm_build}
|
||||
|
||||
# mgradm packages files
|
||||
|
||||
# Only SUSE distros have a -lang package
|
||||
%if 0%{?suse_version} || 0%{?sle_version}
|
||||
%files -n %{name_adm}-lang -f %{name_adm}.lang
|
||||
|
||||
%files -n %{name_adm}
|
||||
%else
|
||||
%files -n %{name_adm} -f %{name_adm}.lang
|
||||
%endif
|
||||
# 0%{?suse_version} || 0%{?sle_version}
|
||||
|
||||
%defattr(-,root,root)
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name_adm}
|
||||
|
||||
%files -n %{name_adm}-bash-completion
|
||||
%{_datarootdir}/bash-completion/completions/%{name_adm}
|
||||
|
||||
%files -n %{name_adm}-zsh-completion
|
||||
%{_zshdir}/_%{name_adm}
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
%files -n %{name_adm}-fish-completion
|
||||
%{_datarootdir}/fish/vendor_completions.d/%{name_adm}.fish
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
|
||||
# mgrpxy packages files
|
||||
|
||||
# Only SUSE distros have a -lang package
|
||||
%if 0%{?suse_version} || 0%{?sle_version}
|
||||
%files -n %{name_pxy}-lang -f %{name_pxy}.lang
|
||||
|
||||
%files -n %{name_pxy}
|
||||
%else
|
||||
%files -n %{name_pxy} -f %{name_pxy}.lang
|
||||
%endif
|
||||
# 0%{?suse_version} || 0%{?sle_version}
|
||||
|
||||
%defattr(-,root,root)
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name_pxy}
|
||||
|
||||
%files -n %{name_pxy}-bash-completion
|
||||
%{_datarootdir}/bash-completion/completions/%{name_pxy}
|
||||
|
||||
%files -n %{name_pxy}-zsh-completion
|
||||
%{_zshdir}/_%{name_pxy}
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
%files -n %{name_pxy}-fish-completion
|
||||
%{_datarootdir}/fish/vendor_completions.d/%{name_pxy}.fish
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
%endif
|
||||
# %{adm_build}
|
||||
|
||||
# mgrctl packages files
|
||||
|
||||
# Only SUSE distros have a -lang package
|
||||
%if 0%{?suse_version} || 0%{?sle_version}
|
||||
%files -n %{name_ctl}-lang -f %{name_ctl}.lang
|
||||
|
||||
%files -n %{name_ctl}
|
||||
%else
|
||||
%files -n %{name_ctl} -f %{name_ctl}.lang
|
||||
%endif
|
||||
# 0%{?suse_version} || 0%{?sle_version}
|
||||
|
||||
%defattr(-,root,root)
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{_bindir}/%{name_ctl}
|
||||
|
||||
%files -n %{name_ctl}-bash-completion
|
||||
%{_datarootdir}/bash-completion/completions/%{name_ctl}
|
||||
|
||||
%files -n %{name_ctl}-zsh-completion
|
||||
%{_zshdir}/_%{name_ctl}
|
||||
|
||||
%if 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
%files -n %{name_ctl}-fish-completion
|
||||
%{_datarootdir}/fish/vendor_completions.d/%{name_ctl}.fish
|
||||
%endif
|
||||
# 0%{?is_opensuse} || 0%{?fedora} || 0%{?debian} || 0%{?ubuntu}
|
||||
|
||||
%changelog
|
BIN
vendor.tar.gz
(Stored with Git LFS)
Normal file
BIN
vendor.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user