From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Thu, 30 May 2013 18:50:20 +0100 Subject: [Cluster-devel] [PATCH 2/2] gfs2-utils: Retire gfs_controld In-Reply-To: <1369936220-13490-1-git-send-email-anprice@redhat.com> References: <1369936220-13490-1-git-send-email-anprice@redhat.com> Message-ID: <1369936220-13490-2-git-send-email-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Since linux v3.3 gfs_controld has not been required and it has been disabled by default in gfs2-utils for some time. This patch removes the group/ directory containing gfs_control* and related files and removes them from the build system and .gitignore accordingly. tunegfs2 also #includes linux_endian.h which was in group/include/ so it has been moved into gfs2/include/ for the time being. It also fixes some other build system issues causing 'make distcheck' to fail. Signed-off-by: Andrew Price --- .gitignore | 2 - Makefile.am | 18 +- configure.ac | 58 - gfs2/include/Makefile.am | 2 +- gfs2/include/linux_endian.h | 68 + gfs2/init.d/gfs2-cluster | 94 - gfs2/system/gfs2-cluster.service | 12 - group/Makefile.am | 3 - group/gfs_control/Makefile.am | 9 - group/gfs_control/main.c | 465 ----- group/gfs_control/target.mk | 3 - group/gfs_controld/Makefile.am | 24 - group/gfs_controld/config.c | 157 -- group/gfs_controld/config.h | 14 - group/gfs_controld/cpg-new.c | 3600 ----------------------------------- group/gfs_controld/crc.c | 72 - group/gfs_controld/gfs_controld.h | 37 - group/gfs_controld/gfs_daemon.h | 241 --- group/gfs_controld/logging.c | 65 - group/gfs_controld/main.c | 1496 --------------- group/gfs_controld/member_cman.c | 207 -- group/gfs_controld/target.mk | 3 - group/gfs_controld/util.c | 266 --- group/include/Makefile.am | 3 - group/include/linux_endian.h | 68 - group/include/list.h | 336 ---- group/libgfscontrol/Makefile.am | 9 - group/libgfscontrol/libgfscontrol.h | 122 -- group/libgfscontrol/main.c | 436 ----- group/libgfscontrol/target.mk | 3 - group/man/Makefile.am | 3 - group/man/gfs_controld.8 | 122 -- group/man/target.mk | 3 - tests/Makefile.am | 1 + 34 files changed, 72 insertions(+), 7950 deletions(-) create mode 100644 gfs2/include/linux_endian.h delete mode 100644 gfs2/init.d/gfs2-cluster delete mode 100644 gfs2/system/gfs2-cluster.service delete mode 100644 group/Makefile.am delete mode 100644 group/gfs_control/Makefile.am delete mode 100644 group/gfs_control/main.c delete mode 100644 group/gfs_control/target.mk delete mode 100644 group/gfs_controld/Makefile.am delete mode 100644 group/gfs_controld/config.c delete mode 100644 group/gfs_controld/config.h delete mode 100644 group/gfs_controld/cpg-new.c delete mode 100644 group/gfs_controld/crc.c delete mode 100644 group/gfs_controld/gfs_controld.h delete mode 100644 group/gfs_controld/gfs_daemon.h delete mode 100644 group/gfs_controld/logging.c delete mode 100644 group/gfs_controld/main.c delete mode 100644 group/gfs_controld/member_cman.c delete mode 100644 group/gfs_controld/target.mk delete mode 100644 group/gfs_controld/util.c delete mode 100644 group/include/Makefile.am delete mode 100644 group/include/linux_endian.h delete mode 100644 group/include/list.h delete mode 100644 group/libgfscontrol/Makefile.am delete mode 100644 group/libgfscontrol/libgfscontrol.h delete mode 100644 group/libgfscontrol/main.c delete mode 100644 group/libgfscontrol/target.mk delete mode 100644 group/man/Makefile.am delete mode 100644 group/man/gfs_controld.8 delete mode 100644 group/man/target.mk diff --git a/.gitignore b/.gitignore index f8f8a82..3fa77a0 100644 --- a/.gitignore +++ b/.gitignore @@ -44,8 +44,6 @@ gfs2/tune/tunegfs2 tests/check_libgfs2 tests/testvol tests/tests.log -group/gfs_control/gfs_control -group/gfs_controld/gfs_controld ABOUT-NLS po/Makevars.template po/POTFILES diff --git a/Makefile.am b/Makefile.am index 1eea44c..963c060 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = autogen.sh +EXTRA_DIST = autogen.sh README.build AUTOMAKE_OPTIONS = foreign @@ -12,21 +12,7 @@ noinst_HEADERS = make/copyright.cf ACLOCAL_AMFLAGS = -I m4 -if BUILD_GFS_CONTROLD -DIR_GROUP = group -endif - -SUBDIRS = po $(DIR_GROUP) gfs2 doc tests - -install-exec-local: - $(INSTALL) -d $(DESTDIR)/$(LOGDIR) - $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARRUN) - $(INSTALL) -d $(DESTDIR)/$(CLUSTERVARLIB) - -uninstall-local: - rmdir $(DESTDIR)/$(LOGDIR) || :; - rmdir $(DESTDIR)/$(CLUSTERVARRUN) || :; - rmdir $(DESTDIR)/$(CLUSTERVARLIB) || :; +SUBDIRS = po gfs2 doc tests maintainer-clean-local: rm -rf m4 diff --git a/configure.ac b/configure.ac index c8e52a3..51c42b1 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,6 @@ LT_PREREQ([2.2.6]) LT_INIT AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_SRCDIR([group/gfs_controld/config.c]) AC_CONFIG_HEADERS([make/clusterautoconfig.h]) AC_CANONICAL_HOST @@ -89,36 +88,6 @@ AC_ARG_ENABLE([debug], [ --enable-debug enable debug build. ], [ default="no" ]) -AC_ARG_ENABLE([gfs_controld], - [ --enable-gfs_controld build gfs_controld. ], - [ default="no" ]) - -AC_ARG_WITH([syslogfacility], - [ --syslogfacility=FACILITY - cluster default syslog facility. ], - [ SYSLOGFACILITY="$withval" ], - [ SYSLOGFACILITY="LOG_LOCAL4" ]) - -AC_ARG_WITH([sysloglevel], - [ --sysloglevel=LEVEL - cluster default syslog level. ], - [ SYSLOGLEVEL="$withval" ], - [ SYSLOGLEVEL="LOG_INFO" ]) - -# gfs_controld isn't required in the latest versions of cluster -AM_CONDITIONAL([BUILD_GFS_CONTROLD], [test "x$enable_gfs_controld" = "xyes"]) -AS_IF([test "x$enable_gfs_controld" = "xyes"], [ - PKG_CHECK_MODULES([corosync],[corosync]) - PKG_CHECK_MODULES([cpg],[libcpg]) - PKG_CHECK_MODULES([sackpt],[libSaCkpt]) - PKG_CHECK_MODULES([logt],[liblogthread]) - PKG_CHECK_MODULES([ccs],[libccs]) - PKG_CHECK_MODULES([cfg],[libcfg]) - PKG_CHECK_MODULES([fenced],[libfenced]) - PKG_CHECK_MODULES([dlmcontrol],[libdlmcontrol]) - PKG_CHECK_MODULES([quorum],[libquorum]) -]) - # We use the Check framework for unit tests PKG_CHECK_MODULES([check], [check >= 0.9.8], [have_check=yes], @@ -176,27 +145,6 @@ AC_FUNC_MALLOC AC_FUNC_REALLOC AC_CHECK_FUNCS([ftruncate gettimeofday memset realpath rmdir select setlocale socket strcasecmp strchr strdup strerror strstr]) -## random vars - -LOGDIR=${localstatedir}/log/cluster -CLUSTERVARRUN=${localstatedir}/run/cluster - -## do subst - -AC_SUBST([LOGDIR]) -AC_DEFINE_UNQUOTED([LOGDIR], "$(eval echo ${LOGDIR})", - [Default logging directory]) - -AC_SUBST([CLUSTERVARRUN]) -AC_DEFINE_UNQUOTED([CLUSTERVARRUN], "$(eval echo ${CLUSTERVARRUN})", - [Default cluster var/run directory]) - -AC_DEFINE_UNQUOTED([SYSLOGFACILITY], $(eval echo ${SYSLOGFACILITY}), - [Default syslog facility]) - -AC_DEFINE_UNQUOTED([SYSLOGLEVEL], $(eval echo ${SYSLOGLEVEL}), - [Default syslog level]) - ## *FLAGS handling ENV_CFLAGS="$CFLAGS" @@ -255,12 +203,6 @@ CPPFLAGS="-I\$(top_builddir)/make -I\$(top_srcdir)/make \ LDFLAGS="$ENV_LDFLAGS" AC_CONFIG_FILES([Makefile - group/Makefile - group/libgfscontrol/Makefile - group/gfs_control/Makefile - group/gfs_controld/Makefile - group/man/Makefile - group/include/Makefile gfs2/Makefile gfs2/include/Makefile gfs2/libgfs2/Makefile diff --git a/gfs2/include/Makefile.am b/gfs2/include/Makefile.am index fff2953..a017cb3 100644 --- a/gfs2/include/Makefile.am +++ b/gfs2/include/Makefile.am @@ -1,3 +1,3 @@ MAINTAINERCLEANFILES = Makefile.in -noinst_HEADERS = osi_list.h +noinst_HEADERS = osi_list.h osi_tree.h linux_endian.h diff --git a/gfs2/include/linux_endian.h b/gfs2/include/linux_endian.h new file mode 100644 index 0000000..43089d2 --- /dev/null +++ b/gfs2/include/linux_endian.h @@ -0,0 +1,68 @@ +#ifndef __LINUX_ENDIAN_DOT_H__ +#define __LINUX_ENDIAN_DOT_H__ + + +#include +#include + + +/* I'm not sure which versions of alpha glibc/gcc are broken, + so fix all of them. */ +#ifdef __alpha__ +#undef bswap_64 +static __inline__ unsigned long bswap_64(unsigned long x) +{ + unsigned int h = x >> 32; + unsigned int l = x; + + h = bswap_32(h); + l = bswap_32(l); + + return ((unsigned long)l << 32) | h; +} +#endif /* __alpha__ */ + + +#if __BYTE_ORDER == __BIG_ENDIAN + +#define be16_to_cpu(x) (x) +#define be32_to_cpu(x) (x) +#define be64_to_cpu(x) (x) + +#define cpu_to_be16(x) (x) +#define cpu_to_be32(x) (x) +#define cpu_to_be64(x) (x) + +#define le16_to_cpu(x) (bswap_16((x))) +#define le32_to_cpu(x) (bswap_32((x))) +#define le64_to_cpu(x) (bswap_64((x))) + +#define cpu_to_le16(x) (bswap_16((x))) +#define cpu_to_le32(x) (bswap_32((x))) +#define cpu_to_le64(x) (bswap_64((x))) + +#endif /* __BYTE_ORDER == __BIG_ENDIAN */ + + +#if __BYTE_ORDER == __LITTLE_ENDIAN + +#define be16_to_cpu(x) (bswap_16((x))) +#define be32_to_cpu(x) (bswap_32((x))) +#define be64_to_cpu(x) (bswap_64((x))) + +#define cpu_to_be16(x) (bswap_16((x))) +#define cpu_to_be32(x) (bswap_32((x))) +#define cpu_to_be64(x) (bswap_64((x))) + +#define le16_to_cpu(x) (x) +#define le32_to_cpu(x) (x) +#define le64_to_cpu(x) (x) + +#define cpu_to_le16(x) (x) +#define cpu_to_le32(x) (x) +#define cpu_to_le64(x) (x) + +#endif /* __BYTE_ORDER == __LITTLE_ENDIAN */ + + +#endif /* __LINUX_ENDIAN_DOT_H__ */ diff --git a/gfs2/init.d/gfs2-cluster b/gfs2/init.d/gfs2-cluster deleted file mode 100644 index d0f1c0e..0000000 diff --git a/gfs2/system/gfs2-cluster.service b/gfs2/system/gfs2-cluster.service deleted file mode 100644 index d6bc0ca..0000000 diff --git a/group/Makefile.am b/group/Makefile.am deleted file mode 100644 index 5b7d0f8..0000000 diff --git a/group/gfs_control/Makefile.am b/group/gfs_control/Makefile.am deleted file mode 100644 index dd75f6f..0000000 diff --git a/group/gfs_control/main.c b/group/gfs_control/main.c deleted file mode 100644 index dff32e3..0000000 diff --git a/group/gfs_control/target.mk b/group/gfs_control/target.mk deleted file mode 100644 index ff65253..0000000 diff --git a/group/gfs_controld/Makefile.am b/group/gfs_controld/Makefile.am deleted file mode 100644 index f8d646d..0000000 diff --git a/group/gfs_controld/config.c b/group/gfs_controld/config.c deleted file mode 100644 index 3131189..0000000 diff --git a/group/gfs_controld/config.h b/group/gfs_controld/config.h deleted file mode 100644 index bc4788d..0000000 diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c deleted file mode 100644 index 8cf2b00..0000000 diff --git a/group/gfs_controld/crc.c b/group/gfs_controld/crc.c deleted file mode 100644 index 29bc096..0000000 diff --git a/group/gfs_controld/gfs_controld.h b/group/gfs_controld/gfs_controld.h deleted file mode 100644 index 571dffb..0000000 diff --git a/group/gfs_controld/gfs_daemon.h b/group/gfs_controld/gfs_daemon.h deleted file mode 100644 index d5ea341..0000000 diff --git a/group/gfs_controld/logging.c b/group/gfs_controld/logging.c deleted file mode 100644 index 6c6d024..0000000 diff --git a/group/gfs_controld/main.c b/group/gfs_controld/main.c deleted file mode 100644 index aa38839..0000000 diff --git a/group/gfs_controld/member_cman.c b/group/gfs_controld/member_cman.c deleted file mode 100644 index 07fb982..0000000 diff --git a/group/gfs_controld/target.mk b/group/gfs_controld/target.mk deleted file mode 100644 index 6d04792..0000000 diff --git a/group/gfs_controld/util.c b/group/gfs_controld/util.c deleted file mode 100644 index f77f85b..0000000 diff --git a/group/include/Makefile.am b/group/include/Makefile.am deleted file mode 100644 index b2c3ce5..0000000 diff --git a/group/include/linux_endian.h b/group/include/linux_endian.h deleted file mode 100644 index 43089d2..0000000 diff --git a/group/include/list.h b/group/include/list.h deleted file mode 100644 index 8100cbc..0000000 diff --git a/group/libgfscontrol/Makefile.am b/group/libgfscontrol/Makefile.am deleted file mode 100644 index 9e6eb0d..0000000 diff --git a/group/libgfscontrol/libgfscontrol.h b/group/libgfscontrol/libgfscontrol.h deleted file mode 100644 index e5bb969..0000000 diff --git a/group/libgfscontrol/main.c b/group/libgfscontrol/main.c deleted file mode 100644 index 96a8e03..0000000 diff --git a/group/libgfscontrol/target.mk b/group/libgfscontrol/target.mk deleted file mode 100644 index 23bd3ac..0000000 diff --git a/group/man/Makefile.am b/group/man/Makefile.am deleted file mode 100644 index 87d81e5..0000000 diff --git a/group/man/gfs_controld.8 b/group/man/gfs_controld.8 deleted file mode 100644 index 3d053ee..0000000 diff --git a/group/man/target.mk b/group/man/target.mk deleted file mode 100644 index 2567e81..0000000 diff --git a/tests/Makefile.am b/tests/Makefile.am index a97b8c5..af01c49 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,6 @@ TESTS_ENVIRONMENT = TOPBUILDDIR=$(top_builddir) EXTRA_DIST = tool_tests.sh +CLEANFILES = tests.log if BUILD_TESTS check_PROGRAMS = check_libgfs2 -- 1.8.1.4