From nobody Mon Dec 04 08:05:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SkGS15zgkz534k2; Mon, 4 Dec 2023 08:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SkGS15NC3z3WKh; Mon, 4 Dec 2023 08:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701677121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GdNSk4Eugkk6zlgIt+KcUeEyj6Kng6SOPPWb9m+3vps=; b=pXwK4kSP3UJJhpEU5csJKZaN/GM0FT4s97CyVVvVOdFwJzKca8bujjYQpSXCUxXaki+A/I UbpbWrIVnWelGkuB6P9vAbR5R5G/z35C/QrTcYY95ZQXmPsFXUsKISyTHVHrQDUgn+mcrF euWqxjyfDR4E8k8ni2UEA9VEMyFjjAM0bt2i1qxifb3vMzj3DxKbzrdsTzdeBmxGXTnMUd nIES8vsB0jDYKGIlvWvHY1bgXeIUMWdqwaRqbCcikRny3/ZBXrDjAA3Jgr05026eC74y8D VYYROzHsItMXzpfRLC++sZyuIQA6V6AOjH1dZC2dogbmrpbxd3rW5GAbYSj1Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701677121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GdNSk4Eugkk6zlgIt+KcUeEyj6Kng6SOPPWb9m+3vps=; b=WzaiROnYgnxjZ0kdVHopqqCeX/xICz3Lt+CaeEaeGiOn7Dx21+4UC1LvbCkvGurw3Dqgmq HDDDkuLwDHEGnwf4gNPLRay1/fikHRN/MemIB3p8qcC0Bu3wHVzAlYifRe7sCPNZcWR8HM g0u8IeDmRrfWqqsn5p08BtnrLNd04S037DeXCg1ZY7Kn8ErkVKaMu6KA9vaY43HXnW63eI 3EjotX/K6Z/C05U+cwmwiyN00iFuxDrk31CthHBxlZzzrigI4vS5fgdiU23b22WlqR5P83 5f4TgScuLRNpL6bPapg8LREMEIgYHUdQOJ/jklAMPVLOV8WX0Nokbo+saGKhAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701677121; a=rsa-sha256; cv=none; b=xy3TuSECjkEu4I5lfb74kITeARuI5sL6Bv9pe1P+g+CUVYgPFC+ytgCu+LTSS4k/hBJnui KkhRDJwKfmzHEkDuhpIhYcNiYGaew0PnrgCba6f0kmw2xLPkUAUcc4lm+jBo4kalsTYuJ0 nm9xiAxrM9Yp9RycgshtUBOVM6dd2nRkporTLdPzWrmUh9/QIN6x5ly/avBr1zIN1MIH1+ gmjd0QqzSPN3NlwYt6KK7Yifbdj7OyLvzuQHD4uEh13mlMmHekVh3rVGggZUigo9FKhUW8 hLJHbkFfmxKuvOOfLJxYUwtJ7QhCSFOd7h7XhtdzQkXayESSkU4di5fQTi1B8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SkGS14KWSz3YJ; Mon, 4 Dec 2023 08:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B485LxL058562; Mon, 4 Dec 2023 08:05:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B485LdN058559; Mon, 4 Dec 2023 08:05:21 GMT (envelope-from git) Date: Mon, 4 Dec 2023 08:05:21 GMT Message-Id: <202312040805.3B485LdN058559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 99b8c0c35b0f - main - pkgbase: create source package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99b8c0c35b0fcc633649209621243d678a13542a Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=99b8c0c35b0fcc633649209621243d678a13542a commit 99b8c0c35b0fcc633649209621243d678a13542a Author: Baptiste Daroussin AuthorDate: 2023-11-17 16:19:39 +0000 Commit: Baptiste Daroussin CommitDate: 2023-12-04 08:05:03 +0000 pkgbase: create source package FreeBSD-src for all the sources but the kernel FreeBSD-src-sys just for the kernel MFC After: 3 days Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D42651 --- Makefile | 4 ++-- Makefile.inc1 | 54 +++++++++++++++++++++++++++++++++++++++++--- release/packages/src-sys.ucl | 17 ++++++++++++++ release/packages/src.ucl | 17 ++++++++++++++ 4 files changed, 87 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b36e27e7f294..4a6f4bfd425e 100644 --- a/Makefile +++ b/Makefile @@ -175,8 +175,8 @@ TGTS= all all-man buildenv buildenvvars buildetc buildkernel buildworld \ _build-tools _build-metadata _cross-tools _includes _libraries \ builddtb xdev xdev-build xdev-install \ xdev-links native-xtools native-xtools-install stageworld stagekernel \ - stage-packages stage-packages-kernel stage-packages-world \ - create-packages-world create-packages-kernel create-packages \ + stage-packages stage-packages-kernel stage-packages-world stage-packages-source \ + create-packages-world create-packages-kernel create-packages-source create-packages \ update-packages packages installconfig real-packages real-update-packages \ sign-packages package-pkg print-dir test-system-compiler test-system-linker \ test-includes diff --git a/Makefile.inc1 b/Makefile.inc1 index 82f3ef061d98..0698a5d79a0a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1956,6 +1956,7 @@ stagekernel: .PHONY PORTSDIR?= /usr/ports WSTAGEDIR?= ${OBJTOP}/worldstage KSTAGEDIR?= ${OBJTOP}/kernelstage +SSTAGEDIR?= ${OBJTOP}/sourcestage REPODIR?= ${OBJROOT}repo PKG_FORMAT?= tzst PKG_REPO_SIGNING_KEY?= # empty @@ -1963,6 +1964,7 @@ PKG_OUTPUT_DIR?= ${PKG_VERSION} .ORDER: stage-packages create-packages .ORDER: create-packages create-world-packages +.ORDER: create-packages create-source-packages .ORDER: create-packages create-kernel-packages .ORDER: create-packages sign-packages @@ -1974,7 +1976,7 @@ _pkgbootstrap: .PHONY # # Determine PKG_ABI from newvers.sh if not already set. # -.if !defined(PKG_ABI) && (make(create-world-packages-jobs) || make(create-kernel-packages*) || make(real-update-packages) || make(sign-packages)) +.if !defined(PKG_ABI) && (make(create-world-packages-jobs) || make(create-kernel-packages*) || make(real-update-packages) || make (create-source-packages) || make(sign-packages)) PKG_ABI=${_TYPE}:${MAJOR_REVISION}:${TARGET_ARCH} .endif PKG_BIN_VERSION!=${PKG_CMD} --version /dev/null |\ @@ -2051,7 +2053,10 @@ stage-packages-kernel: .PHONY ${_+_}@cd ${.CURDIR}; \ ${MAKE} DESTDIR=${KSTAGEDIR} -DNO_ROOT stagekernel -stage-packages: .PHONY stage-packages-world stage-packages-kernel +stage-packages-source: .PHONY + @mkdir -p ${SSTAGEDIR}; + +stage-packages: .PHONY stage-packages-world stage-packages-kernel stage-packages-source _repodir: .PHONY @mkdir -p ${REPODIR} @@ -2070,7 +2075,50 @@ create-packages-kernel: _pkgbootstrap _repodir .PHONY SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \ create-kernel-packages -create-packages: .PHONY create-packages-world create-packages-kernel +create-packages-source: _pkgbootstrap _repodir .PHONY + ${_+_}@cd ${.CURDIR}; \ + ${MAKE} -f Makefile.inc1 \ + DESTDIR=${SSTAGEDIR} \ + PKG_VERSION=${PKG_VERSION} create-source-packages + +create-packages: .PHONY create-packages-world create-packages-kernel create-packages-source + +create-source-packages: _pkgbootstrap .PHONY + rm -f ${SSTAGEDIR}/*.plist 2>/dev/null || : +.if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git) + @cd ${SRCDIR}; \ + ( echo "@override_prefix /usr/src" ; \ + ${GIT_CMD} ls-files ":!:sys/" ) > ${SSTAGEDIR}/src.plist + @cd ${SRCDIR}; \ + ( echo "@override_prefix /usr/src" ; \ + ${GIT_CMD} ls-files "sys/" ) > ${SSTAGEDIR}/src-sys.plist + sed -e "s/%VERSION%/${PKG_VERSION}/" \ + -e "s/%DESC%/FreeBSD sources/" \ + -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ + -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ + -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ + -e "s|%PKG_WWW%|${PKG_WWW}|" \ + ${SRCDIR}/release/packages/src.ucl \ + > ${SSTAGEDIR}/src.ucl + sed -e "s/%VERSION%/${PKG_VERSION}/" \ + -e "s/%DESC%/FreeBSD Kernel sources/" \ + -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ + -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \ + -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \ + -e "s|%PKG_WWW%|${PKG_WWW}|" \ + ${SRCDIR}/release/packages/src-sys.ucl \ + > ${SSTAGEDIR}/src-sys.ucl + ${PKG_CMD} -o ABI=${PKG_ABI} create -f ${PKG_FORMAT} \ + -M ${SSTAGEDIR}/src.ucl \ + -p ${SSTAGEDIR}/src.plist \ + -r ${SRCDIR} \ + -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR} + ${PKG_CMD} -o ABI=${PKG_ABI} create -f ${PKG_FORMAT} \ + -M ${SSTAGEDIR}/src-sys.ucl \ + -p ${SSTAGEDIR}/src-sys.plist \ + -r ${SRCDIR} \ + -o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR} +.endif create-world-packages: _pkgbootstrap .PHONY @rm -f ${WSTAGEDIR}/*.plist 2>/dev/null || : diff --git a/release/packages/src-sys.ucl b/release/packages/src-sys.ucl new file mode 100644 index 000000000000..ad37f5c5a5f1 --- /dev/null +++ b/release/packages/src-sys.ucl @@ -0,0 +1,17 @@ +# +# + +name = "%PKG_NAME_PREFIX%-src-sys" +origin = "base" +version = "%VERSION%" +comment = "FreeBSD Kernel Sources" +categories = [ base ] +maintainer = "%PKG_MAINTAINER%" +www = "%PKG_WWW%" +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc = <