[neon/qt6/qbs/Neon/release] debian: simplify .gitignore handling more

Pino Toscano null at kde.org
Sat Aug 30 06:05:04 BST 2025


Git commit 038eff724c5fcbe8d8a56ebe5fcf540238dbd4a4 by Pino Toscano.
Committed on 01/11/2024 at 10:11.
Pushed by carlosdem into branch 'Neon/release'.

simplify .gitignore handling more

- backport upstream fix to avoid their installation
- drop no more needed cleaning after installation to debian/tmp

M  +3    -2    debian/changelog
M  +1    -0    debian/patches/series
A  +32   -0    debian/patches/upstream_cmake-Do-not-install-.gitignore-files.patch
M  +0    -3    debian/rules

https://invent.kde.org/neon/qt6/qbs/-/commit/038eff724c5fcbe8d8a56ebe5fcf540238dbd4a4

diff --git a/debian/changelog b/debian/changelog
index ac9f59c..06ffded 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,8 +14,9 @@ qbs (2.4.2-3) UNRELEASED; urgency=medium
   * Stop passing -DQBS_INSTALL_PREFIX to cmake, as it has not been used for a
     long time.
   * Simplifying avoiding installing .gitignore files:
-    - do a global search & removal in debian/tmp after the installation there,
-      so it is easier to notice & drop only the ones that get installed
+    - backport upstream commit 862deed5ec60c36c603d5ac84546804ea67cc675 to not
+      install .gitignore files; patch
+      upstream_cmake-Do-not-install-.gitignore-files.patch
     - stop removing them from the sources in dh_auto_clean, to not modify the
       sources
     - drop the entries from debian/not-installed
diff --git a/debian/patches/series b/debian/patches/series
index ad6c86d..8948eba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+upstream_cmake-Do-not-install-.gitignore-files.patch
 skip_test_concurrent.diff
 test_sanitizers_only_on_amd64.diff
 no_nosys_specs.diff
diff --git a/debian/patches/upstream_cmake-Do-not-install-.gitignore-files.patch b/debian/patches/upstream_cmake-Do-not-install-.gitignore-files.patch
new file mode 100644
index 0000000..fcea494
--- /dev/null
+++ b/debian/patches/upstream_cmake-Do-not-install-.gitignore-files.patch
@@ -0,0 +1,32 @@
+From 862deed5ec60c36c603d5ac84546804ea67cc675 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <toscano.pino at tiscali.it>
+Date: Sat, 26 Oct 2024 10:59:34 +0200
+Subject: [PATCH] cmake: Do not install .gitignore files
+
+Avoid installing .gitignore files from the resources, as they are of
+no much use.
+
+Change-Id: I606544a2125bb97124e6f2b1322ccdbfb695c08c
+Reviewed-by: Ivan Komissarov <ABBAPOH at gmail.com>
+---
+ share/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/share/CMakeLists.txt b/share/CMakeLists.txt
+index e47bd74f0..36244c536 100644
+--- a/share/CMakeLists.txt
++++ b/share/CMakeLists.txt
+@@ -52,7 +52,9 @@ add_custom_command(
+     )
+ install(
+     DIRECTORY qbs
+-    DESTINATION "${QBS_RESOURCES_INSTALL_DIR}")
++    DESTINATION "${QBS_RESOURCES_INSTALL_DIR}"
++    PATTERN ".gitignore" EXCLUDE
++    )
+ 
+ # install examples dir
+ install(
+-- 
+2.45.2
+
diff --git a/debian/rules b/debian/rules
index 85d9a73..15c04df 100755
--- a/debian/rules
+++ b/debian/rules
@@ -51,9 +51,6 @@ override_dh_auto_install-indep:
 	dh_auto_install --no-parallel -- -C doc
 	dh_auto_install -- -C share
 
-execute_after_dh_auto_install:
-	find debian/tmp -type f -name .gitignore -print -delete
-
 override_dh_auto_test-arch:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	set -ex; \



More information about the Neon-commits mailing list