freeradius/freeradius.patch

Fri, 16 Jan 2009 10:58:21 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2009 10:58:21 +0100
changeset 92
645923d1e875
parent 47
120a0b206db9
child 306
cc6a45887422
permissions
-rw-r--r--

Correct and improve code logic, buildconf, and packaging. In particular:
1. Use descriptive variable names <var>libs instead of just <var>.
2. Although Nokia states in all Qt builds that 'NOTE: When linking
against OpenSSL, you can override the default library names
through OPENSSL_LIBS.' and even gives an example, their own
configuration logic rejects such an attempt. Correct this by
hard coding the OpenSSL library string in the configure script.
3. Consistently use the whitespace substitution [\t ] throughout.
4. Patch the buggy INCPATH of SQL plugin Qmake project files.
5. Add the 'x11' configuration variable to the qtconfig Qmake
project using the src/gui/gui.pro file as a model. This is
needed for qtconfig although not in other tools, because
the qtconfig buildconf indirectly includes qt_x11_p.h which
is dependent on X11 headers.
6. Avoid 'ld.so: fatal: hardware capability unsupported: SSE2 AMD_3DNow'
on platforms for which the config.tests/unix/[3dnow|sse2] succeed
although unsopported at run time by testing for the x86-64
instruction set at build time and regulating hardware capabilities.
7. Correctly install the desinger plugin by explicitly building it.
8. Remove custom plugin installation logic which is unnecessary.
9. Correct removal of temporary paths from shared object files.

     1 Index: Make.inc.in
     2 --- Make.inc.in.orig	2008-09-25 10:41:26 +0200
     3 +++ Make.inc.in	2008-09-25 17:56:09 +0200
     4 @@ -15,7 +15,7 @@
     5  docdir		= @docdir@
     6  mandir		= @mandir@
     7  datadir		= @datadir@
     8 -dictdir		= $(datadir)/freeradius
     9 +dictdir		= $(datadir)
    10  logdir		= @logdir@
    11  includedir	= @includedir@
    12  raddbdir	= @raddbdir@
    13 @@ -48,7 +48,7 @@
    15  LOGDIR		= ${logdir}
    16  RADDBDIR	= ${raddbdir}
    17 -RUNDIR		= ${localstatedir}/run/radiusd
    18 +RUNDIR		= ${localstatedir}
    19  SBINDIR		= ${sbindir}
    20  RADIR		= ${radacctdir}
    21  LIBRADIUS	= $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la
    22 Index: raddb/radiusd.conf.in
    23 --- raddb/radiusd.conf.in.orig	2008-09-25 10:41:26 +0200
    24 +++ raddb/radiusd.conf.in	2008-09-25 17:56:09 +0200
    25 @@ -66,7 +66,7 @@
    27  #  Location of config and logfiles.
    28  confdir = ${raddbdir}
    29 -run_dir = ${localstatedir}/run/radiusd
    30 +run_dir = ${localstatedir}
    32  # Should likely be ${localstatedir}/lib/radiusd
    33  db_dir = ${raddbdir}
    34 Index: src/modules/rlm_sql/drivers/Makefile.in
    35 --- src/modules/rlm_sql/drivers/Makefile.in.orig	2008-09-25 10:41:26 +0200
    36 +++ src/modules/rlm_sql/drivers/Makefile.in	2008-09-25 17:56:09 +0200
    37 @@ -16,7 +16,7 @@
    39  common:
    40  	@[ -d lib/ ] || mkdir lib
    41 -	@for mod in $(SQL_MODULES); do \
    42 +	@for mod in $(SQL_MODULES) NOOP; do \
    43  		echo "Making $(WHAT_TO_MAKE) in $$mod..."; \
    44 -		$(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \
    45 +		[ -d $$mod ] || exit 0; $(MAKE) $(MFLAGS) -C $$mod $(WHAT_TO_MAKE) || exit $$?; \
    46  	done
    47 Index: src/main/command.c
    48 --- src/main/command.c.orig	2009-01-08 19:39:52.565611820 +0100
    49 +++ src/main/command.c	2009-01-08 19:40:18.333372190 +0100
    50 @@ -148,7 +148,7 @@
    51          salocal.sun_family = AF_UNIX;
    52  	memcpy(salocal.sun_path, path, len + 1); /* SUN_LEN does strlen */
    54 -	socklen = SUN_LEN(&salocal);
    55 +	socklen = sizeof(salocal) - sizeof(salocal.sun_path) + strlen(salocal.sun_path);
    57  	/*
    58  	 *	Check the path.
    59 Index: src/main/radmin.c
    60 --- src/main/radmin.c.orig	2009-01-08 19:36:15.333428110 +0100
    61 +++ src/main/radmin.c	2009-01-08 19:39:15.131776575 +0100
    62 @@ -112,7 +112,7 @@
    63          saremote.sun_family = AF_UNIX;
    64  	memcpy(saremote.sun_path, path, len + 1); /* SUN_LEN does strlen */
    66 -	socklen = SUN_LEN(&saremote);
    67 +	socklen = sizeof(saremote) - sizeof(saremote.sun_path) + strlen(saremote.sun_path);
    69          if (connect(sockfd, (struct sockaddr *)&saremote, socklen) < 0) {
    70  		fprintf(stderr, "%s: Failed connecting to %s: %s\n",

mercurial