Page 2 of 3

Re: Script to make Slackware Compliant package of xz, deb

Posted: 14 Jul 2016, 03:16
by Jack
I'm going to put this to good uses I have some xz programs to convert to xzm files.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 15 Jul 2016, 00:24
by francois
@jack:
Give some details on what you did with bogomips scripts. This will encourage the use of his script. :D

And this is good to keep us with slackware. :Yahoo!:

Re: Script to make Slackware Compliant package of xz, deb

Posted: 15 Jul 2016, 03:49
by Jack
I just built the files below today with his script. The hard part was finding all the Dependencies. Later I will show how I did it. I now have a workable gLabels 3.4.0 64bit it on the heavy side and I going to slim it down but for me the size don't mean a thing.

Here what I type to get it to work sh xz2txz.sh file name.xz after done then I type txz2xzm file name.txz to be a modules for Porteus Mate 64bit.

Code: Select all

guest@porteus:~/Downloads/glabels/glabels$ ls *.xz
barcode-0.99-3-x86_64.pkg.tar.xz
boost-libs-1.60.0-5-x86_64.pkg.tar.xz
db-5.3.28-3-x86_64.pkg.tar.xz
evolution-data-server-3.20.4-1-x86_64.pkg.tar.xz
glabels-3.4.0-1-x86_64.pkg.tar.xz
icu-57.1-1-x86_64.pkg.tar.xz
iec16022-0.2.5-1-x86_64.pkg.tar.xz
json-glib-1.2.0-1-x86_64.pkg.tar.xz
krb5-1.13.4-1-x86_64.pkg.tar.xz
libphonenumber-7.4.3-1-x86_64.pkg.tar.xz
protobuf-2.6.1-2-x86_64.pkg.tar.xz
qrencode-3.4.4-1-x86_64.pkg.tar.xz
guest@porteus:~/Downloads/glabels/glabels$ 
Here is how I check the Dependencies for glabels.

Code: Select all

guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libebook-1.2.so.16: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libqrencode.so.3: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libiec16022.so.0: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libphonenumber.so.7: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libicui18n.so.57: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libjson-glib-1.0.so.0: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libprotobuf.so.9: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libboost_system.so.1.60.0: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
glabels-3: error while loading shared libraries: libdb-5.3.so: cannot open shared object file: No such file or directory
guest@porteus:~$ glabels-3
Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.GPhoto2VolumeMonitor: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gtk.vfs.GPhoto2VolumeMonitor exited with status 127 (g-dbus-error-quark, 25)

** (glabels-3:2839): WARNING **: AT-SPI: Could not obtain desktop path or name


(glabels-3:2839): Gtk-WARNING **: Failed to fetch network locations: The specified location is not mounted

** (glabels-3:2839): WARNING **: atk-bridge: GetRegisteredEvents returned message with unknown signature

** (glabels-3:2839): WARNING **: atk-bridge: get_device_events_reply: unknown signature

** (glabels-3:2839): WARNING **: atk-bridge: get_device_events_reply: unknown signature
guest@porteus:~$ 
He done great work on this script and I think everyone should give it a try cause it dose work and easy to use. If I can use it with no problem anyone can.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 16 Jul 2016, 03:49
by Jack
I have a question can I manually take out the needed lib files needed by glabels and put them in the glabels/lib directory to slim glabels down? This is just a idea and not sure. Here is the lib in question.
libebook-1.2.so.16
libqrencode.so.3
libiec16022.so.0
libphonenumber.so.7
libicui18n.so.57
libjson-glib-1.0.so.0
libgssapi_krb5.so.2
libprotobuf.so.9
libboost_system.so.1.60.0
libdb-5.3.so

Re: Script to make Slackware Compliant package of xz, deb

Posted: 16 Jul 2016, 20:52
by Bogomips
@ Jack
Don't fully understand your question, so will need full description of what you are doing, and how you are going to use the end result, in as many words as possible. :)

Re: Script to make Slackware Compliant package of xz, deb

Posted: 16 Jul 2016, 21:32
by Jack
I wanted to build glabels and the only current version was from Arch Linux and they use xz. I remember that someone built a script and it turn out it was you.

I use your script to convert xz to txz and I use Arch Linux to find the dependencies for glabels. Then I use tzx2xzm to creeate them to Porteus modules. The one I built was 27.3M which was big but I use the Lib files which I posted I think it a little over 7m in size but I don't that can be done that way.

I posted how I did it and thought it was enough for some one to use to build there own glabels if they wanted too.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 17 Jul 2016, 13:12
by Bogomips
@ Jack

The only thing I can think of, is that there was no need to have a lot of modules. Could have just made one bundle from the txz packages, using the script http://forum.porteus.org/viewtopic.php?f=39&t=3841, If you have any questions how to do it, please post there. :)

Re: Script to make Slackware Compliant package of xz, deb

Posted: 17 Jul 2016, 15:10
by Jack
Bogomips wrote:@ Jack

The only thing I can think of, is that there was no need to have a lot of modules. Could have just made one bundle from the txz packages, using the script http://forum.porteus.org/viewtopic.php?f=39&t=3841, If you have any questions how to do it, please post there. :)
I understand this that was my plan but I wanted to show I did it first then I was going to show how to bundle it.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 17 Jul 2016, 15:18
by Jack
Jack wrote:I have a question can I manually take out the needed lib files needed by glabels and put them in the glabels/lib directory to slim glabels down? This is just a idea and not sure. Here is the lib in question.
libebook-1.2.so.16
libqrencode.so.3
libiec16022.so.0
libphonenumber.so.7
libicui18n.so.57
libjson-glib-1.0.so.0
libgssapi_krb5.so.2
libprotobuf.so.9
libboost_system.so.1.60.0
libdb-5.3.so
I wanted to make it smaller that why I ask this question but no one to know or don't want to help out cause I don't know.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 09 Aug 2016, 16:14
by Jack
@ Bogomips

I see this script can do xz, deb and rpm.

example:

sh xz2txz.sh file-name.xz
sh xz2txz.sh file-name.deb
sh xz2txz.sh file-name.rpm

Is those example right way to do them? If not can you show me a example how.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 09 Aug 2016, 18:34
by Bogomips
Jack wrote: sh xz2txz.sh file-name.xz
sh xz2txz.sh file-name.deb
sh xz2txz.sh file-name.rpm

Code: Select all

sh xz2txz.sh file-name.xz
ln  xz2txz.sh  deb2xz.sh
sh deb2txz.sh file-name.deb
ln  xz2txz.sh  rpm2xz.sh
sh rpm2txz.sh file-name.rpm
For example:

Code: Select all

guest@porteus:~$ cp p10/Por/rpm2txz.sh .
guest@porteus:~$ ln rpm2txz.sh xz2txz.sh
guest@porteus:~$ ln xz2txz.sh deb2txz.sh
guest@porteus:~$ ls -l *.sh
-rw-r--r-- 3 guest users 5196 Aug  9 20:13 deb2txz.sh
-rw-r--r-- 3 guest users 5196 Aug  9 20:13 rpm2txz.sh
-rw-r--r-- 3 guest users 5196 Aug  9 20:13 xz2txz.sh
guest@porteus:~$ ls -i *.sh
29499 deb2txz.sh  29499 rpm2txz.sh  29499 xz2txz.sh
As you can see they all have the same inode, which means same file, but called by different names. Use non-verbose switch if you wish not to see too much output. Rest will be in /tmp if you wish to see. e.g. deb2txz.sh -nv file-name.deb. Also if you wish you can do all debs in a folder, using deb2txz [-nv] /Path/to/<directory with some debs> (Same goes for rpm and xz)

TO DO: Improve naming. Some packages names coming out funny, but they will work.

Re: Script to make Slackware Compliant package of xz, deb

Posted: 06 Oct 2016, 01:36
by FURRY_NOVA
Been trying out that script and the updated one. I've found that if the contents are inside a sub directory inside the tar.xz, it builds incorrectly. Low level users wouldn't know about that but after modifying the fake-root of the tar.xz content, it built the package and added the var folder content correctly.

Maybe better to move the script in the first post to make it easier to find, mate. :beer:

Re: Script to make Slackware Compliant package of xz, deb

Posted: 08 Oct 2016, 13:15
by Bogomips
FURRY_NOVA wrote:Been trying out that script and the updated one.
  • The Good News
    That's what we like to see: comment/feedback. :friends:
    • The Bad News
      FURRY_NOVA wrote: I've found that if the contents are inside a sub directory inside the tar.xz, it builds incorrectly. ... but after modifying the fake-root of the tar.xz content, it built the package and added the var folder content correctly.
      Looks like an Assertion. Now, an assertion (not readily confirmable) in a bug report without accompanying documentation like diagnostic output to back it up, normally gets short shrift.
      • The leg work having been done, it should not have taken too much extra effort to provide the offending output backing up the above assertion.
      • How to get the tar.xz in question, also helps.
      • FURRY_NOVA wrote:if the contents are inside a sub directory inside the tar.xz, it builds incorrectly. Low level users wouldn't know about that
        Further clarification, please.
    FURRY_NOVA wrote:Maybe better to move the script in the first post to make it easier to find, mate. :beer:
    To be quite honest, there is usually a dearth of comment or feedback, that these I do as a reference to myself, but sufficiently explanatory as to be shared, syncthing illustrating both points. Ususally not worth the effort to get everything hunky dory for no one to use. However as interest has been shown, will try for improved clarity.

    Re: Script to make Slackware Compliant package of xz, deb

    Posted: 08 Oct 2016, 15:40
    by Ed_P
    .
    .:shock:

    Having a bit of a down day Bogomips!! Come on cheer up, the day will get better. :Yahoo!:

    :friends:

    Re: Script to make Slackware Compliant package of xz, deb

    Posted: 08 Oct 2016, 18:21
    by FURRY_NOVA
    I'm sorry. I thought my explanation was detailed enough to help. :( To explain it further. Try download v4.6.0 of Node JS LTS from here: https://nodejs.org/en/

    Inside the node-v4.6.0-linux-x86.tar.xz package are these directories and contents. I skipped deeper depths to make it readable:

    Code: Select all

    /node-v4.6.0-linux-x86/
    /node-v4.6.0-linux-x86/include/
    /node-v4.6.0-linux-x86/bin/
    /node-v4.6.0-linux-x86/share/
    /node-v4.6.0-linux-x86/README.md
    /node-v4.6.0-linux-x86/lib/
    /node-v4.6.0-linux-x86/CHANGELOG.md
    /node-v4.6.0-linux-x86/LICENSE
    (The content ending with / are folders.)

    When I run your script, the content result is:

    Code: Select all

    /install/
    /install/doinst.sh
    /install/slack-desc
    /node-v4.6.0-linux-x86/
    /node-v4.6.0-linux-x86/include/
    /node-v4.6.0-linux-x86/bin/
    /node-v4.6.0-linux-x86/share/
    /node-v4.6.0-linux-x86/README.md
    /node-v4.6.0-linux-x86/lib/
    /node-v4.6.0-linux-x86/CHANGELOG.md
    /node-v4.6.0-linux-x86/LICENSE
    /./
    (The /./ folder is empty so ya know.)

    After converting it to xzm and activating it, the module doesn't work.

    Code: Select all

    guest@porteus:~$ node
    bash: node: command not found
    guest@porteus:~$
    In the File System, that contains bin, dev, etc and home and stuff. It has a node-v4.6.0-linux-x86 folder. The contents of that folder should be outside in the File System.

    Current:

    Code: Select all

    /node-v4.6.0-linux-x86/include/
    /node-v4.6.0-linux-x86/bin/
    /node-v4.6.0-linux-x86/share/
    /node-v4.6.0-linux-x86/README.md
    /node-v4.6.0-linux-x86/lib/
    /node-v4.6.0-linux-x86/CHANGELOG.md
    /node-v4.6.0-linux-x86/LICENSE
    Should be:

    Code: Select all

    /include/
    /bin/
    /share/
    /README.md
    /lib/
    /CHANGELOG.md
    /LICENSE
    Starting back at the tar.xz. I made the file structure look like the last code area above this paragraph with Xarchiver application. I deleted README.md, CHANGELOG.md and LICENSE since those aren't created in File System when activating other modules. I don't know if they supposed to be places somewhere else though.

    Then used your script to convert to txz where it shows:

    Code: Select all

    /install/
    /include/
    /bin/
    /share/
    /lib/
    /./
    Then I txz2xzm it, activated xzm and tried it again:

    Code: Select all

    guest@porteus:~$ node
    > console.log("hi");
    hi
    undefined
    >