Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | GNU tar >= 1.27 is required for --owner=NAME:ID and --group=NAME:ID. And fails |
| 2 | to build .deb packages with error: |
| 3 | |
| 4 | | dpkg-deb: building package 'linux-libc-headers-dbg' in '.../tmp/work/i586-poky-linux/linux-libc-headers/4.19-r0/deploy-debs/i586/linux-libc-headers-dbg_ 4.19-r0.0_i386.deb'. |
| 5 | | tar: root\:0: Invalid owner |
| 6 | | tar: Error is not recoverable: exiting now |
| 7 | | dpkg-deb: error: tar -cf subprocess returned error exit status 2 |
| 8 | |
| 9 | Tweak tar options in dpkg-deb source code to make it work on old machines. |
| 10 | |
| 11 | Upstream-Status: Inappropriate [cross build specific] |
| 12 | |
| 13 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
| 14 | --- |
| 15 | diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c |
| 16 | index 68d187511..86fe22e25 100644 |
| 17 | --- a/dpkg-deb/build.c |
| 18 | +++ b/dpkg-deb/build.c |
| 19 | @@ -462,7 +462,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, |
| 20 | if (options->mode) |
| 21 | command_add_args(&cmd, "--mode", options->mode, NULL); |
| 22 | if (options->root_owner_group) |
| 23 | - command_add_args(&cmd, "--owner", "root:0", "--group", "root:0", NULL); |
| 24 | + command_add_args(&cmd, "--owner", "root", "--group", "root", NULL); |
| 25 | command_add_args(&cmd, "--null", "--no-unquote", "--no-recursion", |
| 26 | "-T", "-", NULL); |
| 27 | command_exec(&cmd); |