* [PATCH] override HOME to isolate sbuild configuration @ 2022-09-20 9:26 Felix Moessbauer 2022-09-20 10:58 ` Henning Schild 0 siblings, 1 reply; 5+ messages in thread From: Felix Moessbauer @ 2022-09-20 9:26 UTC (permalink / raw) To: isar-users; +Cc: florian.bezdeka, Felix Moessbauer This patch sets the HOME env var to the package build path to avoid conflicts with an existing .sbuildrc configuration in the users homedir. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- meta/classes/dpkg.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index c92ea7db..70f8e772 100644 --- a/meta/classes/dpkg.bbclass +++ b/meta/classes/dpkg.bbclass @@ -17,6 +17,8 @@ dpkg_runbuild() { E="${@ isar_export_ccache(d)}" export DEB_BUILD_OPTIONS="${@ isar_deb_build_options(d)}" export PARALLEL_MAKE="${PARALLEL_MAKE}" + # override HOME to not interfer with users .sbuildrc + export HOME="${PP}" rm -f ${SBUILD_CONFIG} -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] override HOME to isolate sbuild configuration 2022-09-20 9:26 [PATCH] override HOME to isolate sbuild configuration Felix Moessbauer @ 2022-09-20 10:58 ` Henning Schild 2022-09-20 11:22 ` Moessbauer, Felix 0 siblings, 1 reply; 5+ messages in thread From: Henning Schild @ 2022-09-20 10:58 UTC (permalink / raw) To: Felix Moessbauer; +Cc: isar-users, florian.bezdeka Am Tue, 20 Sep 2022 11:26:54 +0200 schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > This patch sets the HOME env var to the package build path > to avoid conflicts with an existing .sbuildrc configuration > in the users homedir. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > meta/classes/dpkg.bbclass | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > index c92ea7db..70f8e772 100644 > --- a/meta/classes/dpkg.bbclass > +++ b/meta/classes/dpkg.bbclass > @@ -17,6 +17,8 @@ dpkg_runbuild() { > E="${@ isar_export_ccache(d)}" > export DEB_BUILD_OPTIONS="${@ isar_deb_build_options(d)}" > export PARALLEL_MAKE="${PARALLEL_MAKE}" > + # override HOME to not interfer with users .sbuildrc > + export HOME="${PP}" This is not kas, maybe people want that from isar. And if they do not want it they can use kas. I would bbwarn on -f ~/.sbuildrc, setting HOME to something else is pretty heavy and can have all sorts of fun side-effects. Henning > rm -f ${SBUILD_CONFIG} > ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] override HOME to isolate sbuild configuration 2022-09-20 10:58 ` Henning Schild @ 2022-09-20 11:22 ` Moessbauer, Felix 2022-09-23 9:17 ` Anton Mikanovich 0 siblings, 1 reply; 5+ messages in thread From: Moessbauer, Felix @ 2022-09-20 11:22 UTC (permalink / raw) To: Schild, Henning, Anton Mikanovich; +Cc: isar-users, Bezdeka, Florian, ubely > -----Original Message----- > From: Schild, Henning (T CED SES-DE) <henning.schild@siemens.com> > Sent: Tuesday, September 20, 2022 12:59 PM > To: Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com> > Cc: isar-users@googlegroups.com; Bezdeka, Florian (T CED SES-DE) > <florian.bezdeka@siemens.com> > Subject: Re: [PATCH] override HOME to isolate sbuild configuration > > Am Tue, 20 Sep 2022 11:26:54 +0200 > schrieb Felix Moessbauer <felix.moessbauer@siemens.com>: > > > This patch sets the HOME env var to the package build path to avoid > > conflicts with an existing .sbuildrc configuration in the users > > homedir. > > > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > > --- > > meta/classes/dpkg.bbclass | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > > index c92ea7db..70f8e772 100644 > > --- a/meta/classes/dpkg.bbclass > > +++ b/meta/classes/dpkg.bbclass > > @@ -17,6 +17,8 @@ dpkg_runbuild() { > > E="${@ isar_export_ccache(d)}" > > export DEB_BUILD_OPTIONS="${@ isar_deb_build_options(d)}" > > export PARALLEL_MAKE="${PARALLEL_MAKE}" > > + # override HOME to not interfer with users .sbuildrc > > + export HOME="${PP}" > > This is not kas, maybe people want that from isar. And if they do not want it they > can use kas. > > I would bbwarn on -f ~/.sbuildrc, setting HOME to something else is pretty heavy > and can have all sorts of fun side-effects. I had the funny side effect that I could not build with ISAR on my sbuild + unshare enabled host. Had a hard time to figure out why this did not work, especially as the sbuild man page is not very precise on the effect of the SBUILD_CONFIG env var. Setting HOME there is only relevant for the sbuild invocation and also there, the HOME variable is set but quite pointless as everything happens inside the schroot. AFAIK there is no statement in the user_manual.md regarding the configuration of host tools. Let's put Anton in CC to get a statement from an maintainer of ISAR. Felix > > Henning > > > rm -f ${SBUILD_CONFIG} > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] override HOME to isolate sbuild configuration 2022-09-20 11:22 ` Moessbauer, Felix @ 2022-09-23 9:17 ` Anton Mikanovich 2022-09-25 8:13 ` Moessbauer, Felix 0 siblings, 1 reply; 5+ messages in thread From: Anton Mikanovich @ 2022-09-23 9:17 UTC (permalink / raw) To: Moessbauer, Felix, Schild, Henning; +Cc: isar-users, Bezdeka, Florian, ubely 20.09.2022 14:22, Moessbauer, Felix wrote: > I had the funny side effect that I could not build with ISAR on my sbuild + unshare enabled host. > Had a hard time to figure out why this did not work, especially as the sbuild man page is not very precise on the effect of the SBUILD_CONFIG env var. > > Setting HOME there is only relevant for the sbuild invocation and also there, the HOME variable is set but quite pointless as everything happens inside the schroot. > AFAIK there is no statement in the user_manual.md regarding the configuration of host tools. > > Let's put Anton in CC to get a statement from an maintainer of ISAR. > > Felix Hello, Felix. Thanks for pinging, I was sick a little bit this week, so unable to answer fast. I think we can try to enable HOME override in the way like: ISAR_BUILD_HOME ?= "${HOME}" ... export HOME="${ISAR_BUILD_HOME}" This will allow user to override the value if needed, but still use the old one by default. And this should be also documented. ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] override HOME to isolate sbuild configuration 2022-09-23 9:17 ` Anton Mikanovich @ 2022-09-25 8:13 ` Moessbauer, Felix 0 siblings, 0 replies; 5+ messages in thread From: Moessbauer, Felix @ 2022-09-25 8:13 UTC (permalink / raw) To: Anton Mikanovich, Schild, Henning; +Cc: isar-users, Bezdeka, Florian, ubely > -----Original Message----- > From: Anton Mikanovich <amikan@ilbers.de> > Sent: Friday, September 23, 2022 5:18 PM > To: Moessbauer, Felix (T CED SES-DE) <felix.moessbauer@siemens.com>; Schild, > Henning (T CED SES-DE) <henning.schild@siemens.com> > Cc: isar-users@googlegroups.com; Bezdeka, Florian (T CED SES-DE) > <florian.bezdeka@siemens.com>; ubely@ilbers.de > Subject: Re: [PATCH] override HOME to isolate sbuild configuration > > 20.09.2022 14:22, Moessbauer, Felix wrote: > > I had the funny side effect that I could not build with ISAR on my sbuild + > unshare enabled host. > > Had a hard time to figure out why this did not work, especially as the sbuild > man page is not very precise on the effect of the SBUILD_CONFIG env var. > > > > Setting HOME there is only relevant for the sbuild invocation and also there, > the HOME variable is set but quite pointless as everything happens inside the > schroot. > > AFAIK there is no statement in the user_manual.md regarding the > configuration of host tools. > > > > Let's put Anton in CC to get a statement from an maintainer of ISAR. > > > > Felix > > Hello, Felix. > > Thanks for pinging, I was sick a little bit this week, so unable to answer fast. > > I think we can try to enable HOME override in the way like: > > ISAR_BUILD_HOME ?= "${HOME}" > ... > export HOME="${ISAR_BUILD_HOME}" > > This will allow user to override the value if needed, but still use the old one by > default. Hi Anton, We could do it this way, but then the ISAR_BUILD_HOME would have to be injected from the users environment. This would require an additional variable to be passed through various layers of shell-scripts and bitbake (and excluded from caching, etc...). I already see people checking in the "ISAR_BUILD_HOME" variable in downstream layers' VCS. Apart from that, I discovered that setting HOME itself is not sufficient to isolate the sbuildrc: Still, /etc/sbuild/sbuild.conf is considered (but there are usually no breaking changes in it). I personally use KAS anyways, there we don't have this issue. But esp. Debian people who regularly use sbuild and want to try out ISAR will likely run into it. Don't know how to proceed. If nobody is interested in fixing this inconvenience, then let's keep it as it is. Felix > And this should be also documented. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-25 8:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-09-20 9:26 [PATCH] override HOME to isolate sbuild configuration Felix Moessbauer 2022-09-20 10:58 ` Henning Schild 2022-09-20 11:22 ` Moessbauer, Felix 2022-09-23 9:17 ` Anton Mikanovich 2022-09-25 8:13 ` Moessbauer, Felix
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox