This guide assumes you have setup autospec. Short refresher below
// go to area you want your workspace
sudo swupd bundle-add package-builder
curl -O https://raw.githubusercontent.com/clearlinux/common/master/user-setup.sh
chmod +x user-setup.sh
./user-setup.sh
Managing dependencies is hard. Autospec makes it easier and keeps your main system clutter-free
Fulfilling dependencies
Method 1: Find it
The best way to find dependencies on CL, is to use dnf
Insert this clearlinux.repo file into /etc/yum.repos.d/
[clearlinux]
name=Clear Linux Packages
baseurl=https://download.clearlinux.org/current/x86_64/os/
gpgcheck=0
Then, when you are missing a file, use the dnf provides
command to see in which package the file originates in. eg:
checking for rpc/rpc.h... no
Package 'libtirpc' not found
checking for get_myaddress in -ltirpc... no
configure: error: Didn't find tirpc
---
i@clr~ $ sudo dnf provides *rpc/rpc.h --repo=clearlinux
Unable to detect release version (use '--releasever' to specify release version)
Failed loading plugin "system_upgrade": No module named 'systemd'
libtirpc-dev-1.3.5-29.x86_64 : dev components for the libtirpc package.
Repo : clearlinux
Matched from:
Other : *rpc/rpc.h
This way, you can add the packages which autospec misses into buildreq_add
Method 2: Build It
This is for when CL doesn’t have the required dependency
checking for yapps... no
configure: error: Didn't find yapps
---
i@clr~ $ sudo dnf provides *yapps --repo=clearlinux
Password:
Unable to detect release version (use '--releasever' to specify release version)
Failed loading plugin "system_upgrade": No module named 'systemd'
Error: No matches found. If searching for a file, try specifying the full path or using a wildcard prefix ("*/") at the beginning.
Find the package and autospec it
i@clr~/clearlinux $ make autospecnew URL="https://files.pythonhosted.org/packages/7a/53/e6b985ee650378b985c2f7fa74242b64554ddb06740bfe8b0a758b868832/Yapps-2.2.0.tar.gz" NAME="yapps"
Once you succeed, run
make build
make repoadd
this will add it to your localrepo, and you can use it under buildreq_add just like the other packages, (or autospec might pick it up automatically)
To remove it from your localrepo, use
make repodel
Eg: Building LinuxCNC using Autospec LinuxCNC · Issue #3197 · clearlinux/distribution · GitHub
Method 3: Downloading it as an Archive.
Not recommended, however, if searching and building it are unavailable (eg: git/meson submodules) you can download them as archives and place them where they are needed. You can add them inside the package’s options.conf files under archives. An example of this is mesa/options.conf at 0d66ca8904dc12381f89a7a6cd9c49edee9c08f4 · clearlinux-pkgs/mesa · GitHub