From patchwork Fri Mar 1 06:09:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1906548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TmHjq5QbNz1yXC for ; Fri, 1 Mar 2024 17:09:35 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rfw5F-0006qb-NY; Fri, 01 Mar 2024 06:09:25 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rfw5A-0006qE-1p for kernel-team@lists.ubuntu.com; Fri, 01 Mar 2024 06:09:20 +0000 Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id D0ED93F880 for ; Fri, 1 Mar 2024 06:09:19 +0000 (UTC) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-5d8bff2b792so1253292a12.1 for ; Thu, 29 Feb 2024 22:09:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709273358; x=1709878158; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MabjZ3dRIyz0sE3iImhWbagpkciC2E1jjQAbfU8/Cks=; b=HEpTM3s1HNPHMpjKlS7Grge3rf2dKfHou1PJ1yOkXnmvLA1ZaCmR5BOFO7yCMQIEX6 jw0OFfDUBjZFnjglZP+SvSNV6J2GjGJt8eFpdZH2CLeXfRUeAbnHki1fb7dEtOZdLCeq tfKTZiIa+zVckpGVsHmwoIGbEvXVVGL+0jwxgcqmrZh0q3Kr4gBUA0y4MOL7DWuQymd5 STzjYMkJLzlS9PcYbjMAcHC29MpZn6NImc7rJ11svuPPjB+JL1WdeH6lHtgUwlFxmGRh ZpaTlleo3pq/9gAC40i9gdto5hLBX3vm0eFwRfKxaa3aKct83ExwtcAxxTbBbVNbAWoj vbwA== X-Gm-Message-State: AOJu0Yw0sf6Zz9S+zDHnUr+mwnczFITSV5jFBR4SDkoD8JDhSZLJFUcs TTjQDIyYRKjITqCLeV55wcI6dYfqLPt0QijJBHWHENAn+RUBmYPLQCbRrlvQVkKLIKzifOXTFDa eoK0Sh0OfwtHdm5+IXiNZez8kLY02AfbMrzhx38VnE3QiclmynwAaySxDhglWHw/p6cePI3L757 Xc8+crMKYE0g== X-Received: by 2002:a05:6a20:af11:b0:1a0:ff4d:eb2d with SMTP id dr17-20020a056a20af1100b001a0ff4deb2dmr476693pzb.54.1709273358327; Thu, 29 Feb 2024 22:09:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4T9iuHvXXli3gy8XWlGLwMJEE7ZQc5EW3PPtZRjKV27CumAH+US748KizFnIOwCvE21bVgg== X-Received: by 2002:a05:6a20:af11:b0:1a0:ff4d:eb2d with SMTP id dr17-20020a056a20af1100b001a0ff4deb2dmr476686pzb.54.1709273357949; Thu, 29 Feb 2024 22:09:17 -0800 (PST) Received: from zoe.. ([2001:f74:8f00:c00:6aff::1001]) by smtp.gmail.com with ESMTPSA id p11-20020a17090ab90b00b0029b26068e17sm340633pjr.18.2024.02.29.22.09.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 22:09:17 -0800 (PST) From: Masahiro Yamada To: kernel-team@lists.ubuntu.com Subject: [Unstable/Noble][PATCH] UBUNTU: [packaging] remove debian/stamps/keep-dir Date: Fri, 1 Mar 2024 15:09:13 +0900 Message-Id: <20240301060913.270221-1-masahiro.yamada@canonical.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Ubuntu kernel touches a stamp file in debian/stamps/ without creating the directory. Since git cannot track an empty directory, debian/stamps/keep-dir was added to keep the debian/stamps/ directory. Import the 'stamp' macro from Debian kernel to create the stamps directory. [1]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.5.10-1/debian/rules.real#L40 Signed-off-by: Masahiro Yamada --- This was written during the hackathon. Since pull requests in getea are no longer considered, let's see if the same patch is individually acceptable in kernel ML. debian/rules | 3 +-- debian/rules.d/0-common-vars.mk | 2 ++ debian/rules.d/2-binary-arch.mk | 14 +++++++------- debian/rules.d/3-binary-indep.mk | 4 ++-- debian/stamps/keep-dir | 1 - 5 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 debian/stamps/keep-dir diff --git a/debian/rules b/debian/rules index f7d3c10a0bad..6e775948687d 100755 --- a/debian/rules +++ b/debian/rules @@ -127,8 +127,7 @@ clean: debian/control debian/canonical-certs.pem debian/canonical-revoked-certs. # normal build junk rm -rf $(DEBIAN)/abi - rm -rf $(builddir) - rm -f $(stampdir)/stamp-* + rm -rf $(builddir) $(stampdir) rm -rf debian/linux-*/ cp $(DEBIAN)/changelog debian/changelog diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 8186268746ea..9bbd412fb4f7 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -32,6 +32,8 @@ define if_package $(if $(filter $(1),$(packages_enabled)),$(2)) endef +stamp = [ -d $(dir $@) ] || mkdir $(dir $@); touch $@ + # # do_full_build -- are we doing a full buildd style build, i.e., are we # building in a PPA diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 510103d1b5b0..9191fc0e3508 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -9,7 +9,8 @@ debian/scripts/fix-filenames: debian/scripts/fix-filenames.c $(stampdir)/stamp-prepare-%: config-prepare-check-% @echo Debug: $@ - @touch $@ + $(stamp) + $(stampdir)/stamp-prepare-tree-%: target_flavour = $* $(stampdir)/stamp-prepare-tree-%: debian/scripts/fix-filenames @echo Debug: $@ @@ -23,7 +24,7 @@ $(stampdir)/stamp-prepare-tree-%: debian/scripts/fix-filenames find $(builddir)/build-$* -name "*.ko" | xargs rm -f $(kmake) O=$(builddir)/build-$* $(conc_level) rustavailable || true $(kmake) O=$(builddir)/build-$* $(conc_level) olddefconfig - touch $@ + $(stamp) # Used by developers as a shortcut to prepare a tree for compilation. prepare-%: $(stampdir)/stamp-prepare-% @@ -45,8 +46,7 @@ ifeq ($(do_dbgsym_package),true) $(kmake) O=$(builddir)/build-$* $(conc_level) scripts_gdb ; \ fi endif - - @touch $@ + $(stamp) define build_dkms_sign = $(shell set -x; if grep -q CONFIG_MODULE_SIG=y $(1)/.config; then @@ -495,7 +495,7 @@ ifneq ($(do_full_build),false) # Clean out this flavours build directory. rm -rf $(builddir)/build-$* endif - @touch $@ + $(stamp) headers_tmp := $(CURDIR)/debian/tmp-headers headers_dir := $(CURDIR)/debian/linux-libc-dev @@ -629,7 +629,7 @@ ifeq ($(do_any_tools),true) install -d $(builddirpa) rsync -a --exclude debian --exclude debian.master --exclude $(DEBIAN) --exclude .git -a ./ $(builddirpa)/ endif - touch $@ + $(stamp) $(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch install-arch-headers build-arch @echo Debug: $@ @@ -677,7 +677,7 @@ ifeq ($(do_tools_hyperv),true) cd $(builddirpa)/tools/hv && make CFLAGS="-I$(headers_dir)/usr/include -I$(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)" CROSS_COMPILE=$(CROSS_COMPILE) hv_kvp_daemon hv_vss_daemon hv_fcopy_daemon endif endif - @touch $@ + $(stamp) .PHONY: install-perarch install-perarch: toolspkgdir = $(CURDIR)/debian/$(tools_pkg_name) diff --git a/debian/rules.d/3-binary-indep.mk b/debian/rules.d/3-binary-indep.mk index 70835566c168..90334b85c900 100644 --- a/debian/rules.d/3-binary-indep.mk +++ b/debian/rules.d/3-binary-indep.mk @@ -29,7 +29,7 @@ ifeq ($(do_flavour_header_package),true) # Do not ship .o and .cmd artifacts in headers find $(indep_hdrdir) -name \*.o -or -name \*.cmd -exec rm -f {} \; endif - @touch $@ + $(stamp) srcpkg = linux-source-$(release) srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg) @@ -145,7 +145,7 @@ endif $(stampdir)/stamp-prepare-indep: @echo Debug: $@ dh_prep -i - @touch $@ + $(stamp) .PHONY: install-indep install-indep: $(stampdir)/stamp-install-headers install-source install-tools diff --git a/debian/stamps/keep-dir b/debian/stamps/keep-dir deleted file mode 100644 index 5c38d4a5c411..000000000000 --- a/debian/stamps/keep-dir +++ /dev/null @@ -1 +0,0 @@ -Place holder