[yocto] Enable systemd service with parameter
Hi! I have a pretty unusual problem. I need to enable a systemd service (openvpn) with a profile as a parameter (typically you do it by 'systemctl enable openvpn@profile'). But the profile on build time doesn't exist (it is just symlink to non existing file). My recipe bb looks like (I'm omitting SUMMARY etc.): inherit systemd SYSTEMD_SERVICE_${PN} = "openvpn@clientprofile.service" SYSTEMD_AUTO_ENABLE = "enable" DEPENDS = "openvpn" SYSTEMD_PACKAGES = "${PN}" do_install() { install -d ${D}${sysconfdir}/openvpn/ ln -sf /data/etc/openvpn/clientprofile.conf ${D}${sysconfdir}/openvpn/clientprofile.conf } Unfortunately, on build I get the following error: ERROR: openvpn-client-1.0-r3 do_package: SYSTEMD_SERVICE_openvpn-client value openvpn@clientprofile.service does not exist ERROR: openvpn-client-1.0-r3 do_package: Function failed: systemd_populate_packages What am I doing wrong? I suppose the symlink is not a problem as normally systemctl enables service with non-existent file as a parameter (it fails on start, but not enabling). Best regards, Mateusz -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Enable systemd service with parameter
On 17.11.2019 20:44, Mateusz Majchrzycki wrote: Hi! Hi, I have a pretty unusual problem. I need to enable a systemd service (openvpn) with a profile as a parameter (typically you do it by 'systemctl enable openvpn@profile'). But the profile on build time doesn't exist (it is just symlink to non existing file). My recipe bb looks like (I'm omitting SUMMARY etc.): inherit systemd SYSTEMD_SERVICE_${PN} = "openvpn@clientprofile.service" SYSTEMD_AUTO_ENABLE = "enable" DEPENDS = "openvpn" SYSTEMD_PACKAGES = "${PN}" do_install() { install -d ${D}${sysconfdir}/openvpn/ ln -sf /data/etc/openvpn/clientprofile.conf ${D}${sysconfdir}/openvpn/clientprofile.conf } Unfortunately, on build I get the following error: ERROR: openvpn-client-1.0-r3 do_package: SYSTEMD_SERVICE_openvpn-client value openvpn@clientprofile.service does not exist ERROR: openvpn-client-1.0-r3 do_package: Function failed: systemd_populate_packages What am I doing wrong? I suppose the symlink is not a problem as normally systemctl enables service with non-existent file as a parameter (it fails on start, but not enabling). Maybe you could just create that file /data/etc/openvpn/clientprofile.conf and install it within the recipe? It can be even empty. The service will keep failing. The build shall pass. Sounds reasonable? Best regards, Mateusz -- Maciej Pijanowski Embedded Systems Engineer https://3mdeb.com | @3mdeb_com -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] QA notification for completed autobuilder build (yocto-2.7.2.rc1)
Hello all, This is the full report for 2.7.2 RC1: https://git.yoctoproject.org/cgit/cgit.cgi/yocto-testresults-contrib/tree/?h=intel-yocto-testresults === Summary No high milestone defects. No new defect found in this cycle. Thanks & Regards, Sangeeta Jain >-Original Message- >From: Pokybuild User >Sent: Thursday, October 31, 2019 1:23 AM >To: yocto@yoctoproject.org >Cc: ota...@ossystems.com.br; yi.z...@windriver.com; Sangal, Apoorv >; Yeoh, Ee Peng ; Chan, >Aaron Chun Yew ; Ang, Chin Huat >; richard.pur...@linuxfoundation.org; >akuster...@gmail.com; sjolley.yp...@gmail.com; Jain, Sangeeta > >Subject: QA notification for completed autobuilder build (yocto-2.7.2.rc1) > > >A build flagged for QA (yocto-2.7.2.rc1) was completed on the autobuilder and >is >available at: > > >https://autobuilder.yocto.io/pub/releases/yocto-2.7.2.rc1 > > >Build hash information: > >bitbake: 75d6648f232a06b99c54a1e33324a7fc1cd15b38 >meta-gplv2: d5d9fc9a4bbd365d6cd6fe4d6a8558f7115c17da >meta-intel: ca26bed652722167b2dbe0042cfc2406029e9c6c >meta-mingw: 10695afe8cd406844e0d0dd868c11677e07557d4 >oecore: 726c3b92298981f5aa2f2449ceeec7b4bf84ed29 >poky: d0f73121551dc98f6924cd77952bf9ebf5ef3dd7 > > > >This is an automated message from the Yocto Project Autobuilder >Git: git://git.yoctoproject.org/yocto-autobuilder2 >Email: richard.pur...@linuxfoundation.org > > > -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto