http://buildroot.uclibc.org/ - it's an embedded distro builder using makefiles like Linux and Busybox does.
New version of packages manager (tazpkg) testing needed
(128 posts) (12 voices)-
Posted 9 years ago #
-
2Trixar_za
Thank you for the link.
Reading simple “About” and later deep in the documentation, I can't understand why you choose this tool, Buildroot, to make Slitaz. Seems I read too quick and not found how to add your own programs to Buildroot.What related the SliTaz Makefiles — seems you can use them in the most cases without deeping into them. At least, when I develop TazPanel and TazPkg, I using common sequense:
make; make install; make clean
to apply changes from my text editor to the current system.Posted 9 years ago # -
Chapter 17 in the manual.
Why did I choose it? Because it's constantly being developed and it's packages is (mostly) up to date, gets auto-stripped, optimized for size, built against eglibc or uclibc and works. All I need to do is create a script that changes buildroot packages files into SliTaz build receipts and half our packages updating work will be done. Maybe a process that does the opposite would also work since Buildroot does not compile desktop environments or specialized packages since they're considered 'bloat' by the devs.
Posted 9 years ago # -
Interesting thing and nice large documentation with examples. I have not enough free time, so I've read it quickly again. Two thoughts.
One. Seems you can build something relative to the “gtkonly” SliTaz flavor without much of effort. And you should extend it using your “recipes”. Yes, you can use SliTaz receipts to integrate packages into Buildroot, however it is not simple. Other thing — SliTaz packages database is huge. You need to prioritize one subset of packages over the rest. I think LFS (Linux from Scratch) and BLFS (Beyond Linux from Scratch) projects will help you to make your choise in the sequence of adding the packages.
Two. Seems, Buildroot is intended to make rootfs only, where “all in one” preinstalled? Does it can to build “optional” packages that you will have to install and remove?
Posted 9 years ago # -
All it's packages are optional at the configuration stage (using menuconfig like kernel compiling). Newly added package build instructions will appear in the packages menu. Maybe we can make them packages that tazpkg can understand and remove - I know another developer has done something like that before with his own custom package manager.
You're right about it generating the equivalent of SliTaz gtkonly - only not as complete. This is where SliTaz's scripts and configuration files are nice since they can be used (with minor tweaking) to complete buildroot generated distros.
A year ago when I initially tried it, it was a little beyond me, but recent experimentation with making my own distros has given me enough experience to actually use Buildroot effectively.
Sorry about hijacking your thread though :P
Posted 9 years ago # -
I think you can generate the whole rootfs, then slice it out into separate packages. You can use SliTaz files.list.lzma to decide which file belongs to which package. Alas, SliTaz has a lot of similar packages with small difference, with similar files lists, like "openbox" and "openbox-imlib", and a number of various compilers, etc. And Busybox and Coreutils...
I wish you good luck!
Posted 9 years ago # -
Hi Aleksej,
Same configuration on sda7 and sda3 (tazpanel-461 and tazpkg-785)
- updating sda7 with tazpkg (more details in tazpkg.log)
tazpkg recharge
->4 new packages on the mirror
(including tazpanel-462 and tazpkg-786)tazpkg up
-> only one package to upgrade:mtpaint 3.44.91 New build.
???Do you wish to install them now? (y/N) y
->Package "mtpaint-3.44.91" already in the cache.
So, tazpkg re-install the same package; can a new build be different of the previous package? If yes, better to clean cache before atazpkg up
because if you don't pay attention to messages you'll never update packages with new build.- and yes, after a
tazpkg up + y
, the tazpkg.up file is cleared; so it's different of the working of tazpanel - had a look at mirror to see what version of tazpanel and tazpkg on it -> 2 of each; same problem than a few weeks. I didn't check if there were other packages duplicated.
- updating sda 3 with tazpanel
- Recharge list ->
4 new packages on the mirror
- Check upgrades -> only one package to upgrade:
mtpaint 3.44.91 New build.
- Toggle all & Install ->
Package "mtpaint-3.44.91" already in the cache.
- ... but mtpaint remains in the tazpkg.up file after updating
- Recharge list ->
Have a nice evening.
Posted 9 years ago # - updating sda7 with tazpkg (more details in tazpkg.log)
-
Hi Ceel,
Let me to be a tester too, while a have no free time yet to deep into bug fixing and development :)
Today I found a bug with our file editor. You can destroy your edited files using it!
How to reproduce?
1. Packages → Summary
2. Search for package you have no installed (it is safer), for example "djview"
3. Show info page for this package: http://tazpanel:82/pkgs.cgi?info=djview
4. Click "View receipt" link.Ok, now we in the file viewer / editor mentioned above.
Note, receipt's code is indented using tabulations, and it have line with code:
make &&
Click "Edit" button.
Note, all tabulations and ampersands here.
Next, let's edit file a bit: put some spaces at the beginning of some lines, as well as between few words. We can't enter tabulations here, so just let's leave them as-is. Click "Save" button. See the horror:
All spaces from beginning of lines are gone.
All repeated spaces between words are gone.
All tabs are gone.
All ampersands (&
) are gone!Seems it is default behavior with textarea form posting. We need to find some heavy magic to force it working properly. Interesting to see into some other web projects where textareas are submitted into server, how they solved the problem?
Posted 9 years ago # -
Debugging. It is interesting because we can use commands we already have: Busybox's nc (netcat).
Reproduce all described above, but:
Before pressing "Save" button — stop TazPanel:
# tazpanel stop
and start netcat for listening port 82:
# nc -l -p 82
Ok. Now press "Save" button and get next HTTP dump in the terminal:
POST /index.cgi?file=/tmp/tmp.rjfFxg7nDA/receipt HTTP/1.1 Host: tazpanel:82 Origin: http://tazpanel:82 User-Agent: TazWeb (X11; SliTaz GNU/Linux; U; en_US) Content-Type: application/x-www-form-urlencoded Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Referer: http://tazpanel:82/index.cgi?file=%2Ftmp%2Ftmp.rjfFxg7nDA%2Freceipt&action=edit Accept-Encoding: gzip, deflate Connection: Keep-Alive Cookie: my=my Content-Length: 1298 content=%23+++SliTaz+++package+++receipt.%0D%0A%0D%0A+++PACKAGE%3D%22djview%22%0 D%0AVERSION%3D%224.9%22%0D%0ACATEGORY%3D%22graphics%22%0D%0ASHORT_DESC%3D%22Djvu +files+viewer.%22%0D%0AMAINTAINER%3D%22psychomaniak%40xakep.ru%22%0D%0ALICENSE%3 D%22GPL2%22%0D%0AWEB_SITE%3D%22http%3A%2F%2Fdjvu.sourceforge.net%2F%22%0D%0ATARB ALL%3D%22%24PACKAGE-%24VERSION.tar.gz%22%0D%0AWGET_URL%3D%22%24SF_MIRROR%2Fdjvu% 2F%24TARBALL%22%0D%0A%0D%0ADEPENDS%3D%22libQtGui+libQtNetwork+djvulibre%22%0D%0A BUILD_DEPENDS%3D%22qmake+Qt4-dev+djvulibre-dev%22%0D%0A%0D%0A%23+Rules+to+config ure+and+make+the+package.%0D%0Acompile_rules%28%29%0D%0A%7B%0D%0A%09.%2Fconfigur e%0D%0A%09sed+-i+%27s%2F-O2%2F-Os%2Fg%27+%24src%2Fsrc%2FMakefile%0D%0A%09make+%2 6%26%0D%0A%09make+install%0D%0A%7D%0D%0A%0D%0A%23+Rules+to+gen+a+SliTaz+package+ suitable+for+Tazpkg.%0D%0Agenpkg_rules%28%29%0D%0A%7B%0D%0A%09cp+-a+%24install%2 F*+%24fs%0D%0A%09mkdir+-p+%24fs%2Fusr%2Fshare%2Fapplications+%24fs%2Fusr%2Fshare %2Ficons%2Fhicolor%2F32x32%2Fapps%0D%0A%09cd+%24fs%2Fusr%2Fshare%2Fdjvu%2Fdjview 4%2Fdesktop%0D%0A%09mv+djvulibre-djview4.desktop+%24fs%2Fusr%2Fshare%2Fapplicati ons%0D%0A%09mv+hi32-djview4.png+%24fs%2Fusr%2Fshare%2Ficons%2Fhicolor%2F32x32%2F apps%2Fdjvulibre-djview4.png%0D%0A%09rm+-rf+*.png+*.svgz%0D%0A%09rm+-rf+%24fs%2F usr%2Flib%0D%0A%7D
TazWeb's window is waiting for answer from netcat. Press "Enter" key in the terminal three times and we got "Message Corrupt" in the TazWeb. Waiting ends. Let's analize listing. Here we see a lot of interesting things.
Spaces are substituted by "+". Three spaces is "+++". New line is pair of CR LF "%0D%0A". Tab is "%09".
And "[tab] make &&" is:
%09make+%26%26%0D%0A
Conclusion: browser (TazWeb) sends form correctly to the server (TazPanel CGI script).
Bug is somewhere in the our scripts. Possibly in the/usr/lib/slitaz/httphelper
.PS. How to restore (stop netcat and start TazPanel):
Ctrl + C # tazpanel start
PPS.
Fixing preserve spaces and tabulations via adding extra quotes in the line 56 of httphelper:
[ -n "$(eval echo \$${1}__NAMES)" ] && eval echo \$${1}_${2}_${3:-1} → [ -n "$(eval echo \$${1}__NAMES)" ] && eval "echo \"\$${1}_${2}_${3:-1}\""
But ampersands (still) substitutes to spaces. Fighting lasts :)
Posted 9 years ago # -
Maybe we need to just pipe the produced text through a utility like html2text to clean it?
Posted 9 years ago # -
Hi,
No. Here OK with html entities. Here another conceptual error. Imagine simple form with two hidden inputs (we can count them as two variables):
<form action="post"> <input type="hidden" name="a" value="1"/> <input type="hidden" name="b" value="2"/> <button type="submit">Send form</button> </form>
What we got on the server side when form is submitted?
a=1&b=2
Let's change '&' into space and evaluate this:
a=1 b=2
And we'll got two variables.
Here, seems problem with early decoding of HTTP decoded POST flow.
<form action="post"> <input type="hidden" name="a" value="1"/> <input type="hidden" name="b" value="2"/> <input type="hidden" name="we" value="You & me"/> <button type="submit">Send form</button> </form> a=1&b=2&we=You+%26+me Then early decode POST flow: a=1&b=2&we=You & me Then change '&' into ' ': a=1 b=2 we=You me Then evaluate and get: a="1" b="2" we="You me"
But we should first split POST flow using '&' as delimiter into pieces:
a=1&b=2&we=You+%26+me → a=1 b=2 we=You+%26+me
And then to process (decode) separated variables.
I continue to dig httphelper.
____________
PS. Fixed:
http://hg.slitaz.org/slitaz-base-files/rev/efac6599349a
http://hg.slitaz.org/wok/rev/6912134a3c3c
http://cook.slitaz.org/cooker.cgi?pkg=slitaz-base-filesPosted 9 years ago # -
Hi Aleksej,
You build new version faster than I can test.
TazPkg-795 does not install packages with command
tazpkg up -r -i
:root@slitaz:/home/tux# tazpkg up -r -i Repository "Main" is up to date. Package Version Status ================================================================================ busybox 1.23.2 New build locale-de 4.2 New build locale-es 4.2 New build locale-fr 4.2 New build locale-it 4.2 New build locale-pt_BR 4.2 New build lxinput 0.3.4 New build slitaz-base-files 267 New version 270 tazpanel 464 New version 472 xorg-base-fonts 1.2 New build ================================================================================ 265 installed packages scanned in 2s You have 10 available upgrades (0 blocked) Leaving without any upgrades installed. root@slitaz:/home/tux#
Posted 9 years ago # -
Hi Ceel,
Thank you for bug report. Please take a look into tazpkg-796 (on the cook.slitaz.org now and on the mirror soon).
There I tried to fix latest bug with
tazpkg up -i
and, finally, — bug with partial upgrade using TazPanel.Have a nice day.
Posted 9 years ago # -
Hi Aleksej,
The packages.list loaded with
tazpkg recharge
(tazpkg-788, frugal install slitaz-rolling-core64.iso) is wrong: TazPkg search for tazpanel-464 and tazpkg-795, versions on mirror1 are tazpanel-476 and tazpkg-796# tazpkg up Package Version Status ================================================================================ busybox 1.23.2 New build locale-de 4.2 New build locale-es 4.2 New build locale-fr 4.2 New build locale-it 4.2 New build locale-pt_BR 4.2 New build lxinput 0.3.4 New build slitaz-base-files 267 New version 270 slitaz-configs 5.5.7 New version 253 slitaz-configs-base 5.5.7 New version 253 tazpanel 464 New version 474 tazpkg 788 New version 795 xorg-base-fonts 1.2 New build ================================================================================ 265 installed packages scanned in 1s You have 13 available upgrades (0 blocked) Do you wish to install them now? (y/N) y .../... Connecting to mirror.slitaz.org (188.165.229.172:80) wget: server returned error: HTTP/1.1 404 Not Found Connecting to mirror.slitaz.org (37.187.4.13:80) Connecting to mirror1.slitaz.org (188.165.229.172:80) wget: server returned error: HTTP/1.1 404 Not Found /usr/bin/tazpkg: line 2951: can't open /var/cache/tazpkg/cooking/packages/tazpanel-474.tazpkg: no such file /usr/bin/tazpkg: .: line 2951: can't open '/tmp/28989/receipt' Connecting to mirror.slitaz.org (212.83.135.187:80) Connecting to mirror1.slitaz.org (188.165.229.172:80) wget: server returned error: HTTP/1.1 404 Not Found Connecting to mirror.slitaz.org (188.165.229.172:80) wget: server returned error: HTTP/1.1 404 Not Found /usr/bin/tazpkg: line 2951: can't open /var/cache/tazpkg/cooking/packages/tazpkg-795.tazpkg: no such file /usr/bin/tazpkg: .: line 2951: can't open '/tmp/28805/receipt' .../...
Posted 9 years ago # -
TazPkg 796
Installing Bluefish and its dependence Aspell then removing Aspell and Bluefish depending on Aspell -> tazpkg.log is not updated when removing Bluefish:
oot@slitaz:/home/tux# tazpkg -r aspell The following packages depend on package "aspell": bluefish Remove package "aspell" (0.60.6)? (y/N) y Removing package "aspell" ================================================================================ Removing all files installed... [ Done ] Removing package receipt... [ Done ] ================================================================================ Package "aspell" (0.60.6) removed. Remove packages depending on package "aspell"? (y/N) y tazpkg remove bluefish root@slitaz:/home/tux#
In tazpkg.log:
... 2015-05-02 17:19:33 - Installed - aspell (0.60.6) - 3db204ca148f355bb6ddfa78f8456e1f 2015-05-02 17:19:33 - Installed - bluefish (2.2.5) - 98ad37003ca4750f0459d236c4bc18c6 2015-05-02 17:21:16 - Removed - aspell (0.60.6) 2015-05-02 17:21:58 - Installed - libgsf (1.14.21) - 8ad320d44eb41a1bf4751f66b8aa8ee1 ...
EDIT it seems that Bluefish has not been removed:
root@slitaz:/home/tux# tazpkg -gi bluefish "bluefish-2.2.5" package is already installed. You can use the --forced option to force installation. root@slitaz:/home/tux# tazpkg -r bluefish Remove package "bluefish" (2.2.5)? (y/N) y Removing package "bluefish" ================================================================================ Removing all files installed... [ Done ] Removing package receipt... [ Done ] ================================================================================ Package "bluefish" (2.2.5) removed.
Unfortunately, I have to leave for 5 days; I cannot contue tests
Have a nice week end.
Posted 9 years ago #
Reply »
You must log in to post.