Message ID | 20191023135153.9199-1-offougajoris@gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Series | [meta-swupdate,1/2] swupdate: refactor systemd install | expand |
Hi Joris, On 23/10/19 15:51, Joris Offouga wrote: > Bump git version. > > According to https://github.com/sbabic/swupdate/commit/bdc1d3ca06385a3ccb6e34bc74dc9d431a02d3fa > remove systemd services and add ${systemd_system_unidir} for install all services. > > Signed-off-by: Joris Offouga <offougajoris@gmail.com> > --- > recipes-support/swupdate/swupdate.inc | 25 +++++-------------- > .../swupdate/swupdate-progress.service | 6 ----- > .../swupdate/swupdate/swupdate-usb.rules | 2 -- > .../swupdate/swupdate/swupdate-usb@.service | 8 ------ > .../swupdate/swupdate/swupdate.service | 13 ---------- > .../swupdate/systemd-tmpfiles-swupdate.conf | 3 --- > recipes-support/swupdate/swupdate_git.bb | 2 +- > 7 files changed, 7 insertions(+), 52 deletions(-) > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-progress.service > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb.rules > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb@.service > delete mode 100644 recipes-support/swupdate/swupdate/swupdate.service > delete mode 100644 recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > > diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc > index 392af31..6bfcae3 100644 > --- a/recipes-support/swupdate/swupdate.inc > +++ b/recipes-support/swupdate/swupdate.inc > @@ -10,11 +10,6 @@ inherit cml1 update-rc.d systemd pkgconfig > SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=https \ > file://defconfig \ > file://swupdate \ > - file://swupdate.service \ > - file://swupdate-usb.rules \ > - file://swupdate-usb@.service \ > - file://swupdate-progress.service \ > - file://systemd-tmpfiles-swupdate.conf \ > " > > INSANE_SKIP_${PN} = "ldflags" > @@ -131,7 +126,11 @@ do_compile() { > > do_install () { > > - oe_runmake install > + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then > + oe_runmake install SYSTEMD_SYSTEM_UNITDIR=${systemd_system_unitdir} > + else > + oe_runmake install > + fi > > install -m 0755 -d ${D}/www > if [ -d ${S}/web-app ];then > @@ -143,22 +142,10 @@ do_install () { > install -d ${D}${sysconfdir}/init.d > install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d > > - install -d ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate.service ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate-usb@.service ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate-progress.service ${D}${systemd_unitdir}/system > - > - > - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then > - install -d ${D}${libdir}/tmpfiles.d > - install -m 0644 ${WORKDIR}/systemd-tmpfiles-swupdate.conf ${D}${libdir}/tmpfiles.d/swupdate.conf > - install -d ${D}${sysconfdir}/udev/rules.d > - install -m 0644 ${WORKDIR}/swupdate-usb.rules ${D}${sysconfdir}/udev/rules.d/ > - fi > } > > INITSCRIPT_NAME = "swupdate" > INITSCRIPT_PARAMS = "defaults 70" > > SYSTEMD_SERVICE_${PN} = "swupdate.service" > -SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service swupdate-progress.service" > +SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service swupdate-progress.service swupdate.socket" > diff --git a/recipes-support/swupdate/swupdate/swupdate-progress.service b/recipes-support/swupdate/swupdate/swupdate-progress.service > deleted file mode 100644 > index de80b16..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-progress.service > +++ /dev/null > @@ -1,6 +0,0 @@ > -[Unit] > -Description=swupdate progress service > -Requires=swupdate.service > - > -[Service] > -ExecStart=/usr/bin/swupdate-progress -r -w > diff --git a/recipes-support/swupdate/swupdate/swupdate-usb.rules b/recipes-support/swupdate/swupdate/swupdate-usb.rules > deleted file mode 100644 > index 7bba227..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-usb.rules > +++ /dev/null > @@ -1,2 +0,0 @@ > -ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service" > - > diff --git a/recipes-support/swupdate/swupdate/swupdate-usb@.service b/recipes-support/swupdate/swupdate/swupdate-usb@.service > deleted file mode 100644 > index eda9d15..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-usb@.service > +++ /dev/null > @@ -1,8 +0,0 @@ > -[Unit] > -Description=usb media swupdate service > -Requires=swupdate-progress.service > - > -[Service] > -ExecStartPre=/bin/mount /dev/%I /mnt > -ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu" > -ExecStopPost=/bin/umount /mnt > diff --git a/recipes-support/swupdate/swupdate/swupdate.service b/recipes-support/swupdate/swupdate/swupdate.service > deleted file mode 100644 > index b585616..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate.service > +++ /dev/null > @@ -1,13 +0,0 @@ > -[Unit] > -Description=SWUpdate daemon > -Documentation=https://github.com/sbabic/swupdate > -Documentation=https://sbabic.github.io/swupdate > - > -[Service] > -ExecStartPre=-/usr/bin/swupdate-env > -EnvironmentFile=-/tmp/swupdate.env > -ExecStart=/usr/bin/swupdate -v -w "-r /www" $SWUPDATE_EXTRA_ARGS > -KillMode=mixed > - > -[Install] > -WantedBy=multi-user.target > diff --git a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf b/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > deleted file mode 100644 > index b374ddc..0000000 > --- a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > +++ /dev/null > @@ -1,3 +0,0 @@ > -X /tmp/datadst > -X /tmp/scripts > -X /tmp/swupdate.env > diff --git a/recipes-support/swupdate/swupdate_git.bb b/recipes-support/swupdate/swupdate_git.bb > index 95c57a8..ad3ff12 100644 > --- a/recipes-support/swupdate/swupdate_git.bb > +++ b/recipes-support/swupdate/swupdate_git.bb > @@ -3,4 +3,4 @@ require swupdate_tools.inc > > DEFAULT_PREFERENCE = "-1" > > -SRCREV ?= "a8d45381253838b34e4e035c065a1cdf429b1f09" > +SRCREV ?= "75985aab9e0ab7b12185d5d512c68cf74aa0e3b0" > It looks ok to me. Acked-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
Hi Joris Nice to see these patches making use of the new install features in swupdate. I'm working on the same stuff like you and just wanted to send my version to the mailing list. Some comments about the patches: - It will break the 2019.04 release - Renaming the tools binaries is not enough. The current implementation (swupdate install, meta-swupdate) installs the binaries twice. There is a patch pending for swupdate repo which solves this problem at the root: It renames the binaries already at the compile step. Please have a look at my version before pushing this further. I think all the changes you did are in as well. Regards, Adrian Am Mittwoch, 23. Oktober 2019 15:52:09 UTC+2 schrieb Joris Offouga: > > Bump git version. > > According to > https://github.com/sbabic/swupdate/commit/bdc1d3ca06385a3ccb6e34bc74dc9d431a02d3fa > remove systemd services and add ${systemd_system_unidir} for install all > services. > > Signed-off-by: Joris Offouga <offoug...@gmail.com <javascript:>> > --- > recipes-support/swupdate/swupdate.inc | 25 +++++-------------- > .../swupdate/swupdate-progress.service | 6 ----- > .../swupdate/swupdate/swupdate-usb.rules | 2 -- > .../swupdate/swupdate/swupdate-usb@.service | 8 ------ > .../swupdate/swupdate/swupdate.service | 13 ---------- > .../swupdate/systemd-tmpfiles-swupdate.conf | 3 --- > recipes-support/swupdate/swupdate_git.bb | 2 +- > 7 files changed, 7 insertions(+), 52 deletions(-) > delete mode 100644 > recipes-support/swupdate/swupdate/swupdate-progress.service > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb.rules > delete mode 100644 > recipes-support/swupdate/swupdate/swupdate-usb@.service > delete mode 100644 recipes-support/swupdate/swupdate/swupdate.service > delete mode 100644 > recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > > diff --git a/recipes-support/swupdate/swupdate.inc > b/recipes-support/swupdate/swupdate.inc > index 392af31..6bfcae3 100644 > --- a/recipes-support/swupdate/swupdate.inc > +++ b/recipes-support/swupdate/swupdate.inc > @@ -10,11 +10,6 @@ inherit cml1 update-rc.d systemd pkgconfig > SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=https \ > file://defconfig \ > file://swupdate \ > - file://swupdate.service \ > - file://swupdate-usb.rules \ > - file://swupdate-usb@.service \ > - file://swupdate-progress.service \ > - file://systemd-tmpfiles-swupdate.conf \ > " > > INSANE_SKIP_${PN} = "ldflags" > @@ -131,7 +126,11 @@ do_compile() { > > do_install () { > > - oe_runmake install > + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; > then > + oe_runmake install SYSTEMD_SYSTEM_UNITDIR=${systemd_system_unitdir} > + else > + oe_runmake install > + fi > > install -m 0755 -d ${D}/www > if [ -d ${S}/web-app ];then > @@ -143,22 +142,10 @@ do_install () { > install -d ${D}${sysconfdir}/init.d > install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d > > - install -d ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate.service > ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate-usb@.service > ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate-progress.service > ${D}${systemd_unitdir}/system > - > - > - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; > then > - install -d ${D}${libdir}/tmpfiles.d > - install -m 0644 ${WORKDIR}/systemd-tmpfiles-swupdate.conf > ${D}${libdir}/tmpfiles.d/swupdate.conf > - install -d ${D}${sysconfdir}/udev/rules.d > - install -m 0644 ${WORKDIR}/swupdate-usb.rules > ${D}${sysconfdir}/udev/rules.d/ > - fi > } > > INITSCRIPT_NAME = "swupdate" > INITSCRIPT_PARAMS = "defaults 70" > > SYSTEMD_SERVICE_${PN} = "swupdate.service" > -SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service > swupdate-progress.service" > +SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service swupdate-progress.service > swupdate.socket" > diff --git a/recipes-support/swupdate/swupdate/swupdate-progress.service > b/recipes-support/swupdate/swupdate/swupdate-progress.service > deleted file mode 100644 > index de80b16..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-progress.service > +++ /dev/null > @@ -1,6 +0,0 @@ > -[Unit] > -Description=swupdate progress service > -Requires=swupdate.service > - > -[Service] > -ExecStart=/usr/bin/swupdate-progress -r -w > diff --git a/recipes-support/swupdate/swupdate/swupdate-usb.rules > b/recipes-support/swupdate/swupdate/swupdate-usb.rules > deleted file mode 100644 > index 7bba227..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-usb.rules > +++ /dev/null > @@ -1,2 +0,0 @@ > -ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", > ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", > ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service" > - > diff --git a/recipes-support/swupdate/swupdate/swupdate-usb@.service > b/recipes-support/swupdate/swupdate/swupdate-usb@.service > deleted file mode 100644 > index eda9d15..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-usb@.service > +++ /dev/null > @@ -1,8 +0,0 @@ > -[Unit] > -Description=usb media swupdate service > -Requires=swupdate-progress.service > - > -[Service] > -ExecStartPre=/bin/mount /dev/%I /mnt > -ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu" > -ExecStopPost=/bin/umount /mnt > diff --git a/recipes-support/swupdate/swupdate/swupdate.service > b/recipes-support/swupdate/swupdate/swupdate.service > deleted file mode 100644 > index b585616..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate.service > +++ /dev/null > @@ -1,13 +0,0 @@ > -[Unit] > -Description=SWUpdate daemon > -Documentation=https://github.com/sbabic/swupdate > -Documentation=https://sbabic.github.io/swupdate > <https://github.com/sbabic/swupdate-Documentation=https://sbabic.github.io/swupdate> > - > -[Service] > -ExecStartPre=-/usr/bin/swupdate-env > -EnvironmentFile=-/tmp/swupdate.env > -ExecStart=/usr/bin/swupdate -v -w "-r /www" $SWUPDATE_EXTRA_ARGS > -KillMode=mixed > - > -[Install] > -WantedBy=multi-user.target > diff --git > a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > b/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > deleted file mode 100644 > index b374ddc..0000000 > --- a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > +++ /dev/null > @@ -1,3 +0,0 @@ > -X /tmp/datadst > -X /tmp/scripts > -X /tmp/swupdate.env > diff --git a/recipes-support/swupdate/swupdate_git.bb > b/recipes-support/swupdate/swupdate_git.bb > index 95c57a8..ad3ff12 100644 > --- a/recipes-support/swupdate/swupdate_git.bb > +++ b/recipes-support/swupdate/swupdate_git.bb > @@ -3,4 +3,4 @@ require swupdate_tools.inc > > DEFAULT_PREFERENCE = "-1" > > -SRCREV ?= "a8d45381253838b34e4e035c065a1cdf429b1f09" > +SRCREV ?= "75985aab9e0ab7b12185d5d512c68cf74aa0e3b0" > -- > 2.17.1 > >
Hi Adrian, Le 23/10/2019 à 21:55, adrian.freihofer@gmail.com a écrit : > Hi Joris > > Nice to see these patches making use of the new install features in > swupdate. > I'm working on the same stuff like you and just wanted to send my > version to the mailing list. > > Some comments about the patches: > - It will break the 2019.04 release > - Renaming the tools binaries is not enough. The current > implementation (swupdate install, meta-swupdate) installs the binaries > twice. There is a patch pending for swupdate repo which solves this > problem at the root: It renames the binaries already at the compile step. I watched your series, and indeed I had forgotten 2019.04. As long as 2019.11 is not released, we must not forget the old. > > Please have a look at my version before pushing this further. I think > all the changes you did are in as well. It's looks good to me Regards, Joris > > Regards, > Adrian > > Am Mittwoch, 23. Oktober 2019 15:52:09 UTC+2 schrieb Joris Offouga: > > Bump git version. > > According to > https://github.com/sbabic/swupdate/commit/bdc1d3ca06385a3ccb6e34bc74dc9d431a02d3fa > <https://github.com/sbabic/swupdate/commit/bdc1d3ca06385a3ccb6e34bc74dc9d431a02d3fa> > > remove systemd services and add ${systemd_system_unidir} for > install all services. > > Signed-off-by: Joris Offouga <offoug...@gmail.com <javascript:>> > --- > recipes-support/swupdate/swupdate.inc | 25 > +++++-------------- > .../swupdate/swupdate-progress.service | 6 ----- > .../swupdate/swupdate/swupdate-usb.rules | 2 -- > .../swupdate/swupdate/swupdate-usb@.service | 8 ------ > .../swupdate/swupdate/swupdate.service | 13 ---------- > .../swupdate/systemd-tmpfiles-swupdate.conf | 3 --- > recipes-support/swupdate/swupdate_git.bb <http://swupdate_git.bb> > | 2 +- > 7 files changed, 7 insertions(+), 52 deletions(-) > delete mode 100644 > recipes-support/swupdate/swupdate/swupdate-progress.service > delete mode 100644 > recipes-support/swupdate/swupdate/swupdate-usb.rules > delete mode 100644 > recipes-support/swupdate/swupdate/swupdate-usb@.service > delete mode 100644 > recipes-support/swupdate/swupdate/swupdate.service > delete mode 100644 > recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > > diff --git a/recipes-support/swupdate/swupdate.inc > b/recipes-support/swupdate/swupdate.inc > index 392af31..6bfcae3 100644 > --- a/recipes-support/swupdate/swupdate.inc > +++ b/recipes-support/swupdate/swupdate.inc > @@ -10,11 +10,6 @@ inherit cml1 update-rc.d systemd pkgconfig > SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=https > <http://github.com/sbabic/swupdate.git;protocol=https> \ > file://defconfig \ > file://swupdate \ > - file://swupdate.service \ > - file://swupdate-usb.rules \ > - file://swupdate-usb@.service \ > - file://swupdate-progress.service \ > - file://systemd-tmpfiles-swupdate.conf \ > " > > INSANE_SKIP_${PN} = "ldflags" > @@ -131,7 +126,11 @@ do_compile() { > > do_install () { > > - oe_runmake install > + if > ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; > then > + oe_runmake install > SYSTEMD_SYSTEM_UNITDIR=${systemd_system_unitdir} > + else > + oe_runmake install > + fi > > install -m 0755 -d ${D}/www > if [ -d ${S}/web-app ];then > @@ -143,22 +142,10 @@ do_install () { > install -d ${D}${sysconfdir}/init.d > install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d > > - install -d ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate.service > ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate-usb@.service > ${D}${systemd_unitdir}/system > - install -m 644 ${WORKDIR}/swupdate-progress.service > ${D}${systemd_unitdir}/system > - > - > - if > ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; > then > - install -d ${D}${libdir}/tmpfiles.d > - install -m 0644 ${WORKDIR}/systemd-tmpfiles-swupdate.conf > ${D}${libdir}/tmpfiles.d/swupdate.conf > - install -d ${D}${sysconfdir}/udev/rules.d > - install -m 0644 ${WORKDIR}/swupdate-usb.rules > ${D}${sysconfdir}/udev/rules.d/ > - fi > } > > INITSCRIPT_NAME = "swupdate" > INITSCRIPT_PARAMS = "defaults 70" > > SYSTEMD_SERVICE_${PN} = "swupdate.service" > -SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service > swupdate-progress.service" > +SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service > swupdate-progress.service swupdate.socket" > diff --git > a/recipes-support/swupdate/swupdate/swupdate-progress.service > b/recipes-support/swupdate/swupdate/swupdate-progress.service > deleted file mode 100644 > index de80b16..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-progress.service > +++ /dev/null > @@ -1,6 +0,0 @@ > -[Unit] > -Description=swupdate progress service > -Requires=swupdate.service > - > -[Service] > -ExecStart=/usr/bin/swupdate-progress -r -w > diff --git a/recipes-support/swupdate/swupdate/swupdate-usb.rules > b/recipes-support/swupdate/swupdate/swupdate-usb.rules > deleted file mode 100644 > index 7bba227..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-usb.rules > +++ /dev/null > @@ -1,2 +0,0 @@ > -ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", > ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", > ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service" > - > diff --git > a/recipes-support/swupdate/swupdate/swupdate-usb@.service > b/recipes-support/swupdate/swupdate/swupdate-usb@.service > deleted file mode 100644 > index eda9d15..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate-usb@.service > +++ /dev/null > @@ -1,8 +0,0 @@ > -[Unit] > -Description=usb media swupdate service > -Requires=swupdate-progress.service > - > -[Service] > -ExecStartPre=/bin/mount /dev/%I /mnt > -ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu" > -ExecStopPost=/bin/umount /mnt > diff --git a/recipes-support/swupdate/swupdate/swupdate.service > b/recipes-support/swupdate/swupdate/swupdate.service > deleted file mode 100644 > index b585616..0000000 > --- a/recipes-support/swupdate/swupdate/swupdate.service > +++ /dev/null > @@ -1,13 +0,0 @@ > -[Unit] > -Description=SWUpdate daemon > -Documentation=https://github.com/sbabic/swupdate > -Documentation=https://sbabic.github.io/swupdate > <https://github.com/sbabic/swupdate-Documentation=https://sbabic.github.io/swupdate> > > - > -[Service] > -ExecStartPre=-/usr/bin/swupdate-env > -EnvironmentFile=-/tmp/swupdate.env > -ExecStart=/usr/bin/swupdate -v -w "-r /www" $SWUPDATE_EXTRA_ARGS > -KillMode=mixed > - > -[Install] > -WantedBy=multi-user.target > diff --git > a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > b/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > deleted file mode 100644 > index b374ddc..0000000 > --- > a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > +++ /dev/null > @@ -1,3 +0,0 @@ > -X /tmp/datadst > -X /tmp/scripts > -X /tmp/swupdate.env > diff --git a/recipes-support/swupdate/swupdate_git.bb > <http://swupdate_git.bb> > b/recipes-support/swupdate/swupdate_git.bb <http://swupdate_git.bb> > index 95c57a8..ad3ff12 100644 > --- a/recipes-support/swupdate/swupdate_git.bb > <http://swupdate_git.bb> > +++ b/recipes-support/swupdate/swupdate_git.bb > <http://swupdate_git.bb> > @@ -3,4 +3,4 @@ require swupdate_tools.inc > > DEFAULT_PREFERENCE = "-1" > > -SRCREV ?= "a8d45381253838b34e4e035c065a1cdf429b1f09" > +SRCREV ?= "75985aab9e0ab7b12185d5d512c68cf74aa0e3b0" > -- > 2.17.1 > > -- > You received this message because you are subscribed to the Google > Groups "swupdate" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to swupdate+unsubscribe@googlegroups.com > <mailto:swupdate+unsubscribe@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/swupdate/ab436f12-4039-4522-ae1d-b055dc688792%40googlegroups.com > <https://groups.google.com/d/msgid/swupdate/ab436f12-4039-4522-ae1d-b055dc688792%40googlegroups.com?utm_medium=email&utm_source=footer>.
Am 23.10.19 um 15:51 schrieb Joris Offouga: > Bump git version. > > According to https://github.com/sbabic/swupdate/commit/bdc1d3ca06385a3ccb6e34bc74dc9d431a02d3fa > remove systemd services and add ${systemd_system_unidir} for install all services. > > Signed-off-by: Joris Offouga <offougajoris@gmail.com> > --- > recipes-support/swupdate/swupdate.inc | 25 +++++-------------- > .../swupdate/swupdate-progress.service | 6 ----- > .../swupdate/swupdate/swupdate-usb.rules | 2 -- > .../swupdate/swupdate/swupdate-usb@.service | 8 ------ > .../swupdate/swupdate/swupdate.service | 13 ---------- > .../swupdate/systemd-tmpfiles-swupdate.conf | 3 --- > recipes-support/swupdate/swupdate_git.bb | 2 +- > 7 files changed, 7 insertions(+), 52 deletions(-) > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-progress.service > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb.rules > delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb@.service > delete mode 100644 recipes-support/swupdate/swupdate/swupdate.service > delete mode 100644 recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf > > diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc > index 392af31..6bfcae3 100644 > --- a/recipes-support/swupdate/swupdate.inc > +++ b/recipes-support/swupdate/swupdate.inc > @@ -10,11 +10,6 @@ inherit cml1 update-rc.d systemd pkgconfig > SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=https \ > file://defconfig \ > file://swupdate \ > - file://swupdate.service \ > - file://swupdate-usb.rules \ > - file://swupdate-usb@.service \ > - file://swupdate-progress.service \ > - file://systemd-tmpfiles-swupdate.conf \ > " > > INSANE_SKIP_${PN} = "ldflags" > @@ -131,7 +126,11 @@ do_compile() { > > do_install () { > > - oe_runmake install > + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then > + oe_runmake install SYSTEMD_SYSTEM_UNITDIR=${systemd_system_unitdir} > + else > + oe_runmake install > + fi NACK. We already use a rarely configuration flow because the recipe is configured by a source file (defconfig) and we doesn't use the PACKAGECONFIG variable to configure the recipe. This change make the recipe further uncommon because a configuration option is handled during the installation! Please configure the SYSTEMD_SYSTEM_UNITDIR during configuration. Regards Stefan
diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc index 392af31..6bfcae3 100644 --- a/recipes-support/swupdate/swupdate.inc +++ b/recipes-support/swupdate/swupdate.inc @@ -10,11 +10,6 @@ inherit cml1 update-rc.d systemd pkgconfig SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=https \ file://defconfig \ file://swupdate \ - file://swupdate.service \ - file://swupdate-usb.rules \ - file://swupdate-usb@.service \ - file://swupdate-progress.service \ - file://systemd-tmpfiles-swupdate.conf \ " INSANE_SKIP_${PN} = "ldflags" @@ -131,7 +126,11 @@ do_compile() { do_install () { - oe_runmake install + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + oe_runmake install SYSTEMD_SYSTEM_UNITDIR=${systemd_system_unitdir} + else + oe_runmake install + fi install -m 0755 -d ${D}/www if [ -d ${S}/web-app ];then @@ -143,22 +142,10 @@ do_install () { install -d ${D}${sysconfdir}/init.d install -m 755 ${WORKDIR}/swupdate ${D}${sysconfdir}/init.d - install -d ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/swupdate.service ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/swupdate-usb@.service ${D}${systemd_unitdir}/system - install -m 644 ${WORKDIR}/swupdate-progress.service ${D}${systemd_unitdir}/system - - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${libdir}/tmpfiles.d - install -m 0644 ${WORKDIR}/systemd-tmpfiles-swupdate.conf ${D}${libdir}/tmpfiles.d/swupdate.conf - install -d ${D}${sysconfdir}/udev/rules.d - install -m 0644 ${WORKDIR}/swupdate-usb.rules ${D}${sysconfdir}/udev/rules.d/ - fi } INITSCRIPT_NAME = "swupdate" INITSCRIPT_PARAMS = "defaults 70" SYSTEMD_SERVICE_${PN} = "swupdate.service" -SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service swupdate-progress.service" +SYSTEMD_SERVICE_${PN} += "swupdate-usb@.service swupdate-progress.service swupdate.socket" diff --git a/recipes-support/swupdate/swupdate/swupdate-progress.service b/recipes-support/swupdate/swupdate/swupdate-progress.service deleted file mode 100644 index de80b16..0000000 --- a/recipes-support/swupdate/swupdate/swupdate-progress.service +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=swupdate progress service -Requires=swupdate.service - -[Service] -ExecStart=/usr/bin/swupdate-progress -r -w diff --git a/recipes-support/swupdate/swupdate/swupdate-usb.rules b/recipes-support/swupdate/swupdate/swupdate-usb.rules deleted file mode 100644 index 7bba227..0000000 --- a/recipes-support/swupdate/swupdate/swupdate-usb.rules +++ /dev/null @@ -1,2 +0,0 @@ -ACTION=="add", KERNEL=="sd*", SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="swupdate-usb@%k.service" - diff --git a/recipes-support/swupdate/swupdate/swupdate-usb@.service b/recipes-support/swupdate/swupdate/swupdate-usb@.service deleted file mode 100644 index eda9d15..0000000 --- a/recipes-support/swupdate/swupdate/swupdate-usb@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=usb media swupdate service -Requires=swupdate-progress.service - -[Service] -ExecStartPre=/bin/mount /dev/%I /mnt -ExecStart=/bin/sh -c "swupdate-client -v /mnt/*.swu" -ExecStopPost=/bin/umount /mnt diff --git a/recipes-support/swupdate/swupdate/swupdate.service b/recipes-support/swupdate/swupdate/swupdate.service deleted file mode 100644 index b585616..0000000 --- a/recipes-support/swupdate/swupdate/swupdate.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=SWUpdate daemon -Documentation=https://github.com/sbabic/swupdate -Documentation=https://sbabic.github.io/swupdate - -[Service] -ExecStartPre=-/usr/bin/swupdate-env -EnvironmentFile=-/tmp/swupdate.env -ExecStart=/usr/bin/swupdate -v -w "-r /www" $SWUPDATE_EXTRA_ARGS -KillMode=mixed - -[Install] -WantedBy=multi-user.target diff --git a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf b/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf deleted file mode 100644 index b374ddc..0000000 --- a/recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf +++ /dev/null @@ -1,3 +0,0 @@ -X /tmp/datadst -X /tmp/scripts -X /tmp/swupdate.env diff --git a/recipes-support/swupdate/swupdate_git.bb b/recipes-support/swupdate/swupdate_git.bb index 95c57a8..ad3ff12 100644 --- a/recipes-support/swupdate/swupdate_git.bb +++ b/recipes-support/swupdate/swupdate_git.bb @@ -3,4 +3,4 @@ require swupdate_tools.inc DEFAULT_PREFERENCE = "-1" -SRCREV ?= "a8d45381253838b34e4e035c065a1cdf429b1f09" +SRCREV ?= "75985aab9e0ab7b12185d5d512c68cf74aa0e3b0"
Bump git version. According to https://github.com/sbabic/swupdate/commit/bdc1d3ca06385a3ccb6e34bc74dc9d431a02d3fa remove systemd services and add ${systemd_system_unidir} for install all services. Signed-off-by: Joris Offouga <offougajoris@gmail.com> --- recipes-support/swupdate/swupdate.inc | 25 +++++-------------- .../swupdate/swupdate-progress.service | 6 ----- .../swupdate/swupdate/swupdate-usb.rules | 2 -- .../swupdate/swupdate/swupdate-usb@.service | 8 ------ .../swupdate/swupdate/swupdate.service | 13 ---------- .../swupdate/systemd-tmpfiles-swupdate.conf | 3 --- recipes-support/swupdate/swupdate_git.bb | 2 +- 7 files changed, 7 insertions(+), 52 deletions(-) delete mode 100644 recipes-support/swupdate/swupdate/swupdate-progress.service delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb.rules delete mode 100644 recipes-support/swupdate/swupdate/swupdate-usb@.service delete mode 100644 recipes-support/swupdate/swupdate/swupdate.service delete mode 100644 recipes-support/swupdate/swupdate/systemd-tmpfiles-swupdate.conf