X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=freeradius.spec;h=a0f4ba9e8fd639af94ec399c18689e6772f2b47f;hb=6034f97511fb31f754e429d5b8143d30e4303576;hp=7bd8c60f78deec5f7e3c44f03cf157ff990cd428;hpb=88c575b324d05f375e1aa52563ccc7ac0ac0418d;p=packages%2Ffreeradius.git diff --git a/freeradius.spec b/freeradius.spec index 7bd8c60..a0f4ba9 100644 --- a/freeradius.spec +++ b/freeradius.spec @@ -1,54 +1,63 @@ # %include /usr/lib/rpm/macros.perl -# FIXME: won't be good to include these contrib examples? -# Source1: http://www.ping.de/~fdc/radius/radacct-replay -# Source3: ftp://ftp.freeradius.org/pub/radius/contrib/radwho.cgi +# FIXME: +# - won't be good to include these contrib examples? +# Source1: http://www.ping.de/~fdc/radius/radacct-replay +# Source3: ftp://ftp.freeradius.org/pub/radius/contrib/radwho.cgi Summary: High-performance and highly configurable RADIUS server -Summary(pl): Szybki i wysoce konfigurowalny serwer RADIUS +Summary(pl.UTF-8): Szybki i wysoce konfigurowalny serwer RADIUS Name: freeradius -Version: 1.0.1 -Release: 4 +Version: 1.1.7 +Release: 1 License: GPL Group: Networking/Daemons Source0: ftp://ftp.freeradius.org/pub/radius/%{name}-%{version}.tar.gz -# Source0-md5: abc30cb71367f859ceed4de6477cd59f +# Source0-md5: 5c126cb2122b8e2ba9784b511fbefd96 Source1: %{name}.logrotate Source2: %{name}.init Source3: %{name}.pam -Patch0: %{name}-autoconf_mysql.patch -Patch1: %{name}-makefile.patch -Patch2: %{name}-smbencrypt.patch -Patch3: %{name}-linking.patch -Patch4: %{name}-moduledir.patch -Patch5: %{name}-rundir.patch -Patch6: %{name}-config.patch +Patch0: %{name}-makefile.patch +Patch1: %{name}-linking.patch +Patch2: %{name}-moduledir.patch +Patch3: %{name}-rundir.patch +Patch4: %{name}-config.patch URL: http://www.freeradius.org/ -Provides: user(radius) -Provides: group(radius) BuildRequires: autoconf BuildRequires: automake BuildRequires: cyrus-sasl-devel BuildRequires: gdbm-devel +BuildRequires: krb5-devel +BuildRequires: libcom_err-devel BuildRequires: libltdl-devel BuildRequires: libtool BuildRequires: mysql-devel -BuildRequires: openldap-devel +BuildRequires: net-snmp-devel +BuildRequires: openldap-devel >= 2.4.6 BuildRequires: openssl-devel >= 0.9.7d BuildRequires: pam-devel BuildRequires: perl-devel BuildRequires: postgresql-backend-devel BuildRequires: postgresql-devel +BuildRequires: python BuildRequires: python-devel -BuildRequires: net-snmp-devel -BuildRequires: unixODBC-devel BuildRequires: rpm-perlprov -BuildRequires: rpm-pythonprov -PreReq: rc-scripts +BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: unixODBC-devel Requires(post,preun): /sbin/chkconfig -Requires: libtool +Requires(postun): /usr/sbin/groupdel +Requires(postun): /usr/sbin/userdel +Requires(pre): /bin/id +Requires(pre): /usr/bin/getgid +Requires(pre): /usr/sbin/groupadd +Requires(pre): /usr/sbin/useradd +Requires(pre): /usr/sbin/usermod Requires: perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION') -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +Requires: rc-scripts +Provides: group(radius) +Provides: user(radius) Obsoletes: cistron-radius +Conflicts: logrotate < 3.7-4 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description The FreeRADIUS Server Project is an attempt to create a @@ -56,11 +65,11 @@ high-performance and highly configurable GPL'd RADIUS server. It is generally similar to the Livingston 2.0 RADIUS server, but has a lot more features, and is much more configurable. -%description -l pl +%description -l pl.UTF-8 Projekt FreeRadius ma na celu stworzenie szybkiego i wysoce konfigurowalnego serwera RADIUS na licencji GPL. Ten jest podobny do -Livingston 2.0 RADIUS server ale ma o wiele wiêcej funkcji i posiada -wiêksze mo¿liwo¶ci konfigurowania. +Livingston 2.0 RADIUS server ale ma o wiele więcej funkcji i posiada +większe możliwości konfigurowania. %prep %setup -q @@ -69,26 +78,23 @@ wi %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 -%patch6 -p1 - -awk 'BEGIN { printit=0; } { if (printit) print $0; } /## end libtool.m4/ { printit=1;}' \ - < aclocal.m4 > acinclude.m4 -find . -type d -name CVS | xargs rm -r +sed -e '/m4_include..libtool/d' < aclocal.m4 > acinclude.m4 %build maindir="$(pwd)" for d in rlm_attr_rewrite rlm_checkval rlm_counter rlm_dbm \ rlm_eap/types/rlm_eap_{md5,mschapv2,peap,sim,tls,ttls} \ - rlm_eap rlm_example rlm_ippool rlm_krb5 rlm_ldap rlm_pam rlm_perl rlm_python \ - rlm_radutmp rlm_smb \ + rlm_eap rlm_example rlm_ippool rlm_krb5 rlm_ldap rlm_otp \ + rlm_pam rlm_perl rlm_python rlm_radutmp rlm_smb \ rlm_sql/drivers/rlm_sql_{db2,iodbc,mysql,oracle,postgresql,unixodbc} \ - rlm_sql rlm_sqlcounter rlm_unix rlm_x99_token ; do + rlm_sql rlm_sqlcounter rlm_sql_log rlm_unix ; do cd src/modules/${d} - %{__aclocal} -I ${maindir} - %{__autoconf} + if [ -f configure.in ]; then + %{__aclocal} -I ${maindir} + %{__autoconf} + fi if [ -f config.h.in ]; then %{__autoheader} fi @@ -110,18 +116,17 @@ done --with-ltdl-include=%{_includedir}/none \ --with-ltdl-lib=%{_libdir} \ --disable-ltdl-install \ - --without-rlm_krb5 \ - --without-rlm_dbm -%{__make} \ + --with-rlm_krb5 +%{__make} -j1 \ LIBTOOL="`pwd`/libtool --tag=CC" %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir}/raddb,%{_libdir}/%{name}} \ $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,rc.d/init.d} \ - $RPM_BUILD_ROOT%{_var}/log/radius + $RPM_BUILD_ROOT%{_var}/log/{,archive}/freeradius/radacct -%{__make} install \ +%{__make} -j1 install \ LIBTOOL="`pwd`/libtool --tag=CC" \ R=$RPM_BUILD_ROOT @@ -134,51 +139,31 @@ install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/radius # remove useless static modules and library # rlm*.la are used (lt_dlopen) -rm -f $RPM_BUILD_ROOT%{_libdir}/{*.a,libradius.la} -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/{*.a,libradius.la} +rm -f $RPM_BUILD_ROOT%{_libdir}/{*.a,*.la} +rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.a %clean rm -rf $RPM_BUILD_ROOT %pre -if [ -n "`/usr/bin/getgid radius`" ]; then - if [ "`getgid radius`" != "29" ]; then - echo "Error: group radius doesn't have gid=29. Correct this before installing radius." 1>&2 - exit 1 - fi -else - /usr/sbin/groupadd -g 29 -r -f radius - if [ -n "`id -u radius 2>/dev/null`" ]; then - # upgrade from previous versions of the package, where radius' gid was "nobody" - if [ "`id -g radius`" = "99" ]; then - usermod -g 29 radius - chown radius:radius /var/log/%{name}/*.log >/dev/null 2>&1 || : - chown radius:radius /var/log/%{name}/radacct/* >/dev/null 2>&1 || : - fi - fi -fi -if [ -n "`id -u radius 2>/dev/null`" ]; then - if [ "`id -u radius`" != "29" ]; then - echo "Error: user radius doesn't have uid=29. Correct this before installing radius server." 1>&2 - exit 1 - fi -else - /usr/sbin/useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g radius radius 1>&2 +%groupadd -g 29 -r -f radius +%useradd -u 29 -d %{_localstatedir} -s /bin/false -M -r -c "%{name}" -g radius radius + +# TODO: should be in trigger instead. +# upgrade from previous versions of the package, where radius' gid was "nobody" +if [ "`id -g radius`" = "99" ]; then + usermod -g 29 radius + chown radius:radius /var/log/%{name}/*.log >/dev/null 2>&1 || : + chown radius:radius /var/log/%{name}/radacct/* >/dev/null 2>&1 || : fi %post /sbin/chkconfig --add %{name} -if [ -f /var/lock/subsys/%{name} ]; then - /etc/rc.d/init.d/%{name} restart 1>&2 -else - echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon." -fi +%service %{name} restart "%{name} daemon" %preun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/%{name} ]; then - /etc/rc.d/init.d/%{name} stop 1>&2 - fi + %service %{name} stop /sbin/chkconfig --del %{name} fi @@ -191,25 +176,25 @@ fi %files %defattr(644,root,root,755) %doc doc/* -%doc src/modules/rlm_sql/drivers/*/*.sql %attr(755,root,root) %{_bindir}/* %attr(755,root,root) %{_sbindir}/* %attr(755,root,root) %{_libdir}/*.so -%{_libdir}/*.la %dir %{_libdir}/%{name} -%{_libdir}/%{name}/*.so +%attr(755,root,root) %{_libdir}/%{name}/*.so %{_libdir}/%{name}/*.la %{_datadir}/freeradius %dir %{_sysconfdir}/raddb -%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/raddb/* +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/raddb/* %attr(771,root,radius) %dir %{_var}/log/%{name} %attr(771,root,radius) %dir %{_var}/log/%{name}/radacct +%attr(771,root,radius) %dir %{_var}/log/archive/%{name} +%attr(771,root,radius) %dir %{_var}/log/archive/%{name}/radacct %attr(775,root,radius) %dir /var/run/%{name} %attr(754,root,root) /etc/rc.d/init.d/%{name} -%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/* -%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/* %{_mandir}/man?/*