LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   src2pkg 1.9.3, trackinstall, and hplip 2.7.12 question (https://www.linuxquestions.org/questions/slackware-14/src2pkg-1-9-3-trackinstall-and-hplip-2-7-12-question-616648/)

jelaiwang 01-27-2008 01:43 PM

src2pkg 1.9.3, trackinstall, and hplip 2.7.12 question
 
I'm using src2pkg to create a package for hplip (http://hplip.sourceforge.net/). I had been using src2pkg 1.8 successfully. I run configure myself (there are some complicated options) and make too. Then I run trackinstall. The package is built as expected.

However, in src2pkg 1.9.3, which I downloaded to try today just for giggles, gives me the following error message:

Code:

jelai@gim:~/src/hplip-2.7.12$ trackinstall -W
Client or user supplied NAME and VERSION: hplip-2.7.12
Deleting build directories - PKG_DIR Done
Creating working directories:
  PKG_DIR=/tmp/hplip-2.7.12-pkg-1
grep: Makefile: No such file or directory
NOTICE! No install rule in Makefile.
FAILED!
trackinstall FAILURE in GENERIC_INSTALL No executables found

The Makefile is there, and there is an install rule:

Code:

jelai@gim:~/src/hplip-2.7.12$ grep "install:" Makefile
          || { echo "ERROR: files left after uninstall:" ; \
install: install-am
uninstall: uninstall-am

I tried manually specifying the command like so:

Code:

jelai@gim:~/src/hplip-2.7.12$ trackinstall -W -i='make install'
Client or user supplied NAME and VERSION: hplip-2.7.12
Deleting build directories - PKG_DIR Done
Creating working directories:
  PKG_DIR=/tmp/hplip-2.7.12-pkg-1
grep: Makefile: No such file or directory
NOTICE! No install rule in Makefile.
FAILED!
trackinstall FAILURE in GENERIC_INSTALL No executables found

Same error. The trackinstall script that comes with src2pkg 1.8 does not exhibit the same behavior.

Bug? I'm not sure because I'm not great at bash shell scripting and while I have used src2pkg successfully in the past, I'm no expert user. Can anyone reproduce this?

Shingoshi 01-28-2008 06:42 PM

I am also waiting to see a response to this question.
 
As I often get the same complaint about GENERIC_INSTALL. And this was the only link on the web for "generic_install src2pkg". So I don't know where else to get info, except here.

Shingoshi

tuxdev 01-28-2008 07:20 PM

The problem is at 08-fake_install:52
Instead of
Code:

      if [[ $(grep  install: $MAKEFILE) ]] ; then
try
Code:

      if [[ $(grep  install: $OBJ_DIR/$MAKEFILE) ]] ; then

Shingoshi 01-29-2008 12:59 PM

Quote:

Originally Posted by tuxdev (Post 3038238)
The problem is at 08-fake_install:52
Instead of
Code:

      if [[ $(grep  install: $MAKEFILE) ]] ; then
try
Code:

      if [[ $(grep  install: $OBJ_DIR/$MAKEFILE) ]] ; then

Thank you for the help. Ok, so I found the line in FUNCTIONS (inside the package itself). However, I found that somehow, most of the files that should have been in /usr/libexec/src2pkg, were actually missing! Don't have any idea how I managed to do that, but I must have accidentally deleted them. So I'm glad I checked in here, or I would have never noticed it. All of the scripts which the FUNCTIONS file was supposed to point to, were gone.

Now here's something that's curious. I had just started using the USE_OBJ_DIR (after trying to compile glibc) by default in my /etc/src2pkg.conf. But then I went to compile Slang (or something else), and found it wouldn't accept configuring in another directory other than the SRC. So I switched back to normal. So my question here is whether I should use an OR statement for the code you have given. So that src2pkg will look in either of the two directories, SRC or OBJ. Where the code would look like this instead:

if [[ $(grep install: MAKEFILE)] || [ $(grep install: $OBJ_DIR/$MAKEFILE) ]]

That's if I wrote it correctly?

Shingoshi

tuxdev 01-29-2008 01:45 PM

Shingoshi, try reinstalling/upgrading src2pkg, it sounds like you have an old version from before gnashley modularized it into separate files. OBJ_DIR refers to where the configurator puts generated Makefiles, so the or is unnecessary. If the package doesn't use a configurator (e.g. straight Makefiles), OBJ_DIR and SRC_DIR are the same anyway.

gnashley 01-30-2008 09:47 AM

I'm just back from 2 weeks vacation. I'll try to address the question better within 24 hours. For starters, using the USE_OBJECT_DIR option will only work with some sources. Many sources can't use a separate directory for the object files at all, and some require the object dir to be in a specific location -meaning either they must be in a subdirectory of the sources or *not* a subdirectory of the sources. The option provides a subdirectory outside of the source directory so it will work with sources that need it that way or don't care. But, as stated, the majority of sources will not work at ll with a separate object dir.

Inuit-Uprising 01-30-2008 10:16 AM

I had the same problem and I got around it by editing my /etc/src2pkg/src2pkg.conf to read:
Code:

# Sources are unpacked and built in /tmp
 SRC_BUILDS_DIR="$CWD"
# The package build tree is also in /tmp
 PKG_BUILDS_DIR="$CWD"

I don't know if this is a good idea or not, but it has worked so far.

jelaiwang 01-31-2008 08:33 PM

I'm probably being obtuse, but is the reason I had a problem with src2pkg 1.9.3 and not 1.8 that:

(1) I'm using src2pkg wrong and need to do something different (e.g. passing in different switches, use different settings in src2pkg.conf, etc.).
(2) There is a bug in src2pkg and I'm using it right.
(3) Both.
(4) Neither??

Just want to make sure I understand what's going on before I make any edits.

:-)

gnashley 02-01-2008 03:47 AM

It's a bug in 1.9.3. You are using it correctly, although it is usually best to use src2pkg instead of trackinstall. I'll be uploading a fix for the currently-known bugs in a day or so. I have quite a back-log of e-mails to work through and a couple of bug reports which point to the same problem you are having.
Editing as suggested yhould fix your problem meanwhile. Thanks for being patient.

jelaiwang 02-01-2008 11:16 PM

gnashley, no worries, I'm clear now on the above problem and I should be thanking *you* for writing src2pkg and your diligent effort to improve it. In the meantime, I'll keep testing and giving feedback. Thank you and keep going!


All times are GMT -5. The time now is 08:32 PM.