Author Topic: Tuxtype  (Read 2935 times)

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Tuxtype
« on: January 29, 2011, 09:43:58 AM »
Well I updated the spec file and am starting to build it. If anybody would like to look at the spec file it is here: http://pclinuxos.pastebin.com/n07BgCnw
« Last Edit: January 29, 2011, 10:29:42 AM by Aradalf »

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #1 on: January 29, 2011, 09:58:52 AM »
I got an error about not being able to change ownership. This is the error:
Code: [Select]
chown root:games /home/aradalf/src/tmp/tuxtype-1.8.1-1pclos2010-buildroot/var/tuxtype/words
chown: changing ownership of `/home/aradalf/src/tmp/tuxtype-1.8.1-1pclos2010-buildroot/var/tuxtype/words': Operation not permitted
make[3]: *** [install-data-hook] Error 1
make[3]: Leaving directory `/home/aradalf/src/rpm/BUILD/tuxtype_w_fonts-1.8.1'
make[2]: *** [install-data-am] Error 2
make[2]: Leaving directory `/home/aradalf/src/rpm/BUILD/tuxtype_w_fonts-1.8.1'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/aradalf/src/rpm/BUILD/tuxtype_w_fonts-1.8.1'
make: *** [install-recursive] Error 1
error: Bad exit status from /home/aradalf/src/tmp/rpm-tmp.88855 (%install)


RPM build errors:
    Bad exit status from /home/aradalf/src/tmp/rpm-tmp.88855 (%install)

EDIT: Removed unnecessary lines.
« Last Edit: January 29, 2011, 11:39:09 AM by Aradalf »

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #2 on: January 29, 2011, 11:44:32 AM »
I understand that ownership of a file or directory can only be changed by root. So how can I make it change ownership as root or not change ownership at all?

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #3 on: January 29, 2011, 12:35:41 PM »
I managed to build it by, oh no, the unspeakable, setting up sudo and using sudo. ;D The srpm is here and the rpm is here.

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: Tuxtype
« Reply #4 on: January 29, 2011, 03:13:06 PM »
Could you try changing %makeinstall_std to make -C build DESTDIR=%buildroot install and see if it builds? (Remember to disable sudo before building)

I think that should solve the permissions problem as well as prevent any future packagers from having difficulty rebuilding your srpm because they don't have sudo set up(I know I don't).

Thanks.
« Last Edit: January 29, 2011, 03:19:29 PM by Chomp »

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #5 on: January 29, 2011, 03:47:31 PM »
Could you try changing %makeinstall_std to make -C build DESTDIR=%buildroot install and see if it builds? (Remember to disable sudo before building)

I think that should solve the permissions problem as well as prevent any future packagers from having difficulty rebuilding your srpm because they don't have sudo set up(I know I don't).

Thanks.

Yes, I'll try this. I would also prefer not to use sudo. Any idea how to disable sudo? I'm kinda horrible at vi and I've also wrecked my sudoers file.

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #6 on: January 29, 2011, 04:22:00 PM »
Could you try changing %makeinstall_std to make -C build DESTDIR=%buildroot install and see if it builds? (Remember to disable sudo before building)

I think that should solve the permissions problem as well as prevent any future packagers from having difficulty rebuilding your srpm because they don't have sudo set up(I know I don't).

Thanks.

I replaced the line, but I have no idea how to "unbuild" something. EDIT: When I do this, I get the following error message:
Code: [Select]
+ make -C build DESTDIR=/home/aradalf/src/tmp/tuxtype-1.8.1-1pclos2010-buildroot install
make: *** build: No such file or directory.  Stop.
error: Bad exit status from /home/aradalf/src/tmp/rpm-tmp.65306 (%install)


RPM build errors:
    Bad exit status from /home/aradalf/src/tmp/rpm-tmp.65306 (%install)
« Last Edit: January 29, 2011, 04:50:33 PM by Aradalf »

Offline Chomp

  • Full Member
  • ***
  • Posts: 173
Re: Tuxtype
« Reply #7 on: January 29, 2011, 06:28:21 PM »
Oops, try: make -C DESTDIR=%buildroot install

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #8 on: January 29, 2011, 07:15:12 PM »
Oops, try: make -C DESTDIR=%buildroot install

Now I get:

Code: [Select]
+ make -C DESTDIR=/home/aradalf/src/tmp/tuxtype-1.8.1-1pclos2010-buildroot install
make: *** DESTDIR=/home/aradalf/src/tmp/tuxtype-1.8.1-1pclos2010-buildroot: No such file or directory.  Stop.
error: Bad exit status from /home/aradalf/src/tmp/rpm-tmp.50492 (%install)


RPM build errors:
    Bad exit status from /home/aradalf/src/tmp/rpm-tmp.50492 (%install)

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Tuxtype
« Reply #9 on: January 30, 2011, 01:09:24 AM »
I also got some errors - just didn't get the time too look at them thoroughly.....
I'll place my spec file also here soon (have to get it from my test pc) - also with problems within it (and I think I'm first going to change some things - after reading the postings here in the packagers-board  :))

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #10 on: February 01, 2011, 05:27:17 PM »
Turns out I didn't package this quite as successfully as I thought. :-\ I can't get it to run from the .desktop file, and upon running it from the terminal, I get the error message:

Code: [Select]
Error - VAR_PREFIX = '/var/tuxtype' not found!
Error - SetupPaths() failed, exiting program.

I guess there must have been some changes in the code from 1.8.0 to 1.8.1, as all I did was update the spec file. I can't seem to figure out how to fix this. It seems like an invalid path hardcoded into the source. Any ideas?

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Tuxtype
« Reply #11 on: February 01, 2011, 11:45:01 PM »
Turns out I didn't package this quite as successfully as I thought. :-\ I can't get it to run from the .desktop file, and upon running it from the terminal, I get the error message:

Code: [Select]
Error - VAR_PREFIX = '/var/tuxtype' not found!
Error - SetupPaths() failed, exiting program.

I guess there must have been some changes in the code from 1.8.0 to 1.8.1, as all I did was update the spec file. I can't seem to figure out how to fix this. It seems like an invalid path hardcoded into the source. Any ideas?

If I read the packaging-guide good enough, that means you have to patch the source code (or is there maybe a patch in it, which hasn't to be active anymore?)
= changing source code (there you'll need some programming skills; I don't know in which programming language tuxtype is written?)
Or changing your SPEC-file so that you already have that directory made & accessible before the first start... => search for all /var things in the SPEC to see if something already exists (also the macros)...

Or maybe there's something wrong in the desktop-file?
=> I'll take a look at it after my SQL exam and music school (I have your srpm if I'm right  :))

And maybe some more experienced packager than me also? (I do it only for learning purposes, and maybe I can find out what's wrong, but I'm not sure about that....)

PS: Tuxtype 1.8.0 was broken if I can remember it right (post is apparently removed from the broken packages section), so I started with opening the SPEC-file and I began modifying some things... but I didn't succeed at the time...)

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #12 on: February 02, 2011, 07:27:15 AM »
Turns out I didn't package this quite as successfully as I thought. :-\ I can't get it to run from the .desktop file, and upon running it from the terminal, I get the error message:

Code: [Select]
Error - VAR_PREFIX = '/var/tuxtype' not found!
Error - SetupPaths() failed, exiting program.

I guess there must have been some changes in the code from 1.8.0 to 1.8.1, as all I did was update the spec file. I can't seem to figure out how to fix this. It seems like an invalid path hardcoded into the source. Any ideas?

If I read the packaging-guide good enough, that means you have to patch the source code (or is there maybe a patch in it, which hasn't to be active anymore?)
= changing source code (there you'll need some programming skills; I don't know in which programming language tuxtype is written?)
Or changing your SPEC-file so that you already have that directory made & accessible before the first start... => search for all /var things in the SPEC to see if something already exists (also the macros)...

Or maybe there's something wrong in the desktop-file?
=> I'll take a look at it after my SQL exam and music school (I have your srpm if I'm right  :))

And maybe some more experienced packager than me also? (I do it only for learning purposes, and maybe I can find out what's wrong, but I'm not sure about that....)

PS: Tuxtype 1.8.0 was broken if I can remember it right (post is apparently removed from the broken packages section), so I started with opening the SPEC-file and I began modifying some things... but I didn't succeed at the time...)

There are two sed-lines within the code that fix incorrect paths that are hardcoded, but the two files they look in do not contain the code that is to be substituted, so basically the lines aren't doing anything.

Offline Aradalf

  • Sr. Member
  • ****
  • Posts: 474
Re: Tuxtype
« Reply #13 on: February 02, 2011, 07:42:52 AM »
Turns out I didn't package this quite as successfully as I thought. :-\ I can't get it to run from the .desktop file, and upon running it from the terminal, I get the error message:

Code: [Select]
Error - VAR_PREFIX = '/var/tuxtype' not found!
Error - SetupPaths() failed, exiting program.

I guess there must have been some changes in the code from 1.8.0 to 1.8.1, as all I did was update the spec file. I can't seem to figure out how to fix this. It seems like an invalid path hardcoded into the source. Any ideas?

If I read the packaging-guide good enough, that means you have to patch the source code (or is there maybe a patch in it, which hasn't to be active anymore?)
= changing source code (there you'll need some programming skills; I don't know in which programming language tuxtype is written?)
Or changing your SPEC-file so that you already have that directory made & accessible before the first start... => search for all /var things in the SPEC to see if something already exists (also the macros)...

Or maybe there's something wrong in the desktop-file?
=> I'll take a look at it after my SQL exam and music school (I have your srpm if I'm right  :))

And maybe some more experienced packager than me also? (I do it only for learning purposes, and maybe I can find out what's wrong, but I'm not sure about that....)

PS: Tuxtype 1.8.0 was broken if I can remember it right (post is apparently removed from the broken packages section), so I started with opening the SPEC-file and I began modifying some things... but I didn't succeed at the time...)

I know a patch should be applied, but the problem is that I'm not sure which file contains the incorrect hardcoded code.

Offline rubentje1991

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2110
  • Rubenus Parvus MCMXCI
Re: Tuxtype
« Reply #14 on: February 02, 2011, 09:21:58 AM »
To find the needed files, you'll need a combination of the find command and the grep command I think....

I looked up some links for you (and then you'll discover another part of the power of Linux!!!):
http://www.liamdelahunty.com/tips/linux_find_string_files.php
http://www.computerhope.com/issues/ch000757.htm

I use the find-command frequently (very handy to search for a .srpm in my local repo for example: is it located in main / updates / ....? : just a find-command  with the package name, but then without the grep-command, and I know where it's located)...
But in this case, it's also very handy to look INTO the files during the search...

Hopefully you can find it with the help of the first link I gave you (just cd into the directory of tuxtype, and execute the needed command)....
If the links aren't enough, and/or you want to know more: just search the internet for "grep" and/or "find" in Linux; or open their man-pages  :)