@@ -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)
@@ -25,4 +25,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -91,4 +91,6 @@ install-pkg: default
$(INSTALL) -m 755 xfs_metadump.sh $(PKG_SBIN_DIR)/xfs_metadump
install-dev:
+install-selfheal:
+
-include .dep
@@ -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
@@ -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}
@@ -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
@@ -26,3 +26,6 @@ ifeq ($(PKG_DISTRIBUTION), debian)
endif
install-dev:
+
+install-selfheal:
+
@@ -19,4 +19,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -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:
+
@@ -22,4 +22,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -30,4 +30,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -64,3 +64,6 @@ install-pkg: default
install-dev: install
$(INSTALL) -m 644 $(HFILES) $(PKG_INC_DIR)
+
+install-selfheal:
+
@@ -95,4 +95,6 @@ install-pkg: default
$(LTINSTALL) -m 755 xfs_mkfile.sh $(PKG_SBIN_DIR)/xfs_mkfile
install-dev:
+install-selfheal:
+
-include .dep
@@ -72,4 +72,6 @@ include $(BUILDRULES)
install install-pkg install-dev: default
+install-selfheal:
+
-include .ltdep
@@ -27,4 +27,6 @@ install-pkg: default
install-dev: default
$(INSTALL_LTLIB_DEV)
+install-selfheal:
+
-include .ltdep
@@ -25,4 +25,6 @@ include $(BUILDRULES)
install install-pkg install-dev: default
+install-selfheal:
+
-include .ltdep
@@ -158,3 +158,6 @@ install-dev: install
ifndef NODEP
-include .ltdep
endif
+
+install-selfheal:
+
@@ -23,4 +23,6 @@ include $(BUILDRULES)
install install-pkg install-dev: default
+install-selfheal:
+
-include .ltdep
@@ -28,4 +28,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -35,5 +35,7 @@ include $(BUILDRULES)
install install-pkg install-dev install-lib: default
+install-selfheal:
+
realclean: distclean
rm -f $(CONFIGURE)
@@ -21,4 +21,6 @@ install-dev : $(addsuffix -install-dev,$(SUBDIRS))
%-install-dev:
$(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev
+install-selfheal:
+
include $(BUILDRULES)
@@ -23,4 +23,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -37,4 +37,6 @@ install-pkg: default
install-dev:
+install-selfheal:
+
-include .dep
@@ -25,3 +25,6 @@ install-pkg: default
$(INSTALL_LINGUAS)
install-dev install-lib:
+
+install-selfheal:
+
@@ -30,4 +30,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -109,4 +109,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -23,4 +23,6 @@ install-pkg: default
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
+install-selfheal:
+
-include .dep
@@ -20,6 +20,7 @@ XFS_SCRUB_ARGS = -p
XFS_SCRUB_SERVICE_ARGS = -b
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
@@ -164,6 +166,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)
@@ -182,4 +188,6 @@ install-udev: $(UDEV_RULES)
install-dev:
+install-selfheal: $(INSTALL_SELFHEAL)
+
-include .dep
@@ -34,4 +34,6 @@ install-pkg: default
$(INSTALL) -m 755 xfs_info.sh $(PKG_SBIN_DIR)/xfs_info
install-dev:
+install-selfheal:
+
-include .dep