%{?nodejs_find_provides_and_requires} %{?nodejs_default_filter} %global _libpkgdir %{_libdir}/%{name} %global _icondir %{_datadir}/icons/hicolor/512x512/apps %global debug_package %{nil} Name: podman-desktop Version: 1.24.2 Release: 2%{?dist} Summary: Manage Podman and other container engines from a single UI and tray License: Apache-2.0 URL: https://github.com/containers/%{name} Source0: %{url}/archive/v%{version}.tar.gz Source1: %{name}.desktop Patch0: 0001-remove-post-install-browser-download.patch Patch1: 0002-remove-flatpak-build-option-electron-fuses-and-remote-extension-download.patch Patch2: 0003-remove-playwright-image-prebuilt.patch BuildRequires: nodejs-electron-devel BuildRequires: pnpm BuildRequires: nodejs-devel BuildRequires: nodejs-packaging BuildRequires: git-core BuildRequires: nodejs-npm Requires: nodejs-electron%{?_isa} Requires: podman Suggests: libappindicator-gtk3 ExclusiveArch: x86_64 aarch64 %description %{summary} %prep %autosetup -p1 -n %{name}-%{version} %build export ELECTRON_SKIP_BINARY_DOWNLOAD=1 export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 export MODE=production export USE_SYSTEM_FPM="true" export COREPACK_ENABLE_STRICT=0 export CXXFLAGS="%{optflags}" # pnpm install is required as dev-deps are needed for the build. # --prod cannot be used, which is why we must vendor dependencies. pnpm install --ignore-scripts # For some reason nodejs-electron's node has a few undefined http methods # To avoid crashing on startup, add optional chain sed -i 's/method.toLowerCase()/method?.toLowerCase()/g' node_modules/methods/index.js pnpm run build pnpm electron-builder build --linux dir --universal --config .electron-builder.config.cjs -c.electronDist=%{_libdir}/electron -c.asar=false -c.nodeGypRebuild=false -c.npmRebuild=false %install # Remove .vscode directories from node_modules rm -rf dist/linux-universal-unpacked/resources/app/node_modules/docker-modem/.vscode rm -rf dist/linux-universal-unpacked/resources/app/node_modules/dockerode/.vscode # Remove windows-specific win-ca rm -rf dist/linux-universal-unpacked/resources/app/node_modules/win-ca # Remove sources an other files that should not be shipped find dist/linux-universal-unpacked/resources/app -name '*.c' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.cc' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.cpp' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.h' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.m' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.map' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.ts' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name 'vite.config.*' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name tsconfig.json -type f -print -delete find dist/linux-universal-unpacked/resources/app -name build.js -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.tsx' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.gyp' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.gypi' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.mk' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.Makefile' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '.eslint*' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name .editorconfig -type f -print -delete find dist/linux-universal-unpacked/resources/app -name .nvmrc -type f -print -delete find dist/linux-universal-unpacked/resources/app -name .nycrc -type f -print -delete find dist/linux-universal-unpacked/resources/app -name Makefile -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '.jscs*' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name obj.target -print0 |xargs -r0 -- rm -rvf -- find dist/linux-universal-unpacked/resources/app -name '*.d' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name .vscode -type d -print -delete # Remove zero-length files find dist/linux-universal-unpacked/resources/app -size 0 -print -delete # Remove files for excluded architectures # Since we only build for x86_64 and aarch64, remove pre-built binaries for other platforms rm -rf dist/linux-universal-unpacked/resources/app/node_modules/*/prebuilds/*-arm rm -rf dist/linux-universal-unpacked/resources/app/node_modules/*/prebuilds/*-ia32 rm -rf dist/linux-universal-unpacked/resources/app/node_modules/*/prebuilds/*-mips* rm -rf dist/linux-universal-unpacked/resources/app/node_modules/*/prebuilds/android-* #Documentation find dist/linux-universal-unpacked/resources/app -name '*.md' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.markdown' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.bnf' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name '*.mli' -type f -print -delete find dist/linux-universal-unpacked/resources/app -name CHANGES -type f -print -delete find dist/linux-universal-unpacked/resources/app -name TODO -type f -print -delete find dist/linux-universal-unpacked/resources/app -name usage.txt -type f -print -delete # Remove empty directories find dist/linux-universal-unpacked/resources/app -type d -empty -print -delete find dist/linux-universal-unpacked/resources/app -type f \( -name "*.bare" -o -name "*.node" -o -perm /111 \) -exec %{__strip} {} \; 2>/dev/null || : # remove dotfiles find dist/linux-universal-unpacked/resources/app -type f -name ".*" -print -delete # fix file mode find dist/linux-universal-unpacked/resources/app -type f -exec chmod 0644 {} \; find dist/linux-universal-unpacked/resources/app -name '*.node' -exec chmod 0755 {} \; # Remove the shebang line from any script within the bundled app directory. # The main application does not need these internal scripts to be shell-executable. find dist/linux-universal-unpacked/resources/app -type f -print0 | xargs -0 grep -lZ -E "^#!" | xargs -r0 sed -i -e '1{/^#\!/d}' # Install everything to /usr/lib/podman-desktop install -dp %{buildroot}%{_libpkgdir} cp -Rp dist/linux-universal-unpacked/* %{buildroot}%{_libpkgdir} # Install icon install -dp %{buildroot}%{_icondir} install -Dp -m0644 buildResources/icon-512x512.png %{buildroot}%{_icondir}/%{name}.png # Install desktop file install -dp %{buildroot}%{_datadir}/applications install -Dp -m0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop # Symlink main binary to /usr/bin install -dp %{buildroot}%{_bindir} ln -s ../%{_lib}/%{name}/%{name} %{buildroot}%{_bindir}/%{name} %files %license LICENSE %doc CODE-OF-CONDUCT.md CONTRIBUTING.md README.md SECURITY.md %{_bindir}/%{name} %{_libpkgdir} %{_icondir}/%{name}.png %{_datadir}/applications/%{name}.desktop %changelog * Sat Dec 13 2025 curtisy - 1.24.2-2 - Clean up packaging in spec file to adhere more to Fedora packaging guidelines * Sat Dec 13 2025 curtisy - 1.24.2-1 - New upstream release - 1.24.2 * Fri Dec 12 2025 curtisy - 1.24.1-1 - New upstream release - 1.24.1 * Mon Dec 08 2025 curtisy - 1.24.0-1 - New upstream release - 1.24.0 * Thu Nov 13 2025 curtisy - 1.23.1-1 - New upstream release - 1.23.1 * Thu Nov 13 2025 curtisy - 1.23.0-1 - New upstream release - 1.23.0 * Wed Oct 15 2025 curtisy - 1.22.1-1 - New upstream release - 1.22.1 * Wed Oct 01 2025 curtisy - 1.22.0-1 - New upstream release - 1.22.0 * Fri Aug 22 2025 curtisy - 1.21.0-1 - New upstream release - 1.21.0 * Mon Jul 21 2025 curtisy - 1.20.2-1 - New upstream release - 1.20.2 * Fri Jul 11 2025 curtisy - 1.20.1-1 - New upstream release - 1.20.1 * Tue Jul 08 2025 curtisy - 1.20.0-1 - New upstream release - 1.20.0 * Tue Jul 08 2025 curtisy - 1.19.2-1 - New upstream release - 1.19.2 * Tue May 27 2025 curtisy - 1.19.1-1 - New upstream release - 1.19.1 * Fri Apr 18 2025 curtisy - 1.18.0-1 - New upstream release - 1.18.0 * Fri Mar 21 2025 curtisy - 1.17.2-1 - New upstream release * Mon Mar 10 2025 curtisy - 1.17.1-1 - New upstream release * Fri Feb 07 2025 curtisy - 1.16.1-2 - Require podman * Fri Feb 07 2025 curtisy - 1.16.1-1 - Update to new minor version * Sun Feb 02 2025 curtisy - 1.16.0-1 - Initial version of the package