mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Create pfSense-repo and pfSense-repo-devel package. Ticket #5335
This commit is contained in:
parent
a088bcb553
commit
52efc84004
@ -1060,6 +1060,24 @@ clone_to_staging_area() {
|
||||
-X ${_exclude_files} \
|
||||
.
|
||||
|
||||
setup_pkg_repo \
|
||||
${STAGE_CHROOT_DIR}${PKG_REPO_PATH} \
|
||||
${TARGET} \
|
||||
${TARGET_ARCH} \
|
||||
${PKG_REPO_CONF_BRANCH} \
|
||||
"release"
|
||||
|
||||
core_pkg_create repo "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
|
||||
|
||||
setup_pkg_repo \
|
||||
${STAGE_CHROOT_DIR}${PKG_REPO_PATH} \
|
||||
${TARGET} \
|
||||
${TARGET_ARCH} \
|
||||
${PKG_REPO_CONF_BRANCH}
|
||||
|
||||
core_pkg_create repo-devel "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
|
||||
rm -f ${STAGE_CHROOT_DIR}${PKG_REPO_PATH}
|
||||
|
||||
core_pkg_create rc "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
|
||||
core_pkg_create base "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
|
||||
core_pkg_create base-nanobsd "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
|
||||
@ -1139,6 +1157,12 @@ customize_stagearea_for_image() {
|
||||
pkg_chroot_add ${FINAL_CHROOT_DIR} base
|
||||
fi
|
||||
|
||||
if [ -n "${IS_RELEASE}" ]; then
|
||||
pkg_chroot_add ${FINAL_CHROOT_DIR} repo
|
||||
else
|
||||
pkg_chroot_add ${FINAL_CHROOT_DIR} repo-devel
|
||||
fi
|
||||
|
||||
if [ "${1}" = "iso" -o \
|
||||
"${1}" = "memstick" -o \
|
||||
"${1}" = "memstickserial" -o \
|
||||
@ -1384,6 +1408,18 @@ setup_pkg_repo() {
|
||||
local _arch="${2}"
|
||||
local _target_arch="${3}"
|
||||
local _branch="${4}"
|
||||
local _release="${5}"
|
||||
|
||||
if [ -n "${_release}" ]; then
|
||||
local _template="${PKG_REPO_TEMPLATE}"
|
||||
else
|
||||
local _template="${PKG_REPO_DEVEL_TEMPLATE}"
|
||||
fi
|
||||
|
||||
if [ -z "${_template}" -o ! -f "${_template}" ]; then
|
||||
echo ">>> ERROR: It was not possible to find pkg conf template ${_template}"
|
||||
print_error_pfS
|
||||
fi
|
||||
|
||||
mkdir -p $(dirname ${_target}) >/dev/null 2>&1
|
||||
|
||||
@ -1392,7 +1428,7 @@ setup_pkg_repo() {
|
||||
-e "s/%%GIT_REPO_BRANCH_OR_TAG%%/${_branch}/g" \
|
||||
-e "s,%%PKG_REPO_SERVER%%,${PKG_REPO_SERVER},g" \
|
||||
-e "s/%%PRODUCT_NAME%%/${PRODUCT_NAME}/g" \
|
||||
${FREEBSD_SRC_DIR}/release/pkg_repos/${PRODUCT_NAME}.conf.template \
|
||||
${_template} \
|
||||
> ${_target}
|
||||
}
|
||||
|
||||
@ -1404,15 +1440,15 @@ builder_setup() {
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ! -f /usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf ]; then
|
||||
[ -d /usr/local/etc/pkg/repos ] \
|
||||
|| mkdir -p /usr/local/etc/pkg/repos
|
||||
if [ ! -f ${PKG_REPO_PATH} ]; then
|
||||
[ -d $(dirname ${PKG_REPO_PATH}) ] \
|
||||
|| mkdir -p $(dirname ${PKG_REPO_PATH})
|
||||
|
||||
update_freebsd_sources
|
||||
|
||||
local _arch=$(uname -m)
|
||||
setup_pkg_repo \
|
||||
/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf \
|
||||
${PKG_REPO_PATH} \
|
||||
${_arch} \
|
||||
${_arch} \
|
||||
${PKG_REPO_CONF_BRANCH}
|
||||
@ -1524,10 +1560,11 @@ pkg_bootstrap() {
|
||||
local _root=${1:-"${STAGE_CHROOT_DIR}"}
|
||||
|
||||
setup_pkg_repo \
|
||||
${_root}/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf \
|
||||
${_root}${PKG_REPO_PATH} \
|
||||
${TARGET} \
|
||||
${TARGET_ARCH} \
|
||||
${PKG_REPO_CONF_BRANCH}
|
||||
${PKG_REPO_CONF_BRANCH} \
|
||||
${IS_RELEASE}
|
||||
|
||||
pkg_chroot ${_root} bootstrap -f
|
||||
}
|
||||
|
||||
@ -305,6 +305,11 @@ export CORE_PKG_VERSION="${PRODUCT_VERSION%%-*}${CORE_PKG_DATESTRING}"
|
||||
export CORE_PKG_PATH=${CORE_PKG_PATH:-"${SCRATCHDIR}/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}_${TARGET}_${TARGET_ARCH}-core"}
|
||||
export CORE_PKG_TMP=${CORE_PKG_TMP:-"${SCRATCHDIR}/core_pkg_tmp"}
|
||||
|
||||
export PKG_REPO_BASE=${PKG_REPO_BASE:-"${FREEBSD_SRC_DIR}/release/pkg_repos"}
|
||||
export PKG_REPO_TEMPLATE=${PKG_REPO_TEMPLATE:-"${PKG_REPO_BASE}/${PRODUCT_NAME}.conf.template"}
|
||||
export PKG_REPO_DEVEL_TEMPLATE=${PKG_REPO_TEMPLATE:-"${PKG_REPO_BASE}/${PRODUCT_NAME}-devel.conf.template"}
|
||||
export PKG_REPO_PATH=${PKG_REPO_PATH:-"/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf"}
|
||||
|
||||
# Package overlay. This gives people a chance to build product
|
||||
# installable image that already contains certain extra packages.
|
||||
#
|
||||
|
||||
@ -27,3 +27,4 @@
|
||||
./tmp
|
||||
./usr/local/share/%%PRODUCT_NAME%%/base.mtree
|
||||
./usr/local/share/%%PRODUCT_NAME%%/base.txz
|
||||
./usr/local/etc/pkg/repos/%%PRODUCT_NAME%%.conf
|
||||
|
||||
@ -24,3 +24,4 @@
|
||||
./tmp
|
||||
./usr/local/share/%%PRODUCT_NAME%%/base.mtree
|
||||
./usr/local/share/%%PRODUCT_NAME%%/base.txz
|
||||
./usr/local/etc/pkg/repos/%%PRODUCT_NAME%%.conf
|
||||
|
||||
3
tools/templates/core_pkg/repo-devel/metadir/+DESC
Normal file
3
tools/templates/core_pkg/repo-devel/metadir/+DESC
Normal file
@ -0,0 +1,3 @@
|
||||
%%PRODUCT_NAME%% pkg repository configuration (devel)
|
||||
|
||||
WWW: %%PRODUCT_URL%%
|
||||
15
tools/templates/core_pkg/repo-devel/metadir/+MANIFEST
Normal file
15
tools/templates/core_pkg/repo-devel/metadir/+MANIFEST
Normal file
@ -0,0 +1,15 @@
|
||||
name: "%%PRODUCT_NAME%%-repo-devel"
|
||||
version: "%%VERSION%%"
|
||||
origin: "security/%%PRODUCT_NAME%%-repo-devel"
|
||||
comment: <<EOD
|
||||
%%PRODUCT_NAME%% pkg repository configuration (devel)
|
||||
EOD
|
||||
maintainer: development@pfsense.org
|
||||
prefix: /usr/local
|
||||
deps: {
|
||||
|
||||
}
|
||||
categories [ security, ]
|
||||
licenselogic: single
|
||||
licenses: [ BSD2CLAUSE, ]
|
||||
options: { }
|
||||
1
tools/templates/core_pkg/repo-devel/pkg-plist
Normal file
1
tools/templates/core_pkg/repo-devel/pkg-plist
Normal file
@ -0,0 +1 @@
|
||||
etc/pkg/repos/pfSense.conf
|
||||
3
tools/templates/core_pkg/repo/metadir/+DESC
Normal file
3
tools/templates/core_pkg/repo/metadir/+DESC
Normal file
@ -0,0 +1,3 @@
|
||||
%%PRODUCT_NAME%% pkg repository configuration (stable)
|
||||
|
||||
WWW: %%PRODUCT_URL%%
|
||||
15
tools/templates/core_pkg/repo/metadir/+MANIFEST
Normal file
15
tools/templates/core_pkg/repo/metadir/+MANIFEST
Normal file
@ -0,0 +1,15 @@
|
||||
name: "%%PRODUCT_NAME%%-repo"
|
||||
version: "%%VERSION%%"
|
||||
origin: "security/%%PRODUCT_NAME%%-repo"
|
||||
comment: <<EOD
|
||||
%%PRODUCT_NAME%% pkg repository configuration (stable)
|
||||
EOD
|
||||
maintainer: development@pfsense.org
|
||||
prefix: /usr/local
|
||||
deps: {
|
||||
|
||||
}
|
||||
categories [ security, ]
|
||||
licenselogic: single
|
||||
licenses: [ BSD2CLAUSE, ]
|
||||
options: { }
|
||||
1
tools/templates/core_pkg/repo/pkg-plist
Normal file
1
tools/templates/core_pkg/repo/pkg-plist
Normal file
@ -0,0 +1 @@
|
||||
etc/pkg/repos/pfSense.conf
|
||||
Loading…
Reference in New Issue
Block a user