[systemd-devel] stacked extension not working

Luca Boccassi bluca at debian.org
Fri Oct 15 12:23:14 UTC 2021


On Fri, 2021-10-15 at 12:18 +0000, Umut Tezduyar Lindskog wrote:
> Hi, following works for us (for reference, configuration is printed
> at the end)
>  
> portablectl --now attach --extension=./stackupper ./base stackupper
>  
> However, if we move the cat from base/usr/bin/cat to
> stackupper/bin/cat it is not working. Seems like we cannot include
> any library/executable in the extension.
>  
> Are we missing something? 
>  
>  
> root at osboxes:/home/osboxes/Development# tree base/
> base/
> ├──bin
> ├──dev
> ├──etc
> │   ├── machine-id
> │   ├── os-release
> │   └── resolv.conf
> ├──lib
> │   └── x86_64-linux-gnu
> │       └── libc.so.6
> ├──lib64
> │   ├──ld-2.32.so
> │   └── ld-linux-x86-64.so.2
> ├──proc
> ├──root
> ├──run
> ├──sys
> ├──tmp
> ├──usr
> │   ├──bin
> │   │   ├──cat
> │   │   ├──echo
> │   │   └── tree
> │   └── lib
> │       └── systemd
> │           └── system
> └── var
>     └── tmp
>  
> 18 directories, 9 files
>  
> root at osboxes:/home/osboxes/Development# tree stackupper/
> stackupper/
> ├──bin
> │   └── umut
> ├──dev
> ├──etc
> │   ├── machine-id
> │   ├── resolv.conf
> │   └── runtime
> ├──lib -> usr/lib
> ├──proc
> ├──root
> ├──run
> ├──sys
> ├──tmp
> ├──usr
> │   ├──bin
> │   └── lib
> │       ├──extension-release.d
> │       │   └── extension-release.base
> │       └── systemd
> │           └── system
> │               └── stackupper.service
> └── var
>     └── tmp
>  
> 17 directories, 6 files
>  
> root at osboxes:/home/osboxes/Development# cat
> stackupper/usr/lib/systemd/system/stackupper.service 
> [Service]
> Type=oneshot
> ExecStart=/usr/bin/cat /etc/os-release
> root at osboxes:/home/osboxes/Development#systemctl --version
> systemd 249 (249.4-1)
> +PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS -
> OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN +IPTC +KMOD
> +LIBCRYPTSETUP -LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2
> +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-
> hierarchy=unified

Hi,

You need to build your extension with the binaries under either the
/usr or /opt hierarchies. Legacy locations like /bin and /lib are
ignored. This is explained in the systemd-sysext.8 manpage.

-- 
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20211015/0f227c98/attachment-0001.sig>


More information about the systemd-devel mailing list