Comment
The change is low risk and appears to be a packaging-path fix only. It relocates the installed Swift tree from /usr/lib/swift to /usr/lib/swift/usr and updates internal symlinks and ld.so.conf.d accordingly. There are no new network fetches, privilege escalations, post-install scripts, or suspicious binaries/patches introduced by this diff. The only notable issue is that the new ld.so.conf line is single-quoted, so it will literally write '${_swift_root}/lib/swift/linux' instead of expanding the variable, which looks like a packaging bug rather than a security problem. Overall this does not introduce a meaningful security risk.
@@ -34,13 +35,13 @@ package() {
if [[ $CARCH == "aarch64" ]]; then
_archsuffix="-aarch64"
fi
- mkdir -p "${pkgdir}/usr/lib/swift"
- cp -Ppr "${srcdir}/swift-$pkgver-RELEASE-ubi10${_archsuffix}"/usr/* "${pkgdir}/usr/lib/swift"
+ mkdir -p "${pkgdir}${_swift_root}"
+ cp -Ppr "${srcdir}/swift-$pkgver-RELEASE-ubi10${_archsuffix}"/usr/* "${pkgdir}${_swift_root}"
# Symlink the desired binaries to /usr/bin
mkdir -p "${pkgdir}/usr/bin"
for bin in sourcekit-lsp swift swiftc; do
- ln -s "/usr/lib/swift/bin/$bin" "${pkgdir}/usr/bin/$bin"
+ ln -s "${_swift_root}/bin/$bin" "${pkgdir}/usr/bin/$bin"
done
# Patch the binaries to use the changed ncurses names