building RPM from source
Hi Everyone I am rather new to this, so I hope I am not asking something obvious. I am attempting to build an RPM from source on my FC5 box. The reason is that I am wanting to use hotcakes (a wifi administration app) and it requires 1.1.4 minimum and the latest stable for FC5 is 1.0.5 What I am actually wanting to achieve is a Freeradius install on my FC5 box that puts everything where I am expecting to find them on my FC5 box. I thought building an RPM from source was the idea, but there may be others I am unaware of. My issue is that I am wanting mysql (on separate server) support built into freeradius, but I can't find any information on how that is done within the spec file. Note: This install of freeradius is on a standalone machine, it will have nothing else but freeradius on it. Any thoughts or comments on where I can find the information I need would be most helpful. This is how I am trying to do it so far: $ cd ~ $ cp -a /usr/src/redhat/ rpmbuild $ echo '%_topdir %(echo $HOME)/rpmbuild' >> .rpmmacros $ wget ftp://ftp.freeradius.org/pub/radius/freeradius-1.1.7.tar.gz $ cp freeradius-1.1.7.tar.gz ~/rpmbuild/SOURCES/ $ tar zxf freeradius-1.1.7.tar.gz freeradius-1.1.7/redhat/freeradius.spec $ cp freeradius-1.1.7/redhat/freeradius.spec ~/rpmbuild/SPECS/ $ cd ~/rpmbuild/RPMS/i386 $ rpm -Uvh freeradius-1.1.7-0.i386.rpm No mods to the spec file (information required). Regards Fred
Hi,
My issue is that I am wanting mysql (on separate server) support built into freeradius, but I can't find any information on how that is done within the spec file.
edit the spec file to ensure that MySQL is used. ensure that you have all the correct devel RPMs installed for FreeRADIUS to build. the easiest way is to just do a straight ./configure --with-options --that-you-need then a make and see what fails, WARNS or ERRORs - if its all gone well, then you're system is in a sane state to compile the RPM. alan
Fred Zinsli wrote:
I am attempting to build an RPM from source on my FC5 box.
Try to get a more recent source RPM from a repository, and then tweak the spec file to fit your needs. The Fedora builds will support MySQL by default. It'd be easier than trying to write your own spec file from scratch. The current version in Fedora 7 is 1.1.6, and 1.1.7 is available in the development repo. (I am running 1.1.7 built from the devel source RPM.) -Matt
Thanks for the comments. I have got a copy of 1.1.7 source but my issue is that I don't know how to enable mysql in the spec file. Also if I compile from source to I have to install freeradius-mysql or is it all in the single build? Also, do I have to have mysql installed on the build machine to enable mysql suppport? Default spec file: %configure --prefix=%{_prefix} \ --localstatedir=%{_localstatedir} \ --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --with-docdir=%{_datadir}/doc/%{name}-%{version} \ --with-system-libtool \ --disable-ltdl-install \ --with-ltdl-lib=/usr/lib \ --with-ltdl-include=/usr/include \ --with-large-files --with-udpfromto --with-edir \ --with-rlm-sql_postgresql-include-dir=/usr/include/pgsql \ --with-rlm-krb5-include-dir=/usr/kerberos/include \ --with-rlm-krb5-lib-dir=/usr/kerberos/lib I assume I can alter the --with-rlm-sql_postgresql-include-dir=/usr/include/pgsql \ to read --with-rlm-sql_mysql-include-dir=/usr/include/mysql \ But /usr/include/mysql doesn't exist on the machine. I am also wanting to add sqlcounter suppport assumed line: --with-rlm-sqlcounter-include-dir=/usr/include/sqlcounter \ But again this doesn't exist on the build machine. I look forward to your comments. Regards Fred -----Original Message----- From: Matt Garretson <mattg@assembly.state.ny.us> To: FreeRadius users mailing list <freeradius-users@lists.freeradius.org> Date: Wed, 15 Aug 2007 10:08:24 -0400 Subject: Re: building RPM from source
Fred Zinsli wrote:
I am attempting to build an RPM from source on my FC5 box.
Try to get a more recent source RPM from a repository, and then tweak the spec file to fit your needs. The Fedora builds will support MySQL by default. It'd be easier than trying to write your own spec file from scratch. The current version in Fedora 7 is 1.1.6, and 1.1.7 is available in the development repo. (I am running 1.1.7 built from the devel source RPM.)
-Matt - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Fred Zinsli wrote:
I have got a copy of 1.1.7 source but my issue is that I don't know how to enable mysql in the spec file.
The spec file that comes in the Fedora source RPM I suggested shows you exactly how to do it. In fact, it's done for you. :)
Also, do I have to have mysql installed on the build machine to enable mysql suppport?
Yes, both the mysql and mysql-devel packages would be required. You don't need mysql-server installed, unless of course you want to run the MySQL server on that machine. (The spec file also requires some other packages, which you can easily snip out if you don't actually need to build/use the stuff which depends on them.)
But /usr/include/mysql doesn't exist on the machine.
I'm guessing none of the MySQL packages are installed. Try: "yum install mysql mysql-devel". -Matt
I have two load-balanced NAS with diferents networks, the users can use the first or second NAS to gain network access from dynamic ips via rlm_ipool (two diferents ip pools) radius module. But now, I need to use unique fix ip from some users. How can I force the user to use a unique NAS ? If don´t make this, the fixed ip can be out of network. Make sense? Thx Toledo
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Fred Zinsli -
Matt Garretson -
Toledo, Luis Carlos