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 Thu 23 Nov 2017, 15:11
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
[RELEASE] src2pkg-3.0 - create packages from source
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [51 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Sat 05 Jul 2014, 19:31    Post subject:  

Yes, I agree, I've been having a play and also have found the src2pkg website, which is extremely helpfull.

I think my first problem will be an 'order-of-build' problem as I will need to have dependancies built and installed first before the packages needing them.

So I somehow need to list them, build them and install them before building the parent packages.

The -T I think will tell me if it needs a dependancy, thereby if so put it into build-later-list2, if not into build-first-list1.

I wonder what format it comes back in though, just the packagename or a lot of unwanted info? I think if it's useable like that, that is all I would need added if it's not there already in the switches, to complete an autobuild with dependancies.

This would autoloop with build-first-list1 being installed and build-later-list2 becoming the new source-list fed into the -T until there is nothing in either build* lists.

The -I will of course install the dependancy once built.

I shall play further, but I wonder if in the future it would be possible to build linux totally from source without the need to have interims such as T2, etc.

Seems like i'm back to scripting again, oh well Rolling Eyes

I think for now, i'll just build with src2pkg the minimum I need for T290 and work it from there. ie do the other packages from within a T290 base, not give up.

This leaves just which Kernel and it's settings left to choose!

Also, as a fyi, I just found that src2pkg --more-help, listed in the help, just errors out while src2pkg -hh is ok.

regards
scsijon

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0. First Beta planned out end of August 2017.
Back to top
View user's profile Send private message Visit poster's website 
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Wed 09 Jul 2014, 01:36    Post subject:  

amigo, I'm having fun playing with this and do think it will be of much use to me, especially when I start to create all the extra T2 packages.

However, for now, I can't seem to find what output switch sets the final package as a $package.tar.bz2, can you help me please. It's needed for the way BarryK has setup the new T2 packaging system and i'd like to keep that part of it as the overall build seems to have become 'somewhat quicker'. It looks like it requires less post-build scripting work to happen than a pure .pet package does.

thanks
scsijon

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0. First Beta planned out end of August 2017.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Wed 09 Jul 2014, 08:35    Post subject:  

You mean you want the final packages to have '.tar.bz2' suffix? And, that they use only a name without any ARCH or VERSION info in the name?
src2pkg does offer bzipped packages as an option, using '-TBZ'. However, you may find it quirky since nobody ses such packages. It was intended for use with vector linux IIRC. But, when you ask for a *.pet it will automatically set and use gzip compression with .pet suffix.

The best way to solve the above (either question), would be to write a small extension to src2pkg which would re-format and re-name the end result. You can create extension which are run at any and all steps of the build -either before or after the regular code of the step is run. You can see an explanation of the mechanism starting at line 2492 of the ChangeLog file in the docs and the feature must be enabled in the conf file -see notes at line 289. The extensions feature allows you to radically alter what src2pkg does, so it provides fertile ground for developing new features. Let me know if you still don't understand how to create and use them and I'll help you.

I like the T2 build system -but I don't like their package format as it is way too basic. I have developed a more usable package standard (actually two of them) which can be created by src2pkg -maybe you'd like to use it to build a base on?? The *.tpkg and *.tpm packages provide very rich package information -including package dependency info. The tpkg and tpm package management tools do not (yet) actually resolve depends for you (I am an old slacker, you know), however, the mechansim for doing so is quite simple *once the info is generated or specified and included in the package*. The nice thing about T2 is that it generates even BuildRequires info for you. I've done some work towards integrating this into src2pkg (for *.tpm packages). The run-time depends-generation already works great.
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Wed 09 Jul 2014, 19:59    Post subject:  

amigo wrote:
The best way to solve the above (either question), would be to write a small extension to src2pkg which would re-format and re-name the end result. You can create extension which are run at any and all steps of the build -either before or after the regular code of the step is run. You can see an explanation of the mechanism starting at line 2492 of the ChangeLog file in the docs and the feature must be enabled in the conf file -see notes at line 289. The extensions feature allows you to radically alter what src2pkg does, so it provides fertile ground for developing new features. Let me know if you still don't understand how to create and use them and I'll help you..


ok, i'll have a look and a go before asking for help

amigo wrote:
I like the T2 build system -but I don't like their package format as it is way too basic.
/cut/
The nice thing about T2 is that it generates even BuildRequires info for you. I've done some work towards integrating this into src2pkg (for *.tpm packages). The run-time depends-generation already works great.


Mageia does this also with their system, although sometimes there is too much info. given.

I have an idea this is what barryk was working towards using in his version of woof (not woof-ce) and his racy, which is T2. But when he went back to quirky (his favorite plaything) it was overtaken with another idea. He had a few notes about generation and integration some time ago on his blog, but they were only 'roughs'.

I'd really like to one day, just tell a working system that I want to add a new package by name, have it d/l the source, find dependancies from inside the package, check what dependancies I have already and if versions are sufficent, give me an option to go ahead or not, if it's a yes d/l missing or dependancies that need to be updated, build and install dependancies, build and install the new package and let me test it and either accept it or reject it and if rejected remove the package and all the new dependancies or step those that were already in back to the earlier versions. Pie in the sky at present, but it should happen one day.

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0. First Beta planned out end of August 2017.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Thu 10 Jul 2014, 04:32    Post subject:  

Your last paragraph describes exactly what nearly everyone wants -and what major distros implement to a great degree. Mageia is an rpm distro as is fedora and suse. debian/ubuntu & Co. use dpkg with *.deb packages. Both systems require a recipe for every single package which includes everything from the source url to the last script actions used to install the package. woof is completely different as it just uses pre-built packages.

There is no magic way to resolve dependencies properly. It requires the generation of a lot of accurate information which must be collected and collated into a useful form *at the time the package is created*, and then passed on *within the package* to package *management* tools.

generate, collect, collate/format -that's the hard part. This has to be done by the package *creation* software at package build-time.

The package *format* is the central concept of any package system. It must be capable of containing and transmitting all the info needed to carry out proper installation.

Dependency-resolution and proper up/down-grading, done of course by the package installation/mgmt tools, also depend on the use of known, sane repositories of packages. The repo-side of the equation also involves creating and making available information about the packages. repo creation and management is done by still another class of software.

There is one example extension (for vector linux in fact), here:
http://distro.ibiblio.org/amigolinux/download/src2pkg/src2pkg-extensions/

Try just creating a harmless extension with echo statements, so you can see if it is working and how/when.
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Tue 15 Jul 2014, 22:18    Post subject: 64bit?  

I'm going to be greedy for mick and ask when there will likely be a 64bit version for his slacko64?

please, pretty please.

Laughing

scsijon

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0. First Beta planned out end of August 2017.
Back to top
View user's profile Send private message Visit poster's website 
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Wed 23 Jul 2014, 15:31    Post subject: extension?  

I was wondering if it as possible to build a package from within a jailed (your term i think) system. Something along the lines of your -JAIL setting for an install, but extended to look for any dependancies there (say /var/tree_root) and not in the normal ('/') tree. You would need to set the tree base somewhere. Then as far as src2pkg was concerned, if the wanted prerequisite package or file is not already there it would fail or a version needs updating past what you had already built and installed in the jailed area.
It would mean that you would need a basic filesystem structure (/bin, /lib, /etc, ...) of course. In our case an opened puppy...sfs should suffice, but there is no reason something like aboriginal linux shouldn't be able to provide this structure in it's package.
It would at least then give you the ability to chroot for testing or even (maybe) develop for one system on top of another.

I hope you understand what i mean from this.

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0. First Beta planned out end of August 2017.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Sat 26 Jul 2014, 02:30    Post subject:  

As for a 64-bit version, I would try installing src2pkg normally and running 'src2pkg --setup', but I'm not sure that will compile correctly on *puppy* 64-but -it does work on Slackware 64-bit. On puppy, it might possibly compile for 64-bit usage but be named as a 32-bit.

As to using jails, that should work if the jail is created and used properly. If you chroot into the 'jailed' directory struvture, then references to the database path would reference that path within the jail. If you need to reference paths outside the 'jail', then you'd need to 'mount --bind ...' the needed items inside the jail.
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Sat 24 Jan 2015, 19:52    Post subject:  

amigo wrote:
As for a 64-bit version, I would try installing src2pkg normally and running 'src2pkg --setup', but I'm not sure that will compile correctly on *puppy* 64-but -it does work on Slackware 64-bit. On puppy, it might possibly compile for 64-bit usage but be named as a 32-bit.

As to using jails, that should work if the jail is created and used properly. If you chroot into the 'jailed' directory struvture, then references to the database path would reference that path within the jail. If you need to reference paths outside the 'jail', then you'd need to 'mount --bind ...' the needed items inside the jail.


I tried with barry's april64 (with devx) and it installed but failed miserably with the --setup so I didn't go further for the moment. Partly due I think to things like april uses a few packages that are later than the current src2pkg so maybe a new version is due.

regards
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Sun 25 Jan 2015, 04:10    Post subject:  

What was the output from 'src2pkg --setup'?
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1251
Location: the australian mallee

PostPosted: Wed 28 Jan 2015, 21:31    Post subject:  

amigo wrote:
What was the output from 'src2pkg --setup'?


-------------------------------------------------------------------------
 Notice - Creating src2pkg-helpers:
src2pkg uses a shared library and a few programs
when creating packages. For best compatibility,
these binaries will be compiled on your system.
They are then installed in a private directory.
When done, src2pkg is ready for use.

TEMP_DIR=/usr/src/src2pkg/builds/src2pkg-helpers
Starting build in 5 seconds
Unpacking sources - OK
Creating libsentry - OK
Creating tar-1.13 - OK
Creating coreutils - OK
Creating unionfs-fuse - Failed! Error is non-fatal. Continuing...
Creating pet package - Done 
Finished pet package is:
/usr/src/src2pkg/src2pkg-helpers/src2pkg-helpers-1.6-i486-1.pet
Installing pet package - Failed! 
Failed to install package: src2pkg-helpers-1.6-i486-1.pet
---------------------------------------------------------------------------------
Actually, looking and comparing with my 551, I think it's saying it's 'failing' for the unionfs package, which quirky April
doesn't use, it seems to install all the other files in the right src2pkg places, although the packages coreutils5.21b (8.22)
and tar1.13 (1.28 ) are older than April uses so don't know if that affects it also.

I shall have a go at a build and install with something simple this evening, (it's woodcutting season here at present) days are busy.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Thu 29 Jan 2015, 01:53    Post subject:  

Yeah, unionfs-fuse is optional. The rest looks alright. Don't worry about the coreutils and tar version -these tools get installed in to a 'proprietary' path away from your system tools where they are available to src2pkg. It uses the old coreutils version because their behavior is known and uses old tar for creating slackware-compatible packages.

It does say that the final src2pkg-helpers package installation is failing, though. If true, you may need to manually install it -it should be under /usr/src/src2pkg/src2pkg-helpers. But you can check to see if it is already installed by running 'which src2pkg'.
Back to top
View user's profile Send private message 
harii4


Joined: 30 Jan 2009
Posts: 449
Location: La Porte City, IA , U.S.A.

PostPosted: Thu 12 Nov 2015, 20:43    Post subject:  

Would src2pkg work with/on a raspberry pi (raspbian) ?
Or only on a full blown debian or puppy?

Might have to update to a newer puppy to use src2pkg-3.0 due to still using Tgz-pup.

_________________
3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
----------------------------------------------------------------------------------------
Peace and Justice are two sides of the same coin.
Back to top
View user's profile Send private message Visit poster's website 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Fri 13 Nov 2015, 02:39    Post subject:  

src2pkg will work anywhere you have enough development tools installed.
Back to top
View user's profile Send private message 
live

Joined: 10 Feb 2010
Posts: 220

PostPosted: Fri 22 Jul 2016, 09:18    Post subject:  

Hi,

On tahrpup64 with its devx, what do I need to compile 64bits pet?
By default it builds i486 pets

into "etc/src2pkg/src2pkg.conf", I tried to modify
Quote:
[[ $ARCH ]] || ARCH="m64"
[[ $MARCH_FLAG ]] || MARCH_FLAG="m64"


And ran
Code:
src2pkg -CWD -PET --arch=m64 <source tar>


But it fails

Thanks
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 4 [51 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.0594s ][ Queries: 14 (0.0071s) ][ GZIP on ]