| Message ID | 20240920093750.4000239-1-quic_raghuvar@quicinc.com |
|---|---|
| State | New |
| Headers | show |
| Series | [1/3] android-tools-adbd.service: Update ConditionPathExists to /etc | expand |
On Fri, 20 Sept 2024 at 11:38, Raghuvarya S <quic_raghuvar@quicinc.com> wrote: > > To ensure android-tools-adbd.service starts at boot, the path > for ConditionPathExists must be present at build time. /etc is > more suitable for build-time files than /var, which is for > runtime files. Changed ConditionPathExists from > /var/usb-debugging-enabled to /etc/usb-debugging-enabled openembedded-devel ML is a home for several different layers. README.md describes how to send patches properly (hint: subject-prefix). > > Backport-of: 8106cfe769aa ("android-tools-adbd.service: Change /var to /etc in ConditionPathExists") > CC: Khem Raj <raj.khem@gmail.com> > CC: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > Signed-off-by: Raghuvarya S <quic_raghuvar@quicinc.com> > --- > This is a backport of 8106cfe769aa ("android-tools-adbd.service: Change /var to /etc in ConditionPathExists") > from master to scarthgap. > > .../android-tools/android-tools/android-tools-adbd.service | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service > index ddf8d7f74..b6661f2e3 100644 > --- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service > +++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service > @@ -1,6 +1,6 @@ > [Unit] > Description=Android Debug Bridge > -ConditionPathExists=/var/usb-debugging-enabled > +ConditionPathExists=/etc/usb-debugging-enabled > Before=android-system.service > > [Service] > -- > 2.25.1 >
On Fri, 20 Sept 2024 at 12:12, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > On Fri, 20 Sept 2024 at 11:38, Raghuvarya S <quic_raghuvar@quicinc.com> wrote: > > > > To ensure android-tools-adbd.service starts at boot, the path > > for ConditionPathExists must be present at build time. /etc is > > more suitable for build-time files than /var, which is for > > runtime files. Changed ConditionPathExists from > > /var/usb-debugging-enabled to /etc/usb-debugging-enabled > > openembedded-devel ML is a home for several different layers. > README.md describes how to send patches properly (hint: > subject-prefix). Also please take a look at the generic documentation, "Submitting Changes to Stable Release Branches" [1] . It describes how to mark backported patches. [1] https://docs.yoctoproject.org/dev/contributor-guide/submit-changes.html#submitting-changes-to-stable-release-branches > > > > > Backport-of: 8106cfe769aa ("android-tools-adbd.service: Change /var to /etc in ConditionPathExists") > > CC: Khem Raj <raj.khem@gmail.com> > > CC: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Signed-off-by: Raghuvarya S <quic_raghuvar@quicinc.com> > > --- > > This is a backport of 8106cfe769aa ("android-tools-adbd.service: Change /var to /etc in ConditionPathExists") > > from master to scarthgap. > > > > .../android-tools/android-tools/android-tools-adbd.service | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service > > index ddf8d7f74..b6661f2e3 100644 > > --- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service > > +++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service > > @@ -1,6 +1,6 @@ > > [Unit] > > Description=Android Debug Bridge > > -ConditionPathExists=/var/usb-debugging-enabled > > +ConditionPathExists=/etc/usb-debugging-enabled > > Before=android-system.service > > > > [Service] > > -- > > 2.25.1 > > > > > -- > With best wishes > Dmitry
Hi, On Fri, Sep 20, 2024 at 03:07:48PM +0530, Raghuvarya S via lists.openembedded.org wrote: > To ensure android-tools-adbd.service starts at boot, the path > for ConditionPathExists must be present at build time. /etc is > more suitable for build-time files than /var, which is for > runtime files. Changed ConditionPathExists from > /var/usb-debugging-enabled to /etc/usb-debugging-enabled I know this is a backport but I think change from /var to /etc is wrong. /var and /run should be writable also with read-only rootfs. /etc is not writable. This change requires read-only rootfs users to symlink /etc/usb-debugging-enabled to some other location like /run which isn't nice. Cheers, -Mikko
On Tue, 24 Sept 2024 at 09:58, Mikko Rapeli <mikko.rapeli@linaro.org> wrote: > > Hi, > > On Fri, Sep 20, 2024 at 03:07:48PM +0530, Raghuvarya S via lists.openembedded.org wrote: > > To ensure android-tools-adbd.service starts at boot, the path > > for ConditionPathExists must be present at build time. /etc is > > more suitable for build-time files than /var, which is for > > runtime files. Changed ConditionPathExists from > > /var/usb-debugging-enabled to /etc/usb-debugging-enabled > > I know this is a backport but I think change from /var to /etc is wrong. > > /var and /run should be writable also with read-only rootfs. /etc is not writable. > This change requires read-only rootfs users to symlink /etc/usb-debugging-enabled > to some other location like /run which isn't nice. Yeah, that's also a correct point. I think it's all up to the maintainer's discretion. To be fair, in meta-qcom we are using kernel command line arguments (in addition to the flag) in order to enable adbd. Works better for one-time things.
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service index ddf8d7f74..b6661f2e3 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service +++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service @@ -1,6 +1,6 @@ [Unit] Description=Android Debug Bridge -ConditionPathExists=/var/usb-debugging-enabled +ConditionPathExists=/etc/usb-debugging-enabled Before=android-system.service [Service]
To ensure android-tools-adbd.service starts at boot, the path for ConditionPathExists must be present at build time. /etc is more suitable for build-time files than /var, which is for runtime files. Changed ConditionPathExists from /var/usb-debugging-enabled to /etc/usb-debugging-enabled Backport-of: 8106cfe769aa ("android-tools-adbd.service: Change /var to /etc in ConditionPathExists") CC: Khem Raj <raj.khem@gmail.com> CC: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Raghuvarya S <quic_raghuvar@quicinc.com> --- This is a backport of 8106cfe769aa ("android-tools-adbd.service: Change /var to /etc in ConditionPathExists") from master to scarthgap. .../android-tools/android-tools/android-tools-adbd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)