gdb: use dynamic year in update-freebsd.sh

Message ID OS3P286MB21528181AF732C6767DB4126F0D19@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM
State New
Headers
Series gdb: use dynamic year in update-freebsd.sh |

Commit Message

Enze Li Feb. 1, 2023, 1:31 p.m. UTC
  When running update-freebsd.sh on FreeBSD, I see the following
modification in freebsd.xml,

-<!-- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2020 Free Software Foundation, Inc.

It means that each time, when we running the update-freebsd.sh on
FreeBSD, we have to correct the year of copyright manually. So fix this
issue by using dynamic year.

Tested by regenerating freebsd.xml on FreeBSD/amd64.
---
 gdb/syscalls/update-freebsd.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


base-commit: 4788abdec79a937e51ad334b608fa1bd03713112
  

Comments

John Baldwin Feb. 1, 2023, 7:44 p.m. UTC | #1
On 2/1/23 5:31 AM, Enze Li wrote:
> When running update-freebsd.sh on FreeBSD, I see the following
> modification in freebsd.xml,
> 
> -<!-- Copyright (C) 2009-2023 Free Software Foundation, Inc.
> +<!-- Copyright (C) 2009-2020 Free Software Foundation, Inc.
> 
> It means that each time, when we running the update-freebsd.sh on
> FreeBSD, we have to correct the year of copyright manually. So fix this
> issue by using dynamic year.
> 
> Tested by regenerating freebsd.xml on FreeBSD/amd64.

LGTM.

Reviewed-by: John Baldwin <jhb@FreeBSD.org>
  
Enze Li March 28, 2023, 1:40 p.m. UTC | #2
Hi all,

Kindly PING for this patch.  John has reviewed the patch, but still
needs a global maintainer to take a look at it.

Best Regards,
Enze

On Wed, 2023-02-01 at 21:31 +0800, Enze Li via Gdb-patches wrote:
> When running update-freebsd.sh on FreeBSD, I see the following
> modification in freebsd.xml,
> 
> -<!-- Copyright (C) 2009-2023 Free Software Foundation, Inc.
> +<!-- Copyright (C) 2009-2020 Free Software Foundation, Inc.
> 
> It means that each time, when we running the update-freebsd.sh on
> FreeBSD, we have to correct the year of copyright manually. So fix
> this
> issue by using dynamic year.
> 
> Tested by regenerating freebsd.xml on FreeBSD/amd64.
> ---
>  gdb/syscalls/update-freebsd.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/gdb/syscalls/update-freebsd.sh b/gdb/syscalls/update-
> freebsd.sh
> index b5b882e921b..ce82564e5c0 100755
> --- a/gdb/syscalls/update-freebsd.sh
> +++ b/gdb/syscalls/update-freebsd.sh
> @@ -33,10 +33,12 @@ if [ $# -ne 1 ]; then
>     exit 1
>  fi
>  
> +year=$(date +%Y)
> +
>  cat > freebsd.xml.tmp <<EOF
>  <?xml version="1.0"?> <!-- THIS FILE IS GENERATED -*- buffer-read-
> only: t -*-  -->
>  <!-- vi:set ro: -->
> -<!-- Copyright (C) 2009-2020 Free Software Foundation, Inc.
> +<!-- Copyright (C) 2009-$year Free Software Foundation, Inc.
>  
>       Copying and distribution of this file, with or without
> modification,
>       are permitted in any medium without royalty provided the
> copyright
> 
> base-commit: 4788abdec79a937e51ad334b608fa1bd03713112
  
Simon Marchi March 28, 2023, 1:50 p.m. UTC | #3
On 3/28/23 09:40, Enze Li via Gdb-patches wrote:
> Hi all,
> 
> Kindly PING for this patch.  John has reviewed the patch, but still
> needs a global maintainer to take a look at it.
> 
> Best Regards,
> Enze

I think that John could have given you an Approved-By.  But in any case:

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon
  
Enze Li March 28, 2023, 2:10 p.m. UTC | #4
Hi Simon, John,

Thanks for the review.  I'm checking this in now.

Enze

On Tue, 2023-03-28 at 09:50 -0400, Simon Marchi wrote:
> On 3/28/23 09:40, Enze Li via Gdb-patches wrote:
> > Hi all,
> > 
> > Kindly PING for this patch.  John has reviewed the patch, but still
> > needs a global maintainer to take a look at it.
> > 
> > Best Regards,
> > Enze
> 
> I think that John could have given you an Approved-By.  But in any
> case:
> 
> Approved-By: Simon Marchi <simon.marchi@efficios.com>
> 
> Simon
  

Patch

diff --git a/gdb/syscalls/update-freebsd.sh b/gdb/syscalls/update-freebsd.sh
index b5b882e921b..ce82564e5c0 100755
--- a/gdb/syscalls/update-freebsd.sh
+++ b/gdb/syscalls/update-freebsd.sh
@@ -33,10 +33,12 @@  if [ $# -ne 1 ]; then
    exit 1
 fi
 
+year=$(date +%Y)
+
 cat > freebsd.xml.tmp <<EOF
 <?xml version="1.0"?> <!-- THIS FILE IS GENERATED -*- buffer-read-only: t -*-  -->
 <!-- vi:set ro: -->
-<!-- Copyright (C) 2009-2020 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-$year Free Software Foundation, Inc.
 
      Copying and distribution of this file, with or without modification,
      are permitted in any medium without royalty provided the copyright