Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor, drop many modules and dependencies

This commit is necessary as building modules or including foreign headers
would introduce unfeasable dependencies which in turn hinder wider deployment.

Our suggested `fix' is to create a gazillion sub-projects that implement
those modules based on this bare unserding repo.

Time will tell.

Signed-off-by: Sebastian Freundt <sebastian.freundt@ga-group.nl>
  • Loading branch information...
commit daf7aa6711df97aac277c472c5779be36200e4a7 1 parent 1f38578
@hroptatyr authored
View
12 cli/Makefile.am
@@ -8,13 +8,17 @@ AM_LDFLAGS = -lpthread
bin_PROGRAMS =
if BUILD_CLIAPPS
-bin_PROGRAMS += ud-instr ud-snap ud-tick ud-ping ud-test ud-itan
+if HAVE_PFACK
+bin_PROGRAMS += ud-instr ud-snap ud-tick
+endif ## HAVE_PFACK
+bin_PROGRAMS += ud-ping ud-itan
endif
BUILT_SOURCES =
CLEANFILES = $(BUILT_SOURCES)
if BUILD_CLIAPPS
+if HAVE_PFACK
ud_instr_SOURCES = ud-instr.c
ud_instr_CPPFLAGS = $(AM_CPPFLAGS) $(PFACK_CFLAGS)
ud_instr_LDADD = $(top_builddir)/src/libunserding.la $(PFACK_LIBS) -lpopt
@@ -29,17 +33,13 @@ ud_tick_SOURCES = ud-tick.c
ud_tick_CPPFLAGS = $(AM_CPPFLAGS) $(PFACK_CFLAGS)
ud_tick_LDADD = $(top_builddir)/src/libunserding.la $(PFACK_LIBS)
ud_tick_LDFLAGS = $(AM_LDFLAGS) -static
+endif ## HAVE_PFACK
ud_ping_SOURCES = ud-ping.c
ud_ping_CPPFLAGS = $(AM_CPPFLAGS)
ud_ping_LDADD = $(top_builddir)/src/libunserding.la -lrt
ud_ping_LDFLAGS = $(AM_LDFLAGS) -static
-ud_test_SOURCES = ud-test.c
-ud_test_CPPFLAGS = $(AM_CPPFLAGS) $(PFACK_CFLAGS)
-ud_test_LDADD = $(top_builddir)/src/libunserding.la $(PFACK_LIBS)
-ud_test_LDFLAGS = $(AM_LDFLAGS) -static
-
ud_itan_SOURCES = ud-itan.c
ud_itan_CPPFLAGS = $(AM_CPPFLAGS)
ud_itan_LDADD = $(top_builddir)/src/libunserding.la
View
3  cli/ud-ping.c
@@ -39,8 +39,11 @@
#include <stdbool.h>
#include <signal.h>
#include <errno.h>
+#include <string.h>
#include "unserding.h"
#include "unserding-nifty.h"
+#include "protocore.h"
+#include "seria.h"
#include "svc-pong.h"
typedef struct clks_s {
View
20 configure.ac
@@ -3,7 +3,7 @@ dnl Autoconf startup.
dnl -------------------------------------------------------------------------
AC_PREREQ([2.64])
-AC_INIT([unserding], [0.1], [http://www.ga-group.nl])
+AC_INIT([unserding], m4_esyscmd([./git-version-gen]), [https://trac.ga-group.nl/freundt_devel])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
@@ -161,20 +161,6 @@ if test "$with_mysql" != "no"; then
fi
AM_CONDITIONAL([USE_MYSQL], [test "$with_mysql" != "no" -a "${MYSQL_CONFIG}" != ":"])
-## check for libffff
-dnl AC_CHECK_FFFF
-dnl AC_DEFINE([WITH_FFFF], [1], [Whether ffff support library is requested.])
-dnl if test "${have_libffff}" = "yes"; then
-dnl AC_DEFINE([HAVE_FFFF], [1], [Whether ffff support library is usable.])
-dnl LDFLAGS="${LDFLAGS} ${LIBFFFF_LDFLAGS} ${LIBFFFF_LIBS}"
-dnl CPPFLAGS="${CPPFLAGS} ${LIBFFFF_CPPFLAGS} -DUSE_FFFF"
-dnl else
-dnl AC_MSG_ERROR([ffff support is mandatory.])
-dnl fi
-
-## check for libpfack
-PKG_CHECK_MODULES([PFACK], [libpfack >= 0.0.99], [:], [:])
-
## readline and friends
SXE_DUMP_LIBS
VL_LIB_READLINE
@@ -207,6 +193,10 @@ AM_CONDITIONAL([BUILD_LIBRARY], [test "${enable_library}" = "yes"])
dnl PKG_CHECK_MODULES([LIBCONFIG], [libconfig])
## check for lua instead!
+## we don't really want pfack dependencies here
+## however this could be useful to module authors to see whats possible
+AM_CONDITIONAL([HAVE_PFACK], [test "0" = "1"])
+
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([cli/Makefile])
AC_CONFIG_FILES([src/Makefile])
View
174 git-version-gen
@@ -0,0 +1,174 @@
+#!/bin/sh
+# Print a version string.
+
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
+# It may be run two ways:
+# - from a git repository in which the "git describe" command below
+# produces useful output (thus requiring at least one signed tag)
+# - from a non-git-repo directory containing a .tarball-version file, which
+# presumes this script is invoked like "./git-version-gen .tarball-version".
+
+# In order to use intra-version strings in your project, you will need two
+# separate generated version string files:
+#
+# .tarball-version - present only in a distribution tarball, and not in
+# a checked-out repository. Created with contents that were learned at
+# the last time autoconf was run, and used by git-version-gen. Must not
+# be present in either $(srcdir) or $(builddir) for git-version-gen to
+# give accurate answers during normal development with a checked out tree,
+# but must be present in a tarball when there is no version control system.
+# Therefore, it cannot be used in any dependencies. GNUmakefile has
+# hooks to force a reconfigure at distribution time to get the value
+# correct, without penalizing normal development with extra reconfigures.
+#
+# .version - present in a checked-out repository and in a distribution
+# tarball. Usable in dependencies, particularly for files that don't
+# want to depend on config.h but do want to track version changes.
+# Delete this file prior to any autoconf run where you want to rebuild
+# files to pick up a version string change; and leave it stale to
+# minimize rebuild time after unrelated changes to configure sources.
+#
+# It is probably wise to add these two files to .gitignore, so that you
+# don't accidentally commit either generated file.
+#
+# Use the following line in your configure.ac, so that $(VERSION) will
+# automatically be up-to-date each time configure is run (and note that
+# since configure.ac no longer includes a version string, Makefile rules
+# should not depend on configure.ac for version updates).
+#
+# AC_INIT([GNU project],
+# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+# [bug-project@example])
+#
+# Then use the following lines in your Makefile.am, so that .version
+# will be present for dependencies, and so that .tarball-version will
+# exist in distribution tarballs.
+#
+# BUILT_SOURCES = $(top_srcdir)/.version
+# $(top_srcdir)/.version:
+# echo $(VERSION) > $@-t && mv $@-t $@
+# dist-hook:
+# echo $(VERSION) > $(distdir)/.tarball-version
+
+## keep track of the basedir and our own name
+BASEDIR=$(dirname "${0}")
+BASESCR=$(basename "${0}")
+
+if test "${#}" -gt 2; then
+ echo "Usage: ${BASESCR} VERSION-FILE [TAG-NORMALIZATION-SED-SCRIPT]" >&2
+ exit 1
+fi
+
+tarball_version_file="${1}"
+tag_sed_script="${2:-s/x/x/}"
+
+## Avoid meddling by environment variable of the same name.
+v=
+
+## First see if there is a tarball-only version file.
+## then try "git describe", then default.
+if test -f "${tarball_version_file}"; then
+ v=$(head -n 1 -- "${tarball_version_file}") || exit 1
+ case "${v}" in
+ [0-9a-f]*)
+ ;;
+ *)
+ ## reset v
+ v=
+ ;;
+ esac
+ if test -z "${v}"; then
+ echo "${BASESCR}: WARNING: " \
+ "${tarball_version_file} seems to be damaged" >&2
+ fi
+fi
+
+if test -d "${BASEDIR}/.git"; then
+ ## save the ${v} we've got so far
+ old_v="${v}"
+else
+ ## otherwise, just go on with the thing we've got so far
+ echo -n "${v}"
+ exit 0
+fi
+
+describe()
+{
+ REV="${1}"
+ git describe --abbrev=8 --match='v[0-9]*' "${REV}" 2>/dev/null || \
+ git describe --abbrev=8 "${REV}" 2>/dev/null
+}
+
+v=$(describe HEAD | sed "${tag_sed_script}")
+if test -n "${v}" && case "${v}" in
+ v[0-9]*)
+ ;;
+ *)
+ (exit 1)
+ ;;
+ esac; then
+ ## Is this a new git that lists number of commits since the last
+ ## tag or the previous older version that did not?
+ ## Newer: v6.10-77-g0f8faeb
+ ## Older: v6.10-g0f8faeb
+ case "${v}" in
+ *-*-*)
+ : git describe is okay three part flavor
+ ;;
+ *-*)
+ : git describe is older two part flavor
+ ## Recreate the number of commits and rewrite such that the
+ ## result is the same as if we were using the newer version
+ ## of git describe.
+ vtag=$(echo "${v}" | sed 's/-.*//')
+ numcommits=$(git rev-list "${vtag}"..HEAD | wc -l)
+ v=$(echo "${v}" | sed "s/\(.*\)-\(.*\)/\1-${numcommits}-\2/")
+ ;;
+ esac
+else
+ v=$(git show-ref --head --hash=8 HEAD 2>/dev/null | head -n 1)
+fi
+
+v=$(echo "${v}" | sed 's/^v//')
+
+# Don't declare a version "dirty" merely because a time stamp has changed.
+git update-index --refresh > /dev/null 2>&1
+
+dirty=$(git diff-index --name-only HEAD -- 2>/dev/null) || dirty=
+if test -n "${dirty}"; then
+ case "${v}" in
+ *-dirty)
+ ;;
+ *)
+ v="${v}-dirty"
+ ;;
+ esac
+fi
+
+# Omit the trailing newline, so that m4_esyscmd can use the result directly.
+new_v=$(echo "${v}" | tr -d '\r\n')
+if test "${new_v}" = "${old_v}"; then
+ ## print the old version
+ echo -n "${old_v}"
+elif test -z "${tarball_version_file}"; then
+ echo -n "${new_v}"
+else
+ echo "${new_v}" | tee -- "${tarball_version_file}" | tr -d '\r\n'
+fi
+
+## git-version-gen ends here
View
4 m4/sxe-events.m4
@@ -59,10 +59,10 @@ AC_DEFUN([SXE_CHECK_LIBEVENT], [
AC_DEFUN([SXE_CHECK_LIBEV], [
## defines sxe_cv_feat_libev
SXE_CHECK_HEADERS([ev.h])
- SXE_CHECK_LIB_FUNCS([ev], [ev_loop])
+ SXE_CHECK_LIB_FUNCS([ev], [ev_loop_new])
if test "$ac_cv_header_ev_h" = "yes" -a \
- "$ac_cv_lib_ev___ev_loop" = "yes"; then
+ "$ac_cv_lib_ev___ev_loop_new" = "yes"; then
AC_DEFINE([HAVE_LIBEV], [1], [Whether libev is fully functional])
sxe_cv_feat_libev="yes"
have_libev="yes"
View
72 src/Makefile.am
@@ -9,9 +9,11 @@ headerdir = $(includedir)/unserding
moddir = $(libdir)/unserding
bin_PROGRAMS =
+noinst_PROGRAMS =
if BUILD_SERVER
bin_PROGRAMS += unserdingd unsercli
-noinst_PROGRAMS = instrumenstruation uteseries
+#noinst_PROGRAMS += instrumenstruation
+#noinst_PROGRAMS += uteseries
endif
if BUILD_LIBRARY
lib_LTLIBRARIES = libunserding.la
@@ -47,70 +49,18 @@ unserdingd_SOURCES += dso-pong.c
## server dynamic modules
mod_LTLIBRARIES =
-mod_LTLIBRARIES += dso-cli.la dso-scscp.la dso-scscp2.la dso-bbdb.la dso-xbbdb.la
-#mod_LTLIBRARIES += dso-instr.la
-mod_LTLIBRARIES += dso-xdr-instr.la
-mod_LTLIBRARIES += dso-tseries.la dso-tseries-ute.la
-mod_LTLIBRARIES += dso-itanl.la
-if USE_MYSQL
-mod_LTLIBRARIES += dso-tseries-mysql.la
-endif
-dso_cli_la_LDFLAGS = -module
-dso_scscp_la_LDFLAGS = -module
-dso_scscp2_la_LDFLAGS = -module
-dso_bbdb_la_LDFLAGS = -module
-## the xml bbdb module
-dso_xbbdb_la_CPPFLAGS = $(shell pkg-config --cflags libxml-2.0)
-dso_xbbdb_la_LDFLAGS = -module $(shell pkg-config --libs libxml-2.0)
-
-## the catalogue module
-dso_xdr_instr_la_LDFLAGS = -module $(PFACK_LIBS)
-dso_xdr_instr_la_CPPFLAGS = $(PFACK_CFLAGS)
-dso_xdr_instr_la_LIBADD = $(PFACK_LIBS)
-if USE_MYSQL
-dso_xdr_instr_la_CPPFLAGS += $(MYSQL_CPPFLAGS)
-dso_xdr_instr_la_LDFLAGS += $(MYSQL_LDFLAGS) -lmysqlclient
-endif
-dso_xdr_instr_la_SOURCES = catalogue.c dso-xdr-instr.c
-if USE_MYSQL
-dso_xdr_instr_la_SOURCES += dso-xdr-instr-mysql.c
-endif
-dso_xdr_instr_la_SOURCES += dso-xdr-instr-file.c
-
-## the time series module
-dso_tseries_la_LDFLAGS = -module $(PFACK_LIBS) -export-dynamic
-dso_tseries_la_CPPFLAGS = $(AM_CPPFLAGS) $(PFACK_CFLAGS)
-dso_tseries_la_LIBADD = $(PFACK_LIBS)
-dso_tseries_la_SOURCES = dso-tseries.c
-dso_tseries_la_SOURCES += intvtree.c tscube.c
-dso_tseries_la_SOURCES += dso-tseries-frobq.c
-dso_tseries_la_LIBADD += -luterus
-
-if USE_MYSQL
-dso_tseries_mysql_la_SOURCES = dso-tseries-mysql.c
-dso_tseries_mysql_la_CPPFLAGS = $(MYSQL_CPPFLAGS)
-dso_tseries_mysql_la_LDFLAGS = -module
-dso_tseries_mysql_la_LDFLAGS += $(MYSQL_LDFLAGS) -lmysqlclient
-endif
-
-dso_tseries_ute_la_LDFLAGS = -module
-dso_tseries_ute_la_SOURCES = dso-tseries-ute.c
-dso_tseries_ute_la_LIBADD = -luterus
## stuff we develop here but that will go eventually to sushi
-uteseries_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_MODE
-uteseries_LDFLAGS = -static
-uteseries_LDADD = -luterus -lpopt
+#uteseries_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_MODE
+#uteseries_LDFLAGS = -static
+#uteseries_LDADD = -luterus -lpopt
## to fiddle with option chains and other instruments
-instrumenstruation_CPPFLAGS = $(PFACK_CFLAGS)
-instrumenstruation_LDFLAGS = $(PFACK_LIBS)
-instrumenstruation_LDADD = $(PFACK_LIBS) libunserding.la -lpopt
+#instrumenstruation_CPPFLAGS = $(PFACK_CFLAGS)
+#instrumenstruation_LDFLAGS = $(PFACK_LIBS)
+#instrumenstruation_LDADD = $(PFACK_LIBS) libunserding.la -lpopt
endif ## BUILD_SERVER
-header_HEADERS += xdr-instr.h tseries.h
-
-dso_itanl_la_LDFLAGS = -module
-dso_itanl_la_SOURCES = dso-itanl.c
+##header_HEADERS += xdr-instr.h tseries.h
## fucking automake
unsercli_YFLAGS = -d -p "cli_yy"
@@ -153,7 +103,7 @@ endif
if BUILD_LIBRARY
## the lib
-libunserding_la_SOURCES = libstuff.c libhelpers.c dccp.c
+libunserding_la_SOURCES = libstuff.c dccp.c
libunserding_la_SOURCES += svc-pong.c
libunserding_la_CPPFLAGS = -DUNSERLIB $(PFACK_CFLAGS) $(AM_CPPFLAGS)
libunserding_la_LDFLAGS = $(AM_LDFLAGS) -lrt
View
5 src/unserding.h
@@ -187,11 +187,6 @@ ud_handle_set_4svc(ud_handle_t hdl)
* Ping/pong service to determine neighbours. */
#define UD_SVC_PING 0x0004
-
-/* more of them */
-#include "xdr-instr.h"
-#include "tseries.h"
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
View
2  src/unserdingd.c
@@ -91,7 +91,7 @@
/* worker pool */
#include "wpool.h"
-#define UD_VERSION "v0.2"
+#define UD_VERSION "v" ## PACKAGE_VERSION
FILE *logout;
View
2  unserding.pc.in
@@ -5,7 +5,7 @@ libdir=@libdir@
Name: unserding
Description: Ubiquitous Network Service to Enquire Real or Deduced Information
-Version: 0.1
+Version: @PACKAGE_VERSION@
Libs: @LDFLAGS@ -L${libdir} -lc
Cflags: @CPPFLAGS@ -I${includedir}
Please sign in to comment.
Something went wrong with that request. Please try again.