Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 30 Sep 2014, 20:34
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
sbokpg slackbuilds.org (optional src2pkg backend )
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [14 Posts]  
Author Message
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Wed 27 Jul 2011, 23:16    Post subject:  sbokpg slackbuilds.org (optional src2pkg backend )
Subject description: 2,733 build scripts GUI driven auto package maker
 





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 Laughing


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




this gets you started and downloads the needed files /sources


look for some package you want to build









press enter


press enter


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


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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though

Last edited by big_bass on Sat 03 Sep 2011, 01:18; edited 38 times in total
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2251

PostPosted: Thu 28 Jul 2011, 04:38    Post subject:  

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.
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 28 Jul 2011, 09:14    Post subject:  

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

src2pkg-2.5-noarch-2.tgz

http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/src2pkg/src2pkg-2.5-noarch-2.tgz

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 28 Jul 2011, 13:25    Post subject:  

Hey Gilbert


well that didnt take too long to convert them all Very Happy


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

(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:

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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Fri 29 Jul 2011, 02:12    Post subject:  

well I started with the easy stuff already

I got src2pkg.auto in the menu and you can view the file
hacksbopkg.png
 Description   
 Filesize   19.74 KB
 Viewed   1655 Time(s)

hacksbopkg.png

hacksbospk2.png
 Description   
 Filesize   17.08 KB
 Viewed   1648 Time(s)

hacksbospk2.png


_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2251

PostPosted: Fri 29 Jul 2011, 04:11    Post subject:  

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...
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Fri 29 Jul 2011, 13:59    Post subject:  

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

Quote:
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 Laughing
give people a choice even if they think its a heresy ... at first


Quote:
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:
# 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   

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 31 Jul 2011, 20:24    Post subject:  

me
Quote:
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
Quote:
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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though

Last edited by big_bass on Wed 03 Aug 2011, 15:53; edited 3 times in total
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 01 Aug 2011, 09:44    Post subject:  

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 Very Happy

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 Very Happy

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
sbo-src2pkg-working.png
 Description   
 Filesize   16.68 KB
 Viewed   1546 Time(s)

sbo-src2pkg-working.png

sbo-src2pkg-built-package.png
 Description   
 Filesize   20.75 KB
 Viewed   1557 Time(s)

sbo-src2pkg-built-package.png


_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Wed 03 Aug 2011, 16:28    Post subject:  

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:

#----------------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 Very Happy
and I noted how to do it so new versions can be patched Cool

*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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Fri 05 Aug 2011, 22:09    Post subject:  

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 Shocked

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:

# 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
4.png
 Description   
 Filesize   14.51 KB
 Viewed   1390 Time(s)

4.png

2.png
 Description   
 Filesize   17.3 KB
 Viewed   1390 Time(s)

2.png

3.png
 Description   
 Filesize   24.05 KB
 Viewed   1395 Time(s)

3.png


_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sat 06 Aug 2011, 20:19    Post subject:  

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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Thu 11 Aug 2011, 11:56    Post subject:  

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
flipmenu.png
 Description   
 Filesize   8.32 KB
 Viewed   1228 Time(s)

flipmenu.png

flipslack.png
 Description   
 Filesize   1.56 KB
 Viewed   1251 Time(s)

flipslack.png

flip.png
 Description   
 Filesize   1.5 KB
 Viewed   1238 Time(s)

flip.png

Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sat 03 Sep 2011, 01:14    Post subject:  

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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [14 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1208s ][ Queries: 13 (0.0052s) ][ GZIP on ]