Script to make Slackware Compliant package of xz, deb

Post tutorials, HOWTO's and other useful resources here.
Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#16 by Jack » 14 Jul 2016, 03:16

I'm going to put this to good uses I have some xz programs to convert to xzm files.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

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

Post#17 by francois » 15 Jul 2016, 00:24

@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!:
Prendre son temps, profiter de celui qui passe.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#18 by Jack » 15 Jul 2016, 03:49

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.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#19 by Jack » 16 Jul 2016, 03:49

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 just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

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

Post#20 by Bogomips » 16 Jul 2016, 20:52

@ 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. :)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#21 by Jack » 16 Jul 2016, 21:32

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.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

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

Post#22 by Bogomips » 17 Jul 2016, 13:12

@ 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. :)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#23 by Jack » 17 Jul 2016, 15:10

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.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#24 by Jack » 17 Jul 2016, 15:18

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.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Jack
Contributor
Contributor
Posts: 1857
Joined: 09 Aug 2013, 14:25
Distribution: Porteus and Nemesis
Location: USA

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

Post#25 by Jack » 09 Aug 2016, 16:14

@ 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.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

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

Post#26 by Bogomips » 09 Aug 2016, 18:34

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.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
FURRY_NOVA
Black ninja
Black ninja
Posts: 84
Joined: 11 Aug 2016, 17:26
Distribution: Porteus XFCE v3.2 i586
Location: United Kingdom

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

Post#27 by FURRY_NOVA » 06 Oct 2016, 01:36

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:
New to Linux but learning. Hoping to help out Porteus community. :)

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

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

Post#28 by Bogomips » 08 Oct 2016, 13:15

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.
    Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
    NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

    User avatar
    Ed_P
    Contributor
    Contributor
    Posts: 8341
    Joined: 06 Feb 2013, 22:12
    Distribution: Cinnamon 5.01 ISO
    Location: Western NY, USA

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

    Post#29 by Ed_P » 08 Oct 2016, 15:40

    .
    .:shock:

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

    :friends:
    Ed

    User avatar
    FURRY_NOVA
    Black ninja
    Black ninja
    Posts: 84
    Joined: 11 Aug 2016, 17:26
    Distribution: Porteus XFCE v3.2 i586
    Location: United Kingdom

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

    Post#30 by FURRY_NOVA » 08 Oct 2016, 18:21

    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
    > 
    New to Linux but learning. Hoping to help out Porteus community. :)

    Post Reply