[Comm] Пересборка freeradius c freenibs

Serge =?iso-8859-1?q?skompan_=CE=C1_kspu=2Ekr=2Eua?=
Вт Окт 2 11:35:31 MSD 2007


Здравствуйте!
пытаюсь пересобрать пакет freeradius, предварительно в ключив в 
spec файле %with freenibs.
пакет беру 
lftp ftp.linux.kiev.ua:~> cd pub/Linux/ALT/4.0/branch/x86_64/SRPMS.classic/
cd ok, cwd=/pub/Linux/ALT/4.0/branch/x86_64/SRPMS.classic
переделал немного spec файл (убрал %if_
Ошибка:
configure: creating ./config.status
config.status: creating Makefile
=== configuring in src/modules/rlm_nibs 
(/usr/src/RPM/BUILD/freeradius-1.1.7/src/modules/rlm_nibs)
configure: running /bin/sh ./configure '--prefix=/usr'  
'--build=x86_64-alt-linux' '--host=x86_64-alt-linux' '--exec-prefix=/usr' 
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' 
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' 
'--libexecdir=/usr/lib' '--localstatedir=/var/lib' 
'--sharedstatedir=/usr/com' '--infodir=/usr/share/info' 
'--disable-dependency-tracking' '--without-included-gettext' 
'--disable-static' '--with-gnu-ld' '--localstatedir=/var' 
'--libdir=/usr/lib64/freeradius' '--includedir=/usr/include/freeradius' 
'--with-logdir=/var/log/freeradius' '--mandir=/usr/share/man' 
'--disable-ltdl-install' '--with-openssl-includes=/usr/include/openssl' 
'--with-openssl-libraries=/usr/lib64' '--with-rlm-krb5-lib-dir=/usr/lib64' 
'--with-rlm-krb5-include-dir=/usr/include/krb5' 
'--with-rlm-dbm-include-dir=/usr/include' 
'--with-ltdl-include-dir=/usr/include' '--with-ltdl-lib=/usr/lib64' 
'--with-static-modules=' '--with-large-files' '--with-rlm_sql_postgresql=yes' 
'--with-experimental-modules' '--with-rlm_perl=yes' 
'build_alias=x86_64-alt-linux' 'host_alias=x86_64-alt-linux' 'CC=gcc' 
'CFLAGS=-pipe -Wall -O2' 'CXXFLAGS=-pipe -Wall -O2' 'FFLAGS=-pipe -Wall -O2' 
'--enable-ltdl-install=no' --cache-file=/dev/null --srcdir=.
configure: warning: build_alias=x86_64-alt-linux: invalid host type
configure: warning: host_alias=x86_64-alt-linux: invalid host type
configure: error: can only configure for one host and one target at a time
configure: error: ./configure failed for src/modules/rlm_nibs
error: Bad exit status from /usr/src/tmp/rpm-tmp.33103 (%build)


RPM build errors:
    Bad exit status from /usr/src/tmp/rpm-tmp.33103 (%build)
Command exited with non-zero status 1
21.58user 23.78system 0:55.52elapsed 81%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+4856598minor)pagefaults 0swaps
hsh-rebuild: rebuild of `freeradius-1.1.7-alt0.M40.1.src.rpm' failed.

прилагаю spec файл



----------- следующая часть -----------
%undefine __libtoolize
%define __nprocs 1

# nibs
%define nibs_version 3.0.0-b3
%define dist_tag %(cut -d" " -f3 < /etc/altlinux-release)
#%%define nibs_suffix bf3_freeradius-1.0.1

#%def_with pgsql

#%def_with freenibs

%if "%dist_tag" == "Sisyphus"
%set_verify_elf_method unresolved=relaxed
%endif

Name: freeradius
Version: 1.1.7
Release: alt0.M40.1

Summary: FreeRADIUS server - GPLed RADIUS server
Summary(ru_RU.KOI8-R): FreeRADIUS - GPL реализация RADIUS сервера

License: GPL
Group: System/Servers
Url: http://www.freeradius.org

# ftp://ftp.freeradius.org/pub/radius/%name-%version.tar.gz
Source0: %name-%version.tar
Source1: %name.logrotate
Source2: %name.init
Source3: %name.sysconfig
# http://heanet.dl.sourceforge.net/sourceforge/freesnibs/freenibs-%nibs_version.tar.gz
Source4: freenibs.tar

Patch0: %name-%version-%release.patch

%def_disable static

%add_findprov_lib_path %_libdir/%name

Packager: FreeRadius Development Team <freeradius на packages.altlinux.org>

BuildRequires: libMySQL-devel libgdbm-devel libkrb5-devel libldap-devel
BuildRequires: libpam-devel libssl-devel libltdl-devel
BuildRequires: openldap-clients perl-devel perl-Net-SNMP perl-DBI
BuildRequires: python-base python-dev python-modules-encodings zlib-devel

%if_with pgsql
BuildRequires: postgresql-devel libpq-devel
%endif

%description
The FreeRADIUS Server Project is an attempt to create a high-performance
and highly configurable GPL'd free RADIUS server.  The server is similar
to Livingston's 2.0 server.
FreeRADIUS is a variant of the Cistron RADIUS server, but they don't
share a lot in common any more.  You should use it because it has a lot
more features than Cistron and Livingston and is much more configurable.

%description -l ru_RU.KOI8-R
FreeRadius Server проект предназначен для создания высокопроизводительного
свободного RADIUS сервера с богатым спектром настроек и свойств.  Этот
сервер подобен Livingston 2.0 RADIUS серверу и является вариантом
Cistron RADIUS Server, однако он имеет большее количество свойств и гибче
в конфигурировании.

%package ldap
Summary: libraries for %name with ldap support
Group: System/Servers
Requires: %name = %version-%release

%description ldap
This package provides a support for ldap authorization in freeradius

%package mysql
Summary: libraries for %name with MySQL support
Group: System/Servers
Provides: %name-sql = %version-%release
Requires: %name = %version-%release

%description mysql
This package provides a support for mysql
authetication/authorization/accounting in freeradius

%if_with pgsql
%package pgsql
Summary: libraries for %name with PostgreSQL support
Group: System/Servers
Provides: %name-sql = %version-%release
Requires: %name = %version-%release

%description pgsql
This package provides a support for Postgresql
authetication/authorization/accounting in freeradius
%endif

%package python
Summary: Python module for freeradius
Group: System/Servers
Requires: %name = %version-%release, python

%description python
This module allows to write modules in python

%package perl
Summary: perl module for freeradius
Group: System/Servers
Requires: %name = %version-%release

%description perl
This module allows to write modules in perl

%package sqlcounter
Summary: sqlcounter module for %name
Group: System/Servers
Provides: %name-sqlcounter = %version-%release
Requires: %name-sql = %version-%release

%description sqlcounter
sqlcounter is module for counting all sessions of users and disabling
account if total time of all sessions is greater than limit.

%package devel
Summary: Headers for %name
Group: Development/C
Provides: %name-devel = %version-%release

%description devel
Headers for %name

#%if_with freenibs
%package -n freenibs-%nibs_version
Summary: NIBS is Neon Internet Billing System
Group: System/Servers
URL: http://sourceforge.net/projects/nibs
Provides: %name-freenibs billing nibs

%description -n freenibs-%nibs_version
FreeNIBS is billing and accounting system for FreeRADIUS
#%endif

%prep
%setup -q
%patch0 -p1
%if_with freenibs
%setup -q -D -T -a 4
cd freenibs
sed "s/RADIUS_VERSION\t105/RADIUS_VERSION\t$(echo %version | sed 's/\.//g')/g" -i src/modules/rlm_nibs/conf.h
cd ..
cp -r freenibs/src/modules/rlm_nibs src/modules
echo "rlm_nibs" >> src/modules/stable
%endif

%build
export CC=gcc LTCC=gcc
%configure \
	%{subst_enable static} \
	--with-gnu-ld \
	--localstatedir=%_var \
	--libdir=%_libdir/%name \
	--includedir=%_includedir/%name \
	--with-logdir=%_logdir/%name \
	--mandir=%_mandir \
	--disable-ltdl-install \
	--with-openssl-includes=%_includedir/openssl \
	--with-openssl-libraries=%_libdir \
	--with-rlm-krb5-lib-dir=%_libdir \
	--with-rlm-krb5-include-dir=%_includedir/krb5 \
	--with-rlm-dbm-include-dir=%_includedir \
	--with-ltdl-include-dir=%_includedir \
	--with-ltdl-lib=%_libdir \
	--with-static-modules="" \
	--with-large-files \
%if_with pgsql
	--with-rlm_sql_postgresql=yes \
%endif
	--with-experimental-modules \
	--with-rlm_perl=yes

subst "s,HAVE_NDBM,HAVE_GDBM_NDBM," src/modules/rlm_dbm/Makefile

find -type f -print0 |
	xargs -r0 grep -FZl libradius.a -- | \
	xargs -r0 subst -p 's/libradius\.a/libradius.so/g' --

%make_build

%install

make install R=%buildroot
rm -f %buildroot%prefix/sbin/rc.radiusd
mkdir -p %buildroot%_sysconfdir/{logrotate.d,sysconfig,rc.d/init.d}

install -p -m644 %SOURCE1 %buildroot%_sysconfdir/logrotate.d/radiusd
install -p -m755 %SOURCE2 %buildroot%_sysconfdir/rc.d/init.d/radiusd
install -p -m640 %SOURCE3 %buildroot%_sysconfdir/sysconfig/radiusd

install -d -p -m0755 %buildroot%_docdir/%name-%version
install -d -p -m0755 %buildroot%_docdir/%name-%version/rfc
rm -rf doc/00-OLD
cp -R doc %buildroot%_docdir/%name-%version

# devel
mkdir -p %buildroot%_includedir/%name
cp -rp src/include/*.h %buildroot%_includedir/%name

# delete .la-files
rm -f %buildroot%_libdir/%name/*.la

#%if_with freenibs
mkdir -p freenibs_docs/rlm_nibs_mysql
mkdir -p freenibs_docs/rlm_nibs_postgresql

mv -f src/modules/rlm_nibs/{schemas,doc,utils} freenibs_docs
cp -r freenibs-%nibs_version/raddb freenibs_docs
rm -f freenibs_docs/makefile
#%endif

# remove unneeded stuff
rm -rf %buildroot%_datadir/doc/%name/

%pre
/usr/sbin/groupadd -r -f radius ||:
/usr/sbin/useradd -r -n -g radius -d /dev/null -s /dev/null \
	-c RADIUS radius >/dev/null 2>&1 ||:

#%if_with freenibs
%add_findreq_skiplist %_sbindir/dialup.guard %_sbindir/dialup.userkill
#%endif

%preun
%preun_service radiusd

%post
%post_service radiusd

%files
%doc doc/*
%doc dialup_admin
%_bindir/*
%attr(0755,root,root) %_sbindir/*
%_datadir/%name/*
%dir %_datadir/%name
%_libdir/%name/libradius*.so
%_libdir/%name/libeap*.so
%_libdir/%name/rlm_sim_files*.so
%_libdir/%name/rlm_acct*.so
%_libdir/%name/rlm_always*.so
%_libdir/%name/rlm_attr*.so
%_libdir/%name/rlm_chap*.so
%_libdir/%name/rlm_checkval*.so
%_libdir/%name/rlm_counter*.so
%_libdir/%name/rlm_cram*.so
%_libdir/%name/rlm_dbm*.so
%_libdir/%name/rlm_detail*.so
%_libdir/%name/rlm_digest*.so
%_libdir/%name/rlm_eap*.so
%_libdir/%name/rlm_ex*.so
%_libdir/%name/rlm_f*.so
%_libdir/%name/rlm_ip*.so
%_libdir/%name/rlm_ms*.so
%_libdir/%name/rlm_ns*.so
%_libdir/%name/rlm_pa*.so
%_libdir/%name/rlm_pr*.so
%_libdir/%name/rlm_r*.so
%_libdir/%name/rlm_smb*.so
%_libdir/%name/rlm_otp*.so
%_libdir/%name/rlm_sql.so
%_libdir/%name/rlm_sql_log.so
%_libdir/%name/rlm_unix.so
%_libdir/%name/rlm_krb5.so
%_libdir/%name/rlm_sqlippool.so
%_libdir/%name/rlm_sqlhpwippool.so
%dir %_libdir/%name
%_man1dir/*
%_man5dir/*
%_man8dir/*
%config(noreplace) %attr(0640,root,radius) %_sysconfdir/raddb/*
%config(noreplace) %_sysconfdir/logrotate.d/radiusd
%config(noreplace) %_sysconfdir/sysconfig/radiusd
%config %_initdir/radiusd
%dir %attr(0750,root,radius) %_sysconfdir/raddb
%attr(1770,root,radius) %dir %_var/run/radiusd
%attr(1770,root,radius) %dir %_logdir/%name/radacct
%attr(1770,root,radius) %dir %_logdir/%name

%files ldap
%_libdir/%name/rlm_ldap*.so

%files mysql
%_libdir/%name/rlm_sql_mysql*.so

%if_with pgsql
%files pgsql
%_libdir/%name/rlm_sql_postgresql*.so
%endif

%files python
%doc src/modules/rlm_python/*.py
%doc src/modules/rlm_python/*.sql
%_libdir/%name/rlm_python*.so

%files perl
%doc src/modules/rlm_perl/example.pl
%_libdir/%name/rlm_perl*.so

%files sqlcounter
%_libdir/%name/rlm_sqlcounter*.so

%files devel
%_includedir/%name

#%if_with freenibs
%files -n freenibs-%nibs_version
%doc freenibs_docs/*
%_libdir/%name/rlm_nibs*.so
#%endif

%changelog
* Mon Aug 06 2007 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.7-alt0.M40.1
- Build for 4.0/branch

* Mon Aug 06 2007 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.7-alt1
- 1.1.7
- Set true group attribute for /etc/raddb/* (Closes: #12463)
- Fixed filename for inclusion in initscript
- Set permissions of radiusd binary harder

* Tue Apr 17 2007 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.6-alt2
- Do not start on any runlevel by default

* Fri Apr 13 2007 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.6-alt1
- 1.1.6
  + Security fix: FreeRADIUS EAP-TTLS "VALUE_PAIR" Memory Leak (SECUNIA
  ADVISORY SA24849)
- Switch to use .gear-tags

* Tue Mar 27 2007 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.5-alt1
- 1.1.5

* Thu Dec 28 2006 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.3-alt1
- 1.1.3. Warning: freenibs don't compile with this version
- Integrate patches into source tree

* Fri Sep 15 2006 ALT QA Team Robot <qa-robot на altlinux.org> 1.1.2-alt3.1
- Rebuilt with MySQL-5.0.24-alt2.

* Tue Aug 01 2006 Anton Gorlov <stalker на altlinux.ru> 1.1.2-alt3
- fix FreeNibs build and work

* Thu Jul 20 2006 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.2-alt2
- Corrected packaging of sql-modules (Closes: #7383)
- Added -devel subpackage (Closes: #3419)
- Freenibs don't depends on freeradius-mysql now (Closes #7468)

* Thu Jul 13 2006 Vladimir V Kamarzin <vvk на altlinux.ru> 1.1.2-alt1
- 1.1.2
- Added patches from mdk for use system libtool
- Conditional build with freenibs 1.1.8 (disabled by default), need additional
  working
- Set verify_elf_method unresolved=relaxed
- Some spec fixes
- Changed permissions of /var/run/radiusd/, /var/log/freeradius/radacct/,
  /var/log/freeradius/ due to ALT Security Policy
- Listen only on loopback interface by default
- Corrected BuildRequires
- Packager set to freeradius на packages

* Wed Jul 06 2005 Dimitry V. Ketov <dketov на altlinux.ru> 1.0.4-alt1
- 1.0.4
- PostgreSQL conditional build --with pgsql

* Sun Mar 20 2005 Dimitry V. Ketov <dketov на altlinux.ru> 1.0.2-alt1
- 1.0.2
- FreeNIBS conditional build --with freenibs

* Sat Nov 13 2004 ALT QA Team Robot <qa-robot на altlinux.org> 0.9.3-alt4.1
- Rebuilt with openldap-2.2.18-alt3.

* Fri May 14 2004 Dmitry V. Levin <ldv на altlinux.org> 0.9.3-alt4
- Do not build static plugins by default.
- Fixed dynamic linkage.
- Cleanup package install dependencies.
- Cleanup package build dependencies (#4073).

* Tue May 11 2004 ALT QA Team Robot <qa-robot на altlinux.org> 0.9.3-alt3.1
- Rebuilt with openssl-0.9.7d.

* Wed Mar 10 2004 Victor V Ismakaev <ivv на altlinux.ru> 0.9.3-alt3
- fixed unmet and buildreq

* Tue Dec 02 2003 Konstantin Timoshenko <kt на altlinux.ru> 0.9.3-alt2
- rebuild with net-snmp

* Mon Nov 24 2003 Victor V Ismakaev <ivv на altlinux.ru> 0.9.3-alt1
- new version
- fixed bug #3286
- removed package freenibs (because it not ready yet)

* Thu Nov 20 2003 Victor V Ismakaev <ivv на altlinux.ru> 0.9.2-alt2
- added package freenibs from nibs.net.ua

* Fri Oct 31 2003 Victor V Ismakaev <ivv на altlinux.ru> 0.9.2-alt1
- new version

* Mon Sep 22 2003 Victor V Ismakaev <ivv на altlinux.ru> 0.9.1-alt3
- splitted into subpackages

* Fri Sep 19 2003 Andy Gorev <horror на altlinux.ru> 0.9.1-alt2
- BuildRequires updated
- Rewritten start/stop scripts to new rc scheme
- Reload & Condreload fix
- Provide of oun libs
- Fix dictionary location for new version
- New /etc/sysconfig/radiusd options file implemented
- Small spec fixes

* Wed Sep 10 2003 Andy Gorev <horror на altlinux.ru> 0.9.1-alt1
- New version freeradius-0.9.1
- BuildRequires updated

* Wed Feb 12 2003 Victor V Ismakaev <ivv на altlinux.ru> 0.8.1-alt1.3
- fixed creating /var/run/radiusd.pid file

* Tue Jan 28 2003 Victor V Ismakaev <ivv на altlinux.ru> 0.8.1-alt1.2
- rebuild for Master 2.2

* Mon Dec 16 2002 Victor V Ismakaev <ivv на altlinux.ru> 0.8.1-alt1.1
- Some fixes in SPEC(section %%description -l ru_RU.KOI8-R )

* Sat Dec 15 2002 Victor V Ismakaev <ivv на altlinux.ru> 0.8.1-alt1
- New version freeradius-0.8.1

* Mon Dec 09 2002 Victor V Ismakaev <ivv на altlinux.ru> 0.8-alt1
- New version freeradius-0.8

* Fri Jun 21 2002 Victor V Ismakaev <ivv на altlinux.ru> 0.5-alt4
- fixed section %%files

* Wed Jun 19 2002 IVV <ivv на altlinux.ru> 0.5-alt3
- Some fixes in freeradius.spec

* Thu Jun 11 2002 IVV <ivv на altlinux.ru> 0.5-alt2
- Changed init script
- Some fixes in freeradius.spec

* Tue Jun 06 2002 IVV <ivv на altlinux.ru> 0.5-alt1
- first adaptations for ALTLinux


Подробная информация о списке рассылки community