[ptxdist] [PATCH 1/2] install_replace_figlet: allow escaping the figlet output

2017-11-30 Thread Roland Hieber
All known gettys in PTXdist allow inserting variables into /etc/issue by
prefixing certain characters with backslashes (e.g. a literal '\v'
expands to the kernel version from uname -v). In this case, '\'s in the
figlet output must be escaped accordingly so they are displayed as '\'s
on the screen.

For readability, refactor the code into a new local function. Then
add a new parameter describing the escape mode ('etcissue' or none, the
default) as a new, fifth parameter to install_replace_figlet. Currently,
install_replace_figlet is only used in rootfs.make on /etc/issue, and
the chance that we break existing code with the new default should be
small.

Signed-off-by: Roland Hieber 
---
 rules/post/install.make   |  4 +++-
 scripts/lib/ptxd_make_xpkg_pkg.sh | 20 ++--
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/rules/post/install.make b/rules/post/install.make
index c40e36eb6..c0e24569e 100644
--- a/rules/post/install.make
+++ b/rules/post/install.make
@@ -301,14 +301,16 @@ install_replace = \
 # $2: filename
 # $3: placeholder
 # $4: value
+# $5: escape mode (empty or 'etcissue')
 #
 install_replace_figlet = \
XPKG=$(subst _,-,$(strip $(1)));
\
FILE=$(strip $(2)); 
\
PLACEHOLDER=$(strip $(3));  
\
VALUE=$(strip $(4));
\
+   ESCAPEMODE=$(strip $(5));   
\
$(call install_check, install_replace); 
\
-   echo "ptxd_install_replace_figlet '$$FILE' '$$PLACEHOLDER' '$$VALUE'" 
>> "$(STATEDIR)/$$XPKG.cmds"
+   echo "ptxd_install_replace_figlet '$$FILE' '$$PLACEHOLDER' '$$VALUE' 
'$$ESCAPEMODE'" >> "$(STATEDIR)/$$XPKG.cmds"
 
 #
 # install_script_replace
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh 
b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 4efc31630..eb3452e3a 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -567,6 +567,7 @@ ptxd_install_replace_figlet() {
 local dst="$1"
 local placeholder="$2"
 local value="$3"
+local escapemode="$4"
 local -a dirs ndirs pdirs sdirs ddirs
 local mod_nfs mod_rw
 
@@ -578,8 +579,23 @@ install replace figlet:
 " &&
 
 ptxd_exist "${dirs[@]/%/${dst}}" &&
-figlet="$(figlet -d "${PTXDIST_SYSROOT_HOST}/share/figlet" -- "${value}" | 
\
-   awk '{ gsub("", "`"); if ($0 !~ "^ *$") printf("%s\\n", $0) }')" && 
#`
+ptxd_figlet_helper() {
+local value="$1"
+local escapemode="$2"
+figlet -d "${PTXDIST_SYSROOT_HOST}/share/figlet" -- "${value}" | \
+case "$escapemode" in
+# a lot of leaning toothpicks because we need to escape a literal
+# '\' with '\\' on multiple levels:
+# - one level for the string inside awk:  -> 

+# - one level for the shell string after sed -e:  -> 
+# - one level for the s expression inside sed:-> \\
+# - and finally, one level for /etc/issue:-> \
+etcissue)  awk '{ gsub("", ""); print }' ;;
+*) ;;
+esac | \
+awk '{ if ($0 !~ "^ *$") printf("%s\\n", $0) }'  # newlines for sed
+} &&
+figlet="$(ptxd_figlet_helper "$value" "$escapemode")" &&
 sed -i -e "s#${placeholder}#${figlet}#g" "${dirs[@]/%/${dst}}" ||
 
 ptxd_install_error "install_replace failed!"
-- 
2.15.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 2/2] rootfs: correctly escape /etc/issue figlets

2017-11-30 Thread Roland Hieber
Use install_replace_figlet's newly introduced 'getty' escape mode to
escape '\' with '\\' and prevent any possible variable interpolation
when /etc/issue is displayed by getty.

Signed-off-by: Roland Hieber 
---
 rules/rootfs.make | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/rules/rootfs.make b/rules/rootfs.make
index 81d4cd93a..ef5bba7df 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -194,10 +194,12 @@ ifdef PTXCONF_ROOTFS_ISSUE
$(call remove_quotes,$(PTXCONF_ROOTFS_ETC_HOSTNAME)))
@$(call install_replace_figlet, rootfs, /etc/issue, \
@FIGLET:VENDOR@, \
-   `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_PROJECT_VENDOR)`)
+   `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< $(PTXCONF_PROJECT_VENDOR)`, 
\
+   etcissue)
@$(call install_replace_figlet, rootfs, /etc/issue, \
@FIGLET:HOSTNAME@, \
-   `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< 
$(PTXCONF_ROOTFS_ETC_HOSTNAME)`)
+   `sed -r 's/ ?([\.:;,]) ?/ \1 /' <<< 
$(PTXCONF_ROOTFS_ETC_HOSTNAME)`, \
+   etcissue)
 endif
 
 ifdef PTXCONF_ROOTFS_HOSTS
-- 
2.15.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 0/2] improve type design in the login banner

2017-11-30 Thread Roland Hieber
Every time I look at the login prompt, the banner looks a bit off. It's
not much, but it's enough for me to notice and sigh internally at the
unroundness and leakiness of the letters, and I find the letters a bit
hard to parse.

The reason for this appearance is that backslashes in the banner output
are replaced by backticks when it is written to /etc/issue, probably as
a quick-fix to avoid variable expansion by getty.

This patch series brings the login banner back to its usual appearance.
Judge for yourself:

Before:
 _   _
|  _ ` ___ _ __   __ _ _   _| |_ _ __ ___  _ __ (_)_  __
| |_) / _ ` '_ ` / _` | | | | __| '__/ _ `| '_ `| ` `/ /
|  __/  __/ | | | (_| | |_| | |_| | | (_) | | | | |>  <
|_|   `___|_| |_|`__, |`__,_|`__|_|  `___/|_| |_|_/_/`_`
 |___/
   _ _ _  ___ _
|  _ `(_)___| |_ _ __ ___ | |/ (_) |_
| | | | / __| __| '__/ _ `| ' /| | __|
| |_| | `__ ` |_| | | (_) | . `| | |_
|/|_|___/`__|_|  `___/|_|`_`_|`__|

After:
 _   _
|  _ \ ___ _ __   __ _ _   _| |_ _ __ ___  _ __ (_)_  __
| |_) / _ \ '_ \ / _` | | | | __| '__/ _ \| '_ \| \ \/ /
|  __/  __/ | | | (_| | |_| | |_| | | (_) | | | | |>  <
|_|   \___|_| |_|\__, |\__,_|\__|_|  \___/|_| |_|_/_/\_\
 |___/
   _ _ _  ___ _
|  _ \(_)___| |_ _ __ ___ | |/ (_) |_
| | | | / __| __| '__/ _ \| ' /| | __|
| |_| | \__ \ |_| | | (_) | . \| | |_
|/|_|___/\__|_|  \___/|_|\_\_|\__|


Roland Hieber (2):
  install_replace_figlet: allow escaping the figlet output
  rootfs: correctly escape /etc/issue figlets

 rules/post/install.make   |  4 +++-
 rules/rootfs.make |  6 --
 scripts/lib/ptxd_make_xpkg_pkg.sh | 20 ++--
 3 files changed, 25 insertions(+), 5 deletions(-)

-- 
2.15.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] libdrm: version bump 2.4.82 -> 2.4.88

2017-11-30 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 rules/libdrm.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/libdrm.make b/rules/libdrm.make
index 77e7ed7b6..169d98c12 100644
--- a/rules/libdrm.make
+++ b/rules/libdrm.make
@@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_LIBDRM) += libdrm
 #
 # Paths and names
 #
-LIBDRM_VERSION := 2.4.82
-LIBDRM_MD5 := dd8ef01f9eadadfce3b99ef4053e9655
+LIBDRM_VERSION := 2.4.88
+LIBDRM_MD5 := 090c1a93d92a1549df2514de0566cd50
 LIBDRM := libdrm-$(LIBDRM_VERSION)
 LIBDRM_SUFFIX  := tar.gz
 LIBDRM_URL := http://dri.freedesktop.org/libdrm/$(LIBDRM).$(LIBDRM_SUFFIX)
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] mesalib: version bump 17.1.3 -> 17.2.6

2017-11-30 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 rules/mesalib.in   | 1 +
 rules/mesalib.make | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/rules/mesalib.in b/rules/mesalib.in
index 2f60ce75d..458d7ee02 100644
--- a/rules/mesalib.in
+++ b/rules/mesalib.in
@@ -14,6 +14,7 @@ menuconfig MESALIB
select UDEV if MESALIB_UDEV
select UDEV_LIBUDEV if MESALIB_UDEV
select WAYLAND  if MESALIB_EGL_WAYLAND
+   select WAYLAND_PROTOCOLSif MESALIB_EGL_WAYLAND
select LIBDRM_RADEONif MESALIB_DRI_R200
select LIBDRM_RADEONif MESALIB_DRI_R300
select LIBDRM_RADEONif MESALIB_DRI_R600
diff --git a/rules/mesalib.make b/rules/mesalib.make
index 268ef4f1c..6f2431206 100644
--- a/rules/mesalib.make
+++ b/rules/mesalib.make
@@ -19,8 +19,8 @@ PACKAGES-$(PTXCONF_MESALIB) += mesalib
 #
 # Paths and names
 #
-MESALIB_VERSION:= 17.1.3
-MESALIB_MD5:= 1946a93d543bc219427e2bebe2ac4752
+MESALIB_VERSION:= 17.2.6
+MESALIB_MD5:= 862f2b7e2a08554570b192a89f723b6f
 MESALIB:= mesa-$(MESALIB_VERSION)
 MESALIB_SUFFIX := tar.xz
 MESALIB_URL:= \
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] v4l-utils: version bump 1.12.2 -> 1.12.5

2017-11-30 Thread Philipp Zabel
Signed-off-by: Philipp Zabel 
---
 rules/v4l-utils.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/v4l-utils.make b/rules/v4l-utils.make
index 587165428..f08749541 100644
--- a/rules/v4l-utils.make
+++ b/rules/v4l-utils.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_V4L_UTILS) += v4l-utils
 #
 # Paths and names
 #
-V4L_UTILS_VERSION  := 1.12.2
-V4L_UTILS_MD5  := 13a3fde0f30bca32bc4e55fb371174ba
+V4L_UTILS_VERSION  := 1.12.5
+V4L_UTILS_MD5  := 98ade56409bb1beb665c9cf2e4d99592
 V4L_UTILS  := v4l-utils-$(V4L_UTILS_VERSION)
 V4L_UTILS_SUFFIX   := tar.bz2
 V4L_UTILS_URL  := 
http://linuxtv.org/downloads/v4l-utils/$(V4L_UTILS).$(V4L_UTILS_SUFFIX)
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] systemd: add missing input-id rule

2017-11-30 Thread Philipp Zabel
Without this, udev does not tag input devices with ID_INPUT variables,
which causes libinput to ignore them.

For example, when starting weston:

  event0  - Logitech USB-PS/2 Optical Mouse: not tagged as supported input 
device
  event0  - not using input device '/dev/input/event0'
  event1  - gpio-keys: not tagged as supported input device
  event1  - not using input device '/dev/input/event1'
  event2  - HID 046a:0023: not tagged as supported input device
  event2  - not using input device '/dev/input/event2'
  warning: no input devices on entering Weston. Possible causes:
- no permissions to read /dev/input/event*
- seats misconfigured (Weston backend option 'seat', udev device 
property ID_SEAT)
  failed to create input devices

Signed-off-by: Philipp Zabel 
---
 rules/systemd.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/systemd.make b/rules/systemd.make
index 468e547b7..d2b55606e 100644
--- a/rules/systemd.make
+++ b/rules/systemd.make
@@ -226,6 +226,7 @@ SYSTEMD_UDEV_HELPER-$(PTXCONF_SYSTEMD_UDEV_MTD_PROBE)   
+= mtd_probe
 
 SYSTEMD_UDEV_RULES-y := \
50-udev-default.rules \
+   60-input-id.rules \
60-persistent-alsa.rules \
60-persistent-input.rules \
60-persistent-storage-tape.rules \
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de