Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 10:13:36 +0100
From:      John Baldwin <jhb@FreeBSD.org>
To:        Eitan Adler <lists@eitanadler.com>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: upstream for contrib/tzcode/stdtme?
Message-ID:  <73a079ff-6bfd-150f-c67f-05f0f67b9aa0@FreeBSD.org>
In-Reply-To: <CAF6rxgmxmbLeOmN-GoVL0aK5FgXwf1RXAnKSZbt9FOV9ErQyLA@mail.gmail.com>
References:  <C8E09003-E15D-4D68-B783-B0FD435454D0@freebsd.org> <abce970e-af0b-3f7b-3fcd-a77b5e7a1b50@FreeBSD.org> <CAF6rxgkOgBatF17%2Bak=8SqTVO9UrNr8qA6YSYQoZsRDnKAgUtA@mail.gmail.com> <20a85a8f-29a7-0d8f-64d1-9ba005ffe79c@FreeBSD.org> <CAF6rxg=iaKcGMGy=auXDwGTx-C7t702o__OdVPHWR5Yc88uzRg@mail.gmail.com> <10e35d23-37d8-edf4-fa3b-9663bfdaa629@FreeBSD.org> <CAF6rxgm-YK546bP==0Yh0YU31%2BhkfU6O613j7vhPt%2BTDN0puVQ@mail.gmail.com> <7C8DB02A-8C15-4917-A941-A10DD2F3AB50@trouble.is> <8B61C2A5-DCEC-403A-B8F3-0B5BEF958612@freebsd.org> <CAF6rxgkx6Ej5gRaia8BD-0fwPHa5NGvhpAKXjxDLpvv5ox_XSQ@mail.gmail.com> <20180812233252.GD30769@rincewind.trouble.is> <CAF6rxgmxmbLeOmN-GoVL0aK5FgXwf1RXAnKSZbt9FOV9ErQyLA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/18/18 5:43 AM, Eitan Adler wrote:
> On Sun, 12 Aug 2018 at 16:32, Philip Paeps <philip@freebsd.org> wrote:
>>
>> On 2018-08-12 15:09:00 (-0700), Eitan Adler wrote:
>>> On Sun, 12 Aug 2018 at 06:00, Philip Paeps <philip@freebsd.org> wrote:
>>>>
>>>> On 2018-08-12 20:36:23 (+0800), Philip Paeps wrote:
>>>>
>>>>> On 2018-08-12 20:23:23 (+0800), Eitan Adler wrote:
>>>>>
>>>>>> On Mon, 18 Jun 2018 at 10:08, John Baldwin <jhb@freebsd.org> wrote:
>>>>>>>
>>>>>>> On 6/15/18 4:09 PM, Eitan Adler wrote:
>>>>>>>> On 15 June 2018 at 11:31, John Baldwin <jhb@freebsd.org> wrote:
>>>>>>>>
>>>>>>>>> I think this second approach is actually a better plan and is not
>>>>>>>>> quite what you
>>>>>>>>> were suggesting.
>>>>>>>>>
>>>>>>>>> That is, import the vendor bits corresponding to our existing code
>>>>>>>>> first into
>>>>>>>>> the vendor area,
>>>>>>>>
>>>>>>>>> then svn cp our existing files from libc, zic, etc. into the
>>>>>>>>> contrib/stdtime tree in the correct layout and do a single 'svn
>>>>>>>>> merge --record-only'
>>>>>>>>> merge to initialize the vendor mergeinfo.
>>>>>>>>> At that point you should be able to
>>>>>>>>> svn diff contrib/stdtime against the vendor/stdtime/dist to
>>>>>>>>> determine what local
>>>>>>>>> changes we have and start to think about them.
>>>>>>
>>>>>> Coming back to this. In r337683 and r337684 I imported a recent copy
>>>>>> of of TZDB. I was unable to find a copy of the 2010n distribution in
>>>>>> the original layout.
>>>>>
>>>>> That's because we split up the tzcode in our vendor area (for reasons
>>>>> I've never understood).  As far as I know, there is no 1:1 mapping
>>>>> from any tzcode distribution to what we have in our repository.
>>>>>
>>>>>> The next step, if I understand, is to do the following:
>>>>>> cd /srv/srv/freebsd/svn/head/contrib
>>>>>> mkdir tzdb
>>>>>> cd tzdb
>>>>>> svn cp ../tzcode/stdtime/* .
>>>>>> svn cp ../tzcode/zic/* .
>>>>>> svn cp ../tzdata/* .
>>>>>> svn ci
>>>>>> (the above ignores duplicated files, but that's just expanding the
>>>>>> wildcards appropriately).
>>>>>>
>>>>>> After that:
>>>>>> svn merge --record-only '^/vendor/tzdb' .
>>>>>>
>>>>>> At this point we'll be able to diff contrib/tzdb and vendor/tzdb to
>>>>>> show the most current vendor code compared our, modified old code.
>>>>>>
>>>>>> Is this correct? Is this the optimal plan?
>>>
>>> ...
>>>>  please import tzcode separately  and leave tzdata alone.
>>>
>>> Done in r337693 and  r337694.
>>
>> Thank you!
>>
>> For the next tzdata import, I'll consider moving vendor/tzdata to
>> vendor/tzdb/tzdata before doing the copies to contrib/.
>>
>>> The next step, if I understand, is to do the following:
>>> cd /srv/srv/freebsd/svn/head/contrib
>>> mkdir tzdb
>>> cd tzdb
>>> svn cp ../tzcode/stdtime/* .
>>> svn cp ../tzcode/zic/* .
>>> svn ci
>>> (the above ignores duplicated files, but that's just expanding the
>>> wildcards appropriately).
>>>
>>> After that:
>>> svn merge --record-only '^/vendor/tzdb' .
>>>
>>> At this point we'll be able to diff contrib/tzdb and vendor/tzdb to
>>> show the most current vendor code compared our, modified old code.
>>>
>>> Is this correct? Is this the optimal plan?
>>
>> I would keep contrib/tzcode (and contrib/tzdata) rather than moving to
>> contrib/tzdb.  Having them together under vendor/ makes sense because
>> it's the same vendor, but under contrib, they're definitely separate.
> 
> I wanted to use a separate directory to make it clearler what's clean
> and what's not but lets go with the current directory.
> 
> cd /srv/srv/freebsd/svn/head/
> cd contrib/tzcode
> svn mv stdtime/* .
> svn cp zic/* .
> cd ../..
> $EDITOR usr.sbin/zic/zic/Makefile
> $EDITOR usr.sbin/zic/zdump/Makefile
> $EDITOR lib/libc/stdtime/Makefile.inc
> svn ci
> svn merge --record-only '^/vendor/tzcode' .
> svn ci
> 
> This will leave contrib with the old code and vendor with the new code
> and mergeinfo claiming we're fully merged.  Is that the state of
> affairs that we want?  I don't know subversion well enough to
> formulate a better plan.

Can't you import the "current" version of tzcode into the vendor area
(what we have now) and then diff against that once it is moved to see
what local diffs we have that we still need vs don't need, then separately
update the vendor area to the latest version and do a "normal" merge?

If we can't determine what version we currently have then you can look
at the manual diff as a fallback, but if you can find the matching
version and import that into vendor first that might be best.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?73a079ff-6bfd-150f-c67f-05f0f67b9aa0>