makedevs: allow leading whitespace for capabilities
PATCH 1/2 makedevs: allow leading whitespace for capabilities
Currently makedevs silently ignores extended attributes with leading whitespace, for example those added to a <PACKAGE>_PERMISSIONS following the recommended style from check-package.
Makedevs already ignores leading whitespace for normal entries (file permission changes and device files creation). Do the same for extended attributes.
--- package/makedevs/makedevs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/makedevs/makedevs.c +1 -1
@@ -510,7 +510,7 @@ int main(int argc, char **argv) linenum++; -if (1 ==sscanf (line,"|xattr %254s" , xattr)) { +if (1 ==sscanf (line," |xattr %254s" , xattr)) {#ifdef EXTENDED_ATTRIBUTES if (!full_name)bb_error_msg_and_die ("line %d should be after a file\n" , linenum);
Signature · 1 line
2.17.1
PATCH 2/2 support/testing: add test for file capabilities
---
complete run on GitLab CI on top of 2018.02.4 with the series applied:
https://gitlab.com/RicardoMartincoski/buildroot/pipelines/27226377
only the test on top of 2018.02.4:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985431
only the test on top of 2018.05.1:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985455
only the test on top of 2018.08-rc1:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985484
--- .gitlab-ci.yml | 1 + support/testing/tests/core/device_table2.txt | 7 +++ .../tests/core/squashfs-xattr-kernel.config | 1 + .../tests/core/test_file_capabilities.py | 47 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 support/testing/tests/core/device_table2.txt create mode 100644 support/testing/tests/core/squashfs-xattr-kernel.config create mode 100644 support/testing/tests/core/test_file_capabilities.py
.gitlab-ci.yml +1 -0
@@ -237,6 +237,7 @@ zynq_zybo_defconfig: *defconfig tests.boot.test_atf.TestATFAllwinner: *runtime_test tests.boot.test_atf.TestATFMarvell: *runtime_test tests.boot.test_atf.TestATFVexpress: *runtime_test +tests.core.test_file_capabilities.TestFileCapabilities: *runtime_test tests.core.test_post_scripts.TestPostScripts: *runtime_test tests.core.test_rootfs_overlay.TestRootfsOverlay: *runtime_test tests.core.test_timezone.TestGlibcAllTimezone: *runtime_test
support/testing/tests/core/device_table2.txt new file +7 -0
@@ -0,0 +1,7 @@ +# <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count> +/usr/sbin/getcap f 755 0 0 - - - - - +|xattr cap_sys_nice+eip +# leading spaces are ignored for xattr + |xattr cap_kill+eip +# leading tabs are ignored for xattr + |xattr cap_sys_time+eip
support/testing/tests/core/squashfs-xattr-kernel.config new file +1 -0
@@ -0,0 +1 @@ +CONFIG_SQUASHFS_XATTR=y
support/testing/tests/core/test_file_capabilities.py new file +47 -0
47 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 2/2 support/testing: add test for file capabilities
Hello,
Please notice this test case could be applied to master or next, but it will fail until we fix #11216.
On Mon, Aug 06, 2018 at 12:17 AM, Ricardo Martincoski wrote:
[snip]
Quoted 2 lines
complete run on GitLab CI on top of 2018.02.4 with the series applied:
https://gitlab.com/RicardoMartincoski/buildroot/pipelines/27226377
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985522
passed, #11191 fixed
Quoted 2 lines
only the test on top of 2018.02.4:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985431
failed, detects #11191
Quoted 2 lines
only the test on top of 2018.05.1:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985455
failed, detects #11216
Quoted 2 lines
only the test on top of 2018.08-rc1:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985484
failed, detects #11216
Regards,
Ricardo
PATCH 2/2 support/testing: add test for file capabilities
In reply to Ricardo MartincoskiQuoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ricardo" == Ricardo Martincoski <[email protected]> writes:
Signed-off-by Ricardo Martincoski <[email protected]>---
complete run on GitLab CI on top of 2018.02.4 with the series applied:
https://gitlab.com/RicardoMartincoski/buildroot/pipelines/27226377
Quoted 8 lines
only the test on top of 2018.02.4:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985431only the test on top of 2018.05.1:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985455only the test on top of 2018.08-rc1:
https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/86985484
I know it fails on master, but then we are atleast aware of it, so:
Committed to master, and then backported to 2018.02.x and 2018.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 makedevs: allow leading whitespace for capabilities
In reply to Ricardo MartincoskiHello Ricardo,
Quoted 8 lines · Ricardo Martincoski
Currently makedevs silently ignores extended attributes with leading whitespace, for example those added to a <PACKAGE>_PERMISSIONS following the recommended style from check-package.
Makedevs already ignores leading whitespace for normal entries (file permission changes and device files creation). Do the same for extended attributes.
Quoted 6 lines
Fixes #11191.Reported-by Jean-pierre Cartal <[email protected]>Signed-off-by Ricardo Martincoski <[email protected]>Cc Arnout Vandecappelle <[email protected]>Cc Thomas Petazzoni <[email protected]>
It is not clear to me why you have the "2018.02.x" prefix in your patch title. I would assume this patch is needed in master, not just in 2018.02.x. We generally include 2018.02.x in the patch title when the patch should only be applied to 2018.02.x. For patches going in master, and needing a backport, we normally rely on Peter being smart and realizing that the patch is a fix that makes sense for 2018.02.x.
Could you clarify what was your intention with this 2018.02.x prefix ?
Perhaps we need to have some tags ?
Backport-to: 2018.02.x
when the patch is for master, but needs to be backported. And perhaps:
Apply-to: 2018.02.x
when the patch is to be applied only on 2018.02.x.
Or simply rely on informal notes below the "---" sign ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/2 makedevs: allow leading whitespace for capabilities
Hello,
Quoted 16 lines · Thomas Petazzoni
Quoted 8 lines · Ricardo Martincoski
Currently makedevs silently ignores extended attributes with leading whitespace, for example those added to a <PACKAGE>_PERMISSIONS following the recommended style from check-package.
Makedevs already ignores leading whitespace for normal entries (file permission changes and device files creation). Do the same for extended attributes.
Quoted 6 lines
Fixes #11191.Reported-by Jean-pierre Cartal <[email protected]>Signed-off-by Ricardo Martincoski <[email protected]>Cc Arnout Vandecappelle <[email protected]>Cc Thomas Petazzoni <[email protected]>
Quoted 8 lines
It is not clear to me why you have the "2018.02.x" prefix in your patch title. I would assume this patch is needed in master, not just in 2018.02.x. We generally include 2018.02.x in the patch title when the patch should only be applied to 2018.02.x. For patches going in master, and needing a backport, we normally rely on Peter being smart and realizing that the patch is a fix that makes sense for 2018.02.x.
Could you clarify what was your intention with this 2018.02.x prefix ?
I developed and runtime tested the patch for 2018.02.x.
But now I tested the patch (by temporarily adding a printf to makedevs) in the master branch too. It works well.
This patch can/should be applied to master.
In the branch 2018.02.x this patch unbreaks xattr with leading whitespace. In the master branch (and also 2018.05.x), which use a per-fs target dir, there are other issues with xattr, this patch is only part of the solution to unbreak xattrs, see #11216.
Quoted 5 lines
Perhaps we need to have some tags ?
Backport-to: 2018.02.x
Quoted 7 lines
when the patch is for master, but needs to be backported. And perhaps:
Apply-to: 2018.02.x
when the patch is to be applied only on 2018.02.x.
Or simply rely on informal notes below the "---" sign ?
Sorry, I should have added such informal notes.
Regards,
Ricardo
PATCH 1/2 makedevs: allow leading whitespace for capabilities
Quoted 34 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ricardo" == Ricardo Martincoski <[email protected]> writes:
Hello,
Quoted 16 lines · Thomas Petazzoni
Quoted 8 lines · Ricardo Martincoski
Currently makedevs silently ignores extended attributes with leading whitespace, for example those added to a <PACKAGE>_PERMISSIONS following the recommended style from check-package.
Makedevs already ignores leading whitespace for normal entries (file permission changes and device files creation). Do the same for extended attributes.
Quoted 6 lines
Fixes #11191.Reported-by Jean-pierre Cartal <[email protected]>Signed-off-by Ricardo Martincoski <[email protected]>Cc Arnout Vandecappelle <[email protected]>Cc Thomas Petazzoni <[email protected]>Quoted 8 lines
It is not clear to me why you have the "2018.02.x" prefix in your patch title. I would assume this patch is needed in master, not just in 2018.02.x. We generally include 2018.02.x in the patch title when the patch should only be applied to 2018.02.x. For patches going in master, and needing a backport, we normally rely on Peter being smart and realizing that the patch is a fix that makes sense for 2018.02.x.
Could you clarify what was your intention with this 2018.02.x prefix ?
I developed and runtime tested the patch for 2018.02.x.
But now I tested the patch (by temporarily adding a printf to makedevs) in the master branch too. It works well.
Quoted 6 lines
This patch can/should be applied to master.
In the branch 2018.02.x this patch unbreaks xattr with leading whitespace. In the master branch (and also 2018.05.x), which use a per-fs target dir, there are other issues with xattr, this patch is only part of the solution to unbreak xattrs, see #11216.
Ok, thanks.
Committed to master, and then backported to 2018.02.x and 2018.05.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 makedevs: allow leading whitespace for capabilities
In reply to Thomas PetazzoniQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 13 lines
It is not clear to me why you have the "2018.02.x" prefix in your patch title. I would assume this patch is needed in master, not just in 2018.02.x. We generally include 2018.02.x in the patch title when the patch should only be applied to 2018.02.x. For patches going in master, and needing a backport, we normally rely on Peter being smart and realizing that the patch is a fix that makes sense for 2018.02.x.
Could you clarify what was your intention with this 2018.02.x prefix ?
Perhaps we need to have some tags ?
Backport-to: 2018.02.x
Quoted 7 lines
when the patch is for master, but needs to be backported. And perhaps:
Apply-to: 2018.02.x
when the patch is to be applied only on 2018.02.x.
Or simply rely on informal notes below the "---" sign ?
Just stating it below the --- sign is IMHO good enough, and in the worst case send a mail if I miss something.
Signature · 1 line
Bye, Peter Korsgaard