Need help with making RPM from v2.x.x branch
Divyesh Raithatha
divyesh.raithatha at gmail.com
Mon May 6 22:35:21 CEST 2013
Thanks Alan, I had to comment out both Patch 2 and 5 sections
#%patch2 -p1 -b .radtest
#%patch5 -p1 -b .radeapclient-ipv6
to get past the patch error messages but I get another error below:
+ cp README
/home/divtest/rpmbuild/BUILDROOT/freeradius-2.2.0-1.el6.x86_64//usr/share/doc/freeradius-2.2.0
cp: cannot stat `README': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.wG9x7h (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.wG9x7h (%install)
Here are the contents of the temp file:
cat /var/tmp/rpm-tmp.wG9x7h
#!/bin/sh
RPM_SOURCE_DIR="/home/test/rpmbuild/SOURCES"
RPM_BUILD_DIR="/home/test/rpmbuild/BUILD"
RPM_OPT_FLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic"
RPM_ARCH="x86_64"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="freeradius"
RPM_PACKAGE_VERSION="2.2.0"
RPM_PACKAGE_RELEASE="1.el6"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
LANG=C
export LANG
unset CDPATH DISPLAY ||:
RPM_BUILD_ROOT="/home/test/rpmbuild/BUILDROOT/freeradius-2.2.0-1.el6.x86_64"
export RPM_BUILD_ROOT
PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/usr/share/pkgconfig"
export PKG_CONFIG_PATH
set -x
umask 022
cd "/home/test/rpmbuild/BUILD"
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"
mkdir -p `dirname "$RPM_BUILD_ROOT"`
mkdir "$RPM_BUILD_ROOT"
cd 'freeradius-server-2.2.0'
LANG=C
export LANG
unset DISPLAY
mkdir -p $RPM_BUILD_ROOT//var/lib/radiusd
# fix for bad libtool bug - can not rebuild dependent libs and bins
#FIXME export LD_LIBRARY_PATH=$RPM_BUILD_ROOT//usr/lib64
make install R=$RPM_BUILD_ROOT
# modify default configuration
RADDB=$RPM_BUILD_ROOT/etc/raddb
perl -i -pe 's/^#user =.*$/user = radiusd/' $RADDB/radiusd.conf
perl -i -pe 's/^#group =.*$/group = radiusd/' $RADDB/radiusd.conf
# logs
mkdir -p $RPM_BUILD_ROOT/var/log/radius/radacct
touch $RPM_BUILD_ROOT/var/log/radius/{radutmp,radius.log}
install -D -m 755 /home/test/rpmbuild/SOURCES/freeradius-radiusd-init
$RPM_BUILD_ROOT//etc/rc.d/init.d/radiusd
install -D -m 644 /home/test/rpmbuild/SOURCES/freeradius-logrotate
$RPM_BUILD_ROOT//etc/logrotate.d/radiusd
install -D -m 644 /home/test/rpmbuild/SOURCES/freeradius-pam-conf
$RPM_BUILD_ROOT//etc/pam.d/radiusd
mkdir -p
/home/test/rpmbuild/BUILDROOT/freeradius-2.2.0-1.el6.x86_64/var/run/
install -d -m 0710
/home/test/rpmbuild/BUILDROOT/freeradius-2.2.0-1.el6.x86_64/var/run/radiusd/
# remove unneeded stuff
rm -rf doc/00-OLD
rm -f $RPM_BUILD_ROOT/usr/sbin/rc.radiusd
rm -rf $RPM_BUILD_ROOT//usr/lib64/freeradius/*.a
rm -rf $RPM_BUILD_ROOT//usr/lib64/freeradius/*.la
rm -rf $RPM_BUILD_ROOT//etc/raddb/sql/mssql
rm -rf $RPM_BUILD_ROOT//etc/raddb/sql/oracle
rm -rf $RPM_BUILD_ROOT//usr/share/dialup_admin/sql/oracle
rm -rf $RPM_BUILD_ROOT//usr/share/dialup_admin/lib/sql/oracle
rm -rf $RPM_BUILD_ROOT//usr/share/dialup_admin/lib/sql/drivers/oracle
# remove header files, we don't ship a devel package and the
# headers have multilib conflicts
rm -rf $RPM_BUILD_ROOT//usr/include
# remove unsupported config files
rm -f $RPM_BUILD_ROOT//etc/raddb/experimental.conf
# install doc files omitted by standard install
for f in COPYRIGHT CREDITS INSTALL README; do
cp $f $RPM_BUILD_ROOT//usr/share/doc/freeradius-2.2.0
done
cp LICENSE $RPM_BUILD_ROOT//usr/share/doc/freeradius-2.2.0/LICENSE.gpl
cp src/lib/LICENSE
$RPM_BUILD_ROOT//usr/share/doc/freeradius-2.2.0/LICENSE.lgpl
cp src/LICENSE.openssl
$RPM_BUILD_ROOT//usr/share/doc/freeradius-2.2.0/LICENSE.openssl
# add Red Hat specific documentation
cat >> $RPM_BUILD_ROOT//usr/share/doc/freeradius-2.2.0/REDHAT << EOF
Red Hat, RHEL, Fedora, and CentOS specific information can be found on the
FreeRADIUS Wiki in the Red Hat FAQ.
http://wiki.freeradius.org/guide/Red_Hat_FAQ
Please reference that document.
EOF
# Make sure our user/group is present prior to any package or subpackage
installation
/usr/lib/rpm/find-debuginfo.sh --strict-build-id
"/home/test/rpmbuild/BUILD/freeradius-server-2.2.0"
/usr/lib/rpm/check-buildroot
/usr/lib/rpm/redhat/brp-compress
/usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
/usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip
/usr/bin/objdump
/usr/lib/rpm/brp-python-bytecompile
/usr/lib/rpm/redhat/brp-python-hardlink
/usr/lib/rpm/redhat/brp-java-repack-jars
On Mon, May 6, 2013 at 1:09 PM, Alan DeKok <aland at deployingradius.com>wrote:
> Divyesh Raithatha wrote:
> > Hello all, has anyone had success in building an RPM from the v2.x.x
> > branch from http://git.freeradius.org?
> >
> That should work....
>
> > I am following the information from
> > http://wiki.freeradius.org/guide/Red-Hat-FAQ
> >
> > On a CentOS 6.4 x64 system I was able to build an RPM from 2.2.0 source
> > successfully but I want to get all of the recent patches from the v2.x.x
> > branch.
>
> Go to redhat/freeradius.spec, and delete the following line:
>
> Patch2: freeradius-radtest.patch
>
>
> That should cause it to build.
>
> Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130506/0966ffe2/attachment.html>
More information about the Freeradius-Users
mailing list