forked from Mirror/pmbootstrap
pmb/build/_package.py: create .git symlink (!1831)
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
This commit is contained in:
parent
46a65e1bb9
commit
16166874a5
5 changed files with 51 additions and 4 deletions
|
@ -385,8 +385,9 @@ def test_build_local_source_high_level(args, tmpdir):
|
|||
shutil.copy(pmb.config.pmb_src + "/test/testdata/build_local_src/APKBUILD",
|
||||
aport)
|
||||
|
||||
# aports: Add pmaports.cfg
|
||||
# aports: Add pmaports.cfg, .git
|
||||
shutil.copy(args.aports + "/pmaports.cfg", aports)
|
||||
shutil.copytree(args.aports + "/.git", aports + "/.git")
|
||||
|
||||
# src: Copy hello-world source files
|
||||
src = tmpdir + "/src"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue