bug-hurd
[Top][All Lists]
Advanced

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

Those pesky ChangeLog files...


From: Thomas Schwinge
Subject: Those pesky ChangeLog files...
Date: Sat, 17 Dec 2016 23:47:10 +0100
User-agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu)

Hi!

Those pesky ChangeLog files... have still not gone away, and still are to
be generated properly at "make dist" time.  I pushed the following two
commits, so that the correct things get done for "procfs" and "random".
For example, "Import version from Kilobug" without listing any files is
not an appropriate GNU ChangeLog entry.  Or, special care is needed for
Git merges of disjoint trees, where originally files lived in the
top-level directory and as part of a merge have been moved into a
subdirectory.

I'm sorry we have to spend time on such "marginal" things...  I'd myself
rather do useful things instead.  ;-)

commit c9e8e4959e7fef9f4da05a0b20489177bf727955
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Thu Dec 15 10:12:15 2016 +0100

    Fix "procfs" ChangeLog handling
    
    ..., so that the correct things get done for "make dist".
    
            * procfs/ChangeLog: Merge file into...
            * ChangeLog: ... this one, and elaborate some more.
            * Makefile (gen_start_commit, ChangeLog_files): Merge into...
            (ChangeLog_specs): ... this new variable.
            (ChangeLog_files): Rewrite in terms of that one.
            (gitlog-to-changelog_rev, ChangeLog_specs): Add entries for
            "procfs".
            (gen-ChangeLog): Handle that.
---
 ChangeLog        |  17 +++++++
 Makefile         | 133 +++++++++++++++++++++++++++++++------------------------
 procfs/ChangeLog |   6 ---
 3 files changed, 93 insertions(+), 63 deletions(-)

diff --git ChangeLog ChangeLog
index 8ecce54..44cc9ee 100644
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,4 @@
+For all but procfs (see below),
 2772f5c6a6a51cf946fd95bf6ffe254273157a21 is the last commit imported from CVS.
 All commits after that one have valid author and committer information.
 
@@ -55,3 +56,19 @@ Use this to examine the change log for earlier changes:
     $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:trans/ChangeLog
     $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:usermux/ChangeLog
     $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:utils/ChangeLog
+
+procfs:
+
+procfs has been merged in 7877d064a4318fb550b3cbcf64f0ec605e4a53e2.  Before
+aac4aaf42372f61c78061711916c81a9d5bcb42d, it lived in the top-level directory.
+
+Use this to examine the change log, rewriting paths to where they live now:
+
+    $ ./gitlog-to-changelog --strip-tab 
edb4593c38d421b5d538b221a991b50c36fdba15..aac4aaf42372f61c78061711916c81a9d5bcb42d~1
 | sed -e 's%\* [ ]*%* procfs/%' -e s%procfs/procfs/%procfs/%
+
+edb4593c38d421b5d538b221a991b50c36fdba15 is the last commit imported from CVS.
+All commits after that one have valid author and committer information.
+
+Use this to examine the change log for earlier changes:
+
+    $ git show edb4593c38d421b5d538b221a991b50c36fdba15:ChangeLog | sed -e 
's%\* [ ]*%* procfs/%'
diff --git Makefile Makefile
index c2a405a..4b2ef4c 100644
--- Makefile
+++ Makefile
@@ -98,73 +98,92 @@ ChangeLog.tar: gen-ChangeLog
        tar -c -f $@ --owner=0 --group=0 \
          --transform='s%^%$(dist-version)/%' $(ChangeLog_files)
 
-gen_start_commit = 2772f5c6a6a51cf946fd95bf6ffe254273157a21
+# See the ChangeLog file.
+gitlog-to-changelog_rev = \
+  2772f5c6a6a51cf946fd95bf6ffe254273157a21..
 ChangeLog_files = \
-  ChangeLog \
-  auth/ChangeLog \
-  benchmarks/ChangeLog \
-  boot/ChangeLog \
-  config/ChangeLog \
-  console-client/ChangeLog \
-  console/ChangeLog \
-  daemons/ChangeLog \
-  defpager/ChangeLog \
-  doc/ChangeLog \
-  exec/ChangeLog \
-  ext2fs/ChangeLog \
-  fatfs/ChangeLog \
-  fstests/ChangeLog \
-  ftpfs/ChangeLog \
-  hostmux/ChangeLog \
-  hurd/ChangeLog \
-  include/ChangeLog \
-  init/ChangeLog \
-  isofs/ChangeLog \
-  libcons/ChangeLog \
-  libdirmgt/ChangeLog \
-  libdiskfs/ChangeLog \
-  libfshelp/ChangeLog \
-  libftpconn/ChangeLog \
-  libhurdbugaddr/ChangeLog \
-  libihash/ChangeLog \
-  libiohelp/ChangeLog \
-  libnetfs/ChangeLog \
-  libpager/ChangeLog \
-  libpipe/ChangeLog \
-  libports/ChangeLog \
-  libps/ChangeLog \
-  libshouldbeinlibc/ChangeLog \
-  libstore/ChangeLog \
-  libthreads/ChangeLog \
-  libtrivfs/ChangeLog \
-  login/ChangeLog \
-  mach-defpager/ChangeLog \
-  nfs/ChangeLog \
-  nfsd/ChangeLog \
-  pfinet/ChangeLog \
-  pflocal/ChangeLog \
-  proc/ChangeLog \
-  release/ChangeLog \
-  storeio/ChangeLog \
-  sutils/ChangeLog \
-  term/ChangeLog \
-  tmpfs/ChangeLog \
-  trans/ChangeLog \
-  usermux/ChangeLog \
-  utils/ChangeLog
+  $(filter-out :%,$(subst :, :,$(ChangeLog_specs)))
+ChangeLog_specs = \
+  ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  auth/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  benchmarks/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  boot/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  config/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  console-client/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  console/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  daemons/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  defpager/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  doc/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  exec/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  ext2fs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  fatfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  fstests/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  ftpfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  hostmux/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  hurd/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  include/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  init/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  isofs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libcons/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libdirmgt/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libdiskfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libfshelp/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libftpconn/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libhurdbugaddr/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libihash/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libiohelp/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libnetfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libpager/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libpipe/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libports/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libps/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libshouldbeinlibc/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libstore/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libthreads/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  libtrivfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  login/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  mach-defpager/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  nfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  nfsd/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  pfinet/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  pflocal/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  proc/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  release/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  storeio/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  sutils/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  term/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  tmpfs/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  trans/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  usermux/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21 \
+  utils/ChangeLog:2772f5c6a6a51cf946fd95bf6ffe254273157a21
+# procfs
+gitlog-to-changelog_rev += \
+  ^aac4aaf42372f61c78061711916c81a9d5bcb42d~1
+ChangeLog_specs += \
+  procfs/ChangeLog:edb4593c38d421b5d538b221a991b50c36fdba15:ChangeLog
 .PHONY: gen-ChangeLog
 gen-ChangeLog:
        $(AM_V_GEN)if test -d $(top_srcdir)/.git; then                  \
          rm -f $(ChangeLog_files) &&                                   \
          (cd $(top_srcdir)/ &&                                         \
          ./gitlog-to-changelog --strip-tab                             \
-           $(gen_start_commit).. &&                                    \
+           $(gitlog-to-changelog_rev) &&                               \
          echo) >> ChangeLog &&                                         \
-         for f in $(ChangeLog_files); do                               \
+         (cd $(top_srcdir)/ &&                                         \
+         ./gitlog-to-changelog --strip-tab                             \
+           
edb4593c38d421b5d538b221a991b50c36fdba15..aac4aaf42372f61c78061711916c81a9d5bcb42d~1
 && \
+         echo) >> procfs/ChangeLog &&                                  \
+         for cs in $(ChangeLog_specs); do                              \
+           f=$${cs%%:*} &&                                             \
+           s=$${cs#$$f:} && s_f=$$s:$$f && s=$${s_f/*:*:*/$$s} &&      \
            (cd $(top_srcdir)/ &&                                       \
-           git show $(gen_start_commit):$$f) >> $$f                    \
+           git show $$s) >> $$f                                        \
            || exit $$?;                                                \
-         done;                                                         \
+         done &&                                                       \
+         sed                                                           \
+           -e 's%\* [ ]*%* procfs/%'                                   \
+           -e s%procfs/procfs/%procfs/%                                \
+           -i procfs/ChangeLog;                                        \
        fi
 
 $(dist-version).tar: HEAD.tar $(addsuffix /dist-hook,hurd/.. $(subdirs)) 
ChangeLog.tar
diff --git procfs/ChangeLog procfs/ChangeLog
deleted file mode 100644
index 0cd74d0..0000000
--- procfs/ChangeLog
+++ /dev/null
@@ -1,6 +0,0 @@
-edb4593c38d421b5d538b221a991b50c36fdba15 is the last commit imported from CVS.
-All commits after that one have valid author and committer information.
-
-Use this to examine the change log for earlier changes:
-
-    $ git show edb4593c38d421b5d538b221a991b50c36fdba15:ChangeLog

commit 29ca072fcfeb04fc29dfa9853621c15b58a3ebcf
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Fri Dec 16 23:58:04 2016 +0100

    Fix "random" ChangeLog handling
    
    ..., so that the correct things get done for "make dist".
    
            * ChangeLog: Elaborate on "random".
            * Makefile (gitlog-to-changelog_rev, ChangeLog_specs): Add entries
            for "random".
            (gen-ChangeLog): Handle that.
---
 ChangeLog | 18 +++++++++++++++++-
 Makefile  | 26 +++++++++++++++++++++++++-
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git ChangeLog ChangeLog
index 44cc9ee..28b6740 100644
--- ChangeLog
+++ ChangeLog
@@ -1,4 +1,4 @@
-For all but procfs (see below),
+For all but procfs and random (see below),
 2772f5c6a6a51cf946fd95bf6ffe254273157a21 is the last commit imported from CVS.
 All commits after that one have valid author and committer information.
 
@@ -57,6 +57,22 @@ Use this to examine the change log for earlier changes:
     $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:usermux/ChangeLog
     $ git show 2772f5c6a6a51cf946fd95bf6ffe254273157a21:utils/ChangeLog
 
+random:
+
+random has been merged in 707f6cc4dbad734325881c5b275138522188754c.  Before
+1ba2ed95690396bf081d0af043d878b26b8563c2, it lived in the top-level directory.
+
+Use this to examine the change log, rewriting paths to where they live now:
+
+    $ ./gitlog-to-changelog --strip-tab 
ac38884dc9ad32a11d09f55ba9fe399cd0a48e2f..1ba2ed95690396bf081d0af043d878b26b8563c2~1
 | sed -e 's%\* [ ]*%* random/%'
+
+ac38884dc9ad32a11d09f55ba9fe399cd0a48e2f is the commit where it was imported.
+All commits after that one have valid author and committer information.
+
+Use this to examine the change log for earlier changes:
+
+    $ git ls-tree --name-only ac38884dc9ad32a11d09f55ba9fe399cd0a48e2f | perl 
-e 'print "2011-08-18  Gaël Le Mignot  <kilobug\@freesurf.fr>\n\n"; 
while(<>){s%^%\t* random/%;s%$%: New file.%;print;}'
+
 procfs:
 
 procfs has been merged in 7877d064a4318fb550b3cbcf64f0ec605e4a53e2.  Before
diff --git Makefile Makefile
index 4b2ef4c..9de4fa8 100644
--- Makefile
+++ Makefile
@@ -161,6 +161,12 @@ gitlog-to-changelog_rev += \
   ^aac4aaf42372f61c78061711916c81a9d5bcb42d~1
 ChangeLog_specs += \
   procfs/ChangeLog:edb4593c38d421b5d538b221a991b50c36fdba15:ChangeLog
+# random
+gitlog-to-changelog_rev += \
+  ^1ba2ed95690396bf081d0af043d878b26b8563c2~1
+# Specify dummy ChangeLog file, will get overwritten.
+ChangeLog_specs += \
+  random/ChangeLog:HEAD:ChangeLog
 .PHONY: gen-ChangeLog
 gen-ChangeLog:
        $(AM_V_GEN)if test -d $(top_srcdir)/.git; then                  \
@@ -173,6 +179,11 @@ gen-ChangeLog:
          ./gitlog-to-changelog --strip-tab                             \
            
edb4593c38d421b5d538b221a991b50c36fdba15..aac4aaf42372f61c78061711916c81a9d5bcb42d~1
 && \
          echo) >> procfs/ChangeLog &&                                  \
+         rm -f random/ChangeLog-1 &&                                   \
+         (cd $(top_srcdir)/ &&                                         \
+         ./gitlog-to-changelog --strip-tab                             \
+           
ac38884dc9ad32a11d09f55ba9fe399cd0a48e2f..1ba2ed95690396bf081d0af043d878b26b8563c2~1
 && \
+         echo) >> random/ChangeLog-1 &&                                \
          for cs in $(ChangeLog_specs); do                              \
            f=$${cs%%:*} &&                                             \
            s=$${cs#$$f:} && s_f=$$s:$$f && s=$${s_f/*:*:*/$$s} &&      \
@@ -180,10 +191,23 @@ gen-ChangeLog:
            git show $$s) >> $$f                                        \
            || exit $$?;                                                \
          done &&                                                       \
+         rm -f random/ChangeLog_ &&                                    \
+         (cd $(top_srcdir)/ &&                                         \
+         git ls-tree --name-only                                       \
+           ac38884dc9ad32a11d09f55ba9fe399cd0a48e2f) >> random/ChangeLog_ && \
+         rm -f random/ChangeLog-2 &&                                   \
+         perl \
+           -e 'print "2011-08-18  Gaël Le Mignot  <kilobug\@freesurf.fr>\n\n"; 
while(<>){s%^%\t* %;s%$$%: New file.%;print;}' \
+           < random/ChangeLog_ > random/ChangeLog-2 &&                 \
+         cat random/ChangeLog-* > random/ChangeLog &&                  \
+         rm random/ChangeLog?* &&                                      \
          sed                                                           \
            -e 's%\* [ ]*%* procfs/%'                                   \
            -e s%procfs/procfs/%procfs/%                                \
-           -i procfs/ChangeLog;                                        \
+           -i procfs/ChangeLog &&                                      \
+         sed                                                           \
+           -e 's%\* [ ]*%* random/%'                                   \
+           -i random/ChangeLog;                                        \
        fi
 
 $(dist-version).tar: HEAD.tar $(addsuffix /dist-hook,hurd/.. $(subdirs)) 
ChangeLog.tar


Grüße
 Thomas



reply via email to

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