Browse Source

build: add SRCABI usage and shared .abi_hint file; closes #179

pull/182/head
Franco Fichtner 4 months ago
parent
commit
96427357f4
2 changed files with 9 additions and 7 deletions
  1. +4
    -2
      build/common.sh
  2. +5
    -5
      build/prefetch.sh

+ 4
- 2
build/common.sh View File

@ -264,6 +264,7 @@ export PRODUCT_PLUGIN="os-*${PRODUCT_SUFFIX}"
# get the current version for the selected source repository
eval export SRC$(grep ^REVISION= ${SRCDIR}/sys/conf/newvers.sh)
export SRCABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}"
case "${SELF}" in
confirm|fingerprint|info|print)
@ -619,10 +620,12 @@ setup_entropy()
setup_set()
{
tar -C ${1} -xJpf ${2}
rm -f {1}/.abi_hint
}
generate_set()
{
echo ${SRCABI} > ${1}/.abi_hint
tar -C ${1} -cvf - . | xz > ${2}
}
@ -923,8 +926,7 @@ bundle_packages()
# generate index files
pkg repo ${BASEDIR}${PACKAGESDIR}-new/ ${SIGNARGS}
local ABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}"
echo ${ABI} > ${BASEDIR}${PACKAGESDIR}-new/.abi_hint
echo ${SRCABI} > ${BASEDIR}${PACKAGESDIR}-new/.abi_hint
sh ./clean.sh packages

+ 5
- 5
build/prefetch.sh View File

@ -1,6 +1,6 @@
#!/bin/sh
# Copyright (c) 2016-2019 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2020 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -33,27 +33,27 @@ SELF=prefetch
git_branch ${SRCDIR} ${SRCBRANCH} SRCBRANCH
ABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}/${PRODUCT_SETTINGS}"
MIRRORSETDIR="${PRODUCT_MIRROR}/${SRCABI}/${PRODUCT_SETTINGS}/sets"
for ARG in ${@}; do
case ${ARG} in
base)
sh ./clean.sh ${ARG}
URL="${PRODUCT_MIRROR}/${ABI}/sets/${ARG}-${PRODUCT_VERSION}-${PRODUCT_ARCH}"
URL="${MIRRORSETDIR}/${ARG}-${PRODUCT_VERSION}-${PRODUCT_ARCH}"
for SUFFIX in txz.sig txz; do
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
done
;;
kernel)
sh ./clean.sh kernel
URL="${PRODUCT_MIRROR}/${ABI}/sets/${ARG}-${PRODUCT_VERSION}-${PRODUCT_ARCH}"
URL="${MIRRORSETDIR}/${ARG}-${PRODUCT_VERSION}-${PRODUCT_ARCH}"
for SUFFIX in txz.sig txz; do
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
done
;;
packages)
sh ./clean.sh ${ARG}
URL="${PRODUCT_MIRROR}/${ABI}/sets/${ARG}-${PRODUCT_VERSION}-${PRODUCT_FLAVOUR}-${PRODUCT_ARCH}"
URL="${MIRRORSETDIR}/${ARG}-${PRODUCT_VERSION}-${PRODUCT_FLAVOUR}-${PRODUCT_ARCH}"
for SUFFIX in tar.sig tar; do
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
done

Loading…
Cancel
Save