cookutils annotate lighttpd/README.md @ rev 1095

lighttpd/index.cgi: show packages without badges
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Nov 26 21:12:42 2018 +0200 (2018-11-26)
parents 2aaf73fe2cd4
children
rev   line source
al@898 1 <meta charset="UTF-8">
al@898 2
al@898 3 index.cgi readme
al@898 4 ================
al@898 5
al@898 6 This CGI script is intended to be used on the Lighttpd powered SliTaz web
al@898 7 server. The configuration uses the modules:
al@898 8
al@898 9 * mod_rewrite: to have cacheable, reusable, human friendly URIs
al@898 10 * mod_compress: to save traffic
al@898 11
al@898 12 Examples of human friendly URIs:
al@898 13
paul@900 14 * /busybox : the page contains all about a busybox package
al@898 15 * /busybox/receipt : the page with the busybox's receipt
al@898 16 * /busybox/files : the page with the file listing
al@898 17 * /busybox/file/bin/busybox : get the specified file
al@898 18 * /get/busybox-1.26.2.tazpkg : get the specified package
al@898 19
al@898 20 Example of traffic saving:
al@898 21
al@898 22 * glibc.log in plain form: 8.3 MB
al@898 23 * glibc.log in compressed form: 0.3 MB (3% of the original size)
al@898 24
al@898 25
al@898 26 Notes about logs
al@898 27 ----------------
al@898 28
paul@900 29 Single resources should be associated with the discrete URI. But due to log
paul@900 30 rotation, glibc.log.2 becomes glibc.log.3 after package rebuilding. In such
paul@900 31 situations:
al@898 32
al@898 33 1. we can't point to the specified log and line within it (URI changed);
paul@900 34 2. caching will fail, already cached log changes the name.
al@898 35
paul@900 36 The solution implemented is to virtually append log name with the UNIX timestamp
paul@900 37 of last modification of the log instead of sequential numbers. So, for example,
paul@900 38 'glibc.log.2' will virtually became 'glibc.log.1482699768'. To find the matched
al@898 39 log we need to cycle among ten or less 'glibc.log*' physical files and compare
paul@900 40 the files modification date with the date in question.
al@898 41
al@898 42
al@898 43 Full list of implemented human friendly URIs
al@898 44 --------------------------------------------
al@898 45
al@898 46 URI syntax | Description | URI example
al@898 47 -----------------------|----------------------------------------|-----------------------
al@898 48 / | cooker home page | /
al@898 49 /‹pkg› | brief info about ‹pkg› | /busybox
al@898 50 /‹pkg›/receipt | display ‹pkg› receipt | /busybox/receipt
al@898 51 /‹pkg›/description | display ‹pkg› description | /busybox/description
al@898 52 /‹pkg›/stuff/‹stuff› | display ‹stuff› file | /busybox/stuff/www/httpd/404.html
al@898 53 /‹pkg›/files | display ‹pkg› files list | /busybox/files
al@898 54 /‹pkg›/file/‹file› | get the ‹file› from the ‹pkg› | /busybox/file/bin/busybox
al@898 55 /get/‹package.tazpkg› | get the specified ‹package.tazpkg› | /get/busybox-1.26.2.tazpkg
al@898 56 /src/‹tarball› | get the specified sources ‹tarball› | /src/busybox-1.26.2.tar.bz2
al@898 57 /‹pkg›/man | list of man pages, display default one | /cmark/man
al@898 58 /‹pkg›/man/‹page› | display specified man ‹page› | /cmark/man/cmark.1
al@898 59 . | . | /man-db/man/es/mandb.8
al@898 60 /‹pkg›/doc | list of existing documentation files | .
al@898 61 /‹pkg›/doc/‹doc› | display specified documentation file | .
al@898 62 /‹pkg›/info | list of existing info files | .
al@898 63 /‹pkg›/info/‹info› | display specified info file | .
al@898 64 /‹pkg›/log | display the latest cooking log | /busybox/log
al@898 65 /‹pkg›/log/‹timestamp› | display the specified cooking log | /busybox/log/1482700678
al@898 66
al@898 67
al@898 68 ((unfinished))