Bug 227675 - devel/py-buildbot-worker: Fix twistd binary name in rc script for non-standard Python version
Summary: devel/py-buildbot-worker: Fix twistd binary name in rc script for non-standar...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-21 20:15 UTC by Andreas Sommer
Modified: 2019-03-25 07:35 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly-


Attachments
Patch (1014 bytes, patch)
2018-04-21 20:15 UTC, Andreas Sommer
koobs: maintainer-approval+
Details | Diff
poudriere interactive testport run showing the problem is fixed, using flavor py36 (55.45 KB, text/plain)
2018-04-21 20:16 UTC, Andreas Sommer
no flags Details
poudriere interactive testport run showing that rc start is still working for default flavor (py27) (55.05 KB, text/plain)
2018-04-21 20:22 UTC, Andreas Sommer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sommer 2018-04-21 20:15:52 UTC
Created attachment 192704 [details]
Patch

`service buildbot-worker start` tries to run `/usr/local/bin/twistd` which does not exist if built against a non-default Python version like 3.6. Change that to use the executable name `twistd-${PYTHON_VER}`.
Comment 1 Andreas Sommer 2018-04-21 20:16:25 UTC
Created attachment 192705 [details]
poudriere interactive testport run showing the problem is fixed, using flavor py36
Comment 2 Andreas Sommer 2018-04-21 20:22:09 UTC
Created attachment 192706 [details]
poudriere interactive testport run showing that rc start is still working for default flavor (py27)
Comment 3 Michael Gmelin freebsd_committer 2018-05-29 22:02:25 UTC
@koobs Do you have the time/resources to look into this?
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2018-05-30 02:28:17 UTC
(In reply to Michael Gmelin from comment #3)

I wont for the next 1-3 days, and I should have commented earlier.

Python port compliance requires all references to python programs be to their versioned (version-suffixed), versions.

Un-versioned symlinks (produced by USE_PYTHON=concurrent) are purely for use convenience/usability

@Michael I'm happy for this patch to land, feel free to self assign if you would like to commit this. Please request an MFH (as this is a bug)
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2018-05-30 02:30:01 UTC
Comment on attachment 192704 [details]
Patch

Approved by: koobs (maintainer)
Comment 6 commit-hook freebsd_committer 2018-10-26 12:40:46 UTC
A commit references this bug:

Author: grembo
Date: Fri Oct 26 12:40:25 UTC 2018
New revision: 483022
URL: https://svnweb.freebsd.org/changeset/ports/483022

Log:
  Fix twistd binary name in rc script for non-default python versions.

  PR:		227675
  Submitted by:	Andreas Sommer <andreas.sommer87@googlemail.com>
  Approved by:	koobs (maintainer)
  MFH:		1 week

Changes:
  head/devel/py-buildbot-worker/Makefile
  head/devel/py-buildbot-worker/files/buildbot-worker.in
Comment 7 Michael Gmelin freebsd_committer 2018-10-26 12:41:53 UTC
Will close once MFHed
Comment 8 Michael Gmelin freebsd_committer 2018-12-31 16:21:15 UTC
Won't MFH, as 2019Q1 will happen very soon. Sorry and Happy New Year
Comment 9 commit-hook freebsd_committer 2019-01-04 10:16:20 UTC
A commit references this bug:

Author: koobs
Date: Fri Jan  4 10:16:00 UTC 2019
New revision: 489253
URL: https://svnweb.freebsd.org/changeset/ports/489253

Log:
  devel/py-buildbot: Version-suffix rc script command

  For python ports, particularly those that use USE_PYTHON=concurrent, only
  the *default* python version/flavor (of the port) gets symlinks created for
  any script/binary filenames installed in LOCALBASE/bin.

  For non-default Python versions/flavors of the port or package, *only* a
  version-suffixed script filename is installed.

  The devel/buildbot-worker rc script was fixed in ports r483022 [1] to use a
  version-suffixed script name.

  This change fixes the same for devel/py-buildbot, whos rc script currently
  fails to run due to trying to invoke a non-existent 'buildbot' script name
  for the non-default (!2.7) case.

  Since a port/package cannot know at run time, at any point what the default
  Python version currently is, or whether it has changed, Python ports *must*
  always and only refer to version-specific variants for everything,
  including the Python interpreter, script shebangs, commands, paths, etc,
  for the Python version they are currently being built with.

  PR:		234565, 227675 [1]
  Reported by:	Andreas Sommer <andreas.sommer87 googlemail com>
  MFH:		2019Q1

Changes:
  head/devel/py-buildbot/Makefile
  head/devel/py-buildbot/files/buildbot.in
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-04 10:18:28 UTC
Assign to committer that originally resolved (in ports r483022)

Update bug fields to match the latest state.
Comment 11 commit-hook freebsd_committer 2019-03-25 07:35:59 UTC
A commit references this bug:

Author: koobs
Date: Mon Mar 25 07:35:00 UTC 2019
New revision: 496797
URL: https://svnweb.freebsd.org/changeset/ports/496797

Log:
  MFH: r489253 devel/py-buildbot: Version-suffix rc script command

  For python ports, particularly those that use USE_PYTHON=concurrent, only
  the *default* python version/flavor (of the port) gets symlinks created for
  any script/binary filenames installed in LOCALBASE/bin.

  For non-default Python versions/flavors of the port or package, *only* a
  version-suffixed script filename is installed.

  The devel/buildbot-worker rc script was fixed in ports r483022 [1] to use a
  version-suffixed script name.

  This change fixes the same for devel/py-buildbot, whos rc script currently
  fails to run due to trying to invoke a non-existent 'buildbot' script name
  for the non-default (!2.7) case.

  Since a port/package cannot know at run time, at any point what the default
  Python version currently is, or whether it has changed, Python ports *must*
  always and only refer to version-specific variants for everything,
  including the Python interpreter, script shebangs, commands, paths, etc,
  for the Python version they are currently being built with.

  PR:		234565, 227675 [1]
  Reported by:	Andreas Sommer <andreas.sommer87 googlemail com>

  Approved by:	ports-secteam (miwi)

Changes:
_U  branches/2019Q1/
  branches/2019Q1/devel/py-buildbot/Makefile
  branches/2019Q1/devel/py-buildbot/files/buildbot.in