All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <George.Dunlap@citrix.com>
To: Nick Rosbrook <rosbrookn@gmail.com>
Cc: Nick Rosbrook <rosbrookn@ainfosec.com>,
	xen-devel <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>,
	Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH 3/3] golang/xenlight: add necessary module/package documentation
Date: Tue, 12 May 2020 17:20:08 +0000	[thread overview]
Message-ID: <16919263-9167-4BB1-9583-F7899FE3A246@citrix.com> (raw)
In-Reply-To: <9f5000ceea14e6818e491df38eba161c800b4cf8.1588282027.git.rosbrookn@ainfosec.com>



> On Apr 30, 2020, at 10:39 PM, Nick Rosbrook <rosbrookn@gmail.com> wrote:
> 
> Add a README and package comment giving a brief overview of the package.
> These also help pkg.go.dev generate better documentation.
> 
> Also, add a copy of Xen's license to tools/golang/xenlight. This is
> required for the package to be shown on pkg.go.dev and added to the
> default module proxy, proxy.golang.org.

libxl is actually under the LGPL; I guess we want the xenlight package to be the same?

As discussed before, arguably distributing the *.gen.go files won’t be sufficient to comply with the license, because they are not the “preferred form of modification”: that would be libxl_types.idl, along with the python generators.

OTOH, I suppose that’s sort of Google’s problem in some ways...

> 
> diff --git a/tools/golang/xenlight/README.md b/tools/golang/xenlight/README.md
> new file mode 100644
> index 0000000000..42240e2132
> --- /dev/null
> +++ b/tools/golang/xenlight/README.md
> @@ -0,0 +1,17 @@
> +# xenlight
> +
> +## About
> +
> +The xenlight package provides Go bindings to Xen's libxl C library via cgo. The package is currently in an unstable "preview" state.

We should probably try to slot it into one of the official terms we use in SUPPORT.md (and also add it to SUPPORT.md!).

ATM you can’t even do a full VM lifecycle with it properly (to include harvesting destroyed domains); so I think it would come under “experimental”.

> This means the package is ready for initial use and evaluation, but is not yet fully functional. Namely, only a subset of libxl's API is implemented, and breaking changes may occur in future package versions.
> +
> +Much of the package is generated using the libxl IDL. Changes to the generated code can be made by modifying `tools/golang/xenlight/gengotypes.py` in the xen.git tree.
> +
> +## Getting Started
> +
> +```go
> +import (
> +        "xenbits.xen.org/git-http/xen.git/tools/golang/xenlight"
> +)
> +```
> +
> +The module is not yet tagged independently of xen.git, so expect to see `v0.0.0-<date>-<git hash>` as the package version. If you want to point to a Xen release, such as 4.14.0, you can run `go get xenbits.xen.org/git-http/xen.git/tools/golang/xenlight@RELEASE-4.14.0`.

I think I would say something like:

—

The module is not yet tagged independently of xen.git; if you don’t specify the version, you’ll get the most recent development version, which is probably not what you want.  A better option would be to specify a Xen release tag; for instance: `go get xenbits…./xenlight@RELEASE-4.14.10`.

—


> diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go
> index 6b4f492550..3eaa5a3d63 100644
> --- a/tools/golang/xenlight/xenlight.go
> +++ b/tools/golang/xenlight/xenlight.go
> @@ -14,6 +14,8 @@
>  * You should have received a copy of the GNU Lesser General Public
>  * License along with this library; If not, see <http://www.gnu.org/licenses/>.
>  */
> +
> +// Package xenlight provides bindings to Xen's libxl C library.
> package xenlight


Will this comment replace the comment above it in the pkg.go.dev module page?

 -George


  reply	other threads:[~2020-05-12 17:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30 21:38 [PATCH 0/3] initialize xenlight go module Nick Rosbrook
2020-04-30 21:38 ` [PATCH 1/3] golang/xenlight: re-track generated go code Nick Rosbrook
2020-05-12 14:48   ` George Dunlap
2020-04-30 21:39 ` [PATCH 2/3] golang/xenlight: init xenlight go module Nick Rosbrook
2020-05-12 14:36   ` George Dunlap
2020-05-12 15:06     ` Nick Rosbrook
2020-05-12 15:47       ` George Dunlap
2020-05-12 15:58         ` Nick Rosbrook
2020-05-12 17:30       ` George Dunlap
2020-05-12 17:37         ` George Dunlap
2020-05-12 23:36         ` Nick Rosbrook
2020-04-30 21:39 ` [PATCH 3/3] golang/xenlight: add necessary module/package documentation Nick Rosbrook
2020-05-12 17:20   ` George Dunlap [this message]
2020-05-12 21:59     ` Nick Rosbrook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16919263-9167-4BB1-9583-F7899FE3A246@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=rosbrookn@ainfosec.com \
    --cc=rosbrookn@gmail.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.