Re: [RFC] getting rid of the config.guess/sub problem when bootstrapping new ports/systems

2013-05-21 Thread Earnie Boyd
On Tue, May 21, 2013 at 2:34 AM, Ben Elliston wrote:
 On Mon, May 20, 2013 at 02:54:20PM +0800, Paul Wise wrote:

 There are thousands of copies of config.guess/sub (or configure
 scripts) out there (in tarballs) with no support for this at
 all. Once it is added to config.guess/sub in git (or autoconf) then
 it will take many years before the majority of copies of
 config.guess/sub (or configure scripts) have support for this. This
 is what I mean by bootstrap phase.

 Right.  Just thinking out loud: isn't the Autoconf concept of aux
 dir of use here?  That's where configure looks for config.guess.

 The latest version of install-sh, config.guess, etc. could live in
 such a system-wide directory.  Unfortunately, it's not possible to set
 auxdir from the configure command line as you can with --srcdir, etc.

Maybe have a common directory of /usr/[local/]share/autoconf/auxdir
and teach autoconf to look there if it doesn't find
config.guess/config.sub in the project directory and copy them when
copy is specified?  I dislike the environment variable idea.  Too
fragile, someone forgets it is set and then has trouble because the
config.guess/config.sub he's trying to use isn't being used.  I know
you mean for the variable to be set at autoreconf/configure usage but
there are always idiots who install it into their .profile files and
forget they did that.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

___
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches


Re: [RFC] getting rid of the config.guess/sub problem when bootstrapping new ports/systems

2013-05-21 Thread Earnie Boyd
On Tue, May 21, 2013 at 7:09 AM, Ben Elliston wrote:
 When it comes to people building distro packages, here is another idea
 thinking out loud.  What's wrong with ..

 $ find /tree/of/src/trees -name config.guess -exec ln -sf /etc/config.guess 
 {} \;


People forgetting about the symlink during distribution of their
package.  Not all systems support it.  Using cp -f would be better.

 This puts the latest version into the tree, no patching required.

I tend to use a sub module repository and have config.guess and
config.sub in a directory (build-aux/) and I tell autoconf via
configure.ac where to find it.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

___
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches


Re: [RFC] getting rid of the config.guess/sub problem when bootstrapping new ports/systems

2013-05-21 Thread Eric Blake
On 05/21/2013 04:59 AM, Earnie Boyd wrote:
 Maybe have a common directory of /usr/[local/]share/autoconf/auxdir
 and teach autoconf to look there if it doesn't find
 config.guess/config.sub in the project directory and copy them when
 copy is specified?  I dislike the environment variable idea.  Too
 fragile, someone forgets it is set and then has trouble because the
 config.guess/config.sub he's trying to use isn't being used.  I know
 you mean for the variable to be set at autoreconf/configure usage but
 there are always idiots who install it into their .profile files and
 forget they did that.

Sorry, but this is the autoconf maintainer speaking:

I much prefer the environment variable approach.  It is the same as we
do for other tools, such as $CC or $GREP.  Users already have to be
aware of environment variables they have set; furthermore, we can mark
such variables as precious so that config.log records what was used.

Quit trying to overengineer a path search - all I am willing to commit
into autoconf is an environment variable override.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature
___
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches


Re: [RFC] getting rid of the config.guess/sub problem when bootstrapping new ports/systems

2013-05-21 Thread Earnie Boyd
On Tue, May 21, 2013 at 7:59 AM, Ben Elliston wrote:

 First, this does not solve the problem because it requires that every
 package get a new version of config.guess.  We're trying to overcome
 having to modify every package.

So that's your objection to the symlink/copy idea as well?

 Second, I don't like the idea of doing things that surprise users.  That will
 confuse people.

It also causes recursiveness so the idea is lame unless we also trap
the recursive nature to one instance.  I don't think it is that
confusing but perhaps --with-config-dir=/path/to/config files might be
nice and configure would execute the config.guess and config.sub in
that directory or error if the files do not exist or are unreadable.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

___
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches


Re: [RFC] getting rid of the config.guess/sub problem when bootstrapping new ports/systems

2013-05-21 Thread Pavel Raiskup
  Works for me.  But we [distros] do want to mandate autoreconf anyway in the
  general case: it is the *only* way to keep upstream honest about the much
  hated build system not bitrotting until it decides to blow up right when we
  need it for a security update.
 
 I know.  But there is a lot of tarballs not able to be easily
 autoreconf-ed (more than 10 years old) and not having upstream.. and it
 needs a lot of changes downstream before autoreconf successes.. (and you
 need to have a quite good knowledge about auto-toolset).
 
 If upstream is dead, the distros should perhaps reevaluate whether to
 drop the package or de facto become upstream by a process of adoption.

Yes.  But if the problem is as easy as outdated config.{guess,sub}, simply
setting the CONFIG_{GUESS,SUB} variable is far more suitable.  Sometimes
distros are deploying compat packages having outdated sources.

What about this?  Ben (and others), would you consider something similar
like this one?  Without PATH traversal it could be very trivial:

diff --git a/config.sub b/config.sub
index 8b612ab..daac889 100755
--- a/config.sub
+++ b/config.sub
@@ -50,6 +50,12 @@ timestamp='2013-04-24'
 #  CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
 # It is wrong to echo any other type of specification.
 
+if test -n $CONFIG_SUB; then
+# clean CONFIG_SUB variable!
+CONFIG_SUB= $CONFIG_SUB $1
+exit
+fi
+
 me=`echo $0 | sed -e 's,.*/,,'`
 
 usage=\


___
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches


Re: [RFC] getting rid of the config.guess/sub problem when bootstrapping new ports/systems

2013-05-21 Thread Ben Elliston
I suggested a simple, low impact way of updating the files,
particularly for people wanting to build a large number of packages
(eg, for a distro). Can anyone tell me why this approach is not
satisfactory?

Ben


signature.asc
Description: Digital signature
___
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches