Skip to contentSkip to conversation

xorg: fix imput drivers install paths

PATCH New Yann E. MORIN 3 participants 10 messages Oct 24, 2016 – Oct 25, 2016

lore
Share & tools
lore
#0 lore raw

cover xorg: fix imput drivers install paths

Hello All!

This series fixes the install paths of the few remaining input drivers that incorrectly installed headers in $(TARGET_DIR)/$(STAGING_DIR).

The underlying issue is that xorg defines an "sdkdir" pkg-config variable, as the location to find/install headers. This location is an absolute path to the staging dir (aka sysroot), but headers are installed in $(DESTDIR)/$(sdkdir).

We fix that by entirely ditching the use of sdkdir, as was done in all other xorg dirvers, with the 5 first patches of the series.

Additionally, to catch such situation, the 6th and last patch of the series checks no such paths are present, neither in target/ nor in staging/ .

Regards,
Yann E. MORIN.

The following changes since commit 90e38737a699a25f577684742c767375e74683c5

uclibc: fix pthread.h (2016-10-24 14:50:00 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to 705884038a0fa0824f162280fc1ac2adfd6f03d7

core/pkg-generic: check proper package installation (2016-10-24 18:05:23 +0200)

----------------------------------------------------------------
Yann E. MORIN (6):
package/xdriver_xf86-input-evdev: fix install paths package/xdriver_xf86-input-joystick: fix install paths package/xdriver_xf86-input-libinput: fix install paths package/xdriver_xf86-input-mouse: fix install paths package/xdriver_xf86-input-synaptics: fix install paths core/pkg-generic: check proper package installation

 package/pkg-generic.mk                             | 15 ++++
 .../0001-build-get-rid-of-sdkdir.patch             | 87 +++++++++++++++++++++
 .../xdriver_xf86-input-evdev.mk                    |  2 +
 .../0001-build-get-rid-of-sdkdir.patch             | 78 +++++++++++++++++++
 .../xdriver_xf86-input-joystick.mk                 |  1 +
 .../0001-build-get-rid-of-sdkdir.patch             | 78 +++++++++++++++++++
 .../xdriver_xf86-input-libinput.mk                 |  1 +
 .../0001-build-get-rid-of-sdkdir.patch             | 81 ++++++++++++++++++++
 .../xdriver_xf86-input-mouse.mk                    |  1 +
 .../0001-build-get-rid-of-sdkdir.patch             | 88 ++++++++++++++++++++++
 .../xdriver_xf86-input-synaptics.mk                |  1 +
 11 files changed, 433 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-input-evdev/0001-build-get-rid-of-sdkdir.patch
 create mode 100644 package/x11r7/xdriver_xf86-input-joystick/0001-build-get-rid-of-sdkdir.patch
 create mode 100644 package/x11r7/xdriver_xf86-input-libinput/0001-build-get-rid-of-sdkdir.patch
 create mode 100644 package/x11r7/xdriver_xf86-input-mouse/0001-build-get-rid-of-sdkdir.patch
 create mode 100644 package/x11r7/xdriver_xf86-input-synaptics/0001-build-get-rid-of-sdkdir.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/6 package/xdriver_xf86-input-evdev: fix install paths

Get rid of the borked sdkdir variable.

Fixes (partially):

    https://bugs.busybox.net/show_bug.cgi?id=8696
Reported-by buildroot at netsolux.ch
Cc buildroot at netsolux.ch
Cc Gustavo Zacarias <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 .../0001-build-get-rid-of-sdkdir.patch             | 87 ++++++++++++++++++++++
 .../xdriver_xf86-input-evdev.mk                    |  2 +
 2 files changed, 89 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-input-evdev/0001-build-get-rid-of-sdkdir.patch
package/x11r7/xdriver_xf86-input-evdev/0001-build-get-rid-of-sdkdir.patch new file +87 -0
new file mode 100644
index 0000000..b342295
@@ -0,0 +1,87 @@
+From 1ad5e1593556f767150c2ca75176453bee4771e6 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Sun, 23 Oct 2016 22:00:10 +0200
+Subject: [PATCH] build: get rid of sdkdir
+
+Use of sdkdir causes problems during cross-compilation, where the full
+path is then appended to the DESTDIR, leading to host paths being
+appended in the target:
+    https://bugs.busybox.net/show_bug.cgi?id=8696
+
+Other drivers (e.g. keyboard) got rid of sdkdir. Do the same.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ Makefile.am         |  4 ----
+ configure.ac        |  9 ---------
+ include/Makefile.am |  5 ++++-
+ xorg-evdev.pc.in    | 10 ++++++++--
+ 4 files changed, 12 insertions(+), 16 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1cc3ea6..1ae042a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -18,10 +18,6 @@
+ #  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.
+ 
+-
+-# Provide an sdk location that is writable by the evdev module
+-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
+-
+ SUBDIRS = src man include
+ MAINTAINERCLEANFILES = ChangeLog INSTALL
+ 
+diff --git a/configure.ac b/configure.ac
+index e4887a3..4adfa43 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -66,15 +66,6 @@ AC_ARG_WITH(xorg-conf-dir,
+             [xorgconfdir="$prefix/share/X11/xorg.conf.d"])
+ AC_SUBST(xorgconfdir)
+ 
+-# X Server SDK location is required to install evdev header files
+-# This location is also relayed in the xorg-evdev.pc file
+-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
+-
+-# Workaround overriding sdkdir to be able to create a tarball when user has no
+-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
+-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
+-AC_SUBST([sdkdir])
+-
+ DRIVER_NAME=evdev
+ AC_SUBST([DRIVER_NAME])
+ 
+diff --git a/include/Makefile.am b/include/Makefile.am
+index 0e3fc1b..afc96ed 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -1 +1,4 @@
+-sdk_HEADERS = evdev-properties.h
++# location formerly known as 'sdkdir':
++xorgincludedir = $(includedir)/xorg
++
++xorginclude_HEADERS = evdev-properties.h
+diff --git a/xorg-evdev.pc.in b/xorg-evdev.pc.in
+index 20710a6..fcbf511 100644
+--- a/xorg-evdev.pc.in
++++ b/xorg-evdev.pc.in
+@@ -1,6 +1,12 @@
+-sdkdir=@sdkdir@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++datarootdir=@datarootdir@
++moduledir=@moduledir@
++sysconfigdir=@sysconfigdir@
+ 
+ Name: xorg-evdev
+ Description: X.Org evdev input driver.
+ Version: @PACKAGE_VERSION@
+-Cflags: -I${sdkdir}
++Cflags: -I${includedir}/xorg
+-- 
+2.7.4
+
package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk +2 -0
index 606f1be..9ec893b 100644
@@ -9,6 +9,8 @@ XDRIVER_XF86_INPUT_EVDEV_SOURCE = xf86-input-evdev-$(XDRIVER_XF86_INPUT_EVDEV_VE
 XDRIVER_XF86_INPUT_EVDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver
 XDRIVER_XF86_INPUT_EVDEV_LICENSE = MIT
 XDRIVER_XF86_INPUT_EVDEV_LICENSE_FILES = COPYING
+XDRIVER_XF86_INPUT_EVDEV_AUTORECONF = YES
+
 XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = \
 	host-pkgconf \
 	libevdev \
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/6 package/xdriver_xf86-input-joystick: fix install paths

In reply to Yann E. MORIN

Get rid of the borked sdkdir variable.

Fixes (partially):

    https://bugs.busybox.net/show_bug.cgi?id=8696
Reported-by buildroot at netsolux.ch
Cc buildroot at netsolux.ch
Cc Gustavo Zacarias <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 .../0001-build-get-rid-of-sdkdir.patch             | 78 ++++++++++++++++++++++
 .../xdriver_xf86-input-joystick.mk                 |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-input-joystick/0001-build-get-rid-of-sdkdir.patch
package/x11r7/xdriver_xf86-input-joystick/0001-build-get-rid-of-sdkdir.patch new file +78 -0
new file mode 100644
index 0000000..a611f15
@@ -0,0 +1,78 @@
+From 2826691dcd01f470d30dc8eb3bbd24a96cd3a93c Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Sun, 23 Oct 2016 22:29:29 +0200
+Subject: [PATCH] build: get rid of sdkdir
+
+Use of sdkdir causes problems during cross-compilation, where the full
+path is then appended to the DESTDIR, leading to host paths being
+appended in the target:
+    https://bugs.busybox.net/show_bug.cgi?id=8696
+
+Other drivers (e.g. keyboard) got rid of sdkdir. Do the same.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ Makefile.am         | 1 -
+ configure.ac        | 9 ---------
+ include/Makefile.am | 5 ++++-
+ xorg-joystick.pc.in | 2 +-
+ 4 files changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 13946b8..c1567ae 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -18,7 +18,6 @@
+ #  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.
+ 
+-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir=\$${includedir}/xorg
+ SUBDIRS = src man config include
+ MAINTAINERCLEANFILES = ChangeLog INSTALL
+ 
+diff --git a/configure.ac b/configure.ac
+index b5834a5..44b9d27 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -66,15 +66,6 @@ AC_ARG_WITH(xorg-module-dir,
+ inputdir=${moduledir}/input
+ AC_SUBST(inputdir)
+ 
+-# Define a configure option for an alternate X Server SDK Headers
+-# X Server SDK location is required to install joystick header files
+-AC_ARG_WITH(sdkdir,
+-            AS_HELP_STRING([--with-sdkdir=<path>],
+-                           [Xorg X Server sdk headers (default is autodetected)]),
+-            [sdkdir="$withval"],
+-            [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`])
+-AC_SUBST(sdkdir)
+-
+ # Define a configure option to enable code debugging
+ AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug],
+                                     [Disable debugging code (default: enabled)]),
+diff --git a/include/Makefile.am b/include/Makefile.am
+index ed618c2..d656568 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -18,4 +18,7 @@
+ #  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.
+ 
+-sdk_HEADERS = joystick-properties.h
++# Location formerly known as 'sdkdir'
++xorgincludedir = $(includedir)/xorg
++
++xorginclude_HEADERS = joystick-properties.h
+diff --git a/xorg-joystick.pc.in b/xorg-joystick.pc.in
+index 76bb92f..a5972c7 100644
+--- a/xorg-joystick.pc.in
++++ b/xorg-joystick.pc.in
+@@ -4,4 +4,4 @@ includedir=@includedir@
+ Name: xorg-joystick
+ Description: X.Org joystick input driver.
+ Version: @PACKAGE_VERSION@
+-Cflags: -I${includedir}
++Cflags: -I${includedir}/xorg
+-- 
+2.7.4
+
package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk +1 -0
index 2696e2b..76f2577 100644
@@ -10,6 +10,7 @@ XDRIVER_XF86_INPUT_JOYSTICK_SITE = http://xorg.freedesktop.org/releases/individu
 XDRIVER_XF86_INPUT_JOYSTICK_LICENSE = MIT
 XDRIVER_XF86_INPUT_JOYSTICK_LICENSE_FILES = COPYING
 XDRIVER_XF86_INPUT_JOYSTICK_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto
+XDRIVER_XF86_INPUT_JOYSTICK_AUTORECONF = YES
 
 define XDRIVER_XF86_INPUT_JOYSTICK_CONF
 	$(INSTALL) -m 0644 -D \
Signature · 1 line
2.7.4
#3 lore raw

PATCH 3/6 package/xdriver_xf86-input-libinput: fix install paths

In reply to Yann E. MORIN

Get rid of the borked sdkdir variable.

Fixes (partially):

    https://bugs.busybox.net/show_bug.cgi?id=8696
Reported-by buildroot at netsolux.ch
Cc buildroot at netsolux.ch
Cc Gustavo Zacarias <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 .../0001-build-get-rid-of-sdkdir.patch             | 78 ++++++++++++++++++++++
 .../xdriver_xf86-input-libinput.mk                 |  1 +
 2 files changed, 79 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-input-libinput/0001-build-get-rid-of-sdkdir.patch
package/x11r7/xdriver_xf86-input-libinput/0001-build-get-rid-of-sdkdir.patch new file +78 -0
new file mode 100644
index 0000000..2f9784c
@@ -0,0 +1,78 @@
+From 1b2cf6e6c2640e08166af36eee775542a45325af Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Sun, 23 Oct 2016 22:36:40 +0200
+Subject: [PATCH] build: get rid of sdkdir
+
+Use of sdkdir causes problems during cross-compilation, where the full
+path is then appended to the DESTDIR, leading to host paths being
+appended in the target:
+    https://bugs.busybox.net/show_bug.cgi?id=8696
+
+Other drivers (e.g. keyboard) got rid of sdkdir. Do the same.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ Makefile.am         | 2 --
+ configure.ac        | 8 --------
+ include/Makefile.am | 4 +++-
+ xorg-libinput.pc.in | 5 +++--
+ 4 files changed, 6 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index a447d61..7aa5523 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,8 +19,6 @@
+ #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ 
+ 
+-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
+-
+ SUBDIRS = src include man test
+ MAINTAINERCLEANFILES = ChangeLog INSTALL
+ 
+diff --git a/configure.ac b/configure.ac
+index 9894817..fe198cb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -63,14 +63,6 @@ AC_ARG_WITH(xorg-conf-dir,
+             [xorgconfdir='${prefix}/share/X11/xorg.conf.d'])
+ AC_SUBST(xorgconfdir)
+ 
+-# X Server SDK location is required to install header files
+-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
+-
+-# Workaround overriding sdkdir to be able to create a tarball when user has no
+-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
+-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
+-AC_SUBST([sdkdir])
+-
+ DRIVER_NAME=libinput
+ AC_SUBST([DRIVER_NAME])
+ 
+diff --git a/include/Makefile.am b/include/Makefile.am
+index 0d52b9b..271ffac 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -1 +1,3 @@
+-sdk_HEADERS = libinput-properties.h
++# Location formerly known as 'sdkdir'
++xorgincludedir = $(includedir)/xorg
++xorginclude_HEADERS = libinput-properties.h
+diff --git a/xorg-libinput.pc.in b/xorg-libinput.pc.in
+index ff98189..9c0f506 100644
+--- a/xorg-libinput.pc.in
++++ b/xorg-libinput.pc.in
+@@ -1,6 +1,7 @@
+-sdkdir=@sdkdir@
++prefix=@prefix@
++includedir=@includedir@
+ 
+ Name: xorg-libinput
+ Description: X.Org libinput input driver.
+ Version: @PACKAGE_VERSION@
+-Cflags: -I${sdkdir}
++Cflags: -I${includedir}/xorg
+-- 
+2.7.4
+
package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk +1 -0
index c096032..eacacea 100644
@@ -10,5 +10,6 @@ XDRIVER_XF86_INPUT_LIBINPUT_SITE = http://xorg.freedesktop.org/releases/individu
 XDRIVER_XF86_INPUT_LIBINPUT_LICENSE = MIT
 XDRIVER_XF86_INPUT_LIBINPUT_LICENSE_FILES = COPYING
 XDRIVER_XF86_INPUT_LIBINPUT_DEPENDENCIES = libinput xserver_xorg-server xproto_inputproto xproto_xproto
+XDRIVER_XF86_INPUT_LIBINPUT_AUTORECONF = YES
 
 $(eval $(autotools-package))
Signature · 1 line
2.7.4
#4 lore raw

PATCH 4/6 package/xdriver_xf86-input-mouse: fix install paths

In reply to Yann E. MORIN

Get rid of the borked sdkdir variable.

Fixes (partially):

    https://bugs.busybox.net/show_bug.cgi?id=8696
Reported-by buildroot at netsolux.ch
Cc buildroot at netsolux.ch
Cc Gustavo Zacarias <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 .../0001-build-get-rid-of-sdkdir.patch             | 81 ++++++++++++++++++++++
 .../xdriver_xf86-input-mouse.mk                    |  1 +
 2 files changed, 82 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-input-mouse/0001-build-get-rid-of-sdkdir.patch
package/x11r7/xdriver_xf86-input-mouse/0001-build-get-rid-of-sdkdir.patch new file +81 -0
new file mode 100644
index 0000000..d5f97f9
@@ -0,0 +1,81 @@
+From aef3d9bca4d77db833f71d50b1c84b16c69d7deb Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Sun, 23 Oct 2016 22:53:21 +0200
+Subject: [PATCH] build: get rid of sdkdir
+
+Use of sdkdir causes problems during cross-compilation, where the full
+path is then appended to the DESTDIR, leading to host paths being
+appended in the target:
+    https://bugs.busybox.net/show_bug.cgi?id=8696
+
+Other drivers (e.g. keyboard) got rid of sdkdir. Do the same.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ Makefile.am         |  3 ---
+ configure.ac        | 10 ----------
+ include/Makefile.am |  4 +++-
+ xorg-mouse.pc.in    |  3 +--
+ 4 files changed, 4 insertions(+), 16 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 7142485..efe66cb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -34,9 +34,6 @@ ChangeLog:
+ 
+ dist-hook: ChangeLog INSTALL
+ 
+-# Provide an sdk location that is writable by this module
+-DISTCHECK_CONFIGURE_FLAGS = --with-sdkdir='$${includedir}/xorg'
+-
+ if LINT
+ # Check source code with tools like lint & sparse
+ lint:
+diff --git a/configure.ac b/configure.ac
+index 15d9047..515681d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -60,16 +60,6 @@ AC_ARG_WITH(xorg-module-dir,
+ inputdir=${moduledir}/input
+ AC_SUBST(inputdir)
+ 
+-# X Server SDK location is required to install xf86-mouse-properties.h
+-# This location is also relayed in the xorg-mouse.pc file
+-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
+-
+-# Workaround overriding sdkdir to be able to create a tarball when user has no
+-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
+-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
+-AC_SUBST([sdkdir])
+-
+-
+ # Work out which OS mouse driver we need to build
+ case $host_os in
+   linux*)
+diff --git a/include/Makefile.am b/include/Makefile.am
+index 27ce0fb..2b85e4e 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -1 +1,3 @@
+-sdk_HEADERS = xf86-mouse-properties.h
++# Location formerly known as 'sdkdir'
++xorgincludedir = $(includedir)/xorg
++xorginclude_HEADERS = xf86-mouse-properties.h
+diff --git a/xorg-mouse.pc.in b/xorg-mouse.pc.in
+index 57df596..8355e61 100644
+--- a/xorg-mouse.pc.in
++++ b/xorg-mouse.pc.in
+@@ -1,6 +1,7 @@ prefix=@prefix@
+-sdkdir=@sdkdir@
++prefix=@prefix@
++includedir=@includedir@
+ 
+ Name: xorg-mouse
+ Description: X.Org mouse input driver for non-evdev OS'es
+ Version: @PACKAGE_VERSION@
+-Cflags: -I${sdkdir}
++Cflags: -I${includedir}/xorg
+-- 
+2.7.4
+
package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk +1 -0
index 0e19467..e1bd81a 100644
@@ -10,5 +10,6 @@ XDRIVER_XF86_INPUT_MOUSE_SITE = http://xorg.freedesktop.org/releases/individual/
 XDRIVER_XF86_INPUT_MOUSE_LICENSE = MIT
 XDRIVER_XF86_INPUT_MOUSE_LICENSE_FILES = COPYING
 XDRIVER_XF86_INPUT_MOUSE_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto
+XDRIVER_XF86_INPUT_MOUSE_AUTORECONF = YES
 
 $(eval $(autotools-package))
Signature · 1 line
2.7.4
#5 lore raw

PATCH 5/6 package/xdriver_xf86-input-synaptics: fix install paths

In reply to Yann E. MORIN

Get rid of the borked sdkdir variable.

Fixes (partially):

    https://bugs.busybox.net/show_bug.cgi?id=8696
Reported-by buildroot at netsolux.ch
Cc buildroot at netsolux.ch
Cc Gustavo Zacarias <[email protected]>
Cc Thomas Petazzoni <[email protected]>
---
 .../0001-build-get-rid-of-sdkdir.patch             | 88 ++++++++++++++++++++++
 .../xdriver_xf86-input-synaptics.mk                |  1 +
 2 files changed, 89 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-input-synaptics/0001-build-get-rid-of-sdkdir.patch
package/x11r7/xdriver_xf86-input-synaptics/0001-build-get-rid-of-sdkdir.patch new file +88 -0
new file mode 100644
index 0000000..62950b0
@@ -0,0 +1,88 @@
+From 231a35e99fee8aba23f18cce21dfb5fa8bef0c36 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <[email protected]>
+Date: Sun, 23 Oct 2016 23:07:33 +0200
+Subject: [PATCH] build: get rid of sdkdir
+
+Use of sdkdir causes problems during cross-compilation, where the full
+path is then appended to the DESTDIR, leading to host paths being
+appended in the target:
+    https://bugs.busybox.net/show_bug.cgi?id=8696
+
+Other drivers (e.g. keyboard) got rid of sdkdir. Do the same.
+
+Signed-off-by: "Yann E. MORIN" <[email protected]>
+---
+ Makefile.am          | 1 -
+ configure.ac         | 9 ---------
+ include/Makefile.am  | 4 +++-
+ xorg-synaptics.pc.in | 5 +++--
+ 4 files changed, 6 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 678124c..c48c5c8 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,7 +21,6 @@
+ # During distcheck, system locations (as provided by pkg-config) may
+ # not be writable; provide instead relative locations.
+ DISTCHECK_CONFIGURE_FLAGS = \
+-	--with-sdkdir='$${includedir}/xorg' \
+ 	--with-xorg-conf-dir='$${datadir}/X11/xorg.conf.d'
+ 
+ SUBDIRS = include src man tools conf
+diff --git a/configure.ac b/configure.ac
+index 970dd5f..574353b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,11 +55,6 @@ XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
+ # Obtain compiler/linker options for the Synaptics driver dependencies
+ PKG_CHECK_MODULES(XORG, [inputproto >= 2.1.99.3] [xorg-server >= 1.12] xproto inputproto $REQUIRED_MODULES)
+ 
+-# X Server SDK location is required to install Synaptics header files
+-# This location is also relayed in the xorg-synaptics.pc file
+-sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
+-AC_SUBST([sdkdir])
+-
+ # -----------------------------------------------------------------------------
+ #			Configuration options
+ # -----------------------------------------------------------------------------
+@@ -154,10 +149,6 @@ if test "x$have_libxtst" = "xyes" ; then
+ fi
+ # -----------------------------------------------------------------------------
+ 
+-# Workaround overriding sdkdir to be able to create a tarball when user has no
+-# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
+-AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
+-
+ AC_CONFIG_FILES([Makefile
+                 src/Makefile
+                 man/Makefile
+diff --git a/include/Makefile.am b/include/Makefile.am
+index 8234020..565868b 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -18,4 +18,6 @@
+ #  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.
+ 
+-sdk_HEADERS = synaptics-properties.h
++# Location formerly known as 'sdkdir'
++xorgincludedir = $(includedir)/xorg
++xorginclude_HEADERS = synaptics-properties.h
+diff --git a/xorg-synaptics.pc.in b/xorg-synaptics.pc.in
+index 159cfbf..68e0fbe 100644
+--- a/xorg-synaptics.pc.in
++++ b/xorg-synaptics.pc.in
+@@ -1,6 +1,7 @@
+-sdkdir=@sdkdir@
++prefix=@prefix@
++includedir=@includedir@
+ 
+ Name: synaptics
+ Description: X.Org synaptics input driver.
+ Version: @PACKAGE_VERSION@
+-Cflags: -I${sdkdir}
++Cflags: -I${includedir}/xorg
+-- 
+2.7.4
+
package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk +1 -0
index b6ade4c..d6164d0 100644
@@ -10,5 +10,6 @@ XDRIVER_XF86_INPUT_SYNAPTICS_SITE = http://xorg.freedesktop.org/releases/individ
 XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE = MIT
 XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE_FILES = COPYING
 XDRIVER_XF86_INPUT_SYNAPTICS_DEPENDENCIES = libevdev xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto mtdev
+XDRIVER_XF86_INPUT_SYNAPTICS_AUTORECONF = YES
 
 $(eval $(autotools-package))
Signature · 1 line
2.7.4
#6 lore raw

PATCH 6/6 core/pkg-generic: check proper package installation

In reply to Yann E. MORIN

Some packages misbehave, and install files in either $(STAGING_DIR)/$(O) or in $(TARGET_DIR)/$(O) .

One common reason for that is that pkgconf now prepends the sysroot path to all the paths it returns. Other reasons vary, but are mostly due to poorly writen generic-packages.

And a new step hooks to check that no file gets installed in either location, called after the install-target and install-staging steps.

Cc Thomas Petazzoni <[email protected]>
Cc Romain Naour <[email protected]>
---
 package/pkg-generic.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/pkg-generic.mk +15 -0
index e726ac5..7fb0517 100644
@@ -95,6 +95,21 @@ define check_host_rpath
 endef
 GLOBAL_INSTRUMENTATION_HOOKS += check_host_rpath
 
+define step_check_build_dir_one
+	if [ -d $(2) ]; then \
+		printf "%s: installs files in %s\n" $(1) $(2) >&2; \
+		exit 1; \
+	fi
+endef
+
+define step_check_build_dir
+	$(if $(filter install-staging,$(2)),\
+		$(if $(filter end,$(1)),$(call step_check_build_dir_one,$(3),$(STAGING_DIR)/$(O))))
+	$(if $(filter install-target,$(2)),\
+		$(if $(filter end,$(1)),$(call step_check_build_dir_one,$(3),$(TARGET_DIR)/$(O))))
+endef
+GLOBAL_INSTRUMENTATION_HOOKS += step_check_build_dir
+
 # User-supplied script
 ifneq ($(BR2_INSTRUMENTATION_SCRIPTS),)
 define step_user
Signature · 1 line
2.7.4
#7 lore raw

cover xorg: fix imput drivers install paths

In reply to Yann E. MORIN
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Hello All!
This series fixes the install paths of the few remaining input drivers that incorrectly installed headers in $(TARGET_DIR)/$(STAGING_DIR).

Quoted 7 lines

The underlying issue is that xorg defines an "sdkdir" pkg-config variable, as the location to find/install headers. This location is an absolute path to the staging dir (aka sysroot), but headers are installed in $(DESTDIR)/$(sdkdir).

We fix that by entirely ditching the use of sdkdir, as was done in all other xorg dirvers, with the 5 first patches of the series.

Sounds sensible to me. Did you try proposing the patches upstream?

Quoted 3 lines

Additionally, to catch such situation, the 6th and last patch of the series checks no such paths are present, neither in target/ nor in staging/ .

This seems to overlap with the checks Samuel is adding,
E.G. TARGET_DIR/STAGING_DIR are subdirs of the host build directory, so that check should catch these issues as well.

Signature · 1 line
Bye, Peter Korsgaard
#8 lore raw

cover xorg: fix imput drivers install paths

Hello,

Quoted 4 lines · Peter Korsgaard
Quoted 2 lines

We fix that by entirely ditching the use of sdkdir, as was done in all other xorg dirvers, with the 5 first patches of the series.

Sounds sensible to me. Did you try proposing the patches upstream?

Yes, Yann was about to do this, we were discussing his cover letter for upstream yesterday evening.

Quoted 7 lines
Quoted 3 lines

Additionally, to catch such situation, the 6th and last patch of the series checks no such paths are present, neither in target/ nor in staging/ .

This seems to overlap with the checks Samuel is adding,
E.G. TARGET_DIR/STAGING_DIR are subdirs of the host build directory, so that check should catch these issues as well.

Hum, are you sure it's checking the same thing? Yann is checking that $(TARGET_DIR)/$(O) and $(STAGING_DIR)/$(O) don't exist.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#9 lore raw

cover xorg: fix imput drivers install paths

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hi,

Quoted 4 lines
Quoted 1 line

Sounds sensible to me. Did you try proposing the patches upstream?

Yes, Yann was about to do this, we were discussing his cover letter for upstream yesterday evening.

Ok, great.

Quoted 6 lines
Quoted 3 lines

This seems to overlap with the checks Samuel is adding,
E.G. TARGET_DIR/STAGING_DIR are subdirs of the host build directory, so that check should catch these issues as well.

Hum, are you sure it's checking the same thing? Yann is checking that $(TARGET_DIR)/$(O) and $(STAGING_DIR)/$(O) don't exist.

I was of the understanding that this was what the proposed leak-of-host-paths check was supposed to check, yes. Samuel?

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard