coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] maint: update gnulib to latest


From: Bernhard Voelker
Subject: Re: [PATCH] maint: update gnulib to latest
Date: Fri, 14 Dec 2018 09:23:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3

On 7/24/18 10:49 PM, Eric Blake wrote:
> On 07/24/2018 03:40 PM, Bernhard Voelker wrote:
>> On 07/24/2018 04:08 PM, Eric Blake wrote:
>>> On 07/19/2018 12:22 PM, Bernhard Voelker wrote:
>>>> On 06/25/2018 06:48 PM, Pádraig Brady wrote:
>>>>> `make gnulib-sync` would definitely be worth doing.
>>>>
>>>> Done in the attached.  WDYT?
>>>
>>> Can we move this to gnulib's maint.mk for sharing with other projects?
>>
>> Ideally yes - the problem is that the list of files to sync from gnulib
>> may be different for each project, and even the basenames of some
>> file sometimes do not match:
>>
>>> +       && cp -v gnulib/doc/COPYINGv3 COPYING \
>>
>> Any idea how to work around that?
> 
> As long as any customizations can be characterized into cfg.mk overrides 
> and the generic rule in maint.mk knows how to honor those overrides, it 
> seems like it should work. But I'm not sure what data representation 
> would be easiest to manipulate into those overrides.

Good idea - see attached 2 patches:

* gnulib patch to provide the 'gnulib-sync' target:
  '0001-maintainer-makefile-provide-make-target-to-update-gn.patch'
  [PATCH] maintainer-makefile: provide make target to update gnulib to latest

* coreutils patch to override the hook to copy some extra files after pulling:
  '0001-maint-prepare-for-using-make-gnulib-sync.patch'
  [PATCH] maint: prepare for using "make gnulib-sync"

With this, 'make gnulib-sync' looks like this:

  $ make gnulib-sync
  + git -C gnulib pull origin master
  From git://git.sv.gnu.org/gnulib
   * branch                master     -> FETCH_HEAD
  Already up to date.
  + make cu_GNULIB_SYNC_HOOK
  make[1]: Entering directory '/home/berny/git/coreutils'
  + cp gnulib/doc/COPYINGv3 COPYING
  + cp gnulib/build-aux/bootstrap bootstrap
  + cp gnulib/tests/init.sh tests/init.sh
  make[1]: Leaving directory '/home/berny/git/coreutils'
  + git status --short --untracked-files=no
   M COPYING
   M bootstrap
   M tests/init.sh

WDYT?

> A different approach would be using git symlinks that point into the git 
> submodule (then your local file is always up-to-date if your submodule 
> is up-to-date).

It works for most files, but I don't think e.g. COPYING should only be a 
symlink.

Have a nice day,
Berny

Attachment: 0001-maint-prepare-for-using-make-gnulib-sync.patch
Description: Text Data

Attachment: 0001-maintainer-makefile-provide-make-target-to-update-gn.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]