%global with_debug 0

%if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif

%global provider github
%global provider_tld com
%global project containers
%global repo %{name}
%global import_path %{provider}.%{provider_tld}/%{project}/%{repo}
%global git0 https://%{import_path}

Name: podman-tui
Version: 1.4.0
Release: dev.20250301024948834362.pr565.23.g8460ac45%{?dist}
Summary: Podman Terminal User Interface
License: ASL 2.0
URL: %{git0}
VCS: git+https://github.com/containers/podman-tui#8460ac45278a33df0b74fd5645fa71a8205a8f1a:
Source0: %{name}-1.4.0.tar.gz

BuildRequires: gcc
BuildRequires: golang >= 1.18.2
BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: glibc-static
BuildRequires: git-core
BuildRequires: go-rpm-macros
BuildRequires: make
%if 0%{?fedora} >= 35
BuildRequires: shadow-utils-subid-devel
%endif

%description
%{name} is a terminal user interface for Podman.

%prep
%setup -T -b 0 -q -n %{name}-1.4.0

%build
%set_build_flags
make binary

%install
install -dp %{buildroot}%{_bindir}
install -p ./bin/%{name} %{buildroot}%{_bindir}

%check

#define license tag if not already defined
%{!?_licensedir:%global license %doc}

%files
%license LICENSE
%doc docs/README.md
%{_bindir}/%{name}

%changelog
* Sun Dec 01 2024 Navid Yaghoobi <navidys@fedoraproject.org> 1.4.0-dev-1

* Sun Dec 01 2024 Navid Yaghoobi <navidys@fedoraproject.org> 1.3.0-1
- Bump github.com/containers/podman/v5 to v5.3.1
- Bump github.com/containers/buildah to v1.38.0
- Bump github.com/containers/common to v0.61.0
- Bump github.com/containers/storage to v1.56.0
- Fix event reader channel close after receiving first event

* Sat Aug 03 2024 Navid Yaghoobi <navidys@fedoraproject.org> 1.2.0-1
- New feature - secrets page
- Secret create and remove command
- Fix container exec error dialog hang
- Packit targets update
- Vagrant update to fedora 40
- Go version update 1.21.0
- README.md update
- Bump github.com/containers/podman/v5 from 5.1.0 to 5.2.0
- Bump github.com/containers/common from 0.59.1 to 0.59.2
- Bump golang.org/x/crypto from 0.23.0 to 0.25.0
- Bump github.com/gorilla/schema from 1.3.0 to 1.4.1
- Bump github.com/spf13/cobra from 1.8.0 to 1.8.1

* Sun Jun 02 2024 Navid Yaghoobi <navidys@fedoraproject.org> 1.1.0-1
- Bump github.com/containers/podman from 5.0.3 to 5.1.0
- Bump github.com/containers/buildah from 1.35.4 to 1.36.0
- Bump github.com/containers/storage from 1.53.0 to 1.54.0
- Bump github.com/containers/common from 0.58.3 to 0.59.0
- Bump github.com/BurntSushi/toml from 1.3.2 to 1.4.0
- Bump github.com/rs/zerolog from 1.32.0 to 1.33.0

* Sat May 11 2024 Navid Yaghoobi <navidys@fedoraproject.org> 1.0.1-1
- Bump github.com/containers/podman/v5 from 5.0.0 to 5.0.3
- Bump github.com/containers/buildah from 1.35.1 to 1.35.2
- Bump github.com/containers/common from 0.58.0 to 0.58.2
- Bump golang.org/x/crypto from 0.21.0 to 0.23.0
- Bump golang.org/x/net from 0.22.0 to 0.23.0
- Bump github.com/distribution/reference from 0.5.0 to 0.6.0

* Wed Mar 20 2024 Navid Yaghoobi <navidys@fedoraproject.org> 1.0.0-1
- Podman v5 support (5.0.0)
- Bump github.com/containers/buildah to v1.35.1
- Bump github.com/containers/common to v0.58.0
- Bump github.com/containers/storage to v1.53.0

* Sat Mar 16 2024 Navid Yaghoobi <navidys@fedoraproject.org> 0.18.0-1
- Resolves Substitute env variables in config file
- Golangci-lint update 1.56.2
- Unit tests
- Vagrantfile update (fedora 39)
- Github action update
- podman-tui installation via homebrew for Mac
- install.md update - ArchLinux (AUR)
- install.md update - Alpine Linux, AlmaLinux and Rocky Linux
- README.md update
- Bump github.com/containers/podman/v4 from 4.9.2 to 4.9.3
- Bump github.com/gdamore/tcell/v2 from 2.7.0 to 2.7.4
- Bump golang.org/x/crypto from 0.19.0 to 0.21.0
- Bump tim-actions/get-pr-commits from 1.3.0 to 1.3.1
- Bump codecov/codecov-action from 3 to 4
- Bump golang.org/x/crypto from 0.18.0 to 0.19.0
- Bump pre-commit/action from 3.0.0 to 3.0.1
- Bump github.com/rs/zerolog from 1.31.0 to 1.32.0
- Bump google.golang.org/protobuf from 1.31.0 to 1.33.0
- Bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3
- Bump gopkg.in/go-jose/go-jose.v2 from 2.6.1 to 2.6.3

* Sun Feb 04 2024 Navid Yaghoobi <navidys@fedoraproject.org> 0.17.0-1
- Bump github.com/containers/podman/v4 to 4.9.2
- Bump github.com/containers/common to 0.57.4
- Go version update to 1.20

* Sun Jan 21 2024 Navid Yaghoobi <navidys@fedoraproject.org> 0.16.0-1
- Bump github.com/containers/podman/v4 from 4.8.2 to 4.8.3
- Bump github.com/containerd/containerd from 1.7.9 to 1.7.11
- Bump golang.org/x/crypto from 0.17.0 to 0.18.0
- Bump github.com/containers/common from 0.57.1 to 0.57.2

* Wed Dec 20 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.15.0-1
- Bump golang.org/x/crypto from 0.16.0 to 0.17.0 [CVE-2023-48795]
- Bump github.com/gdamore/tcell/v2 from 2.6.0 to 2.7.0
- Bump github.com/containers/podman/v4 from 4.8.1 to 4.8.2

* Sat Dec 09 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.14.0-1
- Container create dialog - user/groups category options
- Container create dialog - environment category options
- Container create dialog - privileged and timeout options
- Bump github.com/containers/common from 0.57.0 to 0.57.1
- Bump github.com/containers/podman/v4 from 4.8.0 to 4.8.1
- Bump actions/stale from 8 to 9
- Bump actions/setup-python from 4 to 5
- Bump actions/setup-go from 4 to 5

* Fri Dec 01 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.13.0-1
- EPEL rpm package
- Adding container create mount inputfield option
- Use inputfield for container create volume option
- Github action update
- Docs update - add Gentoo in packaged versions
- Running golangci-lint on ui package
- Running golangci-lint on app package
- Running golangci-lint on config package
- Running golangci-lint on cmd package
- Bump github.com/containers/podman/v4 from 4.7.2 to 4.8.0
- Bump golang.org/x/crypto from 0.15.0 to 0.16.0
- Bump github.com/navidys/tvxwidgets from 0.4.0 to 0.4.1
- Bump github.com/go-jose/go-jose/v3 from 3.0.0 to 3.0.1
- Bump github.com/containers/storage from 1.50.2 to 1.51.0

* Sat Nov 11 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.12.0-1
- Bump github.com/containers/buildah from 1.31.2 to 1.32.2
- Bump github.com/containers/podman/v4 from 4.6.2 to 4.7.2
- GH action update
- Using github.com/distribution/reference
- Bump github.com/docker/distribution
- Bump github.com/docker/docker
- Bump google.golang.org/grpc from 1.57.0 to 1.57.1
- Bump golang.org/x/net from 0.13.0 to 0.17.0
- Bump golang.org/x/crypto from 0.13.0 to 0.15.0
- Update ginkgo cli version to 2.11.0
- Bump github.com/spf13/cobra from 1.7.0 to 1.8.0
- Running codespell
- Bump github.com/rs/zerolog from 1.30.0 to 1.31.0
- Bump github.com/containers/storage from 1.48.0 to 1.50.2
- Bump github.com/navidys/tvxwidgets from 0.3.0 to 0.4.0
- Bump github.com/containers/podman/v4 from 4.6.1 to 4.6.2
- Bump github.com/cyphar/filepath-securejoin from 0.2.3 to 0.2.4
- Bump github.com/docker/docker
- Bump golang.org/x/crypto from 0.12.0 to 0.13.0
- Bump actions/checkout from 3 to 4
- Bump tim-actions/commit-message-checker-with-regex from 0.3.1 to 0.3.2

* Sun Aug 20 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.11.0-1
- Fix missing volume list created time column
- Bump github.com/containers/podman/v4 to 4.6.1
- Vagrantfile update (fedora-38 image)
- Bump github.com/containers/buildah from 1.31.1 to 1.31.2
- Bump github.com/containers/common from 0.55.2 to 0.55.3
- Bump golang.org/x/crypto from 0.11.0 to 0.12.0
- Bump github.com/docker/docker
- Bump github.com/rs/zerolog from 1.29.1 to 1.30.0
- Bump github.com/containers/buildah from 1.30.0 to 1.31.1
- Bump github.com/containers/common from 0.53.0 to 0.55.2
- Bump golang.org/x/crypto from 0.10.0 to 0.11.0
- Bump github.com/containers/storage from 1.46.1 to 1.48.0
- Bump golang.org/x/crypto from 0.9.0 to 0.10.0
- Bump github.com/BurntSushi/toml from 1.2.1 to 1.3.2
- Bump github.com/docker/docker
- Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
- Bump github.com/containers/podman/v4 from 4.5.0 to 4.5.1
- Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
- Bump github.com/docker/distribution
- Bump github.com/sigstore/rekor from 1.1.0 to 1.2.0
- Bump tim-actions/get-pr-commits from 1.2.0 to 1.3.0
- Bump github.com/containers/common from 0.52.0 to 0.53.0
- Bump github.com/rs/zerolog from 1.29.0 to 1.29.1

* Sun Apr 16 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.10.0-1
- Packit update - remove centos stream build
- Golangci-lint system package
- Package ui/styles - applying golint
- Package ui/infobar - applying golint
- Package ui/help - applying golint
- Package ui/volumes code improvement and golint
- Adding container attach command to container page/view
- Fix container create error without health options
- Add container health options to the container create dialog
- Add packit configuration to build RPM as part of PR tests
- Update unit tests and github workflow for running the tests
- Fix container create error when volume is selected
- Update github workflow golang version to 1.18.8
- Golangci-lint update to v1.51.1
- Fix vendor + codepsell
- Unit tests fix
- Bump github.com/containers/podman/v4 to 4.5.0
- Bump actions/stale from 7 to 8
- Bump github.com/containers/common
- Bump github.com/docker/docker
- Bump github.com/containers/podman/v4 to 4.4.4
- Bump github.com/spf13/cobra from 1.6.1 to 1.7.0
- Bump github.com/containers/storage from 1.45.4 to 1.46.0
- Bump actions/setup-go from 3 to 4
- Bump golang.org/x/crypto from 0.6.0 to 0.7.0

* Sun Mar 05 2023 Navid Yaghoobi <navidys@fedoraproject.org> 0.9.0-1
- New feature - container healthcheck
- UI style update
- Displaying progressbar before container logs command
- Adding published port feature to pod create dialog
- Removing empty first row in container and network UI create dialogs
- Removing command dialog  button to improve usability
- Podman-tui container image build/push to quay.io
- Workflow update - fix unit test failure
- Github workflow update
- Fix build issue (vendor)
- Vagrant box update to fc37
- Bump podman/v4 to 4.4.2
- Bump github.com/containers/storage from 1.45.3 to 1.45.4
- Bump github.com/onsi/ginkgo/v2 from 2.8.3 to 2.8.4
- Bump github.com/onsi/gomega from 1.27.1 to 1.27.2
- Bump github.com/onsi/ginkgo/v2 from 2.6.0 to 2.8.3
- Bump github.com/gdamore/tcell/v2
- Bump golang.org/x/net from 0.6.0 to 0.7.0
- Bump github.com/containerd/containerd from 1.6.12 to 1.6.18
- Bump github.com/docker/docker
- Bump golang.org/x/crypto from 0.5.0 to 0.6.0
- Bump github.com/docker/docker
- Bump github.com/rs/zerolog from 1.28.0 to 1.29.0
- Bump github.com/containerd/containerd from 1.6.8 to 1.6.12
- Bump github.com/sylabs/sif/v2 from 2.8.0 to 2.8.1
- Bump github.com/docker/docker
- Bump golang.org/x/crypto from 0.4.0 to 0.5.0
- Bump actions/stale from 6 to 7
- Bump github.com/navidys/tvxwidgets from 0.2.0 to 0.3.0
- Bump github.com/docker/docker
- Bump github.com/onsi/ginkgo/v2 from 2.5.1 to 2.6.0
- Bump golang.org/x/crypto from 0.3.0 to 0.4.0
- Bump actions/checkout from 2 to 3
- Bump github.com/containers/buildah from 1.28.1 to 1.28.2
- Bump github.com/containers/buildah from 1.28.0 to 1.28.1
- Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1
- Bump actions/setup-python from 3 to 4
- Bump golang.org/x/crypto from 0.1.0 to 0.3.0
- Bump github.com/containers/podman/v4 from 4.3.0 to 4.3.1
- Bump github.com/onsi/gomega from 1.24.0 to 1.24.1
- Bump github.com/containers/storage from 1.43.0 to 1.44.0
- Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0
- Bump github.com/navidys/tvxwidgets from 0.1.1 to 0.2.0

* Sun Nov 06 2022 Navid Yaghoobi <navidys@fedoraproject.org> 0.7.0-1
- New feature - container restore
- New feature - container checkpoint
- Cirrus + golangci update
- Fix vendoring failure
- Config and pdcs update for podman v4.3.0
- Check for gha updates daily with dependabot
- Static build support
- Fix test failure for utils and network disconnect dialog
- Bump github.com/containers/podman/v4 from 4.2.1 to 4.3.0
- Bump github.com/containers/buildah from 1.27.2 to 1.28.0
- Bump github.com/containers/common from 0.49.1 to 0.50.1
- Bump actions/checkout from 2 to 3
- Bump actions/stale from 1 to 6
- Bump tim-actions/get-pr-commits from 1.1.0 to 1.2.0
- Bump github.com/docker/docker from 20.10.20+incompatible to 20.10.21+incompatible
- Bump github.com/onsi/gomega from 1.22.1 to 1.24.0
- Bump github.com/spf13/cobra from 1.6.0 to 1.6.1
- Bump github.com/BurntSushi/toml from 1.2.0 to 1.2.1
- Bump github.com/onsi/ginkgo/v2 from 2.3.1 to 2.4.0
- Bump github.com/docker/docker from 20.10.19+incompatible to 20.10.20+incompatible
- Bump github.com/docker/docker from 20.10.18+incompatible to 20.10.19+incompatible
- Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1
- Bump github.com/onsi/gomega from 1.22.0 to 1.22.1
- Bump github.com/onsi/ginkgo/v2 from 2.2.0 to 2.3.0
- Bump github.com/onsi/gomega from 1.21.1 to 1.22.0
- Bump github.com/spf13/cobra from 1.5.0 to 1.6.0
- Bump github.com/onsi/gomega from 1.20.2 to 1.21.1
- Bump github.com/containers/buildah from 1.27.1 to 1.27.2
- Bump github.com/onsi/ginkgo/v2 from 2.1.6 to 2.2.0
- Bump github.com/docker/docker  20.10.17+incompatible to 20.10.18+incompatible
- Bump github.com/containers/buildah from 1.27.0 to 1.27.1

* Sun Sep 11 2022 Navid Yaghoobi <navidys@fedoraproject.org> 0.6.0-1
- new feature - network disconnect
- adding approvers to OWNERS file + running codespell
- new feature - network connect
- Fix flaky tests
- Fix typos
- Running golangci-lint on pdcs/pods, pcs/containers
- running golangci-lint on pdcs/images
- Makefile target to run codespell
- running golangci-lint on pdcs/sysinfo
- running golangci-lint on pdcs/networks
- running golangci-lint on pdcs/volumes
- running golangci-lint on pdcs/registry and pdcs/utils
- Makefile - install golangci-lint and codespell tools
- Bump github.com/containers/podman/v4 from 4.2.0 to 4.2.1
- Bump github.com/docker/go-units from 0.4.0 to 0.5.0
- Bump github.com/onsi/gomega from 1.20.1 to 1.20.2
- Bump github.com/onsi/ginkgo/v2 from 2.1.4 to 2.1.6
- Bump github.com/rs/zerolog from 1.27.0 to 1.28.0
- Bump github.com/containers/podman/v4 from 4.1.1 to 4.2.0
- Bump github.com/containers/buildah from 1.26.4 to 1.27.0
- Bump github.com/containers/buildah from 1.26.2 to 1.26.4
- Bump github.com/containers/common from 0.48.0 to 0.49.0
- Bump github.com/containers/storage from 1.41.0 to 1.42.0
- Bump github.com/BurntSushi/toml from 1.1.0 to 1.2.0
- Bump github.com/onsi/gomega from 1.19.0 to 1.20.0
- Bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0
- Bump github.com/containers/buildah from 1.26.1 to 1.26.2
- Bump github.com/navidys/tvxwidgets from 0.1.0 to 0.1.1

* Sat Jul 02 2022 Navid Yaghoobi <navidys@fedoraproject.org> 0.5.0-1
- feature - image push
- feature - container commit
- using images.GetImage function for image inspect
- show confirmation dialog in the center of different views
- disk usage dialog table headers color update
- Esc key shall not close dialogs if its dropdown widgets has focus
- infobar + help color update for headers
- image history dialog update
- update button labels based on their function
- code coverage for network and volume create dialogs
- code coverage for ui/utils
- makefile update - darwin build
- docs: adding templates for bug report and features
- docs: adding security policy
- docs: Mac build
- Bump github.com/containers/podman/v4 from 4.1.0 to 4.1.1
- Bump github.com/docker/docker
- Bump github.com/rs/zerolog from 1.26.1 to 1.27.0
- Bump github.com/spf13/cobra from 1.4.0 to 1.5.0

* Thu Jun 02 2022 Navid Yaghoobi <n.yaghoobi.s@gmail.com> 0.4.0-1
- new ui color theme
- CI setup
- update vagrant box to Fedora 36
- pre-commit configuration and fixes
- Bump github.com/docker/docker
- Bump github.com/containers/storage from 1.40.2 to 1.41.0
- doc update - install.md
- pod/container top dialog ui update
- image history dialog ui update
- container stats dialog ui update
- image search/pull dialog ui update
- sort categories for pod/containers create and image build dialogs
- code coverage for ui/dialogs package
- Bump github.com/containers/podman/v4 from 4.0.3 to 4.1.0
- Bump github.com/containers/buildah from 1.25.1 to 1.26.1
- Bump github.com/containers/common from 0.47.5 to 0.48.0
- Bump github.com/containers/storage from 1.40.0 to 1.40.2
- Bump github.com/containers/storage from 1.39.0 to 1.40.0
- exec terminal update (automatic resize and detach)
- adding image tree command
- adding security options fields to pod create dialog
- adding container create security options fields
- adding format and security options fields to image build dialog
- doc update
- windows support
- removing unused connection dialog
- fixing golint
- removing image index from name field string search result

* Sun Mar 27 2022 Navid Yaghoobi <n.yaghoobi.s@gmail.com> 0.3.0-1
- Bump github.com/docker/docker
- networks screen refresh after network prune command
- container screen refresh after container rename command
- displaying pogressbar for pod create command
- do not write to log file if debug mode is not enabled
- Bump github.com/containers/common from 0.47.4 to 0.47.5
- add a dependabot config to automate vendoring (#29)
- podman-tui-image Containerfile
- docs update
- tests - system connections
- new feature - system connections
- docs update + golint + codespell
- image search dialog update to display all columns
- set message dialog min width
- tests update for podman v4
- pods ui + pdcs update for podman v4
- container ui + pdcs update for podman v4
- networks ui + pdcs update for podman v4
- upgrade to podman v4 API
- Bump to v0.3.0-dev

* Thu Mar 10 2022 Navid Yaghoobi <n.yaghoobi.s@gmail.com> 0.2.0-1
- update install.md - made shell commands more accessible to those who copy/paste
- install.md
- tests update + codespell
- doc update
- keybindings improvement + help screen + ui update
- keybindings improvement + help screen + ui update
- readme: add AUR mention
- tests update: update wait time + command index for container and pod
- command dialog layout/height update to fit in different terminal heights
- dropdown primitive list style update
- docs update - API >= 3.1 and build dependencies
- new feature - pod stats
- Run codespell on code
- new feature - pod stats
- misc update - rpm prep
- new feature - container stats
- fix error with running tests via root account
- remove invalid --noheadings/--noheading option from tests podman query
- vagrant vm box update to fc35
- tests
- functionality tests
- github workflow (DCO, PR stale and subject length check)
- rpm spec (rpkg) and release script to bump version
- error message format update in error message dialog and application logs
- container exec error dialog: missing error message string
- remove volume destination field from container create dialog
- bugfix: network table not refreshing after remove
- container exec (new feature)
- Remove trailing "/" from Makefile (#1)

* Sat Jan 22 2022 Navid Yaghoobi <n.yaghoobi.s@gmail.com> - v0.1.0-1
- Initial release