Hi everyone,
I'm just writing a test for a script which uses dpkg --add-architecture. For running the test, i dont want to use root priviledges since i dont want to potentially ruin my host system.
I discovered that there is a --root parameter for this, which enables me to do this in a different directory than /. Running dpkg --root=<my test directory> --add-architecture runs also without root and adds a entry in <my test directory>/var/lib/dpkg/arch
as expected.
But now the problem. Since --root does not shift the configuration directory from /etc/dpkg to <my test directory>/etc/dpkg always my host dpkg configuration is used. But since my host dpkg configuration contains hooks which are run after --add-architecture
which require root I see always errors while running dpkg --root as a non-root user. Further I did not find a possibility (which does not require root) to disable the running of the hooks (like a command line parameter to dpkg) or switching the configuration
directory.
I thought about following solutions of this problem:
What do you think about this problem? Or have i just missed something and its already possible with a command line parameter i didn't found. Would be also ok for me 😉.
Since i got experience in C i can help/do the proposed implementations.
Greetings,
André
Richard
Wolf GmbH, Pforzheimer Strasse 32, 75438 Knittlingen
Richard
Wolf GmbH routinely monitors the content of e-mail sent and received via its
network for the purposes of ensuring compliance with its policies and
procedures. Richard Wolf GmbH is not responsible for any changes made to the
message after it has been sent. Where opinions are expressed, they are not
necessarily those of Richard Wolf GmbH. This e-mail and any files transmitted
with it are confidential and intended solely for the use of the individual or
entity to which they are addressed. If you are not the intended addressee, or
the person responsible for delivering it to them, you may not copy, forward,
disclose, or otherwise use it or any part of it in any way. To do so may be
unlawful. If you receive this e-mail by mistake, please advise the sender
immediately. |