copy corosync's rpm build system.
Signed-off-by: Angus Salkeld asalkeld@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@fedorahosted.org]) + +AC_INIT([libqb], + m4_esyscmd([build-aux/git-version-gen .tarball-version]), + [quarterback-devel@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/%%7Bname%7D-%%7Bversion%7D... +Source0: https://fedorahosted.org/releases/q/u/quarterback/%%7Bname%7D-%%7Bversion%7D...
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@nowhere.org - @version@-1.@alphatag@ +* @date@ Autotools generated version nobody@nowhere.org - @version@-1-@numcomm@.@alphatag@.@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) -
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- libqb.spec.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libqb.spec.in b/libqb.spec.in index 2b3a97c..ee2128c 100644 --- a/libqb.spec.in +++ b/libqb.spec.in @@ -11,7 +11,7 @@ Group: System Environment/Libraries URL: http://www.libqb.org Source0: https://fedorahosted.org/releases/q/u/quarterback/%%7Bname%7D-%%7Bversion%7D...
-BuildRequires: autoconf automake +BuildRequires: autoconf automake libtool doxygen
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
On Sun, Jan 09, 2011 at 08:40:49AM +0000, Dietmar Maurer wrote:
-BuildRequires: autoconf automake +BuildRequires: autoconf automake libtool doxygen
I would also add 'check' - A regression test suite does not make much sense if you do not execute the tests ;-)
Sure, I run the tests. I was just not sure that the distro's would want the overhead of running tests during the build cycle. I'll bug someone in Fedora.
-Angus
- Dietmar
quarterback-devel mailing list quarterback-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/quarterback-devel
On Mon, Jan 10, 2011 at 12:20:02PM +1100, Angus Salkeld wrote:
On Sun, Jan 09, 2011 at 08:40:49AM +0000, Dietmar Maurer wrote:
-BuildRequires: autoconf automake +BuildRequires: autoconf automake libtool doxygen
I would also add 'check' - A regression test suite does not make much sense if you do not execute the tests ;-)
Sure, I run the tests. I was just not sure that the distro's would want the overhead of running tests during the build cycle. I'll bug someone in Fedora.
I am in the process of getting liqb into Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=668243
I'll update our spec once that's done (with the check-devel and other changes).
If anyone has s390, arm, ppc or sparc hardware to debug "make check" I'de appreciate it.
Thanks -Angus
-Angus
- Dietmar
quarterback-devel mailing list quarterback-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/quarterback-devel
quarterback-devel mailing list quarterback-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/quarterback-devel
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- configure.ac | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac index c63bb92..eadd209 100644 --- a/configure.ac +++ b/configure.ac @@ -94,7 +94,6 @@ esac
# Checks for libraries. AC_CHECK_LIB([rt], [mq_open]) -AC_CHECK_LIB([dl], [dlopen]) AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([socket], [socket])
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- include/qb/qbipcc.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/qb/qbipcc.h b/include/qb/qbipcc.h index b6f94a8..64756ef 100644 --- a/include/qb/qbipcc.h +++ b/include/qb/qbipcc.h @@ -110,6 +110,7 @@ ssize_t qb_ipcc_sendv(qb_ipcc_connection_t* c, const struct iovec* iov, * @param c connection instance * @param msg_ptr pointer to a message buffer to receive into * @param msg_len the size of the buffer + * @param ms_timeout max time to wait for a response * @return (size recv'ed, -errno == error) */ ssize_t qb_ipcc_recv(qb_ipcc_connection_t* c, void *msg_ptr, @@ -123,6 +124,7 @@ ssize_t qb_ipcc_recv(qb_ipcc_connection_t* c, void *msg_ptr, * @param iov_len the number of iovecs used * @param msg_ptr pointer to a message buffer to receive into * @param msg_len the size of the buffer + * @param ms_timeout max time to wait for a response * * @see qb_ipcc_sendv() qb_ipcc_recv() */ @@ -139,6 +141,7 @@ ssize_t qb_ipcc_sendv_recv(qb_ipcc_connection_t *c, * @param msg_len the size of the buffer * @param ms_timeout time in milli seconds to wait for a message * 0 == no wait, negative == block, positive == wait X ms. + * @param ms_timeout max time to wait for a response * @return size of the message or error (-errno) */ ssize_t qb_ipcc_event_recv(qb_ipcc_connection_t* c, void *msg_ptr,
Signed-off-by: Angus Salkeld asalkeld@redhat.com --- lib/loop_poll.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/lib/loop_poll.c b/lib/loop_poll.c index 653c6af..5f1ed95 100644 --- a/lib/loop_poll.c +++ b/lib/loop_poll.c @@ -641,10 +641,16 @@ int32_t qb_loop_poll_del(struct qb_loop *l, int32_t fd) static int32_t _qb_timer_add_to_jobs_(struct qb_loop* l, struct qb_poll_entry* pe) { uint64_t expired = 0; + ssize_t bytes = 0;
assert(pe->type == QB_TIMER); if (pe->ufd.revents == POLLIN) { - (void)read(pe->ufd.fd, &expired, sizeof(expired)); + bytes = read(pe->ufd.fd, &expired, sizeof(expired)); + if (bytes != sizeof(expired)) { + qb_util_log(LOG_WARNING, + "couldn't read from timer fd %zd %s", + bytes, strerror(errno)); + } qb_loop_level_item_add(&l->level[pe->p], &pe->item); } else { qb_util_log(LOG_ERR, "timer revents: %d expected %d",
quarterback-devel@lists.fedorahosted.org