2013-12-27

Slitaz -- get-wink

get-wink

tar: option requires an argument -- 'f'

   wget -O - http://www.debugmode.com/wink/download.php 2> /dev/null | \
       grep gz | sed 's/.*<a href=\(.*\)gz>.*/\1gz/'


1.
root@slitaz:/tmp# get-wink
tar: option requires an argument -- 'f'

Command line: tar -xzf

BusyBox v1.21.0 (2013-04-26 02:03:45 CEST) multi-call binary.

Usage: tar -[cxtZzJjahmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...


2.
[..]
dl_urls()
{
   wget -O - http://www.debugmode.com/wink/download.php 2> /dev/null | \
       grep gz | sed 's/.*<a href=\(.*\)gz>.*/\1gz/'
}

WEB_SITE="http://www.debugmode.com/wink/"

TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM
CUR_DIR=$(pwd)
mkdir -p $TMP_DIR && cd $TMP_DIR

# Download tarball
for i in $(dl_urls); do
    TARBALL=$(basename $i)
    wget $i && break
done
if [ ! -f $TARBALL ]; then
    cd $CUR_DIR
    rm -rf $TMP_DIR
    echo "Could not download $TARBALL. Exiting."
    exit 1
fi

VERSION=${TARBALL%.*}
VERSION=${VERSION%.tar}
VERSION=${VERSION#wink}

# Extract
tar xzf $TARBALL
....

Slitaz -- wink


get-wink
get-libstdc++5

# /usr/bin/wink: exec: line 2: wink-15_b1060/fs/usr/share/wink/wink: not found

# /usr/share/wink/wink: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory


1.
root@slitaz:/home/tux# diff /usr/bin/get-wink-orig /usr/bin/get-wink
--- /usr/bin/get-wink-orig
+++ /usr/bin/get-wink
@@ -55,7 +55,7 @@
 tar xzf installdata.tar.gz -C $PACKAGE-$VERSION/fs/usr/share/$PACKAGE
 cat > $PACKAGE-$VERSION/fs/usr/bin/$PACKAGE <<EOT
 #!/bin/sh
-exec $PACKAGE-$VERSION/fs/usr/share/$PACKAGE/$PACKAGE "$@"
+exec /usr/share/$PACKAGE/$PACKAGE "$@"
 EOT
 chmod +x $PACKAGE-$VERSION/fs/usr/bin/$PACKAGE

root@slitaz:/home/tux#


2.
root@slitaz:/home/tux# tazpkg list-files libstdc++5

Installed files by: libstdc++5
================================================================================
/usr/lib/i386-linux-gnu/libstdc++.so.5
/usr/lib/i386-linux-gnu/libstdc++.so.5.0.7
================================================================================
2 files installed with libstdc++5


3.
root@slitaz:/home/tux# diff /usr/bin/get-libstdc\+\+5-orig /usr/bin/get-libstdc\+\+5
--- /usr/bin/get-libstdc++5-orig
+++ /usr/bin/get-libstdc++5
@@ -59,6 +59,18 @@
 CATEGORY="development"
 SHORT_DESC="Obsolate GNU C++ library."
 WEB_SITE="$WEB_SITE"
+
+post_install()
+ {
+    # ldconfig
+    ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5.0.7 /usr/lib/.
+    ln -s /usr/lib/i386-linux-gnu/libstdc++.so.5.0.7 /usr/lib/libstdc++.so.5
+ }
+
+post_remove()
+ {
+    rm -f /usr/lib/libstdc++.so.5*
+ }
 EOT

 # Pack
root@slitaz:/home/tux#

Slitaz -- core64 / cross toolchain

Cross Toolchain

Target host : x86_64
C Compiler  : x86_64-slitaz-linux-gcc
CFLAGS      : 
Packages log: gcc-final gcc-static glibc-headers glibc linux-headers

testsuite.log

[COMPILING] x86_64-slitaz-linux-gcc -v -Wall -o test.out test.c
Using built-in specs.
COLLECT_GCC=x86_64-slitaz-linux-gcc
COLLECT_LTO_WRAPPER=/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/lto-wrapper
Target: x86_64-slitaz-linux
Configured with: ../gcc-4.6.3/configure --prefix=/cross/x86_64/tools --libexec=/cross/x86_64/tools/lib --target=x86_64-slitaz-linux --enable-shared --enable-c99 --enable-long-long --enable-__cxa_atexit --with-system-zlib --enable-plugin --disable-multilib --disable-libssp --disable-checking --disable-werror --with-pkgversion=SliTaz --with-bugurl=https://bugs.slitaz.org/ --with-sysroot=/cross/x86_64/sysroot --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 4.6.3 (SliTaz) 
COLLECT_GCC_OPTIONS='-v' '-Wall' '-o' 'test.out' '-mtune=generic' '-march=x86-64'
 /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=generic -march=x86-64 -auxbase test -Wall -version -o /tmp/cc2EcXXv.s
GNU C (SliTaz) version 4.6.3 (x86_64-slitaz-linux)
 compiled by GNU C version 4.6.3, GMP version 5.0.4, MPFR version 3.1.0-p4, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=65536
ignoring nonexistent directory "/cross/x86_64/sysroot/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/include
 /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/include-fixed
 /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/include
 /cross/x86_64/sysroot/usr/include
End of search list.
GNU C (SliTaz) version 4.6.3 (x86_64-slitaz-linux)
 compiled by GNU C version 4.6.3, GMP version 5.0.4, MPFR version 3.1.0-p4, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=65536
Compiler executable checksum: c4f5c702d252e5d1420bc4326f50e9fd
COLLECT_GCC_OPTIONS='-v' '-Wall' '-o' 'test.out' '-mtune=generic' '-march=x86-64'
 /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/bin/as --64 -o /tmp/cccr7HBz.o /tmp/cc2EcXXv.s
COMPILER_PATH=/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/bin/
LIBRARY_PATH=/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/lib/../lib64/:/cross/x86_64/sysroot/lib/../lib64/:/cross/x86_64/sysroot/usr/lib/../lib64/:/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/lib/:/cross/x86_64/sysroot/lib/:/cross/x86_64/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-Wall' '-o' 'test.out' '-mtune=generic' '-march=x86-64'
 /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/collect2 --sysroot=/cross/x86_64/sysroot --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test.out /cross/x86_64/sysroot/usr/lib/../lib64/crt1.o /cross/x86_64/sysroot/usr/lib/../lib64/crti.o /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/crtbegin.o -L/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3 -L/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/lib/../lib64 -L/cross/x86_64/sysroot/lib/../lib64 -L/cross/x86_64/sysroot/usr/lib/../lib64 -L/cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/../../../../x86_64-slitaz-linux/lib -L/cross/x86_64/sysroot/lib -L/cross/x86_64/sysroot/usr/lib /tmp/cccr7HBz.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /cross/x86_64/tools/lib/gcc/x86_64-slitaz-linux/4.6.3/crtend.o /cross/x86_64/sysroot/usr/lib/../lib64/crtn.o

[CHECKING] file test.out
test.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped

[CHECKING] readelf -h test.out
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Advanced Micro Devices X86-64
  Version:                           0x1
  Entry point address:               0x400370
  Start of program headers:          64 (bytes into file)
  Start of section headers:          4304 (bytes into file)
  Flags:                             0x0
  Size of this header:               64 (bytes)
  Size of program headers:           56 (bytes)
  Number of program headers:         8
  Size of section headers:           64 (bytes)
  Number of section headers:         36
  Section header string table index: 33

compile.log

 

Slitaz -- core64 / uclibc

uclibc-cross-compiler-x86_64

Toolchain for uclibc/x86_64.

/usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/libgcc.a: could not read symbols: Archive has no index; run ranlib to add one

1.
http://cook.slitaz.org/cooker.cgi?receipt=linux

    # Build bzImage64 with modules
    cp -f $stuff/$PACKAGE-slitaz.config64 .config
    #make ARCH=x86_64 oldconfig
    make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- bzImage &&
    make -j 4 ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- modules &&

2.
tux@slitaz:~$ echo 'int main() { return 0; }' > test.c

tux@slitaz:~$ ARCH=x86_64 uclibc-x86_64-gcc -v -Wall -o test.o test.c
Invoked as uclibc-x86_64-gcc
Reference path: /usr/share/uclibc-cross-compiler-x86_64/bin/..
arg[ 0] = rawcc
arg[ 1] = -nostdlib
arg[ 2] = -Wl,--dynamic-linker,/lib/ld-uClibc.so.0
arg[ 3] = -Wl,-rpath-link,/usr/share/uclibc-cross-compiler-x86_64/bin/../lib
arg[ 4] = -L/usr/share/uclibc-cross-compiler-x86_64/bin/../lib
arg[ 5] = -L/usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib
arg[ 6] = -nostdinc
arg[ 7] = -isystem
arg[ 8] = /usr/share/uclibc-cross-compiler-x86_64/bin/../include
arg[ 9] = -isystem
arg[10] = /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/include
arg[11] = -U__nptl__
arg[12] = /usr/share/uclibc-cross-compiler-x86_64/bin/../lib/crti.o
arg[13] = /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/crtbegin.o
arg[14] = /usr/share/uclibc-cross-compiler-x86_64/bin/../lib/crt1.o
arg[15] = -v
arg[16] = -Wall
arg[17] = -o
arg[18] = test.o
arg[19] = test.c
arg[20] = -Wl,--start-group,--as-needed
arg[21] = -lgcc
arg[22] = -lgcc_s
arg[23] = -lc
arg[24] = -Wl,--no-as-needed,--end-group
arg[25] = /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/crtend.o
arg[26] = /usr/share/uclibc-cross-compiler-x86_64/bin/../lib/crtn.o
Using built-in specs.
Target: x86_64-unknown-linux
Configured with: /home/landley/work/ab7/build/temp-x86_64/gcc-core/configure --target=x86_64-unknown-linux --prefix=/home/landley/work/ab7/build/cross-compiler-x86_64 --disable-multilib --disable-nls --enable-c99 --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --program-prefix=x86_64- --enable-threads=posix --enable-shared --build=x86_64-walrus-linux --host=x86_64-unknown-linux
Thread model: posix
gcc version 4.2.1
 cc1 -quiet -nostdinc -v -iprefix /usr/share/uclibc-cross-compiler-x86_64/x86_64-unknown-linux/bin/../lib/gcc/x86_64-unknown-linux/4.2.1/ -U__nptl__ -isystem /usr/share/uclibc-cross-compiler-x86_64/bin/../include -isystem /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/include test.c -quiet -dumpbase test.c -mtune=generic -auxbase test -Wall -version -o /tmp/cc4IJKwh.s
#include "..." search starts here:
#include <...> search starts here:
 /usr/share/uclibc-cross-compiler-x86_64/bin/../include
 /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/include
End of search list.
GNU C version 4.2.1 (x86_64-unknown-linux)
    compiled by GNU C version 4.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: be2919982cb57ffe1dc597edcbdc600c
 as --traditional-format -V -Qy -o /tmp/cc84z8vp.o /tmp/cc4IJKwh.s
GNU assembler version 2.17 (x86_64-unknown-linux) using BFD version 2.17
 ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test.o -L/usr/share/uclibc-cross-compiler-x86_64/bin/../lib -L/usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib --dynamic-linker /lib/ld-uClibc.so.0 -rpath-link /usr/share/uclibc-cross-compiler-x86_64/bin/../lib /usr/share/uclibc-cross-compiler-x86_64/bin/../lib/crti.o /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/crtbegin.o /usr/share/uclibc-cross-compiler-x86_64/bin/../lib/crt1.o /tmp/cc84z8vp.o --start-group --as-needed -lgcc -lgcc_s -lc --no-as-needed --end-group /usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/crtend.o /usr/share/uclibc-cross-compiler-x86_64/bin/../lib/crtn.o
/usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/libgcc.a: could not read symbols: Archive has no index; run ranlib to add one
tux@slitaz:~$



3.
root@slitaz:/usr/src/qtfm-5.5# ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- make
uclibc-x86_64-g++ -c -pipe -O2 -D_REENTRANT -w -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../share/qt/mkspecs/linux-g++ -I. -I../../include/QtCore -I../../include/QtNetwork -I../../include/QtGui -I../../include -I. -Isrc -Ibuild -o build/main.o src/main.cpp
In file included from ../../include/QtCore/qobject.h:48,
                 from ../../include/QtCore/qcoreapplication.h:45,
                 from ../../include/QtGui/qapplication.h:45,
                 from ../../include/QtGui/QApplication:1,
                 from src/main.cpp:23:
/usr/share/uclibc-cross-compiler-x86_64/bin/../c++/include/string: In instantiation of 'std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >':
../../include/QtCore/qstring.h:1051:   instantiated from here
/usr/share/uclibc-cross-compiler-x86_64/bin/../c++/include/string:57: error: no type named 'char_type' in 'struct std::char_traits<wchar_t>'
/usr/share/uclibc-cross-compiler-x86_64/bin/../c++/include/string: In copy constructor 'std::basic_string<Ch, Tr, A>::basic_string(const std::basic_string<Ch, Tr, A>&, typename A::size_type, typename A::size_type, const A&) [with Ch = wchar_t, Tr = std::char_traits<wchar_t>, A = std::allocator<wchar_t>]':
../../include/QtCore/qstring.h:1063:   instantiated from here
/usr/share/uclibc-cross-compiler-x86_64/bin/../c++/include/string:689: error: 'copy' is not a member of 'std::char_traits<wchar_t>'
make: *** [build/main.o] Error 1
root@slitaz:/usr/src/qtfm-5.5#


4.
root@slitaz:/usr/src/zlib-1.2.6# ARCH=x86_64 CROSS_COMPILE=uclibc-x86_64- make
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1 -I. -c -o example.o test/example.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o adler32.o adler32.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o crc32.o crc32.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o deflate.o deflate.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o infback.o infback.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o inffast.o inffast.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o inflate.o inflate.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o inftrees.o inftrees.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o trees.o trees.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o zutil.o zutil.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o compress.o compress.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o uncompr.o uncompr.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzclose.o gzclose.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzlib.o gzlib.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzread.o gzread.c
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzwrite.o gzwrite.c
uclibc-x86_64-ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
uclibc-x86_64-gcc -O3  -D_LARGEFILE64_SOURCE=1 -o example example.o -L. libz.a
/usr/share/uclibc-cross-compiler-x86_64/bin/../cc/lib/libgcc.a: could not read symbols: Archive has no index; run ranlib to add one
make: *** [example] Error 1
root@slitaz:/usr/src/zlib-1.2.6#






Slitaz -- core64 / amd64


rootfs.gz (extract from slitaz-rolling-core64.iso) and debian-kernel-amd64

1.
root@slitaz:~# date
Thu Dec 26 01:48:23 UTC 2013

2.
root@slitaz:~# uname -a
Linux slitaz 3.2.0-4-amd64 #1 SMP Debian 3.2.53-2 x86_64 GNU/Linux

3.
root@slitaz:~# dmesg | head -4
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.53-2
[ 0.000000] Command line: BOOT_IMAGE=/boot/bzImage initrd=/boot/rootfs.gz rw root=/dev/null autologin screen=text lang=en_US kmap=us

4.
root@slitaz:~# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 469.5M 40.0K 469.5M 0% /run
tmpfs 845.1M 141.2M 703.9M 17% /
devtmpfs 452.1M 0 452.1M 0% /dev
tmpfs 469.5M 0 469.5M 0% /dev/shm

5.
root@slitaz:~# free -m
total used free shared buffers
Mem: 939 163 775 0 0
-/+ buffers: 163 775
Swap: 0 0 0

6.
root@slitaz:~# grep gcc /var/log/messages.0
Dec 20 22:28:52 (none) user.notice kernel: Linux version 3.2-slitaz (root@tank) (gcc version 4.6.3 (SliTaz) ) #4 SMP Thu Dec 19 16:29:15 CET 2013
Dec 26 01:18:31 (none) user.notice kernel: [ 0.000000] Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.53-2

7.
root@slitaz:~# slitaz

SliTaz GNU/Linux
================================================================================
Release : cooking
Architecture : x86_64
Kernel : 3.2.0-4-amd64
Boot options : BOOT_IMAGE=/boot/bzImage initrd=/boot/rootfs.gz rw root=/dev/null autologin screen=text lang=en_US kmap=us
Home path : /home/slitaz
Configs : /etc/slitaz
Log files : /var/log/slitaz
Packages DB : /var/lib/tazpkg
Installed : 246 packages
Mirror : http://mirror.slitaz.org/packages/cooking/
================================================================================
Config file: /etc/slitaz/slitaz.conf

8.
root@slitaz:~# nslookup www.slitaz.org
Server: 10.0.2.3
Address 1: 10.0.2.3

Name: www.slitaz.org
Address 1: 212.83.135.187 212-83-135-187.rev.poneytelecom.eu
Address 2: 46.105.127.17 ks385316.kimsufi.com
root@slitaz:~#

2013-12-24

Slitaz -- core64



Distro: rolling-core64
Description: 64 bits kernel with a fully featured 32 bits desktop.

kernel panic?

slitaz-rolling-core64.iso 20131220
slitaz-rolling-core64.iso 20131222

Trying to unpack rootfs image as initramfs...
....
Kernel panic - not syncing: Attempted to kill init!
Pid:1, comm: swapper/0 Tainted: G D 3.2-slitaz #2
Call Trace:
...

or


Trying to unpack rootfs image as initramfs...
BUG: unable to handle kernel paging request at 0000000039b84000
...

2013-12-21

Slitaz --backports / kernel 3.2.53

kernel 3.2.53

1. kernel/ptrace.c __ptrace_may_access privilege escalation
http://www.scip.ch/en/?vuldb.11366

    VulDB: Linux Kernel 3.4.71/3.10.21/3.11.10/3.12.2 kernel/ptrace.c __ptrace_may_access privilege escalation

    General

    scipID: 11366
    Affected: Linux Kernel 2.6.32.61/2.6.34.14/3.2.53/3.4.70/3.10.20/3.11.9/3.12.1
    Published: 11/13/2013 (Vasily Kulikov)
    Risk: problematic
    Entry: 85.9% complete
    Created: 12/05/2013


2. Patch: git.kernel.org
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?id=4004afd5f51ad0a86be405522b1ecf28ba66f4e5


3. wok-backports changeset 4:8aa134add845
linux: add CVE-2013-2929 fix
http://hg.slitaz.org/wok-backports/rev/8aa134add845


4. receipt: linux
wok
 139 $PACKAGE-CVE-2013-2929.u

wok-backports
 138 $PACKAGE-CVE-2013-2929.u


5. linux.log
[..]
Apply linux-CVE-2013-2929.u
patching file arch/ia64/include/asm/processor.h
patching file include/linux/binfmts.h
patching file include/linux/sched.h
patching file kernel/ptrace.c

Slitaz -- backports / cook

wok-backports: cook error
  • grep: /home/slitaz/wok/aufs/receipt: No such file or directory
  • cp: can't stat '/home/slitaz/wok/linux/stuff/aufs3-base.patch': No such file or directory
  • cp: can't stat '/usr/share/boot/initrd': No such file or directory
  • cp: can't stat '/home/slitaz/wok/linux/install/linux64/lib/modules/3.2-slitaz/kernel/drivers/char/toshiba.ko.xz': No such file or directory


1. Aufs packages
patching file virt/kvm/kvm_main.c
Checking for Aufs packages...
grep: /home/slitaz/wok/aufs/receipt: No such file or directory

grep: /home/slitaz/wok/aufs/receipt: No such file or directory
/usr/bin/cook: .: line 1223: can't open '/home/slitaz/wok/aufs/receipt'
tar: can't open '/home/slitaz/src/aufs-.tar.bz2': No such file or directory


2. aufs3-*.patch
Apply linux-CVE-2013-2929.u
patching file arch/ia64/include/asm/processor.h
patching file include/linux/binfmts.h
patching file include/linux/sched.h
patching file kernel/ptrace.c
cp: can't stat '/home/slitaz/wok/linux/stuff/aufs3-base.patch': No such file or directory
Apply aufs3-base.patch
/usr/bin/cook: line 364: can't open /home/slitaz/wok/linux/source/slitaz/aufs3-base.patch: no such file

http://hg.slitaz.org/wok-backports/file/b3f60b195d7a/linux/receipt
[..]
132 touch done.$patch_file
133 done <<EOT
134 $PACKAGE-diff.u
135 $PACKAGE-header.u
136 $PACKAGE-freeinitrd.u
137 $PACKAGE-subroot.u
138 $PACKAGE-CVE-2013-2929.u
139 aufs3-base.patch
140 aufs3-standalone.patch
141 aufs3-loopback.patch
142 aufs3-proc_map.patch
143 channel-negative-one-maxim.patch
144 mac80211.compat08082009.wl_frag+ack_v1.patch
145 EOT

http://hg.slitaz.org/wok-backports/file/b3f60b195d7a/linux/stuff
file aufs2-base.patch     2726     -rw-r--r--
file aufs2-kbuild.patch     976     -rw-r--r--
file aufs2-standalone.patch     7680     -rw-r--r--
file bootloader.sh     9086     -rwxr-xr-x
file channel-negative-one-maxim.patch     1021     -rw-r--r--
file check_modules.sh     1857     -rwxr-xr-x
file gztazmod.sh     1359     -rwxr-xr-x
file linux-CVE-2013-2929.u     1882     -rw-r--r--
file linux-diff.u     1399     -rw-r--r--
file linux-freeinitrd.u     3649     -rw-r--r--
file linux-header.u     13582     -rw-r--r--
file linux-slitaz.config     115966     -rw-r--r--
file linux-slitaz.config64     109832     -rw-r--r--
file linux-subroot.u     1690     -rw-r--r--
file list_modules.sh     1154     -rwxr-xr-x
file mac80211.compat08082009.wl_frag+ack_v1.patch     1049     -rw-r--r--
file modules.list     9922     -rw-r--r--


3. linux-uml

patching file virt/kvm/kvm_main.c
cp: can't stat '/usr/share/boot/initrd': No such file or directory
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o

wok-backports changeset 1:87efcf9eac62
http://hg.slitaz.org/wok-backports/rev/87efcf9eac62
linux: fix compile_rules
author    Pascal Bellard <pascal.bellard@slitaz.org>
date    Wed Dec 18 17:26:22 2013 +0000 (2 days ago ago)
parents    0cfab50066bc
children    0692b2aafabb
files    linux/receipt
   line diff
     1.1 --- a/linux/receipt    Wed Dec 18 15:14:49 2013 +0000
     1.2 +++ b/linux/receipt    Wed Dec 18 17:26:22 2013 +0000
     1.3 @@ -47,7 +47,6 @@
     1.4  compile_rules()
     1.5  {
     1.6      cd $src
     1.7 -    cp /usr/share/boot/initrd initrd.cpio
     1.8 
     1.9      if [ "$KBASEVER" != "$VERSION" ]; then
    1.10          [ -s $SRC/$(basename $PATCH) ] ||


4. linux64-toshiba
Pack: linux64-toshiba 3.2.53
================================================================================
Executing: genpkg_rules
cp: can't stat '/home/slitaz/wok/linux/install/linux64/lib/modules/3.2-slitaz/kernel/drivers/char/toshiba.ko.xz': No such file or directory

Debug information
================================================================================
Cook date: 2013-12-20 21:26
ERROR: genpkg_rules failed
cp: can't stat '/home/slitaz/wok/linux/install/linux64/lib/modules/3.2-slitaz/kernel/drivers/char/toshiba.ko.xz': No such file or directory
================================================================================

Slitaz -- backports



slitaz-backports

The slitaz-backports repository is there for those who wish to remain on a stable version of SliTaz while having updated packages.
slitaz-backports does not replace the work that is underway on the next version of SliTaz.
 tux@slitaz:~$ uname -a
Linux slitaz 3.2-slitaz #4 SMP Fri Dec 20 20:11:27 UTC 2013 i686 GNU/Linux

tux@slitaz:~$ head /var/log/dmesg.log
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.2-slitaz (root@slitaz) (gcc version 4.5.2 (SliTaz) ) #4 SMP Fri Dec 20 20:11:27 UTC 2013
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000003bffe000 (usable)
 BIOS-e820: 000000003bffe000 - 000000003c000000 (reserved)
 BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved)

tux@slitaz:~$ ls /lib/modules/3.2.53-slitaz/
kernel               modules.dep.bin      modules.pcimap
modules.alias        modules.devname      modules.seriomap
modules.alias.bin    modules.ieee1394map  modules.softdep
modules.builtin      modules.inputmap     modules.symbols
modules.builtin.bin  modules.isapnpmap    modules.symbols.bin
modules.ccwmap       modules.ofmap        modules.usbmap
modules.dep          modules.order
tux@slitaz:~$

Slitaz -- tazdev


tazdev issue ??

Mirror URL: mirror.slitaz.org/packages/cooking/
VS.
# cat /var/lib/tazpkg/mirror
http://mirror.slitaz.org/packages/4.0/


root@slitaz:/home/tux# tazdev -gc

Generating new chroot in: /home/slitaz/cooking/chroot
================================================================================
Mirror URL: mirror.slitaz.org/packages/cooking/                      [ Done ]
Installing: slitaz-base-files                                        [ Done ]
Installing: busybox                                                  [ Done ]
Installing: cookutils                                                [ Done ]
Installing: tazpkg                                                   [ Done ]
Installing: lzma                                                     [ Done ]
Creating resolv.conf...                                              [ Done ]
Restoring host packages list...                                      [ Done ]
================================================================================
Ready to chroot with: tazdev -c

root@slitaz:/home/tux# tazdev -c

Mounting virtual filesystems...                                      [ Done ]
Chrooting to: /home/slitaz/cooking/chroot

root@slitaz:/# cat /var/lib/tazpkg/mirror
http://mirror.slitaz.org/packages/4.0/

root@slitaz:/# cat /etc/slitaz-release
cooking
root@slitaz:/#

2013-12-10

Slitaz -- hgweb templates



No hgweb templates

<type 'exceptions.RuntimeError'>: No hgweb templates found in ['/usr/lib/python2.5/site-packages/mercurial/templates']


http://mirror.slitaz.org/hg/hgwebdir.py/wok/

http://mirror.slitaz.org/hg/hgwebdir.py/repos/cookutils/


<type 'exceptions.RuntimeError'>    Python 2.5.1: /usr/bin/python
Wed Dec 11 02:20:05 2013
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/www/hg/hgwebdir.py in ()
   46
   47 def make_web_app():
   48     return hgwebdir("/etc/mercurial/hgweb.config")
   49
   50 wsgicgi.launch(wsgiapplication(make_web_app))
wsgicgi = <proxied module 'wsgicgi'>, wsgicgi.launch = <function launch at 0x4039b844>, wsgiapplication = <function wsgiapplication at 0x4039b09c>, make_web_app = <function make_web_app at 0x4039b7d4>
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/hgweb/wsgicgi.py in launch(application=<function run_wsgi at 0x81114c4>)
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/hgweb/request.py in run_wsgi(env={'CONTENT_LENGTH': '0', 'DOCUMENT_ROOT': '/var/www/hg/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_HOST': 'mirror.slitaz.org', 'HTTP_REFERER': 'http://mirror.slitaz.org/hg/hgwebdir.py/repos/flavors/', 'HTTP_USER_AGENT': 'TazWeb (X11; SliTaz GNU/Linux; U; en_US)', 'HTTP_X_FORWARDED_FOR': '1.165.166.113', ...}, respond=<function start_response at 0x8111144>)
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py in __call__(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir object at 0x40399c8c>, env={'CONTENT_LENGTH': '0', 'DOCUMENT_ROOT': '/var/www/hg/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_CONNECTION': 'Keep-Alive', 'HTTP_HOST': 'mirror.slitaz.org', 'HTTP_REFERER': 'http://mirror.slitaz.org/hg/hgwebdir.py/repos/flavors/', 'HTTP_USER_AGENT': 'TazWeb (X11; SliTaz GNU/Linux; U; en_US)', 'HTTP_X_FORWARDED_FOR': '1.165.166.113', ...}, respond=<function start_response at 0x8111144>)
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/hgweb/hgwebdir_mod.py in run_wsgi(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir object at 0x40399c8c>, req=<mercurial.hgweb.request.wsgirequest object at 0x40399cac>)
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/hgweb/hgweb_mod.py in run_wsgi(self=<mercurial.hgweb.hgweb_mod.hgweb object at 0x8123bcc>, req=<mercurial.hgweb.request.wsgirequest object at 0x40399cac>)
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/hgweb/hgweb_mod.py in templater(self=<mercurial.hgweb.hgweb_mod.hgweb object at 0x8123bcc>, req=<mercurial.hgweb.request.wsgirequest object at 0x40399cac>)
 /home/slitaz/wok/mercurial/mercurial-1.3.1/_pkg/usr/lib/python2.5/site-packages/mercurial/templater.py in stylemap(style='<!--: spamContent', paths=['/usr/lib/python2.5/site-packages/mercurial/templates'])
<type 'exceptions.RuntimeError'>: No hgweb templates found in ['/usr/lib/python2.5/site-packages/mercurial/templates']


Slitaz -- firefox-distribution


firefox-distribution

1.
firefox/stuff/distribution.ini

# Partner Distribution Configuration File

# id: short string unique to this distribution
# about: a short descriptive (ui-visible) string for this
# distribution
# version: version of the extra distribution pieces (not the version
# of Firefox)

[Global]
id=SliTaz GNU/Linux
version=5.0
about=Distribution Edition
about.fr=Édition pour la distribution


2.
wok diff firefox/stuff/distribution.ini @ 14210:dbd41e6636de
http://hg.slitaz.org/wok/diff/dbd41e6636de/firefox/stuff/distribution.ini

Up: firefox (17.0.4esr)
author    Dominique Corbex <domcox@slitaz.org>
date    Sat Mar 16 21:28:06 2013 +0100 (8 months ago ago)
parents   
children   
   line diff
     1.1 --- /dev/null    Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/firefox/stuff/distribution.ini    Sat Mar 16 21:28:06 2013 +0100
     1.3 @@ -0,0 +1,77 @@
     1.4 +# Partner Distribution Configuration File
     1.5 +
     1.6 +# id: short string unique to this distribution
     1.7 +# about: a short descriptive (ui-visible) string for this
     1.8 +# distribution
     1.9 +# version: version of the extra distribution pieces (not the version
    1.10 +# of Firefox)
    1.11 +
    1.12 +[Global]
    1.13 +id=SliTaz GNU/Linux
    1.14 +version=5.0
    1.15 +about=Distribution Edition
    1.16 +about.fr=Édition pour la distribution
    1.17 +
[..]

Slitaz -- pcmanfm-gvfs


pcmanfm-gvfs

Error:
Not authorized to perform operation

1.
tux@slitaz:~$ tazpkg list | grep pcmanfm
pcmanfm                 1.1.0             system-tools


2.
tux@slitaz:~$ grep disk /etc/group
disk:x:6:root
tux@slitaz:~$ sudo sed -i 's/6:root/6:root,tux/' /etc/group
tux@slitaz:~$ grep disk /etc/group
disk:x:6:root,tux
tux@slitaz:~$


3.
tux@slitaz:~$ ls /run/media/tux /run/media/tux/core
/run/media/tux:
core  tank

/run/media/tux/core:
bin         etc         lib         mnt         run         tmp
boot        home        lost+found  proc        sbin        usr
dev         init        media       root        sys         var
tux@slitaz:~$


4.
tux@slitaz:~$ mount
rootfs on / type rootfs (rw)
tmpfs on /run type tmpfs (rw,relatime)
tmpfs on / type tmpfs (rw,relatime,size=2733048k)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=1499256k,nr_inodes=209819,mode=755)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
gvfs-fuse-daemon on /home/tux/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sda5 on /run/media/tux/tank type ext3 (rw,nosuid,nodev,relatime,errors=continue,user_xattr,barrier=1,data=ordered)
/dev/sda6 on /run/media/tux/core type ext3 (rw,nosuid,nodev,relatime,errors=continue,barrier=1,data=ordered)
tux@slitaz:~$

2013-12-08

Slitaz -- Newsletter - Issue 30


Table of Contents
http://doc.slitaz.org/en:newsletter:start

Monthly Newsletter - Issue 30
Latest News
New Packages
Updated Packages (abridged)
Improvements
Bugs
Cartoon
Tips and Tricks
Online
Old Issues

Monthly Newsletter - Issue 30

Lang:cn de en es fr ru

Written on 1st September 2013

[..]

Tips and Tricks

60 Commands of Linux : A Guide from Newbies to System Administrator : http://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/

Online

Slitaz's Notes - Alanyih - http://alanyih.blogspot.co.uk/

Old Issues

Click here


en/newsletter/start.txt · Last modified: 2013/08/23 21:36 by linea




2013-12-02

Vagrant / Vagrantbox.es


Vagrant

Development environments made easy.
Create and configure lightweight, reproducible, and portable development environments.

Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the "works on my machine" excuse a relic of the past.


Vagrantbox.es

Vagrant is an amazing tool for managing virtual machines via a simple to use command line interface. With a simple vagrant up you can be working in a clean environment based on a standard template.
These standard templates are called base boxes, and this website is simply a list of boxes people have been nice enough to make publicly available.
[..]

Available Boxes

To use the available boxes just replace {title} and {url} with the information in the table below.
 $ vagrant box add {title} {url}
 $ vagrant init {title}
 $ vagrant up 
The list of boxes was last updated on October 25th, 2013.

NameProviderURLSize
CentOS 6.4 amd64 for vagrant-lxc with Puppet 3.3.1 Vagrant-LXC https://dl.dropboxusercontent.com/s/eukkxp5mp2l5h53/lxc-centos6.4-2013-10-24.box 251M
Debian Squeeze amd64 (Puppet 3.2.3, LXC, 2013.07.27) Vagrant-LXC https://dl.dropboxusercontent.com/u/67225617/lxc-vagrant/lxc-squeeze64-puppet3-2013-07-27.box 106.17MB
Debian Squeeze amd64 (Puppet 3.2.3, LXC, 2013.07.27) Vagrant-LXC https://dl.dropboxusercontent.com/u/67225617/lxc-vagrant/lxc-squeeze64-puppet3-2013-07-27.box 106.17MB
Debian Squeeze amd64 (Puppet 3.2.3, LXC, 2013.07.27) Vagrant-LXC https://dl.dropboxusercontent.com/u/67225617/lxc-vagrant/lxc-squeeze64-puppet3-2013-07-27.box 106.17MB
Debian Wheezy amd64 (Puppet 3.2.3, LXC, 2013.07.27) Vagrant-LXC https://dl.dropboxusercontent.com/u/67225617/lxc-vagrant/lxc-wheezy64-puppet3-2013-07-27.box 102.5MB
Openmandriva2013.0 x86_64 (LXC, 2013.10.21) Vagrant-LXC http://bit.ly/vagrant-lxc-openmandriva2013-0-x86_64-2013-10-21 88MB
Ubuntu 13.04 amd64 for vagrant-lxc with Puppet 3.1.1 Vagrant-LXC http://dl.dropbox.com/u/13510779/lxc-raring-amd64-2013-07-12.box 92M
Ubuntu 12.10 amd64 for vagrant-lxc with Puppet 3.1.1 Vagrant-LXC http://dl.dropbox.com/u/13510779/lxc-quantal-amd64-2013-07-12.box 94M
Ubuntu 12.04 amd64 for vagrant-lxc with Puppet 3.1.1 Vagrant-LXC http://dl.dropbox.com/u/13510779/lxc-precise-amd64-2013-07-12.box 94M
Arch Linux 64 (2013-08-01) VirtualBox https://dl.dropboxusercontent.com/u/31112574/arch64-20130801.box 578MB
Arch Linux 64 (2013-07-26) - Chef 11.6.0 from gem, Ruby from pacman VirtualBox http://iweb.dl.sourceforge.net/project/flowboard-vagrant-boxes/arch64-2013-07-26-chef.box 466.7 MB
CentOS 6.4 i386 Minimal (VirtualBox Guest Additions 4.2.16, Chef 11.6.0, Puppet 3.2.3) VirtualBox http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-i386-v20130731.box 459MB
CentOS 6.4 x86_64 Minimal (VirtualBox Guest Additions 4.2.16, Chef 11.6.0, Puppet 3.2.3) VirtualBox http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box 494MB
Debian Wheezy 7.2 amd64 (VirtualBox Guest Additions 4.3.0) (2013/10/19) VirtualBox https://dl.dropboxusercontent.com/u/197673519/debian-7.2.0.box 295MB
Debian Wheezy 7.2 amd64 (VirtualBox Guest Additions 4.3.0, OpenResty 1.4.3.1) (2013/10/31) (src) VirtualBox https://dl.dropboxusercontent.com/s/odnew2tnliqft9o/debian7-openresty.box 355MB
Fedora 19 x86_64 (Puppet, VirtualBox) VirtualBox https://dl.dropboxusercontent.com/u/86066173/fedora-19.box 400MB
FreeBSD 9.2 x86_64 Minimal (VirtualBox, ZFS) VirtualBox https://wunki.org/files/freebsd-9.2-amd64-wunki.box 226MB
Gentoo 2013.05 amd64 (Chef omnibus 11.4.4, VirtualBox 4.2.12) VirtualBox https://lxmx-vm.s3.amazonaws.com/vagrant/boxes/lxmx_gentoo-2013.05_chef-11.4.4.box 357MB
Gentoo 2013.10.24 amd64 (chef, puppet) on 2013.10.30
[src]
VirtualBox https://dl.dropboxusercontent.com/s/qubuaqiizvfpsyx/gentoo-20131024-amd64.box 416.4 MB
Official Ubuntu 13.10 daily Cloud Image amd64 (Development release, No Guest Additions) VirtualBox http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box 309M
Official Ubuntu 13.10 daily Cloud Image i386 (Development release, No Guest Additions) VirtualBox http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-i386-vagrant-disk1.box 309M
CentOS 6.4 x86_64 Minimal VMware Fusion (VMware Tools, Chef 11.4.0, Puppet 3.1.1) VMware https://dl.dropbox.com/u/5721940/vagrant-boxes/vagrant-centos-6.4-x86_64-vmware_fusion.box 545.94MB
Ubuntu 13.10 amd64 for VMWare (with Chef, ruby1.9.3 and vmware-tools) VMWare http://brennovich.s3.amazonaws.com/saucy64_vmware_fusion.box 536M
Ubuntu raring 64 VMWare VMware https://s3.amazonaws.com/life360-vagrant/raring64.box 393MB
[..]
http://www.vagrantbox.es/




Slitaz -- vagrant-slitaz


vagrant-slitaz

Vagrant setup based on Slitaz Linux. Started from base cooking image 8Mb. Built against Virtual Box Guest Addins v4.3.

Benefits

The main one is the small vagrant's box size ~96Mb. Despite this the Slitaz guest OS is equipped with: Apache2.4, php-5.4.13, xdebug-2.2.3, perl-5.12.3, MySql-5.5.27, sqlite3, php-cli, git-1.8.3, composer-2013-10-21, ngrok, phpMyAdmin-3.5.2, openssh-5.9

1.
tux@slitaz:~/vagrant-slitaz-master$ vagrant ssh

Welcome to the Open Source World!

SliTaz GNU/Linux is distributed in the hope that it will be useful,
but with ABSOLUTELY NO WARRANTY.

2.
web@devbox:~$ uname -a
Linux devbox 3.2-slitaz #4 SMP Sun Jan 27 02:10:33 CET 2013 i686 GNU/Linux

3.
web@devbox:~$ free -m
total used free shared buffers
Mem: 1516 273 1242 0 116
-/+ buffers: 157 1359
Swap: 0 0 0

4.
web@devbox:~$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 5.8G 471.1M 5.0G 8% /
tmpfs 758.3M 200.0K 758.1M 0% /run
devtmpfs 758.1M 0 758.1M 0% /dev
tmpfs 758.3M 0 758.3M 0% /dev/shm
none 2.9G 1.3G 1.6G 45% /projects
none 2.9G 1.3G 1.6G 45% /projects/www

5.
web@devbox:~$ ls -l /
total 72
drwxr-xr-x 2 root root 4096 Oct 22 20:23 bin/
drwxr-xr-x 4 root root 4096 Oct 22 20:35 boot/
drwxr-xr-x 12 root root 2880 Dec 2 16:06 dev/
drwxr-xr-x 16 root root 4096 Oct 27 20:02 etc/
drwxr-xr-x 3 root root 4096 Oct 25 13:01 home/
-rwxr-xr-x 1 root root 4081 Jan 17 2013 init
drwxr-xr-x 5 root root 4096 Oct 25 08:24 lib/
drwx------ 2 root root 16384 Oct 22 10:25 lost+found/
drwxr-xr-x 5 root root 4096 Oct 22 10:28 media/
drwxr-xr-x 2 root root 4096 Sep 23 13:53 mnt/
drwxr-xr-x 3 root root 4096 Oct 25 12:49 opt/
dr-xr-xr-x 63 root root 0 Dec 2 16:06 proc/
drwxrwxrwx 1 web web 160 Dec 2 16:04 projects/
drwxr-x--- 2 root root 4096 Oct 28 11:48 root/
drwxrwxrwt 8 root root 260 Dec 2 16:06 run/
drwxr-xr-x 2 root root 4096 Oct 25 08:24 sbin/
drwxr-xr-x 12 root root 0 Dec 2 16:06 sys/
drwxrwxrwt 4 root root 4096 Dec 2 16:09 tmp/
drwxr-xr-x 10 root root 4096 Oct 27 20:02 usr/
drwxr-xr-x 10 root root 4096 Dec 2 16:06 var/
web@devbox:~$




2013-12-01

Slitaz -- rolling



slitaz-rolling.iso 2013-Nov-24 01:03:35 42.0M


1
tux@slitaz:~$ uname -a
Linux slitaz 3.2-slitaz #4 SMP Sat Nov 23 16:46:58 CET 2013 i686 GNU/Linux

2.
tux@slitaz:~$ grep 'such file' /var/log/boot.log
grep: /lib/modules/3.2-slitaz/modules.usbmap: No such file or directory
grep: /lib/modules/3.2-slitaz/modules.usbmap: No such file or directory
Setting default mixer volumes... amixer: Mixer attach default error: No such file or directory
amixer: Mixer attach default error: No such file or directory
/usr/sbin/soundconf: line 1080: can't open /lib/modules/3.2-slitaz/modules.pcimap: no such file
/usr/sbin/soundconf: line 1080: can't open /lib/modules/3.2-slitaz/modules.isapnpmap: no such file

3.
tux@slitaz:~$ ls -l /lib/modules/3.2.40-slitaz/
total 1032
drwxr-xr-x 10 root root 200 Nov 23 23:57 kernel
-rw-r--r-- 1 root root 241244 Nov 23 23:54 modules.alias
-rw-r--r-- 1 root root 235317 Nov 23 23:54 modules.alias.bin
-rw-r--r-- 1 root root 8547 Nov 23 16:30 modules.builtin
-rw-r--r-- 1 root root 12194 Nov 23 23:57 modules.builtin.bin
-rw-r--r-- 1 root root 93360 Nov 23 23:54 modules.dep
-rw-r--r-- 1 root root 122861 Nov 23 23:54 modules.dep.bin
-rw-r--r-- 1 root root 103 Nov 23 23:54 modules.devname
-rw-r--r-- 1 root root 71340 Nov 23 16:30 modules.order
-rw-r--r-- 1 root root 131 Nov 23 23:57 modules.softdep
-rw-r--r-- 1 root root 112439 Nov 23 23:54 modules.symbols
-rw-r--r-- 1 root root 138006 Nov 23 23:54 modules.symbols.bin

4.
tux@slitaz:~$ zcat /proc/config.gz | grep -e IP_PNP -e NFS
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
# CONFIG_USB_FUNCTIONFS is not set
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
# CONFIG_NFS_V4 is not set
# CONFIG_ROOT_NFS is not set
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
# CONFIG_NFSD_V4 is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
# CONFIG_NCPFS_NFS_NS is not set

tux@slitaz:~$ zcat /proc/config.gz | grep CGROUP
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_SCHED=y
# CONFIG_BLK_CGROUP is not set
# CONFIG_NET_CLS_CGROUP is not set
tux@slitaz:~$

2013-11-26

Slitaz -- alsamixer



alsamixer - amixer

[UPDATE 20131225 ]

Unmuting the channels
The current version of ALSA installs with all channels muted by default. You will need to unmute the channels manually.

It is easiest to use alsamixer ncurses UI to accomplish this:

$ alsamixer

Alternatively, use amixer from the command-line:

$ amixer sset Master unmute

In alsamixer, the MM label below a channel indicates that the channel is muted, and 00 indicates that it is open.

Scroll to the Master and PCM channels with the ← and → keys and unmute them by pressing the m key. Use the ↑ key to increase the volume and obtain a value of 0 dB gain. The gain can be found in the upper left next to the Item: field. Higher values of gain will produce distorted sound.


$ amixer sset 'Speaker' unmute
$ amixer sset 'Headphone' unmute

1.
tux@slitaz:~$ amixer
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 59 [92%] [-3.75dB] [on]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 62 [97%] [-1.50dB] [off]
Front Right: Playback 62 [97%] [-1.50dB] [off]
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 61 [95%] [-2.25dB] [off]
Front Right: Playback 61 [95%] [-2.25dB] [off]
[..]


2.
tux@slitaz:~$ amixer sset 'Speaker' unmute
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 62 [97%] [-1.50dB] [on]
Front Right: Playback 62 [97%] [-1.50dB] [on]

3.
tux@slitaz:~$ amixer sset 'Headphone' unmute
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 62 [97%] [-1.50dB] [on]
Front Right: Playback 62 [97%] [-1.50dB] [on]
tux@slitaz:~$

4.
tux@slitaz:~$ amixer scontents
Simple mixer control 'Master',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 49 [77%] [-11.25dB] [on]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 52 [81%] [-9.00dB] [on]
Front Right: Playback 52 [81%] [-9.00dB] [on]
Simple mixer control 'Speaker',0
Capabilities: pvolume pswitch penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 64
Mono:
Front Left: Playback 61 [95%] [-2.25dB] [on]
Front Right: Playback 61 [95%] [-2.25dB] [on]
Simple mixer control 'PCM',0
Capabilities: pvolume penum
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 243 [95%] [-2.40dB]
Front Right: Playback 243 [95%] [-2.40dB]
Simple mixer control 'Front Mic',0
Capabilities: cvolume penum
Capture channels: Front Left - Front Right
Limits: Capture 0 - 3
Front Left: Capture 0 [0%] [0.00dB]
Front Right: Capture 0 [0%] [0.00dB]
Simple mixer control 'Front Mic Jack Mode',0
Capabilities: enum
Items: 'Mic In' 'Line In'
Item0: 'Mic In'
Simple mixer control 'Line',0
Capabilities: cvolume penum
Capture channels: Front Left - Front Right
Limits: Capture 0 - 3
Front Left: Capture 0 [0%] [0.00dB]
Front Right: Capture 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
Capabilities: pswitch pswitch-joined penum
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
Capabilities: pswitch pswitch-joined penum
Playback channels: Mono
Mono: Playback [on]
Simple mixer control 'IEC958 Playback Source',0
Capabilities: enum
Items: 'Digital Playback' 'Off'
Item0: 'Digital Playback'
Simple mixer control 'IEC958 Playback Source',1
Capabilities: enum
Items: 'Digital Playback' 'Off'
Item0: 'Digital Playback'
Simple mixer control 'Aux',0
Capabilities: cvolume penum
Capture channels: Front Left - Front Right
Limits: Capture 0 - 3
Front Left: Capture 0 [0%] [0.00dB]
Front Right: Capture 0 [0%] [0.00dB]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch penum
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 0 [0%] [0.00dB] [off]
Front Right: Capture 0 [0%] [0.00dB] [off]
Simple mixer control 'Capture',1
Capabilities: cvolume cswitch penum
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 0 [0%] [0.00dB] [off]
Front Right: Capture 0 [0%] [0.00dB] [off]
Simple mixer control 'Input Source',0
Capabilities: cenum
Items: 'Front Mic' 'Rear Mic' 'Line' 'Aux'
Item0: 'Front Mic'
Simple mixer control 'Input Source',1
Capabilities: cenum
Items: 'Front Mic' 'Rear Mic' 'Line' 'Aux'
Item0: 'Front Mic'
Simple mixer control 'Rear Mic',0
Capabilities: cvolume penum
Capture channels: Front Left - Front Right
Limits: Capture 0 - 3
Front Left: Capture 0 [0%] [0.00dB]
Front Right: Capture 0 [0%] [0.00dB]
Simple mixer control 'Rear Mic Jack Mode',0
Capabilities: enum
Items: 'Mic In' 'Line In'
Item0: 'Mic In'
tux@slitaz:~$

2013-11-14

Slitaz -- lsof

lsof (list open files)

How to find what program or service is listening on ports

1.
root@slitaz:/home/tux# lsof -Pnl +M -i4
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dropbear 1406 0 3u IPv4 4317 0t0 TCP *:22 (LISTEN)
Xorg 1433 0 3u IPv4 4504 0t0 TCP *:6000 (LISTEN)
firefox 1539 1000 45u IPv4 32787 0t0 TCP 192.168.1.30:58613->173.194.72.189:443 (ESTABLISHED)

-P no port names
-l list UID numbers
-n no host names
-i select IPv[46] files
+|-M portMap registration (-)

2.
root@slitaz:/home/tux# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 1433/Xorg
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1406/dropbear
root@slitaz:/home/tux#

Slitaz -- speedtest-cli

speedtest-cli

Command line interface for testing internet bandwidth using speedtest.net

1.
root@slitaz:/home/tux# date
Fri Nov 15 09:41:17 CST 2013

2.
root@slitaz:/home/tux# wget --no-check-certificate  https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py 
--2013-11-15 09:39:51--  https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
Resolving raw.github.com (raw.github.com)... 103.245.222.133
Connecting to raw.github.com (raw.github.com)|103.245.222.133|:443... connected.
WARNING: cannot verify raw.github.com's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 16485 (16K) [text/plain]
Saving to: `speedtest_cli.py'

100%[======================================>] 16,485      --.-K/s   in 0.07s  

2013-11-15 09:39:52 (226 KB/s) - `speedtest_cli.py' saved [16485/16485]

3.
root@slitaz:/home/tux# chmod 755 speedtest_cli.py

4.
root@slitaz:/home/tux# ./speedtest_cli.py
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from CHTD, Chunghwa Telecom Co., Ltd. (1.165.xx.xx)...
Selecting best server based on ping...
Hosted by Far EasTone Telecommunications Co., Ltd (Taoyuan) [30.61 km]: 12.398 ms
Testing download speed........................................
Download: 29.64 Mbit/s
Testing upload speed..................................................
Upload: 2.98 Mbit/s
root@slitaz:/home/tux#

root@slitaz:/home/tux# ./speedtest_cli.py
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from CHTD, Chunghwa Telecom Co., Ltd. (61.224.xx.xx)...
Selecting best server based on ping...
Hosted by Taiwan Fixed Network (Taichung) [1.67 km]: 14.067 ms
Testing download speed........................................
Download: 39.70 Mbit/s
Testing upload speed..................................................
Upload: 2.90 Mbit/s
root@slitaz:/home/tux#

2013-11-06

Slitaz -- JDK


get-java6-jdk

HTTP request sent, awaiting response... 404 Not Found

Processing post install commands.../usr/bin/tazpkg: cd: line 32: can't cd to /usr/lib/firefox*/plugins


1.
http://cook.slitaz.org/cooker.cgi?download=get-java6-jdk-1.0.tazpkg

root@slitaz:/tmp# get-java6-jdk
--2013-11-06 22:52:56--  http://raphaello.univ-fcomte.fr/ftp/java/Jdk/jdk-6u13-linux-i586.bin
Resolving raphaello.univ-fcomte.fr (raphaello.univ-fcomte.fr)... 194.57.88.125
Connecting to raphaello.univ-fcomte.fr (raphaello.univ-fcomte.fr)|194.57.88.125|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2013-11-06 22:52:58 ERROR 404: Not Found.


2.
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin

root@slitaz:/tmp# get-java6-jdk
--2013-11-06 23:06:23--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06//jdk-6u45-linux-i586.bin
Resolving download.oracle.com (download.oracle.com)... 210.61.248.41, 210.61.248.24
Connecting to download.oracle.com (download.oracle.com)|210.61.248.41|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin [following]
--2013-11-06 23:06:23--  https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.77.22.140
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.77.22.140|:443... connected.
WARNING: cannot verify edelivery.oracle.com's certificate, issued by `/C=US/O=GeoTrust, Inc./CN=GeoTrust SSL CA':
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin?AuthParam=1383750200_4cb609f881784567d740e7ca5667fe0c [following]
--2013-11-06 23:06:24--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin?AuthParam=1383750200_4cb609f881784567d740e7ca5667fe0c
Connecting to download.oracle.com (download.oracle.com)|210.61.248.41|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71799552 (68M) [application/octet-stream]
Saving to: `jdk-6u45-linux-i586.bin'

     0K .......... .......... .......... .......... ..........  0%  265K 4m24s
    50K .......... .......... .......... .......... ..........  0%  296K 4m10s
   100K .......... .......... .......... .......... ..........  0%  794K 3m16s
   150K .......... .......... .......... .......... ..........  0%  638K 2m54s
[..]
 70050K .......... .......... .......... .......... .......... 99% 5.49M 0s
 70100K .......... ......                                     100% 10.9M=16s

2013-11-06 23:06:41 (4.39 MB/s) - `jdk-6u45-linux-i586.bin' saved [71799552/71799552]

Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
   creating: jdk1.6.0_45/
[..]
Creating jdk1.6.0_45/jre/lib/javaws.jar
Creating jdk1.6.0_45/jre/lib/deploy.jar

Done.

Packing : java6-jdk-1.6.0_45
================================================================================
Creating the list of files...                                        [ OK ]
Creating md5sum of files...                                          [ OK ]
Compressing the fs...                                                [ OK ]
Updating receipt sizes...                                            [ OK ]
Creating full cpio archive...                                        [ OK ]
Restoring original package tree...                                   [ OK ]
================================================================================
Package java6-jdk-1.6.0_45 compressed successfully.
Size : 64.1M    java6-jdk-1.6.0_45.tazpkg


Installation of : java6-jdk
================================================================================
Copying java6-jdk...                                                 [ OK ]
Extracting java6-jdk...                                              [ OK ]
Extracting the pseudo fs... (lzma)                                   [ OK ]
Installing java6-jdk...                                              [ OK ]
Removing all tmp files...                                            [ OK ]
Processing post install commands.../usr/bin/tazpkg: cd: line 32: can't cd to /usr/lib/firefox*/plugins
                                                                     [ OK ]
================================================================================
java6-jdk (1.6.0_45) is installed.


3.
root@slitaz:/tmp# ls -l /usr/lib/mozilla/plugins/
total 0
lrwxrwxrwx    1 root     root            34 Nov  7 00:24 libflashplayer.so -> /usr/share/flash/libflashplayer.so
lrwxrwxrwx    1 root     root            50 Nov  6 23:44 libnpjp2.so -> /usr/lib/java/jdk1.6.0_45/jre/lib/i386/libnpjp2.so


4.
root@slitaz:/tmp# java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode)

root@slitaz:/tmp# javac -version
javac 1.6.0_45

root@slitaz:/tmp# javap -help | head -1
Usage: javap <options> <classes>...

root@slitaz:/tmp# javadoc -help | head -2
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
-overview <file>          Read overview documentation from HTML file



5.
root@slitaz:/tmp# diff /usr/bin/get-java6-jdk-1.0 /usr/bin/get-java6-jdk
--- /usr/bin/get-java6-jdk-1.0
+++ /usr/bin/get-java6-jdk
@@ -6,9 +6,9 @@
 # Author : K�vin DA SILVA <dasilvakevin@hotmail.fr>

 PACKAGE="java6-jdk"
-VERSION="1.6.0_13"
-URL="http://raphaello.univ-fcomte.fr/ftp/java/Jdk"
-TARBALL="jdk-6u13-linux-i586.bin"
+VERSION="1.6.0_45"
+URL="http://download.oracle.com/otn-pub/java/jdk/6u45-b06"
+TARBALL="jdk-6u45-linux-i586.bin"
 TEMP_DIR="/tmp/$PACKAGE.$$"
 ROOT="$1"

@@ -38,7 +38,7 @@
 cd $TEMP_DIR

 # Download the file
-test -f $TARBALL || wget $URL/$TARBALL
+test -f $TARBALL || wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" $URL/$TARBALL
 if [ ! -f $TARBALL ]; then
     cd $CUR_DIR
     rm -rf $TMP_DIR
@@ -80,8 +80,8 @@
 post_install()
 {
     echo -n "Processing post install commands..."
-    cd /usr/lib/firefox*/plugins
-    ln -s /usr/lib/java/jdk\$VERSION/jre/plugin/i386/ns7/libjavaplugin_oji.so
+    [ -d /usr/lib/mozilla/plugins ] || mkdir -p /usr/lib/mozilla/plugins
+    ln -s /usr/lib/java/jdk\$VERSION/jre/lib/i386/libnpjp2.so /usr/lib/mozilla/plugins

     #lien mit dans red5 /usr/bin/javajdk
     cd /usr/bin
@@ -94,8 +94,11 @@

 post_remove()
 {
-    rm -f /usr/lib/firefox*/plugins/libjavaplugin_oji.so
+    rm -f /usr/lib/mozilla/plugins/libnpjp2.so
     rm -f /usr/bin/java
+    rm -f /usr/bin/javac
+    rm -f /usr/bin/javadoc
+    rm -f /usr/bin/javap
 }
 EOT


6.
Package: get-java6-jdk
http://cook.slitaz.org/cooker.cgi?pkg=get-java6-jdk

receipt home files download
Cook summary

Summary for: get-java6-jdk 1.0
================================================================================
Produced    : 4.0K
Packed      : 32.0K
Compressed  : 4.0K
Files       : 1
Cook time   : 1s
Cook date   : 2013-09-22 13:54
Host arch   : i486
================================================================================

Slitaz -- JRE

get-java6-jre
Could not download jre.bin. Exiting.

# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jre-6u45-linux-i586.bin"

JDK 6u45
http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin
JRE 6u45
http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jre-6u45-linux-i586.bin

JDK 7u25
    http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-i586.tar.gz
JRE 7u25
    http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jre-7u25-linux-i586.tar.gz
JDK 7u45
    http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-i586.tar.gz


1.
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jre-6u45-linux-i586.bin"

# curl -L -O -k -H "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin"

root@slitaz:/home/tux# curl -L -O -k -H "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-i586.bin"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0   286    0     0    347      0 --:--:-- --:--:-- --:--:--   347
100 68.4M  100 68.4M    0     0  3715k      0  0:00:18  0:00:18 --:--:-- 3167k
root@slitaz:/home/tux#

 -H, --header LINE   Custom header to pass to server (H)
 -k, --insecure      Allow connections to SSL sites without certs (H)
 -L, --location      Follow redirects (H)
 -o, --output FILE   Write output to <file> instead of stdout
 -O, --remote-name   Write output to a file named as the remote file
     --remote-name-all Use the remote file name for all URLs


2.
root@slitaz:/home/tux# java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode)


3.
http://mirror.slitaz.org/packages/cooking/get-java6-jre-1.1.0.tazpkg

root@slitaz:/home/tux# diff /usr/bin/get-java6-jre-1.1.0 /usr/bin/get-java6-jre
--- /usr/bin/get-java6-jre-1.1.0
+++ /usr/bin/get-java6-jre
@@ -6,15 +6,15 @@
 # Author : Eric Joseph-Alexandre <erjo@slitaz.org>

 PACKAGE="java6-jre"
-WEB_SITE="http://www.java.com/"
+WEB_SITE="http://download.oracle.com/otn-pub/java/jdk/"
 SHORT_DESC="SUN Java Runtime."
 DEPENDS="xorg-libXtst"
 TARBALL="jre.bin"
 TEMP_DIR="/tmp/$PACKAGE.$$"
 ROOT="$1"

-URL="$(wget -O - ${WEB_SITE}en/download/manual_v6.jsp | \
-       sed '/self-extracting/!d;s/.*href="\([^"]*\).*/\1/;q')"
+# URL="$(wget -O - ${WEB_SITE}en/download/manual_v6.jsp | \
+#       sed '/self-extracting/!d;s/.*href="\([^"]*\).*/\1/;q')"

 # Check if we are root starting anything
 if test $(id -u) != 0 ; then
@@ -36,8 +36,12 @@
 test -d $TEMP_DIR || mkdir $TEMP_DIR
 cd $TEMP_DIR

+# FIXME. http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jre-6u45-linux-i586.bin
+URL="$(wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F" -O $TARBALL ${WEB_SITE}6u45-b06/jre-6u45-linux-i586.bin)"
+
 # Download the file
-test -f $TARBALL || wget $URL -O $TARBALL
+# test -f $TARBALL || wget $URL -O $TARBALL
+test -f $TARBALL || $URL
 if [ ! -f $TARBALL ]; then
     cd $CUR_DIR
     rm -rf $TEMP_DIR
root@slitaz:/home/tux#


4.
wok - Searching for 'java'
http://hg.slitaz.org/wok/log?rev=java

age     author     description
2 days ago     Dominique Corbex     get-LibreOffice: mv java from DEPS to SUGGESTED
8 weeks ago     Pascal Bellard     Add some licenses
8 weeks ago     Pascal Bellard     get-*: add license
2 months ago     Pascal Bellard     Add some GPL2 licenses
3 months ago     Pascal Bellard     *vnc*: add LICENSE
3 months ago     Eric Joseph-Alexandre     Add: tightvnc-java
10 months ago     Pascal Bellard     Update get-java6-jre (again)
10 months ago     Pascal Bellard     Update get-java6-jre (thanks ernia)
17 months ago     Richard Dunbar     get-java6-jre: fix generic with tar
17 months ago     Richard Dunbar     get-java6-jre: update tarball


Ref:
http://www.oracle.com/technetwork/java/javase/terms/license/index.html
http://stackoverflow.com/questions/10268583/how-to-automate-download-and-instalation-of-java-jdk-on-linux

2013-11-05

Debian HCL




Debian HCL (Hardware Compatibility List) Web system

Debian GNU/Linux device driver check page

Boot your machine with a GNU/Linux OS (such as Debian, Knoppix, Redhat, and so on), run 'lspci -n' and paste the output into the box below, then press 'Check' button.

Notice:
  • This database uses the PCI map of Debian kernel 3.2.0-4-amd64 .
  • The result does NOT guarantee your hardware works perfectly.
  • This database only verifies the PCI devices at this time. X drivers, ISA, USB, IEEE1394 or any other devices are out of the focus. 

2013-11-01

Slitaz -- lxc / templates

lxc-busybox
....
install_busybox()

1.
root@slitaz:/home/tux# ls /usr/lib/lxc/templates
lxc-busybox   lxc-fedora    lxc-lucid     lxc-natty
lxc-debian    lxc-lenny     lxc-maverick  lxc-sshd


2.
root@slitaz:/home/tux# ls /var/lib/lxc/slitaz-lxc/rootfs
bin      etc      lib      mnt      root     selinux  usr
dev      home     lib64    proc     sbin     tmp      var

    rootfs=$1
    name=$2
    res=0
    tree="\
$rootfs/selinux \
$rootfs/dev \
$rootfs/home \
$rootfs/root \
$rootfs/etc \
$rootfs/etc/init.d \
$rootfs/bin \
$rootfs/sbin \
$rootfs/proc \
$rootfs/mnt \
$rootfs/tmp \
$rootfs/var/log \
$rootfs/usr/share/udhcpc \
$rootfs/dev/pts \
$rootfs/dev/shm \
$rootfs/lib \
$rootfs/usr/lib \
$rootfs/lib64 \
$rootfs/usr/lib64"

    mkdir -p $tree || return 1
    chmod 755 $tree || return 1


3.
root@slitaz:/home/tux# ls -l /var/lib/lxc/slitaz-lxc/rootfs/dev
total 8
crw-rw-rw-    1 root     root        5,   1 Nov  1 12:47 console
crw-rw-rw-    1 root     root        1,   3 Nov  1 12:47 null
lrwxrwxrwx    1 root     root            13 Nov  1 13:12 ptmx -> /dev/pts/ptmx
drwxr-xr-x    2 root     root          4096 Nov  1 12:47 pts
brw-------    1 root     root        1,   0 Nov  1 12:47 ram0
drwxr-xr-x    2 root     root          4096 Nov  1 12:47 shm
crw-rw-rw-    1 root     root        5,   0 Nov  1 12:47 tty
crw-rw-rw-    1 root     root        4,   0 Nov  1 12:47 tty0
crw-r--r--    1 root     root        4,   0 Nov  1 12:47 tty1
crw-r--r--    1 root     root        4,   0 Nov  1 12:47 tty5

    # minimal devices needed for busybox
    mknod tty c 5 0       || res=1
    mknod console c 5 1   || res=1
    chmod 666 tty console || res=1
    mknod tty0 c 4 0      || res=1
    mknod tty1 c 4 0      || res=1
    mknod tty5 c 4 0      || res=1
    chmod 666 tty0        || res=1
    mknod ram0 b 1 0      || res=1
    chmod 600 ram0        || res=1
    mknod null c 1 3      || res=1
    chmod 666 null        || res=1


4.
root@slitaz:/home/tux# cat /var/lib/lxc/slitaz-lxc/rootfs/etc/passwd
root:x:0:0:root:/root:/bin/sh

    # root user defined
    cat <<EOF >> $rootfs/etc/passwd
root:x:0:0:root:/root:/bin/sh
EOF


5.
root@slitaz:/home/tux# cat /var/lib/lxc/slitaz-lxc/rootfs/etc/group
root:x:0:root

    cat <<EOF >> $rootfs/etc/group
root:x:0:root
EOF


6.
root@slitaz:/home/tux# cat /var/lib/lxc/slitaz-lxc/rootfs/etc/init.d/rcS
#!/bin/sh
/bin/syslogd
/bin/mount -a
/bin/udhcpc

    cat <<EOF >> $rootfs/etc/init.d/rcS
#!/bin/sh
/bin/syslogd
/bin/mount -a
/bin/udhcpc
EOF


7.
root@slitaz:/home/tux# cat /var/lib/lxc/slitaz-lxc/rootfs/etc/fstab
proc  /proc      proc    defaults     0      0
shm   /dev/shm   tmpfs   defaults     0      0

    # mount points
    cat <<EOF >> $rootfs/etc/fstab
proc  /proc      proc    defaults     0      0
shm   /dev/shm   tmpfs   defaults     0      0
EOF


8.
root@slitaz:/home/tux# cat /var/lib/lxc/slitaz-lxc/rootfs/etc/inittab
::sysinit:/etc/init.d/rcS
tty1::respawn:/bin/getty -L tty1 115200 vt100
console::askfirst:/bin/sh

    cat <<EOF >> $rootfs/etc/inittab
::sysinit:/etc/init.d/rcS
tty1::respawn:/bin/getty -L tty1 115200 vt100
console::askfirst:/bin/sh
EOF


9.
root@slitaz:/home/tux# cat /var/lib/lxc/slitaz-lxc/rootfs/usr/share/udhcpc/default.script
#!/bin/sh

case "$1" in
    deconfig)
        ip addr flush dev $interface
                ;;

    renew|bound)

                # flush all the routes
        if [ -n "$router" ]; then
                        ip route del default 2> /dev/null
        fi

                # check broadcast
                if [ -n "$broadcast" ]; then
                        broadcast="broadcast $broadcast"
                fi

                # add a new ip address
        ip addr add $ip/$mask $broadcast dev $interface

        if [ -n "$router" ]; then
                        ip route add default via $router dev $interface
                fi

        [ -n "$domain" ] && echo search $domain > /etc/resolv.conf
        for i in $dns ; do
            echo nameserver $i >> /etc/resolv.conf
        done
        ;;
esac
exit 0

----

    cat <<EOF >> $rootfs/usr/share/udhcpc/default.script
#!/bin/sh

case "\$1" in
    deconfig)
        ip addr flush dev \$interface
                ;;

    renew|bound)

                # flush all the routes
        if [ -n "\$router" ]; then
                        ip route del default 2> /dev/null
        fi

                # check broadcast
                if [ -n "\$broadcast" ]; then
                        broadcast="broadcast \$broadcast"
                fi

                # add a new ip address
        ip addr add \$ip/\$mask \$broadcast dev \$interface

        if [ -n "\$router" ]; then
                        ip route add default via \$router dev \$interface
                fi

        [ -n "\$domain" ] && echo search \$domain > /etc/resolv.conf
        for i in \$dns ; do
            echo nameserver \$i >> /etc/resolv.conf
        done
        ;;
esac
exit 0
EOF