Re: Port insserv to kfreebsd?

2009-06-28 Thread Guillem Jover
Hi!

[ Redirecting to debian-bsd as glibc-bsd-devel is not used anymore,
  and reinclucing the whole initial mail in quotes for context. ]

On Sun, 2009-06-28 at 13:27:50 +0200, Petter Reinholdtsen wrote:
> [Petter Reinholdtsen]
> > Hi.  I notice that the latest insserv package fail to build on
> > kfreebsd, because several posix_fadvise() arguments are unknown.  The
> > code in question is protected with #ifdefs like this:
> >
> >   #if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
> > else if ((dfd = dirfd(rcdir)) != 0) {
> > (void)posix_fadvise(dfd, 0, 0, POSIX_FADV_WILLNEED);
> > (void)posix_fadvise(dfd, 0, 0, POSIX_FADV_SEQUENTIAL);
> > }
> >   #endif
> >
> > Why is this test not sufficient on kfreebsd?  Can any of you provide
> > patches to get insserv working on kfreebsd?  I hope to make
> > dependency based boot sequencing a core part of the boot system in
> > Debian and then insserv should work on all archs.
> 
> I made this patch based on the changes done to startpar in sysvinit,
> but fail to understand why this is needed.  Can anyone confirm that
> this work on kfreebsd?
> 
> --- insserv-1.12.0.orig/insserv.c
> +++ insserv-1.12.0/insserv.c
> @@ -40,6 +40,13 @@
>  #endif /* USE_RPMLIB */
>  #include "listing.h"
> 
> +#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
> +/* kfreebsd fail to provide working posix_fadvise
> +#  ifndef POSIX_FADV_SEQUENTIAL
> +#define posix_fadvise(fd, off, len, adv)(-1)
> +#  endif
> +#endif
> +
>  #ifdef SUSE
>  # define DEFAULT_START_LVL "3 5"
>  # define DEFAULT_STOP_LVL  "3 5"

posix_fadvise is optional per POSIX, so checking that that builds if
you use autoconf or for the macro is better. You should also probably
return ENOSYS instead.

regards,
guillem


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Port insserv to kfreebsd?

2009-06-28 Thread Petr Salinger

[Petter Reinholdtsen]

Hi.  I notice that the latest insserv package fail to build on
kfreebsd, because several posix_fadvise() arguments are unknown.  The
code in question is protected with #ifdefs like this:

  #if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
else if ((dfd = dirfd(rcdir)) != 0) {
(void)posix_fadvise(dfd, 0, 0, POSIX_FADV_WILLNEED);
(void)posix_fadvise(dfd, 0, 0, POSIX_FADV_SEQUENTIAL);
}
  #endif

Why is this test not sufficient on kfreebsd?  Can any of you provide
patches to get insserv working on kfreebsd?  I hope to make
dependency based boot sequencing a core part of the boot system in
Debian and then insserv should work on all archs.


I made this patch based on the changes done to startpar in sysvinit,
but fail to understand why this is needed.  Can anyone confirm that
this work on kfreebsd?

--- insserv-1.12.0.orig/insserv.c
+++ insserv-1.12.0/insserv.c
@@ -40,6 +40,13 @@
 #endif /* USE_RPMLIB */
 #include "listing.h"

+#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600
+/* kfreebsd fail to provide working posix_fadvise
+#  ifndef POSIX_FADV_SEQUENTIAL
+#define posix_fadvise(fd, off, len, adv)(-1)
+#  endif
+#endif
+
 #ifdef SUSE
 # define DEFAULT_START_LVL "3 5"
 # define DEFAULT_STOP_LVL  "3 5"


posix_fadvise is optional per POSIX, so checking that that builds if
you use autoconf or for the macro is better.


See 
http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fadvise.html


APPLICATION USAGE

The posix_fadvise() function is part of the Advisory Information
option and need not be provided on all implementations.


You should also probably return ENOSYS instead.


Well, to be 100% correct, errno should be set to ENOSYS and return -1.
The eventually implemented posix_fadvise() could only provide hint
to the kernel memory and io management.
The result of posix_fadvise() is not checked anyway.

The proper upstream way should be to guard all usage
of posix_fadvise() by something like
"#if USE_FADVISE" instead of current
"#if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) >= 600"

and either check by autoconf for presence of function and macros
or put at the begin of insserv.c light variant like

#if defined(POSIX_FADV_SEQUENTIAL)
#define USE_FADVISE 1
#endif

The "#define posix_fadvise(fd, off, len, adv) (-1)" is sufficient
for GNU/kFreeBSD build.

Petr


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



porter NMUs for GNU/kFreeBSD needed

2009-06-28 Thread Petr Salinger

Hi all,

We are being blocked by some build failures,
IMHO suitable for immediate porter NMU are:

- guile-1.6: #533269
  FTBFS on kfreebsd-i386 (one line fixup of debian/rules needed)
  there are alredy 3 NMUs in the row, the needed change is
-WORKING_QTHREADS_ARCHS := i386 alpha
+WORKING_QTHREADS_ARCHS := i386 alpha kfreebsd-i386

- python-stdlib-extensions: #521078
  FTBFS with current blt-dev (build-depends have to be changed)
  Serious bug since Tue, 24 Mar 2009, blocks at least GNOME

Also some others from [1] will be eligible.
The next problem seems to be hal :-(

Please could someone DD take care of it.

Petr


[1] 
http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=kfreebsd;users=glibc-bsd-de...@lists.alioth.debian.org;pri0=pending:pending,forwarded,pending-fixed,fixed;ttl0=Outstanding,Forwarded,Pending%20Upload,Fixed%20in%20NMU;pri1=pending%3dpending%2btag%3dwontfix,pending%3dpending%2btag%3dmoreinfo,pending%3dpending%2btag%3dpatch,pending%3dpending%2btag%3dconfirmed,pending%3dpending;ttl1=Will%20Not%20Fix,More%20information%20needed,Patch%20Available,Confirmed,Unclassified;ord1=2,3,4,1,0,5


--
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org