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.
- 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.specand this README in the same directory
From the directory containing kio-s3.spec:
git clone https://invent.kde.org/network/kio-s3.git
cd kio-s3
git checkout 4d1179e480482cb13e62d3887956be6ad62dede3The 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 ..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 infinityInstall 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-develClone 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-cppConfigure 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-buildIncrease --parallel 2 if the machine has sufficient memory.
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.specBoth 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.
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 rebootAfter 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
sudo rpm-ostree uninstall kio-s3
systemctl rebootAfter copying any artifacts you want to keep:
podman rm -f kio-s3-rpmbuildRemoving 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.