Both sides previous revisionPrevious revisionNext revision | Previous revision |
dcore:extension_strategies [2016/11/07 23:00] – [Creating Personal Extensions] nitram | dcore:extension_strategies [2018/12/11 08:14] (current) – [Locales and Languages] link inserted sm8ps |
---|
====== Advanced dCore SCE Strategies ====== | ====== Advanced dCore SCE Strategies ====== |
| |
**>> UNDER RENOVATION <<** | |
| |
===== Overview ===== | ===== Overview ===== |
| |
http://forum.tinycorelinux.net/index.php/topic,20413.msg127208.html#msg127208 | http://forum.tinycorelinux.net/index.php/topic,20413.msg127208.html#msg127208 |
| |
| **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** |
| |
| ===== Boot Code nomd5 ===== |
| The nomd5 boot code skips md5sum checking of boot time SCEs, slightly improving boot speed. Loading SCEs during runtime, using ''sce-load'' and OnDemand, will also be slightly faster. In a test system, using the nomd5 boot code resulted in a 6% faster boot time (measured from boot loader to boot screen). To determine approximate boot time improvement, run ''time /bb/md5sum SCE.sce'' against all sceboot.lst SCEs. The combined total of these timed md5sum tests will give the approximate boot time improvement. |
| |
| By default SCE md5sum checks are performed during loading to ensure SCE integrity. As such, the nomd5 boot code should not be used if there are system security concerns, such as potential tampering within the SCE directory. For systems with high security priority, the SCE *.md5.txt files could be saved securely and periodically checked against the actual extension. The process could be automated using a relatively simple script. This backup and check process would need to be repeated whenever SCEs are updated. |
| |
**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** | **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** |
| |
===== Locales and Languages ===== | ===== Locales and Languages ===== |
*insert locale wiki page link here | * cf. relevant [[http://wiki.tinycorelinux.net/dcore:installations#dcore_localisation|wiki pages]] |
| |
**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** | **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** |
| |
# UPDATEDEBINXMODE is default and not needed to be specified here. | # UPDATEDEBINXMODE is default and not needed to be specified here. |
| |
| # Use SAFEBACKUP=TRUE to backup SCE(s) in /etc/sysconfig/tcedir/sce/backup/ |
| # during re-import. Ensure adequate freespace, manually purge backups. |
| SAFEBACKUP=FALSE |
| |
# Use NICE=19 for the most cpu friendly use of sce-import and sce-update. | # Use NICE=19 for the most cpu friendly use of sce-import and sce-update. |
**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** | **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** |
| |
| ===== Version Conflicts ===== |
| As SCEs are self-contained the potential for dependency version conflicts between loaded SCEs exist. If different SCEs have a common dependency, a frequent occurrence, but were not imported or updated at the same time, one SCE may still be using an older dependency version while another has the updated version. |
| |
| Although rare, this may cause extension breakage if two or more SCEs with out of sync dependency versions are loaded at the same time. More concerning is a potential security issue, as there is no guarantee loaded SCEs that use common dependencies are all using the most up to date security releases. |
| |
| Strategies to avoid dependency version conflicts: |
| * Import all SCEs using list file(s) and/or dependency chains to minimize dependency duplication (discussed above). |
| * Periodically run ''sce-update -a'' (see [[http://wiki.tinycorelinux.net/dcore:sce-update_command|dCore sce-update Command]]) to ensure all SCEs are updated at the same time. |
| * Periodically manually re-import all SCEs. The ''sce-update'' check process is CPU intensive and most SCEs will receive security updates during a longer time frame. If the SCEs were not update checked for some time, it may be quickest to periodically re-import all system SCEs manually, for example monthly. The re-import will ensure updated dependencies are utilized. |
| |
| ===== Broken SCEs ===== |
| SCEs imported with advanced techniques, particularly using /etc/sysconfig/sce.purge, may break extensions. Prior to reporting extension problems on the forum, the problematic SCE and any dependency SCEs should be re-imported using the -z option (ignore locale.nopurge, sce.purge, sceconfig files), reboot and re-tested. |
| |
===== Creating Personal Extensions ===== | ===== Creating Personal Extensions ===== |
As an abundance of software is available from Debian/Ubuntu repositories, it is rarely necessary to create a personal extension. It is, nonetheless, occasionally desirable. Possible reasons for creating personal SCE extensions: | As an abundance of software is available from Debian/Ubuntu repositories, it is rarely necessary to create a personal extension. It is, however, occasionally desirable, possible reasons include: |
*Developed own application. | *Developed own application. |
*Using an application not available in Debian/Ubuntu repositories. | *Using an application not from Debian/Ubuntu repositories. |
*Would prefer to custom compile software instead of using repository's version. | *Prefer to custom compile software instead of using repository's version. |
*Avoid cluttering the home directory, keep backup size small. | *Avoid cluttering the home directory with personal data, keep backup size small. |
| |
Creating a personal data or software SCE extension is straightforward. The [[http://wiki.tinycorelinux.net/dcore:sce-import_command|dCore sce-import]] and [[http://wiki.tinycorelinux.net/dcore:ppa-deb2sce_command|dCore sce-deb2sce]] commands use ''mksquashfs'' to create the final squashfs (squash filesystem) SCE extension. This ''mksquashfs'' command is built-in and does not need to be imported separately like Tiny Core's //squashfs-tools//. | Creating a personal data or software SCE extension is straightforward. The [[http://wiki.tinycorelinux.net/dcore:sce-import_command|dCore sce-import]] and [[http://wiki.tinycorelinux.net/dcore:ppa-deb2sce_command|dCore sce-deb2sce]] commands use ''mksquashfs'' to create the final squashfs (squash filesystem) SCE extension. This ''mksquashfs'' command is built-in and does not need to be imported separately, like Tiny Core's //squashfs-tools//. |
| |
Useful resources for creating extensions: | Useful resources for creating extensions: |
*Tiny Core wiki -> Creating Extensions: http://wiki.tinycorelinux.net/wiki:creating_extensions | *Tiny Core wiki -> Creating Extensions: http://wiki.tinycorelinux.net/wiki:creating_extensions |
| |
Regarding the Creating Extensions wiki link, most of these steps are not required as the extension will not be submitted to a repository. Instead of a Tiny Core '*.sce' extension it's a dCore '*.sce' extension. The extension requires an *.md5.txt file in order for it to be processed using the [[http://wiki.tinycorelinux.net/dcore:sce-load_command|dCore sce-load Command]]. To be fully utilized by the system, personal extensions should be placed in /etc/sysconfig/tcedir/sce/. It is highly recommended than an SCE name be chosen that does NOT match an existing Debian/Ubuntu package to avoid conflicts when updating the system. When creating personal software extensions, ensure any required dependencies are also loaded. | Regarding the Creating Extensions wiki link, most steps are not required as the extension will not be submitted to a repository. Instead of a Tiny Core '*.tcz' extension it's a dCore '*.sce' extension. An existing '*.tcz' extension can simply be renamed as an '*.sce'. The extension requires an *.md5.txt file in order for it to be processed using the [[http://wiki.tinycorelinux.net/dcore:sce-load_command|dCore sce-load Command]]. To be fully utilized by the system, personal extensions can be placed in /etc/sysconfig/tcedir/sce/. Ensure the choosen SCE name does not match an existing Debian/Ubuntu package to avoid conflicts when updating the system. When creating personal software extensions, ensure required dependencies are also loaded. |
| |
Basic commands: | Basic commands: |
mksquashfs /tmp/my_application /tmp/my_application.sce | mksquashfs /tmp/my_application/ /tmp/my_application.sce |
md5sum /tmp/my_application.sce > /tmp/my_application.sce.md5.txt | md5sum /tmp/my_application.sce > /tmp/my_application.sce.md5.txt |
mv my_application.* /etc/sysconfig/tcedir/optional | mv my_application.* /etc/sysconfig/tcedir/sce/ |
sce-ondemand my_application | sce-load my_application |
| |
Note there is no need to submit extensions to a repository. Recommend keeping a backup on other media for safekeeping. If there is some important software that may be useful for other dCore users, not available in the Debian/Ubuntu repositories, bring this to the attention of the dCore developer, forum member Jason W, for possible consideration of adding it to dCore's pre-built repository (see [[http://wiki.tinycorelinux.net/dcore:sce-searchprebuilt_command|dCore sce-searchprebuilt Command]]). | Note there is no need to submit extensions to a repository. Recommend backing up personal extensions on other media for safekeeping. If the purpose of a personal extension is for a small executable, it can alternatively be placed in ~/.local/bin. If there is some //essential// software that may be useful for other dCore users, not available in the Debian/Ubuntu repositories, bring this to the attention of the dCore developer, forum member Jason W, for consideration of adding it to dCore's pre-built repository (see [[http://wiki.tinycorelinux.net/dcore:sce-searchprebuilt_command|dCore sce-searchprebuilt Command]]). |
| |
==== Version Conflicts ==== | **[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** |
Contrary to the above-said, there does exist some potential for conflicts between different versions of one and the same package in different extensions. Thus it is important to keep the extensions up to date by [[dcore:handling_extensions#sce-update]]. | |
| |
==== Broken SCEs ==== | |
SCEs imported with advanced techniques, particularly using /etc/sysconfig/sce.purge, may break extensions. Prior to reporting extension problems on the forum, the problematic SCE and any dependency SCEs should be re-imported using the -z option (ignore locale.nopurge, sce.purge, sceconfig files), reboot and re-tested. | |
| |
**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]** | |