From e1372edb3be1d36f51d302e3a893c0603131c850d9ca10d22831dda36471d8d7 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 11 Mar 2010 14:03:14 +0000 Subject: [PATCH] cleanup OBS-URL: https://build.opensuse.org/package/show/network/freeradius-server?expand=0&rev=16 --- freeradius-server-2.1.6-ltdl.patch | 57 ------------------------------ freeradius-server.changes | 7 ++++ freeradius-server.spec | 40 ++++++++++++++------- 3 files changed, 35 insertions(+), 69 deletions(-) delete mode 100644 freeradius-server-2.1.6-ltdl.patch diff --git a/freeradius-server-2.1.6-ltdl.patch b/freeradius-server-2.1.6-ltdl.patch deleted file mode 100644 index a297730..0000000 --- a/freeradius-server-2.1.6-ltdl.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- - src/main/modules.c | 6 +++++- - src/modules/rlm_eap/eap.c | 6 +++++- - src/modules/rlm_sql/rlm_sql.c | 6 +++++- - 3 files changed, 15 insertions(+), 3 deletions(-) - -Index: src/main/modules.c -=================================================================== ---- src/main/modules.c.orig 2009-12-30 16:44:35.000000000 +0100 -+++ src/main/modules.c 2010-03-09 15:59:29.000000000 +0100 -@@ -436,7 +436,11 @@ static module_entry_t *linkto_module(con - /* - * Keep the handle around so we can dlclose() it. - */ -- handle = fr_dlopenext(module_name); -+ char *tmp = malloc(strlen(module_name) + 4); -+ strcpy(tmp, module_name); -+ strcat(tmp, ".so"); -+ handle = fr_dlopenext(tmp); -+ free(tmp); - if (handle == NULL) { - cf_log_err(cf_sectiontoitem(cs), - "Failed to link to module '%s': %s\n", -Index: src/modules/rlm_eap/eap.c -=================================================================== ---- src/modules/rlm_eap/eap.c.orig 2009-12-30 16:44:35.000000000 +0100 -+++ src/modules/rlm_eap/eap.c 2010-03-09 15:42:08.000000000 +0100 -@@ -83,7 +83,11 @@ int eaptype_load(EAP_TYPES **type, int e - snprintf(buffer, sizeof(buffer), "rlm_eap_%s", eaptype_name); - - /* Link the loaded EAP-Type */ -- handle = lt_dlopenext(buffer); -+ char *tmp = malloc(strlen(buffer) + 4); -+ strcpy(tmp, buffer); -+ strcat(tmp, ".so"); -+ handle = lt_dlopenext(tmp); -+ free(tmp); - if (handle == NULL) { - radlog(L_ERR, "rlm_eap: Failed to link EAP-Type/%s: %s", - eaptype_name, lt_dlerror()); -Index: src/modules/rlm_sql/rlm_sql.c -=================================================================== ---- src/modules/rlm_sql/rlm_sql.c.orig 2009-12-30 16:44:35.000000000 +0100 -+++ src/modules/rlm_sql/rlm_sql.c 2010-03-09 15:42:08.000000000 +0100 -@@ -904,7 +904,11 @@ static int rlm_sql_instantiate(CONF_SECT - return -1; - } - -- inst->handle = lt_dlopenext(inst->config->sql_driver); -+ char *tmp = malloc(strlen(inst->config->sql_driver) + 4); -+ strcpy(tmp, inst->config->sql_driver); -+ strcat(tmp, ".so"); -+ inst->handle = lt_dlopenext(tmp); -+ free(tmp); - if (inst->handle == NULL) { - radlog(L_ERR, "Could not link driver %s: %s", - inst->config->sql_driver, diff --git a/freeradius-server.changes b/freeradius-server.changes index c526b93..6b1c570 100644 --- a/freeradius-server.changes +++ b/freeradius-server.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 11 12:44:18 UTC 2010 - puzel@novell.com + +- drop freeradius-server-2.1.6-ltdl.patch - not needed anymore +- clean up specfile +- remove bind-libs, zlib-devel from BuildRequires - not needed + ------------------------------------------------------------------- Tue Mar 9 15:01:46 UTC 2010 - puzel@novell.com diff --git a/freeradius-server.spec b/freeradius-server.spec index 3c32193..af8bcd6 100644 --- a/freeradius-server.spec +++ b/freeradius-server.spec @@ -29,7 +29,6 @@ Conflicts: radiusd-livingston radiusd-cistron icradius Url: http://www.freeradius.org/ Summary: Very Highly Configurable Radius Server Source: %{name}-%{version}.tar.bz2 -Patch0: %{name}-2.1.6-ltdl.patch Patch1: %{name}-2.1.6-dialup_admin.patch Patch2: %{name}-2.1.6-rcradiusd.patch Patch3: %{name}-2.1.6-codecleanup.patch @@ -46,10 +45,32 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: %{name}-libs = %{version} Requires: python Recommends: logrotate -BuildRequires: db-devel e2fsprogs-devel gcc-c++ gdbm-devel gettext-devel glibc-devel libtool ncurses-devel -BuildRequires: libpcap-devel net-snmp-devel openldap2-devel openssl-devel pam-devel perl postgresql-devel -BuildRequires: python-devel sed sqlite3-devel unixODBC-devel zlib-devel -BuildRequires: apache2-devel bind-libs cyrus-sasl-devel krb5-devel libapr1-devel libcom_err libmysqlclient-devel +BuildRequires: apache2-devel +#BuildRequires: bind-libs +BuildRequires: cyrus-sasl-devel +BuildRequires: db-devel +BuildRequires: gcc-c++ +BuildRequires: gdbm-devel +BuildRequires: gettext-devel +BuildRequires: glibc-devel +BuildRequires: krb5-devel +BuildRequires: libapr1-devel +BuildRequires: libcom_err +BuildRequires: libmysqlclient-devel +BuildRequires: libpcap-devel +BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: net-snmp-devel +BuildRequires: openldap2-devel +BuildRequires: openssl-devel +BuildRequires: pam-devel +BuildRequires: perl +BuildRequires: postgresql-devel +BuildRequires: python-devel +BuildRequires: sed +BuildRequires: sqlite3-devel +BuildRequires: unixODBC-devel +#BuildRequires: zlib-devel %description The FreeRADIUS server has a number of features found in other servers @@ -209,7 +230,6 @@ Authors: %prep %setup -q -%patch0 %patch1 %patch2 %patch3 @@ -222,13 +242,13 @@ Authors: # This package failed when testing with -Wl,-as-needed being default. # So we disable it here, if you want to retest, just delete this comment and the line below. export SUSE_ASNEEDED=0 -#export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DLDAP_DEPRECATED -fPIC -DPIC" export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED -fstack-protector" %ifarch x86_64 ppc ppc64 s390 s390x export CFLAGS="$CFLAGS -fPIC -DPIC" %endif export LDFLAGS="-pie" -%configure --disable-static --with-pic\ +%configure \ + --disable-static --with-pic\ --libdir=%{_libdir}/freeradius \ --disable-ltdl-install \ --enable-strict-dependencies \ @@ -327,9 +347,6 @@ rm -rf $RPM_BUILD_ROOT # doc %doc suse/README.SuSE %doc COPYRIGHT CREDITS LICENSE README doc/ChangeLog -#%doc scripts/create-users.pl scripts/CA.* scripts/certs.sh -#%doc scripts/users2mysql.pl scripts/xpextensions -#%doc scripts/cryptpasswd scripts/exec-program-wait scripts/radiusd2ldif.pl # SuSE %{_sysconfdir}/init.d/freeradius %{_sysconfdir}/init.d/freeradius-relay @@ -445,7 +462,6 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -#%attr(644,root,root) %{_libdir}/freeradius/*.la %dir %attr(755,root,root) %{_includedir}/freeradius %attr(644,root,root) %{_includedir}/freeradius/*.h