Hi Alex,
I´ve checked "run.do_install" and the installation command is available:
install -d
.../build/tmp/work/aarch64-tdx-linux/openssh/8.2p1-r0/image/home/root/.ssh
install -m 0600 .../build/keys/ssh/dev/id_hannah_ed25519.pub
.../build/tmp/work/aarch64-tdx-linux/openssh/8.2p1-r0/image/home/root/.ssh/authorized_keys
I also get a QA issue when I remove "FILES_{PN}" from the bbappend file and the
other commands from it were executed successfully. But the "authorized_keys"
file is still missing. I´ve changed the bbappend file in the following way
SRC_URI += " \
file://sshd_config \
"
do_install_append () {
install -m 0644 ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh
install -d ${D}${ROOT_HOME}/.ssh
install -m 0600 ${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_hannah_ed25519.pub
${D}${ROOT_HOME}/.ssh/authorized_keys
}
FILES_${PN} += "${ROOT_HOME}/.ssh/*"
> Alex Kiernan via lists.yoctoproject.org
> <[email protected]> hat am 26.02.2025 07:32 CET
> geschrieben:
>
>
> Where did you put your bbappend? If it's alongside the openssh recipe in core
> then it won't be parsed as the pattern there doesn't include *.bbappend:
>
> https://git.openembedded.org/openembedded-core/tree/meta/conf/layer.conf?h=dunfell#n4
>
> On Wed, 26 Feb 2025, 06:21 Daniel Kampert viahttp://lists.yoctoproject.org ,
> <[email protected]
> mailto:[email protected]> wrote:
>
> > Hi Alex,
> >
> > I´ve checked several files for informations.
> >
> > 1. log.do_rootfs: OpenSSH is added but I can´t see anything about my
> > modifications
> > 2. files-in-package.txt for aarch64-tdx-linux openssh gives me the
> > following output
> >
> > drwxr-xr-x root root 4096 ./home
> > drwx------ root root 4096 ./home/root
> > drwxr-xr-x root root 4096 ./home/root/.ssh
> > -rw------- root root 106 ./home/root/.ssh/authorized_keys
> >
> > 3. log.do_install doesn´t list my file
> >
> > Do you have any other tips?
> >
> > Thanks!
> >
> > > Alexander Kanavin viahttp://lists.yoctoproject.org
> > > <[email protected]
> > > mailto:[email protected]> hat am 25.02.2025 17:02 CET
> > > geschrieben:
> > >
> > >
> > > Either the needed changes aren't being packaged correctly (check
> > > ${WORKDIR}/packages-splt for openssh recipe), or the needed package
> > > isn't being installed into the image (check
> > > ${WORKDIR}/temp/log.do_rootfs for the image).
> > >
> > > Alex
> > >
> > > On Tue, 25 Feb 2025 at 16:06, Daniel Kampert via
> > >http://lists.yoctoproject.org
> > > <[email protected]
> > > mailto:[email protected]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I´m working on a Dunfell BSP (Toradex BSP5) and want to add and modify
> > > > the OpenSSH configuration. So I´ve added
> > > > "recipes-connectivity/openssh/openssh_%.bbappend" with this content
> > > >
> > > > FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
> > > >
> > > > # Apply the SSH configuration
> > > > # - Disable password authentication
> > > > # - Disable X11 forwarding
> > > > # - Enable public key authentication
> > > > do_install_append () {
> > > > sed -i -e 's:^#PubkeyAuthentication.*$:PubkeyAuthentication yes:g'
> > > > ${D}${sysconfdir}/ssh/sshd_config
> > > > sed -i -e 's:^#PasswordAuthentication.*$:PasswordAuthentication no:g'
> > > > ${D}${sysconfdir}/ssh/sshd_config
> > > > sed -i -e
> > > > 's:^#ChallengeResponseAuthentication.*$:ChallengeResponseAuthentication
> > > > no:g' ${D}${sysconfdir}/ssh/sshd_config
> > > > sed -i -e 's:^#UsePAM.*$:UsePAM no:g'
> > > > ${D}${sysconfdir}/ssh/sshd_config
> > > > sed -i -e 's:^#X11Forwarding.*$:X11Forwarding no:g'
> > > > ${D}${sysconfdir}/ssh/sshd_config
> > > >
> > > > install -d 0700 ${D}${ROOT_HOME}/.ssh
> > > > install -m 0600 "${TOPDIR}/keys/ssh/${DEPLOY_ENV}/id_ed25519.pub"
> > > > ${D}${ROOT_HOME}/.ssh/authorized_keys
> > > > }
> > > > FILES_${PN} += "${ROOT_HOME}/.ssh/*"
> > > >
> > > > And I added TASK_BASIC_SSHDAEMON = "openssh-sshd openssh-sftp
> > > > openssh-sftp-server" to my OS configuration. The generated image
> > > > contains OpenSSH (I´ve checked the version) but no authorized_keys or
> > > > modified configuration.
> > > >
> > > > What is wrong here?
> > > >
> > > > Mit freundlichen Grüßen / With kind regards
> > > >
> > > > Ing. Daniel Kampert, M. Sc.
> > > > Embedded Systems Solutions
> > > > Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
> > > > Phone: +49 (0)174 6932561
> > > > E-Mail: [email protected] mailto:[email protected]
> > > > Web:http://www.daniel-kampert.de
> > > >
> > > >
> > > >
> > >
> > >
> >
> > Mit freundlichen Grüßen / With kind regards
> >
> > Ing. Daniel Kampert, M. Sc.
> > Embedded Systems Solutions
> > Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
> > Phone: +49 (0)174 6932561
> > E-Mail: [email protected] mailto:[email protected]
> > Web: http://www.daniel-kampert.de (https://www.daniel-kampert.de)
> >
> >
> >
> >
>
>
>
>
Mit freundlichen Grüßen / With kind regards
Ing. Daniel Kampert, M. Sc.
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
Phone: +49 (0)174 6932561
E-Mail: [email protected] mailto:[email protected]
Web: www.daniel-kampert.de https://www.daniel-kampert.de
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64877): https://lists.yoctoproject.org/g/yocto/message/64877
Mute This Topic: https://lists.yoctoproject.org/mt/111378266/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-