Hi OpenWrt developers,
I am writing this email to the OpenWrt-Dev mailing list only because I have the 
hope OpenWrt & LEDE will merge soon.. both versions are affected of the 
following.

On PirateBox & LibraryBox we are not using extroot techniques to enhance the 
firmware space, but we make use of the command

  opkg -d <dest>

We put the extended space into a file on the mounted FAT-USB stick, which is 
mounted via a looback device. The advantage for the Linux inexperienced 
PirateBox/LibraryBox users (focused group) is that they can easily exchange the 
USB stick (copy & paste) instead of dd'ing partitions or handling ext4 
filesystems.

Yes, not every package has support for this, so I created a bunch of packages 
which bring those packages to life and it worked quite well on AA. 
I created shell extension to honour additional lib folder and extended PATH 
variable.. in additional to various linking from the rootfs to the extended 
space (/usr/local).
Mostly all of this handling was done in the postinst package step.

opkg propagates the -d destination to the package via the environment variable 
PKG_ROOT , not IPKG_INSTROOT . 
The package relevant information (opkg/info folder) is stored in 
$PKG_ROOT/usr/lib/opkg/info/

As far as I traced back the changes, with BB (or CC) a change was introduced 
and the package-postinst step was divided into postinst and postinst.pkg. 

How the default postinst function is written, it does not use PKG_ROOT in any 
case.
This change broke the -d function nearly completely, because

 a) PKG_ROOT is not used for the access to the info & control files
 b) postinst.pkg scripts are only executed from the / folder and $IPKG_INSTROOT 
 ; but the 


BTW: in current trunk 
(https://dev.openwrt.org/browser/trunk/package/base-files/files/lib/functions.sh)is
 a merge error @line 223 ; the section is duplicated in the source.


I am close to manually patch the file during our imagebuilder processing to 
solve the issues for the LibraryBox & PirateBox projects... but I am willing to 
provide a proper solution upstream.

Question: 
Does it makes sense for you to fix that, or is "opkg -d" more like an unwanted 
feature which will be removed in the future? 
(because classical extroot is "more convenient") 


Thank you,
Best regards
Matthias Strubel

BTW2: In addition, the default_postinst automatically enables new init.d .. 
even this is an unwanted behaviour, there is no way to avoid the 
auto-activation :-/

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to