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-10-2008, 01:18 PM   #1
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
New src2pkg bug-fix version


Just uploaded a new bug-fix version of src2pkg which addresses a few problems that have shown up lately.

A couple of minor features have been added, like automatic handling of conf files in the etc directory. If src2pkg finds conf files it will automatically rename them with the .new prefix and add lines to the doinst.sh file to have them configured when the package is installed.

Automatic handling of patches -no matter which -p? option they use -no more having to rename your pacthes if they use something other than -p1. Just place patches in the same directory with the sources and they will be applied for you.

Improved handling of make install rules -several people reported problems lately with this -some were very common erros, but other were more obscure. Seems to be fixed now...

Several changes to the routine which sets CFLAGS (and others) to accomodate athlon and other arches. Still evaluating the best compiler options to use...

Handle slack-suggests and slack-conflicts files if present.

DOCLIST can now include a whole subdirectory of documents.

Several other nagging things have been fixed.

You can get the new version (src2pkg-1.9.5) at the usual place:
http://distro.ibiblio.org/pub/linux/...nload/src2pkg/

Still trying to make sure and get all the minor bugs out so that I can release a really, really stable src2pkg-2.0. So please report any problems you have.

Gilbert
 
Old 02-10-2008, 04:42 PM   #2
jelaiwang
LQ Newbie
 
Registered: Nov 2006
Posts: 28

Rep: Reputation: 15
I had the opportunity to try src2pkg 1.9.5 today on a problem I reported earlier with building an HPLIP package using trackinstall (see http://www.linuxquestions.org/questi...estion-616648/).

Unfortunately, I'm getting the same error:

jelai@etoh:~/tmp/hplip-2.8.2$ trackinstall
Client or user supplied NAME and VERSION: hplip-2.8.2
Deleting old build files - Done
Creating working directories:
PKG_DIR=/tmp/hplip-2.8.2-pkg-1
Checking for 'install' rule -
NOTICE! No install rule in Makefile.
FAILED!
trackinstall FAILURE in GENERIC_INSTALL No executables found

Hope this helps.
 
Old 02-10-2008, 05:12 PM   #3
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Thanks, gnashley:-)
 
Old 02-10-2008, 10:04 PM   #4
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
I recently started trancoding video files to feed my D-Link DSM-520 Media Receiver. I had to install many new packages. Those packages that weren't available on SlackBuilds.org I built with src2pkg. All is well with the new packages created by src2pkg. Thanks gnashley!
 
Old 02-10-2008, 10:31 PM   #5
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
cheers gnashley! thanks for the great app!
 
Old 02-11-2008, 02:40 AM   #6
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
upgraded package

do i need to run
*
src2pkg --setup
*
after every upgrade?
 
Old 02-11-2008, 03:29 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
jelaiwang, thanks for reporting your problem. I had checked out the functionality of src2pkg a week or so ago, but on hplip-2.7.10, which worked okay.
I've just tried with the new hplip-2.8.2 and also had no problems.
Are you manually configuring and compiling first? If so, what options are you passing to configure? The only thing I can see that would be causing this problem is that you are not pre-configuring and compiling the application first.

Is there a particular reason for not using the src2pkg program, instead of using trackinstall?

I seem to have no problems here creating packages of either version when using:
simply 'src2pkg hplip-2.8.2.tar.gz'

Still, the standard SlackBuild for hplip passes a few arguments to configure and also includes a couple of tweaks for the udev rules which should be included in the build.

You'll probably get the best results by including these tweaks and extra options. Below is a src2pkg script for hplip which includes them. Create an empty file in the same directory as the hplip tarball, named 'hplip.src2pkg'. Then paste the contents of the script below into the file and save it. You can then run the build with the command 'src2pkg -X'

Code:
#!/bin/bash
## src2pkg script for: 	hplip
## src2pkg Copyright 2005-2008 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='hplip-2.8.2.tar.gz'
NAME='hplip'
VERSION='2.8.2'
ARCH='i486'
BUILD='1'
PRE_FIX='usr'
# Any extra options go here
EXTRA_CONFIGS='--sysconfdir=/etc --localstatedir=/var \
  --disable-xml-install --enable-foomatic-ppd-install \
  --with-hpppddir=/usr/share/cups/model/HP \
  --enable-network-build=yes'
  
# 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

# from the SlackBuild by Robby Workman  (http://rlworkman.net):
# Fix group and permissions in udev rules file
sed -i -e 's/\(OWNER=\)"lp".*\(GROUP="lp",\).\(MODE=\).*/\1"root", \2 \3"0660"/' \
	$PKG_DIR/etc/udev/rules.d/55-hpmud.rules

# Fix udev rules for current versions of udev
sed -i 's/SYSFS/ATTR/g' $PKG_DIR/etc/udev/rules.d/55-hpmud.rules

# No thanks, we don't replace/add files which are part of other packages
rm -rf $PKG_DIR/etc/sane.d

fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process

# src2pkg - Copyright 2005-2008  Gilbert Ashley <amigo@ibiblio.org>
## See the documentation for more help and examples. Below are some of
# the most common Extras and Options for easy cut-and-paste use.
# EXTRA_CONFIGS='' PRE_FIX='' DOCLIST=''
# MAKE_COMMAND='' INSTALL_LINE='' 
# SHELL_INSTALL='YES' CORRECT_PERMS='NO'
# When editing src2pkg scripts to add custom code, use these variables
# to refer to the current directory, the sources or the package tree:
# $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree)

Last edited by gnashley; 02-11-2008 at 11:54 AM.
 
Old 02-11-2008, 12:02 PM   #8
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
rkrishna, yes you have to run 'src2pkg --setup' after each upgrade, at least until I figure out a better way to provide upgrades. Upgrading removes the old package, and it removes the libraries and tar program which are compiled on your system when you run '--setup'. I'm considering other ways to handle upgrading which may make this easier. You may not have installed the one or two versions where I was letting you do this compiling during the installation of the package. That was a little easier, but it just doesn't seem to fit right on a Slackware system compiling something as part of package installation.

I'm looking at ways to make it possible to do online upgrades without having to uninstall and then reinstall or use upgradepkg.
Also, I'm working towards having a very stable 2.0 version which most users could stick with for a while without the need to upgrade until the next stable release.
The current cycle of frequent updates is unfortunate, but necessary because of having added som much code after src2pkg-1.6 which is still being debugged. Sorry for the inconvenience...
 
Old 02-12-2008, 01:55 AM   #9
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
Quote:
rkrishna, yes you have to run 'src2pkg --setup' after each upgrade, at least until I figure out a better way to provide upgrades.
anyway i did the setup

it will be nice if there is a changelog aswellas a readme
 
Old 02-12-2008, 02:22 PM   #10
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by rkrishna View Post
anyway i did the setup

it will be nice if there is a changelog aswellas a readme
I agree. Apart from that: src2pkg was on top my wishlist for the next Slackware release. Now it is above the list. ;-)

gargamel
 
Old 02-13-2008, 01:24 AM   #11
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
There is always a ChangeLog in /usr/doc/src2pkg-x.x.x and there is always a copy on the website here:
http://distro.ibiblio.org/pub/linux/...2pkg/ChangeLog
 
Old 02-16-2008, 04:43 PM   #12
jelaiwang
LQ Newbie
 
Registered: Nov 2006
Posts: 28

Rep: Reputation: 15
Quote:
Originally Posted by gnashley View Post
jelaiwang, thanks for reporting your problem. I had checked out the functionality of src2pkg a week or so ago, but on hplip-2.7.10, which worked okay.
I've just tried with the new hplip-2.8.2 and also had no problems.
Are you manually configuring and compiling first? If so, what options are you passing to configure? The only thing I can see that would be causing this problem is that you are not pre-configuring and compiling the application first.
gnashley, I appreciate the thorough (and helpful response). Yes, I'm an old checkinstall user, so for packages where I need to pass lots of configure options, I use trackinstall like I would have used checkinstall.

Quote:
Is there a particular reason for not using the src2pkg program, instead of using trackinstall?
Not really, I didn't know about src2pkg -N and -X. I tried it for hplip, using the EXTRA_OPTIONS variable to pass in the configure options and it worked! I really like this method better, less prone to human error for repeated builds if I save the src2pkg.auto script.

However, I still get the same error message from trackinstall 1.9.5 when I manually configure, make, and trackinstall. Here are the options I'm passing (in case it might help you debug):

Code:
./configure --enable-network-build --disable-pp-build --disable-fax-build --disable-gui-build 
--disable-scan-build --enable-doc-build --enable-foomatic-ppd-install 
--disable-foomatic-drv-install --with-hpppddir=/usr/share/ppd/HP --disable-hpijs-only-build 
--prefix=/usr
I can't think of a situation where I would need to run trackinstall in this way now, but this may still be a legit bug.

Quote:
Still, the standard SlackBuild for hplip passes a few arguments to configure and also includes a couple of tweaks for the udev rules which should be included in the build.
I appreciate your telling me about this. I don't know much about SlackBuilds or what those extra lines mean (yet), but I'll look into it.

Many thanks for your support and for making src2pkg!
 
Old 02-17-2008, 02:11 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Original Poster
Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
I am unable to reproduce the failure here when using trackinstall, but I ma past version 1.9.5. The last few versions have had problems with a routine which checks for a valid 'make install' rule. I've tried several ways of doing this -some of which seemed to be working okay, and then someone would report problems with a ceratin package. I released pretty quickly two or three times trying to address this problem. Hopefully it is fixed by now...
Thanks for reporting the problem -I almost never use the 'trackinstall' utility so it is always possible that something I've done and tested with src2pkg may fail with trackinstall -but not usually as they use the same functions -trackinstall just doesn't call all of them.

You mentioned the -N and -X options -you might also look at using the -A option instead of -N. The -N option writes a script without doing anything. The -A option writes the script *after* the build, so it is able to include extra code, sometimes, based on what was actually done during the build. Also, the -A option enables extra features which can find description info and/or configuration options in rpm *.spec files or debian control/rules files when they are present. This can, at least, save you having to write or edit slack-desc files many times.
 
Old 01-07-2010, 09:36 PM   #14
wootletootle
Member
 
Registered: Jul 2002
Location: New Zealand
Distribution: slackware
Posts: 81

Rep: Reputation: 15
trackinstall failure

I have a problem similar to that described by jelai wang above.
I am using src2pkg v.2.0 with Slack 13.0 running kernel 2.6.29.6

In the past I used trackinstall to run 'make install' after configuration and compilation (using a makefile). Here's an example
of what happens when I use the current trackinstall that comes bundled
with src2pkg:

bash-3.1# trackinstall -i="make -i install"
Client or user supplied NAME and VERSION: glib-2.22.0
Deleting old build files - Done
Creating working directories:
PKG_DIR=/tmp/glib-2.22.0-i486-1
SRC_DIR=/usr/local/src/glib-2.22.0
Checking for Makefile rule: 'install' Okay
Creating content in JAIL root - Using: 'make -i install'
FATAL! Running 'make -i install' has failed with error: 1
Try using INSTALL_LINE 'make -i install' Exiting...
FAILED!! Creation of package glib-2.22.0-i486-1 has failed.
trackinstall ERROR in make_install in: install_to_jail_root

Running the stand-alone command 'make install' succeeds, but I
want to create a package so that the installation paths are
all properly recorded and a suitable entry is made in the pkgtool
database.

The same problem occurs with all the programs I have tried to
install in this fashion. Can someone suggest how I might properly
use trackinstall, or suggest another utility which does the same
thing (builds a slackpack).

Thanks for your suggestions....
 
Old 01-07-2010, 11:48 PM   #15
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,682

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Thanks gnashley, Keep up the great work!

lol, I didn't see the date... this is an old thread, but still src2pkg is the best.

Last edited by Daedra; 01-07-2010 at 11:58 PM.
 
  


Reply

Tags
hplip, src2pkg



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 bug-fix version gnashley Slackware 7 03-19-2008 06:22 PM
Bug Fix Ctp. Obvious Linux - Newbie 5 08-02-2004 06:58 AM
Bug fix update for 10.0 akihandyman Mandriva 3 07-14-2004 04:13 PM
Mandrake 9.2 Memory bug Fix lex0429 Mandriva 1 09-26-2003 06:44 PM
bug in RPM, but how to fix? bearcatsandor Linux - Software 2 12-06-2001 06:34 PM

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

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