build: add SRCABI usage and shared .abi_hint file; closes #179
This commit is contained in:
parent
e624dea4c2
commit
96427357f4
|
@ -264,6 +264,7 @@ export PRODUCT_PLUGIN="os-*${PRODUCT_SUFFIX}"
|
||||||
|
|
||||||
# get the current version for the selected source repository
|
# get the current version for the selected source repository
|
||||||
eval export SRC$(grep ^REVISION= ${SRCDIR}/sys/conf/newvers.sh)
|
eval export SRC$(grep ^REVISION= ${SRCDIR}/sys/conf/newvers.sh)
|
||||||
|
export SRCABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}"
|
||||||
|
|
||||||
case "${SELF}" in
|
case "${SELF}" in
|
||||||
confirm|fingerprint|info|print)
|
confirm|fingerprint|info|print)
|
||||||
|
@ -619,10 +620,12 @@ setup_entropy()
|
||||||
setup_set()
|
setup_set()
|
||||||
{
|
{
|
||||||
tar -C ${1} -xJpf ${2}
|
tar -C ${1} -xJpf ${2}
|
||||||
|
rm -f {1}/.abi_hint
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_set()
|
generate_set()
|
||||||
{
|
{
|
||||||
|
echo ${SRCABI} > ${1}/.abi_hint
|
||||||
tar -C ${1} -cvf - . | xz > ${2}
|
tar -C ${1} -cvf - . | xz > ${2}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -923,8 +926,7 @@ bundle_packages()
|
||||||
# generate index files
|
# generate index files
|
||||||
pkg repo ${BASEDIR}${PACKAGESDIR}-new/ ${SIGNARGS}
|
pkg repo ${BASEDIR}${PACKAGESDIR}-new/ ${SIGNARGS}
|
||||||
|
|
||||||
local ABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}"
|
echo ${SRCABI} > ${BASEDIR}${PACKAGESDIR}-new/.abi_hint
|
||||||
echo ${ABI} > ${BASEDIR}${PACKAGESDIR}-new/.abi_hint
|
|
||||||
|
|
||||||
sh ./clean.sh packages
|
sh ./clean.sh packages
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/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
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
|
@ -33,27 +33,27 @@ SELF=prefetch
|
||||||
|
|
||||||
git_branch ${SRCDIR} ${SRCBRANCH} SRCBRANCH
|
git_branch ${SRCDIR} ${SRCBRANCH} SRCBRANCH
|
||||||
|
|
||||||
ABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}/${PRODUCT_SETTINGS}"
|
MIRRORSETDIR="${PRODUCT_MIRROR}/${SRCABI}/${PRODUCT_SETTINGS}/sets"
|
||||||
|
|
||||||
for ARG in ${@}; do
|
for ARG in ${@}; do
|
||||||
case ${ARG} in
|
case ${ARG} in
|
||||||
base)
|
base)
|
||||||
sh ./clean.sh ${ARG}
|
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
|
for SUFFIX in txz.sig txz; do
|
||||||
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
|
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
kernel)
|
kernel)
|
||||||
sh ./clean.sh 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
|
for SUFFIX in txz.sig txz; do
|
||||||
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
|
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
packages)
|
packages)
|
||||||
sh ./clean.sh ${ARG}
|
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
|
for SUFFIX in tar.sig tar; do
|
||||||
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
|
fetch -o ${SETSDIR} ${URL}.${SUFFIX} || true
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue