From owner-freebsd-ports@freebsd.org Tue Aug 14 14:21:14 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D679E10799EA for ; Tue, 14 Aug 2018 14:21:13 +0000 (UTC) (envelope-from helen.koike@collabora.com) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "bhuna.collabora.co.uk", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6286D717E6 for ; Tue, 14 Aug 2018 14:21:13 +0000 (UTC) (envelope-from helen.koike@collabora.com) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 233D827E15E Subject: Re: workflow question: how do you maintain the port in sync with upstream? To: Adam Weinberger Cc: freebsd-ports@freebsd.org References: <05457c2b-b85c-a929-20e7-38ff1b2899d6@collabora.com> From: Helen Koike Openpgp: preference=signencrypt Autocrypt: addr=helen.koike@collabora.com; keydata= xsFNBFmOMD4BEADb2nC8Oeyvklh+ataw2u/3mrl+hIHL4WSWtii4VxCapl9+zILuxFDrxw1p XgF3cfx7g9taWBrmLE9VEPwJA6MxaVnQuDL3GXxTxO/gqnOFgT3jT+skAt6qMvoWnhgurMGH wRaA3dO4cFrDlLsZIdDywTYcy7V2bou81ItR5Ed6c5UVX7uTTzeiD/tUi8oIf0XN4takyFuV Rf09nOhi24bn9fFN5xWHJooFaFf/k2Y+5UTkofANUp8nn4jhBUrIr6glOtmE0VT4pZMMLT63 hyRB+/s7b1zkOofUGW5LxUg+wqJXZcOAvjocqSq3VVHcgyxdm+Nv0g9Hdqo8bQHC2KBK86VK vB+R7tfv7NxVhG1sTW3CQ4gZb0ZugIWS32Mnr+V+0p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mVp/2NhWFIXnzMGCG+pnenYkYTs+nPwpEeF9aURlT3RQ6MEX te5bno0pQAZmJGlfxzPeId4BXGIlyCBGa8AYVcAH4byD/Lj1CWMuF/n+PQOloCMTUQsWuHJG WAFfICCspjVwzVDZMr3W3dKesrufYdXM0yVlXc39Zvx2sI94tMPaaFGvk758TQohg28OlPFD AxxgkCTrLa8OeJxNJFAz4cmmCWiZbm3SSYLzVFkNozQujL8c3y2U5yM3Tq7RmU9Djxh4s10p OoTFbIyky1af/kDLOBTNMXSNJ95+CDyH4g6rHhYJcjUribIgChGr7eLiSdQCpoyjcOe6n7ua NDLkOLQPocgjJb/AE46aMq67SVffqOTtLZZNPrSKnw/RVt7kbpRrcz5a45oX1x2kwYBBa//G cNC+diAifR6fnbn0lFc5oop99E0SCa0F4V/PYh6myRcqYH8huntTFLvBSYnG/tBYAeu1 Message-ID: Date: Tue, 14 Aug 2018 11:20:59 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 14:21:14 -0000 On 08/14/2018 12:05 AM, Adam Weinberger wrote: > On Mon, Aug 13, 2018 at 4:28 PM Helen Koike wrote: >> >> Hello, >> >> I am new to the community, I am maintaining two packages and I would >> like to check with you if there is a better workflow to do this. >> >> The upstream project of the port I am maintaining is held in github, and >> I also have patches in the /usr/ports/sysutils/myport/file/ folder. >> >> So I keep a fork of the upstream project with a branch containing a >> commit with the patches from the /usr/ports/sysutils/myport/file/. >> >> Every time I need to update the port to a newer version, I do a git pull >> in this branch, then I run a script [1] to re-generate the patches in >> the /usr/ports/sysutils/myport/file/ >> >> This script basically generates a file.orig of all modified files in >> git, then copy the modified file to WORK_DIR, then run make makepatch. >> >> >> for file in ${CHANGES}; do >> mv ${WORK_DIR}/${file} ${WORK_DIR}/${file}.orig >> cp ${PROJECT_PATH}/${file} ${WORK_DIR}/${file} >> done >> make makepatch >> >> >> I would like to know if there is a better way to do this (some tool that >> I am not aware of?). > > IIUC, the process you're describing seems to be rebasing your changes > and then generating diffs. You might have an easier time if you just > do that: rebase, and then generate a diff (see the last point here)> > Your script automates some of the routine Makefile changes, and while > there are some tools in ports-mgmt/ that can automate that, we don't > generally recommend them. > > It's common for Makefiles to have a maintainer-update: target that > keeps the repetitive update tasks in the Makefile (which also helps > the next person to maintain the port). I didn't know about this target, I'll take a look. Thanks. > > Also, where many files are modified on a continually-changing basis, > it's acceptable (though less systemically desirable) to put all your > patches into one file. The benefit is that you can generate that one > file with a single git diff, and it makes PR submission far, far > simpler. Is there a way to easily transform a git patch to the FreeBSD file/*.patch format? Because I use make makepatch, and it will generate several patches anyway. Once I used "diff -Nur", but it doesn't seem to be the same exact format as the one generated by make makepatch. > > Do any of those help? > > # Adam > > Thanks Helen