Your message dated Sat, 04 Nov 2006 23:18:50 -0800
with message-id <[EMAIL PROTECTED]>
and subject line Bug#327622: fixed in qemu 0.8.2-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: qemu
Version: 0.7.0-4+kbsd
Severity: important
Tags: patch

Attached is a patch to build qemu on GNU/kFreeBSD.  It requires to update the
package to 0.7.2 source first.

Please take the following considerations (from patch header):

  Don't send to upstream.  This patch conflicts with the one in the FreeBSD 
ports
  collection, where sane replacements for some of these hunks are being merged.

  Don't modify this patch directly.  It is generated semi-automaticaly from the
  stuff in http://glibc-bsd.alioth.debian.org/patches/qemu/.  When updating for 
a
  new qemu release, it should be generated the same way.

-- System Information:
Debian Release: testing/unstable
Architecture: kfreebsd-i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: GNU/kFreeBSD 5.3-1
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL 
set to C)

Versions of packages qemu depends on:
ii  bochsbios     2.2.1-1                    BIOS for the Bochs emulator
ii  libc0.1       2.3-1+kbsd.11              GNU C Library: Shared libraries an
ii  libsdl1.2debi 1.2.7+1.2.8cvs20041007-5.3 Simple DirectMedia Layer
ii  openhackware  0.4.1-1                    OpenFirmware emulator for PowerPC
ii  proll         18-1                       JavaStation PROM 2.x compatible re
ii  vgabios       0.5c-1                     VGA BIOS software for the Bochs an
ii  zlib1g        1:1.2.3-4                  compression library - runtime

Versions of packages qemu recommends:
pn  debootstrap                   <none>     (no description available)
ii  sharutils                     1:4.2.1-15 shar, unshar, uuencode, uudecode

-- no debconf information
#DPATCHLEVEL=1 

Don't send to upstream.  This patch conflicts with the one in the FreeBSD ports
collection, where sane replacements for some of these hunks are being merged.

Don't modify this patch directly.  It is generated semi-automaticaly from the
stuff in http://glibc-bsd.alioth.debian.org/patches/qemu/.  When updating for a
new qemu release, it should be generated the same way.

diff -ur qemu-0.7.2.old/audio/audio.c qemu-0.7.2/audio/audio.c
--- qemu-0.7.2.old/audio/audio.c        2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2/audio/audio.c    2005-09-11 17:01:16.000000000 +0200
@@ -28,6 +28,10 @@
 
 #include "audio/audio_int.h"
 
+#ifndef INT16_MAX
+#define        INT16_MAX       0x7fff
+#endif
+
 #define dolog(...) AUD_log ("audio", __VA_ARGS__)
 #ifdef DEBUG
 #define ldebug(...) dolog (__VA_ARGS__)
diff -ur qemu-0.7.2.old/configure qemu-0.7.2/configure
--- qemu-0.7.2.old/configure    2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2/configure        2005-09-11 17:01:16.000000000 +0200
@@ -96,7 +96,7 @@
 MINGW32*)
 mingw32="yes"
 ;;
-FreeBSD)
+*FreeBSD)
 bsd="yes"
 oss="yes"
 if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then
@@ -124,11 +124,7 @@
 ;;
 esac
 
-if [ "$bsd" = "yes" ] ; then
-  if [ ! "$darwin" = "yes" ] ; then
-    make="gmake"
-  fi
-fi
+make="`which gmake || which make`"
 
 # find source path
 # XXX: we assume an absolute path is given when launching configure, 
@@ -593,13 +589,19 @@
 echo "SRC_PATH=$source_path" >> $config_mak
 echo "TARGET_DIRS=$target_list" >> $config_mak
 
-# XXX: suppress that
 if [ "$bsd" = "yes" ] ; then
-  echo "#define O_LARGEFILE 0" >> $config_h
-  echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
   echo "#define _BSD 1" >> $config_h
 fi
 
+cat >> $config_h << __EOF__
+#ifndef O_LARGEFILE
+# define O_LARGEFILE 0
+#endif
+#ifndef MAP_ANONYMOUS
+# define MAP_ANONYMOUS MAP_ANON
+#endif
+__EOF__
+
 for target in $target_list; do 
 
 target_dir="$target"
diff -ur qemu-0.7.2.old/fpu/softfloat-native.c qemu-0.7.2/fpu/softfloat-native.c
--- qemu-0.7.2.old/fpu/softfloat-native.c       2005-09-04 19:11:31.000000000 
+0200
+++ qemu-0.7.2/fpu/softfloat-native.c   2005-09-11 17:01:49.000000000 +0200
@@ -6,7 +6,8 @@
 void set_float_rounding_mode(int val STATUS_PARAM)
 {
     STATUS(float_rounding_mode) = val;
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && \
+    (defined(__FreeBSD__) && __FreeBSD_version < 500000)
     fpsetround(val);
 #elif defined(__arm__)
     /* nothing to do */
@@ -22,7 +23,7 @@
 }
 #endif
 
-#if defined(_BSD)
+#if defined(_BSD) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
 #define lrint(d)               ((int32_t)rint(d))
 #define llrint(d)              ((int64_t)rint(d))
 #endif
diff -ur qemu-0.7.2.old/fpu/softfloat-native.h qemu-0.7.2/fpu/softfloat-native.h
--- qemu-0.7.2.old/fpu/softfloat-native.h       2005-09-04 19:11:31.000000000 
+0200
+++ qemu-0.7.2/fpu/softfloat-native.h   2005-09-11 17:03:01.000000000 +0200
@@ -1,6 +1,6 @@
 /* Native implementation of soft float functions */
 #include <math.h>
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)
 #include <ieeefp.h>
 #else
 #include <fenv.h>
@@ -33,12 +33,13 @@
 /*----------------------------------------------------------------------------
 | Software IEC/IEEE floating-point rounding mode.
 *----------------------------------------------------------------------------*/
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) && !defined(__GLIBC__) && \
+    (!defined(__FreeBSD__) || __FreeBSD_version < 500000)
 enum {
     float_round_nearest_even = FP_RN,
-    float_round_down         = FE_RM,
-    float_round_up           = FE_RP,
-    float_round_to_zero      = FE_RZ
+    float_round_down         = FP_RM,
+    float_round_up           = FP_RP,
+    float_round_to_zero      = FP_RZ
 };
 #elif defined(__arm__)
 enum {
diff -ur qemu-0.7.2.old/fpu/softfloat.h qemu-0.7.2/fpu/softfloat.h
--- qemu-0.7.2.old/fpu/softfloat.h      2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2/fpu/softfloat.h  2005-09-11 17:01:16.000000000 +0200
@@ -84,7 +84,8 @@
 #define FLOAT128
 #else
 /* native float support */
-#if (defined(__i386__) || defined(__x86_64__)) && !defined(_BSD)
+#if (defined(__i386__) || defined(__x86_64__)) && \
+    (!defined(_BSD) || defined(__FreeBSD__) || defined(__GLIBC__))
 #define FLOATX80
 #endif
 #endif /* !CONFIG_SOFTFLOAT */
diff -ur qemu-0.7.2.old/i386-dis.c qemu-0.7.2/i386-dis.c
--- qemu-0.7.2.old/i386-dis.c   2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2/i386-dis.c       2005-09-11 17:01:16.000000000 +0200
@@ -2896,6 +2896,10 @@
   OP_E (bytemode, sizeflag);
 }
 
+#ifndef PRIx64
+#define PRIx64 "llx"
+#endif
+
 static void
 print_operand_value (buf, hex, disp)
   char *buf;
diff -ur qemu-0.7.2.old/osdep.c qemu-0.7.2/osdep.c
--- qemu-0.7.2.old/osdep.c      2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2/osdep.c  2005-09-11 17:01:16.000000000 +0200
@@ -323,7 +323,9 @@
 
 #elif defined(USE_KQEMU)
 
+#ifdef __linux__
 #include <sys/vfs.h>
+#endif
 #include <sys/mman.h>
 #include <fcntl.h>
 
@@ -334,6 +336,7 @@
     const char *tmpdir;
     char phys_ram_file[1024];
     void *ptr;
+#ifdef __linux__
     struct statfs stfs;
 
     if (phys_ram_fd < 0) {
@@ -389,12 +392,20 @@
         }
         unlink(phys_ram_file);
     }
+#endif
     size = (size + 4095) & ~4095;
+#ifdef __linux__
     ftruncate(phys_ram_fd, phys_ram_size + size);
     ptr = mmap(NULL, 
                size, 
                PROT_WRITE | PROT_READ, MAP_SHARED, 
                phys_ram_fd, phys_ram_size);
+#else
+    ptr = mmap(NULL, 
+               size, 
+               PROT_WRITE | PROT_READ, MAP_PRIVATE|MAP_ANON, 
+               -1, 0);
+#endif
     if (ptr == MAP_FAILED) {
         fprintf(stderr, "Could not map physical memory\n");
         exit(1);
diff -ur qemu-0.7.2.old/vl.c qemu-0.7.2/vl.c
--- qemu-0.7.2.old/vl.c 2005-09-04 19:11:31.000000000 +0200
+++ qemu-0.7.2/vl.c     2005-09-11 17:04:25.000000000 +0200
@@ -42,9 +42,12 @@
 #include <dirent.h>
 #ifdef _BSD
 #include <sys/stat.h>
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__GLIBC__)
 #include <libutil.h>
 #endif
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <sys/module.h>
+#endif
 #else
 #include <linux/if.h>
 #include <linux/if_tun.h>
@@ -767,6 +770,14 @@
     case QEMU_TIMER_REALTIME:
 #ifdef _WIN32
         return GetTickCount();
+#elif defined(_BSD)
+        {
+            struct timeval r;
+            if (!gettimeofday(&r, NULL)) {
+                return ((timer_freq * 1000LL) * (int64_t)r.tv_sec 
+                      + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq;
+            }
+        }        
 #else
         {
             struct tms tp;
@@ -1317,7 +1328,7 @@
     return chr;
 }
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__GLIBC__)
 CharDriverState *qemu_chr_open_pty(void)
 {
     char slave_name[1024];
@@ -1629,6 +1640,34 @@
 
 #endif /* CONFIG_SLIRP */
 
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#define LOAD_QUIETLY   1
+#define LOAD_VERBOSLY  2
+
+int
+loadmodules(int how, const char *module, ...)
+{
+  int loaded = 0;
+  va_list ap;
+
+  va_start(ap, module);
+#ifndef NO_MODULES
+  while (module != NULL) {
+    if (modfind(module) == -1) {
+      if (kldload(module) == -1) {
+        if (how == LOAD_VERBOSLY)
+          fprintf(stderr, "%s: Cannot load module\n", module);
+      } else
+        loaded++;
+    }
+    module = va_arg(ap, const char *);
+  }
+  va_end(ap);
+#endif
+  return loaded;
+}
+#endif
+
 #if !defined(_WIN32)
 #ifdef _BSD
 static int tun_open(char *ifname, int ifname_size)
@@ -1637,14 +1676,58 @@
     char *dev;
     struct stat s;
 
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+    int i, kldtried = 0, enoentcount = 0, err = 0;
+    char dname[100];
+#ifdef USE_DEVTAP
+    /*
+     * 5.x has /dev/tap, but that seems to just blindly increase its
+     * couter on every open() for some people(??), i.e. on every qemu run.
+     */
+    i = -1;
+#else
+    i = 0;
+#endif
+    for (; i < 10; i++) {
+        if (i == -1)
+           strcpy(dname, "/dev/tap");
+        else
+           snprintf(dname, sizeof dname, "%s%d",
+                    "/dev/tap", i);
+        fd = open(dname, O_RDWR);
+        if (fd >= 0)
+            break;
+        else if (errno == ENXIO || errno == ENOENT) {
+            if (i == 0 && !kldtried++) {
+                /*
+                 * Attempt to load the tunnel interface KLD if it isn't loaded
+                 * already.
+                 */
+                if (loadmodules(LOAD_VERBOSLY, "if_tap", NULL))
+                    i = -1;
+                continue;
+            }
+            if (errno != ENOENT || ++enoentcount > 3) {
+                err = errno;
+               break;
+            }
+        } else
+            err = errno;
+    }
+    if (fd < 0) {
+        fprintf(stderr, "warning: could not open %s (%s): no virtual network 
emulation\n", dname, strerror(err));
+        return -1;
+    }
+#else
     fd = open("/dev/tap", O_RDWR);
     if (fd < 0) {
-        fprintf(stderr, "warning: could not open /dev/tap: no virtual network 
emulation\n");
+        fprintf(stderr, "warning: could not open /dev/tap (%s): no virtual 
network emulation\n", strerror(errno));
         return -1;
     }
+#endif
 
     fstat(fd, &s);
-    dev = devname(s.st_rdev, S_IFCHR);
+    dev = "/dev/tap";
     pstrcpy(ifname, ifname_size, dev);
 
     fcntl(fd, F_SETFL, O_NONBLOCK);

--- End Message ---
--- Begin Message ---
Source: qemu
Source-Version: 0.8.2-2

We believe that the bug you reported is fixed in the latest version of
qemu, which is due to be installed in the Debian FTP archive:

qemu_0.8.2-2.diff.gz
  to pool/main/q/qemu/qemu_0.8.2-2.diff.gz
qemu_0.8.2-2.dsc
  to pool/main/q/qemu/qemu_0.8.2-2.dsc
qemu_0.8.2-2_i386.deb
  to pool/main/q/qemu/qemu_0.8.2-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <[EMAIL PROTECTED]> (supplier of updated qemu package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun,  5 Nov 2006 08:48:27 +0200
Source: qemu
Binary: qemu
Architecture: source i386
Version: 0.8.2-2
Distribution: unstable
Urgency: low
Maintainer: Debian QEMU Team <[EMAIL PROTECTED]>
Changed-By: Guillem Jover <[EMAIL PROTECTED]>
Description: 
 qemu       - fast processor emulator
Closes: 327622 369462 390166 392481 396139
Changes: 
 qemu (0.8.2-2) unstable; urgency=low
 .
   [ Guillem Jover ]
   * Update Tag field to match new debtags vocabulary.
   * Clean properly. (Closes: #390166)
     - Remove the acpi generated files and the docs.
     - Revert the docs regeneration forcing logic.
     Thanks to Anderson Lizardo <[EMAIL PROTECTED]>.
   * On install use DESTDIR instead of specifying all paths. (Closes: #396139)
     Thanks to Anderson Lizardo <[EMAIL PROTECTED]>.
   * Port to GNU/kFreeBSD. (Closes: #327622)
     - Disable ALSA on non-linux systems.
     - Add a Build-Depends on libfreebsd-dev on kfreebsd systems.
     - Add kfreebsd-i386 and kfreebsd-amd64 to the Architecture field.
     - debian/patches/65_kfreebsd.patch: New file.
     Thanks Petr Salinger <[EMAIL PROTECTED]>.
   * In qemu-make-debian-root do not explicitely install in aptitude and
     libsigc++-1.2-5c102, they are pulled now by default. And do not remove
     aptitude afterwards. (Closes: #392481)
     Thanks to Ted Percival <[EMAIL PROTECTED]>.
   * Add experimental ncurses ui support. (Closes: #369462)
     - debian/patches/80_ui_curses.patch: New file.
     Thanks to Andrzej Zaborowski <[EMAIL PROTECTED]>.
   * Add SO_PEERCRED and SO_SNDTIMEO support, and fix accept syscall when
     being passed NULL pointers.
     - debian/patches/21_net_sockopts.patch: Renamed to ...
     - debian/patches/21_net_soopts.patch: ... here. Modify.
     Thanks to Pablo Virolainen.
   * Add a fadvise64 syscall stub.
     - debian/patches/39_syscall_fadvise64.patch: New file.
     Thanks to Pablo Virolainen.
   * Add EABI unmuxed socket syscalls.
     - debian/patches/55_unmux_socketcall.patch: New file.
     Thanks to Riku Voipio.
   * Add TLS sections to the ARM and x86 linker scripts so that qemu user
     emulators can be linked statically.
     - debian/patches/66_tls_ld.patch: New file.
   * Move the documentation of the binary blob removals from the original
     upstream tarball from README.Debian to debian/copyright.
   * Reword the emphasis on "FAST!" from the package description.
   * Fix FTBFS on powerpc by adding the missing fp_status variable to the
     int32_to_float32 function calls.
     - debian/patches/67_ppc_ftbfs.patch: New file.
Files: 
 30fd577775dbb486d78600c6ae3dbee5 1118 misc optional qemu_0.8.2-2.dsc
 548739b0197438e43ba2358e1a48adca 54945 misc optional qemu_0.8.2-2.diff.gz
 1006d02f6a0fb2ab931f7e4d43d11ac8 3675230 misc optional qemu_0.8.2-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFTYx8uW9ciZ2SjJsRAoc/AJ0UN+owNHVWhSyxQUGO0PBhM7DGQACfbmjf
KTbIyGeDShfC6VAYrsEW5YY=
=ZQIx
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to