diff --git a/debian/tools/generate-patchlist.sh b/debian/tools/generate-patchlist.sh index a0163d7c..bc93c629 100755 --- a/debian/tools/generate-patchlist.sh +++ b/debian/tools/generate-patchlist.sh @@ -26,37 +26,6 @@ From: "FDS-Team" Subject: Autogenerated patch list. --- -diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c -index 8bd4eb7..4b4c318 100644 ---- a/dlls/ntdll/misc.c -+++ b/dlls/ntdll/misc.c -@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void) - } - - /********************************************************************* -+ * wine_get_patches (NTDLL.@) -+ */ -+const void * CDECL NTDLL_wine_get_patches(void) -+{ -+ return wine_get_patches(); -+} -+ -+/********************************************************************* - * wine_get_build_id (NTDLL.@) - */ - const char * CDECL NTDLL_wine_get_build_id(void) -diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 70bf94f..42eddcf 100644 ---- a/dlls/ntdll/ntdll.spec -+++ b/dlls/ntdll/ntdll.spec -@@ -1410,6 +1410,7 @@ - - # Version - @ cdecl wine_get_version() NTDLL_wine_get_version -+@ cdecl wine_get_patches() NTDLL_wine_get_patches - @ cdecl wine_get_build_id() NTDLL_wine_get_build_id - @ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version - diff --git a/libs/wine/config.c b/libs/wine/config.c index a273502..5fa0cd5 100644 --- a/libs/wine/config.c @@ -107,50 +76,6 @@ index 2159fac..7cb2918 100644 wine_init; wine_init_argv0_path; wine_is_dbcs_leadbyte; -diff --git a/loader/main.c b/loader/main.c -index ac67290..516fd82 100644 ---- a/loader/main.c -+++ b/loader/main.c -@@ -79,6 +79,12 @@ static inline void reserve_area( void *addr, size_t size ) - - #endif /* __APPLE__ */ - -+struct wine_patch { -+ const char *hash; -+ const char *author; -+ const char *title; -+}; -+ - /*********************************************************************** - * check_command_line - * -@@ -89,7 +96,8 @@ static void check_command_line( int argc, char *argv[] ) - static const char usage[] = - "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" - " wine --help Display this help and exit\n" -- " wine --version Output version information and exit"; -+ " wine --version Output version information and exit\n" -+ " wine --patches Output patch information and exit"; - - if (argc <= 1) - { -@@ -106,6 +114,16 @@ static void check_command_line( int argc, char *argv[] ) - printf( "%s\n", wine_get_build_id() ); - exit(0); - } -+ if (!strcmp( argv[1], "--patches" )) -+ { -+ const struct wine_patch *wine_patch_data = wine_get_patches(); -+ for(; wine_patch_data->hash != NULL; wine_patch_data++) -+ { -+ printf( "%s :: %s :: %s\n", wine_patch_data->hash, wine_patch_data->author, -+ wine_patch_data->title ); -+ } -+ exit(0); -+ } - } - - diff --git a/include/wine/library.h b/include/wine/library.h index 242bb69..aa9e585 100644 --- a/include/wine/library.h diff --git a/patches/00-Commandline/0001-loader-Add-commandline-option-patches-to-show-the-pa.patch b/patches/00-Commandline/0001-loader-Add-commandline-option-patches-to-show-the-pa.patch new file mode 100644 index 00000000..e9abea53 --- /dev/null +++ b/patches/00-Commandline/0001-loader-Add-commandline-option-patches-to-show-the-pa.patch @@ -0,0 +1,89 @@ +From d88eb32e40bff9b8279f57b13a5f2cc09a9273ea Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Thu, 29 May 2014 23:43:45 +0200 +Subject: loader: Add commandline option --patches to show the patch list. + +--- + dlls/ntdll/misc.c | 8 ++++++++ + dlls/ntdll/ntdll.spec | 1 + + loader/main.c | 19 ++++++++++++++++++- + 3 files changed, 27 insertions(+), 1 deletion(-) + +diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c +index 8bd4eb7..4b4c318 100644 +--- a/dlls/ntdll/misc.c ++++ b/dlls/ntdll/misc.c +@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void) + } + + /********************************************************************* ++ * wine_get_patches (NTDLL.@) ++ */ ++const void * CDECL NTDLL_wine_get_patches(void) ++{ ++ return wine_get_patches(); ++} ++ ++/********************************************************************* + * wine_get_build_id (NTDLL.@) + */ + const char * CDECL NTDLL_wine_get_build_id(void) +diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec +index 5bac269..ab50882 100644 +--- a/dlls/ntdll/ntdll.spec ++++ b/dlls/ntdll/ntdll.spec +@@ -1419,6 +1419,7 @@ + + # Version + @ cdecl wine_get_version() NTDLL_wine_get_version ++@ cdecl wine_get_patches() NTDLL_wine_get_patches + @ cdecl wine_get_build_id() NTDLL_wine_get_build_id + @ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version + +diff --git a/loader/main.c b/loader/main.c +index ac67290..71e5055 100644 +--- a/loader/main.c ++++ b/loader/main.c +@@ -79,6 +79,12 @@ static inline void reserve_area( void *addr, size_t size ) + + #endif /* __APPLE__ */ + ++struct wine_patch { ++ const char *hash; ++ const char *author; ++ const char *title; ++}; ++ + /*********************************************************************** + * check_command_line + * +@@ -89,7 +95,8 @@ static void check_command_line( int argc, char *argv[] ) + static const char usage[] = + "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" + " wine --help Display this help and exit\n" +- " wine --version Output version information and exit"; ++ " wine --version Output version information and exit\n" ++ " wine --patches Output patch information and exit"; + + if (argc <= 1) + { +@@ -106,6 +113,16 @@ static void check_command_line( int argc, char *argv[] ) + printf( "%s\n", wine_get_build_id() ); + exit(0); + } ++ if (!strcmp( argv[1], "--patches" )) ++ { ++ const struct wine_patch *wine_patch_data = wine_get_patches(); ++ for(; wine_patch_data->hash != NULL; wine_patch_data++) ++ { ++ printf( "%s :: %s :: %s\n", wine_patch_data->hash, wine_patch_data->author, ++ wine_patch_data->title ); ++ } ++ exit(0); ++ } + } + + +-- +1.7.9.5 + diff --git a/patches/00-Commandline/0002-loader-Add-commandline-option-check-libs.patch b/patches/00-Commandline/0002-loader-Add-commandline-option-check-libs.patch new file mode 100644 index 00000000..0b039a3f --- /dev/null +++ b/patches/00-Commandline/0002-loader-Add-commandline-option-check-libs.patch @@ -0,0 +1,301 @@ +From eb9657a39d222aa59140f6b0aff657ae86d1824d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Wed, 28 May 2014 19:50:51 +0200 +Subject: loader: Add commandline option --check-libs. + +--- + include/wine/library.h | 2 ++ + libs/wine/config.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ + libs/wine/loader.c | 36 +++++++++++++++++++ + libs/wine/wine.def | 2 ++ + libs/wine/wine.map | 2 ++ + loader/main.c | 50 +++++++++++++++++++++++++- + 6 files changed, 182 insertions(+), 1 deletion(-) + +diff --git a/include/wine/library.h b/include/wine/library.h +index fae73fe..7395a11 100644 +--- a/include/wine/library.h ++++ b/include/wine/library.h +@@ -40,6 +40,7 @@ extern "C" { + extern const char *wine_get_build_dir(void); + extern const char *wine_get_config_dir(void); + extern const char *wine_get_data_dir(void); ++extern const char **wine_get_libs(void); + extern const char *wine_get_server_dir(void); + extern const char *wine_get_user_name(void); + extern const char *wine_get_version(void); +@@ -52,6 +53,7 @@ extern void wine_exec_wine_binary( const char *name, char **argv, const char *en + + typedef void (*load_dll_callback_t)( void *, const char * ); + ++extern int wine_dladdr( void *addr, void *info, char *error, size_t errorsize ); + extern void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize ); + extern void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize ); + extern int wine_dlclose( void *handle, char *error, size_t errorsize ); +diff --git a/libs/wine/config.c b/libs/wine/config.c +index 954035d..3fb7327 100644 +--- a/libs/wine/config.c ++++ b/libs/wine/config.c +@@ -444,6 +444,97 @@ const char *wine_get_build_dir(void) + return build_dir; + } + ++const char *wine_libs[] = { ++#ifdef SONAME_LIBCAPI20 ++ SONAME_LIBCAPI20, ++#endif ++#ifdef SONAME_LIBCUPS ++ SONAME_LIBCUPS, ++#endif ++#ifdef SONAME_LIBCURSES ++ SONAME_LIBCURSES, ++#endif ++#ifdef SONAME_LIBDBUS_1 ++ SONAME_LIBDBUS_1, ++#endif ++#ifdef SONAME_LIBFONTCONFIG ++ SONAME_LIBFONTCONFIG, ++#endif ++#ifdef SONAME_LIBGL ++ SONAME_LIBGL, ++#endif ++#ifdef SONAME_LIBGNUTLS ++ SONAME_LIBGNUTLS, ++#endif ++#ifdef SONAME_LIBGSM ++ SONAME_LIBGSM, ++#endif ++#ifdef SONAME_LIBHAL ++ SONAME_LIBHAL, ++#endif ++#ifdef SONAME_LIBJPEG ++ SONAME_LIBJPEG, ++#endif ++#ifdef SONAME_LIBNCURSES ++ SONAME_LIBNCURSES, ++#endif ++#ifdef SONAME_LIBNETAPI ++ SONAME_LIBNETAPI, ++#endif ++#ifdef SONAME_LIBODBC ++ SONAME_LIBODBC, ++#endif ++#ifdef SONAME_LIBOSMESA ++ SONAME_LIBOSMESA, ++#endif ++#ifdef SONAME_LIBPNG ++ SONAME_LIBPNG, ++#endif ++#ifdef SONAME_LIBSANE ++ SONAME_LIBSANE, ++#endif ++#ifdef SONAME_LIBTIFF ++ SONAME_LIBTIFF, ++#endif ++#ifdef SONAME_LIBV4L1 ++ SONAME_LIBV4L1, ++#endif ++#ifdef SONAME_LIBXCOMPOSITE ++ SONAME_LIBXCOMPOSITE, ++#endif ++#ifdef SONAME_LIBXCURSOR ++ SONAME_LIBXCURSOR, ++#endif ++#ifdef SONAME_LIBXEXT ++ SONAME_LIBXEXT, ++#endif ++#ifdef SONAME_LIBXI ++ SONAME_LIBXI, ++#endif ++#ifdef SONAME_LIBXINERAMA ++ SONAME_LIBXINERAMA, ++#endif ++#ifdef SONAME_LIBXRANDR ++ SONAME_LIBXRANDR, ++#endif ++#ifdef SONAME_LIBXRENDER ++ SONAME_LIBXRENDER, ++#endif ++#ifdef SONAME_LIBXSLT ++ SONAME_LIBXSLT, ++#endif ++#ifdef SONAME_LIBXXF86VM ++ SONAME_LIBXXF86VM, ++#endif ++ NULL ++}; ++ ++/* return the list of shared libs used by wine */ ++const char **wine_get_libs(void) ++{ ++ return &wine_libs[0]; ++} ++ + /* return the full name of the server directory (the one containing the socket) */ + const char *wine_get_server_dir(void) + { +diff --git a/libs/wine/loader.c b/libs/wine/loader.c +index 5c0192d..91a4428 100644 +--- a/libs/wine/loader.c ++++ b/libs/wine/loader.c +@@ -1054,6 +1054,42 @@ void *wine_dlopen( const char *filename, int flag, char *error, size_t errorsize + } + + /*********************************************************************** ++ * wine_dladdr ++ */ ++int wine_dladdr( void *addr, void *info, char *error, size_t errorsize ) ++{ ++#ifdef HAVE_DLADDR ++ int ret; ++ const char *s; ++ dlerror(); dlerror(); ++ ret = dladdr( addr, (Dl_info *)info ); ++ s = dlerror(); ++ if (error && errorsize) ++ { ++ if (s) ++ { ++ size_t len = strlen(s); ++ if (len >= errorsize) len = errorsize - 1; ++ memcpy( error, s, len ); ++ error[len] = 0; ++ } ++ else error[0] = 0; ++ } ++ dlerror(); ++ return ret; ++#else ++ if (error) ++ { ++ static const char msg[] = "dladdr interface not detected by configure"; ++ size_t len = min( errorsize, sizeof(msg) ); ++ memcpy( error, msg, len ); ++ error[len - 1] = 0; ++ } ++ return 0; ++#endif ++} ++ ++/*********************************************************************** + * wine_dlsym + */ + void *wine_dlsym( void *handle, const char *symbol, char *error, size_t errorsize ) +diff --git a/libs/wine/wine.def b/libs/wine/wine.def +index 5b42029..6acf329 100644 +--- a/libs/wine/wine.def ++++ b/libs/wine/wine.def +@@ -64,6 +64,7 @@ EXPORTS + wine_dbg_sprintf + wine_dbgstr_an + wine_dbgstr_wn ++ wine_dladdr + wine_dlclose + wine_dll_enum_load_path + wine_dll_get_owner +@@ -79,6 +80,7 @@ EXPORTS + wine_get_build_id + wine_get_config_dir + wine_get_data_dir ++ wine_get_libs + wine_get_server_dir + wine_get_sortkey + wine_get_user_name +diff --git a/libs/wine/wine.map b/libs/wine/wine.map +index 7cb2918..72ffed8 100644 +--- a/libs/wine/wine.map ++++ b/libs/wine/wine.map +@@ -65,6 +65,7 @@ WINE_1.0 + wine_dbg_sprintf; + wine_dbgstr_an; + wine_dbgstr_wn; ++ wine_dladdr; + wine_dlclose; + wine_dll_enum_load_path; + wine_dll_get_owner; +@@ -85,6 +86,7 @@ WINE_1.0 + wine_get_es; + wine_get_fs; + wine_get_gs; ++ wine_get_libs; + wine_get_server_dir; + wine_get_sortkey; + wine_get_ss; +diff --git a/loader/main.c b/loader/main.c +index 71e5055..131ac2f 100644 +--- a/loader/main.c ++++ b/loader/main.c +@@ -36,6 +36,12 @@ + #ifdef HAVE_UNISTD_H + # include + #endif ++#ifdef HAVE_DLADDR ++# include ++#endif ++#ifdef HAVE_LINK_H ++# include ++#endif + #include + + #include "wine/library.h" +@@ -96,7 +102,8 @@ static void check_command_line( int argc, char *argv[] ) + "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" + " wine --help Display this help and exit\n" + " wine --version Output version information and exit\n" +- " wine --patches Output patch information and exit"; ++ " wine --patches Output patch information and exit\n" ++ " wine --check-libs Checks if shared libs are installed"; + + if (argc <= 1) + { +@@ -123,6 +130,47 @@ static void check_command_line( int argc, char *argv[] ) + } + exit(0); + } ++ if (!strcmp( argv[1], "--check-libs" )) ++ { ++ void* lib_handle; ++ int ret = 0; ++ const char **wine_libs = wine_get_libs(); ++ ++ for(; *wine_libs; wine_libs++) ++ { ++ lib_handle = wine_dlopen( *wine_libs, RTLD_NOW, NULL, 0 ); ++ if (lib_handle) ++ { ++ #ifdef HAVE_DLADDR ++ Dl_info libinfo; ++ void* symbol; ++ ++ #ifdef HAVE_LINK_H ++ struct link_map *lm = (struct link_map *)lib_handle; ++ symbol = (void *)lm->l_addr; ++ #else ++ symbol = wine_dlsym( lib_handle, "_init", NULL, 0 ); ++ #endif ++ if (symbol && wine_dladdr( symbol, &libinfo, NULL, 0 )) ++ { ++ printf( "%s: %s\n", *wine_libs, libinfo.dli_fname ); ++ } ++ else ++ #endif ++ { ++ printf( "%s: found\n", *wine_libs ); ++ } ++ wine_dlclose( lib_handle, NULL, 0 ); ++ } ++ else ++ { ++ printf( "%s: missing\n", *wine_libs ); ++ ret = 1; ++ } ++ } ++ ++ exit(ret); ++ } + } + + +-- +1.7.9.5 + diff --git a/patches/00-Commandline/1b7ac850-5040-4d9e-8fde-9c483c3baf33.def b/patches/00-Commandline/1b7ac850-5040-4d9e-8fde-9c483c3baf33.def new file mode 100644 index 00000000..4797552d --- /dev/null +++ b/patches/00-Commandline/1b7ac850-5040-4d9e-8fde-9c483c3baf33.def @@ -0,0 +1,3 @@ +Revision: 1 +Author: Sebastian Lackner +Title: Add commandline option --patches to show the patch list. diff --git a/patches/00-Commandline/9e9a58e1-b226-4d4d-943b-be9a4c1dc525.def b/patches/00-Commandline/9e9a58e1-b226-4d4d-943b-be9a4c1dc525.def new file mode 100644 index 00000000..d00a4385 --- /dev/null +++ b/patches/00-Commandline/9e9a58e1-b226-4d4d-943b-be9a4c1dc525.def @@ -0,0 +1,3 @@ +Revision: 1 +Author: Michael Müller +Title: Add commandline option --check-libs to test if shared libraries are installed. diff --git a/patches/patch-list.patch b/patches/patch-list.patch index d0194b51..33d32713 100644 --- a/patches/patch-list.patch +++ b/patches/patch-list.patch @@ -2,37 +2,6 @@ From: "FDS-Team" Subject: Autogenerated patch list. --- -diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c -index 8bd4eb7..4b4c318 100644 ---- a/dlls/ntdll/misc.c -+++ b/dlls/ntdll/misc.c -@@ -60,6 +60,14 @@ const char * CDECL NTDLL_wine_get_version(void) - } - - /********************************************************************* -+ * wine_get_patches (NTDLL.@) -+ */ -+const void * CDECL NTDLL_wine_get_patches(void) -+{ -+ return wine_get_patches(); -+} -+ -+/********************************************************************* - * wine_get_build_id (NTDLL.@) - */ - const char * CDECL NTDLL_wine_get_build_id(void) -diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index 70bf94f..42eddcf 100644 ---- a/dlls/ntdll/ntdll.spec -+++ b/dlls/ntdll/ntdll.spec -@@ -1410,6 +1410,7 @@ - - # Version - @ cdecl wine_get_version() NTDLL_wine_get_version -+@ cdecl wine_get_patches() NTDLL_wine_get_patches - @ cdecl wine_get_build_id() NTDLL_wine_get_build_id - @ cdecl wine_get_host_version(ptr ptr) NTDLL_wine_get_host_version - diff --git a/libs/wine/config.c b/libs/wine/config.c index a273502..5fa0cd5 100644 --- a/libs/wine/config.c @@ -46,6 +15,8 @@ index a273502..5fa0cd5 100644 + const char *author; + const char *title; +} wine_patch_data[] = { ++ { "1b7ac850-5040-4d9e-8fde-9c483c3baf33:1", "Sebastian Lackner", "Add commandline option --patches to show the patch list." }, ++ { "9e9a58e1-b226-4d4d-943b-be9a4c1dc525:1", "Michael Müller", "Add commandline option --check-libs to test if shared libraries are installed." }, + { "8a366b6d-8ad6-4581-8aa9-66a03590a57b:2", "Erich E. Hoover", "Implement SIO_ADDRESS_LIST_CHANGE." }, + { "92938b89-506b-430a-ba50-32de8b286e56:4", "Erich E. Hoover", "Store and return security attributes with extended file attributes." }, + { "5d6bb7b5-ec88-4ed3-907d-9ad2173a2f88:1", "Sebastian Lackner", "Enable/disable windows when they are (un)mapped by foreign applications." }, @@ -102,50 +73,6 @@ index 2159fac..7cb2918 100644 wine_init; wine_init_argv0_path; wine_is_dbcs_leadbyte; -diff --git a/loader/main.c b/loader/main.c -index ac67290..516fd82 100644 ---- a/loader/main.c -+++ b/loader/main.c -@@ -79,6 +79,12 @@ static inline void reserve_area( void *addr, size_t size ) - - #endif /* __APPLE__ */ - -+struct wine_patch { -+ const char *hash; -+ const char *author; -+ const char *title; -+}; -+ - /*********************************************************************** - * check_command_line - * -@@ -89,7 +96,8 @@ static void check_command_line( int argc, char *argv[] ) - static const char usage[] = - "Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n" - " wine --help Display this help and exit\n" -- " wine --version Output version information and exit"; -+ " wine --version Output version information and exit\n" -+ " wine --patches Output patch information and exit"; - - if (argc <= 1) - { -@@ -106,6 +114,16 @@ static void check_command_line( int argc, char *argv[] ) - printf( "%s\n", wine_get_build_id() ); - exit(0); - } -+ if (!strcmp( argv[1], "--patches" )) -+ { -+ const struct wine_patch *wine_patch_data = wine_get_patches(); -+ for(; wine_patch_data->hash != NULL; wine_patch_data++) -+ { -+ printf( "%s :: %s :: %s\n", wine_patch_data->hash, wine_patch_data->author, -+ wine_patch_data->title ); -+ } -+ exit(0); -+ } - } - - diff --git a/include/wine/library.h b/include/wine/library.h index 242bb69..aa9e585 100644 --- a/include/wine/library.h