OpenERP v5.0.0-2: bdist_rpm still fails

Bug #327298 reported by Gerry Reno
10
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Won't Fix
Undecided
Unassigned
Odoo Server (MOVED TO GITHUB)
Fix Released
Wishlist
Unassigned
Odoo Web Client
Won't Fix
Wishlist
Unassigned

Bug Description

In trying to build distro RPM packages using the setup.py target 'bdist_rpm' using the latest available release 5.0.0-2, the 'bdist_rpm' command still fails:
$ python setup.py bdist_rpm

bdist_rpm Issues:

Server:
1. RPMS will not build. Fails with Installed but unpackaged files error.
2. Using a hack to get past #1, it puts incorrect path into /usr/bin/openerp-server causing startup failure.

Client:
1. Puts incorrect path into /usr/bin/openerp-client causing startup failure.

Revision history for this message
Gerry Reno (greno-verizon) wrote :

Suggested fix for path issue in startup files:

SERVER: setup.py
        # start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n" % (opj(self.install_libbase, "openerp-server"), sys.executable)
        opj = os.path.join
        openerp_site_packages = opj('/usr', 'lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server')
        start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n" % (openerp_site_packages, sys.executable)

CLIENT: mydistutils.py
        # start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-client.py $@\n" % (opj(self.install_libbase, "openerp-client"), sys.executable)
        opj = os.path.join
        openerp_site_packages = opj('/usr', 'lib', 'python%s' % py_short_version, 'site-packages', 'openerp-client')
        start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-client.py $@\n" % (openerp_site_packages, sys.executable)

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

I plan to work on this bug this week-end or the next week. I am sorry, but I am not at the office this week.

Regards,

Changed in openobject-server:
assignee: nobody → stephane-openerp
importance: Undecided → High
Changed in openobject-client:
assignee: nobody → stephane-openerp
Changed in openobject-client-web:
assignee: nobody → stephane-openerp
importance: Undecided → High
Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  When you work on this bug, please also work on this related bug: https://bugs.launchpad.net/openobject-server/+bug/329580
We really don't end up with a complete 'bdist_rpm' solution without both sets of patches being committed from both bugs.

Regards,
Gerry

Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  Any progress on getting the patches/files in the trunk from the two 'bdist_rpm' bugs, 327298 and 329580? Also, I think the Status for the Client should be changed to High as well.

Regards,
Gerry

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

I applied your patch on the trunk version. Can you check ?

I am sorry for the delay.

Thank you for your patch,

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  Yes I checked it and we need to make a change. I've attached another patch that fixes it.

  And I've built the RPM and checked the path in the /usr/bin/openerp-client file and it's ok now.

Regards,
Gerry

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Pushed in the last trunk, can you check ?

Thanks

Changed in openobject-client:
status: New → Incomplete
Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  I pulled the client trunk and the patch is there. So the client RPM now builds, installs and runs ok for me.

Regards,
Gerry

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote : Re: [Bug 327298] Re: OpenERP v5.0.0-2: bdist_rpm still fails

greno wrote:
> Stephane,
> I pulled the client trunk and the patch is there. So the client RPM now builds, installs and runs ok for me.
>
> Regards,
> Gerry
>
ok, I will check that on my fedora box asap.

Thanks

Regards,
Stephane
--
Stephane Wirtel - "As OpenERP is OpenSource, please feel free to contribute."
Developper - Technical Lecturer OpenERP
OpenERP - Tiny SPRL
Chaussee de Namur, 40
B-1367 Gerompont
Tel: +32.81.81.37.00
Web: http://www.tiny.be
Web: http://www.openerp.com
Planet: http://www.openerp.com/planet/
Blog: http://stephane-wirtel-at-tiny.blogspot.com

Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  Since this bug already deals with client I attached a patch that adds the 'setrelease' command to setup. The attached patch archive contains a patch file and a setup2.py file. We have to do the 'setrelease' a little different on client because setup() args distclass and cmdclass are incompatible with each other. And since translations requires distclass we had to move cmdclass (needed for new commands like 'setrelease') into a separate setup file. I've tested this and everything tested ok.

Regards,
Gerry

Revision history for this message
Gerry Reno (greno-verizon) wrote :

OPENERP-WEB: looking at this for the first time for a minute...

bdist_rpm: generates bad spec file. 'release' is always 1 even if you set the release string in setup.py or in a setup.cfg.
                 numerous: files listed twice warnings
                 Installed but unpackaged files errors

Regards,
Gerry

Revision history for this message
Gerry Reno (greno-verizon) wrote :

OPENERP-CLIENT: need to add setup2.py to MANIFEST.in

Regards,
Gerry

Revision history for this message
Gerry Reno (greno-verizon) wrote :

How soon will the patches be in trunk?

Regards,
Gerry

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Hi Gerry,

Could you try to integrate your setup2.py file in the main setup with a conditional statement, because if there are two setup files, the user does not know which one to use.

Thank you

Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  There is too much collision between the translation class and the cmdclass. They are incompatible. And when you try to put everything in a single file it becomes very messy and less understood. The logic stays very clean in the separate files.

  What I did to prevent confusion was to convert the second file to a dot file (.setup2.py) and this way it is hidden from any packager.

  I've attached a complete client patch file against 954 and the .setup2.py file in a tarball.

Regards,
Gerry

Revision history for this message
Gerry Reno (greno-verizon) wrote :

Stephane,
  I added the dependencies into setup.cfg for both the client and the server. Attaching patches.

Regards,
Gerry

Revision history for this message
Gerry Reno (greno-verizon) wrote :
Revision history for this message
Todd Johnson (todd-toddejohnson) wrote :

I'm having troubles with openerp-client-5.0.3's setup.py bdist_rpm. I fixed the no display error and now I'm stuck on check-buildroot problems regardless what I have set in /usr/lib/rpm/redhat/macros. It is on F11.

+ /usr/lib/rpm/check-buildroot
/home/todd/Download/openerp-client-5.0.3/build/bdist.linux-x86_64/rpm/BUILDROOT/openerp-client-5.0.3-3.x86_64/usr/bin/openerp-client:cd /home/todd/Download/openerp-client-5.0.3/build/bdist.linux-x86_64/rpm/BUILDROOT/openerp-client-5.0.3-3.x86_64/usr/lib/python2.6/site-packages/openerp-client
Found '/home/todd/Download/openerp-client-5.0.3/build/bdist.linux-x86_64/rpm/BUILDROOT/openerp-client-5.0.3-3.x86_64' in installed files; aborting
error: Bad exit status from /var/tmp/rpm-tmp.D8oWpC (%install)

Revision history for this message
Gerry Reno (greno-verizon) wrote :

Todd,
  I had tested all the patches for both client and server locally here successfully with 5.0.0-3 and 5.0.1 on Fedora 10. But, I'm not sure that all the patches ever got integrated in the codebase. You'll have to check your tarball or bzr. Maybe Stephane can comment as to the status of the patches. Also, there are several locations where RPM macros can be located and cause problems. You need to check them all.

Regards,
Gerry

Changed in openobject-client-web:
status: New → Incomplete
importance: High → Wishlist
Changed in openobject-client:
status: Incomplete → Triaged
Changed in openobject-server:
status: Incomplete → Triaged
Changed in openobject-client-web:
status: Incomplete → Triaged
Changed in openobject-client-web:
status: Triaged → Won't Fix
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Fixed in 6.1

Changed in openobject-server:
status: Triaged → Fix Released
Changed in openobject-client-web:
assignee: Stephane Wirtel (OpenERP) (stephane-openerp) → nobody
Changed in openobject-client:
assignee: Stephane Wirtel (OpenERP) (stephane-openerp) → nobody
Changed in openobject-server:
assignee: Stephane Wirtel (OpenERP) (stephane-openerp) → nobody
Changed in openobject-client:
status: Triaged → Won't Fix
Changed in openobject-server:
importance: High → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.