From 3b54f5030e07f5ae8898ee190da7390ad1ceb33c Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 10:33:39 -0700 Subject: [PATCH 1/3] Use VERIFY() for asprintf due to rpm -D_FORTIFY_SOURCE=2 This check is part of ztest and a memory failure here is unlikely. However, if this does occur simply exiting is an perfectly valid way to handle the issue and it resulves the compiler warning. ztest.c:5522: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result --- cmd/ztest/ztest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index a57824155f..6a24795c43 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -5422,7 +5422,8 @@ main(int argc, char **argv) process_options(argc, argv); /* Override location of zpool.cache */ - (void) asprintf((char **)&spa_config_path, "%s/zpool.cache", zopt_dir); + VERIFY(asprintf((char **)&spa_config_path, "%s/zpool.cache", + zopt_dir) != -1); /* * Blow away any existing copy of zpool.cache From 8db31e251d0b3d88263d540625bda88b2ccd1ce0 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 10:33:19 -0700 Subject: [PATCH 2/3] Update zfs.spec.in to reference updated README.markdown file The spec file references the README by the previous name which has changed to make it github friendly. This results in an rpm build failure. --- Makefile.am | 2 +- zfs.spec.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8934074b03..642254d32e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh config/config.awk EXTRA_DIST += zfs.spec.in zfs-modules.spec.in -EXTRA_DIST += META DISCLAIMER COPYRIGHT GIT +EXTRA_DIST += META DISCLAIMER COPYRIGHT GIT README.markdown EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE noinst_HEADERS = zfs_config.h diff --git a/zfs.spec.in b/zfs.spec.in index 9610c536a5..17e0131ad8 100644 --- a/zfs.spec.in +++ b/zfs.spec.in @@ -60,7 +60,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %doc AUTHORS ChangeLog COPYING COPYRIGHT DISCLAIMER -%doc GIT OPENSOLARIS.LICENSE README ZFS.RELEASE +%doc GIT OPENSOLARIS.LICENSE README.markdown ZFS.RELEASE %{_sbindir}/* %{_bindir}/* %{_libdir}/* From bb4baf09121d1731e4575194cee64d34e15c8369 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 1 Jul 2010 10:34:08 -0700 Subject: [PATCH 3/3] Add missing headers to 'make dist' target for RPM build The following files were being left out the tarball which is used by the 'make rpm' target. This results in a build failure when building packages which use the tarball. lib/libspl/include/sys/tsol/*.h lib/libspl/include/util/*.h --- lib/libspl/include/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libspl/include/Makefile.am b/lib/libspl/include/Makefile.am index ced8e9c09a..0802bf1c05 100644 --- a/lib/libspl/include/Makefile.am +++ b/lib/libspl/include/Makefile.am @@ -4,4 +4,6 @@ nobase_pkginclude_HEADERS += rpc/*.h nobase_pkginclude_HEADERS += sys/*.h nobase_pkginclude_HEADERS += sys/dktp/*.h nobase_pkginclude_HEADERS += sys/sysevent/*.h +nobase_pkginclude_HEADERS += sys/tsol/*.h nobase_pkginclude_HEADERS += tsol/*.h +nobase_pkginclude_HEADERS += util/*.h