You are not logged in.
Hi,
since I don't have that much spare time, I haven't progressed much with making my tazpackages. To be honest, I also don't use slitaz on my main computer, which means I put in less time than what I could of, since it requires me to start up my laptop and work on the tazpackages from there. Untill now, I've just been compiling the packages under windows, on my main pc, by manually making the receipt and the description.txt (using notepad++), and making the "fs" folder with the extra files in that. I haven't made the files.list as I don't know how that needs to be done.
My question is now: can I continue on making the tazpackage with this last part as well (as this last part is generally done by using the wok (http://doc.slitaz.org/en:oldcookbook:wok ), or using tazpkg (see hg.slitaz.org/tazpkg/raw-file/tip/doc/tazpkg.en.html , though I don't exactly know how that works neither, ie what files need to be made all ready, and which ones tazpkg makes itself, and whether I need to pre-compress the "fs" folder or not). The wok again requires slitaz to run, and even requires to install mercurial, clone the wok itself, ... (see http://doc.slitaz.org/en:oldcookbook:wok ) Requiring to use slitaz for some things will still work for me, as long as most work can be done under windows.
I was thinking along the lines of:
* zipping the fs folder (containing the files) as cpio, and then as lzma (for example with 7-zip or something)
* then bring up properties of the file and add the specifics (file size) in the description file
* making the md5sum using winmd5 (http://www.winmd5.com/) which works for win xp appearantly, older windows versions have built-in tools (like FCIV, certutil and can also use hashtab, hashcheck, ... see https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7 , https://support.microsoft.com/en-us/kb/889768)
The problems I encountered and haven't been able to solve are:
* there are no good cpio compression tools under windows (wintar exists but I can't make much sense of that, and it's shareware). LZMA zipping isn't an issue with most tools though.
* as said above, I don't know how to make the .list file; how do I do this, and/or can I just drop this alltogether (so is it essential for tazpkg or not ?)
* finally, I don't know how to zip the entire package as .tazpkg; I assume it's just a matter of compressing to a different archive format (like .tar.gz ?), and then manually renaming the file to .tazpkg
Any help is appreciated.
BTW: is cpio-zipping a requirement btw, for tazpkg to be able to read the file, or could I either just drop cpio-zipping alltogether, or zip as tar, and then as lzma ? Also, if it is a requirement, would future versions of tazpkg (such as http://forum.slitaz.org/topic/tazpkg-beta-needs-testing/page/6 ) allow use of .tar.lzma instead ? It seems to me that cpio is all ready showing its age, so it might be useful to replace it (see https://superuser.com/questions/343915/tar-vs-cpio-what-is-the-difference )
Offline
Hi,
To know how a tazpkg file is built, I advise you read the relevant tazpkg scripts (modules/extract for example). See http://hg.slitaz.org/tazpkg/file/3af642cd5e69/modules
The package building is normally made by "cook" from the receipt file (and files under stuff/ if necessary). As I understand it you don't need to compile anything, so mere packing with tazpkg could work.
To have Unix tools under Windows I strongly advise installing MinGW. Since most SliTaz tools are shell scripts, you can probably use them readily under MinGW. Or this http://frippery.org/busybox/ ? (I just googled for "busybox windows".)
But why don't you run SliTaz in a virtual machine? (I never used virtual machines, maybe it is resource-intensive and your machine isn't powerful enough?)
Offline
I read the pack script, which was helpful, appearantly to make the .list file, commands are:
cd fs
find . -type f -print > ../files.list
find . -type l -print >> ../files.list
cd ..; sed -i s/'^.'/''/ files.list
I guess I'll try just finishing the packages it on my slitaz laptop when I have time.
Using slitaz tools with MinGW on windows seems like a fair amount of hassle, and just doing it on my laptop will then be faster nonetheless. Same goes for the virtual machine, I've thought about this in the past, but it's a fair amount of work, for ultimately just making some packages.
Before I try things out, can you verify whether the absolute path I used for the fs folder is correct:
I used /var/lib/tazpkg/gajim-OTR/fs/ , where we assume that gajim-OTR is the name of the package that was downloaded from the slitaz mirror and is being installed
I never understood that ~/fs/ path that's used in most packages, and even if the system finds the fs folder somehow, I can only assume that it might get into trouble if several packages are installed as they all have /fs/ folders (especially as I tend to just put all files straight in the fs folder, so without using subfolders which can indicate the system whether or not it's a particular /fs/ folder.
Thinking of this: what actually is the difference between following commands:
cd home
cd /home
cd ~/home
cd ~home
Offline
You can use whatever absolute path you want for fs/. The files that your package will install must be _under_ fs/ with appropriate path. E.g. if you ship /usr/share/foo/README, you put it in /any/where/fs/usr/share/foo/README. tazpkg will take care of this (see the "install" module).
Regarding your question about "cd". "cd home" goes into a "home" subfolder of the current folder. "cd /home" goes into the "home" folder located at the system root. "cd ~/home" goes into a "home" subfolder of your home folder. "cd ~home" would go into the home folder of a user "home". This is _very_ _basic_ Unix knowledge. I warmly advise you grab a beginner's book on Unix.
Offline
the path needed to be /var/lib/tazpkg/5.0/packages/gajim-OTR/fs/ I believe.
The idea was to use the standard path so that, when downloaded from the mirror to the standard location (as is the case with for example tazpanel) it automatically grabs the content from that standard location.
However since most packages grab the content from the fs folder from a different location (~/fs/ or hence /home/tux/fs/ ) I'm not sure whether the path mentioned above will work. Will it work (so are there 2 fs folders, for example a zipped fs folder in /var/lib/tazpkg/5.0/packages/ and one unzipped to /home/tux/fs/ and is it required that it's unzipped or not ? If so, I'll change everything, if not I'll leave it as is.
Offline
Hi linuxscripts,
Consider to use SliTaz to develop SliTaz packages. It is way simpler than to reinventing your own wheel using Windows.
You can use TazPkg commands "extract" and "pack". Consider to read included TazPkg documentation file to know more about these commands. In few words: these commands needs to be running under root permissions.
1. Download your tazpkg package anywhere you want: to /tmp or /home/tux or /home/tux/Desktop or anywhere you have access to write.
2. Open terminal HERE, become root.
3. Issue command including three words: "tazpkg extract" and the name of your downloaded package you want to extract. For example:
[c]tazpkg extract linuxscripts-1.2.3.tazpkg[/c]
4. Inspect current folder. Now you'll find here new folder with extracted package content.
5. You can change some files and then pack new package from extracted package content. Just remove original package from here before new package packing.
6. To pack new package open root terminal from here where you just extracted package. Issue command contained three words: "tazpkg pack" and folder name that contained extracted package's content. For example:
[c]tazpkg pack linuxscripts-1.2.3[/c]
7. Inspect current folder. Now you'll find here your new packed package. For example, "linuxscripts-1.2.3.tazpkg".
Read the docs. If you'll not find answers in the docs, then ask forum.
Good luck.
Offline
made a bit of progress, just using slitaz/notebook.
I'm testing things out first with the simplest package I have (gajim-OTR)
I tried "tazpkg pack gajim-OTR" and that worked, it made the missing files (md5 and filelist), and also made the entire tazpackage at /home/tux.
I tried installing the package:
at first, (when I didn't yet made a /gajim-OTR/ folder under /fs/, it gave the error: can't cd to gajim-OTR, receipt is missing .Once I did make the folder, it said "unable to find file "/home/tux/gajim-OTR" Then, I changed the path from the absolute /home/tux/fs/ path to ~/fs/; that was better and showed a regular install; however upon inspection, I saw that what the package needed to do (make a plugins folder in /usr/share/gajim and then copy over the files from the package), the tasks were not done (nothing was done actually). Here's the full receipt:
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
cd /usr/share/gajim/
mkdir -p plugins
cd ~/fs/
cp * /usr/share/gajim/plugins
}
pre_remove()
{
cd /usr/share/gajim/
rm -rf plugins
}
I posted the (not working) tazpackage at https://drive.google.com/drive/folders/0B0Orq8VMiN7QMndGZndMTTl5a0E
Besides the package, can you also tell me the correct cpio command to compress a file, and uncompress a file ? I tried "cpio -o -H newc –quiet” but that just resulted in the cursor waiting for new input, and when I then typed in fs, it gave a range of numbers and letters. I assume it requires an output path, but I'm unsure how to give this. I also tried ls in the folder, followed by ls | cpio -ov > tmp/filename.cpio (see http://www.thegeekstuff.com/2010/08/cpio-utility/ ) but that didn't work neither. The cpio-commands may be useful to alter the package a bit after the tazpkg pack command.
Offline
Hi,
Tazpkg doesn't use genpkg_rules() to pack a folder. This function is used by cook to build a package.
You have to put your files under the fs/ folder with the relevant path, e.g. fs/usr/share/gajim/plugins/my_file, and tazpkg will take care of the copying and removing stuff.
About cpio: RTFM, or read tazpkg modules (pack, install...) to find the syntax...
You may want to read the Cookbook.
Offline
To linuxscripts
The bare basics. I hope it will be very useful for you.
What is current folder? What is mean "open terminal here"?
You can use PCManFM to navigate folders in a graphical application, just like you can do it in the Windows Explorer. You can see the current folder path in the PCManFM address bar.
SliTaz is pre-configured this way that you can press F4 in the PCManFM to open terminal in the current folder. For example, if you navigate folder /home/tux/Documents inside PCManFM and pressed F4 terminal window will appeared and you will see there that you are in the path /home/tux/Documents.
Inside the terminal you can see current path in the prompt. Also you can execute command [c]pwd[/c] and it will print you current path. To change current path you can use command [c]cd[/c], it recognizes absolute and relative paths. Path that started from "/" is absolute, while other paths are relative (to the current path).
Execute command:
[c]cd /home[/c]
And your current path is changed to /home. Here you use absolute path for cd command.
Execute command:
[c]cd tux/Documents[/c]
And your current path is changed to /home/tux/Documents. Here you use relative path for CD command.
--------
Next part of our lesson is a bit information about your permissions.
You are able to make new folders and files within your home folder and inside temporary folder /tmp. You can also remove any files and folders inside your home folder, and remove ONLY files and folders that you previously created inside /tmp. You can't create any folders and files beyond your home folder. This means that you, for example, are unable to download package file into /usr/bin. You also unable to change any settings file inside /etc. And you unable to remove any files and folders you see in the /tmp from scratch.
So, you can download tazpkg package to any folder inside your home folder, or into /tmp.
If you become administrator of your machine (in the Linux it called "root"), you'll be able to create and remove (almost) everything. You can use command [c]su[/c] in the terminal. And you can right click on the free space inside folder in the PCManFM and select "Open as root". In both cases you will be asked for administrator password. SliTaz is pre-configured this way that user "root" has password "root" (without quotes, of course).
--------
Next part is about tazpkg commands "extract" and "pack".
How it looks like?
You see tazpkg package inside some folder. You execute command "extract". Now you see new created folder near that package. This folder named as the extracted package name, only without ".tazpkg" at the end. And this folder contains extracted content of the package.
How command "pack" work looks like?
You see folder. Not any folder. Only folder with special files and folders inside it. And name of this folder is not any random name, but should be package name and version separated with the dash. I not just so asked you to extract any package. When you extracted, for example, package "nano" — you will see it's extracted content. And if you see it's content then you'll get which folders and files you need to pack your own package.
So, returning to our command "pack". This command is opposite to command "extract". In this case new package will appeared near the folder in the current path.
--------
More about "extract" and "pack" commands.
You should execute commands inside the folder containing your package you wanted to extract; or containing folder you wanted to pack. You can't specify absolute or relative path to package or to folder. You should run command from folder contained your package or file, and specify the name of package or file as argument for command.
Example:
[c]su
mkdir -p /tmp/test
cd /tmp/test
tazpkg get nano
ls -l
tazpkg extract nano-1.2.3.tazpkg
rm ./nano-1.2.3.tazpkg
tazpkg pack nano-1.2.3
ls -l
rm -r /tmp/test[/c]
PS. Excuse me if I missed something — I wrote using my smartphone.
Offline
Aleksej, I'm sorry I have never replied to your last post in the other thread (which is now closed). This happened because, well ... I got busy elsewhere and completely forgot about it
But just in short to keep you informed:
- you were of course right that 'tazpkg pack' does NOT change the source path to 'root:root'. I have no idea what went wrong that evening. The most likely explanation is that I must have copied the whole damn path as root before running tazpkg.
- the other problem (which is not really a problem) still persists because 'tazpkg pack' does change the directory dates in the source path (which it shouldn't). But I found a way to calculate an over-all checksum of the source tree which isn't affected by the changed dates ...
[c]CSUM=$(find $SDIR/$PNAM/fs -type f -exec basename {} \; | md5sum | cut -d " " -f 1)[/c]
Offline
@llev;
thanks for that note, I made the required folders and moved the files therein, and then updated the receipts. I'll try it out next.
I do have one extra question now:
with some of my packages, I made commands to do certain things before having files/folder moved/overwritten. Since I assume the overwriting/moving of files is now done by tazpkg (and no longer waiting for my command to do this), this causes some issues here and there. Is there any way to have the moving of the files/overwriting done later (after executing the commands specified in genpkg_rules() { } ?
An example:
These were previously the commands for my get-palemoon-secimp package:
genpkg_rules()
{
cd ~/usr/bin
./get-palemoon
./get-flash-plugin
cd /var/lib/tazpkg/5.0/packages/get-palemoon-secimp/fs/
cp Updated_about_config_settings.cfg /opt/palemoon
cp autoconfig.js /opt/palemoon/defaults/pref/
cd ~/opt/palemoon/browser/searchplugins/
rm *
cd /var/lib/tazpkg/5.0/packages/get-palemoon-secimp/fs/
cp duckduckgo__ssl_-20101029.xml /opt/palemoon/browser/searchplugins/
cp google_ssl-20111022.xml /opt/palemoon/browser/searchplugins/
cp ixquick__ssl_-20101029.xml /opt/palemoon/browser/searchplugins/
cd /var/lib/tazpkg/5.0/packages/get-palemoon-secimp/fs/
cp calomel_ssl_validation-0.75-fx.xpi /tmp/palemoon_extensions/
cp uBlock-0.9.1.0-an+fx.xpi /tmp/palemoon_extensions/
cp disconnect-3.15.3-fx.xpi /tmp/palemoon_extensions/
cp https-everywhere-5.0.4.xpi /tmp/palemoon_extensions/
cp noscript-2.6.9.22.xpi /tmp/palemoon_extensions/
cp user_agent_overrider-0.2.5-fx.xpi /tmp/palemoon_extensions/
cd /var/lib/tazpkg/5.0/packages/get-palemoon-secimp/fs/
cp Postinstallation_palemoon.html /home/tux/up_and_downloads/
}
Commands such as for example:
cd /var/lib/tazpkg/5.0/packages/get-palemoon-secimp/fs/
cp Updated_about_config_settings.cfg /opt/palemoon
cp autoconfig.js /opt/palemoon/defaults/pref/
were removed by me as these have no function any more, however other commands such as
cd ~/usr/bin
./get-palemoon
./get-flash-plugin
still have a function and would need to be executed first, before the files are copied/overwritten by tazpkg
At the xscreensaver package, I had following commands:
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
cd /usr/lib/X11/app-defaults/XScreenSaver/
mv .xscreensaver old.xscreensaver
cd /var/lib/tazpkg/5.0/packages/xscreensaver-slideshow_style/fs/
cp .xscreensaver /usr/lib/X11/app-defaults/XScreenSaver/
and at pre_remove()
{
cd /usr/lib/X11/app-defaults/XScreenSaver/
rm .screensaver
mv old.xscreensaver .xscreensaver
}
I did this to be able to have the package save the original xscreensaver file and be able to reset the original file if the user wanted to unistall the package. I'm not sure though how I'd need to do this with how it's done now. I suppose I could just drop it alltogether, but if there's a method to still allow saving the original files, I might want to include it.
I put the updated packages (files/folders and finished .tazpkg files) at https://drive.google.com/drive/folders/0B0Orq8VMiN7QMndGZndMTTl5a0E
@Aleksej,
thanks for the text you wrote. I was all ready aware of the basics, since I read some guides in the past, like https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/3/html/Step_by_Step_Guide/
It's just some of the special things, and things specific to slitaz, or more advanced techniques that I don't know how to do.
PS: regarding the superuser command you mentioned: I plan to change the standard root user/password with the grub-persistencebootupforHDD/livedistro package; I all ready found the commands for that, just the rest of the package to change the splash screen I still need to find/finish.
Offline
After checking I found that:
* gajim-OTR copies the files correctly now, however I'm unsure whether the commands I added are also executed.
* the pcmanfm-noGVFS package says the installation failed.
* firejail-taz_style gave a syntax error
* I haven't checked xscreensaver
Can you check the packages and tell me what I did wrong ?
Also let me know on how I need to solve the installation/commands timing issue mentioned in my previous post; if not solved, I won't be able to finish the get-palemoon-secimp package
as a last thing: how do I upload the packages to the slitaz package server ?
I've been thinking it might be something like:
hg clone http://hg.slitaz.org/wok/ /home/slitaz/wok
then putting the package in /home/slitaz/wok, and then entering:
hg commit -m "Your commit message"
hg push
Not sure whether that's accurate though
Offline
2 linuxscripts
I even don't know what to reply %-)
I was all ready aware of the basics, since I read some guides in the past
You wrote:
however other commands such as
cd ~/usr/bin
./get-palemoon
./get-flash-plugin
still have a function
I'm sure, you know what your command "cd ~/usr/bin" means :-D
Your home folder contains subfolder "usr", and this, in turn, contains "bin". But it's weird, isn't it?
Your topic called "Making packages without using the wok", but you wrote the "genpkg_rules()" function, that used by cooker which used the wok. Weird, isn't it? You don't need this function if you only pack your own package using tazpkg command "pack". Function "genpkg_rules()" will never be called since you not using the "official way" of making the SliTaz packages, and you free, truly, to put here what you want... But you have been warned ;-)
cd /usr/lib/X11/app-defaults/XScreenSaver/
Weird, according to [1, 2] this path is... file, not a folder. You can't cd (change directory) to the file; you can change directory only to directory.
[1] http://pkgs.slitaz.org/?file=/usr/lib/X11/app-defaults/XScreenSaver
[2] http://cook.slitaz.org/cooker.cgi?files=xscreensaver
Commands such as for example:
cd /var/lib/tazpkg/5.0/packages/get-palemoon-secimp/fs/
. . .
were removed by me
This is good. Really
Because path "/var/lib/tazpkg" is a property of the tazpkg, and you can break it if you'll put there random folders and files. Let the tazpkg only control it's files and folders.
I'm saddened because it seems you still not extracted the "nano" package, and not looking into extracted folder :-(
Let me do it for you ;-)
I become root (administrator):
[c]su[/c]
I make the folder /tmp/test:
[c]mkdir /tmp/test[/c]
I go to this folder:
[c]cd /tmp/test[/c]
I download "nano" package here:
[c]tazpkg get nano[/c]
I see now that "nano" package is "nano-2.4.3.tazpkg".
Extract the package:
[c]tazpkg extract nano-2.4.3.tazpkg[/c]
Go to the folder with the extracted content:
[c]cd nano-2.4.3[/c]
What I see here?
[c]ls
description.txt
files.list
fs
md5sum
receipt[/c]
Go to the folder "fs":
[c]cd fs[/c]
What I see here?
[c]ls
etc
usr[/c]
Inside the folder "fs" I have two folders: "etc" and "usr".
We can follow the path, and found that inside "usr" we have "bin" and "share"; inside "bin" we have "nano".
It easy to understand that content of the folder "fs" is a file system chunk, and it will be extracted to the root of the file system: "usr/bin/nano" from the "fs" folder will be extracted as "/usr/bin/nano".
Now I can customize package and pack it again.
For example I can remove the folder unwanted for me:
[c]rm -r /tmp/test/nano-2.4.3/fs/etc
rm -r /tmp/test/nano-2.4.3/fs/usr/share[/c]
I want to change receipt editing the file "/tmp/test/nano-2.4.3/receipt" in my favorite text editor.
I don't need functions "compile_rules()" and "genpkg_rules()". And I want to change the description :-)
Now I want to pack all the stuff I change:
First, I'll go to the folder that contains unpacked folder:
[c]cd /tmp/test[/c]
This folder contains our folder "nano-2.4.3" and package "nano-2.4.3.tazpkg". Let's remove this package, because I want my own package with the same name to be here a bit later!
[c]rm nano-2.4.3.tazpkg[/c]
Now all ready to make a package. Here, in the current folder we have only folder "nano-2.4.3". Let it pack:
[c]tazpkg pack nano-2.4.3[/c]
What I have now here?
[c]ls
nano-2.4.3
nano-2.4.3.tazpkg[/c]
I have folder (that I can remove now), and I have new package. Packed by myself. Without using the wok.
Offline
2 linuxscripts
At the xscreensaver package, I had following commands:
# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
cd /usr/lib/X11/app-defaults/XScreenSaver/
mv .xscreensaver old.xscreensaver
cd /var/lib/tazpkg/5.0/packages/xscreensaver-slideshow_style/fs/
cp .xscreensaver /usr/lib/X11/app-defaults/XScreenSaver/
and at pre_remove()
{
cd /usr/lib/X11/app-defaults/XScreenSaver/
rm .screensaver
mv old.xscreensaver .xscreensaver
}
I did this to be able to have the package save the original xscreensaver file and be able to reset the original file if the user wanted to unistall the package. I'm not sure though how I'd need to do this with how it's done now. I suppose I could just drop it alltogether, but if there's a method to still allow saving the original files, I might want to include it.
You can use this method. But it is uncommon to the SliTaz packages.
Let assume you installed the package "package-a-1.2.3.tazpkg" with the file "/usr/bin/something".
Then you installed the package "package-b-7.8.9.tazpkg" with the same file "/usr/bin/something".
The new file replaces themselves the old file. TazPkg is the package manager, and it knows all about installed packages. It knows that file "/usr/bin/something" previously owned by "package-a-1.2.3" was replaced by new file owned by package "package-b-7.8.9".
When you uninstall "package-b-7.8.9", tazpkg asked you, do you want to restore all the changed files? And if you want, it will just downloaded and re-installed "package-a.1.2.3" to restore original files. So tazpkg works.
Offline
2 linuxscripts
Just read your message you wrote in parallel with me:
as a last thing: how do I upload the packages to the slitaz package server ?
Anyone has read-access to the SliTaz repositories.
Only SliTaz developers has write-access to.
Please, put your packages to the one of the File Sharing services, and put here links, so I can download, and extract your packages.
Offline
Hi Darjeeling,
CSUM=$(find $SDIR/$PNAM/fs -type f -exec basename {} \; | md5sum | cut -d " " -f 1)
No, sorry, your oneliner shall not function as you want it.
First part
[c]find $SDIR/$PNAM/fs -type f -exec basename {} \;[/c]
will print file names only. Without paths. Without date/time. Without their checksums.
What about links? Seems you don't want to list folders, but also you forget about links (also called symlinks, hardlinks).
What about order of printed files? If my memory serves me well, output by default based on the file change date.
Did you tried solution I posted for you (to change small "a" into big "A") here: http://forum.slitaz.org/topic/tazpkg-beta-needs-testing/page/6#post-41008 ?
--------
I confirm that "tazpkg pack" changed the time stamp of the folders. It not harms commonly, but it is a bit weird. I'll look what can cause this behavior.
Offline
@ linuxscripts
In addition to what Aleksej wrote:
- wok does not store packages, look by yourself: http://hg.slitaz.org/wok/file/c7a23f0fad68 (where did you find that Hg is a package server?)
- if you make your own packages, get-* commands and the like have no reason to be in your receipt
- tazpkg has a mechanism to manage config files (read the doc), but anyway you'd rather use post_remove
Offline
Hi Aleksej,
You have convinced me! I'm going to use your 'formula' because it's more universal than what I have come up with last week, which works too, but only produces an md5 of all the files in the tree. Of course, my first solution was even more universal but didn't work because of the changing directory dates.
But if you knew ... except for the local mirror (which I never touch) I'm only maintaining 4 lousy packages (lxpanel, opera, redglass, spacefm) and until not too long ago there never was any integrity check for them. Some weeks ago I put in a simple file count/comparison, to make sure. And then it all got a bit out of hand just before Christmas when I wanted to have something more fancy than this and began tinkering with an over-all checksum using ls, tar, find ... But that's over now as your solution works well and is even shorter than mine.
P.S.
Regarding symlinks ... there aren't any in my packages as I prefer to create them post_install() out of the recipe, which I think is safer. For each of the 4 packages I have a script that does everything: download (lxpanel, spacefm), compile & make (spacefm), create/modify the package tree (lxpanel, spacefm) create the recipe and run tazpkg (all 4 of them) and copy the package to my makeCD directory. It works well but I've spend a lot of time on this (and learned a lot).
Offline
Regarding symlinks ... there aren't any in my packages as I prefer to create them post_install() out of the recipe, which I think is safer.
I don't see how it can be safer, but I see how it can be bad
: if another package X has a file or link at the same place, your package will not be recorded by tazpkg as a modifier of X, and if you remove your package, X should be reinstalled but won't be.
Aleksej worked very hard on such subtle cases, now tazpkg takes care of them!
Offline
I'm sure, you know what your command "cd ~/usr/bin" means :-D
Your home folder contains subfolder "usr", and this, in turn, contains "bin". But it's weird, isn't it?
Sorry for that; it needed to be cd /usr/bin, not cd ~/usr/bin. I copied over a command I wrote a while back, before llev mentioned what the ~ does
cd /usr/lib/X11/app-defaults/XScreenSaver/
Weird, according to [1, 2] this path is... file, not a folder. You can't cd (change directory) to the file; you can change directory only to directory.
Made a mistake there as well; I thought xscreensaver (file) was in XScreenSaver folder, but that was incorrect (was directly in app-defaults) ; so deleted the extra folder and remade the package.
Function "genpkg_rules()" will never be called since you not using the "official way" of making the SliTaz packages, and you free, truly, to put here what you want... But you have been warned ;-)
If genpkg_rules(), as well as post_remove I assume ? are never called when packed using tazpkg, there's no point in me adding them at all. Can you tell me how I do need to include commands (under the tazpkg-package method) so they are executed ? Also, what's the "official way" of packing using tazwok; ie what commands are needed for this, and/or is there a manual (I always read the man pages, and also read http://doc.slitaz.org/en:cookbook:wok, but that didn't help me (only the making of a "personal wok" is briefly explained, not the way to build packages suitable for upload to the slitaz server))?
Please, put your packages to the one of the File Sharing services, and put here links, so I can download, and extract your packages.
As mentioned, I've been putting my packages at https://drive.google.com/drive/folders/0B0Orq8VMiN7QMndGZndMTTl5a0E
It should be downloadable using firefox/pale moon (not sure about xombrero/tazweb).
I'll mail them to you as well.
Perhaps you can improve the description file of at least 1 of the packages (ie gajim-OTR) so I know how to make the commands executable, and can finish the rest of the first batch of packages ?
Offline
@llev
wok does not store packages, look by yourself: http://hg.slitaz.org/wok/file/c7a23f0fad68 (where did you find that Hg is a package server?)
Having read http://doc.slitaz.org/en:cookbook:wok which mentioned "wok-undigest: contributions awaiting testing/bug-fixing for inclusion in the unstable Wok", "wok: packages for the unstable, Cooking release", "wok-stable: packages for the stable SliTaz release" I thought there was a system in place for people to upload their packages (wok-undigest), and which then get reviewed (wok-stable). I was probably wrong here.
if you make your own packages, get-* commands and the like have no reason to be in your receipt
Yes, I normally wouldn't implement these, but the package you referred to was intented to work in conjunction in conjunction with the get-palemoon package (allready present on the slitaz servers).
Offline
Re: llev
> Aleksej worked very hard on such subtle cases ...
I agree and his work is much appreciated. But what each of us is doing really cannot be compared. Aleksej's work ends up in a public place for everybody to use while my stuff is private and geared towards a very special case scenario:
A shitPC that's only got a 1 GB hdd which is 25+ years old and extremely slow. And since the shitPC's mobo doesn't allow USB boot, a proper installation of SliTaz is impossible. So, I'm creating my own customized Live CD from justx rolling which has persistence for a number of important files and directories and, to make the whole set-up a bit more flexible, additionally pulls in a number of configuration files on each boot, so I don't have to burn a new CD for every little change. The trouble is that the hdd is rather full and that occasionally I have to juggle stuff around or "tar-up" things and store them temporarily on an external ntsf-formatted USB drive. On such occasions it has happened at least once that through my own negligence (or stupidity) I have broken some symlinks. This is why I'm now creating the package symlinks post_install. For my set-up this really is safer. I also don't see how these symlinks could ever get in conflict with other packages since they are purely internal, that is, inside the package's own tree (redglass and opera). The one exception is spacefm where I'm doing this in the receipt ...
[c]
post_install()
{
cd /lib
ln -s libudev.so.0.13.1 libudev.so.1
ln -s libhistory.so.6.3 libhistory.so
ln -s libhistory.so.6.3 libhistory.so.6
ln -s libreadline.so.6.3 libreadline.so
ln -s libreadline.so.6.3 libreadline.so.6
}
pre_remove()
{
cd /lib
rm -f libudev.so.1
rm -f libhistory.so
rm -f libhistory.so.6
rm -f libreadline.so
rm -f libreadline.so.6
}
[/c]
... which was/is necessary (udev, bash) and has been working well since almost a year. But I haven't checked yet, whether I still have to do this.
Offline
@Darjeeling: you're very brave to make this PC work!
I mentioned this just in case, I was not teaching you a lesson :-)
As for the specific links you make, I wonder whether this could be done automatically by ldconfig?
Offline
@linuxscripts
Not sure, but I think you don't clearly see the difference between those three tasks: building, packing, installing. Do you? In the page you cite, maybe read again the first paragraph. Did you also read the section on receipts, in the Cookbook? This will explain the use of the various functions.
The phrases you cite are a shortcut, they should read "[receipt and extra files needed to cook] packages..." You should also read the documentation of TazPkg and Cookutils (they come with the corresponding packages).
HTH
Offline
@ Darjeeling
--> the shitPC's mobo doesn't allow USB boot <--
Have you already tried the "plop" Bootmanager?
(fits on a 3.5 floppy / or CD etc.)
most of old PCs boot then usb-flash-drives.
https://www.plop.at/en/bootmanagers.html
Offline
[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.64 MiB (Peak: 1.77 MiB) ]