mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-23 22:52:23 +00:00
Merge pull request #21 from conserver/configure-manage-version
Drive all version information from version.h
This commit is contained in:
commit
a8cff43007
@ -29,7 +29,7 @@ AH_TEMPLATE([REQ_SERVER_CERT], [Defined if client requires server SSL certificat
|
||||
AH_TEMPLATE([TRUST_UDS_CRED], [Defined if we trust credentials from UDS client])
|
||||
|
||||
dnl ### Normal initialization. ######################################
|
||||
AC_INIT
|
||||
AC_INIT([conserver],m4_esyscmd_s([./package/get-version number]))
|
||||
AC_PREREQ(2.59)
|
||||
AC_CONFIG_SRCDIR([conserver/main.c])
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
@ -43,6 +43,9 @@ fi
|
||||
MKDIR="mkdir -p -m 755"
|
||||
AC_SUBST(MKDIR)
|
||||
|
||||
AC_SUBST(CONSERVER_VERSION, m4_esyscmd_s([./package/get-version number]))
|
||||
AC_SUBST(CONSERVER_DATE, m4_esyscmd_s([./package/get-version date]))
|
||||
|
||||
|
||||
dnl ### Custom settings. ############################################
|
||||
dnl AC_MSG_CHECKING(whether to allow 64bit compilation)
|
||||
@ -844,6 +847,7 @@ AC_CHECK_FUNCS(getaudit getaudit_addr)
|
||||
dnl ### Create output files. #######################################
|
||||
AC_CONFIG_FILES([Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile contrib/chat/Makefile])
|
||||
AC_CONFIG_FILES([conserver/conserver.rc], [chmod +x conserver/conserver.rc])
|
||||
AC_CONFIG_FILES([conserver.cf/conserver.cf.man conserver.cf/conserver.passwd.man conserver/conserver.man console/console.man])
|
||||
AC_OUTPUT
|
||||
|
||||
[
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH CONSERVER.CF 5 "2019/03/17" "conserver-8.2.3" "conserver"
|
||||
.TH CONSERVER.CF 5 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
||||
.SH NAME
|
||||
conserver.cf \- console configuration file for
|
||||
.BR conserver (8)
|
@ -1,4 +1,4 @@
|
||||
.TH CONSERVER.PASSWD 5 "2019/03/17" "conserver-8.2.3" "conserver"
|
||||
.TH CONSERVER.PASSWD 5 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
||||
.SH NAME
|
||||
conserver.passwd \- user access information for
|
||||
.BR conserver (8)
|
@ -1,4 +1,4 @@
|
||||
.TH CONSERVER 8 "2019/03/17" "conserver-8.2.3" "conserver"
|
||||
.TH CONSERVER 8 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
||||
.SH NAME
|
||||
conserver \- console server daemon
|
||||
.SH SYNOPSIS
|
@ -12,6 +12,7 @@
|
||||
@(#) Copyright 2000 conserver.com.\n\
|
||||
All rights reserved.\n"
|
||||
|
||||
#define VERSION_DATE "2019/03/17"
|
||||
#define VERSION_MAJOR 8
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_REV 3
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH CONSOLE 1 "2019/03/17" "conserver-8.2.3" "conserver"
|
||||
.TH CONSOLE 1 "@CONSERVER_DATE@" "conserver-@CONSERVER_VERSION@" "conserver"
|
||||
.SH NAME
|
||||
console \- console server client program
|
||||
.SH SYNOPSIS
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
%define pkg conserver
|
||||
%define ver 8.2.3
|
||||
%define ver
|
||||
|
||||
# define the name of the machine on which the main conserver
|
||||
# daemon will be running if you don't want to use the default
|
||||
|
@ -1,7 +1,7 @@
|
||||
PKG="conserver"
|
||||
NAME="Console server and client"
|
||||
CATEGORY="system"
|
||||
VERSION="8.2.3"
|
||||
VERSION=
|
||||
DESC="Console server and client"
|
||||
CLASSES=none
|
||||
ARCH=sparc
|
||||
|
@ -1,10 +1,9 @@
|
||||
Creating a new release
|
||||
----------------------
|
||||
|
||||
- Create a new release branch `git checkout -b release-v...`
|
||||
- Update `CHANGES` with output of `./package/create-changes v-xx..`
|
||||
- Create a new release branch `git checkout -b release-vx.y.z`
|
||||
- Edit `conserver/version.h`
|
||||
- Run `./package/replicate-version-number`
|
||||
- Update `CHANGES` with output of `./package/create-changes vx.y.z..`
|
||||
- Double-check and merge release branch
|
||||
- Run `./package/make-and-stage-release` to create distribution, pgp sign, tag release, and push to github
|
||||
|
||||
|
@ -4,10 +4,7 @@ set -e
|
||||
|
||||
[ -z "$1" ] && echo "Usage: $0 tag" && exit 1
|
||||
range="$1"
|
||||
maj=`grep MAJOR conserver/version.h | awk '{print $NF; exit}'`
|
||||
min=`grep MINOR conserver/version.h | awk '{print $NF; exit}'`
|
||||
rev=`grep REV conserver/version.h | awk '{print $NF; exit}'`
|
||||
ver="$maj.$min.$rev"
|
||||
|
||||
echo "version $ver (`date '+%B %-d, %Y'`):"
|
||||
git log --no-merges --pretty=tformat:' - %s (%an <%ae>)' "$range" | tail -r | awk '{if (! l[$0]) {l[$0]++; print}}'
|
||||
date=`./package/get-version date`
|
||||
changedate=`date -j -f '%Y/%m/%d' "$date" '+%B %-d, %Y'`
|
||||
echo "version `./package/get-version number` ($changedate):"
|
||||
git log --no-merges --pretty=tformat:' - %s (%an <%ae>)' "$range" | tail -r | awk '{if (! l[$0]) {l[$0]++; print}}' | sed -e 's/(Bryan Stansell <bryan@conserver.com>)$//'
|
||||
|
22
package/get-version
Executable file
22
package/get-version
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# awk gets stdin from /dev/null 'cause when autoconf runs this via m4_esyscmd_s,
|
||||
# stdin is closed and awk assumes there will always be an open stdin and you end
|
||||
# up with a bogus message:
|
||||
#
|
||||
# awk: i/o error occurred while closing /dev/stdin
|
||||
# input record number 20, file conserver/version.h
|
||||
# source line number 1
|
||||
#
|
||||
#
|
||||
case "$1" in
|
||||
number)
|
||||
awk '$2=="VERSION_MAJOR"{maj=$NF} $2=="VERSION_MINOR"{min=$NF} $2=="VERSION_REV"{rev=$NF} END{print maj "." min "." rev}' conserver/version.h < /dev/null
|
||||
;;
|
||||
|
||||
date)
|
||||
awk '$2=="VERSION_DATE"{print $NF}' conserver/version.h < /dev/null | tr -d '"'
|
||||
;;
|
||||
esac
|
@ -5,10 +5,8 @@ set -e
|
||||
local=false && [ "$1" = "local" ] && local=true
|
||||
|
||||
[ -f conserver/version.h ] || { echo "you are in the wrong place" ; exit 1; }
|
||||
maj=`grep MAJOR conserver/version.h | awk '{print $NF; exit}'`
|
||||
min=`grep MINOR conserver/version.h | awk '{print $NF; exit}'`
|
||||
rev=`grep REV conserver/version.h | awk '{print $NF; exit}'`
|
||||
ver="$maj.$min.$rev"
|
||||
|
||||
ver=`./package/get-version number`
|
||||
if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
||||
(
|
||||
[ -d build ] && rm -rf build
|
||||
@ -17,6 +15,8 @@ if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
||||
cd build/conserver-$ver
|
||||
../../package/setup-configure
|
||||
rm -rf package
|
||||
sed -i "" -e "/^%define ver/s| ver.*| ver $ver|" contrib/redhat-rpm/conserver.spec
|
||||
sed -i "" -e "/^VERSION=/s|.*|VERSION=\"$ver\"|" contrib/solaris-package/pkginfo
|
||||
)
|
||||
$local && exit
|
||||
echo "Creating ../conserver-$ver.tar.gz"
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
maj=`grep MAJOR conserver/version.h | awk '{print $NF; exit}'`
|
||||
min=`grep MINOR conserver/version.h | awk '{print $NF; exit}'`
|
||||
rev=`grep REV conserver/version.h | awk '{print $NF; exit}'`
|
||||
ver="$maj.$min.$rev"
|
||||
date=`grep '^version' CHANGES | head -1 | sed -e 's/.*(\(.*\)).*/\1/'`
|
||||
mandate=`date -j -f '%b %d, %Y' "$date" "+%Y/%m/%d"`
|
||||
|
||||
for i in c*/*.man; do
|
||||
sed -i "" -e "/^\.TH /s|\".*|\"$mandate\" \"conserver-$ver\" \"conserver\"|" "$i"
|
||||
done
|
||||
|
||||
sed -i "" -e "/^%define ver/s| ver .*| ver $ver|" contrib/redhat-rpm/conserver.spec
|
||||
sed -i "" -e "/^VERSION=/s|.*|VERSION=\"$ver\"|" contrib/solaris-package/pkginfo
|
@ -5,4 +5,14 @@ set -e
|
||||
curl -s -o config.guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess'
|
||||
curl -s -o config.sub 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub'
|
||||
|
||||
autoreconf
|
||||
# We set lang to avoid this with the gcc docker image on cirrus:
|
||||
#
|
||||
# ./package/setup-configure
|
||||
# perl: warning: Setting locale failed.
|
||||
# perl: warning: Please check that your locale settings:
|
||||
# LANGUAGE = (unset),
|
||||
# LC_ALL = (unset),
|
||||
# LANG = "en_US.UTF-8"
|
||||
# are supported and installed on your system.
|
||||
|
||||
LANG=C autoreconf
|
||||
|
Loading…
Reference in New Issue
Block a user