Thanks for your interest in contributing packages to the repo. Before submitting packages, make sure your PKGBUILD is in line with the packaging guidelines in the Arch Wiki and can be built in a clean chroot. This document also assumes you have signed up for a GitHub account and set up SSH keys as outlined in the GitHub documentation.
lilac builds and updates the packages here. The Contribution page on our wiki gives a short overview of it.
- Create a fork of the BioArchLinux Packages repository and clone it locally.
git clone <ssh link to your forked repo> - Create a new branch for the package you wish to add.
git checkout -b <pkgname> - Set the BioArchLinux repository as upstream.
git remote add upstream https://github.com/BioArchLinux/Packages.git - Add or edit the package folder under
BioArchLinux/(see Package layout). - Build the package in a clean chroot (see Building in a clean chroot).
- Commit the changes (see Commit messages).
git add BioArchLinux/<pkgname> git commit -m "<pkgname>: init pkg" - Push the changes.
git push -u origin <pkgname> - Open the URL in the output to create a pull request, and fill in the pull request template.
- Wait for review and approval for the pull request to be merged.
Each package has its own folder, named after the package:
BioArchLinux/<pkgname>/
├── PKGBUILD
├── lilac.yaml
└── lilac.py (optional)
lilac.yaml tells lilac three things: who maintains the package, when to update or rebuild it, and what to build first. For example:
build_prefix: extra-x86_64
maintainers:
- github: your-github-name
email: you@example.org
repo_depends:
- r-matrixstats
update_on:
- source: rpkgs
pkgname: BRISC
repo: cran
md5: true
- alias: rlilac builds in a chroot. The chroot only has the Arch repositories, plus the packages from this repository that lilac.yaml lists. So:
- put every
[bioarchlinux]package fromdependsunderrepo_depends; - put every
[bioarchlinux]package frommakedependsandcheckdependsunderrepo_makedepends.
If one is missing, the build fails with "target not found".
update_on takes nvchecker entries. The first entry checks for new versions. The other entries only trigger rebuilds. The lilac.yaml documentation describes the other fields.
If the update steps are longer than a line or two, write them in a lilac.py as pre_build() and post_build(), instead of pre_build_script and post_build_script (see the lilac API).
Build with devtools before opening the pull request. If every dependency is in the Arch repositories, run this in the package folder:
extra-x86_64-buildIf the package depends on something in [bioarchlinux], you need a build target that includes our repository. You only need to set this up once. The chroot copies the pacman keyring from your system, so first import our signing key as shown in the README. Then run:
sudo cp /usr/share/devtools/pacman.conf.d/extra.conf /usr/share/devtools/pacman.conf.d/bioarchlinux.conf
printf '\n[bioarchlinux]\nServer = https://repo.bioarchlinux.org/$arch\n' | sudo tee -a /usr/share/devtools/pacman.conf.d/bioarchlinux.conf
sudo ln -s /usr/bin/archbuild /usr/local/bin/bioarchlinux-x86_64-buildThen build with bioarchlinux-x86_64-build. If the package needs another new package from the same pull request, build that one first and install it into the chroot:
bioarchlinux-x86_64-build -- -I ../<dependency>/<dependency>-<version>-x86_64.pkg.tar.zstTo recreate the chroot from scratch, add -c before the --. Read the namcap output at the end of the build.
pkgctl build does not work here, because it only uses the official Arch repositories.
One commit per package, with the package name as a prefix:
<pkgname>: init pkg(or justinit) for a new package<pkgname>: update to <version><pkgname>: fix build,<pkgname>: fix depends, and so on for fixes<pkgname>: rm pkgto remove a package
Packages that depend on each other can go in one pull request. Use all their names in the title, like r-gpgp r-gpvecchia: init pkgs. Put the commit for each dependency before the package that needs it.
lilac usually updates versions itself (<pkgname>: auto updated to <version>), so you seldom need to do it by hand.
Most packages here are R packages from CRAN and Bioconductor. They are named r-<name in lower case>. The easiest way to start is to copy a recent one, such as BioArchLinux/r-brisc for CRAN or BioArchLinux/r-biocgenerics for Bioconductor.
On every update, lilac-extensions/lilac_r_utils.py compares the PKGBUILD with the package's DESCRIPTION. Fill in the PKGBUILD like this:
PKGBUILD |
From DESCRIPTION |
|---|---|
pkgdesc |
Title, without a leading package name or a trailing full stop |
arch |
x86_64 if NeedsCompilation: yes, otherwise any |
license |
License in SPDX form, from license_map in lilac_r_utils.py (GPL (>= 2) is GPL-2.0-or-later, MIT + file LICENSE is MIT) |
depends |
Depends and Imports |
makedepends |
LinkingTo, minus what is already in depends, plus gcc-fortran if there are Fortran sources |
optdepends |
Suggests |
md5sums |
the md5 sum CRAN or Bioconductor publishes |
Do not list the packages that come with R, such as methods, stats, Matrix and MASS. The r package already provides them, and the check fails if they are listed.
Use the update_on entry from the example above, with repo: cran or repo: bioc, and call r_pre_build from lilac.py:
#!/usr/bin/env python3
from lilaclib import *
import os
import sys
sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
from lilac_r_utils import r_pre_build
def pre_build():
r_pre_build(_G)
def post_build():
git_pkgbuild_commit()r_pre_build updates the version and checksums, and then runs the check.
If the license is not in license_map, write the license array yourself. Then pass the license exactly as the DESCRIPTION writes it, for example r_pre_build(_G, expect_license = "GPL (>= 2) | file LICENSE"). Other options, like expect_systemrequirements, are in CheckConfig in lilac_r_utils.py.
Many packages here are also on the AUR. lilac keeps them up to date there as BioArchLinuxBot. To sync your package:
- Make sure the package exists on the AUR.
- Add BioArchLinuxBot as a co-maintainer there.
- Call
update_aur_repo()inpost_build, aftergit_pkgbuild_commit().
Rebuilds that only change pkgrel are not pushed to the AUR.