freshmeat-submit is a command-line tool for submitting release announcements to freshmeat.net. It is intended for batch-mode operation in project release scripts, and designed so that its input format can easily be generated by scripts.
freshmeat-submit accepts release information from binary packages named in the command line, or from an email-message-like data block on standard input, or from command-line flags. Values set with command-line flags override those collected from standard input, which in turn override those collected from binary package files. The accumulated data is entered into the freshmeat database via its XML-RPC interface.
A few flags control the operation of freshmeat-submit itself.
Delete the specified release rather than submitting it. With this option, all data other than Project, Branch, and Release are ignored.
Process command-line options only; don't read data from standard input.
Display the merged record from binary package arguments, standard input and command-line options to standard output. Don't ship it.
Enable verbose debugging of the XML-RPC transaction. This option is mainly for developers.
Release information is accepted from three sources in the following order:
Binary package files named on the command line. Presently the only supported format is RPM. The data from certain RPM tags is mined out of the RPM and merged into the release information.
An RFC-2822-format message, strongly resembling an ordinary email message, on standard input. The message header fields each specify a particular item of release information; the body (if present) becomes the change announcement text.
Command-line switches.
Here is a table of the fields and their corresponding command-line switches:
| Message field | RPM tag | Short switch | Long switch | Explanation |
|---|---|---|---|---|
| Project: | NAME | -p | --project | Name of the project (freshmeat shortname) to operate on. |
| Branch: | - | -b | --branch | Name of project branch to operate on; defaults to “Default branch” |
| Version: | VERSION | -v | --version | Version string to be associated with the release. Conventionally this will look like n.n or n.n.n, where each n is decimal digits. |
| Changes: | CHANGELOGTEXT | -c | --changes | The Changes field. Plain text, no more than 600 characters. If no Changes field or option is already present, the changes text is taken from the body of the RFC-822 message on standard input. |
| Release-Focus: | - | -r | --release-focus | Purpose of this release. See the table of release-focus types below. |
| Hide: | - | -x | --hide | If this field is present and has the value “Y”, this release will not be visible on the project page. |
| License: | - | -l | --license | Specify the license under which the release is issued. Note that this is not copied from the RPM License field, because the values don't map. |
| Home-Page-URL: | URL | -H | --home-page-url | Specify the project home page. |
| Gzipped-Tar-URL: | SOURCE | -G | --gzipped-tar-url | Specify the URL where a gzipped tarball of source can be found. |
| Bzipped-Tar-URL: | SOURCE | -B | --bzipped-tar-url | Specify the URL where a bzipped tarball of source can be found. |
| Zipped-Tar-URL: | - | -Z | --zipped-tar-url | Specify the URL where a zipped tarball of source can be found. |
| Changelog-URL: | - | -C | --changelog-url | Specify the URL where the project changelog can be found. |
| RPM-URL: | - | -R | --rpm-url | Specify the URL where an installable binary RPM can be found. |
| Debian-URL: | - | -D | --debian-url | Specify the URL where an installable Debian package can be found. |
| OSX-URL: | - | -O | --osx-url | Specify the URL where an OS/X binary can be found. |
| BSD-Port-URL: | - | -P | --bsdport-url | Specify the URL where a BSD Ports package can be found. |
| Purchase-URL: | - | -U | --purchase-url | Specify the URL where the software can be purchased. |
| CVS-URL: | - | -S | --cvs-url | Specify the URL of the CVS for this package. |
| Mailing-List-URL: | - | -L | --mailing-list-url | Specify the URL where you can sign up for project mailing lists. |
| Mirror-Site-URL: | - | -M | --mirror-site-url | Specify the URL where an official mirror site for the project can be found. |
| Demo-URL: | - | -E | url-demo | Specify the URL where a demonstration site for the package can be found. |
The license and all URL fields, when specified, actually change the branch record for the project. Only the Changes, Version, Release-Focus, and Hide fields are actually stored for each version.
Here are the release-focus types. Either the string or the integer is acceptable. Case of the string is significant.
| Initial freshmeat announcement | 1 |
| Documentation | 2 |
| Code cleanup | 3 |
| Minor feature enhancements | 4 |
| Major feature enhancements | 5 |
| Minor bugfixes | 6 |
| Major bugfixes | 7 |
| Minor security fixes | 8 |
| Major security fixes | 9 |
Here is an example of a release-information record that could be fed to freshmeat-submit on standard input:
Project: doclifter Version: 1.1 Release-Focus: Major feature enhancements Hide: N Home-Page-URL: http://www.catb.org/~esr/doclifter/ Gzipped-Tar-URL: http://www.catb.org/~esr/doclifter/doclifter-1.1.tar.gz RPM-URL: http://www.catb.org/~esr/doclifter/doclifter-1.1-1.i386.rpm Fixed a bug in conditional evaluation that twadmin(8) tickled. Better detection of pure inclusions. Better blank-section elimination. Kleene star recognized as ... synonym in command synopses. Correct some bugs in semantic-hint collection. Recognize Qt manual pages and use their conventions. Better lifting of mandoc-generated pages. Translate groff-style \[...] escapes, flag unknown ones. Can now parse K&R style function prototypes as well as ANSI ones. This version lifts 96% of 9829 manual pages in a full Red Hat 9 installation with Fedora updates to *validated* XML-DocBook.
More typically, you will run this program in a directory where you have already made an RPM, giving it the RPM as a file argument. In that case, all you will normally need to supply is the Release-Focus field; the other required fields (including, most notably, the Changes field) will be mined out of the RPM.
freshmeat-submit expects to find your Freshmeat credentials here. The correct form for an entry looks like this:
machine freshmeat
login <your_freshmeat_login>
password <your_freshmeat_password>
For security, make sure your ~/.netrc file is not world-readable; we recommend doing chmod 600 ~/.netrc.