radiusclient/radiusclient.patch

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
parent 13
cb59d6afeb61
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

     1 Index: configure
     2 --- configure.orig	2007-02-05 13:53:08 +0100
     3 +++ configure	2007-02-05 17:15:19 +0100
     4 @@ -2580,7 +2580,7 @@
     5  LIBVERSION=2:0:0
     8 -pkgsysconfdir=${sysconfdir}/$PACKAGE
     9 +pkgsysconfdir=${sysconfdir}
    12  # Check whether --enable-shared was given.
    13 Index: lib/Makefile.in
    14 --- lib/Makefile.in.orig	2007-02-05 14:02:08 +0100
    15 +++ lib/Makefile.in	2007-02-05 17:17:41 +0100
    16 @@ -204,7 +204,7 @@
    17  AUTOMAKE_OPTIONS = foreign
    18  INCLUDES = -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir)
    19  CLEANFILES = *~
    20 -lib_LTLIBRARIES = libradiusclient-ng.la
    21 +lib_LTLIBRARIES = libradiusclient.la
    22  libradiusclient_ng_la_SOURCES = buildreq.c clientid.c env.c sendserver.c \
    23  	avpair.c config.c dict.c ip_util.c log.c md5.c util.c lock.c \
    24  	options.h md5.h
    25 @@ -270,7 +270,7 @@
    26  	  echo "rm -f \"$${dir}/so_locations\""; \
    27  	  rm -f "$${dir}/so_locations"; \
    28  	done
    29 -libradiusclient-ng.la: $(libradiusclient_ng_la_OBJECTS) $(libradiusclient_ng_la_DEPENDENCIES) 
    30 +libradiusclient.la: $(libradiusclient_ng_la_OBJECTS) $(libradiusclient_ng_la_DEPENDENCIES) 
    31  	$(libradiusclient_ng_la_LINK) -rpath $(libdir) $(libradiusclient_ng_la_OBJECTS) $(libradiusclient_ng_la_LIBADD) $(LIBS)
    33  mostlyclean-compile:
    34 Index: src/Makefile.in
    35 --- src/Makefile.in.orig	2007-02-05 14:02:08 +0100
    36 +++ src/Makefile.in	2007-02-05 17:18:08 +0100
    37 @@ -62,24 +62,24 @@
    38  am_radacct_OBJECTS = radacct.$(OBJEXT)
    39  radacct_OBJECTS = $(am_radacct_OBJECTS)
    40  radacct_LDADD = $(LDADD)
    41 -radacct_DEPENDENCIES = ../lib/libradiusclient-ng.la
    42 +radacct_DEPENDENCIES = ../lib/libradiusclient.la
    43  am_radexample_OBJECTS = radexample.$(OBJEXT)
    44  radexample_OBJECTS = $(am_radexample_OBJECTS)
    45  radexample_LDADD = $(LDADD)
    46 -radexample_DEPENDENCIES = ../lib/libradiusclient-ng.la
    47 +radexample_DEPENDENCIES = ../lib/libradiusclient.la
    48  am_radiusclient_OBJECTS = radiusclient.$(OBJEXT)
    49  radiusclient_OBJECTS = $(am_radiusclient_OBJECTS)
    50  radiusclient_LDADD = $(LDADD)
    51 -radiusclient_DEPENDENCIES = ../lib/libradiusclient-ng.la
    52 +radiusclient_DEPENDENCIES = ../lib/libradiusclient.la
    53  am_radlogin_OBJECTS = radlogin.$(OBJEXT) radius.$(OBJEXT) \
    54  	local.$(OBJEXT)
    55  radlogin_OBJECTS = $(am_radlogin_OBJECTS)
    56  radlogin_LDADD = $(LDADD)
    57 -radlogin_DEPENDENCIES = ../lib/libradiusclient-ng.la
    58 +radlogin_DEPENDENCIES = ../lib/libradiusclient.la
    59  am_radstatus_OBJECTS = radstatus.$(OBJEXT)
    60  radstatus_OBJECTS = $(am_radstatus_OBJECTS)
    61  radstatus_LDADD = $(LDADD)
    62 -radstatus_DEPENDENCIES = ../lib/libradiusclient-ng.la
    63 +radstatus_DEPENDENCIES = ../lib/libradiusclient.la
    64  DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
    65  depcomp = $(SHELL) $(top_srcdir)/depcomp
    66  am__depfiles_maybe = depfiles
    67 @@ -221,7 +221,7 @@
    68  top_srcdir = @top_srcdir@
    69  AUTOMAKE_OPTIONS = foreign
    70  INCLUDES = -I$(srcdir) -I$(top_srcdir)/include -I$(top_builddir)
    71 -LDADD = ../lib/libradiusclient-ng.la
    72 +LDADD = ../lib/libradiusclient.la
    73  CLEANFILES = *~
    74  noinst_HEADERS = radlogin.h
    75  radlogin_SOURCES = radlogin.c radius.c local.c
    76 Index: etc/Makefile.in
    77 --- etc/Makefile.in.orig	2008-02-24 01:04:31.031421286 +0100
    78 +++ etc/Makefile.in	2008-02-24 01:04:38.951886176 +0100
    79 @@ -382,6 +382,7 @@
    80  radiusclient.conf: radiusclient.conf.in
    81  	sed -e 's|@sbin''dir@|$(sbindir)|g' \
    82  	    -e 's|@pkgsysconf''dir@|$(pkgsysconfdir)|g' \
    83 +	    -e 's|@localstate''dir@|$(localstatedir)/radiusclient|g' \
    84  	    <$(srcdir)/radiusclient.conf.in >radiusclient.conf
    86  install-data-local: servers
    87 Index: etc/radiusclient.conf.in
    88 --- etc/radiusclient.conf.in.orig	2008-02-24 00:54:01.643791239 +0100
    89 +++ etc/radiusclient.conf.in	2008-02-24 00:55:07.378684108 +0100
    90 @@ -54,7 +54,7 @@
    92  # file which holds sequence number for communication with the
    93  # RADIUS server
    94 -seqfile		/var/run/radius.seq
    95 +seqfile		@localstatedir@/radius.seq
    97  # file which specifies mapping between ttyname and NAS-Port attribute
    98  mapfile		@pkgsysconfdir@/port-id-map

mercurial