Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dcore:handling_extensions [2016/07/16 21:15] – [Additional Repositories] nitramdcore:handling_extensions [2018/07/13 15:25] (current) volkerp
Line 1: Line 1:
  
 ===== dCore SCE Overview ===== ===== dCore SCE Overview =====
- 
 An SCE (self-contained extension) consists of a converted Debian package and all it's dependencies, packed into it's own file system and compressed into a single file (SquashFS). The [[http://wiki.tinycorelinux.net/dcore:sce-import_command|dCore sce-import Command]] is used to download files and create SCEs. An SCE (self-contained extension) consists of a converted Debian package and all it's dependencies, packed into it's own file system and compressed into a single file (SquashFS). The [[http://wiki.tinycorelinux.net/dcore:sce-import_command|dCore sce-import Command]] is used to download files and create SCEs.
  
Line 9: Line 8:
  
 ===== dCore TCE (/tce/) Directory ===== ===== dCore TCE (/tce/) Directory =====
- 
 The /tce/ (Tiny Core extension) directory is utilized to create and store SCE extensions. This is why the ''tce-setdrive'' command is used during installation to set up a persistent system. This allows extensions and related data to be stored for re-use, rather than having to re-install them with every fresh boot (ie. typical 'live' boot). The /etc/sysconfig/tcedir/ (/tce/) directory is actually a [[https://en.wikipedia.org/wiki/Symbolic_link|symbolic link]]. Exploring dCore's directory structure after installation will reveal that /etc/sysconfig/tcedir/ may be the same as /mnt/sda1/tce/ or whatever partition is used for the installation. The /tce/ (Tiny Core extension) directory is utilized to create and store SCE extensions. This is why the ''tce-setdrive'' command is used during installation to set up a persistent system. This allows extensions and related data to be stored for re-use, rather than having to re-install them with every fresh boot (ie. typical 'live' boot). The /etc/sysconfig/tcedir/ (/tce/) directory is actually a [[https://en.wikipedia.org/wiki/Symbolic_link|symbolic link]]. Exploring dCore's directory structure after installation will reveal that /etc/sysconfig/tcedir/ may be the same as /mnt/sda1/tce/ or whatever partition is used for the installation.
  
Line 30: Line 28:
  
 ==== dCore Import (/tce/import/) Sub-Directory ==== ==== dCore Import (/tce/import/) Sub-Directory ====
- 
 The /tce/import/ directory contains the sub-directories /debinx/ and /debs/. The /tce/import/ directory contains the sub-directories /debinx/ and /debs/.
  
-The /tce/debinx/ directory contains numerous plain text database files used by dCore to import and update SCEs:+The /tce/import/debinx/ sub-directory contains numerous plain text database files used by dCore to import and update SCEs:
   *KEEPDOC: Lists packages that should always keep documentation files when imported.   *KEEPDOC: Lists packages that should always keep documentation files when imported.
  
   *NEWDEBINX and OLDDEBINX: Both large files will be present if ''sce-update -a'' was previously run, which moves NEWDEBINX to OLDDEBINX and creates a fresh NEWDEBINX. They contain information on all packages in the dCore and Debian or Ubuntu repositories. Used and compared to determine whether updates are available.   *NEWDEBINX and OLDDEBINX: Both large files will be present if ''sce-update -a'' was previously run, which moves NEWDEBINX to OLDDEBINX and creates a fresh NEWDEBINX. They contain information on all packages in the dCore and Debian or Ubuntu repositories. Used and compared to determine whether updates are available.
  
-  *PKDADDDEP: Lists extra dependencies for specific packages to help them run in dCore, from http://tinycorelinux.net/dCore/import/PKGADDDEP.+  *PKGADDDEP: Lists extra dependencies for specific packages to help them run in dCore, from http://tinycorelinux.net/dCore/import/PKGADDDEP.
  
   *PKGDATAFILEMD5SUMLIST: An md5sum database of data and deb2sce files used during import, from http://tinycorelinux.net/dCore/import/PKGDATAFILEMD5SUMLIST.   *PKGDATAFILEMD5SUMLIST: An md5sum database of data and deb2sce files used during import, from http://tinycorelinux.net/dCore/import/PKGDATAFILEMD5SUMLIST.
Line 60: Line 57:
   **_main_i386_Packages and *_security_i386_Packages: See [[http://wiki.tinycorelinux.net/dcore:handling_extensions?&#dcore_repositories|dCore Repositories]] below.   **_main_i386_Packages and *_security_i386_Packages: See [[http://wiki.tinycorelinux.net/dcore:handling_extensions?&#dcore_repositories|dCore Repositories]] below.
  
-The /tce/debs/ sub-directory contains all *.deb and *.tar.gz files downloaded and utilized to import and update SCEs. As SCEs are updated or removed, over time the directory may contain deprecated files or those no longer needed by any existing SCE. These files can be purged to reclaim drive space using the [[http://wiki.tinycorelinux.net/dcore:sce-debpurge_command|dCore sce-debpurge Command]].+The /tce/import/debs/ sub-directory contains all *.deb and *.tar.gz files downloaded and utilized to import and update SCEs. As SCEs are updated or removed, over time the directory may contain deprecated files or those no longer needed by any existing SCE. These files can be purged to reclaim drive space using the [[http://wiki.tinycorelinux.net/dcore:sce-debpurge_command|dCore sce-debpurge Command]].
  
 ==== dCore OnDemand (/tce/ondemand/) Sub-Directory ==== ==== dCore OnDemand (/tce/ondemand/) Sub-Directory ====
- 
 SCEs available OnDemand have startup scripts in /etc/sysconfig/tcedir/ondemand/. The script is automatically generated when the [[dCore:sce-import_command|dCore sce-import Command]] or [[dCore:sce-ondemand_command|dCore sce-ondemand Command]] is used to add a new or existing SCE to Ondemand (eg. ''sce-import -o firefox'', ''sce-ondemand firefox''). Example of a typical autogenerated OnDemand script: SCEs available OnDemand have startup scripts in /etc/sysconfig/tcedir/ondemand/. The script is automatically generated when the [[dCore:sce-import_command|dCore sce-import Command]] or [[dCore:sce-ondemand_command|dCore sce-ondemand Command]] is used to add a new or existing SCE to Ondemand (eg. ''sce-import -o firefox'', ''sce-ondemand firefox''). Example of a typical autogenerated OnDemand script:
   #!/bin/sh   #!/bin/sh
Line 75: Line 71:
  
 ==== dCore SCE (/tce/sce/) Sub-Directory ==== ==== dCore SCE (/tce/sce/) Sub-Directory ====
- 
 Imported SCEs are stored in /etc/sysconfig/tcedir/sce/ and only become usable when loaded. Each SCE extension will also have it's own *.sce.debinx and *.sce.md5.txt files. The *.sce.debinx file contains the md5sum of the /etc/sysconfig/tcedir/import/debinx/NEWDEBINX (Debian Index) database file used to create the SCE when first imported or re-imported during an update. This provides a quick update check mechanism. If the md5sum of a refreshed NEWDEBINX database file (refreshes when running ''sce-update'') still matches the md5sum listed in the SCE's *.sce.debinx file then the NEWDEBINX package database has not changed since the SCE was imported and a formal update check is not required. This is why an SCE update check sometimes completes almost instantaneously! Imported SCEs are stored in /etc/sysconfig/tcedir/sce/ and only become usable when loaded. Each SCE extension will also have it's own *.sce.debinx and *.sce.md5.txt files. The *.sce.debinx file contains the md5sum of the /etc/sysconfig/tcedir/import/debinx/NEWDEBINX (Debian Index) database file used to create the SCE when first imported or re-imported during an update. This provides a quick update check mechanism. If the md5sum of a refreshed NEWDEBINX database file (refreshes when running ''sce-update'') still matches the md5sum listed in the SCE's *.sce.debinx file then the NEWDEBINX package database has not changed since the SCE was imported and a formal update check is not required. This is why an SCE update check sometimes completes almost instantaneously!
  
Line 85: Line 80:
  
 The /sce/ directory also contains an /sce/update/ sub-directory, which is used to temporarily store updated SCEs until system reboot (see [[http://wiki.tinycorelinux.net/dcore:sce-update_command|dCore sce-update Command]]). To clarify, the /update/ sub-directory only contains updated SCEs when the outdated version was already loaded into RAM. If the SCE has not been loaded since boot, upon updating it will directly replace the old version in the /sce/ directory, rather than place it in the /update directory. So if an already loaded SCE is updated a reboot is necessary to use the updated version. However, if the SCE has not yet been loaded, then gets updated, loading the SCE after the update will load the updated version without the need to reboot. In reality it is more complex, as SCEs often contain the same dependencies as other SCEs, a non-updated and loaded extension may already have the outdated dependency loaded. For a security conscious user, the only true way to ensure all loaded libraries are fully up to date is to run [[http://wiki.tinycorelinux.net/dcore:sce-update_command|''sce-update -a'']] (update all SCEs) then reboot. The /sce/ directory also contains an /sce/update/ sub-directory, which is used to temporarily store updated SCEs until system reboot (see [[http://wiki.tinycorelinux.net/dcore:sce-update_command|dCore sce-update Command]]). To clarify, the /update/ sub-directory only contains updated SCEs when the outdated version was already loaded into RAM. If the SCE has not been loaded since boot, upon updating it will directly replace the old version in the /sce/ directory, rather than place it in the /update directory. So if an already loaded SCE is updated a reboot is necessary to use the updated version. However, if the SCE has not yet been loaded, then gets updated, loading the SCE after the update will load the updated version without the need to reboot. In reality it is more complex, as SCEs often contain the same dependencies as other SCEs, a non-updated and loaded extension may already have the outdated dependency loaded. For a security conscious user, the only true way to ensure all loaded libraries are fully up to date is to run [[http://wiki.tinycorelinux.net/dcore:sce-update_command|''sce-update -a'']] (update all SCEs) then reboot.
 +
 +**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]**
  
 ===== dCore sceboot.lst ===== ===== dCore sceboot.lst =====
- 
 SCEs loaded at boot time are listed in /etc/sysconfig/tcedir/sceboot.lst. This replaces the "onboot" concept of Tiny Core. It should include any kernel modules and drivers required to run hardware and any extensions typically utilized at every boot. For most users this will include the X Window system (Xvesa or X.org), Xprogs (required for graphics), Alsa/sound, preferred Window Manager, web browser and file manager plus any firewall, networking and system monitoring extensions. SCEs loaded at boot time are listed in /etc/sysconfig/tcedir/sceboot.lst. This replaces the "onboot" concept of Tiny Core. It should include any kernel modules and drivers required to run hardware and any extensions typically utilized at every boot. For most users this will include the X Window system (Xvesa or X.org), Xprogs (required for graphics), Alsa/sound, preferred Window Manager, web browser and file manager plus any firewall, networking and system monitoring extensions.
  
Line 116: Line 112:
   # put other system startup commands here   # put other system startup commands here
   /sbin/iptables-restore < /home/tc/iptables-config   /sbin/iptables-restore < /home/tc/iptables-config
 +
 +**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]**
  
 ===== dCore Repositories ===== ===== dCore Repositories =====
Line 146: Line 144:
 </code> </code>
  
-Each of these repositories will become accessible via the [[dCore:sce-import_command|dCore sce-import Command]] to search and install the desired software. Visit the [[http://forum.tinycorelinux.net/index.php/board,75.0.html|dCore Extra Repositories]] sub-forum for more information.+Each of these repositories will become accessible via the [[dCore:sce-import_command|dCore sce-import Command]] to search and install the desired software. Note a /opt/debextra/ entry can be disabled by commenting out (use #) the desired entry, allowing selective use of extra repositories, example: 
 +   #http://ppa.launchpad.net/niko2040/e19/ubuntu wily main 
 + 
 +Visit the [[http://forum.tinycorelinux.net/index.php/board,75.0.html|dCore Extra Repositories]] sub-forum for more information.
  
 ==== Repository Processing Order ==== ==== Repository Processing Order ====
 Extra repositories in /opt/debextra/ take precedence over the standard Debian and Ubuntu repositories when importing software. As there is currently no automated mechanism to compare available software versions between repositories, these /opt/debextra/ debinx files are processed in ASCII sorting order for preferential processing. They can be named numerically, as the above example, or however the user wishes. The first correct package name hit when sequentially processing the repositories will be imported. Extra repositories in /opt/debextra/ take precedence over the standard Debian and Ubuntu repositories when importing software. As there is currently no automated mechanism to compare available software versions between repositories, these /opt/debextra/ debinx files are processed in ASCII sorting order for preferential processing. They can be named numerically, as the above example, or however the user wishes. The first correct package name hit when sequentially processing the repositories will be imported.
  
-===== Miscellaneous dCore Files =====+**[[http://wiki.tinycorelinux.net/dcore:welcome|> Return to the dCore Wiki Welcome page]]**
  
-Miscellaneous dCore files not discussed above:+===== Miscellaneous SCE-related Files ===== 
 +Noteworthy miscellaneous SCE-related files not discussed above: 
 +  */tmp/: The /tmp/ directory is used extensively by various dCore SCE management scripts to create temporary files and directories containing menu entries, temporary package lists, etc. Reviewing the main (sce-*) and helper SCE management scripts in /usr/bin and observing the /tmp/ directory when managing SCEs can be insightful. Only the most useful temporarily created files are discussed below, likewise some are also discussed in their respective [[http://wiki.tinycorelinux.net/dcore:extensions#dcore_sce_management_commands|dCore SCE Management Command]] section.
  
 +  */tmp/.debinstalled: Lists all installed Debian or custom packages.
  
-'/usr/{local/}share/applications/+  */tmp/.desktop: Lists installed extensions that have desktop files.
  
-==='/usr/local/'===+  */tmp/.installed: Contains already run startup scripts.
  
-This directory is populated by the running system after boot.+  */tmp/sceloadlock and /tmp/scelock: Examples of *lock files created when an applicable SCE management command is run. Used to prevent running simultaneous counterproductive commands, such as ''sce-import'' and ''sce-debpurge''. The *lock files contain the PID of the locking process.
  
-==='/usr/local/sce/'===+  */tmp/tcloop/: Loading an extension loop mounts it's SquashFS file in a read-only sub-directory, from there these files are symbolically linked to the root file system for use. The /tmp/tcloopdirectory is the most efficient method to explore the full contents of a particular SCE, rather than manually dig through the system's entire file system.
  
-One directory for each loaded extensioncontaining several files corresponding to the extension as well as its dependencies.+  */tmp/tcloop/<SCE_name>/usr/local/sce/<SCE_name>/SCE_import_summary: A summary of the import including datenew or re-import, whether the -R or -S flag was used and any additional packages, whether any dependency SCE(s) were used and the packages provided by these SCE(s) and a summary list of all packages contained within the extension.
  
-==='/usr/local/tce.installed/'===+  */tmp/tcloop/<SCE_name>/usr/local/tce.installed: Shows all Debian packages and dependencies utilized to create that particular SCE. 
  
-One start script per loaded Debian package; mostly as specified in the Debian package, oftentimes it calls ''/usr/local/postinst/<PACKAGE> configure'' May contain dCore-specific loading scripts which are pulled in as '.deb2sce'-files from the Tinycore repository.+  */usr/local/: The directory is populated by the system during boot and contains many SCE extension related files.
  
-=== '/tmp/' ===+  */usr/local/sce/: One directory is created for each loaded SCE. It contains numerous files related to the SCE and it's dependencies.
  
-=== Installation information === +  */usr/share/applications and /usr/local/share/applicationsThese direcories contain the desktop files of installed applications.
- +
-The following file locations provide some additional information about the state of the dCore installation. +
- +
-==='/tmp/.installed', '/tmp/.debinstalled'=== +
- +
-'/tmp/.installed' is for already run startup scripts.  +
-'/tmp/.debinstalled' is for already installed deb or custom packages. +
- +
-=== '/tmp/.removesce' === +
-sce-remove adds the name of the extension as well as any other extensions depending on it to '/tmp/.removesce' (s.a. the notes on how to [[http://wiki.tinycorelinux.net/dcore:extension_strategies#un-doing_sce-remove|un-do sce-remove]]). +
- +
-=== '/tmp/tcloop/' === +
-Loading an extension loop-mounts its SquashFS-file in a sub-directory (read-only). From there the files are copied as symbolic links into the root of the file system.+
  
 +  */usr/local/tce.installed/: One start script per loaded Debian package, mostly as specified in the Debian package, often calls ''/usr/local/postinst/<PACKAGE> configure'', may contain dCore-specific loading scripts which are pulled in as '.deb2sce' files from dCore repository.
  
 **[[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]]**
- 
Print/export
QR Code
QR Code dcore:handling_extensions (generated for current page)