All of lore.kernel.org
 help / color / mirror / Atom feed
* read-only-rootfs and opkg
@ 2024-09-16 10:00 Martin Siegumfeldt
  2024-09-17 15:57 ` [EXTERNAL] [yocto] " Stewart, Alex
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Siegumfeldt @ 2024-09-16 10:00 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]

Hi all,

I am trying to realize a rootfs backed by opkg as package manager. It appears that the opkg meta-data is directed to a volatile mount (triggered by read-only-rootfs feature in order to achieve write access I assume):

$ tail -5 /etc/opkg/opkg.conf
# Default destination for installed packages
dest root /
option lists_dir   /var/lib/opkg/lists
option info_dir    /var/lib/opkg/info
option status_file /var/lib/opkg/status

$ mount | grep var/lib
overlay on /var/lib type overlay (rw,relatime,lowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work)

$ find /var/lib/opkg/ | head
/var/lib/opkg/
/var/lib/opkg/status
/var/lib/opkg/info
/var/lib/opkg/info/vim-tiny.list
/var/lib/opkg/info/libdaemon0.list
/var/lib/opkg/info/coreutils.prerm
/var/lib/opkg/info/busybox-syslog.control
/var/lib/opkg/info/libc6.postinst
/var/lib/opkg/info/libmount1.list
/var/lib/opkg/info/libpcap1.postinst

Consequently, any updated meta-data do no persist across reboots.

I have attempted to assign 'OPKGLIBDIR' to a R/W mount:

OPKGLIBDIR ?= "/data-os/opkg"

, which does appear to update the conf file:

$ tail -5 /etc/opkg/opkg.conf
# Default destination for installed packages
dest root /
option lists_dir   /data-os/opkg/opkg/lists
option info_dir    /data-os/opkg/opkg/info
option status_file /data-os/opkg/opkg/status
but meta-data still appears to reside with '/var/lib'

but meta-data still appears residing within '/var/lib':

$ find /data-os/opkg/
/data-os/opkg/
/data-os/opkg/opkg
/data-os/opkg/opkg/info

$ find /var/lib/opkg/ | head
/var/lib/opkg/
/var/lib/opkg/status
/var/lib/opkg/info
/var/lib/opkg/info/vim-tiny.list
/var/lib/opkg/info/libdaemon0.list
/var/lib/opkg/info/coreutils.prerm
/var/lib/opkg/info/busybox-syslog.control
/var/lib/opkg/info/libc6.postinst
/var/lib/opkg/info/libmount1.list
/var/lib/opkg/info/libpcap1.postinst

and opkg appears broken (as nothing is indicated installed):

$ opkg list-installed; echo $?
0

To clarify, I imagine a process where the ipk file is uploaded to the device, after which the rootfs is remounted R/W and ipk installed/updated through opkg. Installation/update do succeed, but the meta-data do not persist as inteded.

Note, I am on baseline Langdale, no obvious changes seem to have been pushed to master though.

Am I missing any available configuration to achieve this?
Thanks,
Martin

[-- Attachment #2: Type: text/html, Size: 3164 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-20 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-16 10:00 read-only-rootfs and opkg Martin Siegumfeldt
2024-09-17 15:57 ` [EXTERNAL] [yocto] " Stewart, Alex
2024-09-18  8:39   ` Martin Siegumfeldt
2024-09-18 14:49     ` [EXTERNAL] " Stewart, Alex
2024-09-20 12:30       ` Martin Siegumfeldt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.