Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
David Wood wrote: The above patch is tested and working against 1.1.5. Passing --without-docdir to configure generates a warning and prevents the installation of any documentation. If, after any desired tidying up, this can be committed to the CVS for branch_1_1 and HEAD I would be grateful. Thanks for the feedback. I've added in CVS the support for ./configure --without-docdir. The change should be in 1.1.6. -- Nicolas Baradakis - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
In message [EMAIL PROTECTED], Alan DeKok [EMAIL PROTECTED] writes Nicolas Baradakis wrote: ... +ifeq ($(docdir),no) +install: +@echo 'Documentation files will NOT be installed.' +else I'd prefer not to have multiple install targets... even if they're wrapped with 'ifeq'. Sort of like how #ifdef's in the code should be avoided. OK - implementing Alan's suggestions on top of Nicolas' patch gives: Index: configure.in === RCS file: /source/radiusd/configure.in,v retrieving revision 1.198.2.15.2.13 diff -u -r1.198.2.15.2.13 configure.in --- configure.in26 Mar 2007 12:58:16 - 1.198.2.15.2.13 +++ configure.in1 Apr 2007 15:16:32 - @@ -115,7 +115,7 @@ [ --with-docdir=DIR Directory for documentation [DATADIR/doc/freeradius] ], [ case $withval in no) - AC_MSG_ERROR(Need docdir) + docdir=no ;; yes) ;; @@ -129,6 +129,9 @@ ) AC_SUBST(docdir) AC_MSG_RESULT($docdir) +if test x$docdir = xno; then + AC_MSG_WARN(Documentation files will NOT be installed.) +fi dnl extra argument: --with-logdir logdir='${localstatedir}/log/radius' Index: doc/Makefile === RCS file: /source/radiusd/doc/Makefile,v retrieving revision 1.4.4.2.2.3 diff -u -4 -r1.4.4.2.2.3 Makefile --- doc/Makefile15 Jul 2006 17:16:51 - 1.4.4.2.2.3 +++ doc/Makefile1 Apr 2007 15:16:44 - @@ -17,13 +17,15 @@ @rm -f *~ install: - $(INSTALL) -d -m 755 $(R)$(docdir) - for file in *[!~]; do \ - if [ -f $$file -a $$file != Makefile ]; then \ - $(INSTALL) -m 644 $$file $(R)$(docdir); \ - fi; \ - done - @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common + @if [ $(docdir) != no ]; then \ + $(INSTALL) -d -m 755 $(R)$(docdir); \ + for file in *[!~]; do \ + if [ -f $$file -a $$file != Makefile ]; then \ + $(INSTALL) -m 644 $$file $(R)$(docdir); \ + fi; \ + done; \ + $(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common ; \ + fi common: $(SUBDIRS) (I apologise in advance that my mailer has probably eaten all the tabs - if you want a file uploaded somewhere, I can do that). The above patch is tested and working against 1.1.5. Passing --without-docdir to configure generates a warning and prevents the installation of any documentation. If, after any desired tidying up, this can be committed to the CVS for branch_1_1 and HEAD I would be grateful. Many thanks, David -- David Wood [EMAIL PROTECTED] - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
David Wood wrote: In message [EMAIL PROTECTED], Nicolas Baradakis [EMAIL PROTECTED] writes David Wood wrote: There's two other things I'm currently modifying the source to achieve, on which I'd appreciate comments. patch-doc::Makefile surrounds the contents of the install target in doc/Makefile with #ifndef NOPORTDOCS ... #endif. FreeBSD ports have to respect this flag. Is a neater way to pass --with-docdir=/dev/null to configure if NOPORTDOCS is defined (which I haven't tried) and abandon the patch. Has anyone any other suggestions? Every downstream distribution has its own mechanism to mark the files as documentation. --with-docdir=/dev/null results in mkdir: /dev/null: File exists It looks like the patch (or some other way of modifying doc/Makefile) will have to stay. I will continue to modify the source in some suitable way to achieve this. Currently ./configure --without-docdir throws an error, but it's possible to modify this option in CVS to cancel doc files installation. I think it might be useful for the Suse package, too. Please give a try to the following patch. If it solves the problem I'll add it to the CVS. Index: configure.in === RCS file: /source/radiusd/configure.in,v retrieving revision 1.198.2.15.2.13 diff -u -r1.198.2.15.2.13 configure.in --- configure.in26 Mar 2007 12:58:16 - 1.198.2.15.2.13 +++ configure.in1 Apr 2007 15:16:32 - @@ -115,7 +115,7 @@ [ --with-docdir=DIR Directory for documentation [DATADIR/doc/freeradius] ], [ case $withval in no) - AC_MSG_ERROR(Need docdir) + docdir=no ;; yes) ;; @@ -129,6 +129,9 @@ ) AC_SUBST(docdir) AC_MSG_RESULT($docdir) +if test x$docdir = xno; then + AC_MSG_WARN(Documentation files will NOT be installed.) +fi dnl extra argument: --with-logdir logdir='${localstatedir}/log/radius' Index: doc/Makefile === RCS file: /source/radiusd/doc/Makefile,v retrieving revision 1.4.4.2.2.3 diff -u -4 -r1.4.4.2.2.3 Makefile --- doc/Makefile15 Jul 2006 17:16:51 - 1.4.4.2.2.3 +++ doc/Makefile1 Apr 2007 15:16:44 - @@ -15,16 +15,21 @@ clean: @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common @rm -f *~ +ifeq ($(docdir),no) +install: + @echo 'Documentation files will NOT be installed.' +else install: $(INSTALL) -d -m 755 $(R)$(docdir) for file in *[!~]; do \ if [ -f $$file -a $$file != Makefile ]; then \ $(INSTALL) -m 644 $$file $(R)$(docdir); \ fi; \ done @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common +endif common: $(SUBDIRS) $(SUBDIRS): -- Nicolas Baradakis - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
Nicolas Baradakis wrote: ... +ifeq ($(docdir),no) +install: + @echo 'Documentation files will NOT be installed.' +else I'd prefer not to have multiple install targets... even if they're wrapped with 'ifeq'. Sort of like how #ifdef's in the code should be avoided. Maybe instead: install: if [ $(docdir) != no ]; \ then \ $(INSTALL) ; \ for file in ... \ done; \ @$(MAKE) ... \ fi install: $(INSTALL) -d -m 755 $(R)$(docdir) for file in *[!~]; do \ if [ -f $$file -a $$file != Makefile ]; then \ $(INSTALL) -m 644 $$file $(R)$(docdir); \ fi; \ done @$(MAKE) $(MFLAGS) WHAT_TO_MAKE=$@ common +endif common: $(SUBDIRS) $(SUBDIRS): -- Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
Hi Nicolas, Alan and everyone, In message [EMAIL PROTECTED], Nicolas Baradakis [EMAIL PROTECTED] writes David Wood wrote: The second group of patches that remain I'm going to post below - because I think they might be candidates for committing to FreeRADIUS itself. It was clearly felt by previous contributors to the port that the Makefiles don't always contain $(CFLAGS) when they would be expected to. snip The patch adds $(CFLAGS) during the *link*. (not during compile) The linker doesn't need options such as -O3 or -I/path/to/include therefore I'd like to know the reasons why you believe this patch would be useful. I can't think of a reason why it was useful, and I really can't figure out why it was ever added. As you say, all three of these patches relate to link steps, not compilation ones. I've deleted these three patches from the version of the port in my local Subversion repository. There's one patch I wrote, which I think is a bug in a Makefile for 1.1.4 and 1.1.5 (hence the file name of patch-raddb-Makefile-1.1.4_bug): [...] otppasswd.sample seems to have disappeared from 1.1.4 onwards - is this a bug in that Makefile as I believe? If so, can that be fixed in CVS? Indeed it looks like a bug. I've fixed it in CVS. Thanks for the confirmation - that's another patch I look forward to throwing away. There's two other things I'm currently modifying the source to achieve, on which I'd appreciate comments. patch-doc::Makefile surrounds the contents of the install target in doc/Makefile with #ifndef NOPORTDOCS ... #endif. FreeBSD ports have to respect this flag. Is a neater way to pass --with-docdir=/dev/null to configure if NOPORTDOCS is defined (which I haven't tried) and abandon the patch. Has anyone any other suggestions? Every downstream distribution has its own mechanism to mark the files as documentation. --with-docdir=/dev/null results in mkdir: /dev/null: File exists It looks like the patch (or some other way of modifying doc/Makefile) will have to stay. I will continue to modify the source in some suitable way to achieve this. To install the sample raddb files in the correct location, I'm running sed across all Makefile and Makefile.in files, replacing $(R)$(raddbdir) with the appropriate location. I'd rather do this via configure, but if I use --with-raddbdir, that changes the install location of the files *and* the default location the server looks for those files. The latter change isn't wanted. Every downstream distribution has its own mechanism to handle the config files. I don't know the opinion of the others, but I'm unsure about a configure option that's useful for the FreeBSD port only. We have a consensus on this - Alan suggests a sed script. I have tidied up the way I'm doing this in my local version of the port. It's now a couple of find commands with explanatory comments. The first runs sed across each Makefile and Makefile.in, whilst the second removes the .bak files (so that the one in doc/ isn't installed as documentation). That will do fine. With the changes outlined above, I've got one patch which should be unnecessary in 1.1.6 and onwards (because the underlying problem in the source has been fixed), one patch that I believe is only needed for FreeBSD 4.x compatibility (which I expect to remove when that is discontinued), and one patch that's needed to support NOPORTDOCS. That's much more maintainable than the nine patches the port had when I first took the FreeRADIUS FreeBSD port over. Thanks for your comments and support, David -- David Wood [EMAIL PROTECTED] - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
David Wood wrote: The second group of patches that remain I'm going to post below - because I think they might be candidates for committing to FreeRADIUS itself. It was clearly felt by previous contributors to the port that the Makefiles don't always contain $(CFLAGS) when they would be expected to. It might be that these patches are also unnecessary with the build system used from 1.1.3 onwards - if so, will someone explain why and I'll remove these patches too. I believe they are still needed judging by the output of make, but I'm willing to be corrected (in Alan's gentle style if needs be!). [...] The patch adds $(CFLAGS) during the *link*. (not during compile) The linker doesn't need options such as -O3 or -I/path/to/include therefore I'd like to know the reasons why you believe this patch would be useful. There's one patch I wrote, which I think is a bug in a Makefile for 1.1.4 and 1.1.5 (hence the file name of patch-raddb-Makefile-1.1.4_bug): [...] otppasswd.sample seems to have disappeared from 1.1.4 onwards - is this a bug in that Makefile as I believe? If so, can that be fixed in CVS? Indeed it looks like a bug. I've fixed it in CVS. There's two other things I'm currently modifying the source to achieve, on which I'd appreciate comments. patch-doc::Makefile surrounds the contents of the install target in doc/Makefile with #ifndef NOPORTDOCS ... #endif. FreeBSD ports have to respect this flag. Is a neater way to pass --with-docdir=/dev/null to configure if NOPORTDOCS is defined (which I haven't tried) and abandon the patch. Has anyone any other suggestions? Every downstream distribution has its own mechanism to mark the files as documentation. To install the sample raddb files in the correct location, I'm running sed across all Makefile and Makefile.in files, replacing $(R)$(raddbdir) with the appropriate location. I'd rather do this via configure, but if I use --with-raddbdir, that changes the install location of the files *and* the default location the server looks for those files. The latter change isn't wanted. Every downstream distribution has its own mechanism to handle the config files. I don't know the opinion of the others, but I'm unsure about a configure option that's useful for the FreeBSD port only. -- Nicolas Baradakis - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: FreeBSD FreeRADIUS port updated to 1.1.5, with various enhancements
Nicolas Baradakis wrote: .. Every downstream distribution has its own mechanism to handle the config files. I don't know the opinion of the others, but I'm unsure about a configure option that's useful for the FreeBSD port only. It's easier to run a port-specific sed script. i.e. This is the first time in 8 years that a request has been made for this feature. It's not critical that it's added to CVS. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html