Pierre-Yves Chibon
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
--- title: Req doc - Dropping release and changelog from spec file tags: Requirements Document, Fedora --- # Getting rid of release and changelog fields in spec files ## Requirements * Opt-in * Opt-out * Changelog generated must be editable * Not all commits must appear in the changelog * Changelog and release fields must be easily "guessable" before making a build * Must not break current RPM/spec files * Must not break local builds * Changes should be minimal for packagers * A build should be traceable to a specific commit at least as easily as now ## Approaches ### Changelog #### Get the list of builds from the build system The macro would start by getting the commit hash for each of the previous builds so the corresponding changelog entries can have the associate <version>-<release>. - Note: This only covers the <version>-<release> part of the changelog and needs to be combined with another idea (cf below) - (-) Heavy reliance on the build system #### Changelog from last build The macro starts by getting the old changelog from the last build and only appends to it the new changes - (-) This is breaking the "must be able to edit the changelog" requirement - (-) Heavy reliance on the build system #### Annotated git tags Use annotated git tags to store the changelog information. * (-) This is not getting rid of a changelog, it just moves it from the spec file into git * (-) Editing the changelog would mean allowing to remove the git tags, thus leading to potential issue in build reproducibility * (+) The user can be prompted with a pre-filled changelog they would just need to review/adjust before doing the tagging operation itself (helps filling the changelog, does not solve editing it) * (?) How is the release field handled? (cf ideas below) #### Towncrier-like Towncrier auto-generates changelog from a collection of "news" files. Everytime someone contributes a change that is worth informing users about, they add a "news" file, which are then gathered together when a release is made. We could have a similar approach, with a `news` folder in the git repo, and have packager contribute content to it as they make changes that would need to be notified to users. * (-) This is not getting rid of a changelog, it moves it to a number of small files in git * (+) Each entry being in a different file, there would not be any conflicts with pull-request and git merges. * (-) For upstream project, towncrier works because when a release is made, the "news" folder is cleared, for a dist-git environment a solution would be needed to "map" news fragment to releases (sub-folder?) * (+) Editing the changelog would mean editing the corresponding news fragment * (-) Maintaining the news folder and fragment would be adding quite some overlap to the workflow * (?) How is the release field handled? (cf ideas below) #### Inclusive Magic Keywords The commit message contains a commit message to tell the process to include its message in the generate changelog. The generated changelog can be tweaked using other magic keywords: #ignore <commit hash> or #replace <commit hash> to either remove or replace a commit message from the generate changelog. * (-) Fragile, parsing commit messages with regex is not nice * (-) Requires changes to our packaging guidelines as not all commit message will be associable to a release, so some entries will not contain the <version>-<release> in the first line. * (+) Self-contained to git, ie: does not require any information from the build system * (?) How to regenerate the changelog for the old releases? #### Exclusive Magic Keywords The commit message contains a commit message to tell the process to exclude a message in the generated changelog. The generated changelog can be tweaked using other magic keywords: #ignore <commit hash> or #replace <commit hash> to either remove or replace a commit message from the generate changelog. * (-) Fragile, parsing commit messages with regex is not nice * (-) Requires changes to our packaging guidelines as not all commit message will be associable to a release, so some entries will not contain the <version>-<release> in the first line. * (+) Self-contained to git, ie: does not require any information from the build system * (?) How to regenerate the release for the old entries? #### External changelog The changelog is stored outside of the spec file, in a different, dedicated, file. * (+) Conflicts in the spec file would no longer occur in the %changelog section * (-) Conflicts in PRs or within git would occur in this new file * (-) This is not getting rid of a changelog, it just moves it to a separate file * (+) No dependency on the build system #### Exclusive Magic Keyword + external changelog The current RPM changelog is removed from the current spec file and placed into another file in dist-git. The macro gets specified the name of the external changelog. The macro generates the changelog up until the last commit touching the external changelog file. A magic keyword can be used to ignore a specific commit (#ignore?). Editing the changelog ends up doing: fedpkg generate-changelog Take the output and put it in the external changelog, tweak it as desired and commit your changes. The macro will include this external changelog and ignore the entire history before that commit. * (+) The external changelog makes it easy for the macro to know when to stop browsing the history * (+) Edit is fairly straight forward * (-) Packagers must remember to include the old entries when they touch the external changelog file * (?) How to get the release of the old entries? ### Release - Get the release field using the number of tags since the last version change - (-) Breaks if two builds are triggered from the same commit -- Note: this is status quo compared to today - (+) Does not rely on the build system - Get the release field from the annotation of the git tag - (-) requires manual work on behalf of the maintainer - (-) Fragile: this means parsing using a regex the git annotation to extract the release information - (-) Breaks if two builds are triggered from the same commit -- Note: this is status quo compared to today - (+) Does not rely on the build system - Compute the release field from the number of successful build since the last version change - (+) Allows trigger two builds from the same commit without any manual change - (+) Close the behavior maintainers have currently - (-) Heavy reliance on the build system - (-) Requires changes to the guidelines: not all changelog entries will be linked to a release - (-) Cannot "guess" the next release value without information from the build system - Compute the release field from the number of commits since the last version change: ``<version>-<commits_number>%{dist}`` - (-) Breaks if two builds are triggered from the same commit -- Note: this is status quo compared to today - (+) Does not rely on the build system - (+) No changes to the guidelines: All changelog entries are linked to a release - (+) Easy to reproduce locally - (+) Easy to link a certain build with a specific commit - (+) Easy to "guess" the next release value before triggering the build - (-) Upgrade path may be problematic if Fn-1 is upgraded to the same version as Fn with more commits - Compute the release field from the number of commits since the last version change and number of successful builds for this ``<version>-<commits_number>.<number of builds for this commit>%{dist}`` - Note: the build number could be hidden for the first build of the release and only added if a specific commit is built twice - (+) Allows trigger two builds from the same commit without any manual change - (-) Relies a little on the build system (can be closely simulated locally) - (+) No changes to the guidelines: All changelog entries are linked to a release - (-) A rebuild from the same commit not having an entry in the git history, will not have a corresponding entry in the changelog - (-) Not fully to reproducible locally (the number of builds would be missing) - (+) Easy to link a certain build with a specific commit - (+) Easy to "guess" the next release value before triggering the build - (-) Upgrade path may be problematic if Fn-1 is upgraded to the same version as Fn with more commits - Compute the release field from EVRs of builds that must be sorted lower (i.e. anything in Fedora versions up to the current one) and EVRs from builds that should be higher, if possible at all (anything in later Fedora versions) - (+) Allows triggering two builds from the same commit without manual intervention - (+) Emulates what many maintainers do manually today for most use cases - (+) Can cater for pre-releases if done right (e.g.: provide a macro for the whole release field, and one for <pkgrel> and <minorbump> as per the versioning guidelines) - (-) Needs the build system for information about builds in this and other Fedora versions - (-) Not easy to reproduce locally because we don't have machine-consumable knowledge about other builds in e.g. the dist-git repo - (-) Covers new release but does not allow to generate old changelog entries with the release information

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully