Author Topic: My first time  (Read 2295 times)

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: My first time
« Reply #15 on: July 30, 2011, 10:32:00 AM »
Am I correct in thinking that this app was written in python? Python packages are far from the easiest to build.

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3793
Re: My first time
« Reply #16 on: July 30, 2011, 01:43:50 PM »
Tim,

I have this one built. I noticed you were working on it so I didn't send it, but here's the specfile that worked for me:

Code: [Select]
# Task Coach - Your friendly task manager
# Copyright (C) 2004-2011 Task Coach developers <developers@taskcoach.org>
# Copyright (C) 2008 Marcin Zajaczkowski <mszpak@wp.pl>
#
# Task Coach is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Task Coach is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


#%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define originalName TaskCoach

Name: taskcoach
Summary: Your friendly task manager
Version:    1.2.24
Release: %mkrel 1
License:  GPLv3+
Group: Applications/Productivity
URL: http://taskcoach.org/
Source: http://downloads.sourceforge.net/taskcoach/TaskCoach-%{version}.tar.xz
Source1: taskcoach.png
Source2: build.in/fedora/taskcoach.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: python >= 2.5
Requires: wxPython >= 2.8.9.1

# Must have setuptools to build the package
BuildRequires: python-setuptools

%description
Task Coach is a simple open source todo manager to manage personal tasks and todo lists. It grew out of a frustration that well-known task managers, such as those provided with Outlook or Lotus Notes, do not provide facilities for composite tasks. Often, tasks and other things todo consist of several activities. Task Coach is designed to deal with composite tasks.

%prep
%setup -q -n %{originalName}-%{version}

%build
CFLAGS="%{optflags}" %{__python} make.py build

%install
%{__rm} -rf %{buildroot}
# --root $RPM_BUILD_ROOT makes the package install with a single, expanded
# directory in %{python_sitelib} and a separate egginfo directory.
%{__python} setup.py install --skip-build --root="%{buildroot}" --prefix="%{_prefix}"
%{__mkdir} -p %{buildroot}%{_datadir}/pixmaps
%{__cp} -a %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/

desktop-file-install --vendor fedora \
        --dir %{buildroot}%{_datadir}/applications \
        %{SOURCE2}

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(0644,root,root,0755)
%attr(0755,root,root) %{_bindir}/taskcoach.py
#python_sitelib definition should be used instead of
#%dir %{python_sitelib}/taskcoachlib
%{_libdir}/python*/site-packages/taskcoachlib/*
%{_libdir}/python*/site-packages/TaskCoach-*-py2.*.egg-info
%{_datadir}/applications/fedora-taskcoach.desktop
%{_datadir}/pixmaps/taskcoach.png
%doc CHANGES.txt LICENSE.txt PUBLICITY.txt README.txt TODO.tsk

%exclude %{_libdir}/python*/site-packages/buildlib/*.py*

%changelog
* Mon May 02 2010 Jerome Laheurte <fraca7 AT free DOTT fr> - 1.0.8-1
- add the egginfo to __files to build on Fedora 12

* Wed Mar 24 2010 Frank Niessink <frank ATT niessink DOTT com> - 1.0.1-1
- no need to exclude pysyncml library here for Fedora 11

* Wed Mar 19 2008 Frank Niessink <frank ATT niessink DOTT com> - 0.70.0-1
- integrate Fedora RPM build step into Task Coach build process

* Tue Feb 12 2008 Marcin Zajaczkowski <mszpak ATT wp DOTT pl> - 0.69.0-2
- clean up spec file (official RPM packages with be built from that SPEC)

* Sun Feb 10 2008 Marcin Zajaczkowski <mszpak ATT wp DOTT pl> - 0.69.0-1
- updated to 0.69.0

* Fri Jan 25 2008 Marcin Zajaczkowski <mszpak ATT wp DOTT pl> - 0.68.0-2
- .desktop file and icon added

* Sun Jan 06 2008 Marcin Zajaczkowski <mszpak ATT wp DOTT pl> - 0.68.0-1
- initial internal release

I would create the .desktop file in the specfile and get rid of the extra source file. (I just copy an example from another pclos spec.)

Galen

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #17 on: July 30, 2011, 03:40:52 PM »
Am I correct in thinking that this app was written in python? Python packages are far from the easiest to build.

Oh really? I'm glad they're not easy because I couldn't do it!  ;D

Tim,

I have this one built. I noticed you were working on it so I didn't send it, but here's the specfile that worked for me:

Galen

Great Galen! Thanks  :)  Now I'd love to try and do it. Do you have a link to the srpm you used? I didn't read anything about a .desktop file in the manual.  ???
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #18 on: July 30, 2011, 04:23:24 PM »
I keep getting this error >

Code: [Select]
File "make.py", line 20, in <module>
    import sys, os, glob, wx
ImportError: No module named wx
error: Bad exit status from /home/tim/src/tmp/rpm-tmp.tM7RwD (%build)

RPM build errors:
    Bad exit status from /home/tim/src/tmp/rpm-tmp.tM7RwD (%build)
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3793
Re: My first time
« Reply #19 on: July 30, 2011, 04:29:44 PM »
I keep getting this error >

Code: [Select]
File "make.py", line 20, in <module>
    import sys, os, glob, wx
ImportError: No module named wx
error: Bad exit status from /home/tim/src/tmp/rpm-tmp.tM7RwD (%build)

RPM build errors:
    Bad exit status from /home/tim/src/tmp/rpm-tmp.tM7RwD (%build)

The only 'wx' dependency listed in my borrowed spec, is wxPython. Maybe that does not bring in all need 'wx' libraries, but I already have them and you don't. I would look at everything 'wx' available in Synaptic that is not installed and install one at a time, rebuilding your package in between, until you have installed something that makes it build all of the way. Then go back and add that package to the 'BuildRequires:'.

Galen

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #20 on: July 30, 2011, 05:43:42 PM »
The only 'wx' dependency listed in my borrowed spec, is wxPython. Maybe that does not bring in all need 'wx' libraries, but I already have them and you don't. I would look at everything 'wx' available in Synaptic that is not installed and install one at a time, rebuilding your package in between, until you have installed something that makes it build all of the way. Then go back and add that package to the 'BuildRequires:'.

Galen

Thanks Galen, I installed wxPythonGTK and that seems to have fixed that problem  :)

Here's the next error I get  ::)

Code: [Select]
/bin/cp: cannot stat `/home/tim/src/rpm/SOURCES/taskcoach.png': No such file or directory
error: Bad exit status from /home/tim/src/tmp/rpm-tmp.wmvBaY (%install)

The only file in    /home/tim/src/rpm/SOURCES/   is the TaskCoach-1.2.24.tar.xz  but the .png file should be in that tar.xz file because I can see it in the source files in   /home/tim/src/rpm/BUILD/TaskCoach-1.2.24/icons.in/
« Last Edit: July 30, 2011, 06:26:54 PM by timeth »
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #21 on: August 04, 2011, 03:12:33 PM »
Thanks for everyones' help on this.

It seems Galen and etjr have successfully built the rpm and it was sent to dropbox (by etjr) but I was informed that it was seg faulting in PCLinuxOS, so it was taken out of dropbox. I'll keep watching the program for new releases and we'll see if it's possible in the future to have it included in our repos.   
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3793
Re: My first time
« Reply #22 on: August 04, 2011, 09:01:18 PM »
Thanks for everyones' help on this.

It seems Galen and etjr have successfully built the rpm and it was sent to dropbox (by etjr) but I was informed that it was seg faulting in PCLinuxOS, so it was taken out of dropbox. I'll keep watching the program for new releases and we'll see if it's possible in the future to have it included in our repos.   

I'll take a look at etjr's spec file and see if there is any significant difference. Mine was not segfaulting, but I did not do any lengthy testing. I'm sorry I haven't responded to the last couple of posts. I got kind of busy.  :-[

timeth, the srpm that I had was from fedora15, I think. There as an additional source for the .desktop file. I like to create the desktop file in the spec file, but it works either way. You said information about a .desktop file wasn't in the tutorial? The thing I've discovered about building rpms is that I just use working examples to copy. There way too many unanswered questions to cover it all in a manual. So, keep on plugging away at it. Look for examples, and ask questions. When I have more time, I'll try to answer what I can.

Galen
 

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #23 on: August 11, 2011, 11:42:11 PM »
Thanks for your help Galen. No problem, I've been busy too. I would be happy to test your working version if it means we can get it into the repos and I can get to using it sooner. I'd even just like to look at the spec file you created with your .desktop edits so I can compare it to the one from Fed15 and see what you mean about creating it in the spec file. Anyway, I look forward to anything you can do.  :)   
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Online sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: My first time
« Reply #24 on: August 16, 2011, 06:25:05 AM »
[timeth]
You have spent so much time and learnt so much about packaging.
Would you be kind enough to write a dummies guide to packaging?
Please...
-SS.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #25 on: August 26, 2011, 04:46:05 PM »
New version of Taskcoach is out!  ;D

http://sourceforge.net/projects/taskcoach/files/taskcoach/Release-1.2.26/

I downloaded the TaskCoach-1.2.26-1.src.rpm  and tried to install but got the same permission errors I always get when I try to do that so then I downloaded the TaskCoach-1.2.26.tar.gz  and unzipped it. No spec file??  Anyway, I clicked on the taskcoack.py file just to have a look at the code and the program just started up. :)  I don't have much time to play around and learn how to use it right now but maybe it can just be used in this way? Without building an rpm and installing?
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #26 on: August 27, 2011, 04:22:41 PM »
Well, bad news. I had a play with it today but when I try to create a new task or category, it seg faults.  :(

EDIT:  I checked the dependencies of taskcoach which are only Python and wxPython.

Code: [Select]
You need Python version 2.5 or higher and wxPython version 2.8.9.1-unicode or higher.

I have newer versions of both of these installed from synaptic.

Next, the creator says to run these tests >

Code: [Select]
Before installing, you may want to run the unittests included.
Issue the following command:

  cd tests; python test.py

If all goes well, you should see a number of dots appearing and
the message 'Ran X tests in Y seconds. OK'. If not, you'll get
one or more failed tests. In that case, please run the tests
again, redirecting the output to a textfile, like this:

  python test.py 2> errors.txt

Please mail me the errors.txt file and your platform information
(operating system version, Python version and wxPython version).

So the test ran like he said but it segfaults without giving any further error info. Just "segfaulting". I outputted the test result to a .txt file but the only thing in it is the dots ....................................................................................... just like he said but it doesn't report the segfault in the file so there's not much use emailing it to him.

Other people on the bug reporting site who are using Debian and the big "U" are having more luck using the program.

Do you think it's worth emailing him and telling him the problem? Maybe someone else could this test above and see if they get the same result as me?

« Last Edit: August 27, 2011, 09:32:55 PM by timeth »
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #27 on: September 09, 2011, 06:22:25 PM »
Well, I ended up emailing the developers of Taskcoach and got great responses from Jerome and Frank. Frank helped me to get some better error output info which I sent to him and now Jerome has installed PCLinuxOS and is working on the segfault problem. Fingers crossed, I may be able to try building this RPM again soon with a new version that works for us.  ;)

[timeth]
You have spent so much time and learnt so much about packaging.
Would you be kind enough to write a dummies guide to packaging?
Please...
-SS.


Sorry for the slow response sling-shot. I was actually thinking that some changes/updates to the guide that was written for PCLinuxOS could be in order. It's a very good guide but there are now some points that are outdated and I think it could also be geared even more toward the absolute beginner packager which I am. Maybe when I have successfully built an RPM (hopefully I can get this Taskcoach built with the help of some of the other experienced packagers, gseaman, etjr, Leiche, Neal) I'll have a look at re-doing the packaging tutorial a little.  
« Last Edit: September 09, 2011, 06:38:01 PM by timeth »
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #28 on: September 10, 2011, 03:04:09 AM »
I just received and email from Jerome who said that Synaptic gave no results when he searched for wxPython.  ???    Without knowing his setup, does anyone have any idea why that package wouldn't show up in Synaptic?
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: My first time
« Reply #29 on: September 10, 2011, 03:20:48 AM »
I just received and email from Jerome who said that Synaptic gave no results when he searched for wxPython.  ???    Without knowing his setup, does anyone have any idea why that package wouldn't show up in Synaptic?

I've seen reports on the forum of apps not showing in a Synaptic search -- of apps that I know are there. Perhaps a switch to a different repo and a reload would be the solution in this case.