sbokpg slackbuilds.org (optional src2pkg backend )

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

sbokpg slackbuilds.org (optional src2pkg backend )

#1 Post by big_bass »

Image

Image

meet together better said both used together and staying separate
to compliment each others special qualities


this isnt an official union but its a way linux works together as a team
by forming useful programs together in strange ways

sbopkg gets the sources and organizes them
src2pg builds the packages


Its all about choice this wasnt possible when I started on puppy
now it is so you now have a choice how to build and install packages




this may seem strange to official slackware users but I am not using official slackware
as the base but doing it this way I can utilize both
because I have different packages installed as my base system

so this opens up options that sbopkg hadnt planed on
and that is using outside of slackware official

slackbuilds still can be used or src2pkg.auto
they get chosen in the config file so full function of sbopkg still works


I got this working on TXZ pup!!!
http://www.sbopkg.org/

2,733 build scripts GUI driven auto package maker

*plus all the official sources I havent included in that number wow thats a lot
I wrote something else for all the official packages*

Its all about choice this wasnt possible when I started on puppy
now it is so you now have a choice

because I have all the support files pre installed
and maintained a standard this was the payoff
at least take a look to see whats out there
even if you just get some ideas from it
staying on the slackware path has paid off in gold bars
a part of me wishes I wrote it but I am happy just to get a chance to use it

it all finally came together
will be busy cooking up packages for quite some time :lol:


I will update the first post with the latest
I mostly docmented what was done so I wouldnt forget
and new versions could be modified quickly
everything you need is in this post


this is the latest modified sbopkg to use src2pkg as the backend to be used as the default in sbopkg

http://www.puppy2.org/slaxer/sbopkg-0.35.0-10_SLXR.tgz

UPDATED sept 2-2011

simple version fully automatic

builds needed files on the fly when you select the package to build
this makes things very very fast


0.) devx see here

1.install src2pkg see here open a terminal then src2pkg --setup

2 dependency gpg see here

3. install sbopkg see here open terminal sbopkg and SYNC to get the sources *after you get asked to build the src2pg.auto scripts


Image

this gets you started and downloads the needed files /sources

Image
look for some package you want to build

Image


Image

Image

Image
press enter

Image
press enter

Image
notice here src2pkg is taking over the build 100%
and the src2pkg.auto got made here and the pkg-desc too
this is done automatically now

Image
if all was well the package is in /tmp

for the question about continue, abort, build
type n for no

**this part is not used its only for when
slackbuilds is the default and you are using an
official slackware distro so ignore this part

Joe
Last edited by big_bass on Sat 03 Sep 2011, 05:18, edited 38 times in total.

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#2 Post by amigo »

Joe, src2pkg has an option which will translate those SlackBuilds to src2pkg format for you. Actually there is a separate program included with src2pkg called sb2sp which does the work. See: 'sb2sp --help' and : 'src2pkg -hh' for the options --convert and --convert-simple. The convertor handles the syntax for sbopkg's scripts from their standard template, most scripts written by PatV and those from Phantom-X as well.

The advantage of using them with src2pkg? You already know -src2pkg sanitizes the packages for you, where a native SlackBuild can let any number of packaging mishaps through.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#3 Post by big_bass »

Hey Gilbert

Thanks for posting and informing about even more great options
about converting /customizing build scripts using sb2sp a script you wrote to convert *SlackBuild scripts* so they could also be used with src2pkg (which is in a class of its own )

looks like I will have many buildscripts to sb2sp
better to hack at the sbopkg code and add in an option to use src2pkg
for the package building part :idea:

*This is a snip on my first page of TXZ_pup
but since you have an updated package here is what I have on the first page


src2pkg build packages from source code for the best compatibility
special thanks to Gilbert Ashley forum member amigo


updated 7-19-2011 version 2.5

Imagesrc2pkg-2.5-noarch-2.tgz

http://distro.ibiblio.org/pub/linux/dis ... arch-2.tgz

Joe

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#4 Post by big_bass »

Hey Gilbert


well that didnt take too long to convert them all :D


I got it working !
this little gem took your script and converted everything
to src2pkg compatible 8)

(you must have spent a lot of time doing that conversion script)
I'll give it a heavy workout

and auto place the script inside the folder so 100% automatic

when I have time I will try adding code into sbopkg so its in the menu for src2pkg
to take over the building

Code: Select all

cd /var/lib/sbopkg/SBo/13.37/
:>/tmp/all-slackbuilds
 
ls */*/*.SlackBuild  >>/tmp/all-slackbuilds
     for i in  $(cat /tmp/all-slackbuilds) ; do
        cd /var/lib/sbopkg/SBo/13.37/
        echo "$i" 
        cd /var/lib/sbopkg/SBo/13.37/$(dirname "/$i")
        sb2sp $(basename "/$i")
     
done        

Joe

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#5 Post by big_bass »

well I started with the easy stuff already

I got src2pkg.auto in the menu and you can view the file
Attachments
hacksbopkg.png
(19.74 KiB) Downloaded 2540 times
hacksbospk2.png
(17.08 KiB) Downloaded 2524 times

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#6 Post by amigo »

Great stuff, Joe. I saw your PM, but you seem to have sorted it out. The --convert and --convert-simple options are for using sb2sp from within src2pkg. When using sb2sp by itself, the option is '--simple', otherwise sb2sp will produce a 'long version' of the build script -which basically just cuts out a large portion of the SlackBuild with the explicit build lines. A 'simple' script is one which just looks like one auto-generated by src2pkg whhen it knows nothing about the sources. As you've probably seen, when sb2sp can't create a simple script, it falls back to creating a long one.

That's nice that you've added src2pkg capability to sbopkg -I wouldn't go offering that code to the sbopkg devs, though -they think that using src2pkg is a heresy! You could add one thing to your script which would rename the slack-desc files to pkg-desc for use with KISS. sbopkg has a nice repo by now with lots of sources. They also use a 'package queue' concept which handles dependencies of stuff you build. That is, the package build-script maintainer provides a list of any packages which must be built and installed first before your chosen sources. However, the system is very crude in that it must be manually written and it does not include any information about any requirements which are part of the official slack packages. In other words, you need a full slack installation in order to get good results.

Yeah, it took awhile to come up with the code for sb2sp. It's still far from perfect but does a pretty good job -best of all when converting scripts from sbopkg.org. sb2sp has been in src2pkg since src2pkg-1.9.9-noarch-1. I'd suggest always using the '--simple' option as it will give you src2pkg scripts which are easier to read and maintain.

With a fairly small modification, src2pkg could also use PKGBUILD scripts from arch linux, or 'port' build scripts for crux or other similar ones. I did implement that for testing, so it's doable, but I thought it more important to concentrate on getting my own src2pkg-style repo going -especially for the more basic packages. I'm just about done with a prototype KISS repo-manager/installer for you...

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#7 Post by big_bass »

Hey Gilbert

This is a short reply I have much to say but I have to go to work
so I will comment more later
I wouldn't go offering that code to the sbopkg devs, though -they think that using src2pkg is a heresy!
almost everything I do here in the forum I feel the same way :lol:
give people a choice even if they think its a heresy ... at first

You could add one thing to your script which would rename the slack-desc files to pkg-desc for use with KISS.
a little more progress
this code snippet worked nicely to place the pkg-desc
inside all the build folders *I used copy to have an option *

Joe

Code: Select all

# have an option to build using KISS tools
# and src2pkg make a pkg-desc option 
   
cd /var/lib/sbopkg/SBo/13.37/
:>/tmp/all-slack-desc
 
ls */*/slack-desc  >>/tmp/all-slack-desc
     for i in  $(cat /tmp/all-slack-desc) ; do
        cd /var/lib/sbopkg/SBo/13.37/
        echo "$i" 
        cd /var/lib/sbopkg/SBo/13.37/$(dirname "/$i")
        cp $(basename "/$i") pkg-desc
done   

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#8 Post by big_bass »

me
I will follow up with a package and dependencies

# Added src2pkg as an option in the spopkg GUI ##Joe Arose
# note that src2pg and sbopkg are both maintained by two different developers
# I just want to add an option in the sbopkg to have an optional viewer/ package build
# using src2pkg in the backend this may not go over well with the orginal intent
# of either developer but both developers have done an excellent job
# and I would like to join their efforts together even if this
# modified version is only used by me it will display the needed changes to make it
# compatable with both



amigo
but I thought it more important to concentrate on getting my own src2pkg-style repo going
I want to add a few extra packages to your repo with this

sbopkg modified to make pkg-desc and src2pkg.auto
http://www.puppy2.org/slaxer/sbopkg-0.35.0-1_SLXR.tgz

gpg dependency marks errors without this but the packages still build but here it is anyway
http://www.puppy2.org/slaxer/gnupg-1.4.10-i486-1.txz


I am going to do this in steps so the needed changes could be easily diffed out
and well documented


this shows changes to the main program
/usr/doc/sbopkg-0.35.0/sbopkg-orig.patch

this is what I added to make the needed files for src2pkg / KISS
this only needs to be run once after the sbopkg was synced and all the folders and sources are in place and it takes awhile due to converting of scripts a mini terminal shows progress

/root/sbo-src2pkg-add-option
/usr/bin/convert2src2pkg

*src2pkg is required only if you want to convert and build packages
as an optional build tool (the next step is offering an optional "auto build in the menu "
I havent added that in yet still have to sort out the code a bit for that part
but packages could be built from inside the folders the good stuff is already there

Joe
Last edited by big_bass on Wed 03 Aug 2011, 19:53, edited 3 times in total.

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#9 Post by big_bass »

Yes! !!


I will add the code snip to activate src2pkg as the backend build tool

ok this is what just happened I can download the sources in a GUI 2733 sources
using sbopkg and build with the SlackBuild script all automatic :D

but I added an option to build using src2pkg as the backend (at the moment I forced the option *will add the needed code when I write some checks to check if src2pkg is installed )
that means that src2pkg handles the package building completely once the source was selected
so it then is a 100% src2pkg compliant package :D

Hey Gilbert check out the screeny

*I added the gpg program after I took the screen shot

I see a few thousand freshly compiled packages coming soon





Joe
Attachments
sbo-src2pkg-working.png
(16.68 KiB) Downloaded 2351 times
sbo-src2pkg-built-package.png
(20.75 KiB) Downloaded 2488 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#10 Post by big_bass »

this is the hacked sbopkg to use src2pkg as the backend to be used as the default in sbopkg
note that no edits were made to src2pkg itself
http://www.puppy2.org/slaxer/sbopkg-0.35.0-3_SLXR.tgz



how I did it was create a $BUILD_TOOL and a $BACKEND_BUILD_TOOL
inside the config file

/etc/sbopkg/sbopkg.conf

Code: Select all

#----------------chose build tools ------------
#uncomment these for the default src2pkg
export BACKEND_BUILD_TOOL="src2pkg "
export BUILD_TOOL=".src2pkg.auto"

#comment out if you want src2pkg 
#export BACKEND_BUILD_TOOL="" #if you want to run the SlackBuild 
#export BUILD_TOOL=".SlackBuild.build"

#----------------------------------------------


then I made the needed edits inside the package build function of sbopkg
to use the new strings *you could diff out the code

on txz_pup you need

0.) devx see here

1.install src2pkg see here open a terminal then src2pkg --setup

2. install sbopkg see here open terminal sbopkg and SYNC to get the sources

3 dependency gpg see here

4.)this script generates the src2pkg.auto scripts it needs to be run before building the package
/root/sbo-src2pkg-add-option
*this goes in root for the moment until I include it in the main code
I did it this way so as not to meddle too much with the main code while testing
I know about root and packages this is temporary


5.) when step 4 finishes it takes awhile now you can build packages with the src2pkg backend doing the heavy lifting (since I am not on an official slackware distro) src2pkg fixes the building of the package with all its in built checking routines

******************************************************************
the slackbuild is ignored and 100% src2pkg.auto takes over

so sbopkg gets the sources the src2pkg builds the package

yes, it can be done and works :D
and I noted how to do it so new versions can be patched 8)

*when I get some free time I will auto build the needed files after the sync is run
if src2pkg is the backend so no files in root need to be run



Joe

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#11 Post by big_bass »

this is the latest hacked sbopkg to use src2pkg as the backend to be used as the default in sbopkg
note that no edits were made to src2pkg itself
http://www.puppy2.org/slaxer/sbopkg-0.35.0-5_SLXR.tgz

UPDATED 8-6-2011to ask then auto build sr2pkg.auto in the main script all in dialog code
its looking good now no Xdialog no terminals
I used the tailbox in dialog to show the progress

I tried hard not to mess to much with the main code I wrote an external script that gets called because the original code is already at almost 5,000 lines of code :shock:

a few checks are made to self test if all is setup correctly now just fine tuning
is needed in the output of sb2sp some color codes dont get read in dialog
but other than that all is working nicely now fixed

0.) devx see here

1.install src2pkg see here open a terminal then src2pkg --setup

2 dependency gpg see here


3. install sbopkg see here open terminal sbopkg and SYNC to get the sources *after you get asked to build the src2pg.auto scripts


*small edit needed when dialog is used remove color option for a clean output
compare picture 2 to picture 3

however when run in a terminal the colors are nice and look good

Code: Select all

# ANSI-COLORS-remove
sed -i 's/\$CRE//g' /usr/bin/sb2sp
sed -i 's/\$NORMAL//g' /usr/bin/sb2sp
sed -i 's/\$GREEN//g' /usr/bin/sb2sp
sed -i 's/\$YELLOW//g' /usr/bin/sb2sp
sed -i 's/\$BLUE//g' /usr/bin/sb2sp
sed -i 's/\$CYAN//g' /usr/bin/sb2sp
sed -i 's/\$RED\"Failed\!/\"Failed\!/g' /usr/bin/sb2sp

Joe
Attachments
4.png
(14.51 KiB) Downloaded 2380 times
2.png
(17.3 KiB) Downloaded 2312 times
3.png
(24.05 KiB) Downloaded 2308 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#12 Post by big_bass »

updated first post !

greatly simplified and made it very fast
since I dont generate all the src2pkg.auto scripts now its
done on the fly fully automatically when you select build package
this way its done as you select packages to build

cutting off 25 minutes worth of time trying to create all of them first

this is much simpler it makes them when you select the package to build
and if you sync you dont lose anything either
well it was fun coding the build all it may come in handy for a future project
keeping it simple is always the best

Joe

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#13 Post by big_bass »

updated first post to fine tune a script that toggles between src2pkg or slackbuild
on the fly without having to restart sbopkg
*that was a bit tricky to solve updating the variables while the script is running*

its called flip_it it detects what is the sbopkg.conf and then auto writes it
to either src2pkg or slackbuild to build the package so more options while building packages

an easier way to AUTO update the config file with a GUI


removed the queue from the menu only the code is still there


Joe
Attachments
flipmenu.png
(8.32 KiB) Downloaded 2217 times
flipslack.png
(1.56 KiB) Downloaded 2244 times
flip.png
(1.5 KiB) Downloaded 2257 times

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#14 Post by big_bass »

updated first post

now version 10 this version adds a feature to auto parse the desktops
in packages built with sbopkg and format the desktops correctly

using this format for all desktops and an extra array can be made so this file can be searched always having the data in this order one long line
[Desktop+Entry]|Name=AbiWord|Icon=/usr/share/icons/abiword_48.png|Categories=Application;Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;|Exec=abiword|Type=Application|Comment=Compose,+edit,+and+view+documents|

the spaces are replaced with a "+" and a pipe separator this allows for a formatted array database


[Desktop Entry]
Name
Icon
Categories
Exec
Type
Comment


one example below is what the new desktop looks like

[Desktop Entry]
Name=AbiWord
Icon=/usr/share/icons/abiword_48.png
Categories=Application;Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;
Exec=abiword
Type=Application
Comment=Compose, edit, and view documents

Post Reply