summaryrefslogtreecommitdiff
path: root/dpkg-deb/main.c
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-09-17 12:15:32 +0200
committerGuillem Jover <guillem@debian.org>2017-09-24 21:03:10 +0200
commit2436807c87b033a1ea25164d3b951cd559084a5a (patch)
treea3450bfd0582d0a5e2a99a5ae109952a964dea80 /dpkg-deb/main.c
parentc6fa483ce9e3babd9a43ac30788c9101dca44d18 (diff)
downloaddpkg-2436807c87b033a1ea25164d3b951cd559084a5a.tar.gz
dpkg-deb: Add support for rootless builds
This sets the control member entries always to root:root, and makes it possible to do the same for the data member entries via the new --root-onwer-group option. Closes: #291320 Based-on-patch-by: Niels Thykier <niels@thykier.net> Signed-off-by: Guillem Jover <guillem@debian.org>
Diffstat (limited to 'dpkg-deb/main.c')
-rw-r--r--dpkg-deb/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/dpkg-deb/main.c b/dpkg-deb/main.c
index 7892fa9a5..1f2143b4e 100644
--- a/dpkg-deb/main.c
+++ b/dpkg-deb/main.c
@@ -104,6 +104,7 @@ usage(const struct cmdinfo *cip, const char *value)
" Allowed values: 0.939000, 2.0 (default).\n"
" --nocheck Suppress control file check (build bad\n"
" packages).\n"
+" --root-owner-group Forces the owner and groups to root.\n"
" --uniform-compression Use the compression params on all members.\n"
" -z# Set the compression level when building.\n"
" -Z<type> Set the compression type used when building.\n"
@@ -140,6 +141,7 @@ static const char printforhelp[] =
int debugflag = 0;
int nocheckflag = 0;
int opt_verbose = 0;
+int opt_root_owner_group = 0;
int opt_uniform_compression = 0;
struct deb_version deb_format = DEB_VERSION(2, 0);
@@ -215,6 +217,7 @@ static const struct cmdinfo cmdinfos[]= {
{ "debug", 'D', 0, &debugflag, NULL, NULL, 1 },
{ "verbose", 'v', 0, &opt_verbose, NULL, NULL, 1 },
{ "nocheck", 0, 0, &nocheckflag, NULL, NULL, 1 },
+ { "root-owner-group", 0, 0, &opt_root_owner_group, NULL, NULL, 1 },
{ "uniform-compression", 0, 0, &opt_uniform_compression, NULL, NULL, 1 },
{ NULL, 'z', 1, NULL, NULL, set_compress_level },
{ NULL, 'Z', 1, NULL, NULL, set_compress_type },