mirror of
https://github.com/bstansell/conserver.git
synced 2024-12-24 15:06:42 +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])
|
AH_TEMPLATE([TRUST_UDS_CRED], [Defined if we trust credentials from UDS client])
|
||||||
|
|
||||||
dnl ### Normal initialization. ######################################
|
dnl ### Normal initialization. ######################################
|
||||||
AC_INIT
|
AC_INIT([conserver],m4_esyscmd_s([./package/get-version number]))
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_CONFIG_SRCDIR([conserver/main.c])
|
AC_CONFIG_SRCDIR([conserver/main.c])
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
@ -43,6 +43,9 @@ fi
|
|||||||
MKDIR="mkdir -p -m 755"
|
MKDIR="mkdir -p -m 755"
|
||||||
AC_SUBST(MKDIR)
|
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 ### Custom settings. ############################################
|
||||||
dnl AC_MSG_CHECKING(whether to allow 64bit compilation)
|
dnl AC_MSG_CHECKING(whether to allow 64bit compilation)
|
||||||
@ -844,6 +847,7 @@ AC_CHECK_FUNCS(getaudit getaudit_addr)
|
|||||||
dnl ### Create output files. #######################################
|
dnl ### Create output files. #######################################
|
||||||
AC_CONFIG_FILES([Makefile conserver/Makefile conserver.cf/Makefile console/Makefile autologin/Makefile contrib/chat/Makefile])
|
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/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
|
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
|
.SH NAME
|
||||||
conserver.cf \- console configuration file for
|
conserver.cf \- console configuration file for
|
||||||
.BR conserver (8)
|
.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
|
.SH NAME
|
||||||
conserver.passwd \- user access information for
|
conserver.passwd \- user access information for
|
||||||
.BR conserver (8)
|
.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
|
.SH NAME
|
||||||
conserver \- console server daemon
|
conserver \- console server daemon
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
@ -12,6 +12,7 @@
|
|||||||
@(#) Copyright 2000 conserver.com.\n\
|
@(#) Copyright 2000 conserver.com.\n\
|
||||||
All rights reserved.\n"
|
All rights reserved.\n"
|
||||||
|
|
||||||
|
#define VERSION_DATE "2019/03/17"
|
||||||
#define VERSION_MAJOR 8
|
#define VERSION_MAJOR 8
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_REV 3
|
#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
|
.SH NAME
|
||||||
console \- console server client program
|
console \- console server client program
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
%define pkg conserver
|
%define pkg conserver
|
||||||
%define ver 8.2.3
|
%define ver
|
||||||
|
|
||||||
# define the name of the machine on which the main conserver
|
# define the name of the machine on which the main conserver
|
||||||
# daemon will be running if you don't want to use the default
|
# daemon will be running if you don't want to use the default
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
PKG="conserver"
|
PKG="conserver"
|
||||||
NAME="Console server and client"
|
NAME="Console server and client"
|
||||||
CATEGORY="system"
|
CATEGORY="system"
|
||||||
VERSION="8.2.3"
|
VERSION=
|
||||||
DESC="Console server and client"
|
DESC="Console server and client"
|
||||||
CLASSES=none
|
CLASSES=none
|
||||||
ARCH=sparc
|
ARCH=sparc
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
Creating a new release
|
Creating a new release
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
- Create a new release branch `git checkout -b release-v...`
|
- Create a new release branch `git checkout -b release-vx.y.z`
|
||||||
- Update `CHANGES` with output of `./package/create-changes v-xx..`
|
|
||||||
- Edit `conserver/version.h`
|
- 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
|
- Double-check and merge release branch
|
||||||
- Run `./package/make-and-stage-release` to create distribution, pgp sign, tag release, and push to github
|
- 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
|
[ -z "$1" ] && echo "Usage: $0 tag" && exit 1
|
||||||
range="$1"
|
range="$1"
|
||||||
maj=`grep MAJOR conserver/version.h | awk '{print $NF; exit}'`
|
date=`./package/get-version date`
|
||||||
min=`grep MINOR conserver/version.h | awk '{print $NF; exit}'`
|
changedate=`date -j -f '%Y/%m/%d' "$date" '+%B %-d, %Y'`
|
||||||
rev=`grep REV conserver/version.h | awk '{print $NF; exit}'`
|
echo "version `./package/get-version number` ($changedate):"
|
||||||
ver="$maj.$min.$rev"
|
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>)$//'
|
||||||
|
|
||||||
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}}'
|
|
||||||
|
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
|
local=false && [ "$1" = "local" ] && local=true
|
||||||
|
|
||||||
[ -f conserver/version.h ] || { echo "you are in the wrong place" ; exit 1; }
|
[ -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}'`
|
ver=`./package/get-version number`
|
||||||
rev=`grep REV conserver/version.h | awk '{print $NF; exit}'`
|
|
||||||
ver="$maj.$min.$rev"
|
|
||||||
if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
||||||
(
|
(
|
||||||
[ -d build ] && rm -rf build
|
[ -d build ] && rm -rf build
|
||||||
@ -17,6 +15,8 @@ if [ ! -f ../conserver-$ver.tar.gz ] || $local; then
|
|||||||
cd build/conserver-$ver
|
cd build/conserver-$ver
|
||||||
../../package/setup-configure
|
../../package/setup-configure
|
||||||
rm -rf package
|
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
|
$local && exit
|
||||||
echo "Creating ../conserver-$ver.tar.gz"
|
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.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'
|
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