Re: fstab.h for ARM

2010-03-04 Thread Simon Josefsson
Jon Grosshart  writes:

> Trying to build samba 3.5.0 on a DNS-323 embeded NAS running on ARM
> with Uclibc. mount.cifs fails with not finding fstab.h

Is Samba using gnulib?  If not, anything done in gnulib will not help.

It seems gnulib could easily provide a fstab.h replacement and its
related functions.  The functions are by nature not thread safe, so I'm
not certain it is wise to promote their use.  On the other hand, there
is plenty of thread-unsafe code in gnulib already which is useful for
applications that aren't threaded.

Does anyone else have any opinion on the fstab APIs?

http://www.gnu.org/software/libc/manual/html_node/fstab.html

I wonder if it is strictly glibc-only, or if some other systems have
adopted the same interface?  If some other system also supports the same
interface, I think that is another indication that it would make sense
to add it to gnulib.

I'm inclined to add it, if for nothing else just completeness, and will
volunteer to add it and write some test cases for it.

/Simon




exit

2010-03-04 Thread Simon Josefsson
Building all modules leads to this warning:

gnulib-tool: warning: module obstack depends on a module with an incompatible 
license: exit

I took a look at this.  Here is the 'exit' module definition:

,
| Description:
| exit() function: program termination.
| 
| Files:
| 
| Depends-on:
| stdlib
| 
| configure.ac:
| 
| Makefile.am:
| 
| Include:
| 
| 
| License:
| GPL
| 
| Maintainer:
| Bruno Haible
`

The stdlib module is LGPLv2.1+.

Is the 'exit' module really useful, other than transition for old code
when the exit module provided something?  It was changed to this content
back in 2007.

How about adding this to the 'exit' module:

,
| Status:
| obsolete
| 
| Notice:
| This module is obsolete. It will be removed on 2011-01-01.  Use 'stdlib'.
`

Second to that option, how about changing the license to 'unlimited'
since the 'exit' module is just meta information?

/Simon




exitfail

2010-03-04 Thread Simon Josefsson
There is also this warning:

gnulib-tool: warning: module obstack depends on a module with an incompatible 
license: exitfail

The exitfail.h is:

extern int volatile exit_failure;

and exitfail.c is:

#include 
#include "exitfail.h"
#include 
int volatile exit_failure = EXIT_FAILURE;

Is this worth having the GPL on?  Assuming it is even copyrightable, it
seems rather trivial to me.  Any objections to relaxing the license to
at least LGPLv2.1+?

Further, exitfail.m4 is:

AC_DEFUN([gl_EXITFAIL],
[
  AC_LIBOBJ([exitfail])

  dnl No prerequisites of lib/exitfail.c.
  :
])

It seems this file could be dropped, and the AC_LIBOBJ moved to
modules/exitfail.

See patch below.

/Simon

>From 63d31953c3f950bfac3b51ac1cd63928969a7204 Mon Sep 17 00:00:00 2001
From: Simon Josefsson 
Date: Thu, 4 Mar 2010 14:42:41 +0100
Subject: [PATCH] exitfail: Relax license to LGPLv2.1+.  Drop exitfail.m4.

---
 m4/exitfail.m4   |   14 --
 modules/exitfail |5 ++---
 2 files changed, 2 insertions(+), 17 deletions(-)
 delete mode 100644 m4/exitfail.m4

diff --git a/m4/exitfail.m4 b/m4/exitfail.m4
deleted file mode 100644
index 56e2ce0..000
--- a/m4/exitfail.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-# exitfail.m4 serial 6
-dnl Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
-dnl Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_EXITFAIL],
-[
-  AC_LIBOBJ([exitfail])
-
-  dnl No prerequisites of lib/exitfail.c.
-  :
-])
diff --git a/modules/exitfail b/modules/exitfail
index 26f5a92..c889285 100644
--- a/modules/exitfail
+++ b/modules/exitfail
@@ -4,13 +4,12 @@ Set exit status for fatal signal.
 Files:
 lib/exitfail.h
 lib/exitfail.c
-m4/exitfail.m4
 
 Depends-on:
 exit
 
 configure.ac:
-gl_EXITFAIL
+AC_LIBOBJ([exitfail])
 
 Makefile.am:
 
@@ -18,7 +17,7 @@ Include:
 "exitfail.h"
 
 License:
-GPL
+LGPLv2.1+
 
 Maintainer:
 Paul Eggert
-- 
1.7.0





utime

2010-03-04 Thread Simon Josefsson
Jim, the utime module says:

Notice:
This module is obsolete. It can be removed on 2010-01-01.

Why is it obsolete?  Should we remove it now?  The code looks useful to
me, but I may be missing something.  I cannot find anything in NEWS or
doc/posix-functions/utime.texi to explain this either.

/Simon




Re: exitfail

2010-03-04 Thread Jim Meyering
Simon Josefsson wrote:
> There is also this warning:
>
> gnulib-tool: warning: module obstack depends on a module with an incompatible 
> license: exitfail
>
> The exitfail.h is:
>
> extern int volatile exit_failure;
>
> and exitfail.c is:
>
> #include 
> #include "exitfail.h"
> #include 
> int volatile exit_failure = EXIT_FAILURE;
>
> Is this worth having the GPL on?  Assuming it is even copyrightable, it
> seems rather trivial to me.  Any objections to relaxing the license to
> at least LGPLv2.1+?

I suppose you intend "LGPLv2+" here, so it's like all of the others,
and not LGPLv2.1+.  Likewise in the patch below.

> Further, exitfail.m4 is:
>
> AC_DEFUN([gl_EXITFAIL],
> [
>   AC_LIBOBJ([exitfail])
>
>   dnl No prerequisites of lib/exitfail.c.
>   :
> ])
>
> It seems this file could be dropped, and the AC_LIBOBJ moved to
> modules/exitfail.

I agree.

> Subject: [PATCH] exitfail: Relax license to LGPLv2.1+.  Drop exitfail.m4.
...
s/2.1/2/ in the log

>  Makefile.am:
>
> @@ -18,7 +17,7 @@ Include:
>  "exitfail.h"
>
>  License:
> -GPL
> +LGPLv2.1+

And here.

I'll see if Paul agrees.




Re: exitfail

2010-03-04 Thread Simon Josefsson
Jim Meyering  writes:

> I suppose you intend "LGPLv2+" here, so it's like all of the others,
> and not LGPLv2.1+.  Likewise in the patch below.

Yes, sorry.

> I'll see if Paul agrees.

Thanks!

/Simon




Re: utime

2010-03-04 Thread Simon Josefsson
Jim Meyering  writes:

> Given that coreutils stopped using it then (no problems), and that
> gnulib-tool has been warning anyone who uses it, outright removal
> should be safe, now.  Here's a patch to do that.
> I'll push tomorrow if no one objects.

Sounds good to me.

> +On some old platforms (Sequent), @code{utime (file, NULL)} fails to set the
> +file's timestamp to the current time.

I'm assuming nobody cares about Sequent any more.  If anyone does, it is
in the git history.

>  On some platforms, this function mis-handles trailing slash:
>  Solaris 9.

Is Solaris 9 considered too old as well?  Or is this problem
unimportant?

/Simon




Re: utime

2010-03-04 Thread Jim Meyering
Simon Josefsson wrote:
> Jim, the utime module says:
>
> Notice:
> This module is obsolete. It can be removed on 2010-01-01.
>
> Why is it obsolete?  Should we remove it now?  The code looks useful to
> me, but I may be missing something.  I cannot find anything in NEWS or
> doc/posix-functions/utime.texi to explain this either.

Hi Simon,

It's marked obsolete because it is no longer useful on any
reasonable porting target.

Bruno proposed to remove it outright about 10 months ago,
but ended up just marking it obsolete.  The topic arose here:

http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16569/focus=16579

Given that coreutils stopped using it then (no problems), and that
gnulib-tool has been warning anyone who uses it, outright removal
should be safe, now.  Here's a patch to do that.
I'll push tomorrow if no one objects.

>From 38f9736292bd1a902fb8eb767de538af76fafc18 Mon Sep 17 00:00:00 2001
From: Jim Meyering 
Date: Thu, 4 Mar 2010 15:36:51 +0100
Subject: [PATCH] utime: remove obsolete module

This module, like autoconf's AC_FUNC_UTIME_NULL macro, has been
unnecessary for years, and has been marked as obsolete for 10 months.
* modules/utime: Remove file.
* lib/utime.c: Remove file.
* m4/utime.m4: Remove file.
* m4/utimes-null.m4: Remove file.
* doc/posix-functions/utime.texi (utime): Remove reference to
the module.  Move the sole "fixed by gnulib" item into the
"problems not fixed by Gnulib" list.
* MODULES.html.sh (func_all_modules): Remove reference to "utime".
---
 ChangeLog  |   14 +
 MODULES.html.sh|1 -
 doc/posix-functions/utime.texi |8 ++--
 lib/utime.c|  108 
 m4/utime.m4|   62 ---
 m4/utimes-null.m4  |   41 ---
 modules/utime  |   38 --
 7 files changed, 18 insertions(+), 254 deletions(-)
 delete mode 100644 lib/utime.c
 delete mode 100644 m4/utime.m4
 delete mode 100644 m4/utimes-null.m4
 delete mode 100644 modules/utime

diff --git a/ChangeLog b/ChangeLog
index 12dc75c..914a544 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-03-04  Jim Meyering  
+
+   utime: remove obsolete module
+   This module, like autoconf's AC_FUNC_UTIME_NULL macro, has been
+   unnecessary for years, and has been marked as obsolete for 10 months.
+   * modules/utime: Remove file.
+   * lib/utime.c: Remove file.
+   * m4/utime.m4: Remove file.
+   * m4/utimes-null.m4: Remove file.
+   * doc/posix-functions/utime.texi (utime): Remove reference to
+   the module.  Move the sole "fixed by gnulib" item into the
+   "problems not fixed by Gnulib" list.
+   * MODULES.html.sh (func_all_modules): Remove reference to "utime".
+
 2010-03-02  Ralf Wildenhues  

fts-lgpl: remove unused module
diff --git a/MODULES.html.sh b/MODULES.html.sh
index b3b9122..080c60a 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -2370,7 +2370,6 @@ func_all_modules ()
   func_module tsearch
   func_module unistd
   func_module unlink
-  func_module utime
   func_module utimensat
   func_module vasnprintf-posix
   func_module vasprintf-posix
diff --git a/doc/posix-functions/utime.texi b/doc/posix-functions/utime.texi
index f50af81..7c7 100644
--- a/doc/posix-functions/utime.texi
+++ b/doc/posix-functions/utime.texi
@@ -4,18 +4,18 @@ utime

 POSIX specification: 
@url{http://www.opengroup.org/onlinepubs/9699919799/functions/utime.html}

-Gnulib module: utime
+Gnulib module: ---

 Portability problems fixed by Gnulib:
 @itemize
-...@item
-On some old platforms (Sequent), @code{utime (file, NULL)} fails to set the
-file's timestamp to the current time.
 @end itemize

 Portability problems not fixed by Gnulib:
 @itemize
 @item
+On some old platforms (Sequent), @code{utime (file, NULL)} fails to set the
+file's timestamp to the current time.
+...@item
 On some platforms, this function mis-handles trailing slash:
 Solaris 9.
 @item
diff --git a/lib/utime.c b/lib/utime.c
deleted file mode 100644
index b5d3aa5..000
--- a/lib/utime.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* Copyright (C) 1998, 2001-2004, 2006, 2009-2010 Free Software Foundation,
- * Inc.
-
-   This program is free software: you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 3 of the License, or any
-   later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see .  */
-
-/* derived from a function in touch.c */
-
-#include 
-#undef utime
-
-#include 
-
-#ifdef H

Re: utime

2010-03-04 Thread Jim Meyering
Simon Josefsson wrote:

> Jim Meyering  writes:
>
>> Given that coreutils stopped using it then (no problems), and that
>> gnulib-tool has been warning anyone who uses it, outright removal
>> should be safe, now.  Here's a patch to do that.
>> I'll push tomorrow if no one objects.
>
> Sounds good to me.
>
>> +On some old platforms (Sequent), @code{utime (file, NULL)} fails to set the
>> +file's timestamp to the current time.
>
> I'm assuming nobody cares about Sequent any more.  If anyone does, it is
> in the git history.
>
>>  On some platforms, this function mis-handles trailing slash:
>>  Solaris 9.
>
> Is Solaris 9 considered too old as well?  Or is this problem
> unimportant?

It's the function itself that is now irrelevant.
No one should be using utime anymore.
>From doc/posix-*/utime.texi:

@item
This function cannot set full timestamp resolution.  Use
@code{utimensat(AT_FDCWD,file,times,0)}, or the gnulib module utimens,
instead.




Re: utime

2010-03-04 Thread Eric Blake
According to Simon Josefsson on 3/4/2010 8:00 AM:
>>  On some platforms, this function mis-handles trailing slash:
>>  Solaris 9.
> 
> Is Solaris 9 considered too old as well?  Or is this problem
> unimportant?

Solaris 9 is still a live target (and even Solaris 8 is still reasonably
easy to maintain code for).  But I won't write a utime replacement for
Solaris, because an interface that only offers 1 second granularity is
pointless.

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: exit

2010-03-04 Thread Eric Blake
According to Simon Josefsson on 3/4/2010 6:33 AM:
> Building all modules leads to this warning:
> 
> gnulib-tool: warning: module obstack depends on a module with an incompatible 
> license: exit
> 
> 
> Is the 'exit' module really useful, other than transition for old code
> when the exit module provided something?  It was changed to this content
> back in 2007.
> 
> How about adding this to the 'exit' module:
> 
> ,
> | Status:
> | obsolete
> | 
> | Notice:
> | This module is obsolete. It will be removed on 2011-01-01.  Use 'stdlib'.
> `
> 
> Second to that option, how about changing the license to 'unlimited'
> since the 'exit' module is just meta information?

How about both - add the obsoletion notice, but also change the license to
LGPLv2 (unlimited seems a bit much in this case, since it is not build tools).

-- 
Eric Blake   ebl...@redhat.com+1-801-349-2682
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: exit

2010-03-04 Thread Simon Josefsson
Eric Blake  writes:

> According to Simon Josefsson on 3/4/2010 6:33 AM:
>> Building all modules leads to this warning:
>> 
>> gnulib-tool: warning: module obstack depends on a module with an 
>> incompatible license: exit
>> 
>> 
>> Is the 'exit' module really useful, other than transition for old code
>> when the exit module provided something?  It was changed to this content
>> back in 2007.
>> 
>> How about adding this to the 'exit' module:
>> 
>> ,
>> | Status:
>> | obsolete
>> | 
>> | Notice:
>> | This module is obsolete. It will be removed on 2011-01-01.  Use 'stdlib'.
>> `
>> 
>> Second to that option, how about changing the license to 'unlimited'
>> since the 'exit' module is just meta information?
>
> How about both - add the obsoletion notice, but also change the license to
> LGPLv2 (unlimited seems a bit much in this case, since it is not build tools).

Yes, good idea.  Let's wait for Paul to confirm and then fix this in one
patch.

/Simon




Re: exit

2010-03-04 Thread Simon Josefsson
Simon Josefsson  writes:

> Eric Blake  writes:
>
>> According to Simon Josefsson on 3/4/2010 6:33 AM:
>>> Building all modules leads to this warning:
>>> 
>>> gnulib-tool: warning: module obstack depends on a module with an 
>>> incompatible license: exit
>>> 
>>> 
>>> Is the 'exit' module really useful, other than transition for old code
>>> when the exit module provided something?  It was changed to this content
>>> back in 2007.
>>> 
>>> How about adding this to the 'exit' module:
>>> 
>>> ,
>>> | Status:
>>> | obsolete
>>> | 
>>> | Notice:
>>> | This module is obsolete. It will be removed on 2011-01-01.  Use 'stdlib'.
>>> `
>>> 
>>> Second to that option, how about changing the license to 'unlimited'
>>> since the 'exit' module is just meta information?
>>
>> How about both - add the obsoletion notice, but also change the license to
>> LGPLv2 (unlimited seems a bit much in this case, since it is not build 
>> tools).
>
> Yes, good idea.  Let's wait for Paul to confirm and then fix this in one
> patch.

Oops, the 'exit' module has Bruno as owner, not Paul (that was
exitfail).  Bruno, do you mind re-licensing the 'exit' module to
LGPLv2+?  And add the above obsolete warning?

/Simon




Re: exit

2010-03-04 Thread Bruno Haible
Hi Simon,

Both are good suggestions.

> Bruno, do you mind re-licensing the 'exit' module to
> LGPLv2+?

Fine with me. Please go ahead.

> And add the above obsolete warning? 

Also fine with me. At the same time, in doc/posix-functions/exit.texi,
it's appropriate to change "Gnulib module: exit" to "Gnulib module: stdlib".

Bruno




Re: gnulib module install

2010-03-04 Thread Karl Berry
Here's my attempt at describing the third "mixed" approach to Gnulib
sources.  Is it ok?


@node VCS Issues
@section Issues with Version Control Systems

If a project stores its source files in a version control system (VCS),
such as CVS, Subversion, or Git, one needs to decide which files to commit.

In principle, all files created by @code{gnulib-tool}, except
@file{gnulib-cache.m4}, can be treated like generated source files,
like for example a @file{parser.c} file generated from
@file{parser.y}.  Alternatively, they can be considered source files
and updated manually.

Here are the three different approaches in common use.  Each has its
place, and you should use whichever best suits your particular project
and development methods.

@enumerate
@item
In projects which commit all source files, whether generated or not,
into their VCS, the @code{gnulib-tool} generated files should all be
committed.  In this case, you should pass the option
@samp{--no-vc-files} to @code{gnulib-tool}, which avoids alteration of
VCS-related files such as @file{.cvsignore}.

Gnulib also contains files generated by @command{make} (and removed by
@code{make clean}), using information determined by
@command{configure}.  For a Gnulib source file of the form
@file{lib/foo.in.h}, the corresponding @file{lib/foo.h} is such a
@command{make}-generated file.  These should @emph{not} be checked
into the VCS, but instead added to @file{.cvsignore} or equivalent.

@item
In projects which customarily omit from their VCS all files that are
generated from other source files, none of these files and directories
are added into the VCS.  The only file that must be added to the VCS
is @file{gnulib-cache.m4} in the M4 macros directory.  Also, the
script for restoring files not in the VCS, customarily called
@file{autogen.sh} or @file{bootstrap.sh}, will typically contain the
statement for restoring the omitted files:

@smallexample
$ gnulib-tool --update
@end smallexample

The @samp{--update} option operates much like the @samp{--import} option,
but it does not offer the possibility to change the way Gnulib is used.
Also it does not report in the ChangeLogs the files that it had to add
because they were missing.

@item
Some projects take a ``middle road'': they do commit Gnulib source
files as in the first approach, but they do not commit other derived
files, such as a @code{Makefile.in} generated by Automake.  This
increases the size and complexity of the repository, but can help
occasional contributors by not requiring them to have a full Gnulib
checkout to do a build, and all developers by ensuring that all
developers are working with the same version of Gnulib in the
repository.  It also supports multiple Gnulib instances within a
project.  It remains important not to commit the
@command{make}-generated files, as described above.

@end enumerate




Re: fstab.h for ARM

2010-03-04 Thread Bruno Haible
Jon Grosshart wrote:
> Trying to build samba 3.5.0 on a DNS-323 embeded NAS running on ARM
> with Uclibc. mount.cifs fails with not finding fstab.h

You can try to use the 'mountlist' module. Unlike the concept of /etc/fstab,
this module is ported even to exotic platforms, from Solaris and Cygwin
to BeOS.

Bruno




Re: exit

2010-03-04 Thread Simon Josefsson
Bruno Haible  writes:

> Hi Simon,
>
> Both are good suggestions.
>
>> Bruno, do you mind re-licensing the 'exit' module to
>> LGPLv2+?
>
> Fine with me. Please go ahead.
>
>> And add the above obsolete warning? 
>
> Also fine with me. At the same time, in doc/posix-functions/exit.texi,
> it's appropriate to change "Gnulib module: exit" to "Gnulib module: stdlib".

I've pushed the patch below.

/Simon

>From fa93ceab8152b5382d328d2c5e6347e53b291cd0 Mon Sep 17 00:00:00 2001
From: Simon Josefsson 
Date: Fri, 5 Mar 2010 07:51:36 +0100
Subject: [PATCH] exit: Obsolete module, use stdlib instead.

---
 ChangeLog |8 
 NEWS  |3 +++
 doc/posix-functions/exit.texi |2 +-
 modules/exit  |9 +++--
 4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 12dc75c..6a5c340 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-03-05  Simon Josefsson  
+
+   * modules/exit (License): Relax license to LGPLv2+.
+   (Status): Mark as obsolete.
+   * NEWS: Mention deprecated 'exit' module.
+   * doc/posix-functions/exit.texi: Recommend 'stdlib' module instead
+   of now obsolete 'exit'.
+
 2010-03-02  Ralf Wildenhues  
 
fts-lgpl: remove unused module
diff --git a/NEWS b/NEWS
index 72b2b58..ad639dd 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ User visible incompatible changes
 
 DateModules Changes
 
+2010-03-05  exitThis module is deprecated, use 'stdlib' directly
+instead.  It will be removed 2011-01-01.
+
 2009-12-13  sublist The module does not define functions any more that
 call xalloc_die() in out-of-memory situations. Use
 module 'xsublist' and include file "gl_xsublist.h"
diff --git a/doc/posix-functions/exit.texi b/doc/posix-functions/exit.texi
index 74d13ae..e196e2a 100644
--- a/doc/posix-functions/exit.texi
+++ b/doc/posix-functions/exit.texi
@@ -4,7 +4,7 @@
 
 POSIX specification: 
@url{http://www.opengroup.org/onlinepubs/9699919799/functions/exit.html}
 
-Gnulib module: exit
+Gnulib module: stdlib
 
 Portability problems fixed by Gnulib:
 @itemize
diff --git a/modules/exit b/modules/exit
index 4de69b7..18899f2 100644
--- a/modules/exit
+++ b/modules/exit
@@ -1,6 +1,12 @@
 Description:
 exit() function: program termination.
 
+Status:
+obsolete
+
+Notice:
+This module is obsolete. It will be removed on 2011-01-01.  Use 'stdlib'.
+
 Files:
 
 Depends-on:
@@ -14,8 +20,7 @@ Include:
 
 
 License:
-GPL
+LGPLv2+
 
 Maintainer:
 Bruno Haible
-
-- 
1.7.0