From d5d75797a98396f4dc1dddfa83d5e3e41f9443b43f921b1b2e24c7ac3590b01c Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 8 Oct 2008 16:35:55 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=28 --- qemu-0.9.0-nousbdevfs.patch | 192 ------------------------------------ qemu-20080703.tar.bz2 | 3 - qemu-20081008.tar.bz2 | 3 + qemu-cvs-ia64.patch | 24 ----- qemu-cvs-ipc.patch | 32 +++--- qemu-img-vmdk-scsi.patch | 17 ++-- qemu-svn-nodyngen.patch | 12 +-- qemu-svn-pcap.patch | 26 ++--- qemu.changes | 15 +++ qemu.spec | 37 +++++-- 10 files changed, 90 insertions(+), 271 deletions(-) delete mode 100644 qemu-0.9.0-nousbdevfs.patch delete mode 100644 qemu-20080703.tar.bz2 create mode 100644 qemu-20081008.tar.bz2 diff --git a/qemu-0.9.0-nousbdevfs.patch b/qemu-0.9.0-nousbdevfs.patch deleted file mode 100644 index db3a098..0000000 --- a/qemu-0.9.0-nousbdevfs.patch +++ /dev/null @@ -1,192 +0,0 @@ ---- usb-linux.c -+++ usb-linux.c -@@ -52,7 +52,7 @@ - //#define DEBUG_ISOCH - //#define USE_ASYNCIO - --#define USBDEVFS_PATH "/proc/bus/usb" -+#define USBDEVFS_PATH "/dev/bus/usb" - #define PRODUCT_NAME_SZ 32 - #define SIG_ISOCOMPLETE (SIGRTMIN+7) - #define MAX_ENDPOINTS 16 -@@ -707,102 +707,96 @@ - return NULL; - } - --static int get_tag_value(char *buf, int buf_size, -- const char *str, const char *tag, -- const char *stopchars) --{ -- const char *p; -- char *q; -- p = strstr(str, tag); -- if (!p) -- return -1; -- p += strlen(tag); -- while (isspace(*p)) -- p++; -- q = buf; -- while (*p != '\0' && !strchr(stopchars, *p)) { -- if ((q - buf) < (buf_size - 1)) -- *q++ = *p; -- p++; -- } -- *q = '\0'; -- return q - buf; --} -- - static int usb_host_scan(void *opaque, USBScanFunc *func) - { - FILE *f; - char line[1024]; -- char buf[1024]; -- int bus_num, addr, speed, device_count, class_id, product_id, vendor_id; -+ int bus_num, addr, speed, class_id, product_id, vendor_id; - int ret; - char product_name[512]; -- -- f = fopen(USBDEVFS_PATH "/devices", "r"); -- if (!f) { -- term_printf("Could not open %s\n", USBDEVFS_PATH "/devices"); -+ DIR* d; -+ struct dirent* de; -+ -+ d = opendir("/sys/bus/usb/devices"); -+ if (!d) { -+ term_printf("Could not open /sys/bus/usb/devices\n"); - return 0; - } -- device_count = 0; -- bus_num = addr = speed = class_id = product_id = vendor_id = 0; -- ret = 0; -- for(;;) { -- if (fgets(line, sizeof(line), f) == NULL) -- break; -- if (strlen(line) > 0) -- line[strlen(line) - 1] = '\0'; -- if (line[0] == 'T' && line[1] == ':') { -- if (device_count && (vendor_id || product_id)) { -- /* New device. Add the previously discovered device. */ -- ret = func(opaque, bus_num, addr, class_id, vendor_id, -- product_id, product_name, speed); -- if (ret) -- goto the_end; -- } -- if (get_tag_value(buf, sizeof(buf), line, "Bus=", " ") < 0) -- goto fail; -- bus_num = atoi(buf); -- if (get_tag_value(buf, sizeof(buf), line, "Dev#=", " ") < 0) -- goto fail; -- addr = atoi(buf); -- if (get_tag_value(buf, sizeof(buf), line, "Spd=", " ") < 0) -- goto fail; -- if (!strcmp(buf, "480")) -+ while ((de = readdir(d))) { -+ if (de->d_name[0] != '.' && ! strchr(de->d_name, ':')) { -+ char filename[PATH_MAX]; -+ char* tmpstr = de->d_name; -+ if (!strncmp(de->d_name, "usb", 3)) -+ tmpstr += 3; -+ bus_num = atoi(tmpstr); -+ snprintf(filename, PATH_MAX, "/sys/bus/usb/devices/%s/devnum", de->d_name); -+ f = fopen(filename, "r"); -+ if (!f) { -+ term_printf("Could not open %s\n", filename); -+ return 0; -+ } -+ fgets(line, sizeof(line), f); -+ fclose(f); -+ addr = atoi(line); -+ snprintf(filename, PATH_MAX, "/sys/bus/usb/devices/%s/bDeviceClass", de->d_name); -+ f = fopen(filename, "r"); -+ if (!f) { -+ term_printf("Could not open %s\n", filename); -+ return 0; -+ } -+ fgets(line, sizeof(line), f); -+ fclose(f); -+ class_id = strtoul(line, NULL, 16); -+ snprintf(filename, PATH_MAX, "/sys/bus/usb/devices/%s/idVendor", de->d_name); -+ f = fopen(filename, "r"); -+ if (!f) { -+ term_printf("Could not open %s\n", filename); -+ return 0; -+ } -+ fgets(line, sizeof(line), f); -+ fclose(f); -+ vendor_id = strtoul(line, NULL, 16); -+ snprintf(filename, PATH_MAX, "/sys/bus/usb/devices/%s/idProduct", de->d_name); -+ f = fopen(filename, "r"); -+ if (!f) { -+ term_printf("Could not open %s\n", filename); -+ return 0; -+ } -+ fgets(line, sizeof(line), f); -+ fclose(f); -+ product_id = strtoul(line, NULL, 16); -+ snprintf(filename, PATH_MAX, "/sys/bus/usb/devices/%s/product", de->d_name); -+ f = fopen(filename, "r"); -+ if (f) { -+ fgets(line, sizeof(line), f); -+ fclose(f); -+ if (strlen(line) > 0) -+ line[strlen(line) - 1] = '\0'; -+ pstrcpy(product_name, sizeof(product_name), line); -+ } else -+ *product_name = 0; -+ snprintf(filename, PATH_MAX, "/sys/bus/usb/devices/%s/speed", de->d_name); -+ f = fopen(filename, "r"); -+ if (!f) { -+ term_printf("Could not open %s\n", filename); -+ return 0; -+ } -+ fgets(line, sizeof(line), f); -+ fclose(f); -+ if (!strcmp(line, "480\n")) - speed = USB_SPEED_HIGH; -- else if (!strcmp(buf, "1.5")) -+ else if (!strcmp(line, "1.5\n")) - speed = USB_SPEED_LOW; - else - speed = USB_SPEED_FULL; -- product_name[0] = '\0'; -- class_id = 0xff; -- device_count++; -- product_id = 0; -- vendor_id = 0; -- } else if (line[0] == 'P' && line[1] == ':') { -- if (get_tag_value(buf, sizeof(buf), line, "Vendor=", " ") < 0) -- goto fail; -- vendor_id = strtoul(buf, NULL, 16); -- if (get_tag_value(buf, sizeof(buf), line, "ProdID=", " ") < 0) -- goto fail; -- product_id = strtoul(buf, NULL, 16); -- } else if (line[0] == 'S' && line[1] == ':') { -- if (get_tag_value(buf, sizeof(buf), line, "Product=", "") < 0) -- goto fail; -- pstrcpy(product_name, sizeof(product_name), buf); -- } else if (line[0] == 'D' && line[1] == ':') { -- if (get_tag_value(buf, sizeof(buf), line, "Cls=", " (") < 0) -- goto fail; -- class_id = strtoul(buf, NULL, 16); -- } -- fail: ; -- } -- if (device_count && (vendor_id || product_id)) { -- /* Add the last device. */ -- ret = func(opaque, bus_num, addr, class_id, vendor_id, -- product_id, product_name, speed); -- } -- the_end: -- fclose(f); -+ ret = func(opaque, bus_num, addr, class_id, vendor_id, -+ product_id, product_name, speed); -+ if (ret) -+ goto the_end; -+ } -+ } -+ the_end: -+ closedir(d); - return ret; - } - diff --git a/qemu-20080703.tar.bz2 b/qemu-20080703.tar.bz2 deleted file mode 100644 index 70c8800..0000000 --- a/qemu-20080703.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:30948f2476c9b854f4888521cc9252558fc99688fbe89fca98c19e963a6fb195 -size 2691429 diff --git a/qemu-20081008.tar.bz2 b/qemu-20081008.tar.bz2 new file mode 100644 index 0000000..97e2816 --- /dev/null +++ b/qemu-20081008.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:858780f82c1b357e203cb4a64b3fa6de18b344bc72e320cbbe9e09e1430a40ba +size 2780412 diff --git a/qemu-cvs-ia64.patch b/qemu-cvs-ia64.patch index 9975422..9965809 100644 --- a/qemu-cvs-ia64.patch +++ b/qemu-cvs-ia64.patch @@ -21,27 +21,3 @@ endif ifeq ($(ARCH),arm) ---- target-alpha/op.c -+++ target-alpha/op.c -@@ -18,8 +18,6 @@ - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - --#define DEBUG_OP -- - #include "config.h" - #include "exec.h" - #include "host-utils.h" -@@ -126,8 +124,12 @@ - void OPPROTO op_no_op (void) - { - #if !defined (DEBUG_OP) -+#ifdef __ia64__ -+ __asm__ __volatile__("nop 0" : : : "memory"); -+#else - __asm__ __volatile__("nop" : : : "memory"); - #endif -+#endif - RETURN(); - } - diff --git a/qemu-cvs-ipc.patch b/qemu-cvs-ipc.patch index 5b4366a..a460aaf 100644 --- a/qemu-cvs-ipc.patch +++ b/qemu-cvs-ipc.patch @@ -2,16 +2,16 @@ Index: qemu/linux-user/syscall.c ================================================================================ --- qemu/linux-user/syscall.c +++ qemu/linux-user/syscall.c -@@ -30,7 +30,7 @@ - #include +@@ -29,7 +29,7 @@ #include #include + #include -#include +#include #include #include #include -@@ -47,6 +47,9 @@ +@@ -46,6 +46,9 @@ #include #include #include @@ -21,7 +21,7 @@ Index: qemu/linux-user/syscall.c #include #include #include -@@ -153,6 +156,7 @@ +@@ -154,6 +157,7 @@ #define __NR_sys_sched_getaffinity __NR_sched_getaffinity @@ -29,7 +29,7 @@ Index: qemu/linux-user/syscall.c #define __NR_sys_uname __NR_uname #define __NR_sys_faccessat __NR_faccessat #define __NR_sys_fchmodat __NR_fchmodat -@@ -243,6 +247,10 @@ +@@ -261,6 +265,10 @@ #if defined(TARGET_NR_tkill) && defined(__NR_tkill) _syscall2(int,sys_tkill,int,tid,int,sig) #endif @@ -40,7 +40,7 @@ Index: qemu/linux-user/syscall.c #ifdef __NR_sys_sched_getaffinity _syscall3(int,sys_sched_getaffinity,pid_t,pid,unsigned int,cpusetsize,void*,mask) #endif -@@ -1614,6 +1622,21 @@ +@@ -1639,6 +1647,21 @@ abi_ulong __unused2; }; @@ -62,7 +62,7 @@ Index: qemu/linux-user/syscall.c struct target_semid_ds { struct target_ipc_perm sem_perm; -@@ -1626,6 +1649,18 @@ +@@ -1651,6 +1674,18 @@ abi_ulong __unused4; }; @@ -81,7 +81,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_ipc_perm(struct ipc_perm *host_ip, abi_ulong target_addr) { -@@ -1664,6 +1699,43 @@ +@@ -1689,6 +1724,43 @@ return 0; } @@ -125,7 +125,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_semid_ds(struct semid_ds *host_sd, abi_ulong target_addr) { -@@ -1694,6 +1766,32 @@ +@@ -1719,6 +1791,32 @@ return 0; } @@ -158,7 +158,7 @@ Index: qemu/linux-user/syscall.c union semun { int val; struct semid_ds *buf; -@@ -1706,6 +1804,10 @@ +@@ -1731,6 +1829,10 @@ unsigned short int *array; }; @@ -169,7 +169,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_semun(int cmd, union semun *host_su, abi_ulong target_addr, -@@ -1718,7 +1820,15 @@ +@@ -1743,7 +1845,15 @@ case IPC_SET: if (!lock_user_struct(VERIFY_READ, target_su, target_addr, 1)) return -TARGET_EFAULT; @@ -186,7 +186,7 @@ Index: qemu/linux-user/syscall.c host_su->buf = ds; unlock_user_struct(target_su, target_addr, 0); break; -@@ -1754,7 +1864,14 @@ +@@ -1779,7 +1889,14 @@ case IPC_SET: if (lock_user_struct(VERIFY_WRITE, target_su, target_addr, 0)) return -TARGET_EFAULT; @@ -202,7 +202,7 @@ Index: qemu/linux-user/syscall.c unlock_user_struct(target_su, target_addr, 1); break; case GETVAL: -@@ -1782,7 +1899,8 @@ +@@ -1807,7 +1924,8 @@ { union semun arg; struct semid_ds dsarg; @@ -212,7 +212,7 @@ Index: qemu/linux-user/syscall.c abi_long ret = 0; switch( cmd ) { -@@ -1811,13 +1929,23 @@ +@@ -1836,13 +1954,23 @@ ret = get_errno(semctl(first, second, cmd, arg)); host_to_target_semun(cmd,ptr,&arg,&dsarg); break; @@ -237,7 +237,7 @@ Index: qemu/linux-user/syscall.c } return ret; -@@ -1841,6 +1969,41 @@ +@@ -1866,6 +1994,41 @@ abi_ulong __unused5; }; @@ -279,7 +279,7 @@ Index: qemu/linux-user/syscall.c static inline abi_long target_to_host_msqid_ds(struct msqid_ds *host_md, abi_ulong target_addr) { -@@ -2069,11 +2232,59 @@ +@@ -2094,11 +2257,59 @@ case IPCOP_shmctl: switch(second) { case IPC_RMID: diff --git a/qemu-img-vmdk-scsi.patch b/qemu-img-vmdk-scsi.patch index 9939d0d..2921224 100644 --- a/qemu-img-vmdk-scsi.patch +++ b/qemu-img-vmdk-scsi.patch @@ -3,7 +3,7 @@ Index: qemu-0.9.1/block-vmdk.c --- qemu/block-vmdk.c +++ qemu/block-vmdk.c @@ -719,7 +719,7 @@ - "ddb.geometry.cylinders = \"%lu\"\n" + "ddb.geometry.cylinders = \"%" PRId64 "\"\n" "ddb.geometry.heads = \"16\"\n" "ddb.geometry.sectors = \"63\"\n" - "ddb.adapterType = \"ide\"\n"; @@ -11,14 +11,13 @@ Index: qemu-0.9.1/block-vmdk.c char desc[1024]; const char *real_filename, *temp_str; -@@ -792,7 +792,9 @@ - if ((temp_str = strrchr(real_filename, ':')) != NULL) - real_filename = temp_str + 1; - sprintf(desc, desc_template, time(NULL), (unsigned long)total_size, -- real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), total_size / (63 * 16)); -+ real_filename, (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), -+ total_size / (63 * 16), -+ flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide"); +@@ -794,7 +794,8 @@ + snprintf(desc, sizeof(desc), desc_template, (unsigned int)time(NULL), + total_size, real_filename, + (flags & BLOCK_FLAG_COMPAT6 ? 6 : 4), +- total_size / (int64_t)(63 * 16)); ++ total_size / (int64_t)(63 * 16), ++ flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide"); /* write the descriptor */ lseek(fd, le64_to_cpu(header.desc_offset) << 9, SEEK_SET); diff --git a/qemu-svn-nodyngen.patch b/qemu-svn-nodyngen.patch index 73146a7..e3d15e3 100644 --- a/qemu-svn-nodyngen.patch +++ b/qemu-svn-nodyngen.patch @@ -1,26 +1,26 @@ --- configure +++ configure -@@ -547,11 +547,6 @@ +@@ -547,11 +549,8 @@ mipsel-softmmu \ mips64-softmmu \ mips64el-softmmu \ -ppc-softmmu \ -ppcemb-softmmu \ -ppc64-softmmu \ --sh4-softmmu \ --sh4eb-softmmu \ + sh4-softmmu \ + sh4eb-softmmu \ sparc-softmmu \ " fi -@@ -567,11 +562,6 @@ +@@ -569,11 +566,8 @@ m68k-linux-user \ mips-linux-user \ mipsel-linux-user \ -ppc-linux-user \ -ppc64-linux-user \ -ppc64abi32-linux-user \ --sh4-linux-user \ --sh4eb-linux-user \ + sh4-linux-user \ + sh4eb-linux-user \ sparc-linux-user \ sparc64-linux-user \ sparc32plus-linux-user \ diff --git a/qemu-svn-pcap.patch b/qemu-svn-pcap.patch index 326acf9..449cf12 100644 --- a/qemu-svn-pcap.patch +++ b/qemu-svn-pcap.patch @@ -2,7 +2,7 @@ Index: Makefile.target ================================================================================ --- Makefile.target +++ Makefile.target -@@ -625,6 +625,9 @@ +@@ -644,6 +644,9 @@ ifdef CONFIG_SLIRP CPPFLAGS+=-I$(SRC_PATH)/slirp endif @@ -14,24 +14,24 @@ Index: Makefile.target # specific flags are needed for non soft mmu emulator --- configure +++ configure -@@ -90,6 +90,7 @@ +@@ -92,6 +92,7 @@ gdbstub="yes" slirp="yes" - vde="no" + vde="yes" +pcap="yes" fmod_lib="" fmod_inc="" - vnc_tls="yes" -@@ -283,6 +284,8 @@ + oss_lib="" +@@ -296,6 +297,8 @@ ;; - --enable-vde) vde="yes" + --disable-vde) vde="no" ;; + --disable-pcap) pcap="no" + ;; --disable-kqemu) kqemu="no" ;; --disable-brlapi) brlapi="no" -@@ -1066,6 +1069,10 @@ +@@ -1204,6 +1207,10 @@ echo "#define CONFIG_VDE 1" >> $config_h echo "VDE_LIBS=-lvdeplug" >> $config_mak fi @@ -44,9 +44,9 @@ Index: Makefile.target echo "$def=yes" >> $config_mak --- vl.c +++ vl.c -@@ -102,6 +102,10 @@ - int inet_aton(const char *cp, struct in_addr *ia); - #endif +@@ -106,6 +106,10 @@ + + #include "qemu_socket.h" +#if defined(CONFIG_PCAP) +#include @@ -55,7 +55,7 @@ Index: Makefile.target #if defined(CONFIG_SLIRP) #include "libslirp.h" #endif -@@ -4112,6 +4116,104 @@ +@@ -4305,6 +4309,104 @@ #endif /* CONFIG_SLIRP */ @@ -160,7 +160,7 @@ Index: Makefile.target #if !defined(_WIN32) typedef struct TAPState { -@@ -5056,6 +5158,15 @@ +@@ -5235,6 +5337,15 @@ ret = net_slirp_init(vlan); } else #endif @@ -176,7 +176,7 @@ Index: Makefile.target #ifdef _WIN32 if (!strcmp(device, "tap")) { char ifname[64]; -@@ -7491,6 +7602,10 @@ +@@ -8108,6 +8219,10 @@ " connect the user mode network stack to VLAN 'n' and send\n" " hostname 'host' to DHCP clients\n" #endif diff --git a/qemu.changes b/qemu.changes index bfa2d2b..0836ee6 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Oct 8 17:03:34 CEST 2008 - uli@suse.de + +- update -> current SVN + - fixes PPC hosts + - fixes SH4 targets (reenabled), adds NPTL support + - SSSE3, SSE4.* instructions, "unreal" mode fixed + - Alpha target converted to TCG + - live migration + - Bluetooth emulation + - SCSI tape support + - OpenBIOS binary updated + - UHCI emulation rewritten + - lots of bugfixes + ------------------------------------------------------------------- Mon Aug 4 13:08:59 CEST 2008 - ro@suse.de diff --git a/qemu.spec b/qemu.spec index 9c3b729..2acd5de 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,10 +1,17 @@ # -# spec file for package qemu (Version 0.9.2svn20080703) +# spec file for package qemu (Version 0.9.2svn20081008) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -17,14 +24,14 @@ Url: http://fabrice.bellard.free.fr/qemu/ License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later; X11/MIT Group: System/Emulators/PC Summary: Universal CPU emulator -Version: 0.9.2svn20080703 -Release: 2 -Source: %name-20080703.tar.bz2 +Version: 0.9.2svn20081008 +Release: 1 +Source: %name-20081008.tar.bz2 Patch1: qemu-0.9.0.cvs-binfmt.patch Patch6: qemu-0.7.0-amd64.patch Patch8: qemu-cvs-pthread.patch Patch14: qemu-0.7.1-jobsignals.patch -Patch19: qemu-0.9.0-nousbdevfs.patch +#Patch19: qemu-0.9.0-nousbdevfs.patch Patch34: qemu-0.9.0-migration.patch Patch37: qemu-0.9.0-kvm.patch Patch38: qemu-0.9.0-kvm-bios.patch @@ -51,6 +58,7 @@ Patch86: qemu-svn-ncurses.patch Patch87: qemu-svn-nodyngen.patch Patch88: qemu-svn-pcap.patch Patch90: qemu-nonvoid_return.patch +#Patch91: qemu-svn-dirent.patch Source200: kvm_bios.bin # this is to make lint happy Source300: rpmlintrc @@ -77,7 +85,7 @@ ln -s fpu/*.h . %patch6 %patch8 -p1 %patch14 -%patch19 +#%patch19 %patch50 -p1 %patch53 -p1 %patch56 -p1 @@ -99,6 +107,7 @@ ln -s fpu/*.h . %patch87 %patch88 %patch90 +#%patch91 %build cp -p %SOURCE200 pc-bios/ @@ -165,6 +174,18 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog +* Wed Oct 08 2008 uli@suse.de +- update -> current SVN + - fixes PPC hosts + - fixes SH4 targets (reenabled), adds NPTL support + - SSSE3, SSE4.* instructions, "unreal" mode fixed + - Alpha target converted to TCG + - live migration + - Bluetooth emulation + - SCSI tape support + - OpenBIOS binary updated + - UHCI emulation rewritten + - lots of bugfixes * Mon Aug 04 2008 ro@suse.de - fix build by adding return statements for two nonvoid functions (qemu-nonvoid_return.patch), actually unreached code