[PATCH 3/3] package: debian: don't include .gitignore under scripts/

Thomas Böhler posted 3 patches 3 weeks, 3 days ago
[PATCH 3/3] package: debian: don't include .gitignore under scripts/
Posted by Thomas Böhler 3 weeks, 3 days ago
Files to copy into the header package from the scripts/ directory are
listed by a call to find which also includes .gitignore files. These
don't belong in the package, and lintian also complains with a
"package-contains-vcs-control-file":

    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/basic/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/gcc-plugins/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/gdb/linux/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/genksyms/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/ipe/polgen/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/mod/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/selinux/genheaders/.gitignore]
    W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/selinux/mdp/.gitignore]

Filter the .gitignore files so they're not copied into the resulting
package.

Signed-off-by: Thomas Böhler <t.boehler@kunbus.com>
---
 scripts/package/install-extmod-build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build
index d2c9cacecc0c..5c735e176b53 100755
--- a/scripts/package/install-extmod-build
+++ b/scripts/package/install-extmod-build
@@ -12,7 +12,8 @@ is_enabled() {
 find_in_scripts() {
 	find scripts \
 		\( -name atomic -o -name dtc -o -name kconfig -o -name package \) -prune -o \
-		! -name unifdef -a ! -name mk_elfconfig -a \( -type f -o -type l \) -print
+		! -name unifdef -a ! -name mk_elfconfig -a \( -type f -o -type l \) \
+		! -name .gitignore -print
 }
 
 mkdir -p "${destdir}"
@@ -23,7 +24,8 @@ mkdir -p "${destdir}"
 	find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*'
 	find "arch/${SRCARCH}" -name generated -prune -o -name include -type d -print
 	find "arch/${SRCARCH}" -name Kbuild.platforms -o -name Platform
-	find include \( -name config -o -name generated \) -prune -o \( -type f -o -type l \) -print
+	find include \( -name config -o -name generated \) -prune -o \( -type f -o -type l \) \
+		! -name .gitignore -print
 	find_in_scripts
 ) | tar -c -f - -C "${srctree}" -T - | tar -xf - -C "${destdir}"
 
-- 
2.39.2

Re: [PATCH 3/3] package: debian: don't include .gitignore under scripts/
Posted by Masahiro Yamada 2 weeks, 1 day ago
Please use "kbuild: deb-pkg:" as the commit subject.



On Thu, Oct 31, 2024 at 10:26 PM Thomas Böhler <t.boehler@kunbus.com> wrote:
>
> Files to copy into the header package from the scripts/ directory are
> listed by a call to find which also includes .gitignore files. These
> don't belong in the package, and lintian also complains with a
> "package-contains-vcs-control-file":
>
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/basic/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/gcc-plugins/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/gdb/linux/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/genksyms/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/ipe/polgen/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/mod/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/selinux/genheaders/.gitignore]
>     W: linux-headers-6.12.0-rc4-g7e04fcfc6195: package-contains-vcs-control-file [usr/src/linux-headers-6.12.0-rc4-g7e04fcfc6195/scripts/selinux/mdp/.gitignore]


Could you add log messages based on linux-headers-6.12.0-rc6 instead?
Then, the line length will become shorter.



> Filter the .gitignore files so they're not copied into the resulting
> package.
>
> Signed-off-by: Thomas Böhler <t.boehler@kunbus.com>
> ---
>  scripts/package/install-extmod-build | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build
> index d2c9cacecc0c..5c735e176b53 100755
> --- a/scripts/package/install-extmod-build
> +++ b/scripts/package/install-extmod-build
> @@ -12,7 +12,8 @@ is_enabled() {
>  find_in_scripts() {
>         find scripts \
>                 \( -name atomic -o -name dtc -o -name kconfig -o -name package \) -prune -o \
> -               ! -name unifdef -a ! -name mk_elfconfig -a \( -type f -o -type l \) -print
> +               ! -name unifdef -a ! -name mk_elfconfig -a \( -type f -o -type l \) \
> +               ! -name .gitignore -print

For consistency, please move the new pattern before -a \( -type f -o -type l \)



>  }
>
>  mkdir -p "${destdir}"
> @@ -23,7 +24,8 @@ mkdir -p "${destdir}"
>         find "arch/${SRCARCH}" -maxdepth 1 -name 'Makefile*'
>         find "arch/${SRCARCH}" -name generated -prune -o -name include -type d -print
>         find "arch/${SRCARCH}" -name Kbuild.platforms -o -name Platform
> -       find include \( -name config -o -name generated \) -prune -o \( -type f -o -type l \) -print
> +       find include \( -name config -o -name generated \) -prune -o \( -type f -o -type l \) \
> +               ! -name .gitignore -print
>         find_in_scripts
>  ) | tar -c -f - -C "${srctree}" -T - | tar -xf - -C "${destdir}"
>
> --
> 2.39.2
>


-- 
Best Regards
Masahiro Yamada