From nobody Tue Mar 28 10:27:54 2023 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 4Pm5VY6x5mz41jgM for ; Tue, 28 Mar 2023 10:28:05 +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 4Pm5VX0sR2z4FSR for ; Tue, 28 Mar 2023 10:28:03 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of junchoon@dec.sakura.ne.jp has no SPF policy when checking 153.125.133.21) smtp.mailfrom=junchoon@dec.sakura.ne.jp; dmarc=none Received: from kalamity.joker.local (123-1-88-210.area1b.commufa.jp [123.1.88.210]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 32SARsux040684 for ; Tue, 28 Mar 2023 19:27:54 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Tue, 28 Mar 2023 19:27:54 +0900 From: Tomoaki AOKI To: freebsd-hackers@freebsd.org Subject: Re: what's the Correct git update method keeping local changes Message-Id: <20230328192754.a4991f95ea76df9caddd29d5@dec.sakura.ne.jp> In-Reply-To: <708822f5-2a2f-35f7-8f79-bf48ff644a22@FreeBSD.org> References: <708822f5-2a2f-35f7-8f79-bf48ff644a22@FreeBSD.org> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.2) 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-Spamd-Result: default: False [-1.48 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.959]; NEURAL_HAM_LONG(-0.92)[-0.919]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[sakura.ne.jp]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Pm5VX0sR2z4FSR X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Tue, 28 Mar 2023 09:59:45 +0200 Matthias Andree wrote: > Am 28.03.23 um 05:19 schrieb void: > > Hello hackers@ > > > > I looked in the porters and developers handbooks and couldn't find > > reference > > to a Correct method of working with git, poudriere, the ports tree and > > local changes for a use case like mine. > > > > Right now my workflow looks like this: > > > > 1. apply patch either with patch -p0 < patchfile or git apply from the > >    top of the ports tree > > 2. git stash > > 3. poudriere ports -u -q > > 4. git stash pop > > 5. run the poudriere build > > > > then, subsequent poudriere builds need steps 2-5 repeated. > > > > I'm wary of git merge/apply because i'm not a dev and so don't want to push > > changes. but I want to update the ports tree for poudriere with local > > changes > > keeping them local. > > > > What's the best way? > > So - there's some discrepancy in your tools there, you are using git to > keep local patches, and poudriere to update. This seems odd. Is > poudriere using git to update your ports tree? Portsnap? Something > else? We don't know. > > I personally do not use poudriere ports -u, in fact I am maintaining my > /usr/ports in Git (but then I occasionally push from my tree into > FreeBSD's), and poudriere knows the ports tree with a "null" method, and > then 2...4 become a simple "git pull --rebase --autostash". > > > $ poudriere ports -l > > PORTSTREE METHOD TIMESTAMP PATH > > default null 2023-03-27 05:59:35 /usr/ports > > -- > Matthias Andree > FreeBSD ports committer I myself use git to update ports tree and never use `poudriere port -u`. Basically every step is done on /usr/ports. 1. Apply patches I want to try. 2. `git stash` 3. `git pull --ff-only` 4. `portsdb -Uu` 5. `git stash apply` Step 4 is for portupgrade (still use it if tooooooo many update is proposed by `poudriere bulk` but need some ports updated right away (basically small security updates), and pkg_replace doesn't work as intended. This step updates INDEX locally and update portupgrade database. If INDEX is somehow broken, do `portsdb-Fu` before step 5 to fetch last sane (but old) INDEX. Note that I've configured poudriere ports tree as below to use /usr/ports. `poudriere ports -c -f none -M /usr/ports -m null` This is because, I cannot recall which actually was, some ports hesitates to build unless ports tree is /usr/ports and I only use poudriere on bare metal environment. No builds for other archs nor branches. -- Tomoaki AOKI