Index: head/deskutils/easystroke/Makefile =================================================================== --- head/deskutils/easystroke/Makefile (revision 526588) +++ head/deskutils/easystroke/Makefile (revision 526589) @@ -1,53 +1,53 @@ # Created by: Tobias Kortkamp # $FreeBSD$ PORTNAME= easystroke PORTVERSION= 0.6.0 -PORTREVISION= 20 +PORTREVISION= 21 CATEGORIES= deskutils MASTER_SITES= SF MAINTAINER= ports@FreeBSD.org COMMENT= Easystroke is a gesture-recognition application for X11 LICENSE= ISCL LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_powerpc64= fails to build: handler.cc:560:27: call of overloaded 'abs(float&)' is ambiguous BUILD_DEPENDS= help2man:misc/help2man \ ${LOCALBASE}/include/xorg/xserver-properties.h:x11-servers/xorg-server LIB_DEPENDS= libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libboost_serialization.so:devel/boost-libs USES= compiler:c++11-lang gettext gmake gnome pkgconfig xorg USE_GNOME= gtkmm30 USE_XORG= x11 xext xfixes xi xtst USE_CXXSTD= c++11 INSTALLS_ICONS= yes OPTIONS_DEFINE= NLS OPTIONS_SUB= yes NLS_BUILD_DEPENDS= intltool-merge:textproc/intltool NLS_ALL_TARGET= easystroke.desktop all man # This builds easystroke without translations NLS_ALL_TARGET_OFF= man # Create a .desktop file without translations. # It's usually created by intltool-merge during the build. pre-build-NLS-off: @${CP} ${WRKSRC}/${PORTNAME}.desktop.in ${WRKSRC}/${PORTNAME}.desktop do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.svg ${STAGEDIR}${PREFIX}/share/pixmaps/ ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 do-install-NLS-on: (cd ${WRKSRC}/po/ && \ ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/locale/ "-name *.mo") .include Index: head/emulators/virtualbox-ose/Makefile =================================================================== --- head/emulators/virtualbox-ose/Makefile (revision 526588) +++ head/emulators/virtualbox-ose/Makefile (revision 526589) @@ -1,412 +1,413 @@ # Created by: Bernhard Froehlich # $FreeBSD$ PORTNAME= virtualbox-ose PORTVERSION= 5.2.34 +PORTREVISION= 1 CATEGORIES= emulators MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/ DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS} EXTRACT_ONLY= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} MAINTAINER= vbox@FreeBSD.org COMMENT= General-purpose full virtualizer for x86 hardware LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= yasm:devel/yasm \ xsltproc:textproc/libxslt \ kmk:devel/kBuild \ gtar:archivers/gtar LIB_DEPENDS= libpng.so:graphics/png \ libxslt.so:textproc/libxslt \ libcurl.so:ftp/curl RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} ONLY_FOR_ARCHS= i386 amd64 USES= compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2 USE_GNOME= libidl libxml2 HAS_CONFIGURE= yes CONFIGURE_ARGS= --disable-java --passive-mesa CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}" CONFLICTS_INSTALL= virtualbox-ose-additions-* \ virtualbox-ose-devel-[0-9]* \ virtualbox-ose-legacy-[0-9]* \ virtualbox-ose-lite-[0-9]* LDFLAGS= -lpthread VBOXUSER?= vboxusers VBOXWSUSER?= vboxusers VBOXGROUP?= vboxusers USERS= ${VBOXUSER} GROUPS= ${VBOXGROUP} VBOX_DIR= ${PREFIX}/${VBOX_DIR_REL} VBOX_DIR_REL= lib/virtualbox VBOX_LINKS= VBoxVRDP VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxHeadless \ VBoxManage VBOX_UTILS= VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT \ VBoxSVC VBoxXPCOMIPCD OPTIONS_DEFINE= ALSA DBUS DEBUG GUESTADDITIONS MANUAL NLS PULSEAUDIO \ PYTHON QT5 R0LOGGING UDPTUNNEL VDE VNC WEBSERVICE VPX X11 OPTIONS_DEFAULT= DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11 OPTIONS_SUB= yes DEBUG_DESC= Debug symbols, additional logs and assertions GUESTADDITIONS_DESC= Build with Guest Additions MANUAL_DESC= Build with user manual NLS_DESC= Native language support (requires QT5) QT5_DESC= Build with QT5 frontend (requires X11) R0LOGGING_DESC= Enable R0 logging (requires DEBUG) UDPTUNNEL_DESC= Build with UDP tunnel support VDE_DESC= Build with VDE support VNC_DESC= Build with VNC support VPX_DESC= Use libvpx for video recording WEBSERVICE_DESC= Build Webservice ALSA_CONFIGURE_OFF= --disable-alsa ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib DBUS_CONFIGURE_OFF= --disable-dbus DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DEBUG_CONFIGURE_ON= --build-debug MANUAL_BUILD_DEPENDS= ${LOCALBASE}/share/xml/docbook/4.4/docbookx.dtd:textproc/docbook-xml MANUAL_CONFIGURE_OFF= --disable-docs NLS_IMPLIES= QT5 PULSEAUDIO_CONFIGURE_OFF= --disable-pulse PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PYTHON_CONFIGURE_OFF= --disable-python QT5_IMPLIES= X11 R0LOGGING_IMPLIES= DEBUG UDPTUNNEL_CONFIGURE_OFF= --disable-udptunnel VDE_CONFIGURE_ON= --enable-vde VDE_RUN_DEPENDS= vde_switch:net/vde2 VNC_CONFIGURE_ON= --enable-vnc VNC_LIB_DEPENDS= libvncserver.so:net/libvncserver VPX_CONFIGURE_OFF= --disable-libvpx VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx X11_CONFIGURE_OFF= --build-headless ENV= .export ENV PLIST_SUB= GUEST_VER=${PORTVERSION} \ PYTHON_VERU=${PYTHON_VER:S/./_/}${PYTHON_ABIVER} \ VBOXGROUP=${VBOXGROUP} SUB_LIST= VBOXDIR=${VBOX_DIR} \ VBOXGROUP=${VBOXGROUP} \ VBOXUSER=${VBOXUSER} \ VBOXWSUSER=${VBOXWSUSER} USE_RC_SUBR= vboxheadless vboxwatchdog .include .if ${SLAVE_PORT} == no CONFLICTS_INSTALL+= virtualbox-ose-nox11-[0-9]* OPTIONS_DEFAULT+= PYTHON .else CONFLICTS_INSTALL+= virtualbox-ose-[0-9]* .endif .if ${ARCH} == "amd64" _ELF32!= kldstat -q -m elf32 && echo yes || echo no .endif .if ${PORT_OPTIONS:MDEBUG} KMK_BUILDTYPE= debug KMK_FLAGS+= BUILD_TYPE=debug .else KMK_BUILDTYPE= release .endif .if ${PORT_OPTIONS:MGUESTADDITIONS} GUESTADDITIONS= VBoxGuestAdditions_${PORTVERSION}.iso RESTRICTED= for personal use only RESTRICTED_FILES= ${GUESTADDITIONS} .endif .if ${PORT_OPTIONS:MMANUAL} DBKXMLDIR= ${LOCALBASE}/share/xml/docbook/4.4 DBKXSLDIR= ${LOCALBASE}/share/xsl/docbook USE_TEX= dvipsk:build formats:build .endif .if ${PORT_OPTIONS:MPYTHON} USES+= python:2.7 USE_PYTHON= distutils noegginfo noflavors PYDISTUTILS_PKGNAME= vboxapi PYDISTUTILS_PKGVERSION= 1.0 .else USES+= python:2.7,build .endif .if ${PORT_OPTIONS:MQT5} CONFIGURE_ARGS+= --enable-qt5 PLIST_SUB+= QT="" USES+= gl qmake:no_env qt:5 xorg USE_GL= gl glu USE_QT= buildtools_build core dbus gui linguisttools_build opengl USE_QT+= printsupport widgets x11extras USE_XORG= xcb INSTALLS_ICONS= yes VBOX_PROGS+= VirtualBox VBOX_UTILS+= VBoxTestOGL VBOX_WITH_QT= 1 .else CONFIGURE_ARGS+= --disable-qt PLIST_SUB+= QT="@comment " .endif .if ${PORT_OPTIONS:MWEBSERVICE} BUILD_DEPENDS+= soapcpp2:devel/gsoap USE_RC_SUBR+= vboxwebsrv VBOX_LINKS+= vboxwebsrv VBOX_UTILS+= vboxwebsrv webtest .endif .if ${PORT_OPTIONS:MX11} USES+= sdl USE_SDL= sdl USE_XORG+= xorgproto x11 xcursor xext xinerama xmu xt VBOX_PROGS+= VBoxSDL .endif .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} PLIST_SUB+= SDK="" .else PLIST_SUB+= SDK="@comment " .endif .if ${ARCH} == i386 KMK_ARCH= freebsd.x86 PLIST_SUB+= I386="" .else KMK_ARCH= freebsd.${ARCH} PLIST_SUB+= I386="@comment " .endif PLIST_SUB+= ARCH="${KMK_ARCH}" KMK_BUILDDIR= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE} KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys KMK_FLAGS+= -j${MAKE_JOBS_NUMBER} .include .if ${COMPILER_TYPE} == clang .if ${COMPILER_VERSION} >= 80 # XXX PR236616: Clang 8 & 9 caused runtime problems. BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER} CC= ${LOCALBASE}/bin/clang${VBOX_LLVM_VER} CXX= ${LOCALBASE}/bin/clang++${VBOX_LLVM_VER} VBOX_LLVM_VER?= 70 .endif PATCH_DEPENDS+= ${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Config.kmk \ ${PATCHDIR}/extrapatch-src-VBox-Devices-PC-ipxe-Makefile.kmk \ ${PATCHDIR}/extrapatch-src-recompiler-Makefile.kmk .endif .if ${PYTHON_MAJOR_VER} >= 3 PLIST_SUB+= PYTHON_PYCDIR=/__pycache__/ \ PYTHON_PYCEXT=.cpython-${PYTHON_SUFFIX}.pyc .else PLIST_SUB+= PYTHON_PYCDIR=/ \ PYTHON_PYCEXT=.pyc .endif .if ${SSL_DEFAULT} != base CONFIGURE_ARGS+= --with-openssl-dir="${OPENSSLBASE}" .endif pre-everything:: .if ${ARCH} == "amd64" .if ${_ELF32} != yes @${ECHO_MSG} 'Requires 32-bit runtime support in kernel.' @${ECHO_MSG} 'Rebuild kernel with "options COMPAT_FREEBSD32" and reboot.' @${FALSE} .elif !exists(/usr/lib32/libc.so) @${ECHO_MSG} 'Requires 32-bit libraries installed under /usr/lib32.' @${ECHO_MSG} 'Do: cd /usr/src; make build32 install32; service ldconfig restart' @${FALSE} .endif .endif post-patch: @${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' > \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_DOCBOOK = ${DBKXSLDIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_DOCBOOK_DTD = ${DBKXMLDIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_SHARED_LIBS = ${VBOX_DIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_RUNPATH = ${VBOX_DIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk .if ${SSL_DEFAULT} != base @${ECHO_CMD} 'VBOX_WITH_ALT_HASH_CODE = 1' >> ${WRKSRC}/LocalConfig.kmk .endif @${ECHO_CMD} 'VBOX_WITH_EXTPACK_VBOXDTRACE =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_VBOXDRV =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_TESTCASES =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'SDK_VBOX_LIBPNG_INCS = ${PREFIX}/include/libpng' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'SDK_VBOX_LIBPNG_LIBS = png' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_QT}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_QT}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_VALIDATIONKIT =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_X11_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk .if ${PORT_OPTIONS:MR0LOGGING} @${ECHO_CMD} 'VBOX_WITH_R0_LOGGING = 1' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${PORT_OPTIONS:MWEBSERVICE} @${ECHO_CMD} 'VBOX_WITH_WEBSERVICES = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GSOAP_INSTALLED = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP = ${PREFIX}/lib/gsoap' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP_BIN = ${PREFIX}/bin' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP_IMPORT = ${PREFIX}/share/gsoap/import' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GCC_PEDANTIC_CXX = -Wshadow $$(VBOX_GCC_WARN) -Wno-long-long' >> \ ${WRKSRC}/LocalConfig.kmk .endif .if ${COMPILER_TYPE} == clang @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk @${REINPLACE_CMD} -e 's| -fpermissive||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Main/webservice/Makefile.kmk @${ECHO_CMD} 'TOOL_VBoxGccFreeBSD_LD = ${CXX}' >> ${WRKSRC}/LocalConfig.kmk @${SED} -e 's|GXX3|VBoxGccFreeBSD|g' \ ${LOCALBASE}/share/kBuild/tools/GXX3.kmk > \ ${WRKSRC}/tools/kBuildTools/VBoxGccFreeBSD.kmk .endif @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ -e 's|SUPPYTHONLIBS=.*|SUPPYTHONLIBS="${PYTHON_VERSION}${PYTHON_ABIVER}"|' \ ${WRKSRC}/configure .if empty(ICONV_LIB) @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ -e 's|/usr/local|${PREFIX}|' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py do-build: cd ${WRKSRC} && ${SH} -c '. ${WRKSRC}/env.sh && \ ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}' .if ${PORT_OPTIONS:MPYTHON} ${PYTHON_CMD} -mcompileall \ ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom .endif do-install: .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} ${MKDIR} ${STAGEDIR}${DATADIR}/sdk .endif cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom && \ ${COPYTREE_SHARE} "idl samples" ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${PREFIX}/include/virtualbox cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/include && \ ${COPYTREE_SHARE} "*" ${STAGEDIR}${PREFIX}/include/virtualbox ${MKDIR} ${STAGEDIR}${VBOX_DIR} cd ${KMK_BUILDDIR}/bin && ${COPYTREE_SHARE} \ "*.fd *.r0 *.rc *.so components" ${STAGEDIR}${VBOX_DIR} .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} ${RLN} ${STAGEDIR}${DATADIR}/sdk ${STAGEDIR}${VBOX_DIR} .endif ${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh \ ${STAGEDIR}${VBOX_DIR} .for f in ${VBOX_PROGS} ${VBOX_UTILS} ${INSTALL_PROGRAM} ${KMK_BUILDDIR}/bin/${f} ${STAGEDIR}${VBOX_DIR} .endfor .for f in ${VBOX_PROGS} ${VBOX_LINKS} ${LN} -fs ../${VBOX_DIR_REL}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f} .endfor .for f in ${VBOX_PROGS} ${LN} -fs ../${VBOX_DIR_REL}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f:tl} .endfor .if ${PORT_OPTIONS:MGUESTADDITIONS} ${MKDIR} ${STAGEDIR}${VBOX_DIR}/additions ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} \ ${STAGEDIR}${VBOX_DIR}/additions/ ${RLN} ${STAGEDIR}${VBOX_DIR}/additions/${GUESTADDITIONS} \ ${STAGEDIR}${VBOX_DIR}/additions/VBoxGuestAdditions.iso .endif .if ${PORT_OPTIONS:MMANUAL} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/UserManual*.pdf \ ${STAGEDIR}${DOCSDIR} .endif .if ${PORT_OPTIONS:MNLS} cd ${KMK_BUILDDIR}/obj/VirtualBox/qtnls && \ ${COPYTREE_SHARE} "*.qm" ${STAGEDIR}${DATADIR}/nls .endif .if ${PORT_OPTIONS:MPYTHON} cd ${KMK_BUILDDIR}/bin/sdk/installer && \ ${SETENV} VBOX_INSTALL_PATH="${VBOX_DIR}" \ ${PYTHON_CMD} vboxapisetup.py install --root=${STAGEDIR} @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom && \ ${COPYTREE_SHARE} "*" ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom @${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/xpcom/python ${RLN} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom \ ${STAGEDIR}${DATADIR}/sdk/bindings/xpcom/python .endif .if ${PORT_OPTIONS:MQT5} ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/VBox.png ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop \ ${STAGEDIR}${PREFIX}/share/applications/virtualbox.desktop .endif .if ${PORT_OPTIONS:MVNC} ${MKDIR} ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH} ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/ExtPack* \ ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/ ${INSTALL_LIB} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/${KMK_ARCH}/* \ ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH}/ .endif .if ${PORT_OPTIONS:MWEBSERVICE} ${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/webservice ${INSTALL_DATA} ${KMK_BUILDDIR}/obj/webservice/vboxweb.wsdl \ ${STAGEDIR}${DATADIR}/sdk/bindings/webservice/ .endif .include Index: head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk =================================================================== --- head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk (revision 526588) +++ head/emulators/virtualbox-ose/files/patch-src_VBox_Additions_x11_vboxmouse_Makefile.kmk (revision 526589) @@ -1,29 +1,29 @@ --- src/VBox/Additions/x11/vboxmouse/Makefile.kmk.orig 2019-01-25 18:24:30 UTC +++ src/VBox/Additions/x11/vboxmouse/Makefile.kmk @@ -227,10 +227,22 @@ endif # neq ($(KBUILD_TARGET),linux) ifdef VBOX_USE_SYSTEM_XORG_HEADERS - # As vboxmouse_drv is not needed at all for X.Org Server 1.7 and later do not - # build it in this case. - DLLS := $(filter-out vboxmouse_drv_%,$(DLLS)) - SYSMODS := $(filter-out vboxmouse_drv%,$(SYSMODS)) + ifeq ($(KBUILD_TARGET),freebsd) + DLLS += vboxmouse_drv_system + vboxmouse_drv_system_TEMPLATE = VBOXGUESTR3XORGMOD + vboxmouse_drv_system_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC + vboxmouse_drv_system_INCS := \ -+ $(vboxmouse_xorg_INCS) \ ++ /usr/local/include/pixman-1 \ + /usr/local/include/xorg \ + $(PATH_SUB_CURRENT) + vboxmouse_drv_system_SOURCES = \ + vboxmouse.c + else + # As vboxmouse_drv is not needed at all for X.Org Server 1.7 and later do not + # build it in this case. + DLLS := $(filter-out vboxmouse_drv_%,$(DLLS)) + SYSMODS := $(filter-out vboxmouse_drv%,$(SYSMODS)) + endif endif Index: head/emulators/virtualbox-ose-additions/Makefile =================================================================== --- head/emulators/virtualbox-ose-additions/Makefile (revision 526588) +++ head/emulators/virtualbox-ose-additions/Makefile (revision 526589) @@ -1,194 +1,194 @@ # Created by: Bernhard Froehlich # $FreeBSD$ PORTNAME= virtualbox-ose PORTVERSION= 5.2.34 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= emulators MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/ PKGNAMESUFFIX?= -additions DISTNAME= VirtualBox-${PORTVERSION} MAINTAINER= vbox@FreeBSD.org COMMENT= VirtualBox additions for FreeBSD guests LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 i386 USES= compiler:c++11-lang cpe iconv kmod tar:bzip2 USE_RC_SUBR= vboxguest vboxservice BUILD_DEPENDS= yasm:devel/yasm \ kmk:devel/kBuild \ xsltproc:textproc/libxslt CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox PATCHDIR= ${.CURDIR}/../${PORTNAME}/files WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} MAKE_JOBS_UNSAFE= yes HAS_CONFIGURE= yes CONFIGURE_ARGS+= --disable-alsa \ --disable-docs \ --disable-libvpx \ --disable-pulse \ --disable-python \ --disable-sdl-ttf \ --disable-xpcom CONFIGURE_ARGS+= --nofatal --with-gcc="${CC}" --with-g++="${CXX}" CONFLICTS_INSTALL= virtualbox-ose-[0-9]* \ virtualbox-ose-additions-devel-[0-9]* \ virtualbox-ose-devel-[0-9]* \ virtualbox-ose-legacy-[0-9]* \ virtualbox-ose-lite-[0-9]* \ virtualbox-ose-nox11-[0-9]* OPTIONS_DEFINE= DBUS DEBUG OPENGL X11 OPTIONS_DEFAULT= DBUS X11 OPTIONS_SUB= yes OPENGL_DESC= 3D pass-through support (requires X11) DBUS_CONFIGURE_OFF= --disable-dbus DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DEBUG_CONFIGURE_ON= --build-debug DEBUG_VARS= KMK_BUILDTYPE=debug DEBUG_VARS_OFF= KMK_BUILDTYPE=release OPENGL_CONFIGURE_OFF= --disable-opengl OPENGL_IMPLIES= X11 OPENGL_USE= GL=gl,glu XORG=xcomposite,xdamage,xfixes OPENGL_USES= gl python:2.7,build xorg X11_BUILD_DEPENDS= ${LOCALBASE}/include/xorg/compiler.h:x11-servers/xorg-server X11_RUN_DEPENDS= xrandr:x11/xrandr X11_USE= XORG=x11,xcursor,xext,xorgproto,xmu,xrandr,xt X11_USES= pkgconfig xorg X11_VARS= VBOX_WITH_X11=1 .include .if ${SLAVE_PORT} == no CONFLICTS_INSTALL+= virtualbox-ose-additions-nox11-[0-9]* .else CONFLICTS_INSTALL+= virtualbox-ose-additions-[0-9]* .endif VIDEODIR= ${PREFIX}/lib/xorg/modules/drivers INPUTDIR= ${PREFIX}/lib/xorg/modules/input VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/additions VBOX_SBINS= VBoxControl \ VBoxService \ mount_vboxvfs BUILD_WRKSRC= ${VBOX_BIN}/src KMK_ARCH= freebsd.${ARCH:S/i386/x86/} KMK_CONFIG+= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys .if ${PORT_OPTIONS:MOPENGL} VBOX_LIBS= VBoxEGL.so \ VBoxOGL.so .endif .if ${PORT_OPTIONS:MX11} .else VBOX_WITH_X11= .endif .include .if ${COMPILER_TYPE} == clang EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Config.kmk .if ${COMPILER_FEATURES:Mlibc++} EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src-VBox-Additions-x11-VBoxClient-Makefile.kmk .endif .endif post-patch: @${ECHO_CMD} 'VBOX_ONLY_ADDITIONS = 1' > ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_X11_ADDITIONS = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GCC_std = -std=c++11' >> ${WRKSRC}/LocalConfig.kmk .if ${COMPILER_TYPE} == clang @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -fno-merge-constants||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk .endif @${REINPLACE_CMD} -e 's|/usr/X11|${LOCALBASE}|g' \ ${WRKSRC}/src/VBox/Additions/x11/VBoxClient/display.cpp @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ ${WRKSRC}/src/VBox/Additions/common/crOpenGL/load.c \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${WRKSRC}/src/VBox/Additions/x11/vboxmouse/Makefile.kmk \ ${WRKSRC}/src/VBox/Additions/x11/vboxvideo/Makefile.kmk @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ ${WRKSRC}/configure .if empty(ICONV_LIB) @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk \ ${WRKSRC}/src/VBox/Additions/x11/VBoxClient/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif post-patch-OPENGL-on: @${ECHO_CMD} 'VBOX_USE_SYSTEM_GL_HEADERS = 1' >> ${WRKSRC}/LocalConfig.kmk post-patch-X11-on: @${ECHO_CMD} 'VBOX_USE_SYSTEM_XORG_HEADERS = 1' >> \ ${WRKSRC}/LocalConfig.kmk pre-build: cd ${WRKSRC} && ${SH} -c \ ". env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk" do-install: ${MKDIR} ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko \ ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/vboxvfs.ko ${STAGEDIR}${KMODDIR} ${INSTALL_LIB} ${VBOX_BIN}/pam_vbox.so ${STAGEDIR}${PREFIX}/lib ${INSTALL_PROGRAM} ${VBOX_SBINS:S|^|${VBOX_BIN}/|} \ ${STAGEDIR}${PREFIX}/sbin/ do-install-X11-on: ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_SCRIPT} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${STAGEDIR}${PREFIX}/bin/VBoxClient-all # X11 autostart ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ # KDE autostart ${MKDIR} ${STAGEDIR}${PREFIX}/share/autostart/ ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${STAGEDIR}${PREFIX}/share/autostart/ ${MKDIR} ${STAGEDIR}${VIDEODIR} ${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_system.so \ ${STAGEDIR}${VIDEODIR}/vboxvideo_drv.so ${MKDIR} ${STAGEDIR}${INPUTDIR} ${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_system.so \ ${STAGEDIR}${INPUTDIR}/vboxmouse_drv.so do-install-OPENGL-on: ${INSTALL_DATA} ${FILESDIR}/vboxvideo.conf \ ${STAGEDIR}${PREFIX}/etc/libmap.d/ ${INSTALL_DATA} ${VBOX_LIBS:S|^|${VBOX_BIN}/|} \ ${STAGEDIR}${PREFIX}/lib/ .include Index: head/net/tigervnc-server/Makefile =================================================================== --- head/net/tigervnc-server/Makefile (revision 526588) +++ head/net/tigervnc-server/Makefile (revision 526589) @@ -1,93 +1,95 @@ # $FreeBSD$ PKGNAMESUFFIX= -server CATEGORIES= net x11-servers COMMENT= TigerVNC Server PATCH_DEPENDS+= ${NONEXISTENT}:x11-servers/xorg-server:patch BUILD_DEPENDS+= ${LOCALBASE}/include/GL/internal/dri_interface.h:graphics/mesa-dri \ ${LOCALBASE}/libdata/pkgconfig/fontutil.pc:x11-fonts/font-util \ bash:shells/bash LIB_DEPENDS= libxshmfence.so:x11/libxshmfence # almost equivalent to x11-servers/xorg-server's RUN_DEPENDS+= ${LOCALBASE}/share/X11/xkb/rules/base:x11/xkeyboard-config \ xkbcomp:x11/xkbcomp USES+= autoreconf:build gl jpeg libtool pkgconfig ssl xorg USE_LDCONFIG= yes USE_GL+= gl -USE_XORG+= ice pixman sm x11 xau xdamage xdmcp xext xfixes xfont xkbfile \ - xorg-macros xorgproto xrandr xrender xtrans xtst +USE_XORG+= ice pixman sm x11 xau xdamage xdmcp xext xfixes xfont2 \ + xkbfile xorg-macros xorgproto xrandr xrender xtrans xtst BINARY_WRAPPERS= gm4 OPTIONS_DEFINE= DOCS GNUTLS PAM OPTIONS_DEFAULT= GNUTLS PAM OPTIONS_SUB= yes GNUTLS_CMAKE_BOOL= ENABLE_GNUTLS GNUTLS_CONFIGURE_ARGS= --enable-glx-tls GNUTLS_LIB_DEPENDS= libtasn1.so:security/libtasn1 \ libgcrypt.so:security/libgcrypt \ libgpg-error.so:security/libgpg-error \ libgnutls.so:security/gnutls PAM_CMAKE_BOOL= ENABLE_PAM CONFIGURE_ARGS+= \ --prefix=${PREFIX} --mandir=${PREFIX}/man/ \ --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \ --disable-static --disable-dri --disable-unit-tests \ --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \ --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ --disable-config-dbus --disable-config-hal \ --disable-dri2 --enable-install-libxf86config --enable-glx \ --with-default-font-path="catalogue:${LOCALBASE}/share/fonts,built-ins" \ --with-xkb-path=${LOCALBASE}/share/X11/xkb \ --with-xkb-bin-directory=${LOCALBASE}/bin \ --with-serverconfig-path=${LOCALBASE}/lib/X11 \ --disable-selective-werror \ --disable-xwayland \ --with-fontrootdir=${LOCALBASE}/share/fonts + +CFLAGS+= -I${LOCALBASE}/include/libdrm # This is server port, disabling some features # - disable vncviewer # - server is not internationalized CMAKE_ARGS+= -DBUILD_VIEWER:BOOL=false -DENABLE_NLS:BOOL=false TIGERVNC_XORG_PATCH_VER= ${MAKE} -C "${.CURDIR}/../../x11-servers/xorg-server" -V PORTVERSION:R:S,\.,,g XORG_WRKSRC= ${MAKE} -C ${.CURDIR}/../../x11-servers/xorg-server -VWRKSRC pre-patch: @${CP} -R $$(${XORG_WRKSRC})/ ${WRKSRC}/unix/xserver/ post-patch: # do not build tests @${REINPLACE_CMD} -e 's|add_subdirectory(tests)||' ${WRKSRC}/CMakeLists.txt @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver$$(${TIGERVNC_XORG_PATCH_VER}).patch post-configure: @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ${AUTORECONF} -fiv @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure ${CONFIGURE_ARGS} post-build: @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash post-install: @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/Xvnc ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libvnc.so .include "${.CURDIR}/Makefile.common.mk" # import from x11-server/xorg-server/Makefile .if ${SSL_DEFAULT} == base # The reason why I use this is cause openssl from base doesn't # install a .pc file and configure will fail trying to find it. # Setting both of those variables to a *non-empty* value by-passes # the pkg-config check. CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include" .endif # keep in sync with all platforms where libunwind is available .if (${ARCH} == amd64 || ${ARCH} == i386) LIB_DEPENDS+= libunwind.so:devel/libunwind .endif Index: head/net/tigervnc-server/Makefile.common.mk =================================================================== --- head/net/tigervnc-server/Makefile.common.mk (revision 526588) +++ head/net/tigervnc-server/Makefile.common.mk (revision 526589) @@ -1,35 +1,36 @@ # $FreeBSD$ PORTNAME= tigervnc DISTVERSIONPREFIX= v DISTVERSION= 1.10.1 +PORTREVISION= 1 CATEGORIES= net x11-servers MAINTAINER?= meta@FreeBSD.org LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENCE.TXT USES+= cmake:insource,noninja USE_GITHUB= yes GH_ACCOUNT= TigerVNC CONFLICTS= tightvnc-[0-9]* PLIST_SUB+= TIGERVNC_COMPONENT=${PORTNAME}${PKGNAMESUFFIX}- CMAKE_ARGS+= -G "Unix Makefiles" MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC} DOCS= LICENCE.TXT README.rst .include PLIST= ${.CURDIR}/pkg-plist do-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} .for f in ${DOCS} (cd ${WRKSRC} && ${INSTALL_DATA} ${f} ${STAGEDIR}${DOCSDIR}/${PORTNAME}${PKGNAMESUFFIX}-${f}) .endfor .include Index: head/net/tigervnc-server/files/patch-unix_xserver_hw_vnc_xvnc.c =================================================================== --- head/net/tigervnc-server/files/patch-unix_xserver_hw_vnc_xvnc.c (nonexistent) +++ head/net/tigervnc-server/files/patch-unix_xserver_hw_vnc_xvnc.c (revision 526589) @@ -0,0 +1,18 @@ +--- unix/xserver/hw/vnc/xvnc.c.orig 2019-12-20 07:02:02 UTC ++++ unix/xserver/hw/vnc/xvnc.c +@@ -295,6 +295,15 @@ void ddxBeforeReset(void) + } + #endif + ++#if INPUTTHREAD ++/** This function is called in Xserver/os/inputthread.c when starting ++ the input thread. */ ++void ++ddxInputThreadInit(void) ++{ ++} ++#endif ++ + void ddxUseMsg(void) + { + vncPrintBanner(); Property changes on: head/net/tigervnc-server/files/patch-unix_xserver_hw_vnc_xvnc.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11/nvidia-driver/Makefile =================================================================== --- head/x11/nvidia-driver/Makefile (revision 526588) +++ head/x11/nvidia-driver/Makefile (revision 526589) @@ -1,276 +1,276 @@ # Created by: Stijn Hoop # $FreeBSD$ # # For those wondering why this port is not under `x11-drivers' category, # have a look at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121930. # # Starting with version 1.0-7667, NVidia has dropped support for numerous # "legacy" GPUs. Consult NVidia README (the Appendix) to find out whether # you need to use legacy driver version and install one of corresponding # slave ports instead (`x11/nvidia-driver-340' or `x11/nvidia-driver-304'). PORTNAME= nvidia-driver DISTVERSION?= 440.31 # Always try to set PORTREVISION as it can be overridden by the slave ports -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= x11 MASTER_SITES= NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION} DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= danfe@FreeBSD.org COMMENT= NVidia graphics card binary drivers for hardware OpenGL rendering LICENSE_FILE= ${WRKSRC}/doc/license.txt .include "${.CURDIR}/../nvidia-driver/Makefile.common" # Pull GNU sed(1) for "binary" patching of obj/libglvnd/libEGL.so.1 and # obj/libEGL_nvidia.so.0 (see below) .if ${NVVERSION} >= 410.057 PATCH_DEPENDS= gsed:textproc/gsed .endif USES= kmod uidfix xorg USE_XORG= x11 xorg-server xext USE_LDCONFIG= yes # NVIDIA_ROOT is not set in src/Makefile, which results in bogus -I/src # passed to compiler and broken build on HEAD since r221320 when option # -Wmissing-include-dirs was added for kernel sources. Until properly # fixed upstream (across all versions, including legacy ones), use this # hack below to universally set NVIDIA_ROOT. Also provide X11BASE value # since it is still used by legacy drivers. GLVND_JSON_PATH= ${PREFIX}/share/glvnd/egl_vendor.d WAYLAND_JSON_PATH= ${PREFIX}/share/egl/egl_external_platform.d MAKE_ENV= NVIDIA_ROOT=${WRKSRC} X11BASE=${LOCALBASE} \ EGL_GLVND_JSON_PATH=${STAGEDIR}${GLVND_JSON_PATH} \ EGL_WAYLAND_JSON_PATH=${STAGEDIR}${WAYLAND_JSON_PATH} SUB_FILES= pkg-message nvidia.conf .if ${NVVERSION} < 410.057 SUB_FILES+= pkg-deinstall pkg-install .endif SUB_PATCHES= extra-patch-src-Makefile \ extra-patch-src-nv-freebsd.h \ extra-patch-src-nv-misc.h \ extra-patch-src-nvidia_ctl.c \ extra-patch-src-nvidia_dev.c \ extra-patch-src-nvidia_linux.c \ extra-patch-src-nvidia_pci.c DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 MODULESDIR= lib/xorg/modules PORTDOCS= * .if ${NVVERSION} >= 331.013 SUB_LIST+= NVGL="" .else SUB_LIST+= NVGL="\# " .endif .if ${NVVERSION} < 355.006 NVSRC= . .else NVSRC= nvidia .endif .if ${NVVERSION} >= 358.009 # Initialize memory allocations to avoid spurious "lock re-initialization" # errors. A little more detail can be found in bug 201340 starting around # comment #50. EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_nvidia-modeset_nvidia-modeset-freebsd.c .endif OPTIONS_DEFINE= ACPI_PM LINUX WBINVD DOCS OPTIONS_DEFINE_i386= PAE OPTIONS_DEFAULT= LINUX ACPI_PM_DESC= ACPI Power Management support LINUX_DESC= Linux compatibility support PAE_DESC= Physical Address Extensions support WBINVD_DESC= Flush CPU caches directly with WBINVD .if ${NVVERSION} < 310.014 OPTIONS_DEFINE+= FREEBSD_AGP FREEBSD_AGP_DESC= Use FreeBSD AGP GART driver .endif PLIST_SUB+= MODULESDIR=${MODULESDIR} .include pre-patch: .for p in ${SUB_PATCHES} @${SED} 's/%%NVSRC%%/${NVSRC}/g' ${PATCHDIR}/${p}.in > ${WRKDIR}/${p} .endfor .for p in ${SUB_PATCHES} EXTRA_PATCHES+= ${WRKDIR}/${p} .endfor post-patch: .SILENT # We should support -CURRENT: kill the check ${REINPLACE_CMD} -e '24,26d' ${WRKSRC}/src/${NVSRC}/nv-freebsd.h # Adjust Linux headers #include's after FreeBSD src r246085 ${REINPLACE_CMD} -E '/#include "machine\/\.\.\/linux(32)?\/linux.h"/ \ { x ; s/.*/#include "machine\/..\/..\/compat\/linux\/linux_ioctl.h"/ ; H ; x ; }' \ ${WRKSRC}/src/${NVSRC}/nvidia_linux.c # Fix bogus memset() call ${REINPLACE_CMD} -e '/memset/s/sizeof(ci/sizeof(*ci/' \ ${WRKSRC}/src/${NVSRC}/nvidia_subr.c # Chase `sys/capability.h' rename to `sys/capsicum.h' in FreeBSD src r263232 ${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h .if ${NVVERSION} >= 358.009 ${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \ ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c .endif # KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318 .if ${OSVERSION} >= 1200079 ${REINPLACE_CMD} \ -e 's/kmem_alloc_contig(kmem_arena, /kmem_alloc_contig(/' \ -e 's/kmem_free(kmem_arena, /kmem_free(/' \ ${WRKSRC}/src/${NVSRC}/nvidia_subr.c .endif # Pull the right header after FreeBSD src r347984 .if ${OSVERSION} >= 1300029 && ${NVVERSION} >= 358.009 ${REINPLACE_CMD} -e '/^#include/s:lock\.h:mutex.h:' \ ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c .endif # Disable installation of Linux libraries (provided by the corresponding # `x11/linux-nvidia-libs' port or its slaves) ${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& 0/' \ ${WRKSRC}/lib/Makefile # Do not install VDPAU libraries which are provided by `multimedia/libvdpau' # port for a while now ${REINPLACE_CMD} -e '/libvdpau[[:blank:]_][^n]/d ; \ s/name libvdpau/&_nvidia/' ${WRKSRC}/lib/Makefile # Do not build any binaries (native nvidia-settings and nvidia-xconfig are # provided by their corresponding ports) and manual pages ${REINPLACE_CMD} -E 's/(extension).*/\1/' ${WRKSRC}/x11/Makefile ${REINPLACE_CMD} -e '/bin/d ; /man/d' ${WRKSRC}/x11/Makefile # Also do not install libnvidia-gtk* libraries which are for nvidia-settings .if ${NVVERSION} >= 346.016 ${REINPLACE_CMD} -e '/libnvidia-gtk/d' ${WRKSRC}/lib/Makefile .endif # Adjust installation path of a conflicting file (shared between # nvidia-driver and xorg-server) to ease package manager work .if ${NVVERSION} < 410.057 ${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \ ${WRKSRC}/x11/extension/Makefile .endif # Do not execute afterinstall target (prevent automatic module registration # and "smart" installation of conflicting files heuristics) ${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile ${REINPLACE_CMD} -e 's/beforeinstall/&_dontexecute/' \ ${WRKSRC}/lib/Makefile ${WRKSRC}/src/${NVSRC}/Makefile # /usr/share/nvidia path is hardcoded in libGL and nvidia-settings, but we # won't adhere to this stupidity and install nvidia-application-profiles-* # files as part of documentation .if ${NVVERSION} >= 410.057 ${REINPLACE_CMD} -e 's,/usr/share/nvidia,$${DESTDIR}${DOCSDIR},' \ ${WRKSRC}/lib/libGLX_nvidia/Makefile ${WRKSRC}/doc/Makefile ${REINPLACE_CMD} -e '/AUXLINK_LINK/s,\$${DESTDIR},,' \ ${WRKSRC}/lib/libGLX_nvidia/Makefile prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \ gsed ${REINPLACE_ARGS} -E "s,/etc/glvnd/egl_vendor\.d.{$$padding},${GLVND_JSON_PATH}\x00," \ ${WRKSRC}/obj/libglvnd/libEGL.so.1 .elif ${NVVERSION} >= 334.016 ${REINPLACE_CMD} -e 's,/usr/share/nvidia,$${DESTDIR}${DOCSDIR},' \ ${WRKSRC}/lib/libGL/Makefile ${WRKSRC}/doc/Makefile .endif .if ${NVVERSION} >= 415.013 prefix="${PREFIX}" ; padding=$$(($${#prefix}+3)) ; \ gsed ${REINPLACE_ARGS} -E "s,/etc/egl/egl_external_platform\.d.{$$padding},${WAYLAND_JSON_PATH}\x00," \ ${WRKSRC}/obj/libEGL_nvidia.so.0 .endif # Finally, process OPTIONS .if ${PORT_OPTIONS:MFREEBSD_AGP} ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h .endif .if ${PORT_OPTIONS:MACPI_PM} ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h .endif .if ! ${PORT_OPTIONS:MLINUX} ${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h . if ${NVVERSION} >= 358.009 ${REINPLACE_CMD} -E 's/define (NVKMS_SUPPORT_LINUX_COMPAT)/undef \1/' \ ${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c . endif .endif .if ${PORT_OPTIONS:MPAE} ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h .endif .if ${PORT_OPTIONS:MWBINVD} ${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \ ${WRKSRC}/src/${NVSRC}/nv-freebsd.h .endif # Conditionally install documentation (but you generally want it) .if ! ${PORT_OPTIONS:MDOCS} ${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile .endif pre-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${MODULESDIR}/drivers \ ${STAGEDIR}${PREFIX}/${MODULESDIR}/extensions post-install: .SILENT ${INSTALL_SCRIPT} ${WRKSRC}/obj/nvidia-bug-report.sh \ ${STAGEDIR}${PREFIX}/bin # pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's .if ${NVVERSION} >= 304.128 && ${NVVERSION} < 310.019 || ${NVVERSION} >= 361.016 ${REINPLACE_CMD} -E '/libvdpau(_trace)?\.so/d' ${TMPPLIST} .endif .if ${NVVERSION} >= 310.019 ${REINPLACE_CMD} -e '/libXvMCNVIDIA/d' ${TMPPLIST} .else # some applications need this symlink (see PR ports/72877) ${LN} -sf libXvMCNVIDIA.so.1 \ ${STAGEDIR}${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1 .endif .if ${NVVERSION} < 331.013 || ${ARCH} == amd64 && ${NVVERSION} < 334.016 ${REINPLACE_CMD} -E '/lib(nvidia-)?(EGL|eglcore|GLESv|glsi)/d' \ ${TMPPLIST} .endif .if ${NVVERSION} < 352.009 ${REINPLACE_CMD} -E '/(lib)?nvidia-(debugdump|smi|ml)/d' ${TMPPLIST} .endif .if ${NVVERSION} < 358.009 ${REINPLACE_CMD} -e '/nvidia-modeset\.ko/d' ${TMPPLIST} .endif .if ${NVVERSION} < 410.057 ${REINPLACE_CMD} -E '/lib(EGL|GLESv[12].*)_nvidia/d ; \ /lib(GLX|GLdispatch|OpenGL)/d ; \ /extensions\/libglxserver_nvidia\.so/d ; \ /10_nvidia\.json/d' ${TMPPLIST} .else ${REINPLACE_CMD} -e '/extensions\/\.nvidia\/libglx/d' ${TMPPLIST} .endif .if ${NVVERSION} < 415.013 ${REINPLACE_CMD} -e '/libnvidia-egl-wayland\.so/d ; \ /10_nvidia_wayland\.json/d' ${TMPPLIST} .endif # Rename some libraries and install a libmap file to resolve conflict with # Mesa libraries. ${LN} -sf libGL-NVIDIA.so.1 \ ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so ${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \ ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1 ${RM} ${STAGEDIR}${PREFIX}/lib/libGL.so .if ${NVVERSION} >= 331.013 ${LN} -sf libEGL-NVIDIA.so.1 \ ${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so ${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \ ${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1 ${RM} ${STAGEDIR}${PREFIX}/lib/libEGL.so ${LN} -sf libGLESv2-NVIDIA.so.2 \ ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so ${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \ ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 ${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so .endif @${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/ ${INSTALL_DATA} ${WRKDIR}/nvidia.conf \ ${STAGEDIR}${PREFIX}/etc/libmap.d/ .include Index: head/x11/nvidia-driver-304/Makefile =================================================================== --- head/x11/nvidia-driver-304/Makefile (revision 526588) +++ head/x11/nvidia-driver-304/Makefile (revision 526589) @@ -1,11 +1,11 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ DISTVERSION= 304.137 # Explicitly set PORTREVISION as it can be overridden by the master port -PORTREVISION= 5 +PORTREVISION= 6 MASTERDIR= ${.CURDIR}/../nvidia-driver PKGNAMESUFFIX= -304 .include "${MASTERDIR}/Makefile" Index: head/x11/nvidia-driver-340/Makefile =================================================================== --- head/x11/nvidia-driver-340/Makefile (revision 526588) +++ head/x11/nvidia-driver-340/Makefile (revision 526589) @@ -1,11 +1,11 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ DISTVERSION= 340.107 # Explicitly set PORTREVISION as it can be overridden by the master port -PORTREVISION= 5 +PORTREVISION= 6 MASTERDIR= ${.CURDIR}/../nvidia-driver PKGNAMESUFFIX= -340 .include "${MASTERDIR}/Makefile" Index: head/x11/nvidia-driver-390/Makefile =================================================================== --- head/x11/nvidia-driver-390/Makefile (revision 526588) +++ head/x11/nvidia-driver-390/Makefile (revision 526589) @@ -1,11 +1,11 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ DISTVERSION= 390.129 # Explicitly set PORTREVISION as it can be overridden by the master port -PORTREVISION= 0 +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../nvidia-driver PKGNAMESUFFIX= -390 .include "${MASTERDIR}/Makefile" Index: head/x11/slim/Makefile =================================================================== --- head/x11/slim/Makefile (revision 526588) +++ head/x11/slim/Makefile (revision 526589) @@ -1,67 +1,67 @@ # Created by: Tobias Roth # $FreeBSD$ PORTNAME= slim PORTVERSION= 1.3.6 -PORTREVISION= 18 +PORTREVISION= 19 CATEGORIES= x11 MASTER_SITES= ftp://ftp.berlios.de/pub/slim/ \ SF/slim.berlios MAINTAINER= henry.hu.sh@gmail.com COMMENT= Graphical login manager for X11, derived from Login.app LICENSE= GPLv2 BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/pthread-stubs.pc:devel/libpthread-stubs LIB_DEPENDS= libpng.so:graphics/png \ libfreetype.so:print/freetype2 \ libfontconfig.so:x11-fonts/fontconfig USES= cmake compiler:c++11-lang jpeg pkgconfig xorg USE_XORG= ice sm x11 xau xcb xdmcp xext xft xmu xorg-server xrandr \ xrender xt USE_RC_SUBR= slim USE_LDCONFIG= yes SUB_FILES= pkg-message CMAKE_ARGS= -DUSE_CONSOLEKIT=yes \ -DBUILD_SLIMLOCK=no \ -DBUILD_SHARED_LIBS=yes OPTIONS_DEFINE= XDEFAULT PAM UTF8 CONSOLEKIT OPTIONS_DEFAULT= XDEFAULT PAM UTF8 CONSOLEKIT OPTIONS_SUB= yes XDEFAULT_DESC=Allow to set a default xsession in .xinitrc UTF8_DESC= Support UTF-8 characters CONSOLEKIT_DESC=Enable support for consolekit PLIST_SUB+= VERSION="${PORTVERSION}" PAM_CMAKE_ON= -DUSE_PAM=yes PAM_CMAKE_OFF= -DUSE_PAM=no # patch taken from https://github.com/iwamatsu/slim/pull/1 XDEFAULT_EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-xdefault # patch taken from slim-unicode in Arch User Repository UTF8_EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-utf8 CONSOLEKIT_CMAKE_ON= -DUSE_CONSOLEKIT=yes CONSOLEKIT_LIB_DEPENDS= libck-connector.so:sysutils/consolekit2 \ libdbus-1.so:devel/dbus CONSOLEKIT_CMAKE_OFF= -DUSE_CONSOLEKIT=no post-patch: @${CP} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/slim.conf.sample @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \ ${WRKSRC}/slim.1 post-install-PAM-on: ${INSTALL_DATA} ${FILESDIR}/pam.conf ${STAGEDIR}${PREFIX}/etc/pam.d/slim.sample .include Index: head/x11-drivers/xf86-input-egalax/Makefile =================================================================== --- head/x11-drivers/xf86-input-egalax/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-egalax/Makefile (revision 526589) @@ -1,20 +1,20 @@ # Created by: Gleb Smirnoff # $FreeBSD$ PORTNAME= xf86-input-egalax PORTVERSION= 0.3 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= glebius@FreeBSD.org COMMENT= eGalax touch screen input driver for X.Org USE_GITHUB= yes GH_ACCOUNT= glebius GH_TAGNAME= 7f1e4ac LICENSE= BSD2CLAUSE USES= autoreconf xorg-cat:driver .include Index: head/x11-drivers/xf86-input-elographics/Makefile =================================================================== --- head/x11-drivers/xf86-input-elographics/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-elographics/Makefile (revision 526589) @@ -1,15 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-input-elographics PORTVERSION= 1.4.2 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org elographics input driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-input-evdev/Makefile =================================================================== --- head/x11-drivers/xf86-input-evdev/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-evdev/Makefile (revision 526589) @@ -1,22 +1,22 @@ # $FreeBSD$ PORTNAME= xf86-input-evdev PORTVERSION= 2.10.6 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org event device input driver LICENSE= MIT # various styles LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto LIB_DEPENDS= libevdev.so:devel/libevdev \ libmtdev.so:devel/libmtdev RUN_DEPENDS= webcamd>=3.1.0.1:multimedia/webcamd USES= pathfix xorg-cat:driver CONFIGURE_ENV= UDEV_CFLAGS=" " UDEV_LIBS=" " .include Index: head/x11-drivers/xf86-input-joystick/Makefile =================================================================== --- head/x11-drivers/xf86-input-joystick/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-joystick/Makefile (revision 526589) @@ -1,16 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-input-joystick PORTVERSION= 1.6.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org joystick input driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= pathfix xorg-cat:driver .include Index: head/x11-drivers/xf86-input-keyboard/Makefile =================================================================== --- head/x11-drivers/xf86-input-keyboard/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-keyboard/Makefile (revision 526589) @@ -1,16 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-input-keyboard PORTVERSION= 1.9.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org keyboard input driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-input-libinput/Makefile =================================================================== --- head/x11-drivers/xf86-input-libinput/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-libinput/Makefile (revision 526589) @@ -1,18 +1,19 @@ # $FreeBSD$ PORTNAME= xf86-input-libinput PORTVERSION= 0.28.2 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org libinput input driver LICENSE= MIT # various styles LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto LIB_DEPENDS= libinput.so:x11/libinput USES= pathfix xorg-cat:driver .include Index: head/x11-drivers/xf86-input-mouse/Makefile =================================================================== --- head/x11-drivers/xf86-input-mouse/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-mouse/Makefile (revision 526589) @@ -1,16 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-input-mouse PORTVERSION= 1.9.3 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org mouse input driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= pathfix xorg-cat:driver .include Index: head/x11-drivers/xf86-input-synaptics/Makefile =================================================================== --- head/x11-drivers/xf86-input-synaptics/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-synaptics/Makefile (revision 526589) @@ -1,24 +1,24 @@ # $FreeBSD$ PORTNAME= xf86-input-synaptics PORTVERSION= 1.9.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org synaptics input driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= pathfix xorg xorg-cat:driver USE_XORG= x11 xtst OPTIONS_DEFINE= EVDEV EVDEV_DESC= Use evdev for input events (requires kernel support) EVDEV_CONFIGURE_ENV= BUILD_EVENTCOMM=yes EVDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto EVDEV_LIB_DEPENDS= libevdev.so:devel/libevdev .include Index: head/x11-drivers/xf86-input-vmmouse/Makefile =================================================================== --- head/x11-drivers/xf86-input-vmmouse/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-vmmouse/Makefile (revision 526589) @@ -1,20 +1,20 @@ # Created by: NIIMI Satoshi # $FreeBSD$ PORTNAME= xf86-input-vmmouse PORTVERSION= 13.1.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org vmmouse input driver LIB_DEPENDS= libhal.so:sysutils/hal USES= gmake xorg-cat:driver CONFIGURE_ARGS= --with-hal-callouts-dir=${PREFIX}/libexec/hal/scripts ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= The vmmouse protocol is only supported on x86-compatible architectures. .include Index: head/x11-drivers/xf86-input-void/Makefile =================================================================== --- head/x11-drivers/xf86-input-void/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-void/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-input-void PORTVERSION= 1.4.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org void input driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-input-wacom/Makefile =================================================================== --- head/x11-drivers/xf86-input-wacom/Makefile (revision 526588) +++ head/x11-drivers/xf86-input-wacom/Makefile (revision 526589) @@ -1,44 +1,45 @@ # $FreeBSD$ PORTNAME= xf86-input-wacom PORTVERSION= 0.39.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MASTER_SITES= https://github.com/linuxwacom/${PORTNAME}/releases/download/${DISTNAME}/ MAINTAINER= jbeich@FreeBSD.org COMMENT= X.Org Wacom tablet driver LICENSE= GPLv2+ BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto RUN_DEPENDS= webcamd>=3.1.0.1:multimedia/webcamd USES= gmake pathfix xorg xorg-cat:driver USE_XORG= x11 xext xinerama xrandr LDFLAGS+= -Wl,--as-needed # Xext USE_RC_SUBR= wacom SUB_FILES= pkg-message CONFIGURE_ENV= UDEV_CFLAGS=" " UDEV_LIBS=" " CONFIGURE_ARGS= --without-systemd-unit-dir \ --without-udev-rules-dir \ --without-doxygen OPTIONS_DEFINE= DEBUG TEST DEBUG_CONFIGURE_ENABLE=debug TEST_CONFIGURE_ENABLE=unit-tests TEST_ALL_TARGET=check post-patch: @${REINPLACE_CMD} \ -e 's/dir=.*xorg-server/& \ --define-variable prefix="$$prefix"/' \ ${WRKSRC}/configure post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d ${INSTALL_DATA} ${FILESDIR}/wacom.conf.sample \ ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d .include Index: head/x11-drivers/xf86-video-amdgpu/Makefile =================================================================== --- head/x11-drivers/xf86-video-amdgpu/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-amdgpu/Makefile (revision 526589) @@ -1,29 +1,30 @@ # $FreeBSD$ # this port is for future amdgpu kernel support testing. PORTNAME= xf86-video-amdgpu PORTVERSION= 19.1.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org amdgpu display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm USES= gl xorg-cat:driver USE_GL= gbm # No amdgpu kernel driver on non-x86 and PC98. ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= KMS is required and currently only available on x86 CONFIGURE_ARGS+=--disable-udev PLIST_FILES= lib/xorg/modules/drivers/amdgpu_drv.so \ man/man4/amdgpu.4x.gz \ share/X11/xorg.conf.d/10-amdgpu.conf .include Index: head/x11-drivers/xf86-video-apm/Makefile =================================================================== --- head/x11-drivers/xf86-video-apm/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-apm/Makefile (revision 526589) @@ -1,12 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-apm PORTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org apm display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-ark/Makefile =================================================================== --- head/x11-drivers/xf86-video-ark/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-ark/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-ark PORTVERSION= 0.7.5 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org ark display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-ast/Makefile =================================================================== --- head/x11-drivers/xf86-video-ast/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-ast/Makefile (revision 526589) @@ -1,19 +1,19 @@ # $FreeBSD$ PORTNAME= xf86-video-ast PORTVERSION= 1.1.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org ASPEED display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= xorg-cat:driver INSTALL_TARGET= install-strip PLIST_FILES= lib/xorg/modules/drivers/ast_drv.so .include Index: head/x11-drivers/xf86-video-ati/Makefile =================================================================== --- head/x11-drivers/xf86-video-ati/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-ati/Makefile (revision 526589) @@ -1,29 +1,30 @@ # $FreeBSD$ PORTNAME= xf86-video-ati PORTVERSION= 19.1.0 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org ati display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING # No Radeon kernel driver on non-x86. ONLY_FOR_ARCHS= amd64 i386 powerpc64 ONLY_FOR_ARCHS_REASON= KMS is required and currently only available on x86 LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \ libdrm_radeon.so:graphics/libdrm CONFLICTS_INSTALL= xf86-video-ati-legacy USES= gl xorg xorg-cat:driver USE_GL= gl USE_XORG= pciaccess CONFIGURE_ARGS+=--disable-udev .include Index: head/x11-drivers/xf86-video-ati-legacy/Makefile =================================================================== --- head/x11-drivers/xf86-video-ati-legacy/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-ati-legacy/Makefile (revision 526589) @@ -1,33 +1,33 @@ # $FreeBSD$ PORTNAME= xf86-video-ati-legacy PORTVERSION= 7.9.0 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 1 CATEGORIES= x11-drivers DISTNAME= xf86-video-ati-${DISTVERSION} MAINTAINER= x11@FreeBSD.org COMMENT= X.Org ati display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING # No Radeon kernel driver on non-x86 and PC98. ONLY_FOR_ARCHS= amd64 i386 powerpc64 ONLY_FOR_ARCHS_REASON= KMS is required and currently only available on x86 LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \ libdrm_radeon.so:graphics/libdrm CONFLICTS_INSTALL= xf86-video-ati PORTSCOUT= limit:^7\.9\.0 USES= gl xorg xorg-cat:driver USE_GL= gl USE_XORG= pciaccess CONFIGURE_ARGS+=--disable-udev .include Index: head/x11-drivers/xf86-video-chips/Makefile =================================================================== --- head/x11-drivers/xf86-video-chips/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-chips/Makefile (revision 526589) @@ -1,12 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-chips PORTVERSION= 1.4.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org chips display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-cirrus/Makefile =================================================================== --- head/x11-drivers/xf86-video-cirrus/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-cirrus/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-cirrus PORTVERSION= 1.5.3 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org cirrus display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-dummy/Makefile =================================================================== --- head/x11-drivers/xf86-video-dummy/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-dummy/Makefile (revision 526589) @@ -1,16 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-video-dummy PORTVERSION= 0.3.8 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org dummy display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-geode/Makefile =================================================================== --- head/x11-drivers/xf86-video-geode/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-geode/Makefile (revision 526589) @@ -1,15 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-video-geode PORTVERSION= 2.11.20 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org geode display driver USES= xorg-cat:driver ONLY_FOR_ARCHS= i386 ONLY_FOR_ARCHS_REASON= Geode processors are 32bit x86 only .include Index: head/x11-drivers/xf86-video-glint/Makefile =================================================================== --- head/x11-drivers/xf86-video-glint/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-glint/Makefile (revision 526589) @@ -1,14 +1,14 @@ # $FreeBSD$ PORTNAME= xf86-video-glint PORTVERSION= 1.2.9 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org glint display driver USES= gl xorg-cat:driver USE_GL= gl .include Index: head/x11-drivers/xf86-video-i128/Makefile =================================================================== --- head/x11-drivers/xf86-video-i128/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-i128/Makefile (revision 526589) @@ -1,12 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-i128 PORTVERSION= 1.4.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org i128 display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-i740/Makefile =================================================================== --- head/x11-drivers/xf86-video-i740/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-i740/Makefile (revision 526589) @@ -1,12 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-i740 PORTVERSION= 1.4.0 -CATEGORIES= x11-drivers +PORTREVISION= 1 +CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org i740 display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-intel/Makefile =================================================================== --- head/x11-drivers/xf86-video-intel/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-intel/Makefile (revision 526589) @@ -1,42 +1,43 @@ # Created by: lesi@FreeBSD.org # $FreeBSD$ PORTNAME= xf86-video-intel PORTVERSION= 2.99.917.20181203 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= Driver for Intel integrated graphics chipsets LICENSE= MIT # various LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Intel integrated GPU only exists in Intel x86 processors/chipsets LIB_DEPENDS= libxcb-util.so:x11/xcb-util \ libdrm.so:graphics/libdrm USES= cpe gl xorg xorg-cat:driver USE_GITLAB= yes GL_COMMIT= e5ff8e1828f97891c819c919d7115c6e18b2eb1f USE_GL= gl USE_XORG= pciaccess pixman x11 xcb xext xrender xv xvmc USE_LDCONFIG= yes CPE_VENDOR= x OPTIONS_SINGLE= ACCEL OPTIONS_SINGLE_ACCEL= SNA UXA OPTIONS_DEFAULT= UXA ACCEL_DESC= Default AccelMethod (if not specified in xorg.conf) SNA_DESC= SandyBridge's New Acceleration UXA_DESC= Unified Acceleration Architecture CONFIGURE_ARGS+= --disable-udev SNA_CONFIGURE_ON= --with-default-accel=sna UXA_CONFIGURE_ON= --with-default-accel=uxa .include Index: head/x11-drivers/xf86-video-mach64/Makefile =================================================================== --- head/x11-drivers/xf86-video-mach64/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-mach64/Makefile (revision 526589) @@ -1,14 +1,14 @@ # $FreeBSD$ PORTNAME= xf86-video-mach64 PORTVERSION= 6.9.6 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org mach64 display driver USES= gl xorg-cat:driver USE_GL= gl .include Index: head/x11-drivers/xf86-video-mga/Makefile =================================================================== --- head/x11-drivers/xf86-video-mga/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-mga/Makefile (revision 526589) @@ -1,14 +1,15 @@ # $FreeBSD$ PORTNAME= xf86-video-mga PORTVERSION= 2.0.0 +PORTREVISION= 1 PORTEPOCH= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org mga display driver USES= gl xorg-cat:driver USE_GL= gl .include Index: head/x11-drivers/xf86-video-neomagic/Makefile =================================================================== --- head/x11-drivers/xf86-video-neomagic/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-neomagic/Makefile (revision 526589) @@ -1,12 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-neomagic PORTVERSION= 1.3.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org neomagic display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-nv/Makefile =================================================================== --- head/x11-drivers/xf86-video-nv/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-nv/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-nv PORTVERSION= 2.1.21 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org nv display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-openchrome/Makefile =================================================================== --- head/x11-drivers/xf86-video-openchrome/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-openchrome/Makefile (revision 526589) @@ -1,35 +1,35 @@ # $FreeBSD$ PORTNAME= xf86-video-openchrome PORTVERSION= 0.6.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org openChrome display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libdrm.so:graphics/libdrm USES= gl xorg xorg-cat:driver USE_GL= gl USE_XORG= x11 xext xv # Override pkg-config to prevent linking against libudev CONFIGURE_ENV+= LIBUDEV_LIBS="-L${LOCALBASE}" MAKE_ARGS+= drivermandir=${LOCALBASE}/man/man4 .include # XvMC is only supported by this driver on x86 .if ${ARCH} == "i386" || ${ARCH} == "amd64" USE_XORG+= xvmc PLIST_SUB+= XVMC="" .else PLIST_SUB+= XVMC="@comment " .endif .include Index: head/x11-drivers/xf86-video-qxl/Makefile =================================================================== --- head/x11-drivers/xf86-video-qxl/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-qxl/Makefile (revision 526589) @@ -1,33 +1,33 @@ # $FreeBSD$ PORTNAME= xf86-video-qxl DISTVERSION= 0.1.5 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org X server -- QXL display driver LICENSE= MIT BUILD_DEPENDS= spice-protocol>=0.12.10:devel/spice-protocol \ ${LOCALBASE}/include/linux/input.h:devel/evdev-proto LIB_DEPENDS= libspice-server.so:devel/libspice-server USES= localbase:ldflags pkgconfig python:2.7 shebangfix xorg \ xorg-cat:driver USE_XORG= xfont CONFIGURE_ARGS+=--enable-xspice python_OLD_CMD= "/usr/bin/python" SHEBANG_FILES= scripts/Xspice OPTIONS_DEFINE= DOCS post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d ${INSTALL_DATA} ${WRKSRC}/examples/spiceqxl.xorg.conf.example \ ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d/spiceqxl.xorg.conf.example .include Index: head/x11-drivers/xf86-video-r128/Makefile =================================================================== --- head/x11-drivers/xf86-video-r128/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-r128/Makefile (revision 526589) @@ -1,16 +1,17 @@ # $FreeBSD$ PORTNAME= xf86-video-r128 PORTVERSION= 6.12.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org r128 display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= gl xorg-cat:driver USE_GL= gl .include Index: head/x11-drivers/xf86-video-rendition/Makefile =================================================================== --- head/x11-drivers/xf86-video-rendition/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-rendition/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-rendition PORTVERSION= 4.2.7 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org rendition display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-s3/Makefile =================================================================== --- head/x11-drivers/xf86-video-s3/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-s3/Makefile (revision 526589) @@ -1,15 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-video-s3 PORTVERSION= 0.7.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org s3 display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-s3virge/Makefile =================================================================== --- head/x11-drivers/xf86-video-s3virge/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-s3virge/Makefile (revision 526589) @@ -1,12 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-s3virge PORTVERSION= 1.11.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org s3virge display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-savage/Makefile =================================================================== --- head/x11-drivers/xf86-video-savage/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-savage/Makefile (revision 526589) @@ -1,14 +1,14 @@ # $FreeBSD$ PORTNAME= xf86-video-savage PORTVERSION= 2.3.9 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org savage display driver USES= gl xorg-cat:driver USE_GL= gl .include Index: head/x11-drivers/xf86-video-scfb/Makefile =================================================================== --- head/x11-drivers/xf86-video-scfb/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-scfb/Makefile (revision 526589) @@ -1,16 +1,17 @@ # Created by: Florent Thoumie # $FreeBSD$ PORTNAME= xf86-video-scfb PORTVERSION= 0.0.5 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org syscons display driver USE_GITHUB= yes GH_ACCOUNT= rayddteam USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-siliconmotion/Makefile =================================================================== --- head/x11-drivers/xf86-video-siliconmotion/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-siliconmotion/Makefile (revision 526589) @@ -1,17 +1,17 @@ # $FreeBSD$ PORTNAME= xf86-video-siliconmotion PORTVERSION= 1.7.9 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org siliconmotion display driver USES= xorg-cat:driver BROKEN_aarch64= error: implicit declaration of function outb is invalid in C99 BROKEN_armv6= error: implicit declaration of function outb is invalid in C99 BROKEN_armv7= error: implicit declaration of function outb is invalid in C99 .include Index: head/x11-drivers/xf86-video-sis/Makefile =================================================================== --- head/x11-drivers/xf86-video-sis/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-sis/Makefile (revision 526589) @@ -1,16 +1,17 @@ # $FreeBSD$ PORTNAME= xf86-video-sis PORTVERSION= 0.12.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org sis display driver LICENSE= BSD3CLAUSE MIT LICENSE_COMB= multi LICENSE_FILE= ${WRKSRC}/COPYING USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-sunffb/Makefile =================================================================== --- head/x11-drivers/xf86-video-sunffb/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-sunffb/Makefile (revision 526589) @@ -1,16 +1,16 @@ # $FreeBSD$ PORTNAME= xf86-video-sunffb PORTVERSION= 1.2.2 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org sunffb display driver USES= gl xorg-cat:drivers USE_GL= gl ONLY_FOR_ARCHS= sparc64 .include Index: head/x11-drivers/xf86-video-tdfx/Makefile =================================================================== --- head/x11-drivers/xf86-video-tdfx/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-tdfx/Makefile (revision 526589) @@ -1,16 +1,17 @@ # $FreeBSD$ PORTNAME= xf86-video-tdfx PORTVERSION= 1.5.0 +PORTREVISION= 1 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org tdfx display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING USES= gl xorg-cat:driver USE_GL= gl .include Index: head/x11-drivers/xf86-video-trident/Makefile =================================================================== --- head/x11-drivers/xf86-video-trident/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-trident/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-trident PORTVERSION= 1.3.8 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org trident display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-tseng/Makefile =================================================================== --- head/x11-drivers/xf86-video-tseng/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-tseng/Makefile (revision 526589) @@ -1,17 +1,17 @@ # $FreeBSD$ PORTNAME= xf86-video-tseng PORTVERSION= 1.2.5 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org tseng display driver USES= xorg-cat:driver BROKEN_aarch64= error: implicit declaration of function outb is invalid in C99 BROKEN_armv6= error: implicit declaration of function outb is invalid in C99 BROKEN_armv7= error: implicit declaration of function outb is invalid in C99 .include Index: head/x11-drivers/xf86-video-vesa/Makefile =================================================================== --- head/x11-drivers/xf86-video-vesa/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-vesa/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-vesa PORTVERSION= 2.4.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org vesa display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xf86-video-vmware/Makefile =================================================================== --- head/x11-drivers/xf86-video-vmware/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-vmware/Makefile (revision 526589) @@ -1,30 +1,30 @@ # $FreeBSD$ PORTNAME= xf86-video-vmware PORTVERSION= 13.3.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org vmware display driver LICENSE= MIT LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= The vmware gfx protocol is only supported on x86-compatible architectures. USES= xorg-cat:driver LIB_DEPENDS+= libdrm.so:graphics/libdrm \ libxatracker.so:graphics/libxatracker CONFIGURE_ARGS= --without-libudev .include .if ${ARCH} == i386 USE_GCC= any .endif .include Index: head/x11-drivers/xf86-video-voodoo/Makefile =================================================================== --- head/x11-drivers/xf86-video-voodoo/Makefile (revision 526588) +++ head/x11-drivers/xf86-video-voodoo/Makefile (revision 526589) @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= xf86-video-voodoo PORTVERSION= 1.2.5 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.Org voodoo display driver USES= xorg-cat:driver .include Index: head/x11-drivers/xorg-drivers/Makefile =================================================================== --- head/x11-drivers/xorg-drivers/Makefile (revision 526588) +++ head/x11-drivers/xorg-drivers/Makefile (revision 526589) @@ -1,114 +1,115 @@ # $FreeBSD$ PORTNAME= xorg-drivers PORTVERSION= 7.7 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org COMMENT= X.org drivers meta-port VIDEODIR= ${LOCALBASE}/lib/xorg/modules/drivers INPUTDIR= ${LOCALBASE}/lib/xorg/modules/input USES= metaport INPUT_DRIVERS= egalax \ elographics \ evdev \ joystick \ keyboard \ libinput \ mouse \ synaptics \ void \ wacom VIDEO_DRIVERS= apm \ ark \ ast \ chips \ cirrus \ dummy \ glint \ i128 \ i740 \ mach64 \ mga \ neomagic \ nv \ openchrome \ r128 \ rendition \ s3 \ s3virge \ savage \ scfb \ siliconmotion \ sis \ tdfx \ trident \ tseng \ vesa \ voodoo OPTIONS_DEFAULT= KEYBOARD \ + LIBINPUT \ MOUSE \ SCFB .for type in input video . for a in ${${type:tu}_DRIVERS} OPTIONS_DEFINE+= ${a:tu} ${a:tu}_DESC= Install ${a} ${type} driver . endfor .endfor OPTIONS_DEFINE_amd64= AMDGPU ATI INTEL VMMOUSE VMWARE OPTIONS_DEFAULT_amd64= VESA OPTIONS_DEFINE_i386:= ${OPTIONS_DEFINE_amd64} GEODE OPTIONS_DEFAULT_i386:= ${OPTIONS_DEFAULT_amd64} OPTIONS_DEFINE_sparc64= SUNFFB OPTIONS_DEFAULT_sparc64=SUNFFB AMDGPU_DESC= Install amdgpu video driver ATI_DESC= Install ati (radeon) video driver GEODE_DESC= Install geode video driver INTEL_DESC= Install intel video driver SUNFFB_DESC= Install sunffb video driver VMMOUSE_DESC= Install vmmouse input driver VMWARE_DESC= Install vmware video driver # these drivers have a different module name compared to the plugin they install QUIRKS= keyboard:kbd .include # Manual add arch specific drivers so they be added to depend lines. .if ${ARCH}==i386 || ${ARCH}==amd64 INPUT_DRIVERS+= vmmouse VIDEO_DRIVERS+= amdgpu ati intel vmware .endif .if ${ARCH}==i386 VIDEO_DRIVERS+= geode .endif .if ${ARCH}==sparc64 VIDEO_DRIVERS+= sunffb .endif .for type in input video . for i in ${${type:tu}_DRIVERS} . if ${PORT_OPTIONS:M${i:tu}} != "" . if ${QUIRKS:M${i}\:*:C/.*://} != "" RUN_DEPENDS+= ${${type:tu}DIR}/${QUIRKS:M${i}\:*:C/.*://}_drv.so:x11-drivers/xf86-${type}-${i} . else RUN_DEPENDS+= ${${type:tu}DIR}/${i}_drv.so:x11-drivers/xf86-${type}-${i} . endif . endif . endfor .endfor .include Index: head/x11-drivers/xorgxrdp/Makefile =================================================================== --- head/x11-drivers/xorgxrdp/Makefile (revision 526588) +++ head/x11-drivers/xorgxrdp/Makefile (revision 526589) @@ -1,40 +1,41 @@ # $FreeBSD$ PORTNAME= xorgxrdp DISTVERSIONPREFIX= v DISTVERSION= 0.2.12 +PORTREVISION= 1 CATEGORIES= x11-drivers DIST_SUBDIR= xrdp MAINTAINER= meta@FreeBSD.org COMMENT= X.Org driver enabling use through an RDP session with xrdp LICENSE= MIT RUN_DEPENDS= xauth:x11/xauth BUILD_DEPENDS= nasm:devel/nasm USES= autoreconf libtool:build pkgconfig xorg USE_XORG= xorgproto xorg-server USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= neutrinolabs GH_PROJECT= xrdp:xrdp GH_TAGNAME= v0.9.12:xrdp GNU_CONFIGURE= yes INSTALL_TARGET= install-strip CFLAGS+= -I${LOCALBASE}/include LIBS= -I${LOCALBASE}/lib CONFIGURE_ENV= XRDP_CFLAGS=-I${WRKSRC_xrdp}/common OPTIONS_DEFINE= DEBUG post-patch-DEBUG-on: ${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e 's|#define LOG_LEVEL [0-9]*|#define LOG_LEVEL 20|' pre-configure: @cd ${WRKSRC} && ./bootstrap .include Index: head/x11-servers/xephyr/Makefile =================================================================== --- head/x11-servers/xephyr/Makefile (revision 526588) +++ head/x11-servers/xephyr/Makefile (revision 526589) @@ -1,31 +1,29 @@ # $FreeBSD$ PORTNAME= xephyr COMMENT= X server from X.Org based on kdrive LICENSE= MIT LIB_DEPENDS+= libxcb-image.so:x11/xcb-util-image \ libxcb-icccm.so:x11/xcb-util-wm \ libxcb-keysyms.so:x11/xcb-util-keysyms \ libxcb-render-util.so:x11/xcb-util-renderutil \ libxcb-util.so:x11/xcb-util MASTERDIR= ${.CURDIR}/../xorg-server DESCR= ${.CURDIR}/pkg-descr SLAVE_PORT= yes -OPTIONS_EXCLUDE=DEVD HAL SUID UDEV - USE_XORG= x11 xcb CONFIGURE_ARGS+=--enable-xephyr --disable-dmx --disable-xnest --disable-xvfb \ --enable-kdrive --disable-xwayland PLIST_FILES= bin/Xephyr man/man1/Xephyr.1.gz do-install: cd ${WRKSRC}/hw/kdrive/ephyr; DESTDIR=${STAGEDIR} ${MAKE} install .include "${MASTERDIR}/Makefile" Index: head/x11-servers/xorg-dmx/Makefile =================================================================== --- head/x11-servers/xorg-dmx/Makefile (revision 526588) +++ head/x11-servers/xorg-dmx/Makefile (revision 526589) @@ -1,24 +1,22 @@ # Created by: lesi@FreeBSD.org # $FreeBSD$ PORTNAME= xorg-dmx COMMENT= Distributed Multihead X from X.Org LICENSE= MIT MASTERDIR= ${.CURDIR}/../xorg-server DESCR= ${.CURDIR}/pkg-descr SLAVE_PORT= yes -OPTIONS_EXCLUDE=DEVD HAL SUID UDEV - USE_XORG= dmx xorgproto x11 xaw7 xext xfixes xi xmu xpm xrender xres xt xtst CONFIGURE_ARGS+=--enable-dmx --disable-xephyr --disable-xnest --disable-xvfb \ --disable-xwayland do-install: cd ${WRKSRC}/hw/dmx; DESTDIR=${STAGEDIR} ${MAKE} install .include "${MASTERDIR}/Makefile" Index: head/x11-servers/xorg-nestserver/distinfo =================================================================== --- head/x11-servers/xorg-nestserver/distinfo (revision 526588) +++ head/x11-servers/xorg-nestserver/distinfo (nonexistent) @@ -1,3 +0,0 @@ -TIMESTAMP = 1484388904 -SHA256 (xorg/xserver/xorg-server-1.19.1.tar.bz2) = 79ae2cf39d3f6c4a91201d8dad549d1d774b3420073c5a70d390040aa965a7fb -SIZE (xorg/xserver/xorg-server-1.19.1.tar.bz2) = 6041792 Property changes on: head/x11-servers/xorg-nestserver/distinfo ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-nestserver/Makefile =================================================================== --- head/x11-servers/xorg-nestserver/Makefile (revision 526588) +++ head/x11-servers/xorg-nestserver/Makefile (revision 526589) @@ -1,43 +1,27 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= xorg-nestserver -PORTVERSION= 1.19.1 PORTEPOCH= 2 COMMENT= Nesting X server from X.Org LICENSE= MIT MASTERDIR= ${.CURDIR}/../xorg-server DESCR= ${.CURDIR}/pkg-descr -DISTINFO_FILE= ${.CURDIR}/distinfo -PATCHDIR= ${.CURDIR}/files RUN_DEPENDS= xkeyboard-config>=2.5:x11/xkeyboard-config SLAVE_PORT= yes -OPTIONS_EXCLUDE=DEVD HAL SUID UDEV +USE_XORG= x11 xext -USE_XORG= x11 xext xfont2 - CONFIGURE_ARGS+=--enable-xnest --disable-dmx --disable-xephyr --disable-xvfb \ --disable-xwayland PLIST_FILES= bin/Xnest man/man1/Xnest.1.gz - -EXTRA_PATCHES= ${MASTERDIR}/files/patch-CVE-2017-12176 \ - ${MASTERDIR}/files/patch-CVE-2017-12177 \ - ${MASTERDIR}/files/patch-CVE-2017-12178 \ - ${MASTERDIR}/files/patch-CVE-2017-12179 \ - ${MASTERDIR}/files/patch-CVE-2017-12183 \ - ${MASTERDIR}/files/patch-CVE-2017-1218x \ - ${MASTERDIR}/files/patch-CVE-2017-1218y \ - ${MASTERDIR}/files/patch-CVE-2017-13721 \ - ${MASTERDIR}/files/patch-CVE-2017-13723 \ - ${MASTERDIR}/files/patch-os_io.c do-install: cd ${WRKSRC}/hw/xnest; DESTDIR=${STAGEDIR} ${MAKE} install .include "${MASTERDIR}/Makefile" Index: head/x11-servers/xorg-server/Makefile =================================================================== --- head/x11-servers/xorg-server/Makefile (revision 526588) +++ head/x11-servers/xorg-server/Makefile (revision 526589) @@ -1,154 +1,125 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME?= xorg-server -PORTVERSION?= 1.18.4 -PORTREVISION?= 13 +PORTVERSION?= 1.20.7 +PORTREVISION?= 0 PORTEPOCH?= 1 CATEGORIES= x11-servers MASTER_SITES= XORG/individual/xserver DISTNAME= xorg-server-${PORTVERSION} MAINTAINER= x11@FreeBSD.org COMMENT?= X.Org X server and related programs LICENSE= MIT RUN_DEPENDS+= xkeyboard-config>=2.5:x11/xkeyboard-config \ xkbcomp:x11/xkbcomp SLAVE_PORT?= no OPTIONS_SUB= yes OPTIONS_DEFINE= SUID OPTIONS_RADIO= CONF -OPTIONS_RADIO_CONF= DEVD HAL UDEV +OPTIONS_RADIO_CONF= DEVD UDEV +OPTIONS_DEFAULT= SUID +OPTIONS_DEFAULT_FreeBSD_11= DEVD +OPTIONS_DEFAULT_FreeBSD_12= UDEV +OPTIONS_DEFAULT_FreeBSD_13= UDEV +OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}} + +SUID_DESC= Install setuid wrapper to allow startx as non-root +CONF_DESC= Backend to use for input device configuration DEVD_DESC= Use devd for autoconfiguration of input devices -HAL_DESC= Use hald for autoconfiguration of input devices UDEV_DESC= Use udev via libudev-devd for autoconfiguration of input devices -SUID_DESC= Install the Xorg server with setuid bit set -OPTIONS_DEFAULT=DEVD SUID -OPTIONS_EXCLUDE_sparc64= HAL +DEVD_CONFIGURE_ENABLE= config-devd +SUID_CONFIGURE_ENABLE= suid-wrapper +SUID_CONFIGURE_ON= --libexecdir=${PREFIX}/bin # set SUID_WRAPPER_DIR +UDEV_CONFIGURE_ENABLE= config-udev +UDEV_CONFIGURE_ON= --disable-config-udev-kms +UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd .include FONTPATH_ROOT?= ${LOCALBASE}/share/fonts FONTPATHD?= ${PREFIX}/etc/X11/fontpath.d DEFAULT_FONTPATH_LIST= \ ${FONTPATH_ROOT}/misc/ \ ${FONTPATH_ROOT}/TTF/ \ ${FONTPATH_ROOT}/OTF/ \ ${FONTPATH_ROOT}/Type1/ \ ${FONTPATH_ROOT}/100dpi/ \ ${FONTPATH_ROOT}/75dpi/ \ catalogue:${FONTPATHD} DEFAULT_FONTPATH_CMD=${ECHO_CMD} ${DEFAULT_FONTPATH_LIST} | ${TR} ' ' , PLIST_SUB+= FONTPATHD="${FONTPATHD:S,^${PREFIX}/,,}" -USES= gmake gl libtool perl5 ssl tar:bzip2 xorg xorg-cat:xserver +USES= gl gmake perl5 ssl xorg xorg-cat:xserver USE_PERL5= build USE_GL+= gl -USE_XORG+= pixman xau xdmcp xfont xkbfile xorgproto xshmfence xtrans +USE_XORG+= pixman xau xdmcp xfont2 xkbfile xorgproto xshmfence xtrans CONFIGURE_ARGS+=--without-doxygen --without-xmlto --without-fop \ --with-default-font-path="$$(${DEFAULT_FONTPATH_CMD})" \ - --localstatedir=/var --with-shared-memory-dir=/tmp \ - --disable-config-udev-kms --disable-systemd-logind \ - --without-dtrace --enable-glamor + --without-dtrace --with-shared-memory-dir=/tmp \ + --disable-install-setuid --disable-unit-tests INSTALL_TARGET= install-strip .if ${SLAVE_PORT} == "no" || ${PORTNAME} == "xephyr" || ${PORTNAME} == "xwayland" LIB_DEPENDS+= libdrm.so:graphics/libdrm \ libepoxy.so:graphics/libepoxy .else BUILD_DEPENDS+= libepoxy>0:graphics/libepoxy # only for configure .endif .if ${SLAVE_PORT} == "no" USE_GL+= gbm USE_XORG+= pciaccess CONFIGURE_ARGS+=--disable-dmx --disable-xephyr --disable-xnest --disable-xvfb \ --disable-xwayland --enable-xcsecurity SUB_FILES= pkg-install pkg-deinstall .else -CONFIGURE_ARGS+=--disable-xorg -# for slave ports we need to overwrite PLIST, so it doesn't overwrite -# PLIST_FILES, with the masterport plist. +CONFIGURE_ARGS+= --disable-xorg +OPTIONS_EXCLUDE= DEVD UDEV SUID +# Set PLIST for slave ports so they only need to set PLIST_FILES PLIST= ${.CURDIR}/pkg-plist .endif .include .if ${SSL_DEFAULT} == base # The reason why I use this is cause openssl from base doesn't install a .pc file # and configure will fail trying to find it. Setting both of those variables to # a *non-empty* value by-passes the pkg-config check. CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include" .endif -.if ${PORT_OPTIONS:MHAL} -LIB_DEPENDS+= libhal.so:sysutils/hal -CONFIGURE_ARGS+= --enable-config-hal -.else -CONFIGURE_ARGS+= --disable-config-hal -.endif - -.if ${PORT_OPTIONS:MUDEV} -LIB_DEPENDS+= libudev.so:devel/libudev-devd -CONFIGURE_ARGS+= --enable-config-udev -.else -CONFIGURE_ARGS+= --disable-config-udev -.endif - -# We handle Xorg setuid in the plist. This allows to build xorg-server as a user. -CONFIGURE_ARGS+=--disable-install-setuid - .if ${ARCH} == "i386" || ${ARCH} == "amd64" LIB_DEPENDS+= libunwind.so:devel/libunwind .endif .if ${ARCH} == "sparc64" PLIST_SUB+= SPARC64="" .else PLIST_SUB+= SPARC64="@comment " .endif -.if ${PORT_OPTIONS:MSUID} -pre-everything:: - @${ECHO_MSG} "By default, the X Server installs as a set-user-id root binary. When run by" - @${ECHO_MSG} "a normal user, it checks arguments and environment as done in the x11/wrapper" - @${ECHO_MSG} "port before handling them normally. If you are concerned about the security" - @${ECHO_MSG} "of this, but still want to run an X Server (for example using xdm/kdm/gdm," - @${ECHO_MSG} "which will still run the server as root), you can cancel the build and set" - @${ECHO_MSG} "xorg-server_UNSET=SUID in /etc/make.conf." -.endif - post-patch: @${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \ ${WRKSRC}/configure -# build libglx.so but don't install it yet. which is done in pre-install. - @${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \ - -e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \ - ${WRKSRC}/hw/xfree86/dixmods/Makefile.in -post-configure: -.if ${PORT_OPTIONS:MDEVD} - @${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \ - -e 's|config\.lo|config.lo devd.lo|g' \ - ${WRKSRC}/config/Makefile - @${REINPLACE_CMD} -e 's|^/\* #undef CONFIG_UDEV \*/|#define CONFIG_DEVD 1|' \ - ${WRKSRC}/include/dix-config.h -.endif - .if ${SLAVE_PORT} == "no" post-install: -# The .xorg dir because else the xorg-server might not load the correct -# libglx module. +# Avoid conflict with nvidia-driver, move libglx.so into .xorg directory @${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg - ${INSTALL_LIB} ${WRKSRC}/hw/xfree86/dixmods/.libs/libglx.so \ + ${MV} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libglx.so \ ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d @${MKDIR} ${STAGEDIR}${FONTPATHD} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d + @${INSTALL_DATA} ${FILESDIR}/20-evdev-kbd.conf \ + ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d .endif # ! SLAVE_PORT .include Index: head/x11-servers/xorg-server/distinfo =================================================================== --- head/x11-servers/xorg-server/distinfo (revision 526588) +++ head/x11-servers/xorg-server/distinfo (revision 526589) @@ -1,3 +1,3 @@ -TIMESTAMP = 1484803304 -SHA256 (xorg/xserver/xorg-server-1.18.4.tar.bz2) = 278459b2c31d61a15655d95a72fb79930c480a6bb8cf9226e48a07df8b1d31c8 -SIZE (xorg/xserver/xorg-server-1.18.4.tar.bz2) = 6009508 +TIMESTAMP = 1580036705 +SHA256 (xorg/xserver/xorg-server-1.20.7.tar.bz2) = bd5986f010f34f5b3d6bc99fe395ecb1e0dead15a26807e0c832701809a06ea1 +SIZE (xorg/xserver/xorg-server-1.20.7.tar.bz2) = 6303005 Index: head/x11-servers/xorg-server/files/patch-glamor_glamor__dash.c =================================================================== --- head/x11-servers/xorg-server/files/patch-glamor_glamor__dash.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-glamor_glamor__dash.c (nonexistent) @@ -1,27 +0,0 @@ -From: Eric Anholt -Date: Wed Mar 15 17:51:46 2017 -0700 -Subject: [PATCH]glamor: Fix dashed line rendering. -Patch-mainline: fe0b297420fc1de8a7fab28457d0864b3182e967 -References: boo#1021803 -Signed-off-by: Max Staudt - -We were binding the screen pixmap as the dash and sampling its alpha, -which is usually just 1.0 (no dashing at all). - -Please cherry-pick this to active stable branches. - -Signed-off-by: Eric Anholt -Reviewed-by: Keith Packard -Reviewed-by: Michel Dänzer - ---- glamor/glamor_dash.c.orig 2016-07-18 19:08:16 UTC -+++ glamor/glamor_dash.c -@@ -146,7 +146,7 @@ glamor_dash_setup(DrawablePtr drawable, GCPtr gc) - goto bail; - - dash_pixmap = glamor_get_dash_pixmap(gc); -- dash_priv = glamor_get_pixmap_private(pixmap); -+ dash_priv = glamor_get_pixmap_private(dash_pixmap); - - if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv)) - goto bail; Property changes on: head/x11-servers/xorg-server/files/patch-glamor_glamor__dash.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-os_io.c =================================================================== --- head/x11-servers/xorg-server/files/patch-os_io.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-os_io.c (nonexistent) @@ -1,34 +0,0 @@ -From e751722a7b0c5b595794e60b054ade0b3f6cdb4d Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Fri, 7 Jul 2017 17:04:03 +0200 -Subject: os: Make sure big requests have sufficient length. - -A client can send a big request where the 32B "length" field has value -0. When the big request header is removed and the length corrected, -the value will underflow to 0xFFFFFFFF. Functions processing the -request later will think that the client sent much more data and may -touch memory beyond the receive buffer. - -Signed-off-by: Eric Anholt -Reviewed-by: Peter Hutterer -(cherry picked from commit 9c23685009aa96f4b861dcc5d2e01dbee00c4dd9) - -diff --git a/os/io.c b/os/io.c -index f80580c..70f07f3 100644 ---- os/io.c -+++ os/io.c -@@ -441,6 +441,11 @@ ReadRequestFromClient(ClientPtr client) - if (!gotnow) - AvailableInput = oc; - if (move_header) { -+ if (client->req_len < bytes_to_int32(sizeof(xBigReq) - sizeof(xReq))) { -+ YieldControlDeath(); -+ return -1; -+ } -+ - request = (xReq *) oci->bufptr; - oci->bufptr += (sizeof(xBigReq) - sizeof(xReq)); - *(xReq *) oci->bufptr = *request; --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-os_io.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-10972 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-10972 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-10972 (nonexistent) @@ -1,38 +0,0 @@ -From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:39 +0300 -Subject: Xi: Zero target buffer in SProcXSendExtensionEvent. - -Make sure that the xEvent eventT is initialized with zeros, the same way as -in SProcSendEvent. - -Some event swapping functions do not overwrite all 32 bytes of xEvent -structure, for example XSecurityAuthorizationRevoked. Two cooperating -clients, one swapped and the other not, can send -XSecurityAuthorizationRevoked event to each other to retrieve old stack data -from X server. This can be potentialy misused to go around ASLR or -stack-protector. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer ---- - Xi/sendexev.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Xi/sendexev.c b/Xi/sendexev.c -index 11d8202..1cf118a 100644 ---- Xi/sendexev.c -+++ Xi/sendexev.c -@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client) - { - CARD32 *p; - int i; -- xEvent eventT; -+ xEvent eventT = { .u.u.type = 0 }; - xEvent *eventP; - EventSwapPtr proc; - --- -cgit v1.1 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-10972 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-10971 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-10971 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-10971 (nonexistent) @@ -1,163 +0,0 @@ -From 215f894965df5fb0bb45b107d84524e700d2073c Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:40 +0300 -Subject: dix: Disallow GenericEvent in SendEvent request. - -The SendEvent request holds xEvent which is exactly 32 bytes long, no more, -no less. Both ProcSendEvent and SProcSendEvent verify that the received data -exactly match the request size. However nothing stops the client from passing -in event with xEvent::type = GenericEvent and any value of -xGenericEvent::length. - -In the case of ProcSendEvent, the event will be eventually passed to -WriteEventsToClient which will see that it is Generic event and copy the -arbitrary length from the receive buffer (and possibly past it) and send it to -the other client. This allows clients to copy unitialized heap memory out of X -server or to crash it. - -In case of SProcSendEvent, it will attempt to swap the incoming event by -calling a swapping function from the EventSwapVector array. The swapped event -is written to target buffer, which in this case is local xEvent variable. The -xEvent variable is 32 bytes long, but the swapping functions for GenericEvents -expect that the target buffer has size matching the size of the source -GenericEvent. This allows clients to cause stack buffer overflows. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer ---- - dix/events.c | 6 ++++++ - dix/swapreq.c | 7 +++++++ - 2 files changed, 13 insertions(+) - -diff --git a/dix/events.c b/dix/events.c -index 3e3a01e..d3a33ea 100644 ---- dix/events.c -+++ dix/events.c -@@ -5366,6 +5366,12 @@ ProcSendEvent(ClientPtr client) - client->errorValue = stuff->event.u.u.type; - return BadValue; - } -+ /* Generic events can have variable size, but SendEvent request holds -+ exactly 32B of event data. */ -+ if (stuff->event.u.u.type == GenericEvent) { -+ client->errorValue = stuff->event.u.u.type; -+ return BadValue; -+ } - if (stuff->event.u.u.type == ClientMessage && - stuff->event.u.u.detail != 8 && - stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) { -diff --git a/dix/swapreq.c b/dix/swapreq.c -index 719e9b8..6785059 100644 ---- dix/swapreq.c -+++ dix/swapreq.c -@@ -292,6 +292,13 @@ SProcSendEvent(ClientPtr client) - swapl(&stuff->destination); - swapl(&stuff->eventMask); - -+ /* Generic events can have variable size, but SendEvent request holds -+ exactly 32B of event data. */ -+ if (stuff->event.u.u.type == GenericEvent) { -+ client->errorValue = stuff->event.u.u.type; -+ return BadValue; -+ } -+ - /* Swap event */ - proc = EventSwapVector[stuff->event.u.u.type & 0177]; - if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ --- -cgit v1.1 - -From 8caed4df36b1f802b4992edcfd282cbeeec35d9d Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:41 +0300 -Subject: Xi: Verify all events in ProcXSendExtensionEvent. - -The requirement is that events have type in range -EXTENSION_EVENT_BASE..lastEvent, but it was tested -only for first event of all. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer ---- - Xi/sendexev.c | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/Xi/sendexev.c b/Xi/sendexev.c -index 1cf118a..5e63bfc 100644 ---- Xi/sendexev.c -+++ Xi/sendexev.c -@@ -117,7 +117,7 @@ SProcXSendExtensionEvent(ClientPtr client) - int - ProcXSendExtensionEvent(ClientPtr client) - { -- int ret; -+ int ret, i; - DeviceIntPtr dev; - xEvent *first; - XEventClass *list; -@@ -141,10 +141,12 @@ ProcXSendExtensionEvent(ClientPtr client) - /* The client's event type must be one defined by an extension. */ - - first = ((xEvent *) &stuff[1]); -- if (!((EXTENSION_EVENT_BASE <= first->u.u.type) && -- (first->u.u.type < lastEvent))) { -- client->errorValue = first->u.u.type; -- return BadValue; -+ for (i = 0; i < stuff->num_events; i++) { -+ if (!((EXTENSION_EVENT_BASE <= first[i].u.u.type) && -+ (first[i].u.u.type < lastEvent))) { -+ client->errorValue = first[i].u.u.type; -+ return BadValue; -+ } - } - - list = (XEventClass *) (first + stuff->num_events); --- -cgit v1.1 - -From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Wed, 24 May 2017 15:54:42 +0300 -Subject: Xi: Do not try to swap GenericEvent. - -The SProcXSendExtensionEvent must not attempt to swap GenericEvent because -it is assuming that the event has fixed size and gives the swapping function -xEvent-sized buffer. - -A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway. - -Signed-off-by: Michal Srb -Reviewed-by: Peter Hutterer -Signed-off-by: Peter Hutterer ---- - Xi/sendexev.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/Xi/sendexev.c b/Xi/sendexev.c -index 5e63bfc..5c2e0fc 100644 ---- Xi/sendexev.c -+++ Xi/sendexev.c -@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client) - - eventP = (xEvent *) &stuff[1]; - for (i = 0; i < stuff->num_events; i++, eventP++) { -+ if (eventP->u.u.type == GenericEvent) { -+ client->errorValue = eventP->u.u.type; -+ return BadValue; -+ } -+ - proc = EventSwapVector[eventP->u.u.type & 0177]; -- if (proc == NotImplemented) /* no swapping proc; invalid event type? */ -+ /* no swapping proc; invalid event type? */ -+ if (proc == NotImplemented) { -+ client->errorValue = eventP->u.u.type; - return BadValue; -+ } - (*proc) (eventP, &eventT); - *eventP = eventT; - } --- -cgit v1.1 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-10971 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-13723 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-13723 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-13723 (nonexistent) @@ -1,115 +0,0 @@ -From 94f11ca5cf011ef123bd222cabeaef6f424d76ac Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Thu, 27 Jul 2017 10:08:32 -0700 -Subject: xkb: Handle xkb formated string output safely (CVE-2017-13723) - -Generating strings for XKB data used a single shared static buffer, -which offered several opportunities for errors. Use a ring of -resizable buffers instead, to avoid problems when strings end up -longer than anticipated. - -Reviewed-by: Michal Srb -Signed-off-by: Keith Packard -Signed-off-by: Julien Cristau - -diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c -index ead2b1a..d2a2567 100644 ---- xkb/xkbtext.c -+++ xkb/xkbtext.c -@@ -47,23 +47,27 @@ - - /***====================================================================***/ - --#define BUFFER_SIZE 512 -- --static char textBuffer[BUFFER_SIZE]; --static int tbNext = 0; -+#define NUM_BUFFER 8 -+static struct textBuffer { -+ int size; -+ char *buffer; -+} textBuffer[NUM_BUFFER]; -+static int textBufferIndex; - - static char * - tbGetBuffer(unsigned size) - { -- char *rtrn; -+ struct textBuffer *tb; - -- if (size >= BUFFER_SIZE) -- return NULL; -- if ((BUFFER_SIZE - tbNext) <= size) -- tbNext = 0; -- rtrn = &textBuffer[tbNext]; -- tbNext += size; -- return rtrn; -+ tb = &textBuffer[textBufferIndex]; -+ textBufferIndex = (textBufferIndex + 1) % NUM_BUFFER; -+ -+ if (size > tb->size) { -+ free(tb->buffer); -+ tb->buffer = xnfalloc(size); -+ tb->size = size; -+ } -+ return tb->buffer; - } - - /***====================================================================***/ -@@ -79,8 +83,6 @@ XkbAtomText(Atom atm, unsigned format) - int len; - - len = strlen(atmstr) + 1; -- if (len > BUFFER_SIZE) -- len = BUFFER_SIZE - 2; - rtrn = tbGetBuffer(len); - strlcpy(rtrn, atmstr, len); - } -@@ -128,8 +130,6 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format) - len = strlen(tmp) + 1; - if (format == XkbCFile) - len += 4; -- if (len >= BUFFER_SIZE) -- len = BUFFER_SIZE - 1; - rtrn = tbGetBuffer(len); - if (format == XkbCFile) { - strcpy(rtrn, "vmod_"); -@@ -140,6 +140,8 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format) - return rtrn; - } - -+#define VMOD_BUFFER_SIZE 512 -+ - char * - XkbVModMaskText(XkbDescPtr xkb, - unsigned modMask, unsigned mask, unsigned format) -@@ -147,7 +149,7 @@ XkbVModMaskText(XkbDescPtr xkb, - register int i, bit; - int len; - char *mm, *rtrn; -- char *str, buf[BUFFER_SIZE]; -+ char *str, buf[VMOD_BUFFER_SIZE]; - - if ((modMask == 0) && (mask == 0)) { - rtrn = tbGetBuffer(5); -@@ -173,7 +175,7 @@ XkbVModMaskText(XkbDescPtr xkb, - len = strlen(tmp) + 1 + (str == buf ? 0 : 1); - if (format == XkbCFile) - len += 4; -- if ((str - (buf + len)) <= BUFFER_SIZE) { -+ if ((str - (buf + len)) <= VMOD_BUFFER_SIZE) { - if (str != buf) { - if (format == XkbCFile) - *str++ = '|'; -@@ -199,8 +201,6 @@ XkbVModMaskText(XkbDescPtr xkb, - len = 0; - if (str) - len += strlen(str) + (mm == NULL ? 0 : 1); -- if (len >= BUFFER_SIZE) -- len = BUFFER_SIZE - 1; - rtrn = tbGetBuffer(len + 1); - rtrn[0] = '\0'; - --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-13723 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-13721 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-13721 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-13721 (nonexistent) @@ -1,26 +0,0 @@ -From b95f25af141d33a65f6f821ea9c003f66a01e1f1 Mon Sep 17 00:00:00 2001 -From: Michal Srb -Date: Fri, 28 Jul 2017 16:27:10 +0200 -Subject: Xext/shm: Validate shmseg resource id (CVE-2017-13721) - -Otherwise it can belong to a non-existing client and abort X server with -FatalError "client not in use", or overwrite existing segment of another -existing client. - -Signed-off-by: Julien Cristau - -diff --git a/Xext/shm.c b/Xext/shm.c -index 91ea90b..2f9a788 100644 ---- Xext/shm.c -+++ Xext/shm.c -@@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client) - }; - - REQUEST_SIZE_MATCH(xShmCreateSegmentReq); -+ LEGAL_NEW_RESOURCE(stuff->shmseg, client); - if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { - client->errorValue = stuff->readOnly; - return BadValue; --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-13721 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-12179 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-12179 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-12179 (nonexistent) @@ -1,52 +0,0 @@ -From c77cd08efcf386bcc5d8dfbd0427134b2b2d0888 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Fri, 9 Jan 2015 10:04:41 -0500 -Subject: Xi: integer overflow and unvalidated length in - (S)ProcXIBarrierReleasePointer - -[jcristau: originally this patch fixed the same issue as commit - 211e05ac85 "Xi: Test exact size of XIBarrierReleasePointer", with the - addition of these checks] - -This addresses CVE-2017-12179 - -Reviewed-by: Alan Coopersmith -Reviewed-by: Jeremy Huddleston Sequoia -Reviewed-by: Julien Cristau -Signed-off-by: Jeremy Huddleston Sequoia -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit d088e3c1286b548a58e62afdc70bb40981cdb9e8) - - ---- Xi/xibarriers.c.orig 2016-07-15 18:17:45.000000000 +0200 -+++ Xi/xibarriers.c 2017-10-13 18:26:09.226006000 +0200 -@@ -830,10 +830,15 @@ - REQUEST(xXIBarrierReleasePointerReq); - int i; - -- info = (xXIBarrierReleasePointerInfo*) &stuff[1]; -- - swaps(&stuff->length); -+ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); -+ - swapl(&stuff->num_barriers); -+ if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo)) -+ return BadLength; -+ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo)); -+ -+ info = (xXIBarrierReleasePointerInfo*) &stuff[1]; - for (i = 0; i < stuff->num_barriers; i++, info++) { - swaps(&info->deviceid); - swapl(&info->barrier); -@@ -854,6 +859,10 @@ - - REQUEST(xXIBarrierReleasePointerReq); - REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); -+ if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo)) -+ return BadLength; -+ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo)); -+ - - info = (xXIBarrierReleasePointerInfo*) &stuff[1]; - for (i = 0; i < stuff->num_barriers; i++, info++) { Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-12179 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-12178 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-12178 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-12178 (nonexistent) @@ -1,29 +0,0 @@ -From 6c15122163a2d2615db7e998e8d436815a08dec6 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Wed, 24 Dec 2014 16:22:18 -0500 -Subject: Xi: fix wrong extra length check in ProcXIChangeHierarchy - (CVE-2017-12178) - -Reviewed-by: Alan Coopersmith -Reviewed-by: Jeremy Huddleston Sequoia -Reviewed-by: Julien Cristau -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit 859b08d523307eebde7724fd1a0789c44813e821) - -diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c -index f2b7785..7286eff 100644 ---- Xi/xichangehierarchy.c -+++ Xi/xichangehierarchy.c -@@ -423,7 +423,7 @@ ProcXIChangeHierarchy(ClientPtr client) - if (!stuff->num_changes) - return rc; - -- len = ((size_t)stuff->length << 2) - sizeof(xXIAnyHierarchyChangeInfo); -+ len = ((size_t)stuff->length << 2) - sizeof(xXIChangeHierarchyReq); - - any = (xXIAnyHierarchyChangeInfo *) &stuff[1]; - while (stuff->num_changes--) { --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-12178 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-12177 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-12177 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-12177 (nonexistent) @@ -1,41 +0,0 @@ -From cc41e5b581d287c56f8d7113a97a4882dcfdd696 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Fri, 9 Jan 2015 10:09:14 -0500 -Subject: dbe: Unvalidated variable-length request in ProcDbeGetVisualInfo - (CVE-2017-12177) - -v2: Protect against integer overflow (Alan Coopersmith) - -Reviewed-by: Alan Coopersmith -Reviewed-by: Jeremy Huddleston Sequoia -Reviewed-by: Julien Cristau -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit 4ca68b878e851e2136c234f40a25008297d8d831) - -diff --git a/dbe/dbe.c b/dbe/dbe.c -index 23f7e16..f31766f 100644 ---- dbe/dbe.c -+++ dbe/dbe.c -@@ -574,6 +574,9 @@ ProcDbeGetVisualInfo(ClientPtr client) - XdbeScreenVisualInfo *pScrVisInfo; - - REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); -+ if (stuff->n > UINT32_MAX / sizeof(CARD32)) -+ return BadLength; -+ REQUEST_FIXED_SIZE(xDbeGetVisualInfoReq, stuff->n * sizeof(CARD32)); - - if (stuff->n > UINT32_MAX / sizeof(DrawablePtr)) - return BadAlloc; -@@ -924,7 +927,7 @@ SProcDbeSwapBuffers(ClientPtr client) - - swapl(&stuff->n); - if (stuff->n > UINT32_MAX / sizeof(DbeSwapInfoRec)) -- return BadAlloc; -+ return BadLength; - REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, stuff->n * sizeof(xDbeSwapInfo)); - - if (stuff->n != 0) { --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-12177 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-12176 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-12176 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-12176 (nonexistent) @@ -1,31 +0,0 @@ -From 95f605b42d8bbb6bea2834a1abfc205981c5b803 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Fri, 9 Jan 2015 10:15:46 -0500 -Subject: Unvalidated extra length in ProcEstablishConnection (CVE-2017-12176) - -Reviewed-by: Julien Cristau -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit b747da5e25be944337a9cd1415506fc06b70aa81) - -diff --git a/dix/dispatch.c b/dix/dispatch.c -index 0da431b..0fdfe11 100644 ---- dix/dispatch.c -+++ dix/dispatch.c -@@ -3703,7 +3703,12 @@ ProcEstablishConnection(ClientPtr client) - prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq); - auth_proto = (char *) prefix + sz_xConnClientPrefix; - auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto); -- if ((prefix->majorVersion != X_PROTOCOL) || -+ -+ if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix + -+ pad_to_int32(prefix->nbytesAuthProto) + -+ pad_to_int32(prefix->nbytesAuthString)) -+ reason = "Bad length"; -+ else if ((prefix->majorVersion != X_PROTOCOL) || - (prefix->minorVersion != X_PROTOCOL_REVISION)) - reason = "Protocol version mismatch"; - else --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-12176 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_dri2_pci__ids_i965__pci__ids.h =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_dri2_pci__ids_i965__pci__ids.h (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_dri2_pci__ids_i965__pci__ids.h (nonexistent) @@ -1,171 +0,0 @@ ---- hw/xfree86/dri2/pci_ids/i965_pci_ids.h.orig 2019-09-10 16:20:34 UTC -+++ hw/xfree86/dri2/pci_ids/i965_pci_ids.h -@@ -1,3 +1,4 @@ -+#ifndef IRIS - CHIPSET(0x29A2, i965, "Intel(R) 965G") - CHIPSET(0x2992, i965, "Intel(R) 965Q") - CHIPSET(0x2982, i965, "Intel(R) 965G") -@@ -91,6 +92,11 @@ CHIPSET(0x0F32, byt, "Intel(R) Bay Trail") - CHIPSET(0x0F33, byt, "Intel(R) Bay Trail") - CHIPSET(0x0157, byt, "Intel(R) Bay Trail") - CHIPSET(0x0155, byt, "Intel(R) Bay Trail") -+CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherrytrail)") -+CHIPSET(0x22B1, chv, "Intel(R) HD Graphics XXX (Braswell)") /* Overridden in brw_get_renderer_string */ -+CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)") -+CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)") -+#endif - CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell GT1") - CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell GT1") - CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell GT1") -@@ -112,6 +118,7 @@ CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3") - CHIPSET(0x1902, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)") - CHIPSET(0x1906, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)") - CHIPSET(0x190A, skl_gt1, "Intel(R) Skylake GT1") -+CHIPSET(0x190B, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)") - CHIPSET(0x190E, skl_gt1, "Intel(R) Skylake GT1") - CHIPSET(0x1912, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)") - CHIPSET(0x1913, skl_gt2, "Intel(R) Skylake GT2f") -@@ -122,42 +129,113 @@ CHIPSET(0x191A, skl_gt2, "Intel(R) Skylake GT2") - CHIPSET(0x191B, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)") - CHIPSET(0x191D, skl_gt2, "Intel(R) HD Graphics P530 (Skylake GT2)") - CHIPSET(0x191E, skl_gt2, "Intel(R) HD Graphics 515 (Skylake GT2)") --CHIPSET(0x1921, skl_gt2, "Intel(R) Skylake GT2") --CHIPSET(0x1923, skl_gt3, "Intel(R) Iris Graphics 540 (Skylake GT3e)") --CHIPSET(0x1926, skl_gt3, "Intel(R) HD Graphics 535 (Skylake GT3)") -+CHIPSET(0x1921, skl_gt2, "Intel(R) HD Graphics 520 (Skylake GT2)") -+CHIPSET(0x1923, skl_gt3, "Intel(R) Skylake GT3e") -+CHIPSET(0x1926, skl_gt3, "Intel(R) Iris Graphics 540 (Skylake GT3e)") - CHIPSET(0x1927, skl_gt3, "Intel(R) Iris Graphics 550 (Skylake GT3e)") - CHIPSET(0x192A, skl_gt4, "Intel(R) Skylake GT4") --CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics (Skylake GT3fe)") --CHIPSET(0x1932, skl_gt4, "Intel(R) Skylake GT4") --CHIPSET(0x193A, skl_gt4, "Intel(R) Skylake GT4") --CHIPSET(0x193B, skl_gt4, "Intel(R) Skylake GT4") --CHIPSET(0x193D, skl_gt4, "Intel(R) Skylake GT4") --CHIPSET(0x5902, kbl_gt1, "Intel(R) Kabylake GT1") --CHIPSET(0x5906, kbl_gt1, "Intel(R) Kabylake GT1") -+CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics 555 (Skylake GT3e)") -+CHIPSET(0x192D, skl_gt3, "Intel(R) Iris Graphics P555 (Skylake GT3e)") -+CHIPSET(0x1932, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)") -+CHIPSET(0x193A, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)") -+CHIPSET(0x193B, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)") -+CHIPSET(0x193D, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)") -+CHIPSET(0x0A84, bxt, "Intel(R) HD Graphics (Broxton)") -+CHIPSET(0x1A84, bxt, "Intel(R) HD Graphics (Broxton)") -+CHIPSET(0x1A85, bxt_2x6, "Intel(R) HD Graphics (Broxton 2x6)") -+CHIPSET(0x5A84, bxt, "Intel(R) HD Graphics 505 (Broxton)") -+CHIPSET(0x5A85, bxt_2x6, "Intel(R) HD Graphics 500 (Broxton 2x6)") -+CHIPSET(0x5902, kbl_gt1, "Intel(R) HD Graphics 610 (Kaby Lake GT1)") -+CHIPSET(0x5906, kbl_gt1, "Intel(R) HD Graphics 610 (Kaby Lake GT1)") - CHIPSET(0x590A, kbl_gt1, "Intel(R) Kabylake GT1") -+CHIPSET(0x5908, kbl_gt1, "Intel(R) Kabylake GT1") - CHIPSET(0x590B, kbl_gt1, "Intel(R) Kabylake GT1") - CHIPSET(0x590E, kbl_gt1, "Intel(R) Kabylake GT1") - CHIPSET(0x5913, kbl_gt1_5, "Intel(R) Kabylake GT1.5") - CHIPSET(0x5915, kbl_gt1_5, "Intel(R) Kabylake GT1.5") --CHIPSET(0x5917, kbl_gt1_5, "Intel(R) Kabylake GT1.5") --CHIPSET(0x5912, kbl_gt2, "Intel(R) Kabylake GT2") --CHIPSET(0x5916, kbl_gt2, "Intel(R) Kabylake GT2") --CHIPSET(0x591A, kbl_gt2, "Intel(R) Kabylake GT2") --CHIPSET(0x591B, kbl_gt2, "Intel(R) Kabylake GT2") --CHIPSET(0x591D, kbl_gt2, "Intel(R) Kabylake GT2") --CHIPSET(0x591E, kbl_gt2, "Intel(R) Kabylake GT2") -+CHIPSET(0x5917, kbl_gt2, "Intel(R) UHD Graphics 620 (Kabylake GT2)") -+CHIPSET(0x5912, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)") -+CHIPSET(0x5916, kbl_gt2, "Intel(R) HD Graphics 620 (Kaby Lake GT2)") -+CHIPSET(0x591A, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)") -+CHIPSET(0x591B, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)") -+CHIPSET(0x591D, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)") -+CHIPSET(0x591E, kbl_gt2, "Intel(R) HD Graphics 615 (Kaby Lake GT2)") - CHIPSET(0x5921, kbl_gt2, "Intel(R) Kabylake GT2F") --CHIPSET(0x5926, kbl_gt3, "Intel(R) Kabylake GT3") --CHIPSET(0x592A, kbl_gt3, "Intel(R) Kabylake GT3") --CHIPSET(0x592B, kbl_gt3, "Intel(R) Kabylake GT3") --CHIPSET(0x5932, kbl_gt4, "Intel(R) Kabylake GT4") --CHIPSET(0x593A, kbl_gt4, "Intel(R) Kabylake GT4") -+CHIPSET(0x5923, kbl_gt3, "Intel(R) Kabylake GT3") -+CHIPSET(0x5926, kbl_gt3, "Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e)") -+CHIPSET(0x5927, kbl_gt3, "Intel(R) Iris Plus Graphics 650 (Kaby Lake GT3e)") - CHIPSET(0x593B, kbl_gt4, "Intel(R) Kabylake GT4") --CHIPSET(0x593D, kbl_gt4, "Intel(R) Kabylake GT4") --CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherryview)") --CHIPSET(0x22B1, chv, "Intel(R) HD Graphics (Cherryview)") --CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)") --CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)") --CHIPSET(0x0A84, bxt, "Intel(R) HD Graphics (Broxton)") --CHIPSET(0x1A84, bxt, "Intel(R) HD Graphics (Broxton)") --CHIPSET(0x5A84, bxt, "Intel(R) HD Graphics (Broxton)") -+CHIPSET(0x591C, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2") -+CHIPSET(0x87C0, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2") -+CHIPSET(0x87CA, cfl_gt2, "Intel(R) Amber Lake (Coffeelake) GT2") -+CHIPSET(0x3184, glk, "Intel(R) UHD Graphics 605 (Geminilake)") -+CHIPSET(0x3185, glk_2x6, "Intel(R) UHD Graphics 600 (Geminilake 2x6)") -+CHIPSET(0x3E90, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)") -+CHIPSET(0x3E93, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)") -+CHIPSET(0x3E99, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)") -+CHIPSET(0x3E9C, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)") -+CHIPSET(0x3E91, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") -+CHIPSET(0x3E92, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") -+CHIPSET(0x3E96, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") -+CHIPSET(0x3E98, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") -+CHIPSET(0x3E9A, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") -+CHIPSET(0x3E9B, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") -+CHIPSET(0x3E94, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") -+CHIPSET(0x3EA9, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") -+CHIPSET(0x3EA5, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") -+CHIPSET(0x3EA6, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") -+CHIPSET(0x3EA7, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") -+CHIPSET(0x3EA8, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") -+CHIPSET(0x3EA1, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 2x6 GT1)") -+CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT1)") -+CHIPSET(0x3EA0, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)") -+CHIPSET(0x3EA3, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)") -+CHIPSET(0x3EA2, cfl_gt3, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT3)") -+CHIPSET(0x9B21, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BA0, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BA2, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BA4, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BA5, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BA8, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BAA, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BAB, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9BAC, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") -+CHIPSET(0x9B41, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BC0, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BC2, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BC4, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BC5, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BC8, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BCA, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BCB, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x9BCC, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") -+CHIPSET(0x5A49, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)") -+CHIPSET(0x5A4A, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)") -+CHIPSET(0x5A41, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)") -+CHIPSET(0x5A42, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)") -+CHIPSET(0x5A44, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)") -+CHIPSET(0x5A59, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)") -+CHIPSET(0x5A5A, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)") -+CHIPSET(0x5A5C, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)") -+CHIPSET(0x5A50, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") -+CHIPSET(0x5A51, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") -+CHIPSET(0x5A52, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") -+CHIPSET(0x5A54, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") -+CHIPSET(0x8A50, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") -+CHIPSET(0x8A51, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") -+CHIPSET(0x8A52, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") -+CHIPSET(0x8A53, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") -+CHIPSET(0x8A54, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") -+CHIPSET(0x8A56, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") -+CHIPSET(0x8A57, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") -+CHIPSET(0x8A58, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") -+CHIPSET(0x8A59, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") -+CHIPSET(0x8A5A, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") -+CHIPSET(0x8A5B, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") -+CHIPSET(0x8A5C, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") -+CHIPSET(0x8A5D, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") -+CHIPSET(0x8A71, icl_1x8, "Intel(R) HD Graphics (Ice Lake 1x8 GT0.5)") -+CHIPSET(0x4500, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)") -+CHIPSET(0x4571, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)") -+CHIPSET(0x4551, ehl_4x4, "Intel(R) HD Graphics (Elkhart Lake 4x4)") -+CHIPSET(0x4541, ehl_2x4, "Intel(R) HD Graphics (Elkhart Lake 2x4)") Property changes on: head/x11-servers/xorg-server/files/patch-hw_xfree86_dri2_pci__ids_i965__pci__ids.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-1218y =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-1218y (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-1218y (nonexistent) @@ -1,139 +0,0 @@ -From c206f36a4b6ecf2555ab2291c349ab7d7d0b02f5 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Fri, 9 Jan 2015 09:57:23 -0500 -Subject: Unvalidated lengths - -v2: Add overflow check and remove unnecessary check (Julien Cristau) - -This addresses: -CVE-2017-12184 in XINERAMA -CVE-2017-12185 in MIT-SCREEN-SAVER -CVE-2017-12186 in X-Resource -CVE-2017-12187 in RENDER - -Reviewed-by: Jeremy Huddleston Sequoia -Reviewed-by: Julien Cristau -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit cad5a1050b7184d828aef9c1dd151c3ab649d37e) - -diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c -index 209df29..844ea49 100644 ---- Xext/panoramiX.c -+++ Xext/panoramiX.c -@@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client) - xPanoramiXGetScreenSizeReply rep; - int rc; - -+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); -+ - if (stuff->screen >= PanoramiXNumScreens) - return BadMatch; - -- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); - if (rc != Success) - return rc; -diff --git a/Xext/saver.c b/Xext/saver.c -index 750b8b9..45ac4d2 100644 ---- Xext/saver.c -+++ Xext/saver.c -@@ -1185,6 +1185,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client) - PanoramiXRes *draw; - int rc, i; - -+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); -+ - rc = dixLookupResourceByClass((void **) &draw, stuff->drawable, - XRC_DRAWABLE, client, DixWriteAccess); - if (rc != Success) -diff --git a/Xext/xres.c b/Xext/xres.c -index ae779df..bc54133 100644 ---- Xext/xres.c -+++ Xext/xres.c -@@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client) - ConstructResourceBytesCtx ctx; - - REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq); -+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0])) -+ return BadLength; - REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq, - stuff->numSpecs * sizeof(ctx.specs[0])); - -@@ -1052,8 +1054,8 @@ SProcXResQueryResourceBytes (ClientPtr client) - int c; - xXResResourceIdSpec *specs = (void*) ((char*) stuff + sizeof(*stuff)); - -- swapl(&stuff->numSpecs); - REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq); -+ swapl(&stuff->numSpecs); - REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq, - stuff->numSpecs * sizeof(specs[0])); - -diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c -index 8a35b7b..4d412b8 100644 ---- Xext/xvdisp.c -+++ Xext/xvdisp.c -@@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client) - { - REQUEST(xvShmPutImageReq); - PanoramiXRes *draw, *gc, *port; -- Bool send_event = stuff->send_event; -+ Bool send_event; - Bool isRoot; - int result, i, x, y; - - REQUEST_SIZE_MATCH(xvShmPutImageReq); - -+ send_event = stuff->send_event; -+ - result = dixLookupResourceByClass((void **) &draw, stuff->drawable, - XRC_DRAWABLE, client, DixWriteAccess); - if (result != Success) -diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c -index 1f1022e..63caec9 100644 ---- hw/dmx/dmxpict.c -+++ hw/dmx/dmxpict.c -@@ -716,6 +716,8 @@ dmxProcRenderSetPictureFilter(ClientPtr client) - filter = (char *) (stuff + 1); - params = (XFixed *) (filter + ((stuff->nbytes + 3) & ~3)); - nparams = ((XFixed *) stuff + client->req_len) - params; -+ if (nparams < 0) -+ return BadLength; - - XRenderSetPictureFilter(dmxScreen->beDisplay, - pPictPriv->pict, filter, params, nparams); -diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c -index d8b2593..95f6e10 100644 ---- pseudoramiX/pseudoramiX.c -+++ pseudoramiX/pseudoramiX.c -@@ -297,10 +297,11 @@ ProcPseudoramiXGetScreenSize(ClientPtr client) - - TRACE; - -+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); -+ - if (stuff->screen >= pseudoramiXNumScreens) - return BadMatch; - -- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); - if (rc != Success) - return rc; -diff --git a/render/render.c b/render/render.c -index bfacaa0..3a41e33 100644 ---- render/render.c -+++ render/render.c -@@ -1757,6 +1757,9 @@ ProcRenderSetPictureFilter(ClientPtr client) - name = (char *) (stuff + 1); - params = (xFixed *) (name + pad_to_int32(stuff->nbytes)); - nparams = ((xFixed *) stuff + client->req_len) - params; -+ if (nparams < 0) -+ return BadLength; -+ - result = SetPictureFilter(pPicture, name, stuff->nbytes, params, nparams); - return result; - } --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-1218y ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-1218x =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-1218x (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-1218x (nonexistent) @@ -1,601 +0,0 @@ -From d264da92f7f8129b8aad4f0114a6467fc38fc896 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Sun, 21 Dec 2014 01:10:03 -0500 -Subject: hw/xfree86: unvalidated lengths - -This addresses: -CVE-2017-12180 in XFree86-VidModeExtension -CVE-2017-12181 in XFree86-DGA -CVE-2017-12182 in XFree86-DRI - -Reviewed-by: Jeremy Huddleston Sequoia -Reviewed-by: Julien Cristau -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit 1b1d4c04695dced2463404174b50b3581dbd857b) - -diff --git a/Xext/vidmode.c b/Xext/vidmode.c -index ea3ad13..76055c8 100644 ---- Xext/vidmode.c -+++ Xext/vidmode.c -@@ -454,6 +454,20 @@ ProcVidModeAddModeLine(ClientPtr client) - DEBUG_P("XF86VidModeAddModeline"); - - ver = ClientMajorVersion(client); -+ -+ if (ver < 2) { -+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq)); -+ } -+ else { -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq)); -+ } -+ - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -501,18 +515,6 @@ ProcVidModeAddModeLine(ClientPtr client) - stuff->after_vsyncend, stuff->after_vtotal, - (unsigned long) stuff->after_flags); - -- if (ver < 2) { -- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq)); -- } -- else { -- REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq)); -- } - if (len != stuff->privsize) - return BadLength; - -@@ -622,6 +624,20 @@ ProcVidModeDeleteModeLine(ClientPtr client) - DEBUG_P("XF86VidModeDeleteModeline"); - - ver = ClientMajorVersion(client); -+ -+ if (ver < 2) { -+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq)); -+ } -+ else { -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq)); -+ } -+ - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -649,18 +665,6 @@ ProcVidModeDeleteModeLine(ClientPtr client) - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, - (unsigned long) stuff->flags); - -- if (ver < 2) { -- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq)); -- } -- else { -- REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq)); -- } - if (len != stuff->privsize) { - DebugF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, " - "len = %d, length = %d\n", -@@ -744,6 +748,20 @@ ProcVidModeModModeLine(ClientPtr client) - DEBUG_P("XF86VidModeModModeline"); - - ver = ClientMajorVersion(client); -+ -+ if (ver < 2) { -+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); -+ } -+ else { -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); -+ } -+ - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -768,18 +786,6 @@ ProcVidModeModModeLine(ClientPtr client) - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, - stuff->vtotal, (unsigned long) stuff->flags); - -- if (ver < 2) { -- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); -- } -- else { -- REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); -- } - if (len != stuff->privsize) - return BadLength; - -@@ -877,6 +883,19 @@ ProcVidModeValidateModeLine(ClientPtr client) - DEBUG_P("XF86VidModeValidateModeline"); - - ver = ClientMajorVersion(client); -+ -+ if (ver < 2) { -+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); -+ len = client->req_len - -+ bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq)); -+ } -+ else { -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq)); -+ } -+ - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -905,17 +924,6 @@ ProcVidModeValidateModeLine(ClientPtr client) - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, - (unsigned long) stuff->flags); - -- if (ver < 2) { -- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); -- len = client->req_len - -- bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq)); -- } -- else { -- REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq)); -- } - if (len != stuff->privsize) - return BadLength; - -@@ -1027,6 +1035,20 @@ ProcVidModeSwitchToMode(ClientPtr client) - DEBUG_P("XF86VidModeSwitchToMode"); - - ver = ClientMajorVersion(client); -+ -+ if (ver < 2) { -+ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq)); -+ } -+ else { -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); -+ len = -+ client->req_len - -+ bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq)); -+ } -+ - if (ver < 2) { - /* convert from old format */ - stuff = &newstuff; -@@ -1055,18 +1077,6 @@ ProcVidModeSwitchToMode(ClientPtr client) - stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, - (unsigned long) stuff->flags); - -- if (ver < 2) { -- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq)); -- } -- else { -- REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); -- len = -- client->req_len - -- bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq)); -- } - if (len != stuff->privsize) - return BadLength; - -@@ -1457,6 +1467,7 @@ ProcVidModeSetGammaRamp(ClientPtr client) - VidModePtr pVidMode; - - REQUEST(xXF86VidModeSetGammaRampReq); -+ REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); - - if (stuff->screen >= screenInfo.numScreens) - return BadValue; -diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c -index c689dcb..039f38d 100644 ---- hw/xfree86/common/xf86DGA.c -+++ hw/xfree86/common/xf86DGA.c -@@ -1272,13 +1272,14 @@ ProcXDGAOpenFramebuffer(ClientPtr client) - char *deviceName; - int nameSize; - -+ REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - -- REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1305,14 +1306,14 @@ ProcXDGACloseFramebuffer(ClientPtr client) - { - REQUEST(xXDGACloseFramebufferReq); - -+ REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - -- REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq); -- - DGACloseFramebuffer(stuff->screen); - - return Success; -@@ -1328,10 +1329,11 @@ ProcXDGAQueryModes(ClientPtr client) - xXDGAModeInfo info; - XDGAModePtr mode; - -+ REQUEST_SIZE_MATCH(xXDGAQueryModesReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -- REQUEST_SIZE_MATCH(xXDGAQueryModesReq); - rep.type = X_Reply; - rep.length = 0; - rep.number = 0; -@@ -1443,11 +1445,12 @@ ProcXDGASetMode(ClientPtr client) - ClientPtr owner; - int size; - -+ REQUEST_SIZE_MATCH(xXDGASetModeReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - owner = DGA_GETCLIENT(stuff->screen); - -- REQUEST_SIZE_MATCH(xXDGASetModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.offset = 0; -@@ -1533,14 +1536,14 @@ ProcXDGASetViewport(ClientPtr client) - { - REQUEST(xXDGASetViewportReq); - -+ REQUEST_SIZE_MATCH(xXDGASetViewportReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGASetViewportReq); -- - DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags); - - return Success; -@@ -1554,14 +1557,14 @@ ProcXDGAInstallColormap(ClientPtr client) - - REQUEST(xXDGAInstallColormapReq); - -+ REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); -- - rc = dixLookupResourceByType((void **) &cmap, stuff->cmap, RT_COLORMAP, - client, DixInstallAccess); - if (rc != Success) -@@ -1575,14 +1578,14 @@ ProcXDGASelectInput(ClientPtr client) - { - REQUEST(xXDGASelectInputReq); - -+ REQUEST_SIZE_MATCH(xXDGASelectInputReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGASelectInputReq); -- - if (DGA_GETCLIENT(stuff->screen) == client) - DGASelectInput(stuff->screen, client, stuff->mask); - -@@ -1594,14 +1597,14 @@ ProcXDGAFillRectangle(ClientPtr client) - { - REQUEST(xXDGAFillRectangleReq); - -+ REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); -- - if (Success != DGAFillRect(stuff->screen, stuff->x, stuff->y, - stuff->width, stuff->height, stuff->color)) - return BadMatch; -@@ -1614,14 +1617,14 @@ ProcXDGACopyArea(ClientPtr client) - { - REQUEST(xXDGACopyAreaReq); - -+ REQUEST_SIZE_MATCH(xXDGACopyAreaReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGACopyAreaReq); -- - if (Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy, - stuff->width, stuff->height, stuff->dstx, - stuff->dsty)) -@@ -1635,14 +1638,14 @@ ProcXDGACopyTransparentArea(ClientPtr client) - { - REQUEST(xXDGACopyTransparentAreaReq); - -+ REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); -- - if (Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy, - stuff->width, stuff->height, stuff->dstx, - stuff->dsty, stuff->key)) -@@ -1657,13 +1660,14 @@ ProcXDGAGetViewportStatus(ClientPtr client) - REQUEST(xXDGAGetViewportStatusReq); - xXDGAGetViewportStatusReply rep; - -+ REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1680,13 +1684,14 @@ ProcXDGASync(ClientPtr client) - REQUEST(xXDGASyncReq); - xXDGASyncReply rep; - -+ REQUEST_SIZE_MATCH(xXDGASyncReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGASyncReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1725,13 +1730,14 @@ ProcXDGAChangePixmapMode(ClientPtr client) - xXDGAChangePixmapModeReply rep; - int x, y; - -+ REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1755,14 +1761,14 @@ ProcXDGACreateColormap(ClientPtr client) - REQUEST(xXDGACreateColormapReq); - int result; - -+ REQUEST_SIZE_MATCH(xXDGACreateColormapReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXDGACreateColormapReq); -- - if (!stuff->mode) - return BadValue; - -@@ -1791,10 +1797,11 @@ ProcXF86DGAGetVideoLL(ClientPtr client) - int num, offset, flags; - char *name; - -+ REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -- REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1831,9 +1838,10 @@ ProcXF86DGADirectVideo(ClientPtr client) - - REQUEST(xXF86DGADirectVideoReq); - -+ REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; -- REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); - - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; -@@ -1889,10 +1897,11 @@ ProcXF86DGAGetViewPortSize(ClientPtr client) - REQUEST(xXF86DGAGetViewPortSizeReq); - xXF86DGAGetViewPortSizeReply rep; - -+ REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -- REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1917,14 +1926,14 @@ ProcXF86DGASetViewPort(ClientPtr client) - { - REQUEST(xXF86DGASetViewPortReq); - -+ REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); -- - if (!DGAAvailable(stuff->screen)) - return DGAErrorBase + XF86DGANoDirectVideoMode; - -@@ -1944,10 +1953,11 @@ ProcXF86DGAGetVidPage(ClientPtr client) - REQUEST(xXF86DGAGetVidPageReq); - xXF86DGAGetVidPageReply rep; - -+ REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -- REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -1962,11 +1972,11 @@ ProcXF86DGASetVidPage(ClientPtr client) - { - REQUEST(xXF86DGASetVidPageReq); - -+ REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -- REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); -- - /* silently fail */ - - return Success; -@@ -1980,14 +1990,14 @@ ProcXF86DGAInstallColormap(ClientPtr client) - - REQUEST(xXF86DGAInstallColormapReq); - -+ REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); -- - if (!DGAActive(stuff->screen)) - return DGAErrorBase + XF86DGADirectNotActivated; - -@@ -2008,10 +2018,11 @@ ProcXF86DGAQueryDirectVideo(ClientPtr client) - REQUEST(xXF86DGAQueryDirectVideoReq); - xXF86DGAQueryDirectVideoReply rep; - -+ REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - -- REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; -@@ -2030,14 +2041,14 @@ ProcXF86DGAViewPortChanged(ClientPtr client) - REQUEST(xXF86DGAViewPortChangedReq); - xXF86DGAViewPortChangedReply rep; - -+ REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); -+ - if (stuff->screen >= screenInfo.numScreens) - return BadValue; - - if (DGA_GETCLIENT(stuff->screen) != client) - return DGAErrorBase + XF86DGADirectNotActivated; - -- REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); -- - if (!DGAActive(stuff->screen)) - return DGAErrorBase + XF86DGADirectNotActivated; - -diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c -index 68f8b7e..65f368e 100644 ---- hw/xfree86/dri/xf86dri.c -+++ hw/xfree86/dri/xf86dri.c -@@ -570,6 +570,7 @@ static int - SProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client) - { - REQUEST(xXF86DRIQueryDirectRenderingCapableReq); -+ REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq); - swaps(&stuff->length); - swapl(&stuff->screen); - return ProcXF86DRIQueryDirectRenderingCapable(client); --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-1218x ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-CVE-2017-12183 =================================================================== --- head/x11-servers/xorg-server/files/patch-CVE-2017-12183 (revision 526588) +++ head/x11-servers/xorg-server/files/patch-CVE-2017-12183 (nonexistent) @@ -1,95 +0,0 @@ -From 61502107a30d64f991784648c3228ebc6694a032 Mon Sep 17 00:00:00 2001 -From: Nathan Kidd -Date: Fri, 9 Jan 2015 11:43:05 -0500 -Subject: xfixes: unvalidated lengths (CVE-2017-12183) - -v2: Use before swap (Jeremy Huddleston Sequoia) - -v3: Fix wrong XFixesCopyRegion checks (Alan Coopersmith) - -Reviewed-by: Alan Coopersmith -Reviewed-by: Jeremy Huddleston Sequoia -Reviewed-by: Julien Cristau -Signed-off-by: Jeremy Huddleston Sequoia -Signed-off-by: Nathan Kidd -Signed-off-by: Julien Cristau -(cherry picked from commit 55caa8b08c84af2b50fbc936cf334a5a93dd7db5) - -diff --git a/xfixes/cursor.c b/xfixes/cursor.c -index f009a78..6e84d71 100644 ---- xfixes/cursor.c -+++ xfixes/cursor.c -@@ -281,6 +281,7 @@ int - SProcXFixesSelectCursorInput(ClientPtr client) - { - REQUEST(xXFixesSelectCursorInputReq); -+ REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq); - - swaps(&stuff->length); - swapl(&stuff->window); -@@ -414,7 +415,7 @@ ProcXFixesSetCursorName(ClientPtr client) - REQUEST(xXFixesSetCursorNameReq); - Atom atom; - -- REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq); -+ REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes); - VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess); - tchar = (char *) &stuff[1]; - atom = MakeAtom(tchar, stuff->nbytes, TRUE); -@@ -1007,6 +1008,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client) - int i; - CARD16 *in_devices = (CARD16 *) &stuff[1]; - -+ REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq); -+ - swaps(&stuff->length); - swaps(&stuff->num_devices); - REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices)); -diff --git a/xfixes/region.c b/xfixes/region.c -index dd74d7f..f300d2b 100644 ---- xfixes/region.c -+++ xfixes/region.c -@@ -359,6 +359,7 @@ ProcXFixesCopyRegion(ClientPtr client) - RegionPtr pSource, pDestination; - - REQUEST(xXFixesCopyRegionReq); -+ REQUEST_SIZE_MATCH(xXFixesCopyRegionReq); - - VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); - VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); -@@ -375,7 +376,7 @@ SProcXFixesCopyRegion(ClientPtr client) - REQUEST(xXFixesCopyRegionReq); - - swaps(&stuff->length); -- REQUEST_AT_LEAST_SIZE(xXFixesCopyRegionReq); -+ REQUEST_SIZE_MATCH(xXFixesCopyRegionReq); - swapl(&stuff->source); - swapl(&stuff->destination); - return (*ProcXFixesVector[stuff->xfixesReqType]) (client); -diff --git a/xfixes/saveset.c b/xfixes/saveset.c -index eb3f658..aa365cf 100644 ---- xfixes/saveset.c -+++ xfixes/saveset.c -@@ -62,6 +62,7 @@ int - SProcXFixesChangeSaveSet(ClientPtr client) - { - REQUEST(xXFixesChangeSaveSetReq); -+ REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); - - swaps(&stuff->length); - swapl(&stuff->window); -diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c -index 8d1bd4c..8b45c53 100644 ---- xfixes/xfixes.c -+++ xfixes/xfixes.c -@@ -160,6 +160,7 @@ static int - SProcXFixesQueryVersion(ClientPtr client) - { - REQUEST(xXFixesQueryVersionReq); -+ REQUEST_SIZE_MATCH(xXFixesQueryVersionReq); - - swaps(&stuff->length); - swapl(&stuff->majorVersion); --- -cgit v0.10.2 - Property changes on: head/x11-servers/xorg-server/files/patch-CVE-2017-12183 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_i386__video.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_i386__video.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_i386__video.c (nonexistent) @@ -1,11 +0,0 @@ -Index: programs/Xserver/hw/xfree86/os-support/bsd/i386_video.c ---- hw/xfree86/os-support/bsd/i386_video.c.orig 2016-07-15 16:18:11 UTC -+++ hw/xfree86/os-support/bsd/i386_video.c -@@ -32,6 +32,7 @@ - #include "xf86Priv.h" - - #include -+#include - #include - - #include "xf86_OSlib.h" Property changes on: head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_i386__video.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/20-evdev-kbd.conf =================================================================== --- head/x11-servers/xorg-server/files/20-evdev-kbd.conf (nonexistent) +++ head/x11-servers/xorg-server/files/20-evdev-kbd.conf (revision 526589) @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "Evdev keyboard" + MatchDevicePath "/dev/input/event*" + MatchIsKeyboard "on" + Option "XkbRules" "evdev" +EndSection Property changes on: head/x11-servers/xorg-server/files/20-evdev-kbd.conf ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/config_Makefile.am =================================================================== --- head/x11-servers/xorg-server/files/config_Makefile.am (nonexistent) +++ head/x11-servers/xorg-server/files/config_Makefile.am (revision 526589) @@ -0,0 +1,16 @@ +* Build the devd config backend if activated +* +--- config/Makefile.am.orig 2017-03-16 05:24:43 UTC ++++ config/Makefile.am +@@ -4,6 +4,11 @@ noinst_LTLIBRARIES = libconfig.la + libconfig_la_SOURCES = config.c config-backends.h + libconfig_la_LIBADD = + ++if CONFIG_DEVD ++libconfig_la_SOURCES += devd.c ++libconfig_la_LIBADD += -lusbhid ++endif ++ + if NEED_DBUS + AM_CFLAGS += $(DBUS_CFLAGS) + libconfig_la_SOURCES += dbus-core.c Property changes on: head/x11-servers/xorg-server/files/config_Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/configure.ac =================================================================== --- head/x11-servers/xorg-server/files/configure.ac (nonexistent) +++ head/x11-servers/xorg-server/files/configure.ac (revision 526589) @@ -0,0 +1,97 @@ +* Plumb the devd config backend into configure +* +* define USE_DEV_IO for ARM platforms +* +* Only run pkg-config for udev if it is not disabled to prevent over-linking +* +* Automatically use systemd/logind only on Linux +* +--- configure.ac.orig 2017-03-15 18:05:25 UTC ++++ configure.ac +@@ -266,9 +266,12 @@ case $host_cpu in + esac + GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" + ;; +- arm*) ++ arm*|aarch64*) + ARM_VIDEO=yes + DEFAULT_INT10="stub" ++ case $host_os in ++ *freebsd*) AC_DEFINE(USE_DEV_IO) ;; ++ esac + ;; + i*86) + I386_VIDEO=yes +@@ -565,6 +568,7 @@ AC_ARG_ENABLE(xcsecurity, AS_HELP_ST + AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) + AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no]) + AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) ++AC_ARG_ENABLE(config-devd, AS_HELP_STRING([--enable-config-devd], [Build devd support (default: auto)]), [CONFIG_DEVD=$enableval], [CONFIG_DEVD=auto]) + AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto]) + AC_ARG_ENABLE(config-udev-kms, AS_HELP_STRING([--enable-config-udev-kms], [Build udev kms support (default: auto)]), [CONFIG_UDEV_KMS=$enableval], [CONFIG_UDEV_KMS=auto]) + AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto]) +@@ -856,10 +860,27 @@ if test "x$CONFIG_UDEV" = xyes && test " + AC_MSG_ERROR([Hotplugging through both libudev and hal not allowed]) + fi + +-PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) +-if test "x$CONFIG_UDEV" = xauto; then +- CONFIG_UDEV="$HAVE_LIBUDEV" +- AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.]) ++if test "x$CONFIG_DEVD" = xauto; then ++ case $host_os in ++ *freebsd*) ++ CONFIG_DEVD=yes ++ ;; ++ *) ++ CONFIG_DEVD=no ++ ;; ++ esac ++fi ++AM_CONDITIONAL(CONFIG_DEVD, [test "x$CONFIG_DEVD" = xyes]) ++if test "x$CONFIG_DEVD" = xyes; then ++ AC_DEFINE(CONFIG_DEVD, 1, [Use devd for input auto configuration]) ++fi ++ ++if test "x$CONFIG_UDEV" != xno; then ++ PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) ++ if test "x$CONFIG_UDEV" = xauto; then ++ CONFIG_UDEV="$HAVE_LIBUDEV" ++ AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.]) ++ fi + fi + AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes]) + if test "x$CONFIG_UDEV" = xyes; then +@@ -907,7 +928,14 @@ AM_CONDITIONAL(CONFIG_HAL, [test "x$CONF + + if test "x$SYSTEMD_LOGIND" = xauto; then + if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then +- SYSTEMD_LOGIND=yes ++ case $host_os in ++ *linux*) ++ SYSTEMD_LOGIND=yes ++ ;; ++ *) ++ SYSTEMD_LOGIND=no ++ ;; ++ esac + else + SYSTEMD_LOGIND=no + fi +@@ -2467,12 +2495,12 @@ AC_SUBST([prefix]) + + AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/sdksyms.dep]) + +-if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then ++if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno && test "x$CONFIG_DEVD" = xno; then + AC_MSG_WARN([ +- *********************************************** +- Neither HAL nor udev backend will be enabled. ++ ***************************************************** ++ Neither HAL, devd, nor udev backend will be enabled. + Input device hotplugging will not be available! +- ***********************************************]) ++ *****************************************************]) + fi + + AC_CONFIG_FILES([ Property changes on: head/x11-servers/xorg-server/files/configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/hw_xfree86_Makefile.am =================================================================== --- head/x11-servers/xorg-server/files/hw_xfree86_Makefile.am (nonexistent) +++ head/x11-servers/xorg-server/files/hw_xfree86_Makefile.am (revision 526589) @@ -0,0 +1,14 @@ +* Don't overwrite Xorg binary with Xorg.sh when SUID_WRAPPER_DIR == bindir +* Instead, relink bin/X to Xorg.wrap rather than to Xorg (which isn't Xorg.sh) +* +--- hw/xfree86/Makefile.am.orig 2017-03-16 05:24:43 UTC ++++ hw/xfree86/Makefile.am +@@ -114,7 +114,7 @@ endif + if SUID_WRAPPER + $(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR) + mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg +- ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg ++ (test ! -f $(DESTDIR)$(bindir)/Xorg && ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg || cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg.wrap$(EXEEXT) X) + -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap + endif + Property changes on: head/x11-servers/xorg-server/files/hw_xfree86_Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in =================================================================== --- head/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in (revision 526588) +++ head/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in (revision 526589) @@ -1,12 +1,12 @@ --- hw/xfree86/os-support/misc/Makefile.in.orig 2015-09-23 10:21:18.470900000 +0200 +++ hw/xfree86/os-support/misc/Makefile.in 2015-09-23 10:22:34.979974000 +0200 -@@ -530,7 +530,8 @@ +@@ -543,7 +543,8 @@ #AM_LDFLAGS = -r AM_CPPFLAGS = $(XORG_INCS) -AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) +@I386_VIDEO_TRUE@I386_VIDEO_CFLAGS = -mno-sse +AM_CFLAGS = $(I386_VIDEO_CFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS) EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) all: all-am Index: head/x11-servers/xorg-server/files/patch-config_Makefile.in =================================================================== --- head/x11-servers/xorg-server/files/patch-config_Makefile.in (nonexistent) +++ head/x11-servers/xorg-server/files/patch-config_Makefile.in (revision 526589) @@ -0,0 +1,100 @@ +* generated from patched Makefile.am; revise and regen instead of editing +* +* Build the devd config backend if activated +* +--- config/Makefile.in.orig 2017-03-16 05:24:43 UTC ++++ config/Makefile.in +@@ -89,16 +89,18 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-@NEED_DBUS_TRUE@am__append_1 = $(DBUS_CFLAGS) +-@NEED_DBUS_TRUE@am__append_2 = dbus-core.c +-@NEED_DBUS_TRUE@am__append_3 = $(DBUS_LIBS) +-@CONFIG_UDEV_TRUE@am__append_4 = $(UDEV_CFLAGS) +-@CONFIG_UDEV_TRUE@am__append_5 = udev.c +-@CONFIG_UDEV_TRUE@am__append_6 = $(UDEV_LIBS) +-@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_7 = $(HAL_CFLAGS) +-@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_8 = hal.c +-@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_9 = $(HAL_LIBS) +-@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__append_10 = wscons.c ++@CONFIG_DEVD_TRUE@am__append_1 = devd.c ++@CONFIG_DEVD_TRUE@am__append_2 = -lusbhid ++@NEED_DBUS_TRUE@am__append_3 = $(DBUS_CFLAGS) ++@NEED_DBUS_TRUE@am__append_4 = dbus-core.c ++@NEED_DBUS_TRUE@am__append_5 = $(DBUS_LIBS) ++@CONFIG_UDEV_TRUE@am__append_6 = $(UDEV_CFLAGS) ++@CONFIG_UDEV_TRUE@am__append_7 = udev.c ++@CONFIG_UDEV_TRUE@am__append_8 = $(UDEV_LIBS) ++@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_9 = $(HAL_CFLAGS) ++@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_10 = hal.c ++@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_11 = $(HAL_LIBS) ++@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__append_12 = wscons.c + subdir = config + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ +@@ -126,16 +128,18 @@ am__DEPENDENCIES_1 = + @CONFIG_UDEV_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) + @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__DEPENDENCIES_4 = \ + @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@ $(am__DEPENDENCIES_1) +-libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ +- $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) +-am__libconfig_la_SOURCES_DIST = config.c config-backends.h dbus-core.c \ +- udev.c hal.c wscons.c +-@NEED_DBUS_TRUE@am__objects_1 = dbus-core.lo +-@CONFIG_UDEV_TRUE@am__objects_2 = udev.lo +-@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__objects_3 = hal.lo +-@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__objects_4 = wscons.lo ++libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ++ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \ ++ $(am__DEPENDENCIES_4) ++am__libconfig_la_SOURCES_DIST = config.c config-backends.h devd.c \ ++ dbus-core.c udev.c hal.c wscons.c ++@CONFIG_DEVD_TRUE@am__objects_1 = devd.lo ++@NEED_DBUS_TRUE@am__objects_2 = dbus-core.lo ++@CONFIG_UDEV_TRUE@am__objects_3 = udev.lo ++@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__objects_4 = hal.lo ++@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__objects_5 = wscons.lo + am_libconfig_la_OBJECTS = config.lo $(am__objects_1) $(am__objects_2) \ +- $(am__objects_3) $(am__objects_4) ++ $(am__objects_3) $(am__objects_4) $(am__objects_5) + libconfig_la_OBJECTS = $(am_libconfig_la_OBJECTS) + AM_V_lt = $(am__v_lt_@AM_V@) + am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +@@ -157,7 +161,7 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__maybe_remake_depfiles = depfiles + am__depfiles_remade = ./$(DEPDIR)/config.Plo ./$(DEPDIR)/dbus-core.Plo \ +- ./$(DEPDIR)/hal.Plo ./$(DEPDIR)/udev.Plo \ ++ ./$(DEPDIR)/devd.Plo ./$(DEPDIR)/hal.Plo ./$(DEPDIR)/udev.Plo \ + ./$(DEPDIR)/wscons.Plo + am__mv = mv -f + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +@@ -593,12 +597,14 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-AM_CFLAGS = $(DIX_CFLAGS) $(am__append_1) $(am__append_4) \ +- $(am__append_7) ++AM_CFLAGS = $(DIX_CFLAGS) $(am__append_3) $(am__append_6) \ ++ $(am__append_9) + noinst_LTLIBRARIES = libconfig.la +-libconfig_la_SOURCES = config.c config-backends.h $(am__append_2) \ +- $(am__append_5) $(am__append_8) $(am__append_10) +-libconfig_la_LIBADD = $(am__append_3) $(am__append_6) $(am__append_9) ++libconfig_la_SOURCES = config.c config-backends.h $(am__append_1) \ ++ $(am__append_4) $(am__append_7) $(am__append_10) \ ++ $(am__append_12) ++libconfig_la_LIBADD = $(am__append_2) $(am__append_5) $(am__append_8) \ ++ $(am__append_11) + @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) + @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfd_DATA = 10-quirks.conf + EXTRA_DIST = x11-input.fdi fdi2iclass.py 10-quirks.conf +@@ -658,6 +664,7 @@ distclean-compile: + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Plo@am__quote@ # am--include-marker ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devd.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udev.Plo@am__quote@ # am--include-marker + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wscons.Plo@am__quote@ # am--include-marker Property changes on: head/x11-servers/xorg-server/files/patch-config_Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-config_config-backends.h =================================================================== --- head/x11-servers/xorg-server/files/patch-config_config-backends.h (revision 526588) +++ head/x11-servers/xorg-server/files/patch-config_config-backends.h (revision 526589) @@ -1,11 +1,12 @@ ---- config/config-backends.h.orig 2016-07-15 16:17:45 UTC +* Define required functions for devd config backend +* +--- config/config-backends.h.orig 2017-03-15 18:05:25 UTC +++ config/config-backends.h -@@ -44,3 +44,8 @@ void config_hal_fini(void); +@@ -43,4 +43,7 @@ void config_hal_fini(void); + #elif defined(CONFIG_WSCONS) int config_wscons_init(void); void config_wscons_fini(void); - #endif -+ -+#ifdef CONFIG_DEVD ++#elif defined(CONFIG_DEVD) +int config_devd_init(void); +void config_devd_fini(void); -+#endif + #endif Index: head/x11-servers/xorg-server/files/patch-config_config.c =================================================================== --- head/x11-servers/xorg-server/files/patch-config_config.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-config_config.c (revision 526589) @@ -1,21 +1,23 @@ ---- config/config.c.orig 2016-07-19 17:07:29 UTC +* Call the devd config backend functions if activated +* +--- config/config.c.orig 2017-03-15 18:05:25 UTC +++ config/config.c @@ -55,6 +55,9 @@ config_init(void) #elif defined(CONFIG_WSCONS) if (!config_wscons_init()) ErrorF("[config] failed to initialise wscons\n"); +#elif defined(CONFIG_DEVD) + if (!config_devd_init()) + ErrorF("[config] failed to initialise devd\n"); #endif } @@ -67,6 +70,8 @@ config_fini(void) config_hal_fini(); #elif defined(CONFIG_WSCONS) config_wscons_fini(); +#elif defined(CONFIG_DEVD) + config_devd_fini(); #endif } Index: head/x11-servers/xorg-server/files/patch-config_devd.c =================================================================== --- head/x11-servers/xorg-server/files/patch-config_devd.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-config_devd.c (revision 526589) @@ -1,535 +1,858 @@ ---- config/devd.c.orig 2017-01-19 15:20:42 UTC +--- config/devd.c.orig 2017-03-16 05:24:43 UTC +++ config/devd.c -@@ -0,0 +1,532 @@ +@@ -0,0 +1,855 @@ +/* + * Copyright (c) 2012 Baptiste Daroussin + * Copyright (c) 2013, 2014 Alex Kozlov + * Copyright (c) 2014 Robert Millan + * Copyright (c) 2014 Jean-Sebastien Pedron ++ * Copyright (c) 2015 Hans Petter Selasky ++ * Copyright (c) 2015-2017 Rozhuk Ivan ++ * Copyright (c) 2016, 2017 Vladimir Kondratyev ++ * Copyright (c) 2017 Matthew Rezny + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Author: Baptiste Daroussin + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include ++#include ++#include ++#include ++#include ++#include ++#include + +#include ++#include +#include +#include +#include +#include +#include +#include ++#include ++#include ++#include + +#include "input.h" +#include "inputstr.h" +#include "hotplug.h" +#include "config-backends.h" +#include "os.h" + -+#define DEVD_SOCK_PATH "/var/run/devd.pipe" ++#define _IOC_READ IOC_OUT + ++#define ULONG_BITS (sizeof(unsigned long) * 8) ++#define ULONG_CNT(__x) (((__x) + ULONG_BITS - 1) / ULONG_BITS) ++#define ULONG_IS_BIT_SET(__x, __bit) (((const unsigned long*)(__x))[(__bit) / ULONG_BITS] & (1UL << (__bit % ULONG_BITS))) ++ ++/* from: */ ++#define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */ ++ ++/* WebCamD specific. */ ++#define WEBCAMD_IOCTL_GET_USB_VENDOR_ID _IOR('q', 250, unsigned short) ++#define WEBCAMD_IOCTL_GET_USB_PRODUCT_ID _IOR('q', 251, unsigned short) ++#define WEBCAMD_IOCTL_GET_USB_SPEED _IOR('q', 252, unsigned int) ++ ++#ifdef COMPAT_32BIT ++ #define hid_pass_ptr(ptr) ((uint64_t)(uintptr_t)(ptr)) ++#else ++ #define hid_pass_ptr(ptr) (ptr) ++#endif ++ ++#define _PATH_DEV_LEN (sizeof(_PATH_DEV) - 1) ++#define DEVD_PATH_DEV "devd:" _PATH_DEV ++#define DEVD_PATH_DEV_LEN (sizeof(DEVD_PATH_DEV) - 1) ++#define DEVD_PATH_LEN (DEVD_PATH_DEV_LEN - _PATH_DEV_LEN) ++ ++#define DEVD_SOCK_PATH _PATH_VARRUN "devd.pipe" ++ +#define DEVD_EVENT_ADD '+' +#define DEVD_EVENT_REMOVE '-' ++#define DEVD_EVENT_NOTIFY '!' + -+#define RECONNECT_DELAY 5 * 1000 ++#define RECONNECT_DELAY (5 * 1000) + -+static int sock_devd; -+static bool is_console_kbd = false; -+static bool is_kbdmux = false; ++#define is_meuqual(__v1, __v1sz, __v2, __v2sz) \ ++ ((__v1sz) == (__v2sz) && NULL != (__v1) && NULL != (__v2) && \ ++ 0 == memcmp((__v1), (__v2), (__v1sz))) ++ ++#define is_meuqual_cstr(__cstr, __v, __vsz) \ ++ is_meuqual(__cstr, (sizeof(__cstr) - 1), __v, __vsz) ++ ++#define is_de_euqual_cstr(__de, __cstr) \ ++ (NULL != (__de) && \ ++ is_meuqual((__de)->d_name, (__de)->d_namlen, __cstr, (sizeof(__cstr) - 1))) ++ ++#define devd_get_val_cstr(__cstr, __buf, __bufsz, __valsz) \ ++ devd_get_val((__buf), (__bufsz), __cstr, (sizeof(__cstr) - 1), \ ++ (__valsz)) ++ ++static int devd_skt = 0; ++static char devd_buf[4096]; ++static size_t devd_buf_used = 0; ++static int is_kbdmux = 0; ++static int evdev_support = 0; +static OsTimerPtr rtimer = NULL; + -+struct hw_type { -+ const char *driver; -+ int flag; -+ const char *xdriver; ++/* Input devices. */ ++typedef struct hw_type_s { ++ const char *dev_name; ++ size_t dev_name_size; ++ size_t path_offset; ++ int is_hybrid; /* has both evdev and traditional interfaces */ ++ int flags; ++ const char *xdriver; ++} hw_type_t, *hw_type_p; ++ ++/* xdriver can be set via config "InputClass" section. ++ * Do not set xdriver name if device have more than one ++ * xf86-input-* drivers. ++ * "input/event" can be handled by: xf86-input-libinput, ++ * xf86-input-evdev and xf86-input-wacom, let user choose. ++ */ ++static hw_type_t hw_types[] = { ++ { "uhid", 4, 0, 0, 0, NULL }, ++ { "ukbd", 4, 0, 1, ATTR_KEY | ATTR_KEYBOARD, "kbd" }, ++ { "atkbd", 5, 0, 1, ATTR_KEY | ATTR_KEYBOARD, "kbd" }, ++ { "kbdmux", 6, 0, 1, ATTR_KEY | ATTR_KEYBOARD, "kbd" }, ++ { "sysmouse", 8, 0, 1, ATTR_POINTER, "mouse" }, ++ { "ums", 3, 0, 1, ATTR_POINTER, "mouse" }, ++ { "psm", 3, 0, 1, ATTR_POINTER, "mouse" }, ++ { "vboxguest", 9, 0, 0, ATTR_POINTER, "vboxmouse" }, ++ { "joy", 3, 0, 0, ATTR_JOYSTICK, NULL }, ++ { "atp", 3, 0, 0, ATTR_TOUCHPAD, NULL }, ++ { "uep", 3, 0, 0, ATTR_TOUCHSCREEN, NULL }, ++ { "input/event",5, 6, 0, 0, NULL }, ++ { "input/js", 2, 6, 0, ATTR_JOYSTICK, NULL }, ++ { NULL, 0, 0, 0, NULL }, +}; + -+static struct hw_type hw_types[] = { -+ { "ukbd", ATTR_KEYBOARD, "kbd" }, -+ { "atkbd", ATTR_KEYBOARD, "kbd" }, -+ { "kbdmux", ATTR_KEYBOARD, "kbd" }, -+ { "sysmouse", ATTR_POINTER, "mouse" }, -+ { "ums", ATTR_POINTER, "mouse" }, -+ { "psm", ATTR_POINTER, "mouse" }, -+ { "vboxguest", ATTR_POINTER, "vboxmouse" }, -+ { "joy", ATTR_JOYSTICK, NULL }, -+ { "atp", ATTR_TOUCHPAD, NULL }, -+ { "uep", ATTR_TOUCHSCREEN, NULL }, -+ { NULL, -1, NULL }, ++/* Input devices paths. */ ++static hw_type_t hw_type_path[] = { ++ { "input/", 0, 6, 0, NULL }, ++ { NULL, 0, 0, 0, NULL }, +}; + -+static bool -+sysctl_exists(const struct hw_type *device, int unit, -+ char *devname, size_t devname_len) ++static size_t ++bits_calc(const unsigned long *bits, size_t off_start, size_t off_stop) +{ -+ char sysctlname[PATH_MAX]; -+ size_t len; -+ int ret; ++ size_t count = 0; + -+ if (device == NULL || device->driver == NULL) -+ return false; ++ for (size_t i = off_start; i < off_stop; ++i) { ++ if (ULONG_IS_BIT_SET(bits, i)) { ++ ++count; ++ } ++ } ++ return count; ++} + -+ /* Check if a sysctl exists. */ -+ snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%i.%%desc", -+ device->driver, unit); -+ ret = sysctlbyname(sysctlname, NULL, &len, NULL, 0); ++static hw_type_p ++get_dev_type_by_name(const char *dev_name, size_t dev_name_size) ++{ ++ if (!dev_name || !dev_name_size) ++ return NULL; + -+ if (ret == 0 && len > 0) { -+ snprintf(devname, devname_len, "%s%i", device->driver, unit); -+ return true; ++ for (size_t i = 0; hw_types[i].dev_name; ++i) { ++ if (dev_name_size >= (hw_types[i].dev_name_size + hw_types[i].path_offset) && ++ !memcmp(dev_name, hw_types[i].dev_name, (hw_types[i].path_offset + hw_types[i].dev_name_size))) { ++ return &hw_types[i]; ++ } + } ++ return NULL; ++} + -+ return false; ++static hw_type_p ++get_dev_type_by_path(const char *dev_name, size_t dev_name_size, hw_type_p hw_type_cust) ++{ ++ if (!dev_name || !dev_name_size || !hw_type_cust) ++ return NULL; ++ ++ for (size_t i = 0; hw_type_path[i].dev_name; ++i) { ++ if (dev_name_size <= hw_type_path[i].path_offset || ++ memcmp(dev_name, hw_type_path[i].dev_name, hw_type_path[i].path_offset)) ++ continue; ++ /* Path in white list. */ ++ hw_type_cust->dev_name = dev_name; ++ hw_type_cust->flags = hw_type_path[i].flags; ++ hw_type_cust->xdriver = hw_type_path[i].xdriver; ++ hw_type_cust->path_offset = hw_type_path[i].path_offset; ++ size_t name_end = hw_type_cust->path_offset; ++ while (name_end < dev_name_size && !isdigit(dev_name[name_end])) ++ ++name_end; ++ hw_type_cust->dev_name_size = (name_end - hw_type_cust->path_offset); ++ return hw_type_cust; ++ } ++ return NULL; +} + -+static bool -+devpath_exists(const struct hw_type *device, -+ char *devname, size_t devname_len) ++static int ++is_kbdmux_enabled(void) +{ -+ char *devpath; -+ struct stat st; -+ int ret; ++ /* Xorg uses /dev/ttyv0 as a console device */ ++ /* const char device[]="/dev/console"; */ ++ static const char *device = _PATH_TTY "v0"; + -+ if (device == NULL || device->driver == NULL) -+ return false; ++ int fd = open(device, O_RDONLY); ++ if (fd < 0) ++ return 0; + -+ /* Check if /dev/$driver exists. */ -+ asprintf(&devpath, "/dev/%s", device->driver); -+ if (devpath == NULL) -+ return false; ++ keyboard_info_t info; ++ int ret = (ioctl(fd, KDGKBINFO, &info) == -1 || ++ memcmp(info.kb_name, "kbdmux", 6)) ? 0 : 1; ++ close(fd); ++ return ret; ++} + -+ ret = stat(devpath, &st); -+ free(devpath); ++/* Derived from EvdevProbe() function of xf86-input-evdev driver */ ++static int ++get_evdev_flags(int fd) ++{ ++ if (fd<0) ++ return 0; + -+ if (ret == 0) { -+ strncpy(devname, device->driver, devname_len); -+ return true; ++ unsigned long key_bits[ULONG_CNT(KEY_CNT)], rel_bits[ULONG_CNT(REL_CNT)], abs_bits[ULONG_CNT(ABS_CNT)]; ++ size_t has_keys = 0, has_buttons = 0, has_lmr = 0, has_rel_axes = 0, has_abs_axes = 0, has_mt = 0; ++ if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bits)), key_bits) != -1) { ++ has_keys = bits_calc(key_bits, 0, BTN_MISC); ++ has_buttons = bits_calc(key_bits, BTN_MISC, BTN_JOYSTICK); ++ has_lmr = bits_calc(key_bits, BTN_LEFT, BTN_MIDDLE + 1); + } ++ if (ioctl(fd, EVIOCGBIT(EV_REL, sizeof(rel_bits)), rel_bits) != -1) { ++ has_rel_axes = bits_calc(rel_bits, 0, REL_CNT); ++ } ++ if (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(abs_bits)), abs_bits) != -1) { ++ has_abs_axes = bits_calc(abs_bits, 0, ABS_CNT); ++ has_mt = bits_calc(abs_bits, ABS_MT_SLOT, ABS_CNT); ++ } + -+ return false; ++ int flags = 0; ++ if (has_abs_axes) { ++ if (has_mt) { ++ if (!has_buttons) { ++ /* ++ * XXX: I'm not sure that joystick detection is ++ * done right. xf86-input-evdev does not support them. ++ */ ++ if (ULONG_IS_BIT_SET(key_bits, BTN_JOYSTICK)) ++ flags = ATTR_JOYSTICK; ++ else ++ ++has_buttons; ++ } ++ } ++ if (!flags && ULONG_IS_BIT_SET(abs_bits, ABS_X) && ULONG_IS_BIT_SET(abs_bits, ABS_Y)) { ++ if (ULONG_IS_BIT_SET(key_bits, BTN_TOOL_PEN) || ++ ULONG_IS_BIT_SET(key_bits, BTN_STYLUS) || ++ ULONG_IS_BIT_SET(key_bits, BTN_STYLUS2)) ++ flags = ATTR_TABLET; ++ else if (ULONG_IS_BIT_SET(abs_bits, ABS_PRESSURE) || ++ ULONG_IS_BIT_SET(key_bits, BTN_TOUCH)) { ++ if (has_lmr || ULONG_IS_BIT_SET(key_bits, BTN_TOOL_FINGER)) ++ flags = ATTR_TOUCHPAD; ++ else ++ flags = ATTR_TOUCHSCREEN; ++ } else if (!(ULONG_IS_BIT_SET(rel_bits, REL_X) && ++ ULONG_IS_BIT_SET(rel_bits, REL_Y)) && ++ has_lmr) /* some touchscreens use BTN_LEFT rather than BTN_TOUCH */ ++ flags = ATTR_TOUCHSCREEN; ++ } ++ } ++ if (!flags) { ++ if (has_keys) ++ flags = ATTR_KEY | ATTR_KEYBOARD; ++ else if (has_rel_axes || has_abs_axes || has_buttons) ++ flags = ATTR_POINTER; ++ } ++ return flags; +} + -+static char * -+sysctl_get_str(const char *sysctlname) ++/* From: sys/dev/usb/usb_hid.c */ ++static int ++hid_is_collection(report_desc_t s, uint32_t usage) +{ -+ char *dest = NULL; -+ size_t len; ++ struct hid_data* hd = hid_start_parse(s, ~0, -1); ++ if (!hd) ++ return 0; + -+ if (sysctlname == NULL) -+ return NULL; ++ struct hid_item hi; ++ int rc; ++ while ((rc = hid_get_item(hd, &hi))) { ++ if (hi.kind == hid_collection && hi.usage == usage) ++ break; ++ } ++ hid_end_parse(hd); ++ return rc; ++} + -+ if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) == 0) { -+ dest = malloc(len + 1); -+ if (dest) { -+ if (sysctlbyname(sysctlname, dest, &len, NULL, 0) == 0) -+ dest[len] = '\0'; -+ else { -+ free(dest); -+ dest = NULL; -+ } ++static int ++hid_is_mouse(report_desc_t s) ++{ ++ struct hid_data* hd = hid_start_parse(s, (1 << hid_input), -1); ++ if (!hd) ++ return 0; ++ ++ struct hid_item hi; ++ int found = 0, mdepth = 0; ++ while (hid_get_item(hd, &hi)) { ++ switch (hi.kind) { ++ case hid_collection: ++ if (mdepth != 0) ++ ++mdepth; ++ else if (hi.collection == 1 && ++ hi.usage == HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)) ++ ++mdepth; ++ break; ++ case hid_endcollection: ++ if (mdepth) ++ --mdepth; ++ break; ++ case hid_input: ++ if (!mdepth) ++ break; ++ if (hi.usage == HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X) && ++ (hi.flags & (HIO_CONST|HIO_RELATIVE)) == HIO_RELATIVE) ++ ++found; ++ if (hi.usage == HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y) && ++ (hi.flags & (HIO_CONST|HIO_RELATIVE)) == HIO_RELATIVE) ++ ++found; ++ break; ++ default: ++ break; + } + } ++ hid_end_parse(hd); ++ return found; ++} + ++static char * ++sysctl_get_str(const char *sysctlname, size_t *size_ret) ++{ ++ if (!sysctlname) ++ return NULL; ++ ++ size_t len = 0; ++ if (sysctlbyname(sysctlname, NULL, &len, NULL, 0) || !len) ++ return NULL; ++ ++ char* dest = malloc(len + 1); ++ if (!dest) ++ return NULL; ++ ++ if (sysctlbyname(sysctlname, dest, &len, NULL, 0)) { ++ free(dest); ++ return NULL; ++ } ++ dest[len] = 0; ++ if (size_ret) ++ *size_ret = len; + return dest; +} + -+static void -+device_added(const char *devname) ++static char * ++devd_get_val(char *buf, size_t buf_size, const char *val_name, size_t val_name_size, size_t *val_size) +{ -+ char path[PATH_MAX]; -+ char sysctlname[PATH_MAX]; -+ char *vendor; -+ char *product = NULL; -+ char *config_info = NULL; -+ char *walk; -+ InputOption *options = NULL; -+ InputAttributes attrs = { }; -+ DeviceIntPtr dev = NULL; -+ int i; -+ int fd; ++ if (!buf || !buf_size || !val_name || !val_name_size) ++ return NULL; + -+ for (i = 0; hw_types[i].driver != NULL; i++) { -+ size_t len; -+ -+ len = strlen(hw_types[i].driver); -+ if (strcmp(devname, hw_types[i].driver) == 0 || -+ (strncmp(devname, hw_types[i].driver, len) == 0 && -+ isnumber(*(devname + len)))) { -+ attrs.flags |= hw_types[i].flag; -+ break; ++ char *ret = buf, *buf_end = (buf + buf_size); ++ while (ret && ret < buf_end) { ++ ret = memmem(ret, (buf_end - ret), val_name, val_name_size); ++ if (!ret) ++ return NULL; ++ /* Found. */ ++ /* Check: space before or buf+1. */ ++ if ((buf + 1) < ret && ret[-1] != ' ') { ++ ret += val_name_size; ++ continue; + } ++ /* Check: = after name and size for value. */ ++ ret += val_name_size; ++ if ((ret + 1) >= buf_end) ++ return NULL; ++ if (ret[0] != '=') ++ continue; ++ ++ret; ++ break; + } ++ if (!ret || !val_size) ++ return ret; ++ /* Calc value data size. */ ++ char* ptr = memchr(ret, ' ', (buf_end - ret)); ++ if (!ptr) /* End of string/last value. */ ++ ptr = buf_end; ++ *val_size = (ptr - ret); ++ return ret; ++} + -+ if (hw_types[i].driver == NULL || hw_types[i].xdriver == NULL) { -+ LogMessage(X_INFO, "config/devd: ignoring device %s\n", -+ devname); ++static void ++device_added(const char *dev_name, size_t dev_name_size, int allow_no_device) ++{ ++ if (!dev_name || !dev_name_size || dev_name_size > PATH_MAX) + return; ++ ++ char config_info[PATH_MAX + 32]; ++ /* Make dev_name null ended string. */ ++ snprintf(config_info, sizeof(config_info), DEVD_PATH_DEV"%.*s", (int)dev_name_size, dev_name); ++ /* Set / update pointers to dev_name and dev_path. */ ++ char* dev_path = (config_info + DEVD_PATH_LEN); /* Skip: "devd:" */ ++ dev_name = (dev_path + _PATH_DEV_LEN); /* Skip: "/dev/" */ ++ ++ /* Is known input device or path? */ ++ hw_type_t *hwtype = get_dev_type_by_name(dev_name, dev_name_size); ++ if (!hwtype) { ++ hw_type_t hwtype_cust; ++ hwtype = get_dev_type_by_path(dev_name, dev_name_size, &hwtype_cust); + } ++ if (!hwtype) /* Not found in white list. */ ++ return; + ++ /* Skip legacy interfaces if EVDEV_SUPPORT is compiled into kernel */ ++ if (evdev_support && hwtype->is_hybrid) { ++ LogMessage(X_INFO, "config/devd: EVDEV_SUPPORT is enabled, ignoring device %s\n", dev_name); ++ return; ++ } + /* Skip keyboard devices if kbdmux is enabled */ -+ if (is_kbdmux && is_console_kbd && hw_types[i].flag & ATTR_KEYBOARD) { -+ LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n", -+ devname); ++ if (is_kbdmux && !allow_no_device && (hwtype->flags & ATTR_KEYBOARD)) { ++ LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n", dev_name); + return; + } -+ -+ snprintf(path, sizeof(path), "/dev/%s", devname); -+ -+ options = input_option_new(NULL, "_source", "server/devd"); -+ if (!options) ++ /* Skip duplicate devices. */ ++ if (device_is_duplicate(config_info)) { ++ LogMessage(X_WARNING, "config/devd: device %s already added. ignoring\n", dev_path); + return; -+ -+ snprintf(sysctlname, sizeof(sysctlname), "dev.%s.%s.%%desc", -+ hw_types[i].driver, devname + strlen(hw_types[i].driver)); -+ vendor = sysctl_get_str(sysctlname); -+ if (vendor == NULL) { -+ options = input_option_new(options, "name", devname); + } -+ else { -+ if ((walk = strchr(vendor, ' ')) != NULL) { -+ walk[0] = '\0'; -+ walk++; -+ product = walk; -+ if ((walk = strchr(product, ',')) != NULL) -+ walk[0] = '\0'; -+ } + -+ attrs.vendor = strdup(vendor); -+ if (product) { -+ attrs.product = strdup(product); -+ options = input_option_new(options, "name", product); -+ } -+ else -+ options = input_option_new(options, "name", "(unnamed)"); ++ /* Init and set attributes. */ ++ char pnp_usb_id[PATH_MAX], product[PATH_MAX], vendor[PATH_MAX]; ++ InputAttributes attrs; ++ memset(&attrs, 0, sizeof(attrs)); ++ attrs.device = dev_path; ++ attrs.flags = hwtype->flags; + -+ free(vendor); -+ } -+ -+ /* XXX implement usb_id */ -+ attrs.usb_id = NULL; -+ attrs.device = strdup(path); -+ options = input_option_new(options, "driver", hw_types[i].xdriver); -+ -+ fd = open(path, O_RDONLY); -+ if (fd > 0) { -+ close(fd); -+ options = input_option_new(options, "device", path); -+ } -+ else { -+ if (attrs.flags & ~ATTR_KEYBOARD) { -+ LogMessage(X_INFO, "config/devd: device %s already opened\n", -+ path); -+ ++ /* Try to open device. */ ++ int fd = open(dev_path, O_RDONLY); ++ if (fd < 0) { ++ if (!(hwtype->flags & (ATTR_KEY | ATTR_KEYBOARD))) { + /* + * Fail if cannot open device, it breaks AllowMouseOpenFail, -+ * but it should not matter when config/devd enabled ++ * but it should not matter when config/devd is enabled + */ -+ goto unwind; ++ LogMessage(X_WARNING, "config/devd: device %s already opened\n", dev_path); ++ return; + } -+ -+ if (is_console_kbd) { ++ if (!allow_no_device) { + /* + * There can be only one keyboard attached to console and + * it is already added. + */ -+ LogMessage(X_WARNING, "config/devd: console keyboard is " -+ "already added, ignoring %s (%s)\n", -+ attrs.product, path); -+ goto unwind; ++ LogMessage(X_WARNING, "config/devd: console keyboard is already added, ignoring %s\n", dev_path); ++ return; + } -+ else -+ /* -+ * Don't pass "device" option if the keyboard is already -+ * attached to the console (ie. open() fails). -+ * This would activate a special logic in xf86-input-keyboard. -+ * Prevent any other attached to console keyboards being -+ * processed. There can be only one such device. -+ */ -+ is_console_kbd = true; -+ } ++ } else { ++ /* Try to get device info via ioctl(). */ ++ keyboard_info_t kbdi; ++ mousehw_t mshw; ++ struct input_id iid; ++ report_desc_t rep_desc; + -+ if (asprintf(&config_info, "devd:%s", devname) == -1) { -+ config_info = NULL; -+ goto unwind; ++ if (ioctl(fd, KDGKBINFO, &kbdi) != -1) { /* Is this keyboard? */ ++ memcpy(product, kbdi.kb_name, sizeof(kbdi.kb_name)); ++ attrs.product = product; ++ attrs.flags = ATTR_KEY | ATTR_KEYBOARD; ++ LogMessage(X_INFO, "config/devd: detected keyboard: %s, kb_index=%i, kb_unit=%i, kb_type=%i, kb_config=%i\n", ++ kbdi.kb_name, kbdi.kb_index, kbdi.kb_unit, kbdi.kb_type, kbdi.kb_config); ++ } else if (ioctl(fd, MOUSE_GETHWINFO, &mshw) != -1) { /* Is this mouse? */ ++ /* FreeBSD mouse drivers does not return real vid+pid. */ ++ /* construct USB ID in lowercase hex - "0000:ffff" */ ++ if (mshw.iftype != MOUSE_IF_USB && mshw.model > 0) { ++ snprintf(pnp_usb_id, sizeof(pnp_usb_id), "%04x:%04x", mshw.hwid, mshw.model); ++ attrs.usb_id = pnp_usb_id; ++ } ++ if (mshw.type == MOUSE_PAD) ++ attrs.flags = ATTR_TOUCHPAD; ++ else ++ attrs.flags = ATTR_POINTER; ++ LogMessage(X_INFO, "config/devd: detected mouse: hwid=%04x, model=%04x, type=%04x, iftype=%04x, buttons=%d\n", ++ mshw.hwid, mshw.model, mshw.type, mshw.iftype, mshw.buttons); ++ } else if (ioctl(fd, JSIOCGNAME((sizeof(product) - 1)), product) != -1) { /* Is this joystick? */ ++ attrs.product = product; ++ attrs.flags = ATTR_JOYSTICK; ++ LogMessage(X_INFO, "config/devd: detected joystick: %s\n", product); ++ } else if (ioctl(fd, EVIOCGID, &iid) != -1 && ++ ioctl(fd, EVIOCGNAME((sizeof(product) - 1)), product) != -1) { /* Is this event? */ ++ /* construct USB ID in lowercase hex - "0000:ffff" */ ++ snprintf(pnp_usb_id, sizeof(pnp_usb_id), "%04x:%04x", iid.vendor, iid.product); ++ attrs.usb_id = pnp_usb_id; ++ attrs.product = product; ++ /* Detect device type. */ ++ attrs.flags = get_evdev_flags(fd); ++ /* Skip keyboard devices if kbdmux is enabled and EVDEV_SUPPORT is not compiled into kernel*/ ++ if (is_kbdmux && !evdev_support && (attrs.flags & ATTR_KEYBOARD)) { ++ close(fd); ++ LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n", dev_name); ++ return; ++ } ++ LogMessage(X_INFO, "config/devd: detected event input: %s, bustype=%04x, vendor=%04x, product=%04x, version=%04x\n", ++ product, iid.bustype, iid.vendor, iid.product, iid.version); ++ } else if ((rep_desc = hid_get_report_desc(fd))) { /* Is USB HID? */ ++ if (hid_is_mouse(rep_desc)) { ++ attrs.flags = ATTR_POINTER; ++ LogMessage(X_INFO, "config/devd: detected USB HID mouse\n"); ++ } else if (hid_is_collection(rep_desc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_KEYBOARD))) { ++ /* Skip keyboard devices if kbdmux is enabled */ ++ if (is_kbdmux) { ++ hid_dispose_report_desc(rep_desc); ++ close(fd); ++ LogMessage(X_INFO, "config/devd: kbdmux is enabled, ignoring device %s\n", dev_name); ++ return; ++ } ++ attrs.flags = ATTR_KEY | ATTR_KEYBOARD; ++ LogMessage(X_INFO, "config/devd: detected USB HID keyboard\n"); ++ } else if (hid_is_collection(rep_desc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_JOYSTICK)) || ++ hid_is_collection(rep_desc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_GAME_PAD))) { ++ attrs.flags = ATTR_JOYSTICK; ++ LogMessage(X_INFO, "config/devd: detected USB HID joystick\n"); ++ } else ++ LogMessage(X_INFO, "config/devd: detected USB HID of unknown type\n"); ++ hid_dispose_report_desc(rep_desc); ++ } ++ ++ if (!attrs.usb_id) { /* Is this webcamd device? */ ++ unsigned short vid, pid; ++ if (ioctl(fd, WEBCAMD_IOCTL_GET_USB_VENDOR_ID, &vid) != -1 && ++ ioctl(fd, WEBCAMD_IOCTL_GET_USB_PRODUCT_ID, &pid) != -1) { ++ snprintf(pnp_usb_id, sizeof(pnp_usb_id), "%04x:%04x", vid, pid); ++ attrs.usb_id = pnp_usb_id; ++ LogMessage(X_INFO, "config/devd: webcamd device: %s\n", pnp_usb_id); ++ } ++ } + } ++ close(fd); + -+ if (device_is_duplicate(config_info)) { -+ LogMessage(X_WARNING, "config/devd: device %s (%s) already added. " -+ "ignoring\n", attrs.product, path); -+ goto unwind; ++ /* Try to get device info via sysctl(). */ ++ if (!attrs.usb_id && !attrs.pnp_id) { ++ char sysctlname[PATH_MAX]; ++ snprintf(sysctlname, sizeof(sysctlname), "dev.%.*s.%s.%%pnpinfo", ++ (int)hwtype->dev_name_size, ++ (hwtype->dev_name + hwtype->path_offset), ++ (dev_name + hwtype->path_offset + hwtype->dev_name_size)); ++ size_t sdata_size; ++ char* sdata = sysctl_get_str(sysctlname, &sdata_size); ++ if (sdata) { ++ size_t pid_size, vid_size; ++ char* ptr_vid = devd_get_val_cstr("vendor", sdata, sdata_size, &vid_size); ++ char* ptr_pid = devd_get_val_cstr("product", sdata, sdata_size, &pid_size); ++ if (ptr_vid && ptr_pid) { /* usb_id */ ++ ptr_vid[vid_size] = 0; ++ ptr_pid[pid_size] = 0; ++ snprintf(pnp_usb_id, sizeof(pnp_usb_id), "%s:%s", ptr_vid, ptr_pid); ++ attrs.usb_id = pnp_usb_id; ++ LogMessage(X_INFO, "config/devd: [sysctl] usb_id: %s\n", pnp_usb_id); ++ } else { /* pnp_id */ ++ strlcpy(pnp_usb_id, sdata, sizeof(pnp_usb_id)); ++ attrs.pnp_id = pnp_usb_id; ++ } ++ free(sdata); ++ } + } ++ if (!attrs.vendor || !attrs.product) { ++ char sysctlname[PATH_MAX]; ++ snprintf(sysctlname, sizeof(sysctlname), "dev.%.*s.%s.%%desc", ++ (int)hwtype->dev_name_size, ++ (hwtype->dev_name + hwtype->path_offset), ++ (dev_name + hwtype->path_offset + hwtype->dev_name_size)); ++ size_t sdata_size; ++ char* sdata = sysctl_get_str(sysctlname, &sdata_size); ++ if (sdata) { ++ /* Vendor. */ ++ char* ptr_pid = memchr(sdata, ' ', sdata_size); ++ if (ptr_pid) ++ ptr_pid[0] = 0; ++ strlcpy(vendor, sdata, sizeof(vendor)); ++ attrs.vendor = vendor; ++ /* Product. */ ++ if (!attrs.product && ptr_pid) { ++ ++ptr_pid; ++ char* ptr_vid = memchr(ptr_pid, ',', (sdata_size - (ptr_pid - sdata))); ++ if (ptr_vid) ++ ptr_vid[0] = 0; ++ strlcpy(product, ptr_pid, sizeof(product)); ++ attrs.product = product; ++ } else ++ product[0] = 0; ++ free(sdata); ++ LogMessage(X_INFO, "config/devd: [sysctl] vendor: %s, product: %s\n", vendor, product); ++ } ++ } + -+ options = input_option_new(options, "config_info", config_info); -+ LogMessage(X_INFO, "config/devd: adding input device %s (%s)\n", -+ attrs.product, path); -+ -+ NewInputDeviceRequest(options, &attrs, &dev); -+ -+unwind: -+ free(config_info); -+ input_option_free_list(&options); -+ free(attrs.usb_id); -+ free(attrs.product); -+ free(attrs.device); -+ free(attrs.vendor); ++ /* Init options. */ ++ InputOption *option = NULL, *options = NULL; ++ if ((option = input_option_new(options, "_source", "server/devd"))) ++ options = option; ++ if (option && (option = input_option_new(options, "config_info", config_info))) ++ options = option; ++ if (option && (option = input_option_new(options, "name", (attrs.product ? attrs.product : dev_name)))) ++ options = option; ++ if (option && hwtype->xdriver && (option = input_option_new(options, "driver", hwtype->xdriver))) ++ options = option; ++ /* ++ * Don't pass "device" option if the keyboard is already attached to the console (ie. open() failed) ++ * This would activate a special logic in xf86-input-keyboard. Prevent any other attached to console ++ * keyboards being processed. There can be only one such device. ++ */ ++ if (option && fd >= 0 && (option = input_option_new(options, "device", dev_path))) ++ options = option; ++ /* Most drivers just use "device" but evdev also uses "path" so populate both */ ++ if (option && (option = input_option_new(options, "path", dev_path))) ++ options = option; ++ if (option) { ++ LogMessage(X_INFO, "config/devd: adding input device %s\n", dev_path); ++ DeviceIntPtr dev_iptr = NULL; ++ int rc; ++ if ((rc = NewInputDeviceRequest(options, &attrs, &dev_iptr)) != Success) ++ LogMessage(X_ERROR, "config/devd: error %d adding device %s\n", rc, dev_path); ++ } else ++ LogMessage(X_ERROR, "config/devd: error adding device %s\n", dev_path); ++ if (options) ++ input_option_free_list(&options); ++ return; +} + +static void -+device_removed(char *devname) ++device_removed(const char *dev_name, size_t dev_name_size) +{ -+ char *config_info; + -+ if (asprintf(&config_info, "devd:%s", devname) == -1) ++ if (!dev_name || !dev_name_size || dev_name_size > PATH_MAX) + return; + -+ remove_devices("devd", config_info); ++ hw_type_t hwtype_cust; ++ if (!get_dev_type_by_name(dev_name, dev_name_size) && ++ !get_dev_type_by_path(dev_name, dev_name_size, &hwtype_cust)) ++ return; /* Device not in list - unknown. */ + -+ free(config_info); ++ char config_info[PATH_MAX + 32]; ++ snprintf(config_info, sizeof(config_info), DEVD_PATH_DEV"%.*s", (int)dev_name_size, dev_name); ++ if (device_is_duplicate(config_info)) ++ LogMessage(X_INFO, "config/devd: removing input device %s\n", (config_info + DEVD_PATH_LEN)); ++ else ++ LogMessage(X_INFO, "config/devd: removing nonexistent device %s\n", (config_info + DEVD_PATH_LEN)); ++ remove_devices("devd", config_info); ++ return; +} + -+static bool is_kbdmux_enabled(void) -+{ -+ /* Xorg uses /dev/ttyv0 as a console device */ -+ /* const char device[]="/dev/console"; */ -+ const char device[]="/dev/ttyv0"; -+ keyboard_info_t info; -+ int fd; ++static void socket_handler(int fd, int ready, void *data); + -+ fd = open(device, O_RDONLY); -+ -+ if (fd < 0) -+ return false; -+ -+ if (ioctl(fd, KDGKBINFO, &info) == -1) { -+ close(fd); -+ return false; -+ } -+ -+ close(fd); -+ -+ if (!strncmp(info.kb_name, "kbdmux", 6)) -+ return true; -+ -+ return false; -+} -+ -+static void -+disconnect_devd(int sock) -+{ -+ if (sock >= 0) { -+ RemoveGeneralSocket(sock); -+ close(sock); -+ } -+} -+ +static int +connect_devd(void) +{ -+ struct sockaddr_un devd; -+ int sock; -+ -+ sock = socket(AF_UNIX, SOCK_STREAM, 0); ++ int sock = socket(AF_UNIX, SOCK_STREAM, 0); + if (sock < 0) { -+ LogMessage(X_ERROR, "config/devd: fail opening stream socket\n"); ++ LogMessage(X_ERROR, "config/devd: failed opening stream socket: %s\n", strerror(errno)); + return -1; + } + ++ struct sockaddr_un devd; + devd.sun_family = AF_UNIX; -+ strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path)); -+ -+ if (connect(sock, (struct sockaddr *) &devd, sizeof(devd)) < 0) { ++ memcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(DEVD_SOCK_PATH)); ++ if (connect(sock, (struct sockaddr*)&devd, sizeof(devd)) < 0) { ++ int error = errno; + close(sock); -+ LogMessage(X_ERROR, "config/devd: fail to connect to devd\n"); ++ LogMessage(X_ERROR, "config/devd: failed to connect to devd: %s)\n", strerror(error)); + return -1; + } + -+ AddGeneralSocket(sock); ++ SetNotifyFd(sock, socket_handler, X_NOTIFY_READ, NULL); ++ return sock; ++} + -+ return sock; ++static void ++disconnect_devd(int sock) ++{ ++ if (sock < 0) ++ return; ++ RemoveNotifyFd(sock); ++ close(sock); ++ return; +} + +static CARD32 +reconnect_handler(OsTimerPtr timer, CARD32 time, void *arg) +{ -+ int newsock; -+ -+ if ((newsock = connect_devd()) > 0) { -+ sock_devd = newsock; -+ TimerFree(rtimer); -+ rtimer = NULL; -+ LogMessage(X_INFO, "config/devd: reopening devd socket\n"); -+ return 0; -+ } -+ -+ /* Try again after RECONNECT_DELAY */ -+ return RECONNECT_DELAY; ++ devd_buf_used = 0; ++ devd_skt = connect_devd(); ++ if (devd_skt < 0) /* Try again after RECONNECT_DELAY */ ++ return RECONNECT_DELAY; ++ TimerFree(rtimer); ++ rtimer = NULL; ++ LogMessage(X_INFO, "config/devd: reopened devd socket\n"); ++ return 0; +} + -+static ssize_t -+socket_getline(int fd, char **out) ++static void ++socket_handler(int fd, int ready, void *data) +{ -+ char *buf, *newbuf; -+ ssize_t ret, cap, sz = 0; -+ char c; -+ -+ cap = 1024; -+ buf = malloc(cap * sizeof(char)); -+ if (!buf) -+ return -1; -+ -+ for (;;) { -+ ret = read(sock_devd, &c, 1); -+ if (ret < 0) { -+ if (errno == EINTR) -+ continue; -+ free(buf); -+ return -1; -+ /* EOF - devd socket is lost */ -+ } else if (ret == 0) { -+ disconnect_devd(sock_devd); -+ rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL); -+ LogMessage(X_WARNING, "config/devd: devd socket is lost\n"); -+ free(buf); -+ return -1; ++ /* Read new data. */ ++ while (1) { ++ ssize_t ios = recv(devd_skt, (devd_buf + devd_buf_used), (sizeof(devd_buf) - devd_buf_used), MSG_DONTWAIT); ++ if (ios > 0) { /* Read OK. */ ++ devd_buf_used += ios; ++ continue; /* Try to read more. */ + } -+ if (c == '\n') -+ break; -+ -+ if (sz + 1 >= cap) { -+ cap *= 2; -+ newbuf = realloc(buf, cap * sizeof(char)); -+ if (!newbuf) { -+ free(buf); -+ return -1; -+ } -+ buf = newbuf; ++ /* Something wrong. */ ++ int error = errno; ++ if (error == EAGAIN) ++ break; /* All available data read. */ ++ if (error == EINTR) ++ continue; ++ if (devd_buf_used >= sizeof(devd_buf)) { ++ devd_buf_used = 0; /* Message too long, reset buf. */ ++ continue; + } -+ buf[sz] = c; -+ sz++; ++ /* devd socket is lost */ ++ disconnect_devd(devd_skt); ++ rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL); ++ LogMessage(X_WARNING, "config/devd: devd socket read error: %s\n", strerror(error)); ++ return; + } + -+ buf[sz] = '\0'; -+ if (sz >= 0) -+ *out = buf; -+ else -+ free(buf); ++ /* Process data. */ ++ char *ptr, *line = (devd_buf + 1); ++ size_t line_size = 0; ++ while((ptr = memchr(line, '\n', (devd_buf_used - line_size)))) { ++ line_size = (ptr - line); ++ do { ++ if (*(line - 1) != DEVD_EVENT_NOTIFY) ++ break; /* Handle only notify. */ ++ /* Check: is system=DEVFS. */ ++ size_t val_size; ++ char* val = devd_get_val_cstr("system", line, line_size, &val_size); ++ if (!is_meuqual_cstr("DEVFS", val, val_size)) ++ break; ++ /* Check: is subsystem=CDEV. */ ++ val = devd_get_val_cstr("subsystem", line, line_size, &val_size); ++ if (!is_meuqual_cstr("CDEV", val, val_size)) ++ break; ++ /* Get device name. */ ++ size_t cdev_size; ++ char* cdev = devd_get_val_cstr("cdev", line, line_size, &cdev_size); ++ if (!cdev) ++ break; ++ /* Get event type. */ ++ val = devd_get_val_cstr("type", line, line_size, &val_size); ++ if (is_meuqual_cstr("CREATE", val, val_size)) { ++ device_added(cdev, cdev_size, 0); ++ } else if (is_meuqual_cstr("DESTROY", val, val_size)) { ++ device_removed(cdev, cdev_size); ++ } ++ } while(0); + -+ /* Number of bytes in the line, not counting the line break */ -+ return sz; -+} -+ -+static void -+wakeup_handler(void *data, int err, void *read_mask) -+{ -+ char *line = NULL; -+ char *walk; -+ -+ if (err < 0) -+ return; -+ -+ if (FD_ISSET(sock_devd, (fd_set *) read_mask)) { -+ if (socket_getline(sock_devd, &line) < 0) ++ line += (line_size + 2); /* Skip '\n' and event type byte. */ ++ line_size = (line - devd_buf); ++ if (devd_buf_used <= line_size) { ++ devd_buf_used = 0; + return; -+ -+ walk = strchr(line + 1, ' '); -+ if (walk != NULL) -+ walk[0] = '\0'; -+ -+ switch (*line) { -+ case DEVD_EVENT_ADD: -+ device_added(line + 1); -+ break; -+ case DEVD_EVENT_REMOVE: -+ device_removed(line + 1); -+ break; -+ default: -+ break; + } -+ free(line); + } ++ /* Save line without end marker. */ ++ if (line_size) { ++ devd_buf_used -= (line_size - 1); ++ memmove(devd_buf, (line - 1), devd_buf_used); ++ } ++ return; +} + -+static void -+block_handler(void *data, struct timeval **tv, void *read_mask) -+{ -+} -+ +int +config_devd_init(void) +{ -+ char devicename[1024]; -+ int i, j; -+ + LogMessage(X_INFO, "config/devd: probing input devices...\n"); + ++ /* Check if kernel is compiled with evdev support in hybrid drivers */ ++ evdev_support = feature_present("evdev_support"); ++ + /* + * Add fake keyboard and give up on keyboards management -+ * if kbdmux is enabled ++ * if kbdmux is enabled and not exported through evdev + */ -+ if ((is_kbdmux = is_kbdmux_enabled()) == true) -+ device_added("kbdmux"); ++ is_kbdmux = is_kbdmux_enabled(); ++ if (is_kbdmux && !evdev_support) ++ device_added("kbdmux0", 7, 1); + -+ for (i = 0; hw_types[i].driver != NULL; i++) { -+ /* First scan the sysctl to determine the hardware */ -+ for (j = 0; j < 16; j++) { -+ if (sysctl_exists(&hw_types[i], j, -+ devicename, sizeof(devicename)) != 0) -+ device_added(devicename); ++ /* Scan /dev/ for devices. */ ++ struct dirent** namelist; ++ size_t dir_cnt = scandir(_PATH_DEV, &namelist, 0, alphasort); ++ for (size_t i = 0; i < dir_cnt; ++i) { ++ struct dirent* de = namelist[i]; ++ if (is_de_euqual_cstr(de, ".") || ++ is_de_euqual_cstr(de, "..")) { ++ free(de); ++ continue; + } -+ -+ if (devpath_exists(&hw_types[i], devicename, sizeof(devicename)) != 0) -+ device_added(devicename); ++ if (de->d_type != DT_DIR) { ++ device_added(de->d_name, de->d_namlen, 0); ++ } else { /* Sub folder. */ ++ char devicename[PATH_MAX]; ++ snprintf(devicename, sizeof(devicename), _PATH_DEV "%s", de->d_name); ++ struct dirent** snamelist; ++ size_t sdir_cnt = scandir(devicename, &snamelist, 0, alphasort); ++ for (size_t j = 0; j < sdir_cnt; ++j) { ++ struct dirent* sde = snamelist[j]; ++ if (!is_de_euqual_cstr(sde, ".") && ++ !is_de_euqual_cstr(sde, "..") && ++ sde->d_type != DT_DIR) { ++ size_t tm = snprintf(devicename, sizeof(devicename), "%s/%s", de->d_name, sde->d_name); ++ device_added(devicename, tm, 0); ++ } ++ free(sde); ++ } ++ free(snamelist); ++ } ++ free(de); + } ++ free(namelist); + -+ if ((sock_devd = connect_devd()) < 0) -+ return 0; -+ -+ RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL); -+ -+ return 1; ++ devd_buf_used = 0; ++ devd_skt = connect_devd(); ++ return (devd_skt < 0) ? 0 : 1; +} + +void +config_devd_fini(void) +{ + LogMessage(X_INFO, "config/devd: terminating backend...\n"); + + if (rtimer) { + TimerFree(rtimer); + rtimer = NULL; + } + -+ disconnect_devd(sock_devd); -+ -+ RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL); -+ -+ is_console_kbd = false; ++ disconnect_devd(devd_skt); ++ return; +} Index: head/x11-servers/xorg-server/files/patch-config_udev.c =================================================================== --- head/x11-servers/xorg-server/files/patch-config_udev.c (nonexistent) +++ head/x11-servers/xorg-server/files/patch-config_udev.c (revision 526589) @@ -0,0 +1,56 @@ +* Don't pass the device parameter when using kbdmux to prevent conflict +* +* Specify a driver to use for basic devices (keyboard and mouse), otherwise none attaches +* +--- config/udev.c.orig 2017-03-15 18:05:25 UTC ++++ config/udev.c +@@ -29,6 +29,7 @@ + + #include + #include ++#include + #include + + #include "input.h" +@@ -188,7 +189,21 @@ device_added(struct udev_device *udev_de + attrs.product = strdup(name); + input_options = input_option_new(input_options, "name", name); + input_options = input_option_new(input_options, "path", path); +- input_options = input_option_new(input_options, "device", path); ++ if(strstr(path, "kbdmux") != NULL) { ++ /* ++ * Don't pass "device" option if the keyboard is already attached ++ * to the console (ie. open() fails). This would activate a special ++ * logic in xf86-input-keyboard. Prevent any other attached to console ++ * keyboards being processed. There can be only one such device. ++ */ ++ int fd = open(path, O_RDONLY); ++ if (fd > -1) { ++ close(fd); ++ input_options = input_option_new(input_options, "device", path); ++ } ++ } ++ else ++ input_options = input_option_new(input_options, "device", path); + input_options = input_option_new(input_options, "major", itoa(major(devnum))); + input_options = input_option_new(input_options, "minor", itoa(minor(devnum))); + if (path) +@@ -272,6 +287,18 @@ device_added(struct udev_device *udev_de + } + } + ++ if (attrs.flags & (ATTR_KEY | ATTR_KEYBOARD)) { ++ if (!feature_present("evdev_support")) ++ input_options = input_option_new(input_options, "driver", "kbd"); ++ } else if (attrs.flags & ATTR_POINTER) { ++ if (strstr(path, "vbox")) ++ input_options = input_option_new(input_options, "driver", "vboxmouse"); ++ else { ++ if (!feature_present("evdev_support")) ++ input_options = input_option_new(input_options, "driver", "mouse"); ++ } ++ } ++ + input_options = input_option_new(input_options, "config_info", config_info); + + /* Default setting needed for non-seat0 seats */ Property changes on: head/x11-servers/xorg-server/files/patch-config_udev.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-configure =================================================================== --- head/x11-servers/xorg-server/files/patch-configure (revision 526588) +++ head/x11-servers/xorg-server/files/patch-configure (revision 526589) @@ -1,27 +1,165 @@ ---- configure.orig 2016-07-19 17:27:31 UTC +* generated from patched configure.ac; revise and regen instead of editing +* +* Plumb the devd config backend into configure +* +* define USE_DEV_IO for ARM platforms +* +* Only run pkg-config for udev if it is not disabled to prevent over-linking +* +* Automatically use systemd/logind only on Linux +* +--- configure.orig 2017-03-15 18:05:39 UTC +++ configure -@@ -23168,9 +23168,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con +@@ -1032,6 +1032,8 @@ CONFIG_UDEV_FALSE + CONFIG_UDEV_TRUE + UDEV_LIBS + UDEV_CFLAGS ++CONFIG_DEVD_FALSE ++CONFIG_DEVD_TRUE + HAVE_SYSTEMD_DAEMON_FALSE + HAVE_SYSTEMD_DAEMON_TRUE + SYSTEMD_DAEMON_LIBS +@@ -1367,6 +1369,7 @@ enable_tslib + enable_dbe + enable_xf86bigfont + enable_dpms ++enable_config_devd + enable_config_udev + enable_config_udev_kms + enable_config_hal +@@ -2191,6 +2194,7 @@ Optional Features: + --disable-dbe Build DBE extension (default: enabled) + --enable-xf86bigfont Build XF86 Big Font extension (default: disabled) + --disable-dpms Build DPMS extension (default: enabled) ++ --enable-config-devd Build devd support (default: auto) + --enable-config-udev Build udev support (default: auto) + --enable-config-udev-kms + Build udev kms support (default: auto) +@@ -23280,9 +23284,13 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con esac GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" ;; - arm*) + arm*|aarch64*) ARM_VIDEO=yes DEFAULT_INT10="stub" + case $host_os in -+ *freebsd*) -+ $as_echo "#define USE_DEV_IO 1" >>confdefs.h -+ ;; ++ *freebsd*) $as_echo "#define USE_DEV_IO 1" >>confdefs.h ++ ;; + esac ;; i*86) I386_VIDEO=yes -@@ -26057,7 +26062,7 @@ fi - case "x$XTRANS_SEND_FDS" in - xauto) - case "$host_os" in -- linux*|solaris*) -+ linux*|solaris*|freebsd*|dragonfly*|openbsd*) - XTRANS_SEND_FDS=yes - ;; - *) +@@ -24053,6 +24061,13 @@ else + DPMSExtension=yes + fi + ++# Check whether --enable-config-devd was given. ++if test "${enable_config_devd+set}" = set; then : ++ enableval=$enable_config_devd; CONFIG_DEVD=$enableval ++else ++ CONFIG_DEVD=auto ++fi ++ + # Check whether --enable-config-udev was given. + if test "${enable_config_udev+set}" = set; then : + enableval=$enable_config_udev; CONFIG_UDEV=$enableval +@@ -25813,6 +25828,31 @@ if test "x$CONFIG_UDEV" = xyes && test " + as_fn_error $? "Hotplugging through both libudev and hal not allowed" "$LINENO" 5 + fi + ++if test "x$CONFIG_DEVD" = xauto; then ++ case $host_os in ++ *freebsd*) ++ CONFIG_DEVD=yes ++ ;; ++ *) ++ CONFIG_DEVD=no ++ ;; ++ esac ++fi ++ if test "x$CONFIG_DEVD" = xyes; then ++ CONFIG_DEVD_TRUE= ++ CONFIG_DEVD_FALSE='#' ++else ++ CONFIG_DEVD_TRUE='#' ++ CONFIG_DEVD_FALSE= ++fi ++ ++if test "x$CONFIG_DEVD" = xyes; then ++ ++$as_echo "#define CONFIG_DEVD 1" >>confdefs.h ++ ++fi ++ ++if test "x$CONFIG_UDEV" != xno; then + + pkg_failed=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UDEV" >&5 +@@ -25884,11 +25924,12 @@ else + $as_echo "yes" >&6; } + HAVE_LIBUDEV=yes + fi +-if test "x$CONFIG_UDEV" = xauto; then +- CONFIG_UDEV="$HAVE_LIBUDEV" ++ if test "x$CONFIG_UDEV" = xauto; then ++ CONFIG_UDEV="$HAVE_LIBUDEV" + + $as_echo "#define HAVE_LIBUDEV 1" >>confdefs.h + ++ fi + fi + if test "x$CONFIG_UDEV" = xyes; then + CONFIG_UDEV_TRUE= +@@ -26132,7 +26173,14 @@ fi + + if test "x$SYSTEMD_LOGIND" = xauto; then + if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then +- SYSTEMD_LOGIND=yes ++ case $host_os in ++ *linux*) ++ SYSTEMD_LOGIND=yes ++ ;; ++ *) ++ SYSTEMD_LOGIND=no ++ ;; ++ esac + else + SYSTEMD_LOGIND=no + fi +@@ -32849,17 +32897,17 @@ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER + ac_config_commands="$ac_config_commands sdksyms" + + +-if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then ++if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno && test "x$CONFIG_DEVD" = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +- *********************************************** +- Neither HAL nor udev backend will be enabled. ++ ***************************************************** ++ Neither HAL, devd, nor udev backend will be enabled. + Input device hotplugging will not be available! +- ***********************************************" >&5 ++ *****************************************************" >&5 + $as_echo "$as_me: WARNING: +- *********************************************** +- Neither HAL nor udev backend will be enabled. ++ ***************************************************** ++ Neither HAL, devd, nor udev backend will be enabled. + Input device hotplugging will not be available! +- ***********************************************" >&2;} ++ *****************************************************" >&2;} + fi + + ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/config/man/Makefile hw/dmx/doc/Makefile hw/dmx/doxygen/doxygen.conf hw/dmx/doxygen/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/dmx/man/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/src/Makefile hw/xwayland/Makefile test/Makefile test/xi1/Makefile test/xi2/Makefile xserver.ent xorg-server.pc" +@@ -33122,6 +33170,10 @@ if test -z "${HAVE_SYSTEMD_DAEMON_TRUE}" + as_fn_error $? "conditional \"HAVE_SYSTEMD_DAEMON\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${CONFIG_DEVD_TRUE}" && test -z "${CONFIG_DEVD_FALSE}"; then ++ as_fn_error $? "conditional \"CONFIG_DEVD\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + if test -z "${CONFIG_UDEV_TRUE}" && test -z "${CONFIG_UDEV_FALSE}"; then + as_fn_error $? "conditional \"CONFIG_UDEV\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_Makefile.in =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_Makefile.in (nonexistent) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_Makefile.in (revision 526589) @@ -0,0 +1,14 @@ +* Don't overwrite Xorg binary with Xorg.sh when SUID_WRAPPER_DIR == bindir +* Instead, relink bin/X to Xorg.wrap rather than to Xorg (which isn't Xorg.sh) +* +--- hw/xfree86/Makefile.in.orig 2017-03-16 05:24:43 UTC ++++ hw/xfree86/Makefile.in +@@ -1156,7 +1156,7 @@ install-exec-hook: + @INSTALL_SETUID_TRUE@ chmod u+s $(DESTDIR)$(bindir)/Xorg + @SUID_WRAPPER_TRUE@ $(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR) + @SUID_WRAPPER_TRUE@ mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg +-@SUID_WRAPPER_TRUE@ ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg ++@SUID_WRAPPER_TRUE@ (test ! -f $(DESTDIR)$(bindir)/Xorg && ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg || cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg.wrap$(EXEEXT) X) + @SUID_WRAPPER_TRUE@ -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap + + uninstall-local: Property changes on: head/x11-servers/xorg-server/files/patch-hw_xfree86_Makefile.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c (revision 526589) @@ -1,23 +1,27 @@ ---- hw/xfree86/common/xf86AutoConfig.c.orig 2017-01-11 20:00:58 UTC +* Try using modesetting driver before falling back to scfb or vesa +* +* Use our scfb driver as fallback instead of Linux's fbdev +* +--- hw/xfree86/common/xf86AutoConfig.c.orig 2017-03-15 18:05:25 UTC +++ hw/xfree86/common/xf86AutoConfig.c -@@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[] - i += xf86PciMatchDriver(&matches[i], nmatches - i); +@@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv + xf86PciMatchDriver(md); #endif -#if defined(__linux__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) - matches[i++] = xnfstrdup("modesetting"); + xf86AddMatchedDriver(md, "modesetting"); #endif -@@ -285,8 +285,10 @@ listPossibleVideoDrivers(char *matches[] - if (i < (nmatches - 1)) { +@@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv + /* Fallback to platform default frame buffer driver */ #if !defined(__linux__) && defined(__sparc__) - matches[i++] = xnfstrdup("wsfb"); + xf86AddMatchedDriver(md, "wsfb"); -#else +#elif defined(__linux__) - matches[i++] = xnfstrdup("fbdev"); + xf86AddMatchedDriver(md, "fbdev"); +#elif defined(__FreeBSD__) -+ matches[i++] = xnfstrdup("scfb"); ++ xf86AddMatchedDriver(md, "scfb"); #endif - } #endif /* !__sun */ + Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Config.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Config.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Config.c (revision 526589) @@ -1,20 +1,22 @@ ---- hw/xfree86/common/xf86Config.c.orig 2016-07-19 17:14:30 UTC +* Select the devd config backend if it is activated +* +--- hw/xfree86/common/xf86Config.c.orig 2017-03-15 18:05:25 UTC +++ hw/xfree86/common/xf86Config.c -@@ -1410,13 +1410,16 @@ checkCoreInputDevices(serverLayoutPtr se +@@ -1375,13 +1375,16 @@ checkCoreInputDevices(serverLayoutPtr se } if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) { -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \ -+ defined(CONFIG_DEVD) ++ defined(CONFIG_DEVD) const char *config_backend; #if defined(CONFIG_HAL) config_backend = "HAL"; #elif defined(CONFIG_UDEV) config_backend = "udev"; +#elif defined(CONFIG_DEVD) + config_backend = "devd"; #else config_backend = "wscons"; #endif Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Globals.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Globals.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Globals.c (revision 526589) @@ -1,12 +1,14 @@ ---- hw/xfree86/common/xf86Globals.c.orig 2016-07-19 17:07:29 UTC +* Include devd in the set of config backends +* +--- hw/xfree86/common/xf86Globals.c.orig 2017-03-15 18:05:25 UTC +++ hw/xfree86/common/xf86Globals.c -@@ -122,7 +122,8 @@ xf86InfoRec xf86Info = { +@@ -119,7 +119,8 @@ xf86InfoRec xf86Info = { + .miscModInDevEnabled = TRUE, + .miscModInDevAllowNonLocal = FALSE, .pmFlag = TRUE, - .disableRandR = FALSE, - .randRFrom = X_DEFAULT, -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \ + defined(CONFIG_DEVD) .forceInputDevices = FALSE, .autoAddDevices = TRUE, .autoEnableDevices = TRUE, Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86Xinput.c (revision 526589) @@ -1,19 +1,21 @@ ---- hw/xfree86/common/xf86Xinput.c.orig 2016-07-19 17:07:29 UTC +* Recognize devd backend as a source of auto-configured devices +* +--- hw/xfree86/common/xf86Xinput.c.orig 2017-03-15 18:05:25 UTC +++ hw/xfree86/common/xf86Xinput.c -@@ -841,7 +841,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D +@@ -871,7 +871,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, D { InputDriverPtr drv = NULL; DeviceIntPtr dev = NULL; - Bool paused; + Bool paused = 0; int rval; char *path = NULL; -@@ -996,6 +996,7 @@ NewInputDeviceRequest(InputOption *optio +@@ -1034,6 +1034,7 @@ NewInputDeviceRequest(InputOption *optio if (strcmp(key, "_source") == 0 && (strcmp(value, "server/hal") == 0 || strcmp(value, "server/udev") == 0 || + strcmp(value, "server/devd") == 0 || strcmp(value, "server/wscons") == 0)) { is_auto = 1; if (!xf86Info.autoAddDevices) { Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c (revision 526588) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_bsd__init.c (revision 526589) @@ -1,12 +1,65 @@ ---- hw/xfree86/os-support/bsd/bsd_init.c.orig 2016-07-19 17:07:29 UTC +--- hw/xfree86/os-support/bsd/bsd_init.c.orig 2017-03-15 18:05:25 UTC +++ hw/xfree86/os-support/bsd/bsd_init.c -@@ -230,6 +230,9 @@ xf86OpenConsole() +@@ -48,6 +48,8 @@ static int devConsoleFd = -1; + #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) + static int VTnum = -1; + static int initialVT = -1; ++static struct termios tty_attr; /* tty state to restore */ ++static int tty_mode; /* kbd mode to restore */ + #endif + + #ifdef PCCONS_SUPPORT +@@ -230,6 +232,9 @@ xf86OpenConsole() * Add cases for other *BSD that behave the same. */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#if defined(__sparc64__) + pci_system_init_dev_mem(fd); +#endif uname(&uts); i = atof(uts.release) * 100; if (i >= 310) +@@ -253,6 +258,7 @@ xf86OpenConsole() + #endif + acquire_vt: + if (!xf86Info.ShareVTs) { ++ struct termios nTty; + /* + * now get the VT + */ +@@ -287,6 +293,26 @@ xf86OpenConsole() + if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) { + FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed"); + } ++ ++ tcgetattr(xf86Info.consoleFd, &tty_attr); ++ ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode); ++ ++ /* disable special keys */ ++ if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) { ++ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed (%s)", ++ strerror(errno)); ++ } ++ ++ nTty = tty_attr; ++ nTty.c_iflag = IGNPAR | IGNBRK; ++ nTty.c_oflag = 0; ++ nTty.c_cflag = CREAD | CS8; ++ nTty.c_lflag = 0; ++ nTty.c_cc[VTIME] = 0; ++ nTty.c_cc[VMIN] = 1; ++ cfsetispeed(&nTty, 9600); ++ cfsetospeed(&nTty, 9600); ++ tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); + } + else { /* xf86Info.ShareVTs */ + close(xf86Info.consoleFd); +@@ -594,6 +620,8 @@ xf86CloseConsole() + case SYSCONS: + case PCVT: + ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode */ ++ ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode); ++ tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); + if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) { + VT.mode = VT_AUTO; + ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */ Index: head/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c =================================================================== --- head/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c (nonexistent) +++ head/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c (revision 526589) @@ -0,0 +1,27 @@ +* Skip the detection of root rights requirement, the assumption that presence +* of KMS drivers removes the root requirement is only valid for Linux +* +--- hw/xfree86/xorg-wrapper.c.orig 2017-03-15 18:05:25 UTC ++++ hw/xfree86/xorg-wrapper.c +@@ -188,9 +188,6 @@ static int on_console(int fd) + + int main(int argc, char *argv[]) + { +-#ifdef WITH_LIBDRM +- struct drm_mode_card_res res; +-#endif + char buf[PATH_MAX]; + int i, r, fd; + int kms_cards = 0; +@@ -227,9 +224,10 @@ int main(int argc, char *argv[]) + } + } + +-#ifdef WITH_LIBDRM ++#if defined(WITH_LIBDRM) && defined(__linux__) + /* Detect if we need root rights, except when overriden by the config */ + if (needs_root_rights == -1) { ++ struct drm_mode_card_res res; + for (i = 0; i < 16; i++) { + snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, i); + fd = open(buf, O_RDWR); Property changes on: head/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-include_dix-config.h.in =================================================================== --- head/x11-servers/xorg-server/files/patch-include_dix-config.h.in (nonexistent) +++ head/x11-servers/xorg-server/files/patch-include_dix-config.h.in (revision 526589) @@ -0,0 +1,14 @@ +* Add a define which will be toggled by configure when devd backend is activated +* +--- include/dix-config.h.in.orig 2017-03-15 18:05:25 UTC ++++ include/dix-config.h.in +@@ -433,6 +433,9 @@ + /* Support D-Bus */ + #undef HAVE_DBUS + ++/* Use devd for input hotplug */ ++#undef CONFIG_DEVD ++ + /* Use libudev for input hotplug */ + #undef CONFIG_UDEV + Property changes on: head/x11-servers/xorg-server/files/patch-include_dix-config.h.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-test_xtest.c =================================================================== --- head/x11-servers/xorg-server/files/patch-test_xtest.c (nonexistent) +++ head/x11-servers/xorg-server/files/patch-test_xtest.c (revision 526589) @@ -0,0 +1,17 @@ +--- test/xtest.c.orig 2019-04-30 16:40:02.828913000 -0700 ++++ test/xtest.c 2019-04-30 16:40:42.769713000 -0700 +@@ -59,10 +59,10 @@ + static void + xtest_init_devices(void) + { +- ScreenRec screen = {0}; +- ClientRec server_client = {0}; +- WindowRec root = {0}; +- WindowOptRec optional = {0}; ++ ScreenRec screen = {{0}}; ++ ClientRec server_client = {{0}}; ++ WindowRec root = {{0}}; ++ WindowOptRec optional = {{0}}; + + /* random stuff that needs initialization */ + root.drawable.id = 0xab; Property changes on: head/x11-servers/xorg-server/files/patch-test_xtest.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/files/patch-xkb_Makefile.in =================================================================== --- head/x11-servers/xorg-server/files/patch-xkb_Makefile.in (revision 526588) +++ head/x11-servers/xorg-server/files/patch-xkb_Makefile.in (revision 526589) @@ -1,11 +1,16 @@ ---- xkb/Makefile.in.orig 2017-01-19 15:20:42 UTC +* Skip installing a README into a directory which is actually a symlink created +* by another port. If this file is installed, then upon uninstall pkg will +* delete the directory under the symlink, which would cause a reinstall to fail +* as the target directory is not remade until reinstalling the other port +* +--- xkb/Makefile.in.orig 2017-03-16 05:24:43 UTC +++ xkb/Makefile.in -@@ -878,7 +878,7 @@ info: info-am +@@ -886,7 +886,7 @@ info: info-am info-am: -install-data-am: install-dist_xkbcompiledDATA +install-data-am: install-dvi: install-dvi-am Index: head/x11-servers/xorg-server/files/pkg-deinstall.in =================================================================== --- head/x11-servers/xorg-server/files/pkg-deinstall.in (revision 526588) +++ head/x11-servers/xorg-server/files/pkg-deinstall.in (revision 526589) Property changes on: head/x11-servers/xorg-server/files/pkg-deinstall.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/x11-servers/xorg-server/files/pkg-install.in =================================================================== --- head/x11-servers/xorg-server/files/pkg-install.in (revision 526588) +++ head/x11-servers/xorg-server/files/pkg-install.in (revision 526589) Property changes on: head/x11-servers/xorg-server/files/pkg-install.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/x11-servers/xorg-server/files/xkb_Makefile.am =================================================================== --- head/x11-servers/xorg-server/files/xkb_Makefile.am (nonexistent) +++ head/x11-servers/xorg-server/files/xkb_Makefile.am (revision 526589) @@ -0,0 +1,13 @@ +* Skip installing a README into a directory which is actually a symlink created +* by another port. If this file is installed, then upon uninstall pkg will +* delete the directory under the symlink, which would cause a reinstall to fail +* as the target directory is not remade until reinstalling the other port +* +--- xkb/Makefile.am.orig 2017-03-16 05:24:43 UTC ++++ xkb/Makefile.am +@@ -39,4 +39,4 @@ libxkbstubs_la_SOURCES = ddxVT.c ddxPriv + EXTRA_DIST = xkbDflts.h xkbgeom.h xkb.h + + xkbcompileddir = $(XKB_COMPILED_DIR) +-dist_xkbcompiled_DATA = README.compiled ++#dist_xkbcompiled_DATA = README.compiled Property changes on: head/x11-servers/xorg-server/files/xkb_Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/x11-servers/xorg-server/pkg-message =================================================================== --- head/x11-servers/xorg-server/pkg-message (nonexistent) +++ head/x11-servers/xorg-server/pkg-message (revision 526589) @@ -0,0 +1,26 @@ +[ +{ type: install + message: < # $FreeBSD$ PORTNAME= xorg-vfbserver -PORTVERSION= 1.19.1 PORTEPOCH= 1 COMMENT= X virtual framebuffer server from X.Org LICENSE= MIT MASTERDIR= ${.CURDIR}/../xorg-server DESCR= ${.CURDIR}/pkg-descr -DISTINFO_FILE= ${.CURDIR}/distinfo -PATCHDIR= ${.CURDIR}/files SLAVE_PORT= yes -OPTIONS_EXCLUDE=DEVD HAL SUID UDEV -USE_XORG= xfont2 - CONFIGURE_ARGS+=--enable-xvfb --disable-dmx --disable-xephyr --disable-xnest \ --disable-xwayland PLIST_FILES= bin/Xvfb man/man1/Xvfb.1.gz - -EXTRA_PATCHES= ${MASTERDIR}/files/patch-CVE-2017-12176 \ - ${MASTERDIR}/files/patch-CVE-2017-12177 \ - ${MASTERDIR}/files/patch-CVE-2017-12178 \ - ${MASTERDIR}/files/patch-CVE-2017-12179 \ - ${MASTERDIR}/files/patch-CVE-2017-12183 \ - ${MASTERDIR}/files/patch-CVE-2017-1218x \ - ${MASTERDIR}/files/patch-CVE-2017-1218y \ - ${MASTERDIR}/files/patch-CVE-2017-13721 \ - ${MASTERDIR}/files/patch-CVE-2017-13723 \ - ${MASTERDIR}/files/patch-os_io.c do-install: cd ${WRKSRC}/hw/vfb; DESTDIR=${STAGEDIR} ${MAKE} install .include "${MASTERDIR}/Makefile" Index: head/x11-servers/xwayland/distinfo =================================================================== --- head/x11-servers/xwayland/distinfo (revision 526588) +++ head/x11-servers/xwayland/distinfo (nonexistent) @@ -1,3 +0,0 @@ -TIMESTAMP = 1484388904 -SHA256 (xorg/xserver/xorg-server-1.19.1.tar.bz2) = 79ae2cf39d3f6c4a91201d8dad549d1d774b3420073c5a70d390040aa965a7fb -SIZE (xorg/xserver/xorg-server-1.19.1.tar.bz2) = 6041792 Property changes on: head/x11-servers/xwayland/distinfo ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/x11-servers/xwayland/Makefile =================================================================== --- head/x11-servers/xwayland/Makefile (revision 526588) +++ head/x11-servers/xwayland/Makefile (revision 526589) @@ -1,51 +1,31 @@ # $FreeBSD$ PORTNAME= xwayland -PORTVERSION= 1.19.1 -# This is inherited from x11-servers/xorg-server -# Ensure it does not go backwards when bumping -PORTREVISION= 11 COMMENT= X Clients under Wayland LICENSE= MIT BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/wayland-protocols.pc:graphics/wayland-protocols \ ${LOCALBASE}/include/linux/input.h:devel/evdev-proto LIB_DEPENDS= libwayland-client.so:graphics/wayland \ libinput.so:x11/libinput CONFLICTS_INSTALL= ${PORTNAME}-devel MASTERDIR= ${.CURDIR}/../xorg-server DESCR= ${.CURDIR}/pkg-descr -DISTINFO_FILE= ${.CURDIR}/distinfo -PATCHDIR= ${.CURDIR}/files SLAVE_PORT= yes -OPTIONS_EXCLUDE=DEVD HAL SUID UDEV - -USE_XORG= x11 xext xfont2 +USE_XORG= x11 xext USE_GL+= egl gbm -CONFIGURE_ARGS+= --disable-docs --disable-devel-docs \ - --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \ - --disable-xquartz --disable-xwin +CONFIGURE_ARGS+=--disable-dmx --disable-xephyr --disable-xnest --disable-xvfb \ + --enable-xwayland --with-default-xkb-ruleset=evdev PLIST_FILES= bin/Xwayland - -EXTRA_PATCHES= ${MASTERDIR}/files/patch-CVE-2017-12176 \ - ${MASTERDIR}/files/patch-CVE-2017-12177 \ - ${MASTERDIR}/files/patch-CVE-2017-12178 \ - ${MASTERDIR}/files/patch-CVE-2017-12179 \ - ${MASTERDIR}/files/patch-CVE-2017-12183 \ - ${MASTERDIR}/files/patch-CVE-2017-1218x \ - ${MASTERDIR}/files/patch-CVE-2017-1218y \ - ${MASTERDIR}/files/patch-CVE-2017-13721 \ - ${MASTERDIR}/files/patch-CVE-2017-13723 \ - ${MASTERDIR}/files/patch-os_io.c do-install: cd ${WRKSRC}/hw/xwayland; DESTDIR=${STAGEDIR} ${MAKE_CMD} install .include "${MASTERDIR}/Makefile"