[1/2] linux-module: use generated changelog instead of debian/changelog.tmpl

Message ID 20250209100017.413168-1-badrikesh.prusty@siemens.com
State Accepted, archived
Headers show
Series [1/2] linux-module: use generated changelog instead of debian/changelog.tmpl | expand

Commit Message

Badrikesh Prusty Feb. 9, 2025, 10 a.m. UTC
The debian/changelog.tmpl file contains hardcoded values for the timestamp and
maintainer fields, resulting in incorrect build info in the generated binary.
Use the generated changelog to ensure accurate build info.

Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
---
 meta/recipes-kernel/linux-module/files/debian/changelog.tmpl | 5 -----
 meta/recipes-kernel/linux-module/module.inc                  | 3 ++-
 2 files changed, 2 insertions(+), 6 deletions(-)
 delete mode 100644 meta/recipes-kernel/linux-module/files/debian/changelog.tmpl

Comments

Uladzimir Bely Feb. 18, 2025, 6:48 a.m. UTC | #1
On Sun, 2025-02-09 at 15:30 +0530, 'Badrikesh Prusty' via isar-users
wrote:
> The debian/changelog.tmpl file contains hardcoded values for the
> timestamp and
> maintainer fields, resulting in incorrect build info in the generated
> binary.
> Use the generated changelog to ensure accurate build info.
> 
> Signed-off-by: Badrikesh Prusty <badrikesh.prusty@siemens.com>
> ---
>  meta/recipes-kernel/linux-module/files/debian/changelog.tmpl | 5 ---
> --
>  meta/recipes-kernel/linux-module/module.inc                  | 3 ++-
>  2 files changed, 2 insertions(+), 6 deletions(-)
>  delete mode 100644 meta/recipes-kernel/linux-
> module/files/debian/changelog.tmpl
> 
> diff --git a/meta/recipes-kernel/linux-
> module/files/debian/changelog.tmpl b/meta/recipes-kernel/linux-
> module/files/debian/changelog.tmpl
> deleted file mode 100644
> index 6e59e062..00000000
> --- a/meta/recipes-kernel/linux-module/files/debian/changelog.tmpl
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -${PN} (${PV}) unstable; urgency=low
> -
> -  * Generated package.
> -
> - -- ISAR project <isar-users@googlegroups.com>  Tue, 6 Feb 2018
> 00:00:00 +0000
> diff --git a/meta/recipes-kernel/linux-module/module.inc
> b/meta/recipes-kernel/linux-module/module.inc
> index 3e8e5e7a..be3ea3f7 100644
> --- a/meta/recipes-kernel/linux-module/module.inc
> +++ b/meta/recipes-kernel/linux-module/module.inc
> @@ -43,7 +43,6 @@ python() {
>  inherit dpkg
>  
>  TEMPLATE_FILES = "debian/control.tmpl \
> -                  debian/changelog.tmpl \
>                    debian/rules.tmpl"
>  TEMPLATE_VARS += " \
>      KERNEL_NAME \
> @@ -68,6 +67,8 @@ do_prepare_build() {
>      rm -rf ${S}/debian
>      cp -r ${WORKDIR}/debian ${S}/
>  
> +    deb_add_changelog
> +
>      for module in ${AUTOLOAD}; do
>          echo "echo $module >> /etc/modules" >> ${S}/debian/postinst
>      done
> -- 
> 2.39.5
> 

Applied to next, thanks.

Patch

diff --git a/meta/recipes-kernel/linux-module/files/debian/changelog.tmpl b/meta/recipes-kernel/linux-module/files/debian/changelog.tmpl
deleted file mode 100644
index 6e59e062..00000000
--- a/meta/recipes-kernel/linux-module/files/debian/changelog.tmpl
+++ /dev/null
@@ -1,5 +0,0 @@ 
-${PN} (${PV}) unstable; urgency=low
-
-  * Generated package.
-
- -- ISAR project <isar-users@googlegroups.com>  Tue, 6 Feb 2018 00:00:00 +0000
diff --git a/meta/recipes-kernel/linux-module/module.inc b/meta/recipes-kernel/linux-module/module.inc
index 3e8e5e7a..be3ea3f7 100644
--- a/meta/recipes-kernel/linux-module/module.inc
+++ b/meta/recipes-kernel/linux-module/module.inc
@@ -43,7 +43,6 @@  python() {
 inherit dpkg
 
 TEMPLATE_FILES = "debian/control.tmpl \
-                  debian/changelog.tmpl \
                   debian/rules.tmpl"
 TEMPLATE_VARS += " \
     KERNEL_NAME \
@@ -68,6 +67,8 @@  do_prepare_build() {
     rm -rf ${S}/debian
     cp -r ${WORKDIR}/debian ${S}/
 
+    deb_add_changelog
+
     for module in ${AUTOLOAD}; do
         echo "echo $module >> /etc/modules" >> ${S}/debian/postinst
     done