[Pkg-privacy-commits] [onioncat] 110/241: svnversion included into PACKAGE_STRING
Intrigeri
intrigeri at moszumanska.debian.org
Wed Aug 26 16:16:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to branch upstream-master
in repository onioncat.
commit aeedee11ed0ea64b36970d21195f5303c741f5fd
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date: Wed Jan 7 23:22:21 2009 +0000
svnversion included into PACKAGE_STRING
git-svn-id: https://www.cypherpunk.at/svn/onioncat/trunk@421 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
config.h.in | 3 +++
configure | 26 ++++++++++++++++----------
configure.ac | 5 ++++-
src/ocat.c | 11 ++++++-----
src/ocat.h | 6 ++++++
src/ocatctrl.c | 2 +-
src/ocatsetup.c | 19 +++++++++++++++----
7 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/config.h.in b/config.h.in
index 5d2175e..874163d 100644
--- a/config.h.in
+++ b/config.h.in
@@ -147,6 +147,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* SVN Revision */
+#undef SVN_REVISION
+
/* Version number of package */
#undef VERSION
diff --git a/configure b/configure
index e47b68f..bfa47e5 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for onioncat 0.1.9.
+# Generated by GNU Autoconf 2.61 for onioncat 0.1.9-420M.
#
# Report bugs to <rahra at cypherpunk.at>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='onioncat'
PACKAGE_TARNAME='onioncat'
-PACKAGE_VERSION='0.1.9'
-PACKAGE_STRING='onioncat 0.1.9'
+PACKAGE_VERSION='0.1.9-420M'
+PACKAGE_STRING='onioncat 0.1.9-420M'
PACKAGE_BUGREPORT='rahra at cypherpunk.at'
# Factoring default headers for most tests.
@@ -1206,7 +1206,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures onioncat 0.1.9 to adapt to many kinds of systems.
+\`configure' configures onioncat 0.1.9-420M to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1272,7 +1272,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of onioncat 0.1.9:";;
+ short | recursive ) echo "Configuration of onioncat 0.1.9-420M:";;
esac
cat <<\_ACEOF
@@ -1362,7 +1362,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-onioncat configure 0.1.9
+onioncat configure 0.1.9-420M
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1376,7 +1376,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by onioncat $as_me 0.1.9, which was
+It was created by onioncat $as_me 0.1.9-420M, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2066,7 +2066,7 @@ fi
# Define the identity of the package.
PACKAGE='onioncat'
- VERSION='0.1.9'
+ VERSION='0.1.9-420M'
cat >>confdefs.h <<_ACEOF
@@ -2215,6 +2215,12 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
ac_config_headers="$ac_config_headers config.h"
+
+cat >>confdefs.h <<\_ACEOF
+#define SVN_REVISION "420M"
+_ACEOF
+
+
CFLAGS=-Wall
@@ -5294,7 +5300,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by onioncat $as_me 0.1.9, which was
+This file was extended by onioncat $as_me 0.1.9-420M, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -5347,7 +5353,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-onioncat config.status 0.1.9
+onioncat config.status 0.1.9-420M
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/configure.ac b/configure.ac
index ed7ca31..772623a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,9 +1,12 @@
AC_PREREQ(2.61)
-AC_INIT([onioncat], [0.1.9], [rahra at cypherpunk.at])
+define([svnversion], esyscmd([sh -c "svnversion | tr -d '\n'"]))dnl
+AC_INIT([onioncat], [0.1.9-svnversion], [rahra at cypherpunk.at])
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_HEADERS([config.h])
+AC_DEFINE(SVN_REVISION, "svnversion", [SVN Revision])
+
AC_SUBST([CFLAGS], [-Wall])
AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [enable debugging]), AC_DEFINE([DEBUG], [], [enable debugging]))
diff --git a/src/ocat.c b/src/ocat.c
index c2aa07d..2acccb8 100644
--- a/src/ocat.c
+++ b/src/ocat.c
@@ -22,7 +22,7 @@
void usage(const char *s)
{
fprintf(stderr,
- "%s (c) Bernhard R. Fischer -- compiled %s %s\n"
+ "%s\n"
"usage: %s [OPTIONS] <onion_hostname>\n"
" -a create connect log at \"$HOME/%s/%s\" (default = %d)\n"
" -b daemonize\n"
@@ -45,7 +45,7 @@ void usage(const char *s)
#endif
" -u <user> change UID to user, default = \"%s\"\n"
" -4 enable IPv4 support (default = %d)\n"
- , PACKAGE_STRING, __DATE__, __TIME__, s,
+ , CNF(version), s,
// option defaults start here
OCAT_DIR, OCAT_CONNECT_LOG, CNF(create_clog), CNF(debug_level), OCAT_LISTEN_PORT,
CNF(pid_file),
@@ -121,7 +121,8 @@ void background(void)
int main(int argc, char *argv[])
{
- char tunname[IFNAMSIZ] = {0}, *s, ip6addr[INET6_ADDRSTRLEN], hw[20];
+ //char tunname[IFNAMSIZ] = {0},
+ char *s, ip6addr[INET6_ADDRSTRLEN], hw[20];
int c, runasroot = 0;
struct passwd *pwd;
int urlconv = 0;
@@ -283,11 +284,11 @@ int main(int argc, char *argv[])
#ifndef WITHOUT_TUN
// create TUN device
- CNF(tunfd[0]) = CNF(tunfd[1]) = tun_alloc(tunname, CNF(ocat_addr));
+ CNF(tunfd[0]) = CNF(tunfd[1]) = tun_alloc(CNF(tunname), CNF(ocat_addr));
#endif
log_msg(LOG_INFO, "IPv6 address %s", ip6addr);
- log_msg(LOG_INFO, "TUN/TAP device %s", tunname);
+ log_msg(LOG_INFO, "TUN/TAP device %s", CNF(tunname));
if (CNF(ipv4_enable))
log_msg(LOG_INFO, "IP address %s", inet_ntoa(CNF(ocat_addr4)));
diff --git a/src/ocat.h b/src/ocat.h
index a7a12ae..9e939ae 100644
--- a/src/ocat.h
+++ b/src/ocat.h
@@ -205,6 +205,7 @@
#define SOCKADDR_SIZE(x) (x->sa_family == AF_INET ? sizeof(struct sockaddr_in) : x->sa_family == AF_INET6 ? sizeof(struct sockaddr_in6) : 0)
+#define VERSION_STRING_LEN 256
struct OcatSetup
{
@@ -233,7 +234,10 @@ struct OcatSetup
int runasroot;
int controller;
char *ocat_dir;
+ //! name of tunnel charcter device
char *tun_dev;
+ //! tunnel interface name
+ char tunname[IFNAMSIZ];
int ipv4_enable;
struct in_addr ocat_addr4;
int ocat_addr4_mask;
@@ -260,6 +264,8 @@ struct OcatSetup
//! local listening socket address for incoming connections
struct sockaddr **oc_listen;
int rand_addr;
+ char version[VERSION_STRING_LEN];
+ int sizeof_setup;
};
#ifdef PACKET_QUEUE
diff --git a/src/ocatctrl.c b/src/ocatctrl.c
index 43db30a..e0dc357 100644
--- a/src/ocatctrl.c
+++ b/src/ocatctrl.c
@@ -73,7 +73,7 @@ void *ctrl_handler(void *p)
//CNF(config_read) = 1;
}
- fprintf(fo, "%s (c) %s -- %s %s\n", PACKAGE_STRING, OCAT_AUTHOR, __DATE__, __TIME__);
+ fprintf(fo, "%s\n", CNF(version));
fprintf(fo, "*** ATTENTION! Controller interface not thread-safe yet! Usage could cause deadlocks. ***\n");
for (;;)
diff --git a/src/ocatsetup.c b/src/ocatsetup.c
index 3f36553..d7240cc 100644
--- a/src/ocatsetup.c
+++ b/src/ocatsetup.c
@@ -44,6 +44,7 @@ struct OcatSetup setup_ =
//! default debug level
LOG_DEBUG,
OCAT_UNAME, {0}, {{{0}}}, 0, 0, 1, OCAT_DIR, TUN_DEV,
+ {'\0'}, // tunname
0, TOR_PREFIX4, TOR_PREFIX4_MASK,
NULL, 1,
0, // use_tap
@@ -62,7 +63,9 @@ struct OcatSetup setup_ =
{(struct sockaddr_in*) &socks_dst6_},
oc_listen_a_,
//! rand_addr
- 0
+ 0,
+ {0},
+ sizeof(struct OcatSetup)
};
@@ -93,6 +96,8 @@ void init_setup(void)
setup_.oc_listen->sin_len = sizeof(oc_listen6_);
#endif
*/
+
+ snprintf(setup_.version, VERSION_STRING_LEN, "%s (c) %s -- compiled %s %s", PACKAGE_STRING, OCAT_AUTHOR, __DATE__, __TIME__);
}
@@ -136,6 +141,7 @@ void print_setup_struct(FILE *f)
"controller = %d\n"
"ocat_dir = \"%s\"\n"
"tun_dev = \"%s\"\n"
+ "tunname = \"%s\"\n"
"ipv4_enable = %d\n"
"ocat_addr4 = %s\n"
"ocat_addr4_mask = %s\n"
@@ -147,8 +153,10 @@ void print_setup_struct(FILE *f)
"logfn = \"%s\"\n"
"logf = %s\n"
"daemon = %d\n"
- "uptime = %d days, %d:%02d\n",
-
+ "uptime = %d days, %d:%02d\n"
+ "version[%3d+1/%3d] = \"%s\"\n"
+ "sizeof_setup = %d\n"
+ ,
IPV4_KEY, ntohl(setup_.fhd_key[IPV4_KEY]), IPV6_KEY, ntohl(setup_.fhd_key[IPV6_KEY]),
setup_.fhd_key_len,
//setup_.tor_socks_port,
@@ -165,6 +173,7 @@ void print_setup_struct(FILE *f)
setup_.controller,
setup_.ocat_dir,
setup_.tun_dev,
+ setup_.tunname,
setup_.ipv4_enable,
ip,
nm,
@@ -176,7 +185,9 @@ void print_setup_struct(FILE *f)
setup_.logfn,
logf,
setup_.daemon,
- t / (3600 * 24), t / 3600 % 24, t / 60 % 60
+ t / (3600 * 24), t / 3600 % 24, t / 60 % 60,
+ strlen(setup_.version), VERSION_STRING_LEN, setup_.version,
+ setup_.sizeof_setup
);
for (i = 0; i < ROOT_PEERS; i++)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git
More information about the Pkg-privacy-commits
mailing list