Skip to contentSkip to conversation

rsnapshot: fix rsnapshot.conf.default

PATCH New [email protected] 1 participant 2 messages Oct 17, 2014

lore
Share & tools
lore
#0 lore raw

cover rsnapshot: fix rsnapshot.conf.default

From: Wenzong Fan <[email protected]>

This change is used for fixing cmd path in rsnapshot.conf.default.

The options --without-* disable checking command * on host and get the default path used, otherwise the host path will be injected into target configs.

The runtime dependencies to ssh, logger, cp, du are optional and could be customized in rsnapshot.conf, so it's not needed that using PACKAGECONFIG to define the runtime dependencies.

The following changes since commit fa04f43dee6994bb63374995a6444e72d65bc658:

libgphoto2: add bash to RDEPENDS (2014-10-16 07:01:01 +0200)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib wenzong/fix-rsnapshot
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/fix-rsnapshot

Wenzong Fan (1):
rsnapshot: fix rsnapshot.conf.default

 .../rsnapshot/configure-fix-cmd_rsync.patch        |   44 ++++++++++++++++++++
 meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb |   12 +++++-
 2 files changed, 54 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/rsnapshot/rsnapshot/configure-fix-cmd_rsync.patch
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 rsnapshot: fix rsnapshot.conf.default

From: Wenzong Fan <[email protected]>

This change is used for fixing cmd path in rsnapshot.conf.default.

The options --without-* disable checking command * on host and get the default path used, otherwise the host path will be injected into target configs.

The runtime dependencies to ssh, logger, cp, du are optional and could be customized in rsnapshot.conf, so it's not needed that using PACKAGECONFIG to define the runtime dependencies.

---
 .../rsnapshot/configure-fix-cmd_rsync.patch        |   44 ++++++++++++++++++++
 meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb |   12 +++++-
 2 files changed, 54 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-support/rsnapshot/rsnapshot/configure-fix-cmd_rsync.patch
meta-oe/recipes-support/rsnapshot/rsnapshot/configure-fix-cmd_rsync.patch new file +44 -0
new file mode 100644
index 0000000..7b2361b
@@ -0,0 +1,44 @@
+From 26ad431e19788898fb4ed19ff91392e8b20f1bab Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <[email protected]>
+Date: Thu, 16 Oct 2014 04:06:55 -0400
+Subject: [PATCH] fix cmd_rsync
+
+Don't break configure if rsync is not installed on host.
+
+rsync is a runtime dependency and this change is only used for
+generating rsnapshot.conf.default. It allows cmd_rsync to use
+default path if options --without-rsync is specfied.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <[email protected]>
+---
+ configure.ac |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index bc9df9e..2a33d29 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,7 +55,7 @@ AC_ARG_WITH(rsync,
+ 				AC_MSG_ERROR(rsync not found)
+ 			fi
+ 		else
+-			AC_MSG_ERROR(rsync is required)
++			RSYNC=no
+ 		fi
+ 	]
+ )
+@@ -67,7 +67,8 @@ if test "$RSYNC" = ""; then
+ fi
+ dnl bail out if we can't find it
+ if test "$RSYNC" = "no"; then
+-	AC_MSG_ERROR(rsync is required)
++	RSYNC=/usr/bin/rsync
++	AC_SUBST(CMD_RSYNC, "cmd_rsync  $RSYNC")
+ fi
+ 
+ 
+-- 
+1.7.9.5
+
meta-oe/recipes-support/rsnapshot/rsnapshot_git.bb +10 -2
index afd3678..3f919b5 100644
@@ -24,11 +24,19 @@ SRCREV = "1047cbb57937c29233388e2fcd847fecd3babe74"
 PV = "1.3.1+git${SRCPV}"
 
 SRC_URI = "git://github.com/DrHyde/${BPN};branch=master;protocol=git \
+           file://configure-fix-cmd_rsync.patch \
           "
 
 S = "${WORKDIR}/git"
 
 inherit autotools
 
-PACKAGECONFIG ??= "logger"
-PACKAGECONFIG[logger] = "--with-logger=${bindir}/logger,--without-logger,,util-linux"
+# Fix rsnapshot.conf.default:
+# don't inject the host path into target configs.
+EXTRA_OECONF += "--without-cp \
+                 --without-rm \
+                 --without-du \
+                 --without-ssh \
+                 --without-logger \
+                 --without-rsync \
+                "
Signature · 1 line
1.7.9.5