Creating a UCI Extension
From DSL Wiki
This page in other languages: chinese
The hardest part of creating a uci has nothing to do with compressing them. The hardest part is to make a self-contained application under /opt.
Because openoffice and firefox are pretty much self contained and are under /opt they were good test cases. Also, the uci has a limitiation of being read-only. That is why there is a user.tar.gz. Those parts that require updates can be "linked" into a writeable directory. The user.tar.gz file is really an additional MyDSL extension included within the uci. When the uci is mounted the system looks inside the mount for a user.tar.gz ("user.tar.gz" is the literal filename) and then performs a mydsl-load on that tar.gz. This makes for an easy single file download and load. The user.tar.gz file is optional, and generally includes a desktop icon, menu item, and any personal configs if your application requires but does not create them itself. This file must be built in the same way as a *.tar.gz extension, including full paths and proper file ownerships/permissions.
Sometimes you will be required to make a shell wrapper to start the app, as being self-contained implies that the application's libraries are also stored locally with the application. This usually implies requiring a LD_LIBRARY_PATH and sometimes a PATH change, thus the shell wrapper. Anyway, make the app. Test it as a .tar.gz. Once the app is working then to make a uci do the following.
1. The app is installed and runs properly from the /opt/your_app directory.
2. become root
3. cd /opt
4. mkisofs -R -hide-rr-moved your_app | create_compressed_fs - 65536 > /mnt/somedrive/your_app.uci
To change/update a UCI file do the following: (example here is firefox.uci)
1. mount the uci as normal
2. mkdir work
3. cd work
4. cp -a /opt/firefox/.
5. cd firefox
6. mkdir user
7. cd user
8. tar -zxvf ../user.tar.gz
9. tar -ztf ../user.tar.gz > list
10. -- now edit the actual files as needed --
11. -- be sure to edit/update the "list"
12. tar -T list --numeric-owner --no-recursion -czvf ../user.tar.gz
13. cd ..
14. rm -rf user
15. cd ..
16. mkisofs -R -hide-rr-moved -cache-inodes -pad firefox/|create_compressed_fs - 65536 > ../firefox.uci
17. cd ..
18. rm -rf work
(Thanks to Robert Shingledecker)