All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank
@ 2016-05-12 10:42 Zhao Lei
  2016-05-12 10:42 ` [PATCH 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
  2016-05-12 10:42 ` [PATCH 3/3] btrfs-progs: autogen: Don't show success message on fail Zhao Lei
  0 siblings, 2 replies; 4+ messages in thread
From: Zhao Lei @ 2016-05-12 10:42 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] 4+ messages in thread

* [PATCH 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7
  2016-05-12 10:42 [PATCH 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
@ 2016-05-12 10:42 ` Zhao Lei
  2016-05-12 14:45   ` Jeff Mahoney
  2016-05-12 10:42 ` [PATCH 3/3] btrfs-progs: autogen: Don't show success message on fail Zhao Lei
  1 sibling, 1 reply; 4+ messages in thread
From: Zhao Lei @ 2016-05-12 10:42 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

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

diff --git a/configure.ac b/configure.ac
index 4688bc7..a754990 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,7 @@ 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)"
 
 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] 4+ messages in thread

* [PATCH 3/3] btrfs-progs: autogen: Don't show success message on fail
  2016-05-12 10:42 [PATCH 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
  2016-05-12 10:42 ` [PATCH 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
@ 2016-05-12 10:42 ` Zhao Lei
  1 sibling, 0 replies; 4+ messages in thread
From: Zhao Lei @ 2016-05-12 10:42 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] 4+ messages in thread

* Re: [PATCH 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7
  2016-05-12 10:42 ` [PATCH 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
@ 2016-05-12 14:45   ` Jeff Mahoney
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Mahoney @ 2016-05-12 14:45 UTC (permalink / raw)
  To: Zhao Lei, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 1618 bytes --]

On 5/12/16 6:42 AM, Zhao Lei wrote:
> 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
> 
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4688bc7..a754990 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -128,7 +128,7 @@ 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)"

You need, minimally, AC_SUBST(UDEVDIR) here as well.

-Jeff

-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

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

end of thread, other threads:[~2016-05-12 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12 10:42 [PATCH 1/3] btrfs-progs: autogen: Avoid chdir fail on dirname with blank Zhao Lei
2016-05-12 10:42 ` [PATCH 2/3] btrfs-progs: autogen: Make build success in CentOS 6 and 7 Zhao Lei
2016-05-12 14:45   ` Jeff Mahoney
2016-05-12 10:42 ` [PATCH 3/3] btrfs-progs: autogen: Don't show success message on fail Zhao Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.