Skip to content

Instantly share code, notes, and snippets.

@AldoMX
Last active September 2, 2026 15:46
Show Gist options
  • Select an option

  • Save AldoMX/b7d9cf2a470811c8985338987604f8ff to your computer and use it in GitHub Desktop.

Select an option

Save AldoMX/b7d9cf2a470811c8985338987604f8ff to your computer and use it in GitHub Desktop.
Build KIO S3 1.0.2 as a self-contained Fedora 44 RPM using Podman, with the required AWS SDK components statically linked and rpm-ostree installation instructions.

Building KIO S3 as an RPM on Fedora 44

This RPM spec builds the KDE kio-s3 worker for Fedora 44. It is intended primarily for Fedora Kinoite and other rpm-ostree-based Fedora desktops, but the resulting RPM can also be installed on a traditional Fedora system.

The Fedora repositories do not currently provide the AWS SDK for C++. Consequently, these instructions build the required core and s3 components of AWS SDK for C++ as position-independent static libraries. They are linked into the KIO worker, so the installed RPM does not require a separate AWS SDK package.

The spec builds the following pinned sources:

  • KIO S3 snapshot 4d1179e (upstream version 1.0.2)
  • AWS SDK for C++ 1.11.884

The RPM is unsigned and intended as a local/community build. Review the spec and sources before installing it.

Requirements

  • An x86-64 Fedora 44 host
  • Podman
  • Approximately 5 GB of free disk space for the build container
  • At least 4 GB of RAM; more is preferable while compiling the AWS SDK
  • kio-s3.spec and this README in the same directory

1. Download KIO S3

From the directory containing kio-s3.spec:

git clone https://invent.kde.org/network/kio-s3.git
cd kio-s3
git checkout 4d1179e480482cb13e62d3887956be6ad62dede3

The statically built SDK exports a ZLIB::ZLIB CMake target dependency. Add Zlib discovery immediately before KIO S3 looks for AWSSDK:

sed -i '/find_package(AWSSDK REQUIRED COMPONENTS)/i find_package(ZLIB REQUIRED)\n' CMakeLists.txt
cd ..

2. Create the build container

The source directory is mounted at /workspace/kio-s3, and the spec is mounted read-only at /workspace/kio-s3.spec:

podman run --name kio-s3-rpmbuild -d \
  -v "$PWD/kio-s3:/workspace/kio-s3:Z" \
  -v "$PWD/kio-s3.spec:/workspace/kio-s3.spec:ro,Z" \
  registry.fedoraproject.org/fedora:44 sleep infinity

Install the RPM toolchain and the KIO S3 build dependencies:

podman exec kio-s3-rpmbuild dnf install -y \
  --setopt=install_weak_deps=False \
  rpm-build rpmdevtools cmake ninja-build gcc-c++ git tar \
  extra-cmake-modules qt6-qtbase-devel \
  kf6-kcmutils-devel kf6-kdoctools-devel kf6-ki18n-devel \
  kf6-kio-devel kf6-kirigami-addons-devel \
  libcurl-devel openssl-devel zlib-ng-compat-devel

3. Build the AWS SDK

Clone the pinned SDK release and its submodules:

podman exec kio-s3-rpmbuild git clone \
  --branch 1.11.884 --depth 1 \
  --recurse-submodules --shallow-submodules \
  https://github.com/aws/aws-sdk-cpp.git /root/aws-sdk-cpp

Configure only the required S3 components as static, position-independent libraries, then install them in the container under /opt/aws-sdk:

podman exec kio-s3-rpmbuild cmake \
  -S /root/aws-sdk-cpp -B /root/aws-sdk-build -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DBUILD_ONLY=s3 \
  -DBUILD_SHARED_LIBS=OFF \
  -DENABLE_TESTING=OFF \
  -DAUTORUN_UNIT_TESTS=OFF \
  -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
  -DCMAKE_INSTALL_PREFIX=/opt/aws-sdk

podman exec kio-s3-rpmbuild cmake \
  --build /root/aws-sdk-build --parallel 2

podman exec kio-s3-rpmbuild cmake \
  --install /root/aws-sdk-build

Increase --parallel 2 if the machine has sufficient memory.

4. Build the RPM

Create the RPM build tree and a source archive containing the checked-out snapshot and the Zlib CMake fix:

podman exec kio-s3-rpmbuild mkdir -p \
  /root/rpmbuild/SOURCES /root/rpmbuild/SPECS

podman exec kio-s3-rpmbuild tar \
  --exclude=.git \
  --transform='s,^,kio-s3-1.0.2/,' \
  -czf /root/rpmbuild/SOURCES/kio-s3-1.0.2.tar.gz \
  -C /workspace/kio-s3 .

podman exec kio-s3-rpmbuild cp \
  /workspace/kio-s3.spec /root/rpmbuild/SPECS/

podman exec kio-s3-rpmbuild rpmbuild \
  -ba /root/rpmbuild/SPECS/kio-s3.spec

Both the AppStream validation test and the KIO S3 URL unit test run during the RPM build. A failed test causes the build to fail.

Copy the installable RPM out of the container:

mkdir -p "$HOME/Documents/rpm"

podman cp \
  kio-s3-rpmbuild:/root/rpmbuild/RPMS/x86_64/kio-s3-1.0.2-0.1.20260826git4d1179e.fc44.x86_64.rpm \
  "$HOME/Documents/rpm/"

Optional debuginfo, debugsource, and source RPMs remain in the container under /root/rpmbuild/RPMS and /root/rpmbuild/SRPMS.

5. Install on an rpm-ostree system

Layer the local RPM and reboot into the new deployment:

sudo rpm-ostree install \
  "$HOME/Documents/rpm/kio-s3-1.0.2-0.1.20260826git4d1179e.fc44.x86_64.rpm"

systemctl reboot

After rebooting, configure AWS credentials using the standard AWS credentials/config files, then open an S3 location in Dolphin:

dolphin s3://

See the upstream README for named profiles and S3-compatible endpoint configuration:

https://invent.kde.org/network/kio-s3

Removing the package

sudo rpm-ostree uninstall kio-s3
systemctl reboot

Cleaning up the build container

After copying any artifacts you want to keep:

podman rm -f kio-s3-rpmbuild

Removing the container deletes its build tree, SDK checkout, source RPM, and debug packages. It does not delete the host-side kio-s3 checkout or any RPM already copied to the host.

Name: kio-s3
Version: 1.0.2
Release: 0.1.20260826git4d1179e%{?dist}
Summary: KIO worker for Amazon S3 and S3-compatible storage
License: GPL-2.0-or-later AND BSD-3-Clause AND CC0-1.0
URL: https://invent.kde.org/network/kio-s3
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake-rpm-macros
BuildRequires: extra-cmake-modules
BuildRequires: gcc-c++
BuildRequires: kf6-kcmutils-devel
BuildRequires: kf6-kdoctools-devel
BuildRequires: kf6-ki18n-devel
BuildRequires: kf6-kio-devel
BuildRequires: kf6-kirigami-addons-devel
BuildRequires: qt6-qtbase-devel
Provides: bundled(aws-sdk-cpp) = 1.11.884
%description
KIO S3 lets KIO-aware applications such as Dolphin access and manage Amazon
S3 buckets and compatible object-storage services.
%prep
%autosetup
%build
%cmake -G Ninja -DCMAKE_PREFIX_PATH=/opt/aws-sdk
%cmake_build
%install
%cmake_install
%find_lang kio5_s3 --with-html
%check
%ctest
%files -f kio5_s3.lang
%license LICENSES/*
%{_libdir}/qt6/plugins/kf6/kio/s3.so
%{_libdir}/qt6/plugins/plasma/kcms/systemsettings/kcm_kio_s3.so
%{_datadir}/applications/kcm_kio_s3.desktop
%doc %{_datadir}/doc/HTML/*/kioworker6/s3/
%{_datadir}/metainfo/org.kde.kio_s3.metainfo.xml
%{_datadir}/remoteview/s3-network.desktop
%changelog
* Wed Aug 26 2026 Local Builder <local@localhost> - 1.0.2-0.1.20260826git4d1179e
- Build upstream snapshot 4d1179e for Fedora 44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment