mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Semicolon in filenames
@ 2016-01-22  0:31 Ladislav Michl
  2016-01-22  7:18 ` Uwe Kleine-König
  2016-01-22  8:06 ` [ptxdist] Semicolon " Michael Olbrich
  0 siblings, 2 replies; 7+ messages in thread
From: Ladislav Michl @ 2016-01-22  0:31 UTC (permalink / raw)
  To: ptxdist

Now I'm going to be honest. Previous patch 'Add usb-modeswitch-data package'
break things - 'ptxdist images' fails as ':' is used as delimiter in perms file.
Patch bellow escapes semicolon on producer side, anyone cares about consumer?

	ladis

diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 5ba404e..8e6664b 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -209,6 +209,7 @@ install directory:
 
     install -m "${mod_nfs}" -d "${ndirs[@]/%/${dir}}" &&
     install -m "${mod}" -o "${usr}" -g "${grp}" -d "${pdirs[@]/%/${dir}}" &&
+    dir="$(echo ${dir} | sed -e 's/[:]/\\:/g')" &&
 
     echo "f:${dir}:${usr}:${grp}:${mod}" >> "${pkg_xpkg_perms}" ||
     ptxd_install_error "install_dir failed!"
@@ -343,6 +344,9 @@ Usually, just remove the 6th parameter and everything works fine.
     # now change to requested user and group
     chown "${usr}:${grp}" "${pdirs[@]/%/${dst}}" &&
 
+    # escape semicolon
+    dst="$(echo ${dst} | sed -e 's/[:]/\\:/g')" &&
+
     echo "f:${dst}:${usr}:${grp}:${mod}" >> "${pkg_xpkg_perms}"
 }
 export -f ptxd_install_file_impl
@@ -413,6 +417,7 @@ install device node:
 	mknod -m "${mod}" "${d}" "${type}" ${major} ${minor} || return
     done &&
     chown "${usr}:${grp}" "${pdirs[@]/%/${dst}}" &&
+    dst="$(echo ${dst} | sed -e 's/[:]/\\:/g')" &&
 
     echo "n:${dst}:${usr}:${grp}:${mod}:${type}:${major}:${minor}" >> "${pkg_xpkg_perms}"
 }

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-13 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22  0:31 [ptxdist] Semicolon in filenames Ladislav Michl
2016-01-22  7:18 ` Uwe Kleine-König
2016-01-22  8:10   ` [ptxdist] Colons " Ladislav Michl
2016-01-22  8:06 ` [ptxdist] Semicolon " Michael Olbrich
2016-02-03 22:05   ` [ptxdist] [RFC] Colons " Ladislav Michl
2016-02-10 17:23     ` Michael Olbrich
2016-07-13 10:24       ` Ladislav Michl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox