From owner-freebsd-ports@freebsd.org Tue Aug 14 12:56:38 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 7879A10779DE for ; Tue, 14 Aug 2018 12:56:38 +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 0EF2E8DC8F for ; Tue, 14 Aug 2018 12:56:37 +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 87855263AA2 Subject: Re: workflow question: how do you maintain the port in sync with upstream? To: blubee blubeeme Cc: freebsd-ports@freebsd.org References: <05457c2b-b85c-a929-20e7-38ff1b2899d6@collabora.com> <87211ccd-bb2f-cd03-ecde-fd123d0c9ca5@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 v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NpvOqqdwyCIyAQuG/Z 00CcD92WMQH3LmZkHJ0A5amZmVp/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 09:56:24 -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 12:56:38 -0000 On 08/13/2018 09:50 PM, blubee blubeeme wrote: > > > On Tue, Aug 14, 2018, 08:26 Helen Koike > wrote: > > > > On 08/13/2018 08:00 PM, blubee blubeeme wrote: > > > > > > On Tue, Aug 14, 2018, 06:30 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?). > > > >     [1] > >    >  https://github.com/helen-fornazier/bsd-update-patches/blob/master/freebsd-gce-update.sh > > > >     Thanks > >     Helen > > > >     _______________________________________________ > >     freebsd-ports@freebsd.org > > mailing > >     list > >     https://lists.freebsd.org/mailman/listinfo/freebsd-ports > >     To unsubscribe, send any mail to > >     "freebsd-ports-unsubscribe@freebsd.org > > >      >" > > > > Submit your patches upstream, once they get accepted your work on > > FreeBSD is greatly simplified.  > > > > Best,  > > Owen > > > > I am doing that, but there are some changes that I couldn't include in > upstream yet. > > Helen > > Can you give an example of types of changes can't be upstream yet and > their reasoning why not?  > > Best,  > Owen > Sure, e.g. "service -e" vs "service --status-all", there is also sed vs gsed (but it just came to mind that I could add this replacement inside the Makefile) [1] https://github.com/freebsd/freebsd-ports/blob/master/sysutils/google-compute-engine-oslogin/files/patch-bin_google__oslogin__control#L54 Please, let me know if there is a better way to solve this, meanwhile I am keeping this patch in the port and I always need to rebase my changes. And as a general case, I sometimes implement a fix only for FreeBSD e.g. [2], then I think in the better way to include in the upstream code e.g. [3] while keeping portability with Linux, and sometimes it takes a while for the patch to be merged in upstream, so meanwhile I need to rebase the patch in every update of the ports. [2] https://github.com/freebsd/freebsd-ports/blob/master/sysutils/py-google-compute-engine/files/patch-google__compute__engine_networking_ip__forwarding_ip__forwarding__utils.py [3] https://github.com/GoogleCloudPlatform/compute-image-packages/pull/622 Thanks Helen