• Standard parsable format for profiles/package.mask file

    From Arthur Zamarin@21:1/5 to All on Thu Sep 21 21:50:01 2023
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------pUSBHvcD0ZYRkE4PAgc0AVbR
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: quoted-printable

    Hi all

    I want to suggest a standard format for profiles/package.mask, for
    multiple reasons:

    1. Easier to write simple to understand mask or last-rites entries. When
    all entries are in similar format, the reader knows where to expect
    important information and such. Also easier for writer to convey all
    needed information.

    2. We can teach tools to parse it and render nicely, or help you fill
    the file. For example I've tried to implement a parser for
    packages.gentoo.org so it shows as nice as possible the message, see as
    example [1]. On the other hand, `pkgdev mask` [2] can help you fill the
    message (including bug number, last-rite until date, author & email
    line). Both of them mostly works, but when someone "breaks" the
    unofficial syntax, the tools fail sadly.

    This is why I want to recommend we create a mostly standard syntax, so
    we can all expect the same thing and have nice things.
    Also please note that for now I want to formalize the format only for profiles/package.mask file, and not the one inside all the different
    profiles. If you think we better apply to all of them, we can think on
    it separately please :)

    The current format is mostly acceptable, but let's tighten it. I will
    implement a pkgcheck check that will validate the format and error out
    if invalid.

    [1] https://packages.gentoo.org/packages/sys-fs/eudev
    [2] https://pkgcore.github.io/pkgdev/man/pkgdev/mask.html

    ===== "Formal" format =====

    Each entry is composed of 2 parts: "#"-prefixed explanation block and
    list of "${CATEGORY}/${PN}" packages. Entries are separated when a new explanation block starts (meaning first "#"-prefixed line after packages
    list). You may add newlines between packages in packages list.

    The first line of the "#"-prefixed explanation block must be of the
    format "${AUTHOR_NAME} <${EMAIL}> (${SINGLE_DATE})" when the date is of
    format YYYY-MM-DD, in UTC timezone.

    If this is a last-rite message, the last line must list the last-rite
    last date (removal date) and the last-rite bug number. You can also list
    other bugs relevant to the last-rite. So I think a format of: "Removal
    on ${REMOVAL_DATE}. Bug #NNNNNN, #NNNNNN." Where the bug list is comma
    and space separated, we have at least one space (" +" regex) between the removal date and bug list, and the date is of YYYY-MM-DD format.
    I prefer this line is separate (and not continuous of prefix message text).

    The explanation block itself can reference bugs, by matching the regex "[Bb]ugs? #\d+(, +#\d+)*" (For example: "bug #713106, #753134"). I think
    this is quite a simple one, but powerful enough for most.

    Lines with single newline between them (so no blank line between them)
    are considered as single paragraph continuum. If you want to start new paragraph, leave a blank line (still prefixed with #) - think similar to markdown. A line matching the last-rite line is always it's own paragraph.

    ========= Example =========

    After all of those rambling, here is an example (it will result in 3 paragraphs, 2 explanation and 1 last-rite finish):

    # Arthur Zamarin <arthurzam@gentoo.org> (2023-09-21)
    # Very broken, no idea why packaged, need to drop ASAP. The project
    # is done with supporting this package. See for history bug #667889.
    #
    # As a better plan, you should migrate to dev-lang/perl, which has
    # better compatibility with dev-lang/ruby when used with dev-lang/lua
    # bindings.
    # Removal on 2023-10-21. Bug #667687, #667689.
    dev-lang/python

    ==== Call for comments ====

    So how does it sound? I know it is easy to try to limit the syntax for
    me (since I"ll need to implement parsing of it), but I think this format
    above matches most of the currently used once, and the one created by
    `pkgdev mask`. But i needed, I'm open to improve it by comments.

    Should it be a GLEP, I don't think so? But I'm unsure about it. We do
    need to document it (for example header of that exact file).


    --
    Arthur Zamarin
    arthurzam@gentoo.org
    Gentoo Linux developer (Python, pkgcore stack, Arch Teams, GURU)

    --------------pUSBHvcD0ZYRkE4PAgc0AVbR--

    -----BEGIN PGP SIGNATURE-----

    iQEzBAEBCgAdFiEE/axFlFuH2ptjtO5EAqCvUD0SBQQFAmUMnBUACgkQAqCvUD0S BQSdwgf+LPbufYu3qzGDx0XXTnCdu9CGLpD+WbqeoYesvaN0MzTPDKaWjv/liAMs jTy8oxIJ+TyDCcguVgmj1LC2We5FCHvEzdvBbEUX/RWyfj/pQvq+vnOTUNVILSdZ bd/jnjHhhVqNeTjwoDo2pa1+j5LLd3/1WyJgaEyctQafz+tYXRbfDSTsP0EsYaEu m1yra9ovySGZvvBPbukmj8q/pYZHB6CybOXQ5AZ0p/PYI2BTm4rO7ZGqds1wzLXX PyF0b+w6U0S4wc9Ue0TneKdtBSmfSQPls8RQz5zZSk+hi4JucbyO/4Rz1M8Mywt1 5HVYt8yduVsHf0BRy4zo17b31Vogpg==
    =4oc+
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonas Stein@21:1/5 to All on Sun Sep 24 20:30:01 2023
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------rr18GR9W2jjIvi8Gpu1ivFcG
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    SGkgYWxsLA0KDQoNCj4+IEkgd2FudCB0byBzdWdnZXN0IGEgc3RhbmRhcmQgZm9ybWF0IGZv ciBwcm9maWxlcy9wYWNrYWdlLm1hc2ssIGZvcg0KPj4gbXVsdGlwbGUgcmVhc29uczoNCj4g DQo+IFNvdW5kcyBzZW5zaWJsZS4gKzENCj4gDQo+PiBUaGUgZmlyc3QgbGluZSBvZiB0aGUg IiMiLXByZWZpeGVkIGV4cGxhbmF0aW9uIGJsb2NrIG11c3QgYmUgb2YgdGhlDQo+PiBmb3Jt YXQgIiR7QVVUSE9SX05BTUV9IDwke0VNQUlMfT4gKCR7U0lOR0xFX0RBVEV9KSIgd2hlbiB0 aGUgZGF0ZSBpcyBvZg0KPj4gZm9ybWF0IFlZWVktTU0tREQsIGluIFVUQyB0aW1lem9uZS4N Cj4gIMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgXl5eXl5eXl5e Xl5eXl5eXg0KPiANCj4gQ2FuIHdlIGRyb3AgdGhpcz8gT3IsIGF0IGxlYXN0LCByZWxheCB0 aGlzLg0KPiANCj4gSSB1c3VhbGx5IGp1c3QgZW50ZXIgbXkgbG9jYWxlIGRhdGUgaGVyZSBh bmQgbGlrZSB0byBhdm9pZCBoYXZpbmcgdG8gDQo+IHRoaW5rIGFib3V0IHRoYXQgVVRDIGlz IHBvdGVudGlhbGx5IGluIGEgZGlmZmVyZW50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eTiwHjLu1mHVVtVERhd782EwoRIMW9BxE55Y/bTOFX/LVTS I2o8W/SPUCUc8SEO7z3uzWUDIWRkNtdjxZ60ojv4D8ETlpIlaRPFa5EcPNQSTxWM0bTM8GLimLqV G1/ZSzUIoM+wI9Y3CppSloimjkT8NV4N9qoWOD1H0kmsRPp/cT/jQ49rGOkhB1Bo33QFVQMOT9Gf +QKpXGAsBTKAM4EB5wiFHXQ8VXI64U7ntYZGsBQS8equApLeVlsw/cDOjtWCx+N/8htb77+0zK+m kgTEJC8l9m31A4PQlFhGDX4z8tsGBTPG92xiGeNlng==
    =RgF+
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonas Stein@21:1/5 to All on Sun Sep 24 20:50:01 2023
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------qKgdhC06UWsgDd2IxJWHtXoj
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    SGkgYWxsLA0KDQo+ICMgUmVtb3ZhbCBvbiAyMDIzLTEwLTIxLiAgQnVnICM2Njc2ODcsICM2 Njc2ODkuDQoNCldlIHNob3VsZCB1c2UgImFmdGVyIiBpbnN0ZWFkIG9mICJvbiI6DQoNCiMg UmVtb3ZhbCBhZnRlciBUDQoNCi0tIA0KQmVzdCwNCkpvbmFzDQoNCg==

    --------------qKgdhC06UWsgDd2IxJWHtXoj--

    -----BEGIN PGP SIGNATURE-----

    wsB5BAABCAAjFiEE84qjnRh6gS99k6Si4XQFRgm/aJkFAmUQgpsFAwAAAAAACgkQ4XQFRgm/aJmM +Qf+LmH87kym3k7ZYrMl3QM3GtddVt3FiuxByOp6cYDWzzFATAkXb8q1sSJ7M+v157DmfO0vPdBl +BuFvppdARIXQdNY6oz7OC5zCsNgHVwSBvBUj6TAtZCTMBU5nzJGz7OzYg4zrk2wuaCfONspBJgH obOL49AqkZtZz4R7P9sfCHT2uAjJ2+ONq3lb9v43DaPLKzxu3Cs3Ffu3SG2xLl+j3dDXs7YcweKK EW5XpdRWs0p13GF8lQlH19QD/I8royqWIdTy/C2sbQJdiLl0wGYyDoLaNqkK2dmE1TGUuYN0z37n TCsABcfuqlh5Z8AoEiIdn5Kc+GRufz+FfDOtJToVYg==
    =O+lO
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)