On Wed, Dec 16, 2020 at 10:41:07AM +0800, Zhang Yu wrote:
On Tue, Dec 15, 2020 at 06:42:05PM +0800, Liu Shaofei wrote:
[why] When building different version software, we need to pack out different *.cgz. The field of PKGBUILD_PKGVE can be appended job.yaml file, which
^PKGBUILD_PKGVER
specifies the version number. The parts of contents for job.yaml file is as follow:
job.yaml: ... pkgbuild_repo: archlinux/packages//fcgi/trunk PKGBUILD_PKGVER: 2.4.2
If this field exist in pkgbuild file, does job.yaml need it?
we need to support different version. if specifies the version number, this will overlays field in PKGBUILD file. Thanks, Liushaofei
Thanks, Zhangyu
...
[how]
-rw-rw-r--. 1 lkp lkp 46K 2020-12-15 17:17 2.4.2.cgz lrwxrwxrwx. 1 lkp lkp 9 2020-12-15 17:17 latest.cgz -> 2.4.2.cgz
Signed-off-by: Liu Shaofei 370072077@qq.com
tests/build-pkg | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/tests/build-pkg b/tests/build-pkg index aafc120ed..c3909d1b9 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -3,6 +3,7 @@ # - upstream_repo # - upstream_commit # - PKGBUILD_TAG +# - PKGBUILD_PKGVER # upstream_url
# We'll use the below global env vars, but not treat them as parameter to avoid @@ -60,18 +61,6 @@ request_pkg() do get_pkgfile "${pkgrepo}" "$pkgfile" done
- # download PKGBUILD-$tag
- benchmark="${upstream_repo##*/}"
- benchmark="${benchmark%.git}"
- [ -n "$PKGBUILD_TAG" ] && {
get_pkgfile "pkg/$benchmark" "PKGBUILD-$PKGBUILD_TAG"
[ -f "PKGBUILD-$PKGBUILD_TAG" ] || die "PKGBUILD-$PKGBUILD_TAG not exist"
[ -s "PKGBUILD-$PKGBUILD_TAG" ] || die "PKGBUILD-$PKGBUILD_TAG is empty"
- }
- [ -f PKGBUILD ] || die "PKGBUILD not exist"
- [ -s PKGBUILD ] || die "PKGBUILD is empty"
}
create_softlink() @@ -109,6 +98,7 @@ replace_source()
build_source_pkg() {
- [ -n "$PKGBUILD_PKGVER" ] && sed -i "s|^pkgver=.*|pkgver=${PKGBUILD_PKGVER}|g" PKGBUILD repo_dir="" source PKGBUILD [ -n "$upstream_repo" ] && [ -n "$upstream_url" ] && {
@@ -122,11 +112,16 @@ build_source_pkg() } replace_source PKGBUILD.src
- [ -n "$PKGBUILD_TAG" ] && replace_source "PKGBUILD-$PKGBUILD_TAG"
- cgz_name="$PKG_MNT/${pack_to}/${pkgname}/${upstream_commit}.cgz"
- pkg_args="-A --check --skippgpcheck"
- [ -n ${PKGBUILD_PKGVER} ] && {
cgz_name="$PKG_MNT/${pack_to}/${pkgname}/${pkgver}.cgz"
pkg_args="${pkg_args} --skipchecksums --skipinteg"
- }
- PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" STDERR_REDIR=y\
$LKP_SRC/sbin/makepkg -A --check --skippgpcheck --config $LKP_SRC/etc/makepkg.conf
$LKP_SRC/sbin/makepkg ${pkg_args} --config $LKP_SRC/etc/makepkg.conf
[ "$?" == 0 ] || exit 1 create_softlink
-- 2.23.0