1
0

Accepting request 204232 from home:vitezslav_cizek:branches:network

- don't build with experimental modules
- fix packaging bugs:
  * install init scripts only on <= 11.4
  * install systemd unit
  * add %defattr for submodules

OBS-URL: https://build.opensuse.org/request/show/204232
OBS-URL: https://build.opensuse.org/package/show/network/freeradius-server?expand=0&rev=52
This commit is contained in:
Andrey Karepin 2013-10-22 04:03:11 +00:00 committed by Git OBS Bridge
parent 80e6dde4db
commit b1fb2f1ac8
2 changed files with 47 additions and 33 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Oct 21 12:06:19 UTC 2013 - vcizek@suse.com
- don't build with experimental modules
- fix packaging bugs:
* install init scripts only on <= 11.4
* install systemd unit
* add %defattr for submodules
-------------------------------------------------------------------
Tue Oct 15 15:15:24 UTC 2013 - vcizek@suse.com

View File

@ -66,14 +66,13 @@ BuildRequires: pam-devel
BuildRequires: perl
BuildRequires: postgresql-devel
BuildRequires: python-devel
BuildRequires: ruby-devel
BuildRequires: sqlite3-devel
BuildRequires: unixODBC-devel
BuildRequires: pkgconfig(apr-1)
%if 0%{?suse_version} > 1140
BuildRequires: systemd
%endif
%{?systemd_requires}
%endif
PreReq: %fillup_prereq
PreReq: %insserv_prereq
@ -238,7 +237,6 @@ export CFLAGS="%{optflags} -DLDAP_DEPRECATED -fstack-protector"
%ifarch x86_64 ppc ppc64 s390 s390x %arm
export CFLAGS="$CFLAGS -fPIC -DPIC"
%endif
#--without-rlm_ruby \
export LDFLAGS="-pie"
%configure \
--disable-static \
@ -247,7 +245,6 @@ export LDFLAGS="-pie"
--disable-ltdl-install \
--enable-strict-dependencies \
--with-edir \
--with-experimental-modules \
--with-gnu-ld \
--with-system-libtool \
--with-system-libltdl \
@ -274,37 +271,41 @@ make install R=%{buildroot} INSTALLSTRIP=
RADDB=%{buildroot}%{_sysconfdir}/raddb
perl -i -pe 's/^#user =.*$/user = radiusd/' $RADDB/radiusd.conf
perl -i -pe 's/^#group =.*$/group = radiusd/' $RADDB/radiusd.conf
perl -i -pe 's/^#user =.*$/user = radiusd/' $RADDB/radrelay.conf
perl -i -pe 's/^#group =.*$/group = radiusd/' $RADDB/radrelay.conf
/sbin/ldconfig -n %{buildroot}%{_libdir}/freeradius
# logs
touch %{buildroot}%{_localstatedir}/log/radius/radutmp
touch %{buildroot}%{_localstatedir}/log/radius/radius.log
mkdir -p %{buildroot}/usr/lib/tmpfiles.d
mkdir -p %{buildroot}%{_tmpfilesdir}
mkdir -p %{buildroot}%{_localstatedir}/run/
install -d -m 0710 %{buildroot}%{_localstatedir}/run/radiusd/
install -m 0644 %{SOURCE2} %{buildroot}/usr/lib/tmpfiles.d/radiusd.conf
install -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{unitname}.conf
install -D -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/%{unitname}.service
# SuSE
install -d %{buildroot}%{_sysconfdir}/pam.d
install -d %{buildroot}%{_sysconfdir}/logrotate.d
install -m 644 suse/radiusd-pam %{buildroot}%{_sysconfdir}/pam.d/radiusd
install -m 644 suse/radiusd-logrotate %{buildroot}%{_sysconfdir}/logrotate.d/radiusd
%if %{with_sysvinit}
install -d -m 755 %{buildroot}%{_sysconfdir}/init.d
install -m 744 suse/rcradiusd %{buildroot}%{_sysconfdir}/init.d/freeradius
ln -sf ../..%{_sysconfdir}/init.d/freeradius %{buildroot}%{_sbindir}/rcfreeradius
ln -sf %{buildroot}%{_sysconfdir}/init.d/freeradius %{buildroot}%{_sbindir}/rcfreeradius
%else
# name the rc script according to the systemd unit
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcradiusd
%endif
cp -al %{buildroot}%{_sbindir}/radiusd %{buildroot}%{_sbindir}/radrelay
mv -v doc/README doc/README.doc
# remove unneeded stuff
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crt
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.csr
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.der
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.key
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.pem
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.p12
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/index.*
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/serial*
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/dh
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/random
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/*.crt
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/*.csr
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/*.der
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/*.key
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/*.pem
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/*.p12
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/index.*
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/serial*
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/dh
rm -f %{buildroot}%{_sysconfdir}/raddb/certs/random
rm -rf doc/00-OLD
rm -rf doc/.gitignore
rm -rf doc/source/.gitignore
@ -313,9 +314,9 @@ rm -rf %{buildroot}%{_datadir}/doc/freeradius*
rm -rf %{buildroot}%{_libdir}/freeradius/*.*a
rm -f %{buildroot}%{_defaultdocdir}/%{name}/Makefile
rm -f %{buildroot}%{_defaultdocdir}/%{name}/examples/Makefile
rm -rf $RPM_BUILD_ROOT/etc/raddb/mods-config/sql/main/mssql
rm -rf $RPM_BUILD_ROOT/etc/raddb/mods-config/sql/ippool/oracle
rm -rf $RPM_BUILD_ROOT/etc/raddb/mods-config/sql/main/oracle
rm -rf %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/main/mssql
rm -rf %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/ippool/oracle
rm -rf %{buildroot}%{_sysconfdir}/raddb/mods-config/sql/main/oracle
%pre
%{_sbindir}/groupadd -r radiusd 2> /dev/null || :
@ -372,10 +373,15 @@ rm -rf %{buildroot}
%doc suse/README.SuSE
%doc COPYRIGHT CREDITS LICENSE doc/ChangeLog
# SuSE
%{_sysconfdir}/init.d/freeradius
%config %{_sysconfdir}/pam.d/radiusd
%config %{_sysconfdir}/logrotate.d/radiusd
%if %{with_sysvinit}
%config %{_sysconfdir}/init.d/freeradius
%{_sbindir}/rcfreeradius
%endif
%if 0%{?suse_version} > 1140
%{_sbindir}/rcradiusd
%endif
%dir %attr(755,radiusd,radiusd) %{_localstatedir}/lib/radiusd
# configs
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb
@ -395,15 +401,14 @@ rm -rf %{buildroot}
%{_sysconfdir}/raddb/certs/xpextensions
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/certs/*.cnf
%attr(750,root,radiusd) %{_sysconfdir}/raddb/certs/bootstrap
%config /usr/lib/tmpfiles.d/radiusd.conf
%{_tmpfilesdir}/%{unitname}.conf
%{_unitdir}/%{unitname}.service
# mods-config
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config
%{_sysconfdir}/raddb/mods-config/README.rst
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/attr_filter
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/attr_filter/*
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/ruby
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/ruby/*
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/files
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/files/*
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/preprocess
@ -620,14 +625,7 @@ rm -rf %{buildroot}
%{_libdir}/freeradius/rlm_utf8.so
%{_libdir}/freeradius/rlm_wimax.so
%{_libdir}/freeradius/rlm_yubikey.so
%{_libdir}/freeradius/rlm_example.so
%{_libdir}/freeradius/rlm_idn.so
%{_libdir}/freeradius/rlm_rest.so
%{_libdir}/freeradius/rlm_ruby.so
%{_libdir}/freeradius/rlm_smsotp.so
%{_libdir}/freeradius/rlm_sql_freetds.so
%{_libdir}/freeradius/rlm_sql_unixodbc.so
%{_libdir}/freeradius/rlm_sqlhpwippool.so
%files utils
%defattr(-,root,root)
@ -646,10 +644,12 @@ rm -rf %{buildroot}
%attr(644,root,root) %{_includedir}/freeradius/*.h
%files krb5
%defattr(-,root,root)
%{_libdir}/freeradius/rlm_krb5.so
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/krb5
%files perl
%defattr(-,root,root)
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/perl
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/perl
@ -658,11 +658,13 @@ rm -rf %{buildroot}
%{_libdir}/freeradius/rlm_perl.so
%files python
%defattr(-,root,root)
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/python
%{_sysconfdir}/raddb/mods-config/python/example.py*
%{_libdir}/freeradius/rlm_python.so
%files mysql
%defattr(-,root,root)
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/sql/counter/mysql
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/sql/counter/mysql/queries.conf
@ -695,6 +697,7 @@ rm -rf %{buildroot}
%{_libdir}/freeradius/rlm_sql_mysql.so
%files postgresql
%defattr(-,root,root)
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/sql/counter/postgresql
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/sql/counter/postgresql/queries.conf
@ -719,6 +722,7 @@ rm -rf %{buildroot}
%{_libdir}/freeradius/rlm_sql_postgresql.so
%files sqlite
%defattr(-,root,root)
%dir %attr(750,root,radiusd) %{_sysconfdir}/raddb/mods-config/sql/cui/sqlite
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/sql/cui/sqlite/queries.conf
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-config/sql/cui/sqlite/schema.sql
@ -737,6 +741,7 @@ rm -rf %{buildroot}
%{_libdir}/freeradius/rlm_sql_sqlite.so
%files ldap
%defattr(-,root,root)
%{_libdir}/freeradius/rlm_ldap.so
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/mods-available/ldap