From patchwork Tue Jul 30 03:22:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746484 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 921451854 for ; Tue, 30 Jul 2024 03:22:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722309756; cv=none; b=apn0pjAOua4C0cuDLGJskqxATA9KmQiiianfkN23Oax1MZLfGaJzAK9YOy89q+Wo6TC4nj4UEP3VlTKHzN/rB21Rwo4bh4DNPfXtmStpYqMfx3NSYFiidEFYz0sj9Kv/5MbZUZJY38LpSqeME4ww3iJAsl+9KjpjclavH50nHXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722309756; c=relaxed/simple; bh=788UmdEQaMWPxdDo3XXhYSK4J9wDXK/ZIY/oh08sMD8=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dMkrVADhSWK1UThZpzz+q93IuJg56Mc/Ns6ifzBoUI5Za8bud6Nsr7oDG9LFbGIAV6dSc1BvNAHVyOnMzwMrr1ZExAJNSOD/PQosc1oHybCB4p5ix1kQlQh3PaVnrk7JydV1Wt2wlWAKetMEnBNRvSJpHd5IhyqCPRTxFNW+/6s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PtzL8MZs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PtzL8MZs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18316C32786; Tue, 30 Jul 2024 03:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722309756; bh=788UmdEQaMWPxdDo3XXhYSK4J9wDXK/ZIY/oh08sMD8=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=PtzL8MZsv1fAMNJQvdiuFjfHwIVnFsVV+PFU8P4Da90rxW1cbaxa+9b1wkkMU0/WS yl4mcNr95AlW9NB8lmdFIngGYGJeph5n2pTmnjJxJ24vjHBuZJ2qtbOXIxp1TLISh4 S4X6aFaM/tK4luzjXTzdFUMsNXoFRftca/64nYWsqIiG+52lowj2UVd0/gMblquM1U r9spy83WS2kt5ZvVjd1bZcK82wbn6qaUOWzfomx6VeG2qPGwHd6xy9G8kcd2k96IFL 936JkZRsdtz/mu5Wraa/idyk0Il3sfH3Cp30ep18nQPO1P42Yu0B30E4ShJMS/ScxS 9PrSaUyvmX9QQ== Date: Mon, 29 Jul 2024 20:22:35 -0700 Subject: [PATCH 1/3] misc: shift install targets From: "Darrick J. Wong" To: djwong@kernel.org, cem@kernel.org Cc: linux-xfs@vger.kernel.org Message-ID: <172230941358.1544199.8764965060997616615.stgit@frogsfrogsfrogs> In-Reply-To: <172230941338.1544199.12238614551925293396.stgit@frogsfrogsfrogs> References: <172230941338.1544199.12238614551925293396.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Modify each Makefile so that "install-pkg" installs the main package contents, and "install" just invokes "install-pkg". We'll need this indirection for the next patch where we add an install-selfheal target to build the xfsprogs-self-healing package but will still want 'make install' to install everything on a developer's workstation. Signed-off-by: Darrick J. Wong --- Makefile | 8 +++++--- copy/Makefile | 4 +++- db/Makefile | 4 +++- debian/Makefile | 4 +++- debian/rules | 2 +- doc/Makefile | 4 +++- estimate/Makefile | 4 +++- fsck/Makefile | 4 +++- fsr/Makefile | 4 +++- growfs/Makefile | 4 +++- include/Makefile | 4 +++- io/Makefile | 4 +++- libfrog/Makefile | 2 +- libhandle/Makefile | 4 +++- libxcmd/Makefile | 2 +- libxfs/Makefile | 4 +++- libxlog/Makefile | 2 +- logprint/Makefile | 4 +++- m4/Makefile | 2 +- man/Makefile | 8 +++++--- man/man2/Makefile | 4 +++- man/man3/Makefile | 4 +++- man/man5/Makefile | 5 ++++- man/man8/Makefile | 4 +++- mdrestore/Makefile | 4 +++- mkfs/Makefile | 4 +++- po/Makefile | 4 +++- quota/Makefile | 4 +++- repair/Makefile | 4 +++- rtcp/Makefile | 4 +++- scrub/Makefile | 4 +++- spaceman/Makefile | 4 +++- 32 files changed, 91 insertions(+), 36 deletions(-) diff --git a/Makefile b/Makefile index 4e768526c6fe..44b6c3501539 100644 --- a/Makefile +++ b/Makefile @@ -116,15 +116,17 @@ configure: configure.ac include/builddefs: configure ./configure $$LOCAL_CONFIGURE_OPTIONS -install: $(addsuffix -install,$(SUBDIRS)) +install: install-pkg + +install-pkg: $(addsuffix -install-pkg,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 README $(PKG_DOC_DIR) install-dev: $(addsuffix -install-dev,$(SUBDIRS)) -%-install: +%-install-pkg: @echo "Installing $@" - $(Q)$(MAKE) $(MAKEOPTS) -C $* install + $(Q)$(MAKE) $(MAKEOPTS) -C $* install-pkg %-install-dev: @echo "Installing $@" diff --git a/copy/Makefile b/copy/Makefile index 55160f848225..446d38bea576 100644 --- a/copy/Makefile +++ b/copy/Makefile @@ -18,7 +18,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/db/Makefile b/db/Makefile index 83389376c36c..91e259044beb 100644 --- a/db/Makefile +++ b/db/Makefile @@ -81,7 +81,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) $(INSTALL) -m 755 xfs_admin.sh $(PKG_SBIN_DIR)/xfs_admin diff --git a/debian/Makefile b/debian/Makefile index 2f9cd38c2ea6..f6a996e91871 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -15,7 +15,9 @@ default: include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default ifeq ($(PKG_DISTRIBUTION), debian) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 changelog $(PKG_DOC_DIR)/changelog.Debian diff --git a/debian/rules b/debian/rules index 69a79fc67405..e4eb2499e768 100755 --- a/debian/rules +++ b/debian/rules @@ -100,7 +100,7 @@ binary-arch: checkroot built @echo "== dpkg-buildpackage: binary-arch" 1>&2 $(checkdir) -rm -rf $(dirme) $(dirdev) $(dirdi) - $(pkgme) $(MAKE) -C . install + $(pkgme) $(MAKE) -C . install-pkg $(pkgdev) $(MAKE) -C . install-dev $(pkgdi) $(MAKE) -C debian install-d-i $(pkgme) $(MAKE) dist diff --git a/doc/Makefile b/doc/Makefile index 83dfa38bedd1..ad6749b8d0be 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -16,7 +16,9 @@ CHANGES.gz: @echo " [ZIP] $@" $(Q)$(ZIP) --best -c < CHANGES > $@ -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_DOC_DIR) $(INSTALL) -m 644 CHANGES.gz CREDITS $(PKG_DOC_DIR) ifeq ($(PKG_DISTRIBUTION), debian) diff --git a/estimate/Makefile b/estimate/Makefile index 1080129b3a62..d5f8a6d81d65 100644 --- a/estimate/Makefile +++ b/estimate/Makefile @@ -12,7 +12,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/fsck/Makefile b/fsck/Makefile index 5ca529f53e42..ccba7f0b6892 100644 --- a/fsck/Makefile +++ b/fsck/Makefile @@ -11,7 +11,9 @@ default: $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(INSTALL) -m 755 xfs_fsck.sh $(PKG_SBIN_DIR)/fsck.xfs install-dev: diff --git a/fsr/Makefile b/fsr/Makefile index d57f2de24c22..3ad9f6d824c6 100644 --- a/fsr/Makefile +++ b/fsr/Makefile @@ -15,7 +15,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/growfs/Makefile b/growfs/Makefile index 2f4cc66a76f3..e0ab870bd6ba 100644 --- a/growfs/Makefile +++ b/growfs/Makefile @@ -23,7 +23,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/include/Makefile b/include/Makefile index f7c40a5ce1a1..23727fccfdcd 100644 --- a/include/Makefile +++ b/include/Makefile @@ -57,7 +57,9 @@ install-headers: $(addsuffix -hdrs, $(DKHFILES) $(HFILES)) %-hdrs: $(Q)$(LN_S) -f $(CURDIR)/$* xfs/$* -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_INC_DIR) install-dev: install diff --git a/io/Makefile b/io/Makefile index 3192b813c740..d035420b555c 100644 --- a/io/Makefile +++ b/io/Makefile @@ -85,7 +85,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 xfs_bmap.sh $(PKG_SBIN_DIR)/xfs_bmap diff --git a/libfrog/Makefile b/libfrog/Makefile index acddc894ee93..5ebe36fb58c8 100644 --- a/libfrog/Makefile +++ b/libfrog/Makefile @@ -79,6 +79,6 @@ crc32table.h: gen_crc32table.c crc32defs.h include $(BUILDRULES) -install install-dev: default +install install-pkg install-dev: default -include .ltdep diff --git a/libhandle/Makefile b/libhandle/Makefile index f297a59e47f9..7cfd0fa4f27e 100644 --- a/libhandle/Makefile +++ b/libhandle/Makefile @@ -19,7 +19,9 @@ default: ltdepend $(LTLIBRARY) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL_LTLIB) install-dev: default diff --git a/libxcmd/Makefile b/libxcmd/Makefile index 70e54308c34b..afd5349c8af3 100644 --- a/libxcmd/Makefile +++ b/libxcmd/Makefile @@ -23,6 +23,6 @@ default: ltdepend $(LTLIBRARY) include $(BUILDRULES) -install install-dev: default +install install-pkg install-dev: default -include .ltdep diff --git a/libxfs/Makefile b/libxfs/Makefile index 2f2791cae587..2c6b45953661 100644 --- a/libxfs/Makefile +++ b/libxfs/Makefile @@ -140,7 +140,9 @@ default: ltdepend $(LTLIBRARY) # set up include/xfs header directory include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_INC_DIR) install-headers: $(addsuffix -hdrs, $(PKGHFILES)) diff --git a/libxlog/Makefile b/libxlog/Makefile index b0f5ef154133..3710729fe703 100644 --- a/libxlog/Makefile +++ b/libxlog/Makefile @@ -21,6 +21,6 @@ default: ltdepend $(LTLIBRARY) include $(BUILDRULES) -install install-dev: default +install install-pkg install-dev: default -include .ltdep diff --git a/logprint/Makefile b/logprint/Makefile index bbbed5d259af..5ec02539a7bb 100644 --- a/logprint/Makefile +++ b/logprint/Makefile @@ -21,7 +21,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/m4/Makefile b/m4/Makefile index 84174c3d3e30..eda4c06f6864 100644 --- a/m4/Makefile +++ b/m4/Makefile @@ -33,7 +33,7 @@ default: include $(BUILDRULES) -install install-dev install-lib: default +install install-pkg install-dev install-lib: default realclean: distclean rm -f $(CONFIGURE) diff --git a/man/Makefile b/man/Makefile index cd1aed6cf202..f62286e8339d 100644 --- a/man/Makefile +++ b/man/Makefile @@ -9,12 +9,14 @@ SUBDIRS = man2 man3 man5 man8 default : $(SUBDIRS) -install : $(addsuffix -install,$(SUBDIRS)) +install : install-pkg + +install-pkg : $(addsuffix -install-pkg,$(SUBDIRS)) install-dev : $(addsuffix -install-dev,$(SUBDIRS)) -%-install: - $(Q)$(MAKE) $(MAKEOPTS) -C $* install +%-install-pkg: + $(Q)$(MAKE) $(MAKEOPTS) -C $* install-pkg %-install-dev: $(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev diff --git a/man/man2/Makefile b/man/man2/Makefile index 8aecde3321b0..190ea18e7c6c 100644 --- a/man/man2/Makefile +++ b/man/man2/Makefile @@ -15,7 +15,9 @@ default : $(MAN_PAGES) include $(BUILDRULES) -install : +install : install-pkg + +install-pkg : install-dev : default $(INSTALL) -m 755 -d $(MAN_DEST) diff --git a/man/man3/Makefile b/man/man3/Makefile index a7f607fcbad9..1553e2b2de82 100644 --- a/man/man3/Makefile +++ b/man/man3/Makefile @@ -15,7 +15,9 @@ default : $(MAN_PAGES) include $(BUILDRULES) -install : +install : install-pkg + +install-pkg : install-dev : default $(INSTALL) -m 755 -d $(MAN_DEST) diff --git a/man/man5/Makefile b/man/man5/Makefile index fe0aef6f016b..1fcd3995036f 100644 --- a/man/man5/Makefile +++ b/man/man5/Makefile @@ -15,7 +15,10 @@ default : $(MAN_PAGES) include $(BUILDRULES) -install : default +install : install-pkg + +install-pkg : default $(INSTALL) -m 755 -d $(MAN_DEST) $(INSTALL_MAN) + install-dev : diff --git a/man/man8/Makefile b/man/man8/Makefile index 5be76ab727a1..0b40a409a913 100644 --- a/man/man8/Makefile +++ b/man/man8/Makefile @@ -22,7 +22,9 @@ default : $(MAN_PAGES) include $(BUILDRULES) -install : default +install : install-pkg + +install-pkg : default $(INSTALL) -m 755 -d $(MAN_DEST) $(INSTALL_MAN) diff --git a/mdrestore/Makefile b/mdrestore/Makefile index 4a932efb8098..0d02fb383404 100644 --- a/mdrestore/Makefile +++ b/mdrestore/Makefile @@ -16,7 +16,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/mkfs/Makefile b/mkfs/Makefile index a6173083e4c2..cf945aa10c25 100644 --- a/mkfs/Makefile +++ b/mkfs/Makefile @@ -27,7 +27,9 @@ default: depend $(LTCOMMAND) $(CFGFILES) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) $(INSTALL) -m 755 -d $(MKFS_CFG_DIR) diff --git a/po/Makefile b/po/Makefile index 1d35f5191ba2..3cc0b4177c64 100644 --- a/po/Makefile +++ b/po/Makefile @@ -19,7 +19,9 @@ default: $(POTHEAD) $(LINGUAS:%=%.mo) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL_LINGUAS) install-dev install-lib: diff --git a/quota/Makefile b/quota/Makefile index da5a1489e468..01584635b3dd 100644 --- a/quota/Makefile +++ b/quota/Makefile @@ -23,7 +23,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/repair/Makefile b/repair/Makefile index a36a95e353a5..096ae8c6a5b1 100644 --- a/repair/Makefile +++ b/repair/Makefile @@ -106,7 +106,9 @@ include $(BUILDRULES) # #CFLAGS += ... -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/rtcp/Makefile b/rtcp/Makefile index 264b4f27b5fd..4adb58c4b783 100644 --- a/rtcp/Makefile +++ b/rtcp/Makefile @@ -16,7 +16,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: diff --git a/scrub/Makefile b/scrub/Makefile index 885b43e9948d..653aafd171b5 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -138,7 +138,9 @@ phase5.o unicrash.o xfs.o: $(builddefs) include $(BUILDRULES) -install: $(INSTALL_SCRUB) +install: install-pkg + +install-pkg: $(INSTALL_SCRUB) %.service: %.service.in $(builddefs) @echo " [SED] $@" diff --git a/spaceman/Makefile b/spaceman/Makefile index e914b921de8b..49fbc9290c02 100644 --- a/spaceman/Makefile +++ b/spaceman/Makefile @@ -38,7 +38,9 @@ default: depend $(LTCOMMAND) include $(BUILDRULES) -install: default +install: install-pkg + +install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) $(INSTALL) -m 755 xfs_info.sh $(PKG_SBIN_DIR)/xfs_info From patchwork Tue Jul 30 03:22:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746485 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46A7D1854 for ; Tue, 30 Jul 2024 03:22:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722309772; cv=none; b=tjg4FOZ22xUT1d5KVeUuD/VqEnUdNVt/NSBg6WTVO5TLFgH6JZF5g5xI2hn+abZge/3rZDpLTJgpkhMk4cQGj/saNPZyuOXPUmayitsnM9nvfo/cXr7wpopBmzB73SimaajUmgGJHri3BZKczxTAUfrQ5vbdHTc6oa7S3Jd7YFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722309772; c=relaxed/simple; bh=2m/hE3Ml48X65EVuMVNhDQbet/3EvvvdAO4kJg8xkHA=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aunqxH5SKft6evPTlgBeJfWWzc1+fc9VoDsTULADQwUCsp7yGKdscrNKOOk0jRHi8FBQoAJ5G4lL/RU4PCpbNgO2tZ3YcJ8JXQjiAlqvRz9osMAyXnb8QzIQ636RfVEQrdMKPfHyf9Y4dBPgDV0QL+Hi5ea54aBi0bcqHnOe4jw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KgTlMw3G; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KgTlMw3G" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8167C32786; Tue, 30 Jul 2024 03:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722309771; bh=2m/hE3Ml48X65EVuMVNhDQbet/3EvvvdAO4kJg8xkHA=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=KgTlMw3GTdgSYij8wlhxrTQGDTaLedFAZ2YkCJjSNjkt883sYFxoVWPXZ38wOBNJs JBdhpYLJ2qcAidtqh3EiwfC4zoMWQSjDaoHIj/f5fWjKZGg/frmGvshPse2h+pSBpA TPIlMDVLnrBbXZFUKjB/vfyyHSx5SkBqo3gDoocxZciBy1xdlh0QrO0ZvrbGXA/1iw ZoZJLkdS43srt8Fh0BMWG+WKNMMUKic6CkaCI+HQ4+U2NmqW8WIW8JMLnqNdB5EGBh DRieoZyVocLDwOdYzqkDSNu9e3utW2nzFj+6Wb/15glu3QgMTau+YmUH9khlU6soLx 7+mnvgfM6CILw== Date: Mon, 29 Jul 2024 20:22:51 -0700 Subject: [PATCH 2/3] xfs_scrub: use the self_healing fsproperty to select mode From: "Darrick J. Wong" To: djwong@kernel.org, cem@kernel.org Cc: linux-xfs@vger.kernel.org Message-ID: <172230941373.1544199.13557360920806714540.stgit@frogsfrogsfrogs> In-Reply-To: <172230941338.1544199.12238614551925293396.stgit@frogsfrogsfrogs> References: <172230941338.1544199.12238614551925293396.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Now that we can set properties on xfs filesystems, make the xfs_scrub background service query the self_healing property to figure out which mode (dry run, optimize, repair, none) it should use. Signed-off-by: Darrick J. Wong --- scrub/Makefile | 3 +-- scrub/xfs_scrub@.service.in | 2 +- scrub/xfs_scrub_media@.service.in | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scrub/Makefile b/scrub/Makefile index 653aafd171b5..b0022cb7f005 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -17,7 +17,7 @@ INSTALL_SCRUB = install-scrub XFS_SCRUB_ALL_PROG = xfs_scrub_all XFS_SCRUB_FAIL_PROG = xfs_scrub_fail XFS_SCRUB_ARGS = -p -XFS_SCRUB_SERVICE_ARGS = -b +XFS_SCRUB_SERVICE_ARGS = -b -o fsprops_advise ifeq ($(HAVE_SYSTEMD),yes) INSTALL_SCRUB += install-systemd SYSTEMD_SERVICES=\ @@ -146,7 +146,6 @@ install-pkg: $(INSTALL_SCRUB) @echo " [SED] $@" $(Q)$(SED) -e "s|@sbindir@|$(PKG_SBIN_DIR)|g" \ -e "s|@scrub_service_args@|$(XFS_SCRUB_SERVICE_ARGS)|g" \ - -e "s|@scrub_args@|$(XFS_SCRUB_ARGS)|g" \ -e "s|@pkg_libexec_dir@|$(PKG_LIBEXEC_DIR)|g" \ -e "s|@pkg_state_dir@|$(PKG_STATE_DIR)|g" \ -e "s|@media_scan_interval@|$(XFS_SCRUB_ALL_AUTO_MEDIA_SCAN_INTERVAL)|g" \ diff --git a/scrub/xfs_scrub@.service.in b/scrub/xfs_scrub@.service.in index 5fa5f328200e..fb38319e95c1 100644 --- a/scrub/xfs_scrub@.service.in +++ b/scrub/xfs_scrub@.service.in @@ -22,7 +22,7 @@ RequiresMountsFor=%f [Service] Type=oneshot Environment=SERVICE_MODE=1 -ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ @scrub_args@ -M /tmp/scrub/ %f +ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ -M /tmp/scrub/ %f SyslogIdentifier=%N # Run scrub with minimal CPU and IO priority so that nothing else will starve. diff --git a/scrub/xfs_scrub_media@.service.in b/scrub/xfs_scrub_media@.service.in index e670748ced51..98cd1ac44fbe 100644 --- a/scrub/xfs_scrub_media@.service.in +++ b/scrub/xfs_scrub_media@.service.in @@ -22,7 +22,7 @@ RequiresMountsFor=%f [Service] Type=oneshot Environment=SERVICE_MODE=1 -ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ @scrub_args@ -M /tmp/scrub/ -x %f +ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ -M /tmp/scrub/ -x %f SyslogIdentifier=%N # Run scrub with minimal CPU and IO priority so that nothing else will starve. From patchwork Tue Jul 30 03:23:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 13746486 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91EE31854 for ; Tue, 30 Jul 2024 03:23:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722309787; cv=none; b=T/jtdBYVCAOor4+4m1I9FiXxM5qR66WCZka2GK8V7wv7PzpTcEEqoHqCWdIF90++HIqJNNGAK2XwCK4GfNmBmIR2KNtqw33EDN1sZzdzfecEgjVuXK6WakhcuGATz47BViFqS3D66jiVVfiXMJVMUXLsDYkwJu0N/V2VPr81mP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722309787; c=relaxed/simple; bh=6qujKIFqWHAQPMRuIpMlXQ5a1mkxMwlNjgpnpJwU3A0=; h=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eFk9x1rS1d+BmCDhBUkz4UrLsGA1iDblZDHlSAHobf1rr7300enNuIxqXuEXLGCOgAnm8Pqz0wUI2yg6MZnZtHTA8PotYqG0siVpsAM6Mm/nRy2r56fCpkvdmsLmQn8SUNoFpdRxXdWfVHdyrldlCN3LdckH7kwcv9I8S/fwPdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=L2U+5r4t; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="L2U+5r4t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64398C32786; Tue, 30 Jul 2024 03:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722309787; bh=6qujKIFqWHAQPMRuIpMlXQ5a1mkxMwlNjgpnpJwU3A0=; h=Date:Subject:From:To:Cc:In-Reply-To:References:From; b=L2U+5r4tyWnLVsmkvH0/A3IGLK+ZXbcVsO5raU4vHEtsHp+1RobGXJ6CxRyT/Ee9s qrKMWFtNw2sRg7+giP6BblVEMRLtTEr6FnSQXEAdLbLUE6jNxHMZpGxv6BDsPwST+S Uvr2DiVqlfQ8du5S+I0J5H3u0Tf7teDECyaIwyoE5sOX99NCruyUoOlp7Bau8WIkAj mxY7lPdC+3ghxmoE6/T6SqeG7VNcsMj2A3PI6jkiKSH3oB6T/Rp5vsUjWFF4T4Axwq wtjS311yPiZJ0f2BRHgSuA2/p6pYu6Ayu8RnuUKvOOOXZz0BV46wi8nPYYbv+HZ99M nUxJUGVJYZQCQ== Date: Mon, 29 Jul 2024 20:23:06 -0700 Subject: [PATCH 3/3] debian: create a new package for automatic self-healing From: "Darrick J. Wong" To: djwong@kernel.org, cem@kernel.org Cc: linux-xfs@vger.kernel.org Message-ID: <172230941388.1544199.4672195967361728491.stgit@frogsfrogsfrogs> In-Reply-To: <172230941338.1544199.12238614551925293396.stgit@frogsfrogsfrogs> References: <172230941338.1544199.12238614551925293396.stgit@frogsfrogsfrogs> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Darrick J. Wong Create a new package for people who explicilty want self-healing turned on by default for XFS. This package is named xfsprogs-self-healing. Note: This introduces a new "install-selfheal" target to install only the files needed for enabling online fsck by default. Other distributions should take note of the new target if they choose to create a package for enabling autonomous self healing. Signed-off-by: Darrick J. Wong --- Makefile | 8 +++++++- copy/Makefile | 2 ++ db/Makefile | 2 ++ debian/Makefile | 2 ++ debian/control | 8 ++++++++ debian/rules | 13 +++++++++---- doc/Makefile | 3 +++ estimate/Makefile | 2 ++ fsck/Makefile | 3 +++ fsr/Makefile | 2 ++ growfs/Makefile | 2 ++ include/Makefile | 3 +++ io/Makefile | 2 ++ libfrog/Makefile | 2 ++ libhandle/Makefile | 2 ++ libxcmd/Makefile | 2 ++ libxfs/Makefile | 3 +++ libxlog/Makefile | 2 ++ logprint/Makefile | 2 ++ m4/Makefile | 2 ++ man/Makefile | 2 ++ mdrestore/Makefile | 2 ++ mkfs/Makefile | 2 ++ po/Makefile | 3 +++ quota/Makefile | 2 ++ repair/Makefile | 2 ++ rtcp/Makefile | 2 ++ scrub/Makefile | 12 ++++++++++-- spaceman/Makefile | 2 ++ 29 files changed, 89 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 44b6c3501539..4bd792d191be 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ configure: configure.ac include/builddefs: configure ./configure $$LOCAL_CONFIGURE_OPTIONS -install: install-pkg +install: install-pkg install-selfheal install-pkg: $(addsuffix -install-pkg,$(SUBDIRS)) $(INSTALL) -m 755 -d $(PKG_DOC_DIR) @@ -124,6 +124,8 @@ install-pkg: $(addsuffix -install-pkg,$(SUBDIRS)) install-dev: $(addsuffix -install-dev,$(SUBDIRS)) +install-selfheal: $(addsuffix -install-selfheal,$(SUBDIRS)) + %-install-pkg: @echo "Installing $@" $(Q)$(MAKE) $(MAKEOPTS) -C $* install-pkg @@ -132,6 +134,10 @@ install-dev: $(addsuffix -install-dev,$(SUBDIRS)) @echo "Installing $@" $(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev +%-install-selfheal: + @echo "Installing $@" + $(Q)$(MAKE) $(MAKEOPTS) -C $* install-selfheal + distclean: clean $(Q)rm -f $(LDIRT) diff --git a/copy/Makefile b/copy/Makefile index 446d38bea576..3013dc2dca27 100644 --- a/copy/Makefile +++ b/copy/Makefile @@ -25,4 +25,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/db/Makefile b/db/Makefile index 91e259044beb..839c51f03593 100644 --- a/db/Makefile +++ b/db/Makefile @@ -91,4 +91,6 @@ install-pkg: default $(INSTALL) -m 755 xfs_metadump.sh $(PKG_SBIN_DIR)/xfs_metadump install-dev: +install-selfheal: + -include .dep diff --git a/debian/Makefile b/debian/Makefile index f6a996e91871..104d7c5d76d9 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -36,3 +36,5 @@ ifeq ($(PKG_DISTRIBUTION), debian) $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(INSTALL) -m 755 $(BOOT_MKFS_BIN) $(PKG_SBIN_DIR)/mkfs.xfs endif + +install-selfheal: default diff --git a/debian/control b/debian/control index 31773e53a19a..aa7a920a7964 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,14 @@ Description: Utilities for managing the XFS filesystem Refer to the documentation at https://xfs.wiki.kernel.org/ for complete details. +Package: xfsprogs-self-healing +Depends: ${shlibs:Depends}, ${misc:Depends}, xfsprogs, systemd, udev +Architecture: linux-any +Description: Automatic self healing for the XFS filesystem + A set of background services for the XFS filesystem to make it + find and fix corruptions automatically. These services are activated + automatically upon installation of this package. + Package: xfslibs-dev Section: libdevel Depends: libc6-dev | libc-dev, uuid-dev, xfsprogs (>= 3.0.0), ${misc:Depends} diff --git a/debian/rules b/debian/rules index e4eb2499e768..c49aefd10e64 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,7 @@ endif package = xfsprogs develop = xfslibs-dev bootpkg = xfsprogs-udeb +healpkg = xfsprogs-self-healing DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) @@ -26,9 +27,11 @@ udebpkg = $(bootpkg)_$(version)_$(target).udeb dirme = debian/$(package) dirdev = debian/$(develop) dirdi = debian/$(bootpkg) -pkgme = DIST_ROOT=`pwd`/$(dirme); export DIST_ROOT; -pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT; -pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT; +dirheal= debian/$(healpkg) +pkgme = DIST_ROOT=`pwd`/$(dirme); export DIST_ROOT; +pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT; +pkgdi = DIST_ROOT=`pwd`/$(dirdi); export DIST_ROOT; +pkgheal= DIST_ROOT=`pwd`/$(dirheal); export DIST_ROOT; stdenv = @GZIP=-q; export GZIP; configure_options = \ @@ -103,6 +106,7 @@ binary-arch: checkroot built $(pkgme) $(MAKE) -C . install-pkg $(pkgdev) $(MAKE) -C . install-dev $(pkgdi) $(MAKE) -C debian install-d-i + $(pkgheal) $(MAKE) -C . install-selfheal $(pkgme) $(MAKE) dist install -D -m 0755 debian/local/initramfs.hook debian/xfsprogs/usr/share/initramfs-tools/hooks/xfs rmdir debian/xfslibs-dev/usr/share/doc/xfsprogs @@ -114,7 +118,8 @@ binary-arch: checkroot built dh_compress dh_fixperms dh_makeshlibs - dh_installsystemd -p xfsprogs --no-enable --no-start --no-restart-after-upgrade --no-stop-on-upgrade + dh_installsystemd -p xfsprogs --no-restart-after-upgrade --no-stop-on-upgrade system-xfs_scrub.slice + dh_installsystemd -p xfsprogs-self-healing --no-restart-after-upgrade --no-stop-on-upgrade xfs_scrub_all.timer dh_installdeb dh_shlibdeps dh_gencontrol diff --git a/doc/Makefile b/doc/Makefile index ad6749b8d0be..a6ec65f5edc0 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -26,3 +26,6 @@ ifeq ($(PKG_DISTRIBUTION), debian) endif install-dev: + +install-selfheal: + diff --git a/estimate/Makefile b/estimate/Makefile index d5f8a6d81d65..4fce3463d55c 100644 --- a/estimate/Makefile +++ b/estimate/Makefile @@ -19,4 +19,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/fsck/Makefile b/fsck/Makefile index ccba7f0b6892..33fca9e18fb0 100644 --- a/fsck/Makefile +++ b/fsck/Makefile @@ -17,3 +17,6 @@ install-pkg: default $(INSTALL) -m 755 -d $(PKG_SBIN_DIR) $(INSTALL) -m 755 xfs_fsck.sh $(PKG_SBIN_DIR)/fsck.xfs install-dev: + +install-selfheal: + diff --git a/fsr/Makefile b/fsr/Makefile index 3ad9f6d824c6..da32bc531970 100644 --- a/fsr/Makefile +++ b/fsr/Makefile @@ -22,4 +22,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/growfs/Makefile b/growfs/Makefile index e0ab870bd6ba..61d184328cf6 100644 --- a/growfs/Makefile +++ b/growfs/Makefile @@ -30,4 +30,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/include/Makefile b/include/Makefile index 23727fccfdcd..c18ab35a9861 100644 --- a/include/Makefile +++ b/include/Makefile @@ -64,3 +64,6 @@ install-pkg: default install-dev: install $(INSTALL) -m 644 $(HFILES) $(PKG_INC_DIR) + +install-selfheal: + diff --git a/io/Makefile b/io/Makefile index d035420b555c..70c95a5c1425 100644 --- a/io/Makefile +++ b/io/Makefile @@ -95,4 +95,6 @@ install-pkg: default $(LTINSTALL) -m 755 xfs_mkfile.sh $(PKG_SBIN_DIR)/xfs_mkfile install-dev: +install-selfheal: + -include .dep diff --git a/libfrog/Makefile b/libfrog/Makefile index 5ebe36fb58c8..262a4a0f8cda 100644 --- a/libfrog/Makefile +++ b/libfrog/Makefile @@ -81,4 +81,6 @@ include $(BUILDRULES) install install-pkg install-dev: default +install-selfheal: + -include .ltdep diff --git a/libhandle/Makefile b/libhandle/Makefile index 7cfd0fa4f27e..28c104a77f95 100644 --- a/libhandle/Makefile +++ b/libhandle/Makefile @@ -27,4 +27,6 @@ install-pkg: default install-dev: default $(INSTALL_LTLIB_DEV) +install-selfheal: + -include .ltdep diff --git a/libxcmd/Makefile b/libxcmd/Makefile index afd5349c8af3..118ecd3cfc88 100644 --- a/libxcmd/Makefile +++ b/libxcmd/Makefile @@ -25,4 +25,6 @@ include $(BUILDRULES) install install-pkg install-dev: default +install-selfheal: + -include .ltdep diff --git a/libxfs/Makefile b/libxfs/Makefile index 2c6b45953661..65d4c7619758 100644 --- a/libxfs/Makefile +++ b/libxfs/Makefile @@ -162,3 +162,6 @@ install-dev: install ifndef NODEP -include .ltdep endif + +install-selfheal: + diff --git a/libxlog/Makefile b/libxlog/Makefile index 3710729fe703..37281eb058f2 100644 --- a/libxlog/Makefile +++ b/libxlog/Makefile @@ -23,4 +23,6 @@ include $(BUILDRULES) install install-pkg install-dev: default +install-selfheal: + -include .ltdep diff --git a/logprint/Makefile b/logprint/Makefile index 5ec02539a7bb..f1fccbdc8ca7 100644 --- a/logprint/Makefile +++ b/logprint/Makefile @@ -28,4 +28,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/m4/Makefile b/m4/Makefile index eda4c06f6864..b894dd3b0222 100644 --- a/m4/Makefile +++ b/m4/Makefile @@ -35,5 +35,7 @@ include $(BUILDRULES) install install-pkg install-dev install-lib: default +install-selfheal: + realclean: distclean rm -f $(CONFIGURE) diff --git a/man/Makefile b/man/Makefile index f62286e8339d..258e8732a923 100644 --- a/man/Makefile +++ b/man/Makefile @@ -21,4 +21,6 @@ install-dev : $(addsuffix -install-dev,$(SUBDIRS)) %-install-dev: $(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev +install-selfheal: + include $(BUILDRULES) diff --git a/mdrestore/Makefile b/mdrestore/Makefile index 0d02fb383404..c75d5875929b 100644 --- a/mdrestore/Makefile +++ b/mdrestore/Makefile @@ -23,4 +23,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/mkfs/Makefile b/mkfs/Makefile index cf945aa10c25..515c2db0639d 100644 --- a/mkfs/Makefile +++ b/mkfs/Makefile @@ -37,4 +37,6 @@ install-pkg: default install-dev: +install-selfheal: + -include .dep diff --git a/po/Makefile b/po/Makefile index 3cc0b4177c64..cb6ef954b695 100644 --- a/po/Makefile +++ b/po/Makefile @@ -25,3 +25,6 @@ install-pkg: default $(INSTALL_LINGUAS) install-dev install-lib: + +install-selfheal: + diff --git a/quota/Makefile b/quota/Makefile index 01584635b3dd..e1193bd203ad 100644 --- a/quota/Makefile +++ b/quota/Makefile @@ -30,4 +30,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/repair/Makefile b/repair/Makefile index 096ae8c6a5b1..e7979a817d4f 100644 --- a/repair/Makefile +++ b/repair/Makefile @@ -113,4 +113,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/rtcp/Makefile b/rtcp/Makefile index 4adb58c4b783..ac638bcd1029 100644 --- a/rtcp/Makefile +++ b/rtcp/Makefile @@ -23,4 +23,6 @@ install-pkg: default $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR) install-dev: +install-selfheal: + -include .dep diff --git a/scrub/Makefile b/scrub/Makefile index b0022cb7f005..2c349c682d3a 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -20,6 +20,7 @@ XFS_SCRUB_ARGS = -p XFS_SCRUB_SERVICE_ARGS = -b -o fsprops_advise ifeq ($(HAVE_SYSTEMD),yes) INSTALL_SCRUB += install-systemd +INSTALL_SELFHEAL += install-systemd-selfheal SYSTEMD_SERVICES=\ $(scrub_svcname) \ xfs_scrub_fail@.service \ @@ -27,9 +28,10 @@ SYSTEMD_SERVICES=\ xfs_scrub_media_fail@.service \ xfs_scrub_all.service \ xfs_scrub_all_fail.service \ - xfs_scrub_all.timer \ system-xfs_scrub.slice -OPTIONAL_TARGETS += $(SYSTEMD_SERVICES) +SYSTEMD_SERVICES_SELFHEAL=\ + xfs_scrub_all.timer +OPTIONAL_TARGETS += $(SYSTEMD_SERVICES) $(SYSTEMD_SERVICES_SELFHEAL) endif ifeq ($(HAVE_CROND),yes) INSTALL_SCRUB += install-crond @@ -163,6 +165,10 @@ install-systemd: default $(SYSTEMD_SERVICES) $(INSTALL) -m 755 -d $(PKG_LIBEXEC_DIR) $(INSTALL) -m 755 $(XFS_SCRUB_FAIL_PROG) $(PKG_LIBEXEC_DIR) +install-systemd-selfheal: default $(SYSTEMD_SERVICES_SELFHEAL) + $(INSTALL) -m 755 -d $(SYSTEMD_SYSTEM_UNIT_DIR) + $(INSTALL) -m 644 $(SYSTEMD_SERVICES_SELFHEAL) $(SYSTEMD_SYSTEM_UNIT_DIR) + install-crond: default $(CRONTABS) $(INSTALL) -m 755 -d $(CROND_DIR) $(INSTALL) -m 644 $(CRONTABS) $(CROND_DIR) @@ -181,4 +187,6 @@ install-udev: $(UDEV_RULES) install-dev: +install-selfheal: $(INSTALL_SELFHEAL) + -include .dep diff --git a/spaceman/Makefile b/spaceman/Makefile index 49fbc9290c02..ce1650f99b7c 100644 --- a/spaceman/Makefile +++ b/spaceman/Makefile @@ -47,4 +47,6 @@ install-pkg: default $(INSTALL) -m 755 xfs_property $(PKG_SBIN_DIR)/xfs_property install-dev: +install-selfheal: + -include .dep