On Wed, Jun 05, 2019 at 02:54:19PM +0200, Juergen Borleis wrote: > 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 <j...@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).
I've applied this patch without the documentation changes. Please add it to the volatile /var patch. I've also applied several other patches that don't add a StateDirectory or similar. Please rebase the rest. Michael > > 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 -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de