This repo is mainly dedicated to Carch for building and installing the Carch package on Arch, Fedora, and openSUSE.
For Arch, we provide a PKGBUILD that directly grabs the precompiled binary from the latest release.
You can install Carch using this PKGBUILD:
git clone https://github.com/carch-org/pkgs ~/pkgs
cd ~/pkgs/carch-bin
makepkg -siFor Fedora and openSUSE, this repo includes a working spec file to build an RPM package. openSUSE supports RPMs, so the same process works for both.
Below is a simple guide to build it yourself.
Install all the core tools:
sudo dnf install rpm-build rpmdevtools redhat-rpm-config make gcc \
fedora-packager gnupg2 rpm-sign createrepo_c git patch tarAlso install the core build tools for Carch:
sudo dnf install cargo gitrpmdev-setuptreeThis will create the build directories in
~/rpmbuild.
Download the carch.spec file into ~/rpmbuild/SPECS/
wget https://github.com/carch-org/pkgs/raw/refs/heads/main/carch.spec ~/rpmbuild/SPECS/Change to the SPECS directory:
cd ~/rpmbuild/SPECSNote: Make sure you are in
~/rpmbuild/SPECS/before running this.
spectool -g -R carch.specrpmbuild -ba carch.specWait for the build to finish, then go to:
cd ~/rpmbuild/RPMS/x86_64/You will see the .rpm file if the build was successful.
To avoid installation warnings (especially on openSUSE), it’s recommended to sign your RPMs.
gpg --full-generate-keyUse a 4096 key size. Enter your real name and email; the comment is optional.
List your generated keys:
gpg --list-keysOr with long IDs:
gpg --list-keys --keyid-format LONGEdit (or create) ~/.rpmmacros:
echo '%_gpg_name Your Name <[email protected]>' >> ~/.rpmmacrosNote: Use your own key like this, don’t copy paste my key that will not work either.
Export your public key:
gpg --export --armor 36F67F5CD54828D7574F6FF39DE08866EE317104 > publickey.ascImport it into the RPM keyring:
sudo rpm --import publickey.ascReplace the filename with your actual RPM:
rpmsign --addsign ~/rpmbuild/RPMS/x86_64/carch-5.3.1-1.fc42.x86_64.rpmYou’ll be asked for the passphrase you set when creating your GPG key.
rpm --checksig ~/rpmbuild/RPMS/x86_64/carch-5.3.1-1.fc42.x86_64.rpmA successful result looks like:
carch-5.3.1-1.fc42.x86_64.rpm: digests signatures OKsudo dnf install carch-5.3.1-1.fc42.x86_64.rpmOr on openSUSE:
sudo zypper install carch-5.3.1-1.fc42.x86_64.rpmImportant
openSUSE may warn that the package is unsigned if it was signed on Fedora. To avoid this, sign the RPM on openSUSE too. If you sign on openSUSE, the same RPM works fine on Fedora too. If you only care about Fedora, signing on Fedora is enough.
Also, if you don’t want to sign, you can use --allow-unsigned-rpm:
sudo zypper install -y --allow-unsigned-rpm *.rpmI will also release pre-signed RPM packages built on openSUSE in the Carch releases, so you can just grab those directly if you prefer.
That’s it from my side! If you notice anything missing or incorrect, feel free to contribute a fix. Thank you!