Skip to content

Fix building packages when git is installed

Oliver Smith requested to merge fix-abuild-git into master
pmb/build/_package.py: create .git symlink 

Make /home/pmos/build/.git point to the .git dir from pmaports.git, with
a symlink so abuild does not fail.

abuild expects the current working directory to be a subdirectory of a
cloned git repository (e.g. main/openrc from aports.git). If git is
installed, it will try to get the last git commit from that repository,
and place it in the resulting apk (.PKGINFO) as well as use the date
from that commit as SOURCE_DATE_EPOCH (for reproducible builds).

With that symlink, we actually make it use the last git commit from
pmaports.git for SOURCE_DATE_EPOCH and have that in the resulting apk's
.PKGINFO.

Fixes: #1841 (closed)

Second commit moved to separate MR: !1832 (merged).

Edited by Oliver Smith

Merge request reports