LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   New problem with src2pkg (https://www.linuxquestions.org/questions/slackware-14/new-problem-with-src2pkg-582537/)

browser 09-05-2007 10:05 PM

New problem with src2pkg
 
Hi, I came accross that great package called "src2pkf" & everything was going beuatifully converting my TarBalls untill all of a sudden I now get this error when I try and convert any kind of package & I am not sure why or what it means, I have tried searching the web etc & either can't find an answer or I just don't understand it.
AnyWay I now get this error & was hoping someone could explain what it means & what I have to do.= "FAILED!! No INSTALL_LINE given."

bash-3.1# src2pkg -C '/media/Slack12d4/source/n/samba/samba-3.0.25b.tar.bz2'
Found source archive: samba-3.0.25b.tar.bz2
Creating working directories:
PKG_DIR=/tmp/samba-3.0.25b-pkg-1
SRC_DIR=/tmp/samba-3.0.25b-src-1
Unpacking source archive - Done
Correcting source permissions - Done
Checking for patches - None found
Skipping configure_source -
Skipping compile_source -
FAILED!! No INSTALL_LINE given.
bash-3.1#

Thanks,Much Appreciated.

lostnhell 09-05-2007 10:39 PM

It looks to me like the configuration for the application must have the installation directory parameters.

But I would like to know why you are not using the samba tgz package from www.slackware.com? The current Slackware package is the same version as the one you are installating.

browser 09-06-2007 03:35 AM

yeh your right, i was mainly just giving an example,
Could you possibly or anyone else give an example of "putting installation directory parameters" in use as I didnt have this problem at first but now seems to happen no matter which tarball I try, It all seemed so simple at first.But am willing to learn.
Anyway

lostnhell 09-06-2007 06:53 AM

You can check the man pages for the application for a complete set of options, but the option you are looking for is:

-p Set the installation prefix [-p=/usr/local] (PRE_FIX='').

So you may want to try
src2pkg -p=/usr/local/ -C '/media/Slack12d4/source/n/samba/samba-3.0.25b.tar.bz2'

gnashley 09-06-2007 07:22 AM

The INSTALL_LINE is not really the problem -it's just that src2pkg doesn't exit until that point -you can see that it's skipping both configuration and compilation before that which means something is wrong.

I downloaded the sources to have a look -although the current version is 3.0.25c I'm sure the results would be the same. The problem is that there are no configuration files or Makefiles in the top directory. Configuration is done from within a subdirectory 'source'. src2pkg can sometimes find these, depending on the name of the subdir, but 'source' is not currently in the list of specifc names to check(I'll add it in the next release, though).

Anyway, src2pkg includes a seldom-used option so that you can specify the subdir when it can't find it alone.
Use:
src2pkg -s=source -C /media/Slack12d4/source/n/samba/samba-3.0.25b.tar.bz2

You say with "any kind of package". Are you having trouble with other sources also?

browser 09-06-2007 07:35 AM

Thanks for that, I should be right now, the other reason I used the tar.gz for samba was to get some use out of the 4 left over disks I downloaded to install Slack 12 plus I was getting great Joy from this tool & want to use it when need it. I cant believe I forgot about the Man pages,I usually always check there .
Thanks Again ,much appreciated

dennisk 09-06-2007 10:54 AM

I was tempted to comment when I saw your other thread on src2pkg. With plenty of sites offering packages for Slackware, with checkinstall and www.slackbuilds.org, with all the packages that come with Slackware I have to wonder what appeal src2pkg has.

Now, I've never used the program and know nothing about it, but my first questions would be, how good a Slackware package does it produce? Why would I want to use it if there was a slackbuild script or a precompiled package from a reliable source, is the package it's building compatible with the other packages in Slackware? There are so many details!

One of the reasons we use a reliable distro like Slackware instead of build from scratch is that the maintainer (PV) has taken care of all these messy details for us and produced a distro that works out of the box with the widest range of hardware.

If you find the program truely useful and become a real wizard with it, perhaps you could add a page to the Slackware Wiki for us muggles. :)

Dennisk

gnashley 09-06-2007 11:55 AM

That's a pretty obscure case browser and you might not have figured it out from the man-page anyway.

dennisk I'll agree wholeheartedly that if there is an offical Slackware build there should be no need to rebuild or use other packages (unless the official package is not correct, which does happen sometimes.

If you feel okay recommending checkinstall, then fine. The very first goals of src2pkg were to correct some problems with checkinstall, build better packages and do a more complete job of ensuring build-repeatability.
You really should try src2pkg, though, before doubting it and study the code for it along with that of the checkinstall and slackpkg. You'll quickly see that src2pkg does a much more thorough job wth less chance of trashing your system, no need to touch every file on your system, etc, etc. You may also realize that it is a truly unique program which is smarter than any other build system out there. Some users even use it to correct packages they have built with a regular build script. src2pkg was written especially for producing the highest quality, most Slack-conformant packages possible with the least input.

At the least src2pkg includes a superior replacement for checkinstall which works the same way. src2pkg is already bash-3.2 compatible and has no breakage with recent versions coreutils either, as does checkinstall. It also provides a superior replacement for the rpm2tgz tool provided with slackware which avoids system breakage when people use it install binary/noarch rpm's with bad perms. It will also do the same sort of conversion of debian binary/noarch packages. It also provides a superior replacement for rpm2cpio.

Folks who are learning to script or pride themselves on crafting and debugging build scripts don't like the idea of src2pkg because it makes things too easy. My hat is off to rworkman and AlienBob who write excellent scripts. I often use their experience with specific packages to figure out what is needed to create a correct and complete package of the software. And I've used a line/idea or two from their scripts for enhancing the capabilities of src2pkg. To my eye, their scripts are usually more complete than Pat's own scripts.
If you think the Slackware philosophy means 'do things the hard way' then you won't like src2pkg. But, if you think that philosphy includes 'just works' then you'll be surprised and pleased at how well src2pkg does that. If you are serious about making excellent packages (especially lots of them) then src2pkg is a valuable tool which will allow you to concentrate on the really 'sticky' and obscure aspects of creating the perfect package for a given software -I mean stuff which is not repetitive and really unique to that package.

dennisk 09-06-2007 12:19 PM

Quote:

You really should try src2pkg, though, before doubting it and study the code for it along with that of the checkinstall and slackpkg. You'll quickly see that src2pkg does a much more thorough job wth less chance of trashing your system, no need to touch every file on your system, etc, etc. You may also realize that it is a truly unique program which is smarter than any other build system out there.
Gnashley,

Thanks for the comments. I'll definitely put src2pkg on my radar screen.

Quote:

If you think the Slackware philosophy means 'do things the hard way'
As an aside, I've been thinking (somewhat jokingly) of doing a wiki entry titled Managing Slackware Without The Command Line.

The idea comes from our monthly InstallFests where if I resort to configuring a noob's installation (any distro, doesn't matter) it's as if I've started practicing voodoo. Their eyes glaze and they are convinced they can never master Linux. So wherever possible I've been trying to show the GUI tool along with (or usually instead of) the command line.

I've surprised myself too. Discovering that "hidden" in KDE is a tool for configuring, say LILO or adding users and doing other tasks that I'd normally jump to a terminal for. It's nice that the KDE tools tread lightly on the system.

Dennisk

gnashley 09-06-2007 03:09 PM

I've collected a bunch of such tools from all over the place -preferring GTK-1.2 programs over GTK2, Qt, Gnome or python. I've managed to put together what's probably the largest selection ever found in a single place. Some of the programs have otherwise disappeared from the web or were very difficult to find.
I like gUserMan for managing users and groups. I have gtkfdisk(uses gparted libs but not gtkmm), glilo, gpasman, gvidm, gxset, xxkb, gato and other neat old stuff which works perfectly without extra bloat and dependencies. I even have something which I put together called RTFM! gtkkeyboard, lineakconfig, xbindkeys_config, pinentry, gxhost, gksu, gtklp, gtk-iptable, xwhois, gtk-knocker. Well I won't list anymore as they are many -src2pkg allows me to maintain over 600 programs so easily that I'm always looking for more t add to the collection. I haven't got tired yet of those magic last lines from src2pkg: "Package is located in..." and "Writing a build script for you..."

dennisk 09-06-2007 03:41 PM

Quote:

I haven't got tired yet of those magic last lines from src2pkg: "Package is located in..." and "Writing a build script for you..."
Sounds sweet!

Dennisk

Shingoshi 12-23-2007 06:14 PM

Quote:

Originally Posted by browser (Post 2883138)
Thanks for that, I should be right now, the other reason I used the tar.gz for samba was to get some use out of the 4 left over disks I downloaded to install Slack 12 plus I was getting great Joy from this tool & want to use it when need it. I cant believe I forgot about the Man pages,I usually always check there .
Thanks Again ,much appreciated

"I was getting great Joy from this tool & want to use it when (I) need it". Yeah, right! We want to use it, because it's ADDICTIVE!! Let's face it, anyone who build packages, has to be some sort of nut. And I am definitely one of the biggest nuts out there. Addictive? Should I tell everyone how many times I've fallen off my chair (dozing off) from hours of hypnotically watching lines of code stream over my monitor? Now granted, there are some who have very rational reasons for building their own programs (even I do sometimes). But I think many of us, just like doing it, and need had nothing to do with it.

So Gnashley is our dealer, and src2pkg is our drug!

Shingoshi

Shingoshi 12-23-2007 09:51 PM

Gnashley,
Would you please post a few examples of how the INSTALL_LINE should be written. It would likely help others from not having to ask the same question repeatedly. I too have come across it, and am not sure exactly how to implement it.

Thank you,
Shingoshi

gnashley 12-24-2007 02:14 AM

Okay, there are two common cases when you might need to give or change the INSTALL_LINE, which is the '-i' option when running from the command line.

The first case is this -some sources need for you to run more than one install command in order to fully install the software. For instance some sources need for you to run 'make install' and then 'make install_data'.
Since 'make' accepts multiple rules you can easily take care of this with this:
"src2pkg -i='make install install_data' source-name"

The other case where this option is useful is for sources which use some other sort of installation, such as running a script named 'install.sh'. In such a case you would use:
"src2pkg -i='sh install.sh'"
Actually, since the above is quite common, src2pkg handles it automatically by using the -S option. This tells src2pkg that the sources use a 'shell' install script and automatically changes the INSTALL_LINE command, though you can still use the -i option as above if the command happens to be something else. The -S option also does a couple of ineternal things which make these types of installs a little smoother -sometimes these scripts are interactive and the -S option ehlpy src2pkg prepare for that (If you are running in QUIET mode verbosity has to be temporarily enabled else you would not see the interactive prompts).
So the above could be just:
"src2pkg -S pkg-name"
or for another script name:
"src2pkg -S -i='sh Install' pkg-name"

I'll mention also that since you can also change the 'make' command you can handle sources which need for you to run:
'make'
'make dep'
'make install'
by using this line for the MAKE_COMMAND:

"src2pkg -m='make dep' pkg-name"

Or:
"src2pkg -i='make dep install'"

I'll also note that you can change the CONFIG_COMMAND in the same way, when the sources have the configure script with another name or command:

"src2pkg -c='configure Linux'"
or:

"src2pkg -c='Configure'"

Shingoshi 01-21-2008 08:36 AM

Quote:

Originally Posted by browser (Post 2883138)
Thanks for that, I should be right now, the other reason I used the tar.gz for samba was to get some use out of the 4 left over disks I downloaded to install Slack 12 plus I was getting great Joy from this tool & want to use it when need it. I cant believe I forgot about the Man pages,I usually always check there .
Thanks Again ,much appreciated

I have admitted my addiction to building packages here and elsewhere. So let me update. I just built a molecular software package (just for the fun of it) from http://emboss.sourceforge.net/. This is a large package. Roughly 20Mbs of source, and 14Mbs of application. Needless to say, it succeeded. The only problem I have now, is figuring out how to start it. ROFLOL!!!

It's one of those visualization apps I love so much. So I thought, "why not build this? Worked like a charm! Oh the addiction to streaming compilation text. And the larger, the better.

Gnashley, you just keep doing what you're doing, and ignore the naysayers.

Your friend,
Xavian-Anderson Macpherson
Shingoshi

If there were only something as simple as this for configuring and building a wife!


All times are GMT -5. The time now is 12:35 PM.