From nobody Tue Dec 16 00:56:36 2025 X-Original-To: dev-commits-src-main@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 4dVdmN5J19z6Lc9j for ; Tue, 16 Dec 2025 00:56:36 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dVdmN2BBKz3F3w for ; Tue, 16 Dec 2025 00:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765846596; 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=IZ94Pvl7w+sHf+uYyyJ2rP/6Y6xmoEv6eX2JvO0jKNY=; b=NxAVjiKj9DmSM7UEnv4xSgTcKCQid7qPyub2dq+Vt6tVzXtvAlL09BQ6EC7KjhI2gXQero IYHWOW9ZBzNtg2jyFW8lNBj0OHrJpvxrtwBdVs0MRA9JCYxsNO8fS20G8XbuRBTvdTbNvY EfKWLAXgMxK1THsh7dxKcILWSdfFUvhpK3CHLNCTV2nayKpSUN4oVcLPzhz0cHmPQ9UAfo elB6EweEr03++pS4QW1dOEtGRz8yf1f8Mrsw55BcTu8W0RbgGYjKiGULTMkbkk8u9LBI/e XvSixnsKIdtxnD0zNQH4Z92zyNi4S/fcLFsmC089O2qUhhcCQ9TislYb2mJpKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765846596; 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=IZ94Pvl7w+sHf+uYyyJ2rP/6Y6xmoEv6eX2JvO0jKNY=; b=dsPhPkjiyzQhVNJ/0r7UntLNUMAupJ3nY3t2j9LZ2TNR6InGq0hUfDPBfmZlkCLvv0yNze JLF361M6jy9wG35kUfS9VHJH+73pINDqn3zp2yIQRswovfZuIeOxo3s7Q7+0RAsS8h6eKO H6fWFRoF3uiir5yXXLENHRzD5frW8RBxcY01LmeJD6KRKfUmLxkTtpWiTPrih3UZu//UYY l6iUiWzU8MWit27S5HzoVP2LdK8jxhEEqiTsqiJLPy79HwpBfEpXDx1x4/QtEx6FO7Dq18 qVgK4nwMhc9A/W00NX1u25HxXuqQ58T66uJp3+OuvFrG4suKQV6sQdZIOCG7kA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765846596; a=rsa-sha256; cv=none; b=yDYNo78Zgax4KXpsr8to9bm6xYIaZncqmMjpyWj4ql0ajg/G5iNHXIPvG61rxPkO8XuAch Wt2OW/o4MJWTh5pEb6CQlOB+WWqJfx7cFtjm+8j3wxJCpafogl5rbFYw19hR3xdpiwScU0 g8etAkeJsftDjWDU4J8k4XZMmjDaZoWSUpKfTSMX82mGxLPpouBG/W30LtUDcisDT3HO4O nlJlTEGSy2KwbBErH2zK3Inl0Y5jLi9QIV8DYZ4wMRPczqgH6Wggur7GTYHR76P+f6sNrk +ypGuy5ixpu9ZvobtzHqwkrEoW3Jnxa0McZt2HNxi4mJ4f1CMkSE3F4R2XdGuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dVdmN1G1szk6x for ; Tue, 16 Dec 2025 00:56:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24c63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 16 Dec 2025 00:56:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 715cc2571370 - main - blocklist: Add vendor import instructions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 715cc257137099e022c7eecea4cd6995bb7604a3 Auto-Submitted: auto-generated Date: Tue, 16 Dec 2025 00:56:36 +0000 Message-Id: <6940ae44.24c63.4191a2eb@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=715cc257137099e022c7eecea4cd6995bb7604a3 commit 715cc257137099e022c7eecea4cd6995bb7604a3 Author: Jose Luis Duran AuthorDate: 2025-12-16 00:55:24 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-16 00:55:24 +0000 blocklist: Add vendor import instructions Add vendor import instructions for blocklist. It includes a "freebsd-changes.sh" script that takes care of adapting paths and functions into FreeBSD. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D49510 --- contrib/blocklist/FreeBSD-upgrade | 97 ++++++++++++++++++++++++++++++++++++ contrib/blocklist/freebsd-changes.sh | 18 +++++++ 2 files changed, 115 insertions(+) diff --git a/contrib/blocklist/FreeBSD-upgrade b/contrib/blocklist/FreeBSD-upgrade new file mode 100644 index 000000000000..3e91d36cabb6 --- /dev/null +++ b/contrib/blocklist/FreeBSD-upgrade @@ -0,0 +1,97 @@ +FreeBSD maintainer's guide to blocklist +======================================= + +These instructions describe the blocklist vendor import procedure, +following the Committer's Guide +(https://docs.freebsd.org/en/articles/committers-guide/#vendor-import-git). + +> [!NOTE] +> This guide follows the convention that a `freebsd` remote is pointing +> to gitrepo.FreeBSD.org/src.git. + +1. Grab our top level directory: + + freebsd=$(git rev-parse --show-toplevel) + +2. Create a Git worktree under a temporary directory: + + worktree=$(mktemp -d -t blocklist) + git worktree add ${worktree} vendor/blocklist + +3. Clone the blocklist repo (https://github.com/zoulasc/blocklist.git): + + blocklist_repo=$(mktemp -d -t blocklist-repo) + git clone https://github.com/zoulasc/blocklist.git ${blocklist_repo} + cd ${blocklist_repo} + commit=$(git rev-parse HEAD) + commit_short=$(git rev-parse --short HEAD) + date=$(git show -s --format=%cd --date=format:%Y-%m-%d) + tag=$(git show -s --format=%cd --date=format:%Y%m%d) + +4. Copy to the vendor branch using rsync (net/rsync): + + rsync -va --del --exclude=".git" ${blocklist_repo}/ ${worktree} + +5. Take care of added/deleted files: + + cd ${worktree} + git add -A ${worktree} + git status + git diff --staged + +6. Commit: + + message=$(cat <<-EOM + blocklist ${date} (${commit_short}) + + Upstream hash ${commit}. + + Obtained from: https://github.com/zoulasc/blocklist + EOM + ) + git commit -e -m "Vendor import of ${message}" + +7. Tag: + + git tag -a -e -m "Tag ${message}" vendor/blocklist/${tag} + + At this point, the vendor branch can be pushed to the FreeBSD + repo via: + + git push --follow-tags freebsd vendor/blocklist + +8. Merge from the vendor branch: + + cd ${freebsd} + git subtree merge -P contrib/blocklist vendor/blocklist + + Some files may have been deleted from FreeBSD's copy of + blocklist. When git prompts for these deleted files during the + merge, choose 'd' (leaving them deleted). + +9. Resolve conflicts. + +10. Diff against the vendor branch: + + git diff --diff-filter=M vendor/blocklist/${tag} HEAD:contrib/blocklist + + Review the diff for any unexpected changes. + +11. Run the FreeBSD changes script: + + cd contrib/blocklist + sh ./freebsd-changes.sh + +12. If source files have been added or removed, update the + appropriate makefiles to reflect changes in the vendor's + Makefile.in. + +13. Build and install world, reboot, test. Pay particular attention + to the fingerd(8) and sshd(8) integration. + +14. Commit. + +15. Cleanup: + + rm -fr ${blocklist_repo} ${worktree} + git worktree prune diff --git a/contrib/blocklist/freebsd-changes.sh b/contrib/blocklist/freebsd-changes.sh new file mode 100644 index 000000000000..8ddea13b638f --- /dev/null +++ b/contrib/blocklist/freebsd-changes.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +# +# FreeBSD-specific changes from upstream +# + +# Remove Debian port +rm -fr port/debian + +# /libexec -> /usr/libexec +sed -i "" -e 's| /libexec| /usr/libexec|g' bin/blocklistd.8 +sed -i "" -e 's|"/libexec|"/usr/libexec|g' bin/internal.h + +# NetBSD: RT_ROUNDUP -> FreeBSD: SA_SIZE (from net/route.h) +sed -i "" -e 's/RT_ROUNDUP/SA_SIZE/g' bin/conf.c + +# npfctl(8) -> ipf(8), ipfw(8), pfctl(8) +sed -i "" -e 's/npfctl 8 ,/ipf 8 ,\n.Xr ipfw 8 ,\n.Xr pfctl 8 ,/g' bin/blocklistd.8