ichthyosaurus / harbour-file-browser

A comprehensive file manager for SailfishOS.
https://forum.sailfishos.org/t/file-browser-support-and-feedback-thread/4566
7 stars 8 forks source link

Changelog generation #67

Open Thaodan opened 2 months ago

Thaodan commented 2 months ago

Would it make more sense to generate the chanelog from the rpm to markdown?

The changelog script doesn't work when building from pristine sources as this would require modifying of sources.

ichthyosaurus commented 2 months ago

How so?

The RPM spec is built from the yaml file using the spec template, and the changelog script just prints the formatted changelog. No sources are changed.

At the time when I wrote that stuff, I was following documentation. I take it you're with Jolla - can you point me to the updated documentation, if there were changes?

Thaodan commented 2 months ago

ichthyosaurus @.***> writes:

How so?

The RPM spec is built from the yaml file using the spec template, and the changelog script just prints the formatted changelog. No sources are changed.

The changelog script doesn't run inside rpm which means that the sources have to change to be plainly built by just rpm e.g. on the OBS.

At the time when I wrote that stuff, I was following documentation. I take it you're with Jolla - can you point me to the updated documentation, if there were changes?

It hasn't changed the changelog scripts never ran inside the built process which mean the only work inside the sdk for local builds.

My goal was to build the package on the obs.

ichthyosaurus commented 1 month ago

The changelog script doesn't run inside rpm which means that the sources have to change to be plainly built by just rpm e.g. on the OBS.

The changelog script simply prints stuff. It doesn't change anything. So basically, your request isn't only about the changelog but about the yaml file/RPM spec generation step in general. Please update the title.

I don't have time to work on switching to plain rpm as the current setup is fine for me, but feel free to open a pull request.

ichthyosaurus commented 1 week ago

It would be nice to have File Browser in Chum but I don't have an account on OBS and Jolla didn't reply to my request. That means the issue doesn't affect me at the moment, and the current workflow suits my current needs.

I'm closing this issue for lack of feedback, and because it's not an issue for me. Feel free to reopen with new info.

Thaodan commented 1 week ago

A simply ping would have been sufficient.

The changelog changes the source that is checked out of the Git sources as it adds another file that didn't exist previously that means it changes the sources as it adds another file. The rpm file is fine as it is not modified during the build.

While I might not have the time to reply/work on the issue it is an issue non the less closing the issue just makes it less visible and disheartening to work on it or try to contribute if you wish that other contribute.

PS: If you don't get a reply try to ping again on IRC at keto in the #sailfishos channel at oftc.

ichthyosaurus commented 1 week ago

I didn't close this issue to antagonise you nor to hide the issue, but simply because the problem doesn't affect me at all. I gave up hope of being able to use OBS because it's apparently not possible for me to get an account.

It still takes time and effort to follow up on things like this, and packaging and maintenance are to me the most grating aspect of development. It's simply something that I don't enjoy doing, so if an issue doesn't affect me, I don't want to spend my limited energy on it. I'm doing this for free, and for fun.

If you provide a PR I'll sure have a look at it.

ichthyosaurus commented 1 week ago

The changelog changes the source that is checked out of the Git sources as it adds another file that didn't exist previously that means it changes the sources as it adds another file. The rpm file is fine as it is not modified during the build.

I had another look at it. To be honest, I don't understand the magic that the SDK performs to get from yaml + changelog.run to a rpm package. If you understand that stuff, and you can find a way to make everything work like now (as in: convert some (?) changelog file back to markdown so it looks the same and doesn't require an additional manual step), then I'll be happy to merge your PR. I don't have time and energy to dive deeper into that.

Thaodan commented 5 days ago

The SDK (mb2) runs spectacle to convert the spectacle yaml file into an rpm or merges the existing rpm if you followed the rules how to insert your custom lines into the spec file.

Further the if the option is given the changelog is generated from git if requested of if changelog.run exist then the script is run to generate the changes file.

mb2 takes care of merging the changes same as the obs does as having a separate changes file instead of writing them into the spec file originates from SUSE.

Unless you want a separate changes file you can just keep the the rpm changes file alone. When uploading your package to Openrepos will parse your package file to extract the changelog into their changelog section.

I don't know of a tool to convert them to Markdown however it should be quite easy as the changelog format is very similar.