SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Lufbery you are correct that this is not needed: "-i='sh ./install.sh'"
I added these just to simplify the name and version(should have been 9.24)
-n=opera -v=9.25
The -REAL tells src2pkg to use the 'old way' of installing by writing files to the real root '/' directory. DESTDIR and JAIL will both fail for packaging opera and each will sometimes fail when building other packages. Packages like opera that use an install script -especially inetractive ones are pretty hard to track since they take some input, then output some files, then take more input, etc. It's a wonder that they work at all -I was surprised when I found that they do work sometimes. src2pkg-1.6 always used what is now called the 'REAL' method. Versions 1.7 and later introduce other optional ways of creating package content -the DESTDIR (or just DEST) method which works just like most build scripts (SlackBuilds) in that it uses 'make DESTDIR=$PKG_DIR install' and the 'JAIL' method which does the same thing except it works (sometimes) even when DESTDIR is not supported by the source Makefiles.
The "-S" switch automatically caught the install.sh script. Why are these additional switches needed?
Code:
-i='sh ./install.sh' -n=opera -v=9.25 -REAL
-REAL tells src2pkg use REAL install mode.
-n=opera -v=9.25 ensures that the name and version number are correct. The archive is a weird filename and it isn't immediately obvious what src2pkg will do. Better to state explicitly what you want than allow room for error. Same for -i='sh ./install.sh'.
Now about php, it seems like it may be installing some files and then carrying out further operations on them or using them to process other files in the sources. Try building using the -REAL option (as root).
Thanks gnashley, that did the trick.
I'm still going through my other packages (without -REAL and no problems so far). If there's anything helpful I can add, I'll post it here.
gnashley, I recently install src2pkg 1.8-i486_K26.tgz. I am new to installing and uninstalling software, could you please tell me howto get a clean uninstall instead of having to upgrade any old src2pkg files as mentioned?
Lubery, could you please post how you installed scribus? Been googling and have seen a few posts referring to scribus install problems. What version of Scribus can I install on Slackware12's, PIII 600e, 640mb ram, ATI agp 32mb? Thanks all
NightSky, as AlienHominid said upgrading is usually as simple as using removepkg to remove the old version and installpkg to install the new one. But, I think you may be referring to me mentioning upgrading the src2pkg.conf file, so I'll explain that.
src2pkg has a configuration file which installs as /etc/src2pkg/src2pkg.conf. This file is not needed for src2pkg to work, but it can be used to setup certain preferences or other options for your system. Occassionally new options are added to src2pkg or syntax for some option changes, so if you are using this file then it should be updated to use the new one which comes with the new version. If you have not made any changes to the file in the first place, then you are not using it and you don't need to change anything.
If you have made changes then you'll need to update it.
Now, this src2pkg.conf is handled in the same way as many other configuration files for other Slackware packages. This 'handling' means that when you uninstall the package the configuration files are not removed. And if you install a more recent version the old configuration file is not overwritten. This is so that *if* you have edited the config file and made changes they will not be clobbered when you install the new version. This is accomplished by 'shuffling' the configuration files with a different name. When you first install a package that uses these conf files, there is no config file present. When installation is finished you will see the config file with its' real name. But, if you list the contents of the package or unpack it using explodepkg, you'll see that the config file has a different name with a '.new' suffix -in the case of src2pkg the file is named /setc/src2pkg/src2pkg.conf.new.
What happens is that when you install the package, the doinst.sh script looks to see if there is already a config file present. If not, the src2pkg.conf.new file is renamed to simply strc2pkg.conf. If a src2pkg.conf file *is* already present the the new one is left unchanged so you have the original src2pkg.conf file and a src2pkg.conf.new file. To upgrade the config file simply means to get rid of the original (old) one and rename the new one to its' real name, or if you have made changes to the original config file, you copy those changes over to the new one before removing the old one and renaming the new one without the '.new' suffix.
Hoepfully that is somewhat clearer than mud... It sounds complex, but this is the way that config files are handled in all slackware packages which use them.
If you have made no changes to your src2pkg.conf file you can safely ignore upgrading it.
Hi Alien Hominid, what does gnashley mean by this:
Quote:
be sure to upgrade your /etc/src2pkg/src2pkg.conf file after installing the new package. Please remove any previous versions of src2pkg that you have installed before installing the new package.
Was looking at SlackBuilds.org It says the slackbuild does not include source does that mean scribus.tar.gz.asc is the package minus source code and do I really need the source code if I am not a developer? Or is scribus.tar.gz just the slackbuild script and therefore I need the source code? What does .asc mean? Do you think I download the source and try building the package with the script or src2pkg? Thanks
A slackbuild is a list of instructions on how to build something, from the source code.
src2pkg is a tool to help make the instruction list and can provide (on request, use -N or -A) that instruction list as a file.
There are many reasons you might want to use src2pkg over a slackbuild, but if you're new to this, I would recommend starting with the slackbuild for the result you want (a scribus package). If I've misunderstood in anyway, please accept my apologies and rest assured that no offence was intended!
scribus.tar.gz is a tar gzipped archive that contains the slackbuild and any extra bits necessary to make the working package (patches, init scripts) as well as the prerequisite description file, so you are correct, you will need the code *in addition* to this. The .asc is ... well, they tell you in the FAQ =) http://slackbuilds.org/faq/#asc
Having said all of that, no reason why you can't build scribus with src2pkg! Infact, if you're interested in package-building (or just plain curious) then give it a bash and compare the results. Maybe you want to port the slackbuild into a src2pkg script ... that'd be a nice project for a rainy afternoon =)
gnashley, basically since I did nothing to the old src2pkg.conf file, I can just removepkg src2pkg-1.7 then manually delete the /etc/src2pkg.conf file so when I install new src2pkg its src2pkg.conf file installs normally?
Good info though now I know where conf files for pkgs go. I have an instruction folder for you. Thanks much LOL
piete, thank you no offense in your tone I used src2pkg to build a bjcups for an old printer, it worked well, there were related pkgs that failed to compile because it asked for configuration options and I had no clue. I know nothing about configuration and less regarding scripts, having no conceptual reference point for all the technical nuances.
Your input, as well as, gnashley and others here is not wasted, all the pieces will come together and its exciting.
I am reading, as fast as, I can and will continue to try new process here.
Last edited by NightSky; 01-15-2008 at 04:05 AM.
Reason: piete
"removepkg src2pkg-1.7 then manually delete the /etc/src2pkg.conf file so when I install new src2pkg its src2pkg.conf file installs normally" -that's correct.
Building scribus is pretty simple -the SlackBuild doesn't really have anything special in it except the configure option '--enable-scribus'. Otherwise it is a completely routine build.
Still, I'll make this really simple for you. Just create a blank file called scribus.src2pkg and paste the following into the file and then save it in a directory where you can read and write. Then make sure you are online, cd into the directory where the script is and issue the command:
'src2pkg -X'
This will download the sources and do all the compilinf and packaging for you. The finished package will be /tmp/scribus-1.3.3.9-i486-1.tgz
Code:
#!/bin/bash
## src2pkg script for: scribus
## src2pkg Copyright 2005-2007 Gilbert Ashley <amigo@ibilio.org>
SOURCE_URL='http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/Applications/Editors/scribus-1.3.3.9/scribus-1.3.3.9.tar.bz2'
SOURCE_NAME='scribus-1.3.3.9.tar.bz2'
NAME='scribus'
VERSION='1.3.3.9'
ARCH='i486'
BUILD='1'
PRE_FIX='usr'
# Any extra options go here
EXTRA_CONFIGS='--sysconfdir=/etc --localstatedir=/var --enable-cairo'
# STD_FLAGS='-O2 -march=i486 -mtune=i686'
# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;
# do_all_processes can substitute these 16 steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms
configure_source
compile_source
fake_install
fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process
# src2pkg - Copyright 2005-2007 Gilbert Ashley <amigo@ibiblio.org>
I've built Scribus 1.3.3.9, 1.3.4, and most recently 1.3.3.11 without any special options using various recent versions of src2pkg. My latest build, I'm pretty sure I simply ran (using src2pkg 1.9):
Code:
src2pkg -VV -C -W NAME_OF_SCRIBUS_SOURCE_FILE
I ran Scribus from within the directory where I downloaded the source file. The -VV option show verbose output, the -C option puts the completed package in the current directory, and the -W version wipes off the temporary files used to make the package.
I'm pretty sure this is what Gilbert means when he says that Scribus doesn't require anything special.
Yeah, the only thing in the SlackBuild that is any different is the '--enable-cairo' option which is optional.
These other two options (--sysconfdir=/etc --localstatedir=/var) are very standard ones which are sometimes needed to ensure correct placement of config and lock files. Most SlackBuild scripts include these options even when they are not needed. src2pkg does not use them by default because that would break more builds than it fixes.
Wow... I just came back let you know, figured you meant rm old src2.conf so i did and installed new src2pkg last night or this morning. LOL
What a surprise!!! You guys are real Princes, your kindness is an oasis, sincerely. My concerns: I read scribus required qt4 and above, don't think i have that? From browsing my files I only see qt1 and qt2. I run xfce was not able to enable xf86misc extensions - composite, will try again before installing scribus (have all the docs just don't want to make a mess I can't cleanup. How do you guys get your install output to post for problem solving? Will follow your instructions above.... Thank you so much
I've just been trying to install gnumeric until defeated by the upteen gnome libs that it depends on so I have given up on it for now, but, while I was deleting dirs and packages from /tmp/ I had an idea: Could there be an option to clean up src and pkg dirs after a successful build? It would save a lot of extra work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.