Skip to content

carch-org/pkgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

161 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is mainly dedicated to Carch for building and installing the Carch package on Arch, Fedora, openSUSE and Termux.

Arch Linux

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 -si

Fedora & openSUSE

For 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 RPM Build Dependencies

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 tar

Also install the core build tools for Carch:

sudo dnf install cargo git

Set Up the Build Tree

rpmdev-setuptree

This will create the build directories in ~/rpmbuild.

Get the Spec File

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/SPECS

Download the Source Files

Note: Make sure you are in ~/rpmbuild/SPECS/ before running this.

spectool -g -R carch.spec

Build the RPM

rpmbuild -ba carch.spec

Wait for the build to finish, then go to:

cd ~/rpmbuild/RPMS/x86_64/

You will see the .rpm file if the build was successful.

Add GPG Signature (Recommended)

To avoid installation warnings (especially on openSUSE), it’s recommended to sign your RPMs.

Click to expand

Create a GPG Key

gpg --full-generate-key

Use a 4096 key size. Enter your real name and email; the comment is optional.

List your generated keys:

gpg --list-keys

Or with long IDs:

gpg --list-keys --keyid-format LONG

Add Your GPG Name to RPM Macros

Edit (or create) ~/.rpmmacros:

echo '%_gpg_name Your Name <yourmailid@gmail.com>' >> ~/.rpmmacros

Export & Import the Public Key

Note: 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.asc

Import it into the RPM keyring:

sudo rpm --import publickey.asc

Sign the RPM

Replace the filename with your actual RPM:

rpmsign --addsign ~/rpmbuild/RPMS/x86_64/carch-5.3.1-1.fc42.x86_64.rpm

You’ll be asked for the passphrase you set when creating your GPG key.

Verify the Signature

rpm --checksig ~/rpmbuild/RPMS/x86_64/carch-5.3.1-1.fc42.x86_64.rpm

A successful result looks like:

carch-5.3.1-1.fc42.x86_64.rpm: digests signatures OK

Install the RPM

sudo dnf install carch-5.3.1-1.fc42.x86_64.rpm

Or on openSUSE:

sudo zypper install carch-5.3.1-1.fc42.x86_64.rpm

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 for openSUSE:

sudo zypper install -y --allow-unsigned-rpm *.rpm

For Fedora, even if it is not signed, there is no warning, so no issue at all in Fedora-based distros.

Termux

Basically we are using the script build-termux-deb.sh to build a .deb file that is compatible with Termux environment. You can just run that script to build on your local machine. Make sure you have dpkg installed on your distro before running the script. Dpkg is needed to build a .deb file especially for Debian or Termux env, as Termux uses deb packages like Debian.

Clone the repo and run the script.

git clone https://github.com/carch-org/pgks && cd pkgs
./build-termux-deb.sh

This deb file doesn't compile the Carch to build deb, instead it uses already compiled arm & aarch64 binary from Carch release and builds a .deb file that can be installed via dpkg -i *.deb or directly pkg install *.deb

You can find those .deb files in Carch release

If anything from my side I am doing or telling is wrong, or anything else, you can open an issue for that.

About

Carch Package Builds 📦

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages