Issue 30357 - needs rpm to build sysui
Summary: needs rpm to build sysui
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: Sun Linux, all
: P3 Trivial (vote)
Target Milestone: OOo 2.0
Assignee: rodarvus
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 23:19 UTC by sparcmoz
Modified: 2005-03-31 15:39 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
create variable for RPM (1.75 KB, patch)
2004-09-16 13:47 UTC, foskey
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2004-06-16 23:19:58 UTC
building linux sparc checked out from HEAD

/home/jim/680/sysui/desktop/suse
-------------
.
dmake:  Error code 1, while making '../../unxlngs.pro/misc/suse.flag'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /home/jim/680/sysui/desktop/suse
jim@sun:~/680/sysui$

rpm: Command not found

I guess it might be redhat package manager? Anyway when that debian "rpm"
package was installed the build does proceed.
Comment 1 Martin Hollmichel 2004-07-16 14:07:42 UTC
mh->obr: can you comment this ?
Comment 2 nospam4obr 2004-07-16 14:20:33 UTC
This issue has been fixed on milestone m48. Please fetch:

sysui/desktop/suse/makefile.mk rev 1.3
sysui/desktop/redhat/makefile.mk rev 1.3
solenv/inc/packtools.mk rev 1.2
Comment 3 nospam4obr 2004-07-20 07:46:19 UTC
Closing. Feel free to re-open this issue if you still encouter the problem with
the file revisions mentioned above.
Comment 4 pavel 2004-08-28 23:56:50 UTC
obr: reopening.

packtools.mk should IMO read:

RPM*=$(shell +-`which rpmbuild` && echo rpmbuild || echo rpm)

Right now, RPM is empty on my system with rpmbuild, because:

pavel@linux:~/.ooo/ooo_SRC680_m52_src/solenv/inc> which rpm
/bin/rpm
pavel@linux:~/.ooo/ooo_SRC680_m52_src/solenv/inc> which rpmbuild
/usr/bin/rpmbuild
Comment 5 nospam4obr 2004-08-30 08:01:26 UTC
Hi Pavel,

I see two problems with your proposal:

1.  To ensure backwards compatibility, Hamburg RE always uses RPM 3.x for
creating rpms. Prefering rpmbuild as you suggest will break this behaviour.

2. The RPM should be empty on non rpm based  systems.

Are you sure $(RPM) is empty on your system ? It should point to 'rpm', even
though I admit  this is probably not what you want it to be ..
Comment 6 pavel 2004-08-30 08:48:37 UTC
obr: you're right. My approach doesn't work on non-rpm distributions. But it
should be simple to workaround.

BTW: Even with this change, I see:

rpmbuild: no spec file given

or similar. I do not have my system here right now.
Comment 7 nospam4obr 2004-09-10 14:30:22 UTC
What about:

RPM*=$(shell +-set i=`which rpm` && echo rpm`test -x /usr$${{i}}build && echo
build`)

Does this work for you (note the '/usr' prefix in the 'test' statement) ?
Comment 8 pavel 2004-09-10 20:08:43 UTC
yes, it works. But I think we should rewrite the code like this (meta-makefile.mk):

RPM=`which rpmbuild`
RPM*=`which rpm`

(I hope I remember *= syntax right). Is this better? It is at least readable.
Comment 9 hjs 2004-09-13 12:45:59 UTC
which seems to output the "* not found" message to stdout so the first line will
set RPM to garbish and the second gladly regard this as set  :-(
Comment 10 pavel 2004-09-13 19:06:03 UTC
hjs: this was metacode. I haven't even tested it in real makefile.mk.

which on my system returns either full path to the binary or nothing. So I
thought that the first line would either set RPM to the full path of rpmbuild or
to be empty and in this case the second line would set it to path to rpm or
leave it empty again on systems without rpm.
Comment 11 pavel 2004-09-14 20:49:03 UTC
what using configure instead?

Like epm does it:


checking for rpm... /bin/rpm
checking for rpmbuild... /usr/bin/rpmbuild

and suing set_soenv to export it to the environment?
Comment 12 nospam4obr 2004-09-15 06:37:40 UTC
Sounds reasonable to me. Let's move the rpm detecting code to
configure/set_soenv and our Hamburg RE equivalent. 
Comment 13 foskey 2004-09-16 13:47:08 UTC
Created attachment 17750 [details]
create variable for RPM
Comment 14 foskey 2004-09-16 13:48:22 UTC
NOtifying the configure man...
Comment 15 nospam4obr 2004-09-17 08:53:51 UTC
obr@pjanik: Please apply and test the patch. Thanks.
Comment 16 pavel 2004-09-17 11:21:38 UTC
waratah:

This is unnecessary:

+dnl ===================================================================
+dnl Search all the common names for GNU make
+dnl ===================================================================
Comment 17 pavel 2004-09-17 11:28:15 UTC
After patching and autoconf, generated env. file contains:

RPM="rpmbuild"

and it exports RPM variable and build works.

Hmm, shouldn't we rename the variable to RPMBUILD aka is there a possibility we
want to know the rpm package manager name (if there is any) in the future (think
of RPM and RPMBUILD variables)?
Comment 18 pavel 2004-09-17 11:28:35 UTC
-> obr
Comment 19 nospam4obr 2004-09-17 11:47:49 UTC
The only reason I can think of the destinguish between rpm and rpmbuild in the
build process would be if rpmbuild would change it's command line interface.

Up to then I think a single variable is enough, otherwise one would have to code
the decision which variable to use into the different makefile.mk(s).
Comment 20 pavel 2004-09-17 21:42:47 UTC
OK, should I fix that in my pj04 cws which I use for build issues of SRC680_m54?
Comment 21 nospam4obr 2004-09-20 10:13:19 UTC
Yes, please go ahead. Thanks.
Comment 22 pavel 2004-09-21 06:51:35 UTC
Accept, will do that in some cws soon.
Comment 23 pavel 2004-10-06 21:04:09 UTC
rodarvus: please take-over so we do not confilict while working on config_office
directory.

Comment 24 rodarvus 2004-11-08 19:34:33 UTC
fix commited to cws configure4.

tested on fedora core 1, fedora core 2, SuSE 9.1 and Windows.
Comment 25 quetschke 2005-01-23 21:04:03 UTC
Seen in configure4
Comment 26 rene 2005-03-31 15:39:44 UTC
close