Title: Per-package machine-readable metadata about Upstream
DEP: 12
State: ACCEPTED
Date: 2014-02-23
Drivers: Charles Plessy <plessy@debian.org>,
  Andreas Tille <tille@debian.org>
  Jelmer Vernooij <jelmer@debian.org>
URL: http://dep.debian.net/deps/dep12
Source: https://salsa.debian.org/dep-team/deps/-/blob/master/web/deps/dep12.mdwn
Abstract:
 The source package control files and some of their derivatives are currently
 used to document the URL of the home page of the work that is packaged
 ("upstream").  However, this approach is hard to extend to other information
 describing upstream, because the size of the control files has to be limited
 according to the limited power of some systems running Debian.
 .
 We propose a new file in the source packages, debian/upstream/metadata, formatted
 in YAML to hold arbitrary information about upstream, for instance the
 URL to a donation page, bibliographic information about publications
 describing the upstream work, the URL to the upstream sources, etc.
  1. Upstream Metadata Specification
    1. Introduction
    2. Purpose
    3. Fields
    4. Examples
    5. More information
    6. Tools that support this DEP
    7. License
    8. Timeline

Upstream Metadata Specification


Introduction

The debian/upstream/metadata file is in YAML format. There should only be a single YAML document.

In its simplest form, the metadata file looks much like the stanza format used in Debian control files. Nevertheless, there may be sometimes unexpected behaviours, for instance field contents that have a colon inside have to be quoted in some cases. If in doubt, there are validators available, either on-line Online YAML Parser, or in command line (DebPkg:yamllint).

Purpose

The upstream metadata file is meant to contain machine-readable metadata about the upstream project, its community and processes.

Information in this file should not be specific to Debian, and be relevant for other distributions as well.

The following upstream metadata is currently stored elsewhere in Debian control files and should not be included in debian/upstream/metadata.

When defining new fields, the same vocabulary as in DOAP should be used as much as possible.

Fields should be in in alphabetic order.

Fields

Examples

This is an example of a debian/upstream/metadata file for a package that has a lot of information about upstream:

Bug-Database: https://github.com/eradman/entr/issues
Bug-Submit: https://github.com/eradman/entr/issues/new
Changelog: https://github.com/eradman/entr/blob/master/NEWS
Documentation: https://eradman.com/entrproject/entr.1.html
Other-References: https://eradman.com/entrproject/
Repository-Browse: https://github.com/eradman/entr
Repository: https://github.com/eradman/entr.git

And here is an example of a debian/upstream/metadata file for a package that has bibliographic information about upstream, something that is common for scientific software:

ASCL-Id: 1112.019
Contact: astro-aladin@unistra.fr
Name: Aladin
Reference:
 Author: >
      Bonnarel, F. and Fernique, P. and Bienayme, O. and Egret, D.
      and Genova, F. and Louys, M. and Ochsenbein, F. and Wenger, M.
      and Bartlett, J. G.
 title: The ALADIN interactive sky atlas. A reference tool for identification of astronomical sources
 journal: Astronomy and Astrophysics Supplement Series
 year: 2000
 month: Apr
 volume: 143
 pages: 33 - 40
 URL: http://cdsads.u-strasbg.fr/abs/2000A%26AS..143...33B
 eprint: http://aas.aanda.org/articles/aas/pdf/2000/07/ds1785.pdf
 doi: 10.1051/aas:2000331

More information

See http://wiki.debian.org/UpstreamMetadata for the broader discussion about upstream metadata in Debian that this DEP is a result of.

You can find lots of examples of existing debian/upstream/metadata files using codesearch.debian.net.

lintian has a preliminary check for debian/upstream/metadata files.

UDD includes a upstream_metadata table with information extracted from debian/upstream/metadata files.

Tools that support this DEP

upstream-ontologist has a guess-upstream-metadata command that can generate debian/upstream/metadata files.

lintian-brush will automatically update the debian/upstream/metadata file when it finds a new field in the upstream sources, using the upstream-ontologist.

git-buildpackage and breezy-debian read the Repository field from the debian/upstream/metadata file to determine the upstream source repository when import new upstream versions.

debian-json-schemas provides a JSON schema of the file format for validating the file format.


License


This work is dedicated to the public domain, using the Creative Commons Zero (CC0) Public Domain Dedication, version 1.0


Timeline