Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 4.17.4 #1234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alejandro-colomar
Copy link
Collaborator

Closes: #1216
Cc: Chris Hofstaedtler [email protected]
Cc: https://github.com/yonecle

Closes: <shadow-maint#1216>
Cc: Chris Hofstaedtler <[email protected]>
Cc: <https://github.com/yonecle>
Signed-off-by: Alejandro Colomar <[email protected]>
Copy link
Collaborator

@ikerexxe ikerexxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alejandro-colomar
Copy link
Collaborator Author

@hallyn , would you do the honours? :-)

@jubalh
Copy link
Member

jubalh commented Mar 3, 2025

We should come up with an idea how we want to write changelogs. We have both a NEWS and a ChangeLog file. Neither of which we update.

The git commit history is a mess to just drop in as a changefile due to having this ugly directory/: or file: infront of each commit. I don't get why we do this. We see the files changed in the rest of the commit. We don't need this in the subject and it just clutters it. Makes it harder to grasp what have been done and harder to generate changelogs.
We could have such prefixes for subsystems like ci:, doc: etc. But the directory?

Compare this to a git commit with the subject Improve the login.defs unknown item error message. This can easily be dropped in a changelog.

Question1: Why do we prefix the dir/file on the git subject line?

Additionally we have a billion of commits that are more or less the same just regard different files. Like src/useradd.c: Use !strcaseeq() instead of its pattern and lib/, src/: Use strcaseeq() instead of its pattern.

To have this in separate commits is good practise. In a changelog we would want only one entry for something like this though.

Earlier we had nice merge commits. Which could be used exactly for this reason.
Take for example: 39eea79 it sais Resolve several compiler warnings which is perfect for a changelog and the invididual commit messages that are mostly interesting for developers or if you want to check them are like Declare file local functions static and Use strict prototypes etc.
So to have merge commits makes total sense. Then we could have changelog entries like Resolve several compiler warning #487. And everybody would have an easy time to understand what changed in general, then could check the PR for the discussion and details.

Question2: Why did we get rid of merge commits?

One option could be to write changelogs from hand. Or we could use GitHub or any other tool to let it write them for us. But with our current git history those will only have suboptimal results.

The best way would be to have sane defaults so that we can use the proper tools that automate the changelog process.
For stable distributions with a long lifetime our current approach won't be the best.

Additionally I think we should create system tests upon each report of a regression like for example #1210 to make sure it doesn't happen again.

So my suggestion would be to go back to have merge commits, drop the prefix in git subject lines and generate the changelog automatically upon a new release based on the merge commits. I would also volunteer to edit them by hand to have them in a better state in case automation will not lead to desired results.
I will also try to keep an eye open for issues and try to contribute tests to catch regressions earlier.

I think we should unify the NEWS and ChangeLog file into one and just link to the other. In my opinion having a file with just git history isn't necessary and one of those files should just be information for the end user to understand what changed and what to look out for.

@alejandro-colomar
Copy link
Collaborator Author

We should come up with an idea how we want to write changelogs. We have both a NEWS and a ChangeLog file. Neither of which we update.

I personally don't find the changelogs useful for myself. If anyone uses them, it would be interesting to know what is expected there.

I do still maintain the change log in the Linux man-pages project, which I update manually (every release, I write it in the last commit right before each release, and after the release I move those changes from Changes to Changes.old). If you think that looks good to you and is useful, maybe we could do that.

https://web.git.kernel.org/pub/scm/docs/man-pages/man-pages.git/log/Changes*

On the other hand, I wonder if we could just get rid of changelogs.

The git commit history is a mess to just drop in as a changefile due to having this ugly directory/: or file: infront of each commit. I don't get why we do this. We see the files changed in the rest of the commit. We don't need this in the subject and it just clutters it. Makes it harder to grasp what have been done and harder to generate changelogs. We could have such prefixes for subsystems like ci:, doc: etc. But the directory?

When seeing the git-log(1), especially in --oneline mode, I find it very useful to learn the files that a commit touches. It's actively useful to me. Maybe I can reduce the precision of that information, and for example specify only lib/string/ instead of the full path I'm touching. Would that help? I've been doing that in a few cases where the path was too long and not too useful (redundant with the rest of the subject line).

Compare this to a git commit with the subject Improve the login.defs unknown item error message. This can easily be dropped in a changelog.

That message, to me, is slightly unuseful. I'd have preferred prefixing it with lib/, src/:. That would tell me where we're doing the things. Lately, I've been having to rebase huge amounts of commits; I have around 200 commits in my local tree on top of master, in around 30 branches. And I need to rebase them often, whenever a few patches are applied on top of master, because they all get conflicts with each other. Knowing the affected files helps me a lot in conflict resolution.

Also, when investigating a bug, in a git-blame(1) session, I also get some help from the subject prefixes.

And it's also useful when we fix a bug, in the Fixes tag, to see what was touched by the commit we're fixing, without showing that commit.

Fixes: 16cb66486554 (2024-07-01; "lib/, src/: Use strsep(3) instead of its pattern")

Question1: Why do we prefix the dir/file on the git subject line?

To have an idea of the files being modified in a commit from the subject line alone. The subject line is the only thing I see in git log --all --graph --online, which is what I use all the time.

Additionally we have a billion of commits that are more or less the same just regard different files. Like src/useradd.c: Use !strcaseeq() instead of its pattern and lib/, src/: Use strcaseeq() instead of its pattern.

To have this in separate commits is good practise. In a changelog we would want only one entry for something like this though.

I think I wouldn't even mention those on a changelog. Nothing changes to the end user nor the packager, at all. It's only useful to know for developers, who will see the git-log(1) for that, anyway.

Earlier we had nice merge commits. Which could be used exactly for this reason. Take for example: 39eea79 it sais Resolve several compiler warnings which is perfect for a changelog and the invididual commit messages that are mostly interesting for developers or if you want to check them are like Declare file local functions static and Use strict prototypes etc. So to have merge commits makes total sense. Then we could have changelog entries like Resolve several compiler warning #487. And everybody would have an easy time to understand what changed in general, then could check the PR for the discussion and details.

Question2: Why did we get rid of merge commits?

Merge commits occasionally are good. Merge commits as a rule are not so nice, and clutter the git-log(1).

I would like to have both options, and decide, depending on the PR itself. For PRs that introduce many commits, I think we should do merge commits. For small PRs, not.

One option could be to write changelogs from hand. Or we could use GitHub or any other tool to let it write them for us. But with our current git history those will only have suboptimal results.

I prefer writing them by hand, or not writing them at all. Automated changelogs are useless, and one should instead parse the git-log(1) for the same info.

The best way would be to have sane defaults so that we can use the proper tools that automate the changelog process. For stable distributions with a long lifetime our current approach won't be the best.

Additionally I think we should create system tests upon each report of a regression like for example #1210 to make sure it doesn't happen again.

Feel free to contribute them. I don't have time for that, and honestly, I don't enjoy writing them as much as I enjoy simplifying code. I don't even understand python and the new framework for tests. And I wasn't confident running the old shell test suite either, nor understood it well either.

I have a queue of 200 patches at the moment, enough for a year of reviews. If I start writing tests for all of them, that will grow significantly, so we'll finish merging them by 2030. :)

So my suggestion would be to go back to have merge commits, drop the prefix in git subject lines and generate the changelog automatically upon a new release based on the merge commits. I would also volunteer to edit them by hand to have them in a better state in case automation will not lead to desired results. I will also try to keep an eye open for issues and try to contribute tests to catch regressions earlier.

I'd appreciate being able to do merge commits, and do them by hand (so pushing from the terminal, not just a generated merge commit from github), so I can make them informative. I would use them selectively, though. And we should make sure we rebase stuff often (not neccessarily always) to not create a mess of a git-log(1).

I don't agree with the subject prefix, as it's useful to me. I'll try to keep it short, in cases where a full path might hurt too much.

I refuse to have an automated changelog, but a manual one, if it's useful to you, I don't know. What do the others think? I'd just remove the changelogs and the news files.

I appreciate if you'd contribute tests. That would be useful.

I think we should unify the NEWS and ChangeLog file into one and just link to the other. In my opinion having a file with just git history isn't necessary and one of those files should just be information for the end user to understand what changed and what to look out for.

Yep, one should be removed. Probably the ChangeLog I'd drop it. The NEWS file might be interesting to note important stuff.

I don't think linking is a good idea, though. It's better to remove it. And let people interested in the old changelog to find it in the git history, but not in the working tree.

@alejandro-colomar alejandro-colomar marked this pull request as draft March 3, 2025 22:33
@alejandro-colomar

This comment was marked as resolved.

@jubalh
Copy link
Member

jubalh commented Mar 4, 2025

I personally don't find the changelogs useful for myself.

Because you are not a packager/distribution maintainer ;)
People who only sporadically check this project and don't have deep insights what's being worked on and got changed need changelogs to understand that.

They need to know:

  • which new features are there
  • which bugs got fixed
  • which incompatibilities are there? did a feature vanish? was a binary dropped? support for PAM?
  • regressions (fixed)?

They usually don't need to know details about implementation. Until they suddenly sometimes do. Which is why the issue number or PR number from a merge commit would be helpful to read up on those details. Both the details of the discussion and seeing the individual commits.

I refuse to have an automated changelog, but a manual one

The discussion about having automated or manually written changelogs is as old as having projects. There are various pros and cons. I listed above how to have them automated.
The downside of the manual ones is obviously that someone needs to do it. And usually this is the point why projects (after some time) fall back to automated ones. Which is why I proposed a mix approach, with mostly automation.

@alejandro-colomar
Copy link
Collaborator Author

I personally don't find the changelogs useful for myself.

Because you are not a packager/distribution maintainer ;) People who only sporadically check this project and don't have deep insights what's being worked on and got changed need changelogs to understand that.

They need to know:

* which new features are there

* which bugs got fixed

* which incompatibilities are there? did a feature vanish? was a binary dropped? support for PAM?

These contents seem reasonable, and are what I include in the Linux man-pages changelog. We could do that.

They usually don't need to know details about implementation. Until they suddenly sometimes do. Which is why the issue number or PR number from a merge commit would be helpful to read up on those details. Both the details of the discussion and seeing the individual commits.

I refuse to have an automated changelog, but a manual one

The discussion about having automated or manually written changelogs is as old as having projects. There are various pros and cons. I listed above how to have them automated. The downside of the manual ones is obviously that someone needs to do it. And usually this is the point why projects (after some time) fall back to automated ones. Which is why I proposed a mix approach, with mostly automation.

When releasing versions of the Linux man-pages I usually take half an hour (or a couple of hours if the release is really huge) for writing it. I wouldn't mind doing it myself. I can take a similar approach. Whenever we want to release, I can do the work on the Changelog. Let's start with 4.18.0 for that?

@ikerexxe
Copy link
Collaborator

ikerexxe commented Mar 4, 2025

We should come up with an idea how we want to write changelogs. We have both a NEWS and a ChangeLog file. Neither of which we update.

We stopped using and updating those files some time ago, and I'd prefer to keep it that way. Those files are there for history purposes. Having said that, I agree that we should have some kind of release notes that are helpful for the audience (see below).

The git commit history is a mess to just drop in as a changefile due to having this ugly directory/: or file: infront of each commit. I don't get why we do this. We see the files changed in the rest of the commit. We don't need this in the subject and it just clutters it. Makes it harder to grasp what have been done and harder to generate changelogs. We could have such prefixes for subsystems like ci:, doc: etc. But the directory?

The important topic here is the audience. git history is mainly used by developers, and I agree with Alejandro that having those type of messages is helpful for this type of audience. And now if I switch my hat to a distribution maintainer, I agree that those messages aren't very useful. Maybe the developers should try to improve the commit body message so that other people apart from themselves understand what is happening.

To have this in separate commits is good practise. In a changelog we would want only one entry for something like this though.

The release notes should be informative for a more general audience, like distribution maintainers and sysadmins, so I agree that they should contain more information about the actual issues fixed in a given release.

I would also like to have good release notes and have them created automatically. If you have any ideas on how to achieve this feel free to propose it.

Additionally I think we should create system tests upon each report of a regression like for example #1210 to make sure it doesn't happen again.

As a final note. I completely disagree with having tests for each regression. I've worked in several projects where this happened and test maintenance was a nightmare. I'd prefer to have comprehensive tests where the most common use cases are tested. If some corner case is missing, that's fine, as long as the general use cases are working and users can use the software in their day to day.

@alejandro-colomar
Copy link
Collaborator Author

alejandro-colomar commented Mar 4, 2025 via email

@jubalh
Copy link
Member

jubalh commented Mar 4, 2025

We stopped using and updating those files some time ago, and I'd prefer to keep it that way

Release notes or News file - basically I don't care. But since the file already exist and had such a purpose.. Why not use it?

The important topic here is the audience

As mentioned above by devs vs maintainers/distributions.

I would also like to have good release notes and have them created automatically. If you have any ideas on how to achieve this feel free to propose it.

Which I just did in the comment above :)

As a final note. I completely disagree with having tests for each regression. I've worked in several projects where this happened and test maintenance was a nightmare.

That's interesting, what exactly was a nightmare? I can't see any downsides and thought the purpose of tests is to make sure functionality is as expected.

@alejandro-colomar alejandro-colomar marked this pull request as ready for review March 4, 2025 15:38
@ikerexxe
Copy link
Collaborator

ikerexxe commented Mar 5, 2025

Release notes or News file - basically I don't care. But since the file already exist and had such a purpose.. Why not use it?

I'd say most people read Github release notes page. If anything.

Which I just did in the comment above :)

Right, I don't know I wrote that.

That's interesting, what exactly was a nightmare? I can't see any downsides and thought the purpose of tests is to make sure functionality is as expected.

The sheer number of tests is the problem and the little value they provide. Since we are working on shadow let me show you test example that was written a LONG time ago and that we currently run to test our distributions:

#!/bin/bash                                                                      
                                                                                 
# Make sure faillog doesn't take ages on 64-bit systems                          
# BZ #177017 for more details.                                                   
                                                                                 
# to prevent other error messages                                                
if [ $EUID -ne 0 ]; then                                                         
        echo "This test requires root privileges"                                
        exit 1                                                                   
fi                                                                               
                                                                                 
touch /var/log/faillog                                                           
faillog -m 32767 -r

This test was created to test https://bugzilla.redhat.com/show_bug.cgi?id=177017. In my opinion, the value of this test today is almost nil.

From a more theoretical point of view, a feature like useradd would need thousands of tests to be fully tested. Given that it is unlikely that we will ever have that many tests, and given that we have users using this feature every day it is quite likely that someone will come up with the extraordinary idea that the ID can be a set of alphanumeric characters. Example: useradd -u ten or useradd -u 0xae89. The user could argue that nowhere ten or 0xae89 are numbers, but expressed in another way, or that it used to work like that twenty years ago. These would be valid regression tests, but their value would be very low.

I hope you understand my position on creating regression tests for all cases. I am not saying that regression tests should not be created, just that we should use our heads before creating them because this part is usually easy but then maintaining them during the years that the software is used is another matter.

@hallyn
Copy link
Member

hallyn commented Mar 6, 2025

For the kind of thing @jubalh is asking for, I don't think spending a few hours at release time is the best way. It would work better to try and get PRs to update the changelog when they do something a package maintainer would want to know. The trick of course is how to know when that's the case.

That, and then I start feeling like people who's changes aren't called out will feel slighted :)

So I end up just doing 'git shortlog', because actually I think that does pretty well.

@alejandro-colomar
Copy link
Collaborator Author

For the kind of thing @jubalh is asking for, I don't think spending a few hours at release time is the best way. It would work better to try and get PRs to update the changelog when they do something a package maintainer would want to know. The trick of course is how to know when that's the case.

That would add more friction to the PRs. For example, GCC does this in the commit messages, and I find it very cumbersome to update the changelogs correctly. In their case, it's fair, since their releases are huge, and updating the changelog at release time wouldn't be doable.

That, and then I start feeling like people who's changes aren't called out will feel slighted :)

Yep, that's a thing. I try to make it objective:

  • If behavior changes, it should be noted.
  • If distros need to update anything, it should be noted.

Otherwise, I tend to not mention it. Unless for some reason I make an exception. Exceptions break that objectivity, but hopefully not too much. Also, I add a few lines saying that there are changes not mentioned there, but that are present in the release.

Example from this morning, from the release of man-pages-6.13:
https://lore.kernel.org/linux-man/ft2zbwghk6hbnhlawjigckegrk3yekyeiudp43gafoububm5ma@mbkqcvh4idyf/T/#u

So I end up just doing 'git shortlog', because actually I think that does pretty well.

I'm okay if you prefer that. But if we go that way, my only ask is that the changelog file not be updated. I'd keep that only in the release notes.

@hallyn
Copy link
Member

hallyn commented Mar 8, 2025

Yeah, that's what I'm doing, putting it in the release notes.

If you're already clickity-clicking in the github webui, I think that's a lot easier than alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.17.4 release plan
4 participants