From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 18/20] opkg: move opkg-database to a read-only location
Date: Wed, 5 Jun 2019 14:54:19 +0200 [thread overview]
Message-ID: <20190605125421.20087-19-jbe@pengutronix.de> (raw)
In-Reply-To: <20190605125421.20087-1-jbe@pengutronix.de>
The directory tree in '/var/lib' might not be persistent and thus,
not in sync with the root filesystem. In this case it's required
to store the opkg database at a location which has a fixed
relation to the root filesystem's content it describes.
This change moves the opkg's database to a read-only location in
'/usr/share/opkg', which is then always in sync with the root
filesystem's content.
This changed opkg configuration works since commit
a691341deb33077b9d5ede5fe349ee6b3fb99be1
"ptxd_make_image_extract_xpkg_files: use ptxd_get_alternative to find opkg.conf"
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
doc/daily_work.inc | 3 +--
projectroot/etc/opkg/opkg.conf | 7 ++++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 470c14f93..58cf69f49 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1426,8 +1426,7 @@ This is a very simple and optimistic approach and works for surprisingly many us
cases. But some applications expect a writable ``/var/lib`` and will fail due
to this setup. Using an additional RAM disk for ``/var/lib`` might not help in
this use case, because it will bury all build-time generated data already present
-in this directory tree (``opkg`` package information for example or other
-packages pre-defined configuration files).
+in this directory tree (package pre-defined configuration files for example).
Overlay RAM Disk
~~~~~~~~~~~~~~~~
diff --git a/projectroot/etc/opkg/opkg.conf b/projectroot/etc/opkg/opkg.conf
index 3ba17115b..67a64838f 100644
--- a/projectroot/etc/opkg/opkg.conf
+++ b/projectroot/etc/opkg/opkg.conf
@@ -6,7 +6,12 @@
@SRC@
dest root /
-option lock_file /var/lock/opkg.lock
+option lock_file /run/lock/opkg.lock
+
+# move away the ipkg database from the default "/var/lib/opkg" to a r/o location
+option lists_dir /usr/share/opkg/lists
+option status_file /usr/share/opkg/status
+option info_dir /usr/share/opkg/info
arch @ARCH@ 10
arch all 1
--
2.20.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2019-06-05 12:54 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 12:54 [ptxdist] More collected changes Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 01/20] rootfs: keep /var writable, even if the rootfs is read-only Juergen Borleis
2019-06-24 6:48 ` [ptxdist] [PATCH] fixup! " Michael Olbrich
2019-06-24 6:57 ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 02/20] rootfs: keep '/var/tmp' permissions in sync with 'systemd' Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 03/20] rootfs: '/var' is a mandatory directory according to FHS Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 04/20] conman: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-11 8:17 ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 05/20] networkmanager: " Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 06/20] ntp: adapt package's '/var/lib' and '/var/log' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 07/20] dnsmasq: version bump 2.79 -> 2.80 Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 08/20] dnsmasq: clean up rule file Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 09/20] dnsmasq: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 10/20] mariadb: " Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 11/20] samba: adapt package's '/var/lib' and '/var/cache' requirements Juergen Borleis
2019-06-07 7:15 ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 12/20] polkit: adapt package's '/var/lib' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 13/20] nfsutils: " Juergen Borleis
2019-06-07 7:25 ` Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 14/20] logrotate: " Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 15/20] systemd: adapt package's '/var/lib' and '/var/cache' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 16/20] sysstat: adapt package's '/var/log' requirements Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 17/20] minicoredumper: adapt package's '/var/cache' requirements Juergen Borleis
2019-06-07 7:27 ` Michael Olbrich
2019-06-05 12:54 ` Juergen Borleis [this message]
2019-06-11 8:19 ` [ptxdist] [PATCH 18/20] opkg: move opkg-database to a read-only location Michael Olbrich
2019-06-05 12:54 ` [ptxdist] [PATCH 19/20] dbus: adapt run-time socket path Juergen Borleis
2019-06-05 12:54 ` [ptxdist] [PATCH 20/20] Update and sync autotools based package templates Juergen Borleis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190605125421.20087-19-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox