LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-20-2011, 07:13 PM   #16
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 527
Blog Entries: 3

Rep: Reputation: 126Reputation: 126

Src2pkg is one of the first things I install whenever I install Slack. Thank you for the great tool!
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 08-11-2011, 07:07 AM   #17
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 630
Blog Entries: 2

Rep: Reputation: 96
I wonder if it would be possible for the next release of src2pkg to include an option to create a .Slackbuild instead of a package?
 
Old 08-11-2011, 08:40 AM   #18
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Rep: Reputation: 75
Is this really true? I mean, Im new to Slackware, and have intalled many times from source with ./configure;make;make install.

Is it true that src2pkg makes this automatically? And if I want to remove, I just removepkg <package>? OMG... OMG...

Thank you so much!

Hey, is not a joke right?
 
Old 08-11-2011, 10:01 AM   #19
solarfields
Member
 
Registered: Feb 2006
Location: Outer Shpongolia
Distribution: Slackware
Posts: 494

Rep: Reputation: 131Reputation: 131
it's true! it's true!
also it comes with a tool called trackinstall, which acts more or less like the good old checkinstall utility. But you most probably will just need to do

# src2pkg source-version.tar.gz

and voila -- you have a package in /tmp
 
Old 08-11-2011, 10:20 AM   #20
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Rep: Reputation: 75
I just downloaded and tested. Wow... Just wow. Exactly what I was looking for. No need to worry if I should save my "make" folder or not, often I just deleted the folder, and then when I need to uninstall I need to do it manually. Or rewrite with a new update.

Now, everything is on the same place /tmp. Perfect.

Thanks guys, Love Slackware, Fornicate Windows.

Last edited by XavierP; 08-12-2011 at 09:50 AM. Reason: Sanitised for your health, comfort and well-being
 
Old 08-11-2011, 01:11 PM   #21
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Yeah, it's no dream, but it's also no magic wand. There will always be some sources where you need to supply some special config options or turn on or off some feature of src2pkg to get it to do what you want. But, when using a recipe(*.src2pkg build script), you can do just like in SlackBuilds and simply insert manually-written lines of code or comment out any of the standard steps that src2pkg performs. You can also use to to convert packages between any of the supported package formats (excpet for converting *from* slitaz *.taz packages). And you can use it like gentoo's emerge by having src2pkg install the packages as you go.

@psionl0, that sounds like a good idea -but it's not a new idea. The trouble is that src2pkg is able to do what SlackBuilds cannot -it can track the files/dirs/links created (wherever they try to place themselves), and then put them in the 'right' place. For many packages built using a SlackBuild, you must code the installation manually to avoid doing 'bad' things. With src2pkg, it 'catches' the 'errors' automatically and fixes them for you. While AlienBob's SlackBuilds include the optional use of installwatch, src2pkg uses a forked version of installwatch (libsentry) by default, or some other method when even that doesn't work. To replicate that behaviour in a SlackBuild, you'd have to use installwatch by default and actually *do something* with the output and/or use one of the other 'safe' methods used by src2pkg, like chroot+unionfs-fuse. You can use the included tool 'sb2sp' to convert a SLackBuild to a *.src2pkg script, though... Or xou can use src2pkg to 'convert' your packages built from SlackBuilds to check them for any weirdness -just give package.txz as the source and have it convert it to package.tgz -it'll say something if it finds any problems -like unusual(possibly faulty) perms or ownerships, presence of questionable files or dirs -hidden files, your $HOME or anything like that.

solarfields mentioned trackinstall, which is indeed like checkinstall -without the drawbacks of checkinstall. But there is also another tool included called 'tracklist'. What it does is simply pass the 'make install' or other command to sentry(installwatch), without doing any of the many corrections which src2pkg famously does after package content is first created. But, unlike using installwatch (or even sentry directly), tracklist parses the logged output of libsentry and gives you a neat list of everything done by the commands you gave. Particularly, it will show not only dirs, files and links created, but will also show anything which was removed, renamed, chmodded or chowned -note well that the old installwatch will not detect these at all. You could use sentry instead of installwatch with SlackBuilds, by simply linking installwatch to sentry, but the standard scripts, as said, don't do anything at all with the logs generated. STill, doing so would give you a more complete list of what happens when the commands are run -I guess you could split the log-parser out of tracklist and use that to get a clearer picture of what happens.

I've built a whole distro using src2pkg scripts, so anything is possible.
 
3 members found this post helpful.
Old 08-12-2011, 05:53 AM   #22
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Rep: Reputation: 75
Im trying to build Mesa-7.11 driver package. However, I have some problems with src2pkg options.

I try to do this:

bash-4.1# src2pkg --config_command='./configure --with-dri-drivers=i965' -m='gmake' -i='gmake install' MesaLib-7.11.tar.gz

However, output shows that it takes only a part of my config_command like this:

Running user-specified CONFIG_COMMAND: ./configure --with-dri-drivers

Obviously, the most important one is missed, namely i965. Am I doing something wrong or is there a limit of config_command string?

*EDIT: So "=" symbol is ignored? Why? Gah,, what am I missing here...

Last edited by Bindestreck; 08-12-2011 at 06:06 AM.
 
Old 08-12-2011, 08:36 AM   #23
zbreaker
Member
 
Registered: Dec 2008
Location: New York
Distribution: Slack -current, #!, vsido
Posts: 228

Rep: Reputation: 29
Many thanks for a truly wonderful tool.
 
Old 08-12-2011, 02:50 PM   #24
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
eXpander_, I haven't seen that sort of error for awhile -a lnog time ago there was a problem with having extra '=' chars in there. But, you are overdoing it by using CONFIG_COMMAND anyway. The default CONFIG_COMMAND is './configure', but options and settings get added to that for final usage. You don't have a prefix in there, so you would wind up with /usr/local which you probably do not want. Whether you specify the CONFIG_COMMAND or not, src2pkg adds the default prefix '/usr' (or what the conf file/build-script says, and then adds EXTRA_CONFIGS after that.
So, what you really want is:
src2pkg -e='--with-dri-drivers=i965' -m='gmake' -i='gmake install' MesaLib-7.11.tar.gz
That way your prefix gets added in. Actually, since gmake is a link to make, you only need:
src2pkg -e='--with-dri-drivers=i965' MesaLib-7.11.tar.gz

Try that and see if it works. And I'll try and have a look whether something is wrong in that routine -you should be able to treat CONFIG_COMMAND just like INSTALL_LINE, where you get to specify the whole thing explicitly. But, it's better to only specify the parts needed -that is what is really needed to make the build 'tick'. Remember, you don't even need to specify --prefix as it will be added automatically. Also, --libdir will be added automatically, according to the ARCH you are building for. If on multi-lib x86_64 and you want to build a 32-bit package, use -M32 in your options -src2pkg will take care of all variables which need to be adjusted -including libdir, LDFLAGS and pkgconfig file locations.
 
Old 08-12-2011, 03:08 PM   #25
Bindestreck
Member
 
Registered: Jul 2011
Location: Sweden
Distribution: Slackware
Posts: 337

Rep: Reputation: 75
Ah, thanks for the tip. It worked now, with "-e" option.

Thanks again for your effort with src2pkg.


/eXpander_
 
Old 08-12-2011, 03:17 PM   #26
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,775

Original Poster
Rep: Reputation: 481Reputation: 481Reputation: 481Reputation: 481Reputation: 481
Take a good look at the text output just as configuring begins and you can see what all gets added in there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
src2pkg-2.2 is released gnashley Slackware 8 05-18-2010 02:45 PM
[Announce] src2pkg-1.9.7 release gnashley Slackware 11 01-31-2009 02:57 AM
New src2pkg release available for download -Introducing the src2pkg WIKI gnashley Slackware 11 05-06-2008 12:09 PM
src2pkg-1.7 released gnashley Slackware 23 12-25-2007 03:26 AM
src2pkg-1.6 released gnashley Slackware 32 11-17-2007 04:03 PM


All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration