* [PATCH 1/2] xinput-calibrator: avoid defunct process
@ 2020-08-28 20:08 Mark Asselstine
2020-08-28 20:08 ` [PATCH 2/2] xinput-calibrator: make _once run only once Mark Asselstine
2020-08-28 20:32 ` ✗ patchtest: failure for "xinput-calibrator: avoid defun..." and 1 more Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Mark Asselstine @ 2020-08-28 20:08 UTC (permalink / raw)
To: openembedded-core
The xinput_calibrator_once.sh script produces output on stdout and
stderr which the current 'Exec' doesn't consume. This results in a
[xinput_calibrator_once.sh] defunct process which will remain around
until we exit the X11 session.
Add a redirect to the Exec which will consume this output and avoid
the defunct process.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
.../recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index 4f831932e7..c59f97895c 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -31,7 +31,7 @@ do_install_append() {
install -m 0755 ${WORKDIR}/30xinput_calibrate.sh ${D}${sysconfdir}/X11/Xsession.d/
install -d ${D}${sysconfdir}/xdg/autostart
- sed -e 's,^Exec=.*,Exec=${bindir}/xinput_calibrator_once.sh,' ${S}/scripts/xinput_calibrator.desktop > ${D}${sysconfdir}/xdg/autostart/xinput_calibrator.desktop
+ sed -e 's,^Exec=.*,Exec=${bindir}/sh -c "${bindir}/xinput_calibrator_once.sh 2>\&1 > /dev/null",' ${S}/scripts/xinput_calibrator.desktop > ${D}${sysconfdir}/xdg/autostart/xinput_calibrator.desktop
}
FILES_${PN} += "${sysconfdir}/xdg/autostart"
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] xinput-calibrator: make _once run only once
2020-08-28 20:08 [PATCH 1/2] xinput-calibrator: avoid defunct process Mark Asselstine
@ 2020-08-28 20:08 ` Mark Asselstine
2020-08-28 20:32 ` ✗ patchtest: failure for "xinput-calibrator: avoid defun..." and 1 more Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Mark Asselstine @ 2020-08-28 20:08 UTC (permalink / raw)
To: openembedded-core
If no calibratable devices are found then no calibration is
written. With no configuration file created each and every login will
result in a fresh attempt to perform calibrations, which is
undesirable for many reasons. Since HW doesn't change often we are
better off writing an 'empty' calibration file to avoid further
attempts to perform calibration. If new HW is added the file can
simply be removed to force a new calibration attempt.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
...r_pointercal.sh-allow-skipping-calib.patch | 32 +++++++++++++++++++
.../xinput-calibrator_git.bb | 1 +
2 files changed, 33 insertions(+)
create mode 100644 meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal.sh-allow-skipping-calib.patch
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal.sh-allow-skipping-calib.patch b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal.sh-allow-skipping-calib.patch
new file mode 100644
index 0000000000..a7fade3428
--- /dev/null
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal.sh-allow-skipping-calib.patch
@@ -0,0 +1,32 @@
+From d89d5e25a805d5ccc6d9fb2245da45cdc6b5ac33 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Fri, 28 Aug 2020 14:48:40 -0400
+Subject: [PATCH] xinput_calibrator_pointercal.sh: allow skipping calibration
+
+If no suitable devices are found then no configuration file will be
+written. This results in a new attempt to perform calibration on every
+login. Instead we write an "empty" file with just some brief
+instructions on how to force a new calibration. This will result in a
+calibration attempt only being run on the first login (future logins
+have things end with the sourcing of an empty config only).
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ scripts/xinput_calibrator_pointercal.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
+index 0ada7da..a331af1 100755
+--- a/scripts/xinput_calibrator_pointercal.sh
++++ b/scripts/xinput_calibrator_pointercal.sh
+@@ -41,4 +41,7 @@ CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep ' xinput set'
+ if [ ! -z "$CALDATA" ] ; then
+ echo $CALDATA > $CALFILE
+ echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
++else
++ echo "# Delete this file to force xinput_calibrator to redo calibration" > $CALFILE
++ echo "Created $CALFILE as an empty calibration file, no devices found."
+ fi
+--
+2.27.0
+
diff --git a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index c59f97895c..6f4ea03958 100644
--- a/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/tias/xinput_calibrator.git \
file://30xinput_calibrate.sh \
file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
file://0001-calibrator.hh-Include-string-to-get-std-string.patch \
+ file://xinput_calibrator_pointercal.sh-allow-skipping-calib.patch \
"
S = "${WORKDIR}/git"
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ patchtest: failure for "xinput-calibrator: avoid defun..." and 1 more
2020-08-28 20:08 [PATCH 1/2] xinput-calibrator: avoid defunct process Mark Asselstine
2020-08-28 20:08 ` [PATCH 2/2] xinput-calibrator: make _once run only once Mark Asselstine
@ 2020-08-28 20:32 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-08-28 20:32 UTC (permalink / raw)
To: Mark Asselstine; +Cc: openembedded-core
== Series Details ==
Series: "xinput-calibrator: avoid defun..." and 1 more
Revision: 1
URL : https://patchwork.openembedded.org/series/25842/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format]
Suggested fix Add Upstream-Status: <Valid status> to the header of meta/recipes-graphics/xinput-calibrator/xinput-calibrator/xinput_calibrator_pointercal.sh-allow-skipping-calib.patch
Standard format Upstream-Status: <Valid status>
Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-28 20:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-28 20:08 [PATCH 1/2] xinput-calibrator: avoid defunct process Mark Asselstine
2020-08-28 20:08 ` [PATCH 2/2] xinput-calibrator: make _once run only once Mark Asselstine
2020-08-28 20:32 ` ✗ patchtest: failure for "xinput-calibrator: avoid defun..." and 1 more Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.