ANNOUNCE version 0.4.1
by Angus Salkeld
Hi all
This is a minor release to publish the new build system (pulled from
corosync). We need this for fedora inclusion.
As usual the releases can be found linked from libqb.org.
-Angus
changelog:
---------
Bump library version to 0.4.1
BUILD: only set -g and -O options if explicitly requested.
Move check_all into check and impove it (add rpm checks)
RPM: make the spec more like a fedora spec file
fix tarball url
add procps to BuildRequires
add a "make check" section
change %(buildroot) to $RPM_BUILD_ROOT
LOOP: check read() return value
DOCS: add missing @param on new timeout argument
Remove unneccessary check for library "dl"
RPM: add missing build dependancies
BUILD: improve the rpm building
copy corosync's rpm build system.
13 years, 2 months
[PATCH 1/3] RPM: make the spec more like a fedora spec file
by Angus Salkeld
fix tarball url
add procps to BuildRequires
add a "make check" section
change %(buildroot) to $RPM_BUILD_ROOT
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
libqb.spec.in | 84 +++++++++++++++++++++++++++-----------------------------
1 files changed, 41 insertions(+), 43 deletions(-)
diff --git a/libqb.spec.in b/libqb.spec.in
index ee2128c..013847e 100644
--- a/libqb.spec.in
+++ b/libqb.spec.in
@@ -2,71 +2,68 @@
%global numcomm @numcomm@
%global dirty @dirty@
-Name: libqb
-Summary: The Quarterback Client Server Developer Library
-Version: @version@
-Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
-License: LGPLv2+
-Group: System Environment/Libraries
-URL: http://www.libqb.org
-Source0: https://fedorahosted.org/releases/q/u/quarterback/%{name}-%{version}/%{na...
+Name: libqb
+Version: @version@
+Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
+Summary: An IPC library for high performance servers.
-BuildRequires: autoconf automake libtool doxygen
+Group: System Environment/Libraries
+License: LGPLv2+
+URL: http://www.libqb.org
+Source0: https://fedorahosted.org/releases/q/u/quarterback/%{name}-%{version}%{?nu...
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires: autoconf automake libtool doxygen procps check-devel
+
+%description
+libqb provides high performance client server reusable features.
+Initially these are IPC and poll.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release} pkgconfig
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%prep
%setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
-./autogen.sh
-
-%{configure}
%build
-make %{_smp_mflags}
-
-%install
-rm -rf %{buildroot}
+./autogen.sh
+%configure --disable-static
+make %{?_smp_mflags}
-make install DESTDIR=%{buildroot}
+%check
+make check
-## tree fixup
-# drop static libs
-rm -f %{buildroot}%{_libdir}/*.a
-# drop docs and html docs for now
-rm -rf %{buildroot}%{_docdir}/*
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+rm -rf $RPM_BUILD_ROOT/%{_docdir}/*
%clean
-rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
-%description
-This package contains libqb libraries.
+%post -p /sbin/ldconfig
-%files -n libqb
+%postun -p /sbin/ldconfig
+
+%files
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/libqb.so.*
-%post -n libqb -p /sbin/ldconfig
-
-%postun -n libqb -p /sbin/ldconfig
-
-%package -n libqb-devel
-Summary: The Quarterback Development Kit
-Group: Development/Libraries
-Requires: libqb = %{version}-%{release}
-Requires: pkgconfig
-
-%description -n libqb-devel
-This package contains include files and man pages used to develop using
-The Quarterback APIs.
-
-%files -n libqb-devel
+%files devel
%defattr(-,root,root,-)
%doc COPYING README
%dir %{_includedir}/qb/
%{_libdir}/libqb.so
-%{_libdir}/libqb.la
%{_libdir}/pkgconfig/libqb.pc
%{_includedir}/qb/qbloop.h
%{_includedir}/qb/qbhdb.h
@@ -81,6 +78,7 @@ The Quarterback APIs.
%{_includedir}/qb/qbarray.h
%{_mandir}/man3/qb*3*
+
%changelog
* @date@ Autotools generated version <nobody(a)nowhere.org> - @version@-1-@numcomm@.@alphatag@.(a)dirty@
- Autotools generated version
--
1.7.3.4
13 years, 2 months
[PATCH 1/5] BUILD: improve the rpm building
by Angus Salkeld
copy corosync's rpm build system.
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
.gitignore | 3 +
Makefile.am | 63 ++++++++++++--
build-aux/git-version-gen | 161 ++++++++++++++++++++++++++++++++++
build-aux/gitlog-to-changelog | 191 +++++++++++++++++++++++++++++++++++++++++
build-aux/release.mk | 75 ++++++++++++++++
configure.ac | 10 ++-
libqb.spec.in | 13 ++--
release.mk | 136 -----------------------------
8 files changed, 501 insertions(+), 151 deletions(-)
create mode 100755 build-aux/git-version-gen
create mode 100755 build-aux/gitlog-to-changelog
create mode 100644 build-aux/release.mk
delete mode 100644 release.mk
diff --git a/.gitignore b/.gitignore
index 4a2d8df..f0924db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,3 +29,6 @@ compile
ltmain.sh
libqb-*
lib/run_splint.sh
+.version
+.tarball-version
+libqb.spec
diff --git a/Makefile.am b/Makefile.am
index 79cac88..744cecb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,11 @@ SPEC = $(PACKAGE_NAME).spec
TARFILE = $(PACKAGE_NAME)-$(VERSION).tar.gz
-EXTRA_DIST = autogen.sh $(SPEC).in
+EXTRA_DIST = autogen.sh $(SPEC).in \
+ build-aux/git-version-gen \
+ build-aux/gitlog-to-changelog \
+ build-aux/release.mk \
+ .version
AUTOMAKE_OPTIONS = foreign
@@ -56,12 +60,40 @@ clean-generic:
$(SPEC): $(SPEC).in
rm -f $@-t $@
LC_ALL=C date="$(shell date "+%a %b %d %Y")" && \
- alphatag="$(shell svnversion | sed -e "s#.*:##g" -e "s#[MS]##g")" && \
- sed \
- -e "s#@alphatag@#r$$alphatag#g" \
- -e "s#@version@#$(VERSION)#g" \
- -e "s#@date@#$$date#g" \
- $< > $@-t
+ if [ -f .tarball-version ]; then \
+ gitver="$(shell cat .tarball-version)" && \
+ rpmver=$$gitver && \
+ alphatag="" && \
+ dirty="" && \
+ numcomm="0"; \
+ else \
+ gitver="$(shell git describe --abbrev=4 --match='v*' HEAD 2>/dev/null)" && \
+ rpmver=`echo $$gitver | sed -e "s/^v//" -e "s/-.*//g"` && \
+ alphatag=`echo $$gitver | sed -e "s/.*-//" -e "s/^g//"` && \
+ vtag=`echo $$gitver | sed -e "s/-.*//g"` && \
+ numcomm=`git rev-list $$vtag..HEAD | wc -l` && \
+ git update-index --refresh > /dev/null 2>&1 || true && \
+ dirty=`git diff-index --name-only HEAD 2>/dev/null`; \
+ fi && \
+ if [ -n "$$dirty" ]; then dirty="dirty"; else dirty=""; fi && \
+ if [ "$$numcomm" = "0" ]; then \
+ sed \
+ -e "s#@version@#$$rpmver#g" \
+ -e "s#%glo.*alpha.*##g" \
+ -e "s#%glo.*numcomm.*##g" \
+ -e "s#@dirty@#$$dirty#g" \
+ -e "s#@date@#$$date#g" \
+ $< > $@-t; \
+ else \
+ sed \
+ -e "s#@version@#$$rpmver#g" \
+ -e "s#@alphatag@#$$alphatag#g" \
+ -e "s#@numcomm@#$$numcomm#g" \
+ -e "s#@dirty@#$$dirty#g" \
+ -e "s#@date@#$$date#g" \
+ $< > $@-t; \
+ fi; \
+ if [ -z "$$dirty" ]; then sed -i -e "s#%glo.*dirty.*##g" $@-t; fi
chmod a-w $@-t
mv $@-t $@
@@ -82,3 +114,20 @@ rpm: clean
$(MAKE) $(SPEC) $(TARFILE)
rpmbuild $(RPMBUILDOPTS) -ba $(SPEC)
+# release/versioning
+BUILT_SOURCES = .version
+.version:
+ echo $(VERSION) > $@-t && mv $@-t $@
+
+dist-hook: gen-ChangeLog
+ echo $(VERSION) > $(distdir)/.tarball-version
+
+gen_start_date = 2000-01-01
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ if test -d .git; then \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ --since=$(gen_start_date) > $(distdir)/cl-t; \
+ rm -f $(distdir)/ChangeLog; \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; \
+ fi
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
new file mode 100755
index 0000000..795a98b
--- /dev/null
+++ b/build-aux/git-version-gen
@@ -0,0 +1,161 @@
+#!/bin/sh
+# Print a version string.
+scriptversion=2010-10-13.20; # UTC
+
+# 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
+
+case $# in
+ 1|2) ;;
+ *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version" \
+ '[TAG-NORMALIZATION-SED-SCRIPT]'
+ exit 1;;
+esac
+
+tarball_version_file=$1
+tag_sed_script="${2:-s/x/x/}"
+nl='
+'
+
+# 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=`cat $tarball_version_file` || exit 1
+ case $v in
+ *$nl*) v= ;; # reject multi-line output
+ [0-9]*) ;;
+ *) v= ;;
+ esac
+ test -z "$v" \
+ && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
+fi
+
+if test -n "$v"
+then
+ : # use $v
+# Otherwise, if there is at least one git commit involving the working
+# directory, and "git describe" output looks sensible, use that to
+# derive a version string.
+elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
+ && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+ || git describe --abbrev=4 HEAD 2>/dev/null` \
+ && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
+ && 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
+
+ # Change the first '-' to a '.', so version-comparing tools work properly.
+ # Remove the "g" in git describe's output string, to save a byte.
+ v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+else
+ v=UNKNOWN
+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=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+case "$dirty" in
+ '') ;;
+ *) # Append the suffix only if there isn't one already.
+ case $v in
+ *-dirty) ;;
+ *) v="$v-dirty" ;;
+ esac ;;
+esac
+
+# Omit the trailing newline, so that m4_esyscmd can use the result directly.
+echo "$v" | tr -d "$nl"
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
new file mode 100755
index 0000000..7660af5
--- /dev/null
+++ b/build-aux/gitlog-to-changelog
@@ -0,0 +1,191 @@
+eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
+ & eval 'exec perl -wS "$0" $argv:q'
+ if 0;
+# Convert git log output to ChangeLog format.
+
+my $VERSION = '2009-10-30 13:46'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job. Otherwise, update this string manually.
+
+# Copyright (C) 2008-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/>.
+
+# Written by Jim Meyering
+
+use strict;
+use warnings;
+use Getopt::Long;
+use POSIX qw(strftime);
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+ defined fileno STDOUT or return;
+ close STDOUT and return;
+ warn "$ME: failed to close standard output: $!\n";
+ $? ||= 1;
+}
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try `$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS] [ARGS]
+
+Convert git log output to ChangeLog format. If present, any ARGS
+are passed to "git log". To avoid ARGS being parsed as options to
+$ME, they may be preceded by '--'.
+
+OPTIONS:
+
+ --since=DATE convert only the logs since DATE;
+ the default is to convert all log entries.
+ --format=FMT set format string for commit subject and body;
+ see 'man git-log' for the list of format metacharacters;
+ the default is '%s%n%b%n'
+
+ --help display this help and exit
+ --version output version information and exit
+
+EXAMPLE:
+
+ $ME --since=2008-01-01 > ChangeLog
+ $ME -- -n 5 foo > last-5-commits-to-branch-foo
+
+EOF
+ }
+ exit $exit_code;
+}
+
+# If the string $S is a well-behaved file name, simply return it.
+# If it contains white space, quotes, etc., quote it, and return the new string.
+sub shell_quote($)
+{
+ my ($s) = @_;
+ if ($s =~ m![^\w+/.,-]!)
+ {
+ # Convert each single quote to '\''
+ $s =~ s/\'/\'\\\'\'/g;
+ # Then single quote the string.
+ $s = "'$s'";
+ }
+ return $s;
+}
+
+sub quoted_cmd(@)
+{
+ return join (' ', map {shell_quote $_} @_);
+}
+
+{
+ my $since_date = '1970-01-01 UTC';
+ my $format_string = '%s%n%b%n';
+ GetOptions
+ (
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ 'since=s' => \$since_date,
+ 'format=s' => \$format_string,
+ ) or usage 1;
+
+ my @cmd = (qw (git log --log-size), "--since=$since_date",
+ '--pretty=format:%ct %an <%ae>%n%n'.$format_string, @ARGV);
+ open PIPE, '-|', @cmd
+ or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n"
+ . "(Is your Git too old? Version 1.5.1 or later is required.)\n");
+
+ my $prev_date_line = '';
+ while (1)
+ {
+ defined (my $in = <PIPE>)
+ or last;
+ $in =~ /^log size (\d+)$/
+ or die "$ME:$.: Invalid line (expected log size):\n$in";
+ my $log_nbytes = $1;
+
+ my $log;
+ my $n_read = read PIPE, $log, $log_nbytes;
+ $n_read == $log_nbytes
+ or die "$ME:$.: unexpected EOF\n";
+
+ my @line = split "\n", $log;
+ my $author_line = shift @line;
+ defined $author_line
+ or die "$ME:$.: unexpected EOF\n";
+ $author_line =~ /^(\d+) (.*>)$/
+ or die "$ME:$.: Invalid line "
+ . "(expected date/author/email):\n$author_line\n";
+
+ my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1));
+ # If this line would be the same as the previous date/name/email
+ # line, then arrange not to print it.
+ if ($date_line ne $prev_date_line)
+ {
+ $prev_date_line eq ''
+ or print "\n";
+ print $date_line;
+ }
+ $prev_date_line = $date_line;
+
+ # Omit "Signed-off-by..." lines.
+ @line = grep !/^Signed-off-by: .*>$/, @line;
+
+ # If there were any lines
+ if (@line == 0)
+ {
+ warn "$ME: warning: empty commit message:\n $date_line\n";
+ }
+ else
+ {
+ # Remove leading and trailing blank lines.
+ while ($line[0] =~ /^\s*$/) { shift @line; }
+ while ($line[$#line] =~ /^\s*$/) { pop @line; }
+
+ # Prefix each non-empty line with a TAB.
+ @line = map { length $_ ? "\t$_" : '' } @line;
+
+ print "\n", join ("\n", @line), "\n";
+ }
+
+ defined ($in = <PIPE>)
+ or last;
+ $in ne "\n"
+ and die "$ME:$.: unexpected line:\n$in";
+ }
+
+ close PIPE
+ or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
+ # FIXME-someday: include $PROCESS_STATUS in the diagnostic
+}
+
+# Local Variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/build-aux/release.mk b/build-aux/release.mk
new file mode 100644
index 0000000..c6481a2
--- /dev/null
+++ b/build-aux/release.mk
@@ -0,0 +1,75 @@
+# to build official release tarballs, handle tagging and publish.
+
+# signing key
+gpgsignkey=
+
+project=libqb
+
+all: checks setup tag tarballs sha256 sign
+
+checks:
+ifeq (,$(version))
+ @echo ERROR: need to define version=
+ @exit 1
+endif
+ @if [ ! -d .git ]; then \
+ echo This script needs to be executed from top level cluster git tree; \
+ exit 1; \
+ fi
+
+setup: checks
+ ./autogen.sh
+ ./configure
+ make maintainer-clean
+
+tag: setup ./tag-$(version)
+
+tag-$(version):
+ifeq (,$(release))
+ @echo Building test release $(version), no tagging
+else
+ git tag -a -m "v$(version) release" v$(version) HEAD
+ @touch $@
+endif
+
+tarballs: tag
+ ./autogen.sh
+ ./configure
+ make distcheck
+
+sha256: tarballs $(project)-$(version).sha256
+
+$(project)-$(version).sha256:
+ifeq (,$(release))
+ @echo Building test release $(version), no sha256
+else
+ sha256sum $(project)-$(version)*tar* | sort -k2 > $@
+endif
+
+sign: sha256 $(project)-$(version).sha256.asc
+
+$(project)-$(version).sha256.asc: $(project)-$(version).sha256
+ifeq (,$(gpgsignkey))
+ @echo No GPG signing key defined
+else
+ifeq (,$(release))
+ @echo Building test release $(version), no sign
+else
+ gpg --default-key $(gpgsignkey) \
+ --detach-sign \
+ --armor \
+ $<
+endif
+endif
+
+publish:
+ifeq (,$(release))
+ @echo Building test release $(version), no publishing!
+else
+ @echo CHANGEME git push --tags origin
+ @echo CHANGEME scp $(project)-$(version).* \
+ fedorahosted.org:$(project)
+endif
+
+clean:
+ rm -rf $(project)-* tag-*
diff --git a/configure.ac b/configure.ac
index c3df855..c63bb92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,10 +2,16 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
-AC_INIT([libqb], [0.4.0], [quarterback-devel(a)fedorahosted.org])
+
+AC_INIT([libqb],
+ m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+ [quarterback-devel(a)fedorahosted.org])
+
+AM_INIT_AUTOMAKE([-Wno-portability])
+
AC_CONFIG_SRCDIR([lib/ringbuffer.c])
AC_CONFIG_HEADERS([include/config.h])
-AM_INIT_AUTOMAKE([-Wno-portability])
+
LT_PREREQ([2.2.6])
LT_INIT
diff --git a/libqb.spec.in b/libqb.spec.in
index 214f4ec..2b3a97c 100644
--- a/libqb.spec.in
+++ b/libqb.spec.in
@@ -1,20 +1,22 @@
%global alphatag @alphatag@
+%global numcomm @numcomm@
+%global dirty @dirty@
Name: libqb
Summary: The Quarterback Client Server Developer Library
Version: @version@
-Release: 1%{?alphatag:.%{alphatag}}%{?dist}
-License: LGPL-2.1
+Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
+License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.libqb.org
-Source0: https://fedorahosted.org/releases/q/u/quarterback/%{name}-%{version}.tar.gz
+Source0: https://fedorahosted.org/releases/q/u/quarterback/%{name}-%{version}/%{na...
BuildRequires: autoconf automake
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%prep
-%setup -q -n %{name}-%{version}
+%setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
./autogen.sh
@@ -54,7 +56,6 @@ Summary: The Quarterback Development Kit
Group: Development/Libraries
Requires: libqb = %{version}-%{release}
Requires: pkgconfig
-Provides: libqb-devel = %{version}
%description -n libqb-devel
This package contains include files and man pages used to develop using
@@ -81,5 +82,5 @@ The Quarterback APIs.
%{_mandir}/man3/qb*3*
%changelog
-* @date@ Autotools generated version <nobody(a)nowhere.org> - @version@-1.(a)alphatag@
+* @date@ Autotools generated version <nobody(a)nowhere.org> - @version@-1-@numcomm@.@alphatag@.(a)dirty@
- Autotools generated version
diff --git a/release.mk b/release.mk
deleted file mode 100644
index 41a4505..0000000
--- a/release.mk
+++ /dev/null
@@ -1,136 +0,0 @@
-# NOTE: this make file snippet is only used by the release managers
-# to build official release tarballs, handle tagging and publish.
-#
-# this script is NOT "make -j" safe
-#
-# do _NOT_ use for anything else!!!!!!!!!
-#
-# make -f release.mk version=<x.y.z> oldversion=<a.b.c> [release]
-#
-
-# setup tons of vars
-
-# signing key
-gpgsignkey=956EEFB5
-
-# project layout
-project=libqb
-projectver=$(project)-$(version)
-projecttar=$(projectver).tar
-projectgz=$(projecttar).gz
-projectbz=$(projecttar).bz2
-
-
-# temp dirs
-
-ifdef release
-reldir=release
-gitver=v$(version)
-forceclean=clean
-else
-reldir=release-candidate
-gitver=HEAD
-forceclean=
-endif
-
-releasearea=$(shell pwd)/../$(projectver)-$(reldir)
-
-all: $(forceclean) setup tag tarballs changelog sha256 sign
-
-checks:
-ifeq (,$(version))
- @echo ERROR: need to define version=
- @exit 1
-endif
-ifeq (,$(oldversion))
- @echo ERROR: need to define oldversion=
- @exit 1
-endif
- @if [ ! -d .git ]; then \
- echo This script needs to be executed from top level cluster git tree; \
- exit 1; \
- fi
-
-setup: checks $(releasearea)
-
-$(releasearea):
- mkdir $@
-
-tag: setup $(releasearea)/tag-$(version)
-
-$(releasearea)/tag-$(version):
-ifeq (,$(release))
- @echo Building test release $(version), no tagging
-else
- git tag -a -m "$(projectver) release" v$(version) HEAD
-endif
- @touch $@
-
-tarballs: tag
-tarballs: $(releasearea)/$(projecttar)
-tarballs: $(releasearea)/$(projectgz)
-tarballs: $(releasearea)/$(projectbz)
-
-$(releasearea)/$(projecttar):
- @echo Creating $(project) tarball
- rm -rf $(releasearea)/$(projectver)
- git archive \
- --format=tar \
- --prefix=$(projectver)/ \
- $(gitver) | \
- (cd $(releasearea)/ && tar xf -)
- cd $(releasearea) && \
- tar cpf $(projecttar) $(projectver) && \
- rm -rf $(projectver)
-
- #sed -i -e \
- # 's#<CVS>#$(version)#g' \
- # $(projectver)/gfs-kernel/src/gfs/gfs.h && \
- #echo "VERSION \"$(version)\"" \
- # >> $(projectver)/make/official_release_version && \
-
-$(releasearea)/%.gz: $(releasearea)/%
- @echo Creating $@
- cat $< | gzip -9 > $@
-
-$(releasearea)/%.bz2: $(releasearea)/%
- @echo Creating $@
- cat $< | bzip2 -c > $@
-
-changelog: checks setup $(releasearea)/Changelog-$(version)
-
-$(releasearea)/Changelog-$(version): $(releasearea)/$(projecttar)
- git log v$(oldversion)..$(gitver) | \
- git shortlog > $@
- git diff --stat v$(oldversion)..$(gitver) >> $@
-
-sha256: changelog tarballs $(releasearea)/$(projectver).sha256
-
-$(releasearea)/$(projectver).sha256: $(releasearea)/Changelog-$(version)
- cd $(releasearea) && \
- sha256sum Changelog-$(version) *.gz *.bz2 | sort -k2 > $@
-
-sign: sha256 $(releasearea)/$(projectver).sha256.asc
-
-$(releasearea)/$(projectver).sha256.asc: $(releasearea)/$(projectver).sha256
- cd $(releasearea) && \
- gpg2 --default-key $(gpgsignkey) \
- --detach-sign \
- --armor \
- $<
-
-publish: sign
-ifeq (,$(release))
- @echo Nothing to publish
-else
- git push --tags origin
- cd $(releasearea) && \
- scp *.gz *.bz2 Changelog-* *sha256* \
- fedorahosted.org:quarterback
- @echo Hey you!.. yeah you looking somewhere else!
- @echo remember to update the wiki and send the email to quarterback-devel
-endif
-
-clean: checks
- rm -rf $(releasearea)
-
--
1.7.3.1
13 years, 2 months
ANNOUNCE libqb-v0.4.0
by Angus Salkeld
Hi all
I am pleased to announce libqb 0.4.0.
This release includes alot of fixes in IPC and the main loop.
This has been mainly to get corosync into a "happy place" :)
You can find the releases from the main page of www.libqb.org.
The changelog is below for convience.
Regards
Angus Salkeld
===================================================
Angus Salkeld (68):
TEST: add some more array tests.
LINT: get the lint target working.
IPC: remove sprintf where possible
ATOMIC: fix the memory barrier setup.
TEST: add glib mainloop option to bms
IPC: add stats to server end.
IPC: add a connection iterator.
fix some build issues on FreeBSD
Fix or ignore splint errors
IPC: add job_add() API to the poll abstraction.
RB: improve debug message
TIME: move tlist_nano_ functions into util
IPC: add qb_ipcs_response_sendv()
IPC: add server connection states for better shutdown.
LOOP: fix job poll and simplify main loop
LOOP: add qb_loop_destroy()
TEST: make test ouput more verbose
IPC: remove refcount'ing debug
LOOP: add support for timerfd
UTIL: move mmap helpers into private header
Cleanup config defines & add a check_all script
TEST: add a check_resources script
RB: don't be so timid on shutdown
IPC: add flow control & q_len to unix socket transport.
Fix ./check_all
IPC: change service instance from handle to pointer.
IPC: add connection_closed() callback.
LOOP: prevent high cpu utilization on no load.
LOOP: add signal support to main loop
UTIL: check for shm usable space.
RB: check for NULL on close
TLIST: use qb_util_nano_monotonic_hz() instead of HZ
IPC: withdraw server socket when destroying a service.
LOOP: add some debug to log slow jobs
LOOP: prevent timers from deleting them selves.
IPC: remove try again log message
Fix some error handling in RB & IPC
RB: fix munmap size (else shared mem not freed correctly)
LOOP: move pipe creation into qb_loop_signals_create()
LOOP: fix compile warning when we don't have timerfd.
Fix some freeBSD compile warnings.
fix waring produced by -Wp,-D_FORTIFY_SOURCE=2
IPC: export qb_ipcs_disconnect()
IPCS: don't block on sending socket notification
LOOP: remove unneccessary event array
IPC: fix non-blocking event mechanism
IPC: check for null ringbuffer
Remove carriage returns in qb_util_log() calls.
TESTS: add a test case for recving from a failed server
IPC: return -ENOTCONN when the other end exits
IPC: return EAGAIN from qb_ipcc_recv() if recv_ready() returns 0
DOCS: fix some doxygen warnings for missing comments.
LOOP: change timers to be nano second based
DOCS: set the version from a configure variable
IPC: rename _ref_inc() to _ref()
IPC: return the correct number of bytes sent
IPC: improve shm performance by timing out earlier on poll()
IPC: add a timeout to the client recv functions
TEST: add ipc tests for recv's with a timeout
RB: add a function to get the reference count.
IPC: use rb refcount to check for "connectiveness"
LOOP: add per-level todo counters
LOOP: change entry type enum
LOOP: reduce the number of for loops
LOOP: make static functions like _<name>_()
TESTS: make sure timers are not leaking file descriptors
LOOP: remove tlist absolute timer
LOOP: change timer handle from pointer to index + check.
The Quarterback Library Release Team (1):
Bump version to 0.4.0
.gitignore | 1 +
Makefile.am | 4 -
check_all | 37 ++
configure.ac | 177 +++++-----
docs/html.dox.in | 2 +-
docs/man.dox.in | 2 +-
include/os_base.h | 42 +++
include/qb/qbarray.h | 2 +
include/qb/qbatomic.h | 16 +-
include/qb/qbdefs.h | 4 +
include/qb/qbipcc.h | 9 +-
include/qb/qbipcs.h | 183 +++++++++-
include/qb/qbloop.h | 77 ++++-
include/qb/qbrb.h | 15 +-
include/qb/qbutil.h | 43 ++-
include/tlist.h | 108 +-----
lib/Makefile.am | 31 ++-
lib/array.c | 11 +-
lib/atomic_lock.c | 15 +
lib/hdb.c | 2 +-
lib/ipc_int.h | 37 +-
lib/ipc_posix_mq.c | 18 +-
lib/ipc_shm.c | 88 +++--
lib/ipc_sysv_mq.c | 11 +-
lib/ipc_us.c | 298 ++++++++++-----
lib/ipcc.c | 106 ++++--
lib/ipcs.c | 442 ++++++++++++++++-------
lib/loop.c | 109 ++++---
lib/loop_int.h | 36 ++-
lib/loop_job.c | 38 ++-
lib/loop_poll.c | 904 +++++++++++++++++++++++++++++++++++++++-------
lib/loop_timer.c | 136 -------
lib/loop_timerlist.c | 255 +++++++++++++
lib/ringbuffer.c | 55 ++-
lib/ringbuffer_helper.c | 20 +-
lib/util.c | 189 +++++++++--
lib/util_int.h | 30 ++
tests/.gitignore | 1 +
tests/Makefile.am | 14 +-
tests/bmc.c | 26 +--
tests/bmcpt.c | 21 +-
tests/bms.c | 203 +++++++++--
tests/check_array.c | 106 ++++--
tests/check_ipc.c | 179 ++++++++--
tests/check_loop.c | 441 ++++++++++++++++++++++
tests/check_rb.c | 33 +-
tests/check_resources.sh | 19 +
tests/loop.c | 40 ++-
tests/rbreader.c | 4 +-
tests/rbwriter.c | 4 +-
50 files changed, 3524 insertions(+), 1120 deletions(-)
13 years, 2 months
[PATCH 1/2] LOOP: remove tlist absolute timer
by Angus Salkeld
Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
include/tlist.h | 25 -------------------------
1 files changed, 0 insertions(+), 25 deletions(-)
diff --git a/include/tlist.h b/include/tlist.h
index a005f81..e9d25c2 100644
--- a/include/tlist.h
+++ b/include/tlist.h
@@ -79,31 +79,6 @@ static inline void timerlist_add(struct timerlist *timerlist,
}
}
-static inline int32_t timerlist_add_absolute(struct timerlist *timerlist,
- void (*timer_fn) (void *data),
- void *data,
- uint64_t nano_from_epoch,
- timer_handle * handle)
-{
- struct timerlist_timer *timer;
-
- timer =
- (struct timerlist_timer *)malloc(sizeof(struct timerlist_timer));
- if (timer == 0) {
- return (-ENOMEM);
- }
-
- timer->expire_time = nano_from_epoch;
- timer->is_absolute_timer = 1;
- timer->data = data;
- timer->timer_fn = timer_fn;
- timer->handle_addr = handle;
- timerlist_add(timerlist, timer);
-
- *handle = timer;
- return (0);
-}
-
static inline int32_t timerlist_add_duration(struct timerlist *timerlist,
void (*timer_fn) (void *data),
void *data,
--
1.7.3.1
13 years, 2 months