Re: [yocto] Disabling sshd is harder than it should be
On 04/26/2019 09:26 PM, Richard Weinberger wrote: My thud based system installs openssh-sshd but I want to have sshd disabled by default. So I checked the docs how to disabled a systemd service by default and found SYSTEMD_AUTO_ENABLE, perfect. After I put that into my bbappend file I figured that sshd is still enabled by default. With one difference, it was no longer present as sshd.socket, but as sshd.service. This seemed odd and after another hour I realized that now sshd is stared as good old sysvinist script. Hmm. To finally disable sshd by default I had to disable it via systemd _and_ sysvinit. Is this really the expected way? :-( For reference, this is my bbappend file which works: SYSTEMD_AUTO_ENABLE = "disable" INITSCRIPT_PARAMS_${PN}-sshd = "remove" When selecting systemd as the init manager, the following line is recommended. DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" Then you should only need: SYSTEMD_AUTO_ENABLE = "disable" Best Regards, Chen Qi -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] yacto build filesystem link dpkg or package
Hi, i want to link the dpkg package or source code for yacto build system .If it possible please guide me for adding packages to yacto build system Thanks, Rammohan -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] .pc files are not avilable at build time
Thank you for your responce whaile configuration time getting this error checking for EXT2FS... no INFO - | checking for EXT2FS... no INFO - | configure: error: Package requirements (ext2fs) were not met: INFO - | INFO - | No package 'ext2fs' found INFO - | INFO - | Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standardprefix. INFO - | INFO - | Alternatively, you may set the environment variables EXT2FS_CFLAGS and EXT2FS_LIBS to avoid the need to call pkg- config See the pkg-config man page for more details. ex2fs.pc is provided by e2fsprogs package.i have alredy installed it Regards Archana On Tue, 2019-04-23 at 10:51 +0100, Burton, Ross wrote: > Works for me. What is the actual error you're seeing? > > On Tue, 23 Apr 2019 at 10:17, Archana Polampalli > wrote: > > > > > > Hi all, > > > > I am trying to build btrfs-tools recipes.it needs the ex2fs.pc > > pkgconfig file.i have alredy installed e2fsprogs recipe it created > > the > > ex2fs.pc in image directory.but btrfstools unable to take the > > pkgconfig > > file. > > > > plese any help me how to provide ex2fs.pc file for build btrfs- > > tools > > > > Regards > > Archana > > The information contained in this e-mail message and in any > > attachments/annexure/appendices is confidential to the > > recipient and may contain privileged information. > > If you are not the intended recipient, please notify the > > sender and delete the message along with any > > attachments/annexure/appendices. You should not disclose, > > copy or otherwise use the information contained in the > > message or any annexure. Any views expressed in this e-mail > > are those of the individual sender except where the sender > > specifically states them to be the views of > > Toshiba Software India Pvt. Ltd. (TSIP),Bangalore. > > > > Although this transmission and any attachments are believed to be > > free of any virus or other defect that might affect any computer > > system into which it is received and opened, it is the > > responsibility > > of the recipient to ensure that it is virus free and no > > responsibility > > is accepted by Toshiba Embedded Software India Pvt. Ltd, for any > > loss or > > damage arising in any way from its use. > > -- > > ___ > > yocto mailing list > > yocto@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/yocto The information contained in this e-mail message and in any attachments/annexure/appendices is confidential to the recipient and may contain privileged information. If you are not the intended recipient, please notify the sender and delete the message along with any attachments/annexure/appendices. You should not disclose, copy or otherwise use the information contained in the message or any annexure. Any views expressed in this e-mail are those of the individual sender except where the sender specifically states them to be the views of Toshiba Software India Pvt. Ltd. (TSIP),Bangalore. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by Toshiba Embedded Software India Pvt. Ltd, for any loss or damage arising in any way from its use. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] include own script - custon location
Hi, I'd like to include a javascript file in the target machine in a custom location. I got an warning while bitbake: wavesurfer-1.0-r0 do_package: QA Issue: wavesurfer: Files/directories were installed but not shipped in any package: /usr /usr/local /usr/local/www /usr/local/www/sys /usr/local/www/sys/js /usr/local/www/sys/js/wavesurfer.js Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. wavesurfer: 6 installed and not shipped files. [installed-vs-shipped] Here is the bb file: SUMMARY = "Waveform generator" LICENSE = "CLOSED" LIC_FILES_CHKSUM = "" SRC_URI = "file://wavesurfer.js" SRC_URI[md5sum] = "523052e51d8668b849abaa303404de3e" FILESEXTRAPATHS_prepend := "${THISDIR}/file:" S= "${WORKDIR}" do_install() { install -d ${D}/usr/local/www/sys/js install -m 0644 wavesurfer.js ${D}/usr/local/www/sys/js } I guess something is wrong with the do-install function, I thought it would put the file in the image, but it doesn't. Please help me out on this. Thanks, Zolee -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] include own script - custon location
On Mon, 29 Apr 2019 at 10:48, Zolee K wrote: > I guess something is wrong with the do-install function, I thought it would > put the file in the image, but it doesn't. Please help me out on this. Bitbake is literally telling you want to do: > Please set FILES such that these items are packaged. FILES_${PN} += "/usr/local/www" Ross -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Replacing a configuration file from another recipe
Hi, In our base image we use nginx. I created a nginx.bbappend to add our PHP configuration in a separated layer. For a specific variant of the image I need to add an extra bit of nginx configuration. I though I could create a new recipe to overwrite nginx.conf and include that recipe in the variant image definition, but bitbake shouts at me that I cannot modify a file from another recipe. If that's the case, is it possible to create image name based bbappend files? Or do I need to create a separate nginx overwrite layer with higher priority than the base image nginx.bbappend for that image variant? (I wouldn't like that) Thanks, -Damien -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Disabling sshd is harder than it should be
On Mon, Apr 29, 2019 at 9:23 AM ChenQi wrote: > When selecting systemd as the init manager, the following line is > recommended. > DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" > Then you should only need: SYSTEMD_AUTO_ENABLE = "disable" Thanks a lot for your suggestion! But doesn't this line imply that recipes which don't supply systemd servies files won't work since the init.d scipt fallback will be disabled? -- Thanks, //richard -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] do_rootfs fails - corner case QA/heuristics?
Hi, I'm facing some strange problems trying to backport old 1.9 Ruby to Thud Poky. All packages build fine but the image's do_rootfs fails with below message and without any image winding up in tmp/deploy/images/: - NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: my-image-1.0-r0 do_rootfs: [log_check] my-image: found 2 error messages in the logfile: [log_check] D: create 040755 1 ( 0, 0) 0 /usr/share/ri/1.9.1/system/Net/HTTPExpectationFailed [log_check] D: create 040755 1 ( 0, 0) 0 /usr/share/ri/1.9.1/system/Net/HTTPPreconditionFailed ERROR: my-image-1.0-r0 do_rootfs: Function failed: do_rootfs ERROR: Logfile of failure stored in: /1.0-r0/temp/log.do_rootfs.19421 ERROR: Task (my-image.bb:do_rootfs) failed with exit code '1' NOTE: Tasks Summary: Attempted 7927 tasks of which 7800 didn't need to be rerun and 1 failed. - I believe there are some QA-related heuristics in place which dislike the naming of the two mentioned files for they contain "Failed" in their filename. Unlike Thud, that used to work in Krogoth. If this was a pure QA-warning I'd assume there is a switch to ignore it but it seems to be treated like an actual error. I'd be glad to hear about the best way to proceed with this. Thank you! Best Regards, Felix Lelchuk -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Disabling sshd is harder than it should be
Guten Abend Richard, > > When selecting systemd as the init manager, the following line is > > recommended. > > DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" > > Then you should only need: SYSTEMD_AUTO_ENABLE = "disable" > > Thanks a lot for your suggestion! > But doesn't this line imply that recipes which don't supply systemd servies > files won't work since the init.d scipt fallback will be disabled? As per Mega-manual (section "using systemd Exclusively"): # switch to systemd init DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd" # The next 2 lines: # -prevent sysvinit of being automatically added to the image (BACKFILL_CONSIDERED), # -remove the initscripts from the image (VIRTUAL-RUNTIME_initscripts) DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" VIRTUAL-RUNTIME_initscripts = "" Now "pokying around" further in meta/ and meta-poky/, it turns out that that later variable might be what you're looking for. As far as I can see, it can be set to: VIRTUAL-RUNTIME_initscripts = "" VIRTUAL-RUNTIME_initscripts = "initscripts" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units" Also using "+=" operator for BACKFILL_CONSIDERED as suggested by Qi sounds more generic to me than using a plain assignment. Speaking of which... Additional findings (meta/conf/distro/include/maintainers.inc) let me also think that Qi is simply just the right address for these kind of questions ;-) Ah, and yes. If you are moving from sysvinit -> systemd for an existing project, you might need a clean build as DISTRO_FEATURES is changed. Hope this helps! Loic. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Tomorrow - Live Coding with Yocto Project
Happening tomorrow @5 PM CET - Join us for a download to first build live tutorial. When: April 30, 2019, 5:00 PM CET Where: Yocto Project Twitch channel - https://www.twitch.tv/yocto_project Add it to your calendar - https://calendar.google.com/calendar/ical/d7umm3pdhorsnnjbe1cvbgfhlk%40group.calendar.google.com/public/basic.ics See you soon! Yocto Project Advocacy Team -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [update-rc.d][PATCH V3] update-rc.d: support enable/disable options
From: Changqing Li Add support of enable/disable options, refer https://manpages.debian.org/wheezy/sysv-rc/update-rc.d.8.en.html With support of these options, the usr can never change an existing configuration even after upgrading a package. The program will only install links if none are present, otherwise, it will keep the previous configuration. preinst in update-rc.d.bbclass will delete all the links under rcrunlevel.d, this behavior now conflicts with enable/disable options. so remove preinst from the update-rc.d.bbclass [Yocto 12955] Signed-off-by: Changqing Li --- update-rc.d | 81 + 1 file changed, 81 insertions(+) diff --git a/update-rc.d b/update-rc.d index e07cf85..a7fb7bc 100644 --- a/update-rc.d +++ b/update-rc.d @@ -27,6 +27,7 @@ usage() usage: update-rc.d [-n] [-f] [-r ] remove update-rc.d [-n] [-r ] [-s] defaults [NN | sNN kNN] update-rc.d [-n] [-r ] [-s] start|stop NN runlvl [runlvl] [...] . + update-rc.d [-n] [-r ] [-s] enable|disable [S|2|3|4|5] -n: not really -f: force -v: verbose @@ -101,6 +102,53 @@ makelinks() done } +# function to disable/enable init script link of one run level +# $1 should be K/S, means to disable/enable +# $2 means which run level to disable/enable +renamelink() +{ + local oldstartstop newstartstop lev oldnn newnn + if [ "x$1" = "xS" ]; then + oldstartstop="K" + newstartstop="S" + else + oldstartstop="S" + newstartstop="K" + fi + + lev=$2 + # modifies existing runlevel links for the script /etc/init.d/name by renaming start links to stop link +# or stop link to start link with a sequence number equal to the difference of 100 minus the original sequence number. + if ls ${etcd}${lev}.d/${oldstartstop}*${bn} >/dev/null 2>&1; then + oldnn=`basename ${etcd}${lev}.d/${oldstartstop}*${bn}|cut -c2-3` + newnn=$[100-$oldnn] + [ $verbose -eq 1 ] && echo "rename ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} -> ${etcd}${lev}.d/${newstartstop}${newnn}${bn}" + if [ $notreally -eq 0 ];then + mv ${etcd}${lev}.d/${oldstartstop}${oldnn}${bn} ${etcd}${lev}.d/${newstartstop}${newnn}${bn} + fi + if [ $dostart -eq 1 ] && [ $newstartstop = "S" ] && [ $lev = $RUNLEVEL ]; then + $fn start || true + fi + fi + +} + +# function to disable/enable init script link +# $1 should be K/S, means to disable/enable +# $2 run level [S|2|3|4|5], optional, If no start runlevel is +# specified after the disable or enable keywords +# the script will attempt to modify links in all start runlevels +renamelinks() +{ + if [ $# -eq 2 ]; then + renamelink $1 $2 + else + for i in 2 3 4 5 S; do + renamelink $1 $i + done + fi +} + while [ $# -gt 0 ]; do case $1 in -n) notreally=1 @@ -221,6 +269,13 @@ case $1 in ;; start | stop) + if [ $# -lt 4 ] + then + echo "Not enough arguments" + usage + exit 1 + fi + while [ $# -gt 0 ]; do if [ $1 = "start" ]; then letter=S @@ -251,6 +306,32 @@ case $1 in makelinks ;; + enable | disable) + if [ $1 = "enable" ]; then + letter=S + elif [ $1 = "disable" ]; then + letter=K + else + usage + exit 1 + fi + shift + # + if [ $# -gt 0 ] + then + case $1 in + S|2|3|4|5) + renamelinks $letter $1 + ;; + *) + usage + exit 1 + ;; + esac + else + renamelinks $letter + fi + ;; *) usage exit 1 -- 2.7.4 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCH V3] update-rc.d: support enable/disable options
From: Changqing Li * update-rc.d has added support of enable/disable options, which are expected to keep the previous configuration even after upgrade the packages. With support for these options, it will only create start/stop link when there are none, or it will keep the previous configuration. Our preinst uses "-f remove" to remove any links under the /etc/rcrunlevel.d which is conflicting behavior with disable/enable options, so remove it. For example, if a user disabled one service before upgrade, then after upgrade the service could be started. This happens because during preinst, all links have been deleted, then postinst may create the link to start service. With this change, we remove preinst and therefore keep the previous links so that after upgrade, if a link existed for the package, then the postinst will not create new start/stop links. * remove '-f' for postinst. Previously, the keepalived recipe used 'remove' during postinst, so we needed the -f, but now the keepalived recipe has fixed this problem, so it's safe to remove '-f'. [Yocto #12955] Signed-off-by: Changqing Li --- documentation/ref-manual/ref-variables.xml | 2 +- meta/classes/update-rc.d.bbclass | 28 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index 536bd15..8fc48c3 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml @@ -7243,7 +7243,7 @@ to the update-rc.d command. For more information on valid parameters, please see the update-rc.d manual page at -. +. diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass index 265c4be..1366fee 100644 --- a/meta/classes/update-rc.d.bbclass +++ b/meta/classes/update-rc.d.bbclass @@ -20,28 +20,14 @@ def use_updatercd(d): return '[ -n "$D" -o ! -d /run/systemd/system ]' return 'true' -updatercd_preinst() { -if ${@use_updatercd(d)} && [ -z "$D" -a -f "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then - ${INIT_D_DIR}/${INITSCRIPT_NAME} stop || : -fi -if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then - if [ -n "$D" ]; then - OPT="-f -r $D" - else - OPT="-f" - fi - update-rc.d $OPT ${INITSCRIPT_NAME} remove -fi -} - PACKAGE_WRITE_DEPS += "update-rc.d-native" updatercd_postinst() { if ${@use_updatercd(d)} && type update-rc.d >/dev/null 2>/dev/null; then if [ -n "$D" ]; then - OPT="-f -r $D" + OPT="-r $D" else - OPT="-f -s" + OPT="-s" fi update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} fi @@ -79,7 +65,7 @@ python __anonymous() { PACKAGESPLITFUNCS_prepend = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'populate_packages_updatercd ', '', d)}" PACKAGESPLITFUNCS_remove_class-nativesdk = "populate_packages_updatercd " -populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_preinst updatercd_postinst" +populate_packages_updatercd[vardeps] += "updatercd_prerm updatercd_postrm updatercd_postinst" populate_packages_updatercd[vardepsexclude] += "OVERRIDES" python populate_packages_updatercd () { @@ -95,7 +81,7 @@ python populate_packages_updatercd () { d.appendVar('RDEPENDS_' + pkg, ' %sinitd-functions' % (mlprefix)) def update_rcd_package(pkg): -bb.debug(1, 'adding update-rc.d calls to preinst/postinst/prerm/postrm for %s' % pkg) +bb.debug(1, 'adding update-rc.d calls to postinst/prerm/postrm for %s' % pkg) localdata = bb.data.createCopy(d) overrides = localdata.getVar("OVERRIDES") @@ -103,12 +89,6 @@ python populate_packages_updatercd () { update_rcd_auto_depend(pkg) -preinst = d.getVar('pkg_preinst_%s' % pkg) -if not preinst: -preinst = '#!/bin/sh\n' -preinst += localdata.getVar('updatercd_preinst') -d.setVar('pkg_preinst_%s' % pkg, preinst) - postinst = d.getVar('pkg_postinst_%s' % pkg) if not postinst: postinst = '#!/bin/sh\n' -- 2.7.4 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto