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.
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.
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.
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
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!
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)
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...
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):
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!
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.