LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-07-2008, 01:53 AM   #1
phru
LQ Newbie
 
Registered: Nov 2006
Location: Austria
Distribution: RHEL 4 | HP-UX
Posts: 20

Rep: Reputation: 0
Rebuild LPRng RPM


Hi all,

i'm trying to rebuild LPRng for RHEL 5 but i am always running into the same error:

config.status: creating po/Makefile.in
config.status: error: cannot find input file: po/Makefile.in.in
error: Bad exit status from /var/tmp/rpm-tmp.50971 (%build)

The command that i use is: rpmbuild -bb SPECS/LPRng.spec

I'm no really experienced in building RPMs. I would be glad, if anyone had a suggestion for me.

Thank you in advance.

Cheers

Last edited by phru; 01-07-2008 at 01:57 AM.
 
Old 01-07-2008, 03:44 AM   #2
btbx
Member
 
Registered: Jun 2007
Posts: 67

Rep: Reputation: 15
Wink

If possible, use LPRng RPM package for Fedora 3:

http://rpm.pbone.net/index.php3/stat....i386.rpm.html

If not, rebuild the package using src.rpm from the link on the webpage.

rpmbuild --rebuild <name of rpm>
 
Old 01-07-2008, 03:46 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Is this with the .spec file from the .src.rpm? Posting the URI where you got it from could help. If building an RPM doesn't work it's a good idea to loop through the commands manually. If './configure' doesn't find the po/Makefile.in then the tarball may be missing stuff.
 
Old 01-07-2008, 04:23 AM   #4
phru
LQ Newbie
 
Registered: Nov 2006
Location: Austria
Distribution: RHEL 4 | HP-UX
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you for your answers.

We have made some changes in the source code of the package and so it is not so easy to take another source package or version. I have a working binary rpm for RHEL 4. The problem is that i have a few new servers which are running under RHEL 5. So i wanted to rebuild the RPM on the new servers without luck.

I have taken over the topic from a colleague and so i have no idea what he has done when he had buit the initial rpm or why it is not working now.

I tried to do the steps manually.

The configure command is working well but when i try to run make the following error occurs:

Code:
if [ "UTILS" = po ] ; then \
            for i in po/Makefile* ; do \
                if [ -f "$i" ] ; then \
                    if grep '^mkinstalldirs.*=.*case' $i ; then \
                        echo "fixing broken $i which causes wrong path to mkinstalldirs to be used"; \
                        perl -spi -e 's:^mkinstalldirs\s*=\s*.*:mkinstalldirs = \$(SHELL) \$(MKINSTALLDIRS):' $i; \
                    fi \
                fi \
            done \
        fi
/bin/sh: -c: line 1: syntax error: unexpected end of file
/bin/sh: line 1:     for i in po/Makefile* ; do \: No such file or directory
/bin/sh: line 2:        if [ -f "$i" ] ; then \: command not found
/bin/sh: line 3:            if grep '^mkinstalldirs.*=.*case' $i ; then \: command not found
/bin/sh: line 4:                echo "fixing broken $i which causes wrong path to mkinstalldirs to be used"; \: command not found
/bin/sh: line 5:                perl -spi -e 's:^mkinstalldirs\s*=\s*.*:mkinstalldirs = \$(SHELL) \$(MKINSTALLDIRS):' $i; \: command not found
/bin/sh: line 6:            fi \: command not found
/bin/sh: line 7:        fi \: command not found
/bin/sh: line 8:     done \: command not found
/bin/sh: -c: line 9: syntax error near unexpected token `fi'
/bin/sh: -c: line 9: `fi'
make: *** [UTILS] Error 2
Thank you for your help
 
Old 01-07-2008, 03:38 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by phru View Post
We have made some changes in the source code of the package and so it is not so easy to take another source package or version.
Sure it is. If the changes weren't kept in a revision repo then take the tarball from the original .src.rpm and diff it with your homebrew to make patches.


Quote:
Originally Posted by phru View Post
I have a working binary rpm for RHEL 4. The problem is that i have a few new servers which are running under RHEL 5. So i wanted to rebuild the RPM on the new servers without luck.
Nothing to do with luck. Making a RPM w/o the corresponding .src.rpm is inefficient, a waste of time, if you don't mind me saying so. I can see though it's legacy and not your fault (unless you go down the same path).


Quote:
Originally Posted by phru View Post
I have taken over the topic from a colleague and so i have no idea what he has done when he had buit the initial rpm or why it is not working now.
Diff, read, debug. That's what I do.


Now I don't like looking at code *snippets* very much, especially if *you're* not even sure what the problem is with. Next time better post the whole thing (or alternatively U/L the files or package to some free host and the post a D/L URI).
Anyway, bringing it back to the bare essence this should be enough and does work for me:
Code:
if [ "$UTILS" = "po" ] ; then
 find po -name Makefile\* | while read i; do grep -q '^mkinstalldirs.*=.*case' "$i" && \
    perl -spi -e 's:^mkinstalldirs\s*=\s*.*:mkinstalldirs = \$(SHELL) \$(MKINSTALLDIRS):' "$i"
 done
fi
 
  


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
How to build rpm in 10.3 swampdog2002 SUSE / openSUSE 6 10-24-2007 11:59 AM
How can I generate / build and RPM from *.src.rpm file sreekumartg Red Hat 3 02-23-2007 05:23 PM
Rpm-build abhijeetudas Linux - Software 3 12-06-2005 01:06 AM
cannot build source rpm/ rpm questions kpachopoulos Fedora 3 07-24-2005 09:15 AM
build rpm Santas Linux - Software 1 11-21-2003 05:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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