| Both sides previous revision Previous revision Next revision | Previous revision |
| andrewpantyukhin:linkfarming [2006/07/29 21:41] – AndrewPantyukhin | andrewpantyukhin:linkfarming [2022/10/04 00:55] (current) – Chase page rename KubilayKocak |
|---|
| ===== Linkfarming ===== | ===== Linkfarming ===== |
| |
| Linkfarming is a technique employed by ["XPI"] and ["NPAPI"] ports ("miniports") for greater flexibility in installation. | Linkfarming is a technique employed by XPI and [[AndrewPantyukhin/NPAPI]] ports ("miniports") for greater flexibility in installation. |
| |
| Each miniport is installed in LOCALBASE/lib///infra///ID/ (where //infra// is either "xpi" or "npapi", and ID is unique for each miniport). Symlinks are then farmed in apps, usually lib///appname///{extensions,plugins}/. Once there was an idea to make a separate port, to support advanced linkfarming - allowing user to tune which miniports go to which apps, and to allow packages to invoke linkfarming. We've come to an arguably simpler solution. | Each miniport is installed in LOCALBASE/lib///infra///ID/ (where //infra// is either "xpi" or "npapi", and ID is unique for each miniport). Symlinks are then farmed in apps, usually lib///appname///{extensions,plugins}/. Once there was an idea to make a separate port, to support advanced linkfarming - allowing user to tune which miniports go to which apps, and to allow packages to invoke linkfarming. We've come to an arguably simpler solution. |
| |
| There is a folder named LOCALBASE/lib///infra///**symlinks**/. In it, folders for each app (symlinks/firefox/, symlinks/linux-flock/, ...) In each of those, symlinks which can be copied verbatim into apps. Miniports only have to make one more linkfarming, while apps can just exec the following line on install/upgrade to instantly get all the miniports they are supposed to get: | There is a folder named LOCALBASE/lib///infra///**symlinks**/. In it, folders for each app (symlinks/firefox/, symlinks/linux-flock/, ...) In each of those, symlinks which can be copied verbatim into apps. Miniports only have to make one more linkfarming, while apps can just exec the following line on install/upgrade to instantly get all the miniports they are supposed to get: |
| ''%%cp -R LOCALBASE/lib/''infra''/symlinks/''appname''/ PREFIX/lib/''appname''/{extensions,plugins}/%%'' | ''%%cp -R LOCALBASE/lib/infra/symlinks/appname/ PREFIX/lib/appname/{extensions,plugins}/%%'' |
| |
| Linkfarming is important as we might employ it in development of a new-generation packaging architecture. Systems like [http://www.sepp.ee.ethz.ch/ SEPP] offer great flexibility in shlib management, requiring copies of libs kept along within each package. Symlinking can solve the disk space issue and provide for some design improvements. Consider this XPI/NPAPI linkfarming effort as a useful playground serving for development of simple, but powerful techniques. | Linkfarming is important as we might employ it in development of a new-generation packaging architecture. Systems like [[http://www.sepp.ee.ethz.ch/|SEPP]] offer great flexibility in shlib management, requiring copies of libs kept along within each package. Symlinking can solve the disk space issue and provide for some design improvements. Consider this XPI/NPAPI linkfarming effort as a useful playground serving for development of simple, but powerful techniques. |
| |
| ==== Smart linkfarming in detail ==== | ==== Smart linkfarming in detail ==== |