debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 36 ++++++++++++++++++++++++++++++++++++ debian/copyright | 38 ++++++++++++++++++++++++++++++++++++++ debian/libglvnd-dev.install | 4 ++++ debian/libglvnd0.install | 1 + debian/rules | 7 +++++++ debian/source/format | 1 + src/GLX/libglx.c | 7 +++++++ src/GLX/libglxmapping.c | 5 +++++ tests/Makefile.am | 6 +++--- 11 files changed, 108 insertions(+), 3 deletions(-)
New commits: commit 70cf24886eb430e79376dfa570ba22bfaa763d82 Author: Timo Aaltonen <[email protected]> Date: Thu Sep 26 01:34:13 2013 +0300 initial packaging diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f4537fb --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +libglvnd (0.0.0-1) unstable; urgency=low + + * Initial release (Closes: #nnnn) + + -- Timo Aaltonen <[email protected]> Thu, 29 Aug 2013 10:59:47 +0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..f627bb8 --- /dev/null +++ b/debian/control @@ -0,0 +1,36 @@ +Source: libglvnd +Priority: extra +Maintainer: Timo Aaltonen <[email protected]> +Build-Depends: + debhelper (>= 9), + dh-autoreconf, + pkg-config, + libx11-dev, + libxext-dev, + xserver-xorg-dev, + python-dev, + python-libxml2, + libatomic-ops-dev, +Standards-Version: 3.9.4 +Section: libs +Homepage: <insert the upstream URL, if relevant> +Vcs-Git: git://git.debian.org/pkg-xorg/lib/libglvnd.git +Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libglvnd.git;a=summary + +Package: libglvnd-dev +Section: libdevel +Architecture: any +Depends: libglvnd0 (= ${binary:Version}) +Description: <insert up to 60 chars description> + <insert long description, indented with spaces> + +Package: libglvnd0 +Section: libs +Architecture: any +Pre-Depends: ${misc:Pre-Depends}, +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Description: <insert up to 60 chars description> + This is an implementation of the vendor-neutral dispatch layer for + arbitrating OpenGL API calls between multiple vendors on a per-screen basis. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..5c62e9c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,38 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: libglvnd +Source: https://github.com/NVIDIA/libglvnd + +Files: * +Copyright: <years> <put author's name and email here> + <years> <likewise for another author> +License: <special license> + <Put the license of the package here indented by 1 space> + <This follows the format of Description: lines in control file> + . + <Including paragraphs> + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2013 Timo Aaltonen <[email protected]> +License: GPL-2+ + This package 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 2 of the License, or + (at your option) any later version. + . + This package 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 <http://www.gnu.org/licenses/> + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". + +# Please also look if there are files or directories which have a +# different copyright/license attached and list them here. +# Please avoid to pick license terms that are more restrictive than the +# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/debian/libglvnd-dev.install b/debian/libglvnd-dev.install new file mode 100644 index 0000000..b3a6e12 --- /dev/null +++ b/debian/libglvnd-dev.install @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/*/lib*.so +usr/lib/pkgconfig/* +usr/share/pkgconfig/* diff --git a/debian/libglvnd0.install b/debian/libglvnd0.install new file mode 100644 index 0000000..3ddde58 --- /dev/null +++ b/debian/libglvnd0.install @@ -0,0 +1 @@ +usr/lib/*/lib*.so.* diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7e97af4 --- /dev/null +++ b/debian/rules @@ -0,0 +1,7 @@ +#!/usr/bin/make -f +# +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with autoreconf,xsf --builddirectory=build/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +1.0 commit f7e7657803bb3c275d1d3c6afd4c889660b6bb71 Author: Andy Ritger <[email protected]> Date: Tue Sep 3 22:39:08 2013 -0700 Check for strdup(3) failure in cacheProcAddress() Signed-off-by: Andy Ritger <[email protected]> Signed-off-by: Brian Nguyen <[email protected]> diff --git a/src/GLX/libglx.c b/src/GLX/libglx.c index 47373de..011d572 100644 --- a/src/GLX/libglx.c +++ b/src/GLX/libglx.c @@ -880,6 +880,13 @@ static void cacheProcAddress(const GLubyte *procName, __GLXextFuncPtr addr) } pEntry->procName = (GLubyte *)strdup((const char *)procName); + + if (pEntry->procName == NULL) { + assert(pEntry->procName); + free(pEntry); + return; + } + pEntry->addr = addr; LKDHASH_WRLOCK(__glXPthreadFuncs, __glXProcAddressHash); commit 345a2f34ce50a39580a39deb9950d0b8c06d79a2 Author: Andy Ritger <[email protected]> Date: Tue Sep 3 22:23:56 2013 -0700 Link libtrace.la *after* libglvnd_pthread.la Debug builds of libglvnd_pthread.la depend on the __glvnd_dbg_printf symbol from libtrace.la. Sort the link order so that the linker sees libglvnd_pthread.la and its unresolved symbol first, so that it knows to resolve it when it subsequently sees libtrace.la. Signed-off-by: Andy Ritger <[email protected]> Signed-off-by: Brian Nguyen <[email protected]> diff --git a/tests/Makefile.am b/tests/Makefile.am index b2b5331..f25474d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -68,8 +68,8 @@ testglxnscreens_CFLAGS = -I$(X11GLVND_DIR) $(AM_CFLAGS) testglxnscreens_LDADD = -lX11 testglxnscreens_LDADD += $(top_builddir)/src/GLX/libGLX.la testglxnscreens_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la -testglxnscreens_LDADD += $(top_builddir)/src/util/trace/libtrace.la testglxnscreens_LDADD += $(top_builddir)/src/util/glvnd_pthread/libglvnd_pthread.la +testglxnscreens_LDADD += $(top_builddir)/src/util/trace/libtrace.la testglxnscreens_LDADD += -lX11 $(X11GLVND_DIR)/libx11glvnd_client.la # The *_oldlink variant tests that linking against legacy libGL.so works @@ -86,8 +86,8 @@ testglxmakecurrent_oldlink_SOURCES = \ testglxmakecurrent_oldlink_LDADD = -lX11 testglxmakecurrent_oldlink_LDADD += $(top_builddir)/src/GL/libGL.la -testglxmakecurrent_oldlink_LDADD += $(top_builddir)/src/util/trace/libtrace.la testglxmakecurrent_oldlink_LDADD += $(top_builddir)/src/util/glvnd_pthread/libglvnd_pthread.la +testglxmakecurrent_oldlink_LDADD += $(top_builddir)/src/util/trace/libtrace.la testx11glvndproto_CFLAGS = -I$(X11GLVND_DIR) testx11glvndproto_LDADD = -lX11 $(X11GLVND_DIR)/libx11glvnd_client.la @@ -107,8 +107,8 @@ testglxgetprocaddress_LDADD = $(top_builddir)/src/GLX/libGLX.la testglxmakecurrent_LDADD = -lX11 testglxmakecurrent_LDADD += $(top_builddir)/src/GLX/libGLX.la testglxmakecurrent_LDADD += $(top_builddir)/src/OpenGL/libOpenGL.la -testglxmakecurrent_LDADD += $(top_builddir)/src/util/trace/libtrace.la testglxmakecurrent_LDADD += $(top_builddir)/src/util/glvnd_pthread/libglvnd_pthread.la +testglxmakecurrent_LDADD += $(top_builddir)/src/util/trace/libtrace.la testglxgetclientstr_LDADD = -lX11 testglxgetclientstr_LDADD += $(top_builddir)/src/GLX/libGLX.la commit c8ae6458854379b615d0030c991ac99614eeec56 Author: Andy Ritger <[email protected]> Date: Tue Sep 3 21:57:16 2013 -0700 Check strdup(3) return value in AllocDispatchIndex() Signed-off-by: Andy Ritger <[email protected]> Signed-off-by: Brian Nguyen <[email protected]> diff --git a/src/GLX/libglxmapping.c b/src/GLX/libglxmapping.c index 9932e8a..c243cf4 100644 --- a/src/GLX/libglxmapping.c +++ b/src/GLX/libglxmapping.c @@ -130,6 +130,10 @@ static GLboolean AllocDispatchIndex(__GLXvendorInfo *vendor, } pEntry->procName = (GLubyte *)strdup((const char *)procName); + if (!pEntry->procName) { + free(pEntry); + return GL_FALSE; + } LKDHASH_WRLOCK(__glXPthreadFuncs, __glXDispatchIndexHash); pEntry->index = __glXNextUnusedHashIndex++; commit b7f965ed737f327ed66957963ea26fcf14ccf3f5 Author: Andy Ritger <[email protected]> Date: Tue Sep 3 21:55:54 2013 -0700 Unlock in the __glXFetchDispatchEntry() failure path. Signed-off-by: Andy Ritger <[email protected]> Signed-off-by: Brian Nguyen <[email protected]> diff --git a/src/GLX/libglxmapping.c b/src/GLX/libglxmapping.c index 4eb057d..9932e8a 100644 --- a/src/GLX/libglxmapping.c +++ b/src/GLX/libglxmapping.c @@ -228,6 +228,7 @@ __GLXextFuncPtr __glXFetchDispatchEntry(__GLXdispatchTableDynamic *dynDispatch, if (!pEntry) { // Uh-oh! assert(pEntry); + LKDHASH_UNLOCK(__glXPthreadFuncs, dynDispatch->hash); return NULL; } pEntry->index = index; -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

