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 01-14-2008, 09:23 AM   #31
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612

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.
 
Old 01-14-2008, 09:54 AM   #32
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Quote:
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'.
 
Old 01-14-2008, 10:08 AM   #33
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Great information, guys. Thanks!

Regards,

-Drew
 
Old 01-14-2008, 01:39 PM   #34
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Quote:
Originally Posted by gnashley View Post
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.
 
Old 01-15-2008, 12:45 AM   #35
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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

Last edited by NightSky; 01-15-2008 at 01:02 AM.
 
Old 01-15-2008, 01:23 AM   #36
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
removepkg src2pkg
installpkg src2pkg-1.9-something.tgz
 
Old 01-15-2008, 02:52 AM   #37
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 01-15-2008, 02:53 AM   #38
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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
 
Old 01-15-2008, 03:31 AM   #39
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
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 =)

Good luck,
- Piete.
 
Old 01-15-2008, 03:47 AM   #40
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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
 
Old 01-15-2008, 08:10 AM   #41
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
"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>
 
Old 01-15-2008, 09:00 AM   #42
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
NightSky,

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.

Regards,

-Drew
 
Old 01-15-2008, 10:15 AM   #43
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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.
 
Old 01-15-2008, 02:38 PM   #44
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64- 5.15.2
Posts: 909

Rep: Reputation: 55
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

Last edited by NightSky; 01-15-2008 at 02:42 PM.
 
Old 01-15-2008, 08:26 PM   #45
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
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.

Just an idea. What do you think?
 
  


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
Next release? polarbear20000 Slackware 24 06-05-2007 03:19 PM
FC5 development release and FC5 official release- where is the DVD iso? smiley_lauf Fedora 11 03-13-2006 01:38 PM
SUSE Release 10 RC1 Release Candidate 1 available 1kyle SUSE / openSUSE 8 09-11-2005 06:26 PM
Release IP gordongraham Linux - Networking 4 06-23-2005 02:57 PM
Next release? vi0lat0r Slackware 14 04-06-2004 05:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:29 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
Open Source Consulting | Domain Registration