2015-05-27

Slitaz -- cookutils / bundle.tar.lzma / IDs


Getting "bundle.tar.lzma"...

1.
root@slitaz:/home/tux# tazpkg recharge

Recharging repository "Main"
================================================================================
Database timestamp: 05/24/2015 00:01
Creating backup of the last packages list...                           [ Failed ]
Getting "bundle.tar.lzma"...                                                     [ Done ]
Getting "files-list.lzma"...                                                         [ Done ]
================================================================================
Last database is ready to use.


2.
root@slitaz:/home/tux# ls -l /var/lib/tazpkg/ID*
-rw-r--r--    1 root     root            33 May 25  2015 /var/lib/tazpkg/ID
-rw-r--r--    1 root     root            44 May 25  2015 /var/lib/tazpkg/IDs

root@slitaz:/home/tux# cat /var/lib/tazpkg/ID*
28b4d51b105dfca6be5201742bc78de5
28b4d51b105dfca6be5201742bc78de5 1432425688

root@slitaz:/home/tux# date -d @1432425688
Sun May 24 00:01:28 UTC 2015
root@slitaz:/home/tux#


3.
cookutils changeset 725:2cf877e5b167

http://hg.slitaz.org/cookutils/raw-rev/2cf877e5b167
# HG changeset patch
# User Aleksej Bobylev <al.bobylev@gmail.com>
# Date 1430654849 -10800
# Node ID 2cf877e5b1677e2c7d6a3870bf4cc1985dab3ee2
# Parent  851a2b8075dc6c67c36ddec39e2e7b60470f2bd6
cook pkgdb: provide new mechanism of recharging: IDs contains "old" ID plus timestamp, bundle.tar.lzma contains all "old" recharge files plus files.list.md5 to determine whether to download massive files.list.lzma or not.

diff -r 851a2b8075dc -r 2cf877e5b167 cook
--- a/cook    Fri Apr 17 14:10:59 2015 +0200
+++ b/cook    Sun May 03 15:07:29 2015 +0300
@@ -1348,20 +1348,26 @@
         echo "cook:pkgdb" > $command
         _ "Cook pkgdb: Creating all packages lists" | log
         newline; _ "Creating lists for: \$PKGS"; separator
+
         datenow=$(date "$(_ '+%Y-%m-%d %H:%M')")
         _ "Cook pkgdb started: \$datenow"
+
         cd $PKGS
         rm -f packages.* extra.list
         ln -s ../get.list extra.list
+
         _ "Creating: packages.list"
         ls -1 *.tazpkg | sed s'/.tazpkg//' > $PKGS/packages.list
+
         _ "Creating: packages.md5"
         md5sum *.tazpkg > $PKGS/packages.md5
+
         md5sum packages.md5 | cut -f1 -d' ' > ID
+        ( cat ./ID | tr $'\n' ' '; date -ur ./ID +%s ) > IDs    # md5 and timestamp
+
         _ "Creating lists from: \$WOK"
         cd $WOK
-        for pkg in *
-        do
+        for pkg in *; do
             unset_receipt
             . $pkg/receipt
             # PACKED_SIZE and UNPACKED_SIZE are only in built receipt
@@ -1420,15 +1426,25 @@
         # files.list.lzma
         _ "Creating: files.list.lzma"
         touch $PKGS/files.list
-        cd $PKGS; lzma e files.list files.list.lzma
-        rm -f files.list
+        # Pre-sorting filenames causes 10% smaller resulting lzma file
+        cat $PKGS/files.list | sort -k2 -o $PKGS/files.list.sorted
+        cd $PKGS; lzma e files.list.sorted files.list.lzma
+        rm -f files.list files.list.sorted
+
+        md5sum files.list.lzma | cut -d' ' -f1 | tr -d $'\n' > files.list.md5

         # packages.info.lzma
         PI=packages.info
         _ 'Creating: packages.info.lzma'
         touch $PKGS/$PI
         cd $PKGS; lzma e $PI $PI.lzma
-        rm -f $PI
+
+        # Make bundle to fast recharge
+        _ 'Creating: bundle.tar.lzma'
+        [ -f bundle.tar.lzma ] && rm bundle.tar.lzma
+        busybox tar -caf bundle.tar.lzma \
+            extra.list mirrors files.list.md5 packages.info \
+            packages.desc packages.md5 packages.txt packages.list packages.equiv

         # Display some info.
         separator


2015-05-14

Slitaz -- date / rdate


Unix time (also known as POSIX time or erroneously as Epoch time)

1.
tux@slitaz:~$ dmesg | grep cmos
rtc_cmos 00:07: RTC can wake from S4
rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
rtc_cmos 00:07: setting system clock to 2015-05-14 10:38:31 UTC (1431599911)


2.
tux@slitaz:~$ date -d @1431599911
Thu May 14 18:38:31 CST 2015


3.
tux@slitaz:~$ date
Thu May 14 18:46:37 CST 2015

tux@slitaz:~$ date -u
Thu May 14 10:46:55 UTC 2015

tux@slitaz:~$ date -R
Thu, 14 May 2015 18:47:19 +0800

tux@slitaz:~$ date +%s
1431600482

tux@slitaz:~$ date -ud @1431600482
Thu May 14 10:48:02 UTC 2015


4.
tux@slitaz:~$ rdate -p time.nist.gov
Thu May 14 10:50:17 2015

tux@slitaz:~$ sudo rdate -s time.nist.gov
tux@slitaz:~$ date
Thu May 14 18:52:06 CST 2015


Ref:

Unix time

Unix time (also known as POSIX time or erroneously as Epoch time) is a system for describing instants in time, defined as the number of secondsthat have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970,[1][note 1] not counting leap seconds.[1][2][note 2]It is used widely in Unix-like and many other operating systems and file formats. Due to its handling of leap seconds, it is neither a linear representation of time nor a true representation of UTC.[note 3] Unix time may be checked on most Unix systems by typing date +%s on the command line.
Example: 1431460917 (ISO 8601:2015-05-12T20:01:57Z)
the Unix time when this page was last generated

UTC time is also known as 'Zulu' time, since 'Zulu' is the NATO phonetic alphabet word for 'Z'.

Combined date and time representations

<date>T<time>
A single point in time can be represented by concatenating a complete date expression, the letter T as a delimiter, and a valid time expression. For example "2007-04-05T14:30".

grus4dos : map --mem option

map --mem option
https://github.com/chenall/grub4dos/blob/master/README_GRUB4DOS.txt#L3136 

***                  The CDROM emulation (virtualization)               ***
*****************************************************************

The CDROM emulation is sometimes called ISO emulation. Here is an example:

map  (hd0,0)/myiso.iso  (hd32)
map  --hook
chainloader  (hd32)
boot

if myiso.iso is not contiguous and you have enough memory, add a --mem option:

map  --mem  (hd0,0)/myiso.iso  (hd32)
map  --hook
chainloader  (hd32)
boot

Note: (hd32) is a grub drive number equivalent to (0xA0). If a virtual drive is
specified with a drive number greater than or equal to 0xA0, then it will be
treated as a cdrom (i.e., with 2048-byte big sectors).

Like normal disk emulations, the CDROM emulation also (mainly) works with
real-mode OSes. After a protected-mode OS kernel (such as
WinNT/2K/XP/VISTA/LINUX) gains control, the OS would have no ability to access
the virtual CDROM through BIOS int13.

DOS/Win9x users may google for ELTORITO.SYS and use it in CONFIG.SYS as a
device driver for the virtual cdrom.

Example usage of eltorito.sys in CONFIG.SYS:

device=eltorito.sys /D:oemcd001

Corresponding MSCDEX command which can be placed in AUTOEXEC.BAT:

MSCDEX /D:oemcd001 /L:D


Due to some bugs found in eltorito.sys, the driver could fail to load. If you
encounter such problems, then you may replace (hd32) with (0xFF) for the
virtual cdrom drive number and try again.

2015-05-04

Slitaz -- Java Control Panel



1.
tux@slitaz:~$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Server VM (build 25.45-b02, mixed mode)


2.
tux@slitaz:~$ tazpkg info javajre

TazPKG information
=================================================================
Package    : javajre
Version    : 1.8.0_45
Category   : non-free
Short desc : Java Platform Standard Edition Runtime Environment
Maintainer : nobody@slitaz.org
Depends    : bash
Web site   : http://java.com/en/download/linux_manual.jsp?locale=en
Size       : 44.5M/163.7M
=================================================================


3.
tux@slitaz:~$ ldd /usr/lib/java/jre1.8.0_45/bin/java

/usr/lib/java/jre1.8.0_45/bin/java:
linux-gate.so.1 =>  (0xffffe000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf778d000)
libjli.so => /usr/lib/java/jre1.8.0_45/bin/../lib/i386/jli/libjli.so (0xf7778000)
libdl.so.2 => /lib/libdl.so.2 (0xf7773000)
libc.so.6 => /lib/libc.so.6 (0xf75fd000)
/lib/ld-linux.so.2 => /lib/ld-2.14.1.so (0xf77aa000)

4.
tux@slitaz:~$ jcontrol &

tux@slitaz:~$ ps | grep -A 1 jcontrol
 2417 tux        0:00 {jcontrol} /bin/bash /usr/bin/jcontrol
 2434 tux        0:01 /usr/lib/java/jre1.8.0_45/bin/java -Djavaplugin.user.profile= -Xbootclasspath/a:/usr/lib/java/jre1.8.0_45/bin/../lib/deploy.jar com.sun.deploy.panel.ControlPanel
--
 2458 tux        0:00 grep -A 1 jcontrol
tux@slitaz:~$


5.
tux@slitaz:~$ head -6 /usr/lib/java/jre1.8.0_45/bin/jcontrol
#!/bin/bash
#
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
# Shell Script to run the Java Plug-in control panel.



2015-05-02

Slitaz -- get-scripts / tazpkg / qcad

Depends : qcad ??

Please check get-scripts and tazpkg.

1.
# TazPanel Install "FoxitReader"
[..]
TazPkg: Install
Installing: FoxitReader
Tracking dependencies for package "FoxitReader"
Missing package "qcad"


2.
# tazpkg -gi flash-plugin
[..]
Package "flash-plugin-11.2.202.457" compressed successfully.
Size: 4.9M
Tracking dependencies for package "flash-plugin"
==============================================================================
Missing package "seamonkey"
Missing package "qcad"
==============================================================================
2 missing packages to install.


3.
# tazpkg -gi javajre
[..]
Package "javajre-1.8.0_45" compressed successfully.
Size: 32.2M
WARNING! Dependency loop between "javajre" and "qcad".
Tracking dependencies for package "javajre"
======================================================================
Missing package "nvidia-173xx"
Missing package "glib-dev"
Missing package "ffmpeg-compat"
Missing package "cairo-gl"
======================================================================
4 missing packages to install.