# HG changeset patch # User Pascal Bellard # Date 1446393376 -3600 # Node ID ac214416e736c6e2448c69ee59f65d99529ce1f9 # Parent 577e6e91216d12183b32e69f9b1646c208c51130 Refresh style (thanks Aleksej) diff -r 577e6e91216d -r ac214416e736 helper --- a/helper Wed Oct 07 23:37:02 2015 +0200 +++ b/helper Sun Nov 01 16:56:16 2015 +0100 @@ -10,163 +10,194 @@ done | lzma e pkgs/files.list.lzma -si } + + + list_pkgs() { TMPDIR=$2 shift 2 cat < - - - - - - - - - + + + + + + + + + + + + EOT - for i in $TMPDIR/pkgs/*/receipt pkgs/*/receipt ; do + for i in $TMPDIR/pkgs/*/receipt pkgs/*/receipt; do [ -s $i ] || continue case "$i" in - pkgs/kernel-*/receipt) continue;; - pkgs/module-*/receipt) continue;; + pkgs/kernel-*/receipt) continue;; + pkgs/module-*/receipt) continue;; esac - AUTO_SELECTION="" - UNPACKED_SIZE="-" - PACKED_SIZE="-" - checked="" + AUTO_SELECTION='' + UNPACKED_SIZE='-' + PACKED_SIZE='-' + checked=''; hidden_var='' . $i case " $@ " in - *\ $PACKAGE\ *) checked='checked="checked"';; - *) [ -n "$2" ] && checked="";; + *\ $PACKAGE\ *) checked='checked="checked"';; + *) [ -n "$2" ] && checked="";; esac grep -qs "^$PACKAGE " $TMPDIR/uploadconf && checked='checked="checked"' case "$AUTO_SELECTION" in - never) - checked='disabled' ;; - always) - checked='checked="checked" disabled' - cat < -EOT + never) + continue;; + always) + checked='checked="checked" disabled' + hidden_var="";; esac cat < - - - - - - - - + + + + + + + + + EOT done cat <
PackageVersionDescriptionDiskMemory
 PackageVersionDescriptionDiskMemory 
$PACKAGE$VERSION$SHORT_DESC$PACKED_SIZE$UNPACKED_SIZE$(grep -qs ^config_form $i && echo '»')
$hidden_var + $PACKAGE$VERSION$SHORT_DESC$PACKED_SIZE$UNPACKED_SIZE$(grep -qs ^config_form $i && echo '»')
-

-

+ EOT exit } + + + list_kernels() { TMPDIR=$2 shift 2 cat < - - - - - - - + + + + + + + + + + EOT checked='checked="checked"' for i in $TMPDIR/pkgs/*/receipt pkgs/*/receipt ; do [ -s $i ] || continue case "$i" in - pkgs/kernel-*/receipt);; - *) continue;; + pkgs/kernel-*/receipt);; + *) continue;; esac UNPACKED_SIZE="-" . $i case " $@ " in - *\ $PACKAGE\ *) checked='checked="checked"' ;; - *) [ -n "$2" ] && checked="";; + *\ $PACKAGE\ *) checked='checked="checked"' ;; + *) [ -n "$2" ] && checked="";; esac cat < - - - - - - + + + + + + + EOT checked="" done cat <
KernelVersionDescription
 KernelVersionDescription
${PACKAGE#kernel-}$VERSION$SHORT_DESC
${PACKAGE#kernel-}$VERSION$SHORT_DESC
+ EOT exit } + + + list_modules() { TMPDIR=$2 shift 2 cat < +
- - - - - - - - + + + + + + + + + + + EOT for i in $TMPDIR/pkgs/*/receipt pkgs/*/receipt ; do [ -s $i ] || continue case "$i" in - pkgs/module-*/receipt);; - *) continue;; + pkgs/module-*/receipt);; + *) continue;; esac - UNPACKED_SIZE="-" + UNPACKED_SIZE='-' . $i - checked="" + checked='' case " $@ " in - *\ $PACKAGE\ *) checked='checked="checked"' ;; + *\ $PACKAGE\ *) checked='checked="checked"' ;; esac grep -qs "^$PACKAGE " $TMPDIR/uploadconf && checked='checked="checked"' cat < - - - - - - - + + + + + + + + EOT done cat <
ModuleVersionDescriptionSize
 ModuleVersionDescriptionSize 
${PACKAGE#module-}$VERSION$SHORT_DESC$UNPACKED_SIZE$(grep -qs ^config_form $i && echo '?')
${PACKAGE#module-}$VERSION$SHORT_DESC$UNPACKED_SIZE$(grep -qs ^config_form $i && echo '»')
+
EOT exit } + + + get_receipt() { grep -l "PACKAGE=\"$1\"" $2/pkgs/*/receipt pkgs/*/receipt | head -1 } + + + get_package() { local pkg @@ -180,6 +211,9 @@ echo -n $pkg } + + + get_note() { pkg=$(get_receipt $1 $2) @@ -189,6 +223,9 @@ config_note } + + + get_form() { pkg=$(get_receipt $1 $2) @@ -209,6 +246,9 @@ exit } + + + do_pre_install() { pkg=$(get_receipt $1 $2) @@ -221,6 +261,9 @@ exit } + + + do_post_install() { pkg=$(get_receipt $1 $2) @@ -237,6 +280,9 @@ exit } + + + scan_depends() { local pkg @@ -254,6 +300,9 @@ done } + + + get_depends() { TMPDIR=$2 @@ -264,6 +313,9 @@ exit } + + + pkgs_extract() { cd $2 @@ -292,6 +344,9 @@ exit } + + + lzma_set_size() { n=$(unlzma -c $1 | wc -c) @@ -301,21 +356,27 @@ done | xargs echo -en | dd of=$1 conv=notrunc bs=1 seek=5 2> /dev/null } + + + case "$1" in ---list-modules) list_modules $@ ;; ---list-kernels) list_kernels $@ ;; ---list-pkgs) list_pkgs $@ ;; ---get-form) get_form $2 $3 ;; ---get-note) get_note $2 $3 ;; ---pre-install) do_pre_install $2 $3 ;; ---post-install) do_post_install $2 $3 ;; ---depends) get_depends $@ ;; ---pkgs-extract) pkgs_extract $2 $3 ;; ---remove) rm -rf $2; exit ;; ---get-pkg) get_package $2 $3 ;; ---init) init ;; + --list-modules) list_modules $@ ;; + --list-kernels) list_kernels $@ ;; + --list-pkgs) list_pkgs $@ ;; + --get-form) get_form $2 $3 ;; + --get-note) get_note $2 $3 ;; + --pre-install) do_pre_install $2 $3 ;; + --post-install) do_post_install $2 $3 ;; + --depends) get_depends $@ ;; + --pkgs-extract) pkgs_extract $2 $3 ;; + --remove) rm -rf $2; exit ;; + --get-pkg) get_package $2 $3 ;; + --init) init ;; esac + + + if [ "x$1" == "x--mkrootfs" ]; then tmp=$2 cd $tmp/fs @@ -356,6 +417,8 @@ -boot-info-table $tmp/iso > /dev/null 2>&1 [ -x /usr/bin/isohybrid ] && /usr/bin/isohybrid $tmp/slitaz.iso 2> /dev/null + [ -x /usr/bin/iso2exe ] && + /usr/bin/iso2exe $tmp/slitaz.iso 2> /dev/null fi if [ "x$1" == "x--mkexe" ]; then tmp=$2 diff -r 577e6e91216d -r ac214416e736 index.php --- a/index.php Wed Oct 07 23:37:02 2015 +0200 +++ b/index.php Sun Nov 01 16:56:16 2015 +0100 @@ -1,54 +1,53 @@ - - + + + Tiny SliTaz - Builder - - - - - - - " /> - - - favicon.ico" /> - slitaz.css" /> - + + + + + + "> + + + + + + + - - + - - + onclick="this.src = QRCodePNG(location.href, this)"/> + diff -r 577e6e91216d -r ac214416e736 step1.php --- a/step1.php Wed Oct 07 23:37:02 2015 +0200 +++ b/step1.php Sun Nov 01 16:56:16 2015 +0100 @@ -59,17 +59,18 @@ if (!file_exists($_POST["tmp_dir"]."uploadconf")) { ?> -

-The file /etc/packages.conf in the initramfs holds all information -to rebuild your Tiny SliTaz system. You should upload your -/etc/packages.conf first if you want to upgrade your system only. -

+
+

[Step 1/5] Packages and Kernel

+ +

The file /etc/packages.conf in the initramfs holds all information +to rebuild your Tiny SliTaz system. You should upload your +/etc/packages.conf first if you want to upgrade your system only.

"> -Packages configuration: - - - + Packages configuration: + + +
-

-You can upload a tazpkg file (.tazpkg) or a tarball of tazpkg files (.tar). +


+ +

You can upload a tazpkg file (.tazpkg) or a tarball of tazpkg files (.tar). These packages will extend the official packages list and will be chosen when the package names are found to be matching. You can find some examples in the -Tiny SliTaz repository. -

+Tiny SliTaz repository.

+
-
"> -Additional packages: - - - -
+
"> + Additional packages: + + + +
-

+ +


-

- -

Linux kernel

- -

-You can upload a custom kernel or use an official one. -Your kernel should have an embedded initramfs with busybox like -this one. -

+

You can upload a custom Kernel or use an official one. Your +Kernel should have an embedded initramfs with busybox like this one.

-
"> -Custom kernel (bzImage file): - - - -
+
"> + Custom kernel (bzImage file): + + + +
+
+
-
" method="post" name="kernels"> - -

-

+ " method="post" name="kernels"> + -
- +
+ +
+
-
+ diff -r 577e6e91216d -r ac214416e736 step2.php --- a/step2.php Wed Oct 07 23:37:02 2015 +0200 +++ b/step2.php Sun Nov 01 16:56:16 2015 +0100 @@ -11,23 +11,21 @@ ?> - -

Additionnal modules

+
+

[Step 2/5] Additional modules

" method="post" name="packages"> - - -

-

-
- -
+
+ +
+
- -

Additional RAM filesystem

+
+

[Step 3/5] Additional RAM filesystem

" method="post" name="packages"> - -

-

-
- +
+ +
+ +
- - diff -r 577e6e91216d -r ac214416e736 step4.php --- a/step4.php Wed Oct 07 23:37:02 2015 +0200 +++ b/step4.php Sun Nov 01 16:56:16 2015 +0100 @@ -32,24 +32,25 @@ } ?> - -

configuration

+
+

[Step 4/5] configuration

" method="post"> - -" type="hidden" /> +
+ -

-

+
-
- -
+
+ +
+
- -

Get Tiny SliTaz files

+
+

[Step 5/5] Get Tiny SliTaz files

" method="post" name="config"> - -

Bootable images

-

-

- -  - - -  - + + + + -

Files for bootloaders

-

-

-)" type="submit" /> -  -)" type="submit" /> -
-

-

Configuration info

-

-

- -  -)" type="submit" /> -
-

+ + + + + -

Debug info

-

-

-)" type="submit" /> -  -)" type="submit" /> -
-

-

-

-)" type="submit" /> -  -)" type="submit" /> -
-

+ + +
Bootable images: + + + - -

+ + + + +
Files for bootloaders: + + )" type="submit" /> + )" title="For the initrd= parameter" type="submit" /> +
Configuration info: + + + )" type="submit" /> +
Debug info: + + )" type="submit" /> + )" type="submit" /> +
+ )" type="submit" /> + )" type="submit" /> +
+

Going further

-

-Tiny SliTaz should be smaller to have more functionality -and/or needs less RAM.
-The kernel can be tuned/patched -or you can use an earlier version. -

-

-You can test Tiny SliTaz without pre-historic hardware using qemu (need the ne module) : -

+ +

Tiny SliTaz should be smaller to have more functionality and/or needs less +RAM.
+The kernel can be tuned/patched or +you can use an earlier version.

+ +

You can test Tiny SliTaz without pre-historic hardware using qemu (need the +ne module):

+
 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -fda slitaz.img
 
-

-Or -

+ +

Or

+
 qemu -cpu 486 -m 4 -net nic,model=ne2k_isa -net tap -kernel kernel -initrd rootfs.gz /dev/null
 
-

-And the executable file /etc/qemu-ifup: -

+ +

And the executable file /etc/qemu-ifup:

+
 #!/bin/sh
 
-tunctl -u $(id -un) -t $1                           
+tunctl -u $(id -un) -t $1
 ifconfig $1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0