From nobody Sat Mar 28 01:27:15 2026 X-Original-To: freebsd-hackers@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 4fjKcp5MMVz6XCZ1 for ; Sat, 28 Mar 2026 01:27:22 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4fjKcn5z12z3PDN; Sat, 28 Mar 2026 01:27:21 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from delta.joker.local (124-18-6-240.area1c.commufa.jp [124.18.6.240]) (authenticated bits=0) by www121.sakura.ne.jp (8.18.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 62S1RFDS076931; Sat, 28 Mar 2026 10:27:17 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1774661237; bh=hYCY5CGgE45ywkjkLpfrsDSDZrNzsm6s9SIVCrky2I8=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=rC+KghyDSiehiCJjnVzvd+Z/FAtVVQhUNwR6gNdNWptlGuKv+Y3mzN/vGkiJGmmI1 /Cob65XOHV05cspjAFDMVGCdOGvcAlfg6j5ZaIZyeHi/JwREEkwOSHMRCoYWrykfXR VNf28UoyVCK2U4eQuf3NfYfnW4LwPaHI8WCu+vU0= Date: Sat, 28 Mar 2026 10:27:15 +0900 From: Tomoaki AOKI To: Juraj Lutter Cc: Lexi Winter , freebsd-hackers@freebsd.org Subject: Re: workflow for managing ports patches against /usr/ports in poudriere Message-Id: <20260328102715.901d4617a153e68d363a373f@dec.sakura.ne.jp> In-Reply-To: References: Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Queue-Id: 4fjKcn5z12z3PDN X-Spamd-Bar: ---- On Fri, 27 Mar 2026 17:06:36 +0100 Juraj Lutter wrote: > > On 27. Mar 2026, at 16:52, Lexi Winter wrote: > > > > void wrote in : > >> On IRC I've been advised to use overlays for this. > >> So let's say there's a port and the patches for it aren't in the tree. > >> I download a fresh ports tree, null mount it and make that my overlay tree. > >> Then strip out all the ports I don't want to patch, then patch the port in the > >> overlay. > >> > >> Then > >> > >> poudriere bulk -j builder -p /usr/ports -O overlay category/patched-port > >> > >> is this correct? Or is the patch just put somewhere in the overlay tree? > >> Or is there some documentation explaining exactly what to do? > >> I have around five or so ports needing patches and the patches aren't in the > >> official tree yet. > > > > i just have /usr/ports configured as a null ports tree: > > > > # poudriere ports -c -p default -m null -M /usr/ports > > > > then i can do whatever i want with /usr/ports (update from git, apply > > local patches, whatever) and Poudriere just uses whatever is there. > > > > from what i understand, i don't think overlays is the right way to go > > here. > > > Overlays are handy if you keep your /usr/ports on tip of “main” branch, for example. > > — > Juraj Lutter > otis@FreeBSD.org Hi. I think "it depends". Overlay is handy to try something complexed and widespreaded-among-ports changes prepared by someone others. Examples would be updated mozc and compiz-reloaded overlays by Ken DEGUCHI. https://github.com/kdeguchi/mozc-ports https://github.com/kdeguchi/compiz-reloaded-ports Testers can try it without polluting local ports tree. On the other hand, overlays could easily cause troubles when preparing patches to be posted to Bugzilla or Phabricator, because files existing in underlying layers (including actual ports tree at the bottom layer) but not in the overlay are hidden, and easily missed to be deleted on merging. And another thing for kmod ports. If the under-developed ports are kmod ones, keeping one builder jail 100% in sync with bare-metal for local uses, overlays are needed to be used both on bare-metal builds (regardless legacy way or using PORTS_MODULES) and poudriere. At least on outdated version of ports-mgmt/poudriere-devel when I've first tried overlays, configuring /etc/make.conf with standard way caused poudriere to malfunction (errored out) regardless configuring overlay as additional ports tree or not. Finally I've found workaround and modified my writings here https://brew.bsd.cafe/TomAoki/Tips-and-Tricks/src/branch/main/poudriere/README.md with notifying to Ken. I have these lines in my /etc/make.conf to test above-mentioned overlays both on bare-metal and poudriere. ===== Lines in /etc/make.conf ===== ## Ports overlays to apply. ## Need commenting out on building using poudriere with -O option, ## so use conditional to defile only if poudriere is not in use. .ifndef POUDRIERE_BUILD_TYPE OVERLAYS= /usr/local/overlays/kdeguchi/mozc-ports \ /usr/local/overlays/kdeguchi/compiz-reloaded-ports .endif ===== End lines in /etc/make.conf ===== This workaround would be far more important for kmod ports. I think overlays would need more official writings, preferrably in ports(7) manpage or (currently nonexistent) ports_overlay(7). Note that overlay(3X) already exists and transferred to curs_overlay(3X). Basically, creating git branches for local changes would be most straightforward. Patches to be submitted can be easily generated by simply using git functionalities and pushed to Phabricator using arcanist if enough familiar with git. But this can cause mis-matches in "n" numbers with official repo if working on src tree and mistakenly commit something into any of "official" branches instead of local ones. This is why I don't commit anything into local clone of "not 100% mine" repos including FreeBSD ones. (IIRC, at least one of official repo, maybe src, was re-created as of mis-matches on its transision from Subversion.) So my workflow for NVIDIA driver ports is like below. For usual cases that no additions are done (modify or delete only): Simply use `git diff` (with -U999999 option for Phabricator) and remove anything unrelated (introduced by patches from others). For special cases that some additions are needed: `git stash --include-untracked` to save all changes into stash. `git stash show -p --include-untracked` to extract all changes. (with -U999999 option for Phabricator) `git stash pop` to restore. and remove anything unrelated (introduced by patches from others). Note that adding "-- / / ..." is handy for ports to reduce noises. TBH, my workflow would be tooooo paranoid for ports or docs. Regards. -- Tomoaki AOKI