LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-17-2007, 03:59 PM   #16
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 32

Thanks for that Gnashley, I'm really not trying to be awkward, but I also tried firestarter (an iptables configurator (sic.))

It installs but on running gives:

Quote:
A proper configuration for Firestarter was not found. If you are running Firestarter from the directory you built it in, run 'make install-data-local' to install a configuration, or simply 'make install' to install the whole program.

Firestarter will now close.
A normal ./configure && make followed by checkinstall as root installs with no problems.
 
Old 02-18-2007, 12:29 AM   #17
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
try passing the install line like this '-i='make install install-data-local'
 
Old 02-26-2007, 10:49 AM   #18
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
I've got a packaging challenge: SML/NJ
 
Old 02-26-2007, 02:54 PM   #19
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
pbhj, did you try what I suggested?
 
Old 02-26-2007, 03:19 PM   #20
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
So tuxdev with another challenge. smlnj has its' own one-command installer which downloads, compiles and locally installs selected targets.
Creating a snapshot of the archives would make things easier, but src2pkg still makes it pretty easy so you can configure your targets and keep up-to-date
when there are changes to the main sources.
There are probably several ways to do this with src2pkg or trackinstall, but I chose the most straightforward method of commenting out the unneded steps and inserting manual code to handle the install script and copying files to the PKG_DIR. Since this is a compiler collection it also is best installed in its' own subdir, so I put it in /opt/smlnj and put a wrapper in /usr/bin for setting up the path, etc.

This serves as a good example of how flexibly you can use the src2pkg functions, so I'll include the full script here. Bear in mind that the smlnj installer downloads the tarballs, so you must be connect to the interenet when you run this script.

Script follows:
Code:
#!/bin/bash
## src2pkg script for: 	smlnj
## Auto-generated by src2pkg-1.1
## src2pkg Copyright 2006-2007 Gilbert Ashley <amigo@ibilio.org>

# SOURCE_NAME='config.tgz'
SOURCE_NAME='smlnj-110.60.tar.bz2'
NAME='smlnj'
VERSION='110.60'
ARCH='i486'
BUILD='1'
PRE_FIX='/opt/smlnj'
# Any extra options go here
# EXTRA_CONFIGS=''

# Get the functions and configs
source /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

# with src2pkg-1.1 you won't need this - it has AUTO_PATCH
cd $SRC_DIR && patch -p1 < $CWD/smlnj-targets.diff

cd $SRC_DIR ;

config/install.sh
mkdir -p $PKG_DIR/$PRE_FIX
cp -a $SRC_DIR/bin $SRC_DIR/lib $PKG_DIR/$PRE_FIX

# install the wrapper
mkdir -p $PKG_DIR/usr/bin
cp -a $CWD/Resources/SMLNJ $PKG_DIR/usr/bin
chmod 755 $PKG_DIR/usr/bin/SMLNJ

fix_pkg_perms
strip_bins
# create_docs
mkdir -p $PKG_DIR/usr/doc/$NAME-$VERSION
cp -a $CWD/Resources/* PKG_DIR/usr/doc/$NAME-$VERSION

compress_man_pages
make_description
make_doinst
make_package
post_process
I have uploaded sources and a minimal package here:
http://distro.ibiblio.org/pub/linux/.../smlnj-110.60/

I hope you(tuxdev) will verify that the wrapper works correctly
so I can be sure to fix the package if needed.
Don't expect to see handling for this as an auto-feature in src2pkg... But it has some nice code for handling url's and stuff which may find it's way into 'find_source' later.

If I were playing with this software, I believe I'd set up the sources in a project dir (with all the tarballs present to avoid re-downloading), then use trackinstall to make the package. Or, I'd create a snapshot tarball of all the sources and work from that.
 
Old 02-27-2007, 04:41 AM   #21
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by gnashley
I've tried to make src2pkg as dependable and trouble-free as possible when building as 'root' -note that SlackBuilds require you to be 'root' since makepkg itself requires it.
After you install little handy tool called fakeroot it's no more true and root is required to do installpkg only. There remain some extremly rare cases when configuration/build requires uid 0 privileges (hal comes to mind) but it's rather improperly written autotools scripts/makefiles then reasoned need. Works well with Pat's SlackBuilds too

Last edited by dunric; 02-27-2007 at 06:30 AM.
 
Old 02-27-2007, 10:40 AM   #22
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
At first glance, it appears that the package is okay, but I'm not really capable of verifying it. It might be a more generally useful package to not patch the target. I have a certain amount of trust in defaults.

It seems I need tla to analyze fakeroot properly. I know that tla has an unusual build system, so it's a nice (minor) challenge for src2pkg too.
 
Old 02-27-2007, 02:58 PM   #23
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I agree it's probably better to exclude the patch so the default targets get built(though it sound like MLRISC may not be needed. Anyway, I just trimmed the list for testing purposes to avoid re-downloading and waiting. I'm probably gonna repack the whole default set into a workable single snapshot tarball.

Dunric, I'm getting around to looking at fakeroot or something similar. If you are having good results with it, then I'll definitely give it a whirl, rigourously, and see.

The original limitation was imposed because of using makepkg to create the final tgz. That code has been intzernalized now and the root restriction could be eliminated if file ownerships and perms can be handled with fakeroot or other.
 
Old 03-02-2007, 05:45 PM   #24
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Just a quick note to say that dosbox 0.70 is out and src2pkg works just fine.

Thankyou

Samac
 
Old 03-03-2007, 01:49 AM   #25
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Thanks for the tip samac. I'll probably add dosbox to my repository.

Regarding, firestarter, I had no problems compiling or running it on my system.
 
Old 04-14-2007, 05:16 PM   #26
hoofer
LQ Newbie
 
Registered: Jun 2005
Location: Brazil
Distribution: Slackware, Slamd64
Posts: 28

Rep: Reputation: 16
Hey, gnashley, where can I get src2pkg?
The "amigolinux" folder at http://distro.ibiblio.org/ is gone.
 
Old 04-14-2007, 10:41 PM   #27
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Hmm, strange. www.amigolinux.org has also disappeared. Maybe ibiblio decided to pull the plug on it. Weird...

In the meantime, here has all the intel binary packages from the site, wgeted around November 22, 2006. src2pkg 1.0 is there too.
 
Old 04-15-2007, 07:39 AM   #28
hoofer
LQ Newbie
 
Registered: Jun 2005
Location: Brazil
Distribution: Slackware, Slamd64
Posts: 28

Rep: Reputation: 16
Thanks, I just couldn't find it anywhere.
 
Old 04-15-2007, 09:05 AM   #29
hoofer
LQ Newbie
 
Registered: Jun 2005
Location: Brazil
Distribution: Slackware, Slamd64
Posts: 28

Rep: Reputation: 16
Ok, I installed it, and it looks great, but I have a few questions.

I've never used build scripts before, so I'm a little confused. When I use the -A option it creates a script for me. How can I use this script in the future, when I'm building a new version of the same package, for instance? Is it for reference only or is there a way to tell src2pkg to use the same arguments?

Another thing, what's the correct way to make src2pkg always use some arguments (--arch, for example) every time? Should I put it in src2pkg.conf or create my own script with "src2pkg -a ...."?
 
Old 04-15-2007, 09:52 AM   #30
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
-A should create a Foo.src2pkg file, and you can rerun the script by doing ./Foo.src2pkg if it's executable. You might have to edit a few things like the version number for a new version of the package.

Yes, the best place for options you always use is in src2pkg.conf. For --arch though, that's one option you should probably not use on a regular basis.
 
  


Reply



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
smart package manager bad magic cpio error matticus SUSE / openSUSE 5 04-10-2012 10:41 AM
Using Partition Magic and Boot Magic to install Linux zathrus MEPIS 4 01-14-2006 08:24 PM
Partition Magic/Boot magic and Slackware. adam1835 Linux - Newbie 5 01-11-2006 11:46 AM
Can't get Age of Empires II: Age of Kings started (I've could it before !!!) vegetassj2 Linux - Games 44 08-28-2005 04:59 PM
Java does "age" or "Age" matter when declaring an Int?? Laptop2250 Programming 3 10-13-2003 12:34 PM

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

All times are GMT -5. The time now is 09:57 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