linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs
@ 2016-05-13  3:44 Zhao Lei
  2016-05-13  3:44 ` [PATCH v2 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zhao Lei @ 2016-05-13  3:44 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Zhao Lei

Changelog v1->v2:
1: btrfs-progs: autogen: Make build success in CentOS 6 and 7
   Add AC_SUBST(UDEVDIR), suggested by: Jeff Mahoney <jeffm@suse.com>

Zhao Lei (3):
  btrfs-progs: autogen: Avoid chdir fail on dirname with blank
  btrfs-progs: autogen: Make build success in CentOS 6 and 7
  btrfs-progs: autogen: Don't show success message on fail

 autogen.sh   | 9 +++++----
 configure.ac | 3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

-- 
1.8.5.1




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank
  2016-05-13  3:44 [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs Zhao Lei
@ 2016-05-13  3:44 ` Zhao Lei
  2016-05-13  3:44 ` [PATCH v2 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Zhao Lei @ 2016-05-13  3:44 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Zhao Lei

If source put in dir with blanks, as:
  /var/lib/jenkins/workspace/btrfs progs

autogen will failed:
./autogen.sh: line 95: cd: /var/lib/jenkins/workspace/btrfs: No such file or directory

Can be fixed by adding quotes into cd command.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 autogen.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/autogen.sh b/autogen.sh
index 9669850..8b9a9cb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -92,7 +92,7 @@ find_autofile config.guess
 find_autofile config.sub
 find_autofile install-sh
 
-cd $THEDIR
+cd "$THEDIR"
 
 echo
 echo "Now type '$srcdir/configure' and 'make' to compile."
-- 
1.8.5.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7
  2016-05-13  3:44 [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs Zhao Lei
  2016-05-13  3:44 ` [PATCH v2 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
@ 2016-05-13  3:44 ` Zhao Lei
  2016-05-13  3:44 ` [PATCH v2 3/3] btrfs-progs: autogen: Don't show success message on fail Zhao Lei
  2016-05-16 13:48 ` [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs David Sterba
  3 siblings, 0 replies; 5+ messages in thread
From: Zhao Lei @ 2016-05-13  3:44 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Zhao Lei

btrfs-progs build failed in CentOS 6 and 7:
 #./autogen.sh
 ...
 configure.ac:131: error: possibly undefined macro: PKG_CHECK_VAR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
 ...

Seems PKG_CHECK_VAR is new in pkgconfig 0.28 (24-Jan-2013):
http://redmine.audacious-media-player.org/boards/1/topics/736

And the max available version for CentOS 7 in yum-repo and
rpmfind.net is: pkgconfig-0.27.1-4.el7
http://rpmfind.net/linux/rpm2html/search.php?query=pkgconfig&submit=Search+...&system=centos&arch=

I updated my pkgconfig to 0.30, but still failed at above error.
(Maybe it is my setting problem)

To make user in centos 6 and 7 building btrfs-progs without
more changes, we can avoid using PKG_CHECK_VAR in following
way found in:
https://github.com/audacious-media-player/audacious-plugins/commit/f95ab6f939ecf0d9232b3165f9241d2ea9676b9e

Changelog v1->v2:
1: Add AC_SUBST(UDEVDIR)
   Suggested by: Jeff Mahoney <jeffm@suse.com>

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4688bc7..c79472c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,8 @@ PKG_STATIC(UUID_LIBS_STATIC, [uuid])
 PKG_CHECK_MODULES(ZLIB, [zlib])
 PKG_STATIC(ZLIB_LIBS_STATIC, [zlib])
 
-PKG_CHECK_VAR([UDEVDIR], [udev], [udevdir])
+UDEVDIR="$(pkg-config udev --variable=udevdir)"
+AC_SUBST(UDEVDIR)
 
 dnl lzo library does not provide pkg-config, let use classic way
 AC_CHECK_LIB([lzo2], [lzo_version], [
-- 
1.8.5.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] btrfs-progs: autogen: Don't show success message on fail
  2016-05-13  3:44 [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs Zhao Lei
  2016-05-13  3:44 ` [PATCH v2 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
  2016-05-13  3:44 ` [PATCH v2 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
@ 2016-05-13  3:44 ` Zhao Lei
  2016-05-16 13:48 ` [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs David Sterba
  3 siblings, 0 replies; 5+ messages in thread
From: Zhao Lei @ 2016-05-13  3:44 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Zhao Lei

When autogen.sh failed, the success message is still in output:
 # ./autogen.sh
 ...
 configure.ac:131: error: possibly undefined macro: PKG_CHECK_VAR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

 Now type './configure' and 'make' to compile.
 #

Fixed by check return value of autoconf.

After patch:
 # ./autogen.sh
 ...
 configure.ac:132: error: possibly undefined macro: PKG_CHECK_VAR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
 #

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 autogen.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 8b9a9cb..a5f9af2 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -64,9 +64,10 @@ echo "   automake:   $(automake --version | head -1)"
 chmod +x version.sh
 rm -rf autom4te.cache
 
-aclocal $AL_OPTS
-autoconf $AC_OPTS
-autoheader $AH_OPTS
+aclocal $AL_OPTS &&
+autoconf $AC_OPTS &&
+autoheader $AH_OPTS ||
+exit 1
 
 # it's better to use helper files from automake installation than
 # maintain copies in git tree
-- 
1.8.5.1




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs
  2016-05-13  3:44 [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs Zhao Lei
                   ` (2 preceding siblings ...)
  2016-05-13  3:44 ` [PATCH v2 3/3] btrfs-progs: autogen: Don't show success message on fail Zhao Lei
@ 2016-05-16 13:48 ` David Sterba
  3 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2016-05-16 13:48 UTC (permalink / raw)
  To: Zhao Lei; +Cc: linux-btrfs

On Fri, May 13, 2016 at 11:44:50AM +0800, Zhao Lei wrote:
> Changelog v1->v2:
> 1: btrfs-progs: autogen: Make build success in CentOS 6 and 7
>    Add AC_SUBST(UDEVDIR), suggested by: Jeff Mahoney <jeffm@suse.com>
> 
> Zhao Lei (3):
>   btrfs-progs: autogen: Avoid chdir fail on dirname with blank
>   btrfs-progs: autogen: Make build success in CentOS 6 and 7
>   btrfs-progs: autogen: Don't show success message on fail

Applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-16 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-13  3:44 [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs Zhao Lei
2016-05-13  3:44 ` [PATCH v2 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
2016-05-13  3:44 ` [PATCH v2 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
2016-05-13  3:44 ` [PATCH v2 3/3] btrfs-progs: autogen: Don't show success message on fail Zhao Lei
2016-05-16 13:48 ` [PATCH v2 0/3] btrfs-progs: autogen: Some compatibility fixs David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).