LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to make rpm for gWaei - getting error (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-make-rpm-for-gwaei-getting-error-746052/)

rustiguzzi 08-08-2009 11:13 AM

Trying to make rpm for gWaei - getting error
 
System: Mandriva 2009 Spring. Aim: to run gWaei, a Japanese/English dictionary. As there does not seem to be a Mandriva-compatible rpm available, I have downloaded gwaei-1.0.tar.gz from sourceforge.net, unzipped it, read the README and set about making my own. The ./configure stage threw up several dependency shortcomings, which I've overcome, and so did the "make rpm" at first try. Now, though, "make rpm" seems to go along fine until it gets to this point, after entering and leaving several directories (help, src/xml, src/kpengine etc.) . . .

find gwaei-1.0 -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec /bin/sh /home/<name>/gwaei-1.0/install-sh -c -m a+r {} {} \; \
|| chmod -R a+r gwaei-1.0
tardir=gwaei-1.0 && /bin/sh /home/<name>/gwaei-1.0/missing --run tar chof - "$tardir" | GZIP=--best gzip -c >gwaei-1.0.tar.gz
{ test ! -d gwaei-1.0 || { find gwaei-1.0 -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr gwaei-1.0; }; }
make: ba: Command not found
make: [rpm] Error 127 (ignored)
cp: cannot stat `/home/<name>/gwaei-1.0/rpm/RPMS/i386/gwaei-1.0-1.i386.rpm': No such file or directory
make: *** [rpm] Error 1

. . . at which I give up, as I can't see what's happening. Something "missing", evidently - and what sort of a command is "ba"? I've checked the path to the i386 directory, which is there but empty. Incidentally, I'm assuming that the architecture on this PC is indeed i386 (it's a Dell 2400 with Celeron 2.6GHz CPU).

Could someone have a go at interpreting what's up?

Previous posts of mine, and searches in LQ, have resulted in my being able to load StarDict's Japanese/English dictionaries - but they lack the features that gWaei has, which is why I'm trying to get it.

Finally, if there is already a Mandriva-compatible rpm out there somewhere, I'd like to know about it(!)

Roy

unSpawn 08-08-2009 07:21 PM

Could you attach the output (make_rpm_gwaei.log) from running 'make -n rpm 2>&1 | tee ./make_rpm_gwaei.log'?

rustiguzzi 08-09-2009 04:38 AM

1 Attachment(s)
Log attached. Renamed as '.txt' because '.log' was rejected as invalid. Your command line seems to have gone through OK and created the rpm, though as I am doing this for the first time, and learning as I go, I can't see it (probably because I don't know what I'm looking for). A brief look at the log shows some 'fails', but I can't tell whether they're significant or not.

There was one oddity I forgot to mention - after unzipping the files earlier, on su-ing I got (and still get) this warning, so was wondering if it was screwing things up somehow:

gpg: WARNING: unsafe ownership on configuration file `/home/<name>/.gnupg/gpg.conf'

The permissions are -rw-------

Hope the log has something to tell you,

Roy

unSpawn 08-09-2009 06:13 AM

Quote:

Originally Posted by rustiguzzi (Post 3636452)
There was one oddity I forgot to mention - after unzipping the files earlier, on su-ing I got (and still get) this warning, so was wondering if it was screwing things up somehow: gpg: WARNING: unsafe ownership on configuration file `/home/<name>/.gnupg/gpg.conf' The permissions are -rw-------

IIRC 'man 1 gpg' offers two types of warnings: homedir and conf file. I don't know what the right ones are but my ~/.gnupg dir has mode '0700' perms and the options file has mode '0400' perms.


Quote:

Originally Posted by rustiguzzi (Post 3636452)
Your command line seems to have gone through OK and created the rpm,

No it didn't (or at least its not supposed to). The "-n" switch can mean like "--dry-run" as in "show me what it would do but not actually execute".


Quote:

Originally Posted by rustiguzzi (Post 3636452)
Hope the log has something to tell you,

Code:

echo "%_topdir /home/roycandler/gwaei-1.0/rpm" > /home/roycandler/.rpmmacros
mkdir -p ./rpm/SOURCES ./rpm/SPECS ./rpm/BUILD ./rpm/RPMS/i386 ./rpm/SRPMS/i386
cp gwaei-1.0.tar.gz ./rpm/SOURCES
ba --target i386 ./rpm/gwaei.spec
cp `/bin/rpm --eval '%{_rpmdir}'`/i386/gwaei-1.0-1.i386.rpm .
rm -rf ./rpm/SOURCES ./rpm/SPECS ./rpm/BUILD ./rpm/RPMS ./rpm/SRPMS
echo "Success! Finished creating the rpm packge. Please have a sugary day."

- As you see in the last 7 lines of your output it shows the "ba" command but the Makefile.in (line 802) shows "@ ${RPMBUILD} -ba --target @ARCH@ $(top_srcdir)/rpm/@PACKAGE@.spec" and your OP output of "make: [rpm] Error 127 (ignored)" suggests you don't have "rpmbuild" installed. I don't know what the package name is but in Red Hat it'll be called "rpm-build" so you probably can find it easily. BTW its 'make rpm' defaults to i386 which is OK for you.
! It appears you have used the gwaei-1.0.tar.gz instead of the current gwaei-1.0rc1.tar.gz tarball. It might not fix things but it's best to use the most recent one.
! The "echo "%_topdir /home/roycandler/gwaei-1.0/rpm" > /home/roycandler/.rpmmacros" is a violation of things because it overwrites your ~/.rpmmacros. The author really should not do that and I already notified him (see ticket https://sourceforge.net/tracker/?fun...2&atid=1126810).
* Gwaei (what *does* that name mean?) offers RPM's (gwaei-1.0rc1-1.i386.rpm) and while it may not have been buit for Mandriva it may be compatible. Did you try installing it?

rustiguzzi 08-09-2009 03:11 PM

Thanks for that quick and informative reply, which has certainly given me plenty to think about. First thing will be to find and install the rpmbuild package, then try the available rpm from sourceforge. I didn't do that originally as I was under the impression that unless you were sure it's compatible, it's better not to try (which may well be true for newbies such as myself). Anyway, if that doesn't work I will go for the later tarball, which I wasn't aware of.

As to the name, "Wa-Ei" is simply Japanese for "Japanese-to-English". gWaei is a replacement for the earlier gjiten ("jiten" being Japanese for "dictionary").

Will let you know when it's up and running.

Roy

rustiguzzi 08-10-2009 03:56 PM

Pleased to report that gWaei is now up and running. If its Help file was running as well, I'd be even happier - but that's not a question for LQ.

I was unable to figure out how to get the sourceforge.net RPM via Software Manager today, so abandoned the search and went for the tarball. Couldn't find the updated version, so reverted to the original. With make-rpm installed, the making of the rpm went through smoothly and all I had to do then was figure out how to get Software Manager to look at it. Turned out that the "Add custom medium" wasn't in quite the place that the Help file said it was. Once that was sorted, installation went fine. I can now mark this thread as Solved. Thanks, unSpawn!

And finally, some Googling brought out that others have suffered from the WARNING referred to above. Here's an answer . . .

"It means that the user you are running GPG as was not the owner of the
gpg.conf file. That can be a security problem (as someone other than
you can manipulate it), so GPG is warning you about it.

Since you're running as root on purpose, it's presumably not a
security problem, but GPG doesn't know that."

lists.gnupg.org/pipermail/gnupg-users/2005-March/025320.html

Roy

unSpawn 08-10-2009 07:07 PM

Thanks for posting the GnuPG explanation and letting us know it works.

rustiguzzi 08-15-2009 05:03 AM

By way of a postscript, and for the benefit of anyone else thinking of installing gWaei - the missing Help feature was due to my Gnome not being fully installed (my fault). I have now put this right and gWaei works perfectly.

Roy


All times are GMT -5. The time now is 03:31 AM.