Bug 194323 - Automate port submission
Summary: Automate port submission
Status: Open
Alias: None
Product: Services
Classification: Unclassified
Component: Bug Tracker (show other bugs)
Version: unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: Bugmeister
Depends on:
Reported: 2014-10-12 16:08 UTC by mwisnicki+freebsd
Modified: 2019-01-17 05:35 UTC (History)
6 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description mwisnicki+freebsd 2014-10-12 16:08:30 UTC
Port submission used to be fully automatic thanks to `port submit` from ports-mgmt/porttools. Since migration to bugzilla this no longer works and has to be done manually.

I believe this regression will significantly reduce quality and quantity of port updates and must be resolved ASAP.
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2014-10-12 16:52:43 UTC
Added maintainer of ports-mgmt/porttools to provide feedback
Comment 2 Johannes Jost Meixner freebsd_committer 2014-10-16 14:01:25 UTC
port submit used GNATS send-pr(1). Once we have a command line interface to submitting bugs to FreeBSD's bugzilla, I'll happily integrate that.

So far I'm unaware of any CLI in any version including 11.0-CURRENT that can be used to submit bugs.

In my opinion the issue is not that much ports-mgmt/porttools not being able to submit, but FreeBSD users in general not having any tool in base that can be used to submit bugs.

(I may be wrong. In case we *do* have any send-pr-ish tool in base, now would be a good moment to let me know about it ;-)
Comment 3 mwisnicki+freebsd 2014-10-16 16:24:13 UTC
FreeBSD support page does not mention anything but perhaps any generic bugzilla client will do ? I've tried textproc/py-bugzillatools but unfortunately it seems broken.
Comment 4 Johannes Jost Meixner freebsd_committer 2014-10-16 16:27:40 UTC
I doubt any python tool will ever arrive in base;
it'd mean having to import python into base and that is highly unlikely to my best knowledge.
Comment 5 mwisnicki+freebsd 2014-10-16 16:30:07 UTC
Oh I didn't mean that. Perhaps having something in base could be useful but in the mean time  I see nothing wrong with depending on another port, since all port maintenance tools are in ports too.
Comment 6 Johannes Jost Meixner freebsd_committer 2014-10-17 10:41:34 UTC
I'd prefer a solution to submit bugs from within base. 

Do feel free to provide patches, if you have an idea how porttools can achieve that.
You can find the source of the submit script here:

Comment 7 Marcus von Appen freebsd_committer freebsd_triage 2014-10-17 22:48:14 UTC
Bugzilla offers an XMLRPC and JSONRPC api - integrating this with e.g. curl or something like that may help here. One just needs to provide the login credentials on submission.
Comment 8 Marcus von Appen freebsd_committer freebsd_triage 2014-10-21 17:45:53 UTC
send-pr(1) has been restored in some way. It is however inappropriate in several ways and needs to be replaced with an improved solution.

@xmj: what do we do with port-tools (original request)? Deactivate/mark `port submit` as broken in the meantime?
Comment 9 commit-hook freebsd_committer 2014-10-27 12:24:33 UTC
A commit references this bug:

Author: xmj
Date: Mon Oct 27 12:23:55 UTC 2014
New revision: 371562
URL: https://svnweb.freebsd.org/changeset/ports/371562

  ports-mgmt/porttools: upgrade to 1.03

  - Upgrade to 1.03

  - Mark port submit as broken
  - Mark port followup as broken

  PR:		194323
  Differential Revision:	https://reviews.freebsd.org/D992
  Approved by:	swills (mentor)

Comment 10 linpct 2015-01-13 16:34:08 UTC
Hello, all.

I wrote a bugzilla send-pr tool called 'mothra' (https://github.com/pct/mothra) and it has following commands like:

  mothra attach <bug_id>, <file_path>      # add attachment to <bug_id>
  mothra browse <bug_id>                   # open <bug_id> at your browser
  mothra create <summary>                  # set PR summary only, no attachments
  mothra get <bug_id>                      # get info of <bug_id>
  mothra help [COMMAND]                    # Describe available commands or one specific command
  mothra search <keyword>, <days_ago=180>  # search keyword from bugzilla summary for last 180 days or you want
  mothra submit <summary>, <file_path>     # send-pr to bugs.freebsd.org

I had send more then 3 PRs using mothra just like:

`mothra submit '[MAINTAINER] graphics/p5-Image-ExifTool-devel update to 9.81' p5-Image-ExifTool-devel.patch`

And it creates bugzilla post like https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196684

Could you give it a try and give me some feedback?

Comment 11 Johannes Jost Meixner freebsd_committer 2015-01-14 13:15:43 UTC
Did you already submit a separate port for mothra?
Comment 12 linpct 2015-01-14 13:40:21 UTC
No, mothra is only a ruby gem now, did you mean it should be a port at ports-mgmt?

Comment 13 Rene Ladan freebsd_committer 2017-01-23 22:14:11 UTC
Comment 14 linpct 2017-01-26 10:12:51 UTC
Hi, I'd let mothra at https://www.freshports.org/sysutils/rubygem-mothra/ for a while, could it use or need other language implement? I could use Elixir or Python.

Comment 15 Johannes Jost Meixner freebsd_committer 2017-06-05 13:39:02 UTC
Add porttools maintainer
Comment 16 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2018-04-17 20:25:22 UTC
(In reply to linpct from comment #14)

Daniel, do you still maintain mothra gem? I'm looking into command-line interface for bugs.freebsd.org. py-bugz in general works, it's OK-ish for posting comments and attaching files to existing bugs but for opening new PRs it's not very good. I have several ideas for more specialized CLI script that I'd like to try but if there is an actively maintained tool, we can coordinate efforts. I'd prefer the tool to be written in Python though: (a) I'm more familiar with it than with Ruby (b) pool of developers who can participate in working on the tool is larger.
Comment 17 linpct 2018-04-18 04:37:46 UTC
(In reply to Oleksandr Tymoshenko from comment #16)

Hi, Mothra ruby gem(https://github.com/pct/mothra) still works but I'm not maintain it for 3 years.

Please start your python project and let me know if I could help.

Comment 18 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-17 05:35:48 UTC
Update on WIP. I release scarab[1] tool that I believe can be used for ports PR submission. Please try and let me know if some essential functionality is missing or too complex.

[1] https://github.com/gonzoua/scarab