-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow PROJECT_YEAR override #3016
Conversation
@jasp00 this is good to merge but can you please explain the problem a bit more? I'd expect the year to only change if a subsequent build was fired between December 31st and January 1st. Is that the edge-case we are coding for here? |
Answering my own question... https://wiki.debian.org/ReproducibleBuilds/About, |
@jasp00 would it make more sense to remove the dynamic value altogether and just offer this information in the version block? |
I will set up a Cron job that will update the year in the version block, and keep |
Please use
I'm not sure I understand the point of this. If you want 100% reproducible builds, we need to make these items static per-release, right? (e.g. the Perhaps we take a step back and make the scripts which populate these fields pull from the last tagged release information rather than blindly pulling a |
Right.
I am not sure if I get the idea, but I do not think pulling from the last tag will work, because the information is needed before tagging. May I upload an |
When we release (e.g. 1.3.0, 1.3.1) stable, each will be triggered by by a Travis-CI script which has access to the git information. From what I understand, reproducible builds will break when the underlying data changes, but if we can extract the timestamp information from the latest commit, it should be pretty solid. |
As far as I understand, the release process goes:
Is this correct?
The most recent commit, which may not be the latest. That timestamp information should be in the tree to be included in the "source code" file. A script should be run to update this information (contributor list and project year) just before the release is published. |
I'm not sure about (50 commit depth limitation in) bullet 2 above. The rest is correct. Why a script to touch source? What's wrong with letting CMake/ |
This can be configured.
Nothing, let us use |
git show -s --format=%ci Outputs:
So |
d2d017c
to
7231110
Compare
Now the information from Git history is generated with |
I still don't get the problem with just creating these at build time. |
The information will be generated as part of the deployment by Travis CI, after the build. It cannot be created at build time because the Git log is missing when building from the source tarball and from a shallow repository, like Travis does. |
Fine, we bundle a default one then. We should add a commented disclaimer to it that the information is a snapshot and may be outdated.
Can't we simply shim an http://stackoverflow.com/questions/6802145/convert-shallow-clone-to-full-clone |
This is one reason why a bot maintainer would be helpful. It would keep the information up-to-date and the disclaimer would not be needed.
The idea was to |
I strongly feel these are two separate items. One allows reproducible builds always without any |
Firefox has about:credits.
Should
|
I feel we should continue updating these automatically. If reproducible builds are the only issue, we handle that downstream by having saner fallback information (or by abolishing the information) rather than making build bots. Is there a chance we can get build year from the filesystem? Does |
And if we do decide to use build bots, we can leverage https://github.com/LMMS/lmms.io/tree/master/cron |
How should the fallback information be pushed? Automatically by a bot or running
The files may be patched by packagers, changing timestamps.
Does |
Certainly there are files that naturally won't receive patches, such as
It's a full-blown Ubuntu 12.04 server, so it can. We have tokens and passwords on it for other things, it wouldn't be out of the ordinary, we'd just have to configure SSH for the person configuring this. We use public key authentication all SSH users, currently myself, |
Now this request prepares the files to be updated by maintenance tasks in LMMS/lmms.io#198. |
I still fail to understand the need for the complexity of this all. Just strip out contributors when git's not available, make contributors tag-specific and lastly have a sane fallback for |
The goal is to achieve reproducible builds. The problem is to include the project year and list of contributors for the release. If there is no need to include project year and contributors, then there is no problem. This means that the package in Debian-like distros and the Linux package from Travis CI will not ship this information. Would this be acceptable?
The idea is to replace the cron job with a webhook. The bot would not only update a year. It would update a year, update the contributors, remove executable bits, optimize PNG images, format code, etc. |
Travis should be just fine. In regards to the Debian-based distributions, I think I see your concern... if the "stable" information is strictly based on the VCS and the VCS is not part of the tarball, the whole concept breaks because the tarball knows nothing about the VCS. A build bot is going to have complexity problems. First problem is the bot must be triggered sanely or alternately run at reasonable intervals (each commit, each release, daily, etc). The downside to this approach is 1. The build bot must live somewhere. 2. If the build bot only fires on stable releases, the commit will come in too late. It will be HEAD+1, which won't be part of the tarball for e.g. 1.2.0-stable. There may eventually be a good reason for using a build bot, I just strongly feel that So I think we have a situation where we need to go back to using a text file (or a header, etc), write it to |
There is no need to ask this. I can run a bot if lmms.io is not appropriate. Pulling hourly is no big deal; however, I cannot promise full availability. A webhook would help, but it looks like regular users cannot set one up. |
We wouldn't ask. We just wouldn't put it into the gitignore and any A robot is fine too, it's just something that one would have to monitor to know if it's working. If the devs commit these files occasionally, it will be obvious and they can make the choice each time to leave it or update it. |
You said it, merge conflict. On the other hand, this changes would clutter pull requests. Let us put the burden on the bot developers and keep a simple workflow for LMMS developers. I will make the bot when I have some spare time. It will be controllable through a wiki page. |
Can you expand on wiki controllable? |
Besides documenting the bot, the wiki page will have a task list with enabled and disabled tasks. When the bot has pending tasks, it checks which ones are enabled in the page and commits the allowed changes. The page might have additional configuration settings. |
Sounds like we're trying to reinvent Travis. |
It is a bot too, but Travis cannot write to the repository during the build, right? |
It should be fully capable of it so as long as we're careful not to recurse. http://stackoverflow.com/a/18029286/3196753 |
Nice to know. However, I find issues using Travis:
|
That is a good point since Travis truncates the commit history.
Nothing's 100%; ... "less reliable" would be more accurate but that can be outweighed by 1. Constantly monitored. 2. Common enough for new developers to research. 3. Familiar for existing developers.
To whose standard/who cares? Pull Request are truly close enough. If someone with commit access skips the PR process (happens all the time) chances are they're already in the |
Let me explain again. Any write from Travis to the repository requires the use of the encrypted |
It could be done with Travis, but it will be more difficult to develop. It is a matter of free time. |
@jasp00 thanks for the detailed explanation especially the merge dependency and commit catch-22 scenario and most of all patience. So this is ready to merge then in favor of LMMS/lmms.io#198. I have some questions surrounding the lmms.io PR and I'll address them directly on the lmms.io pull request. |
Merging. Word of caution, any builds created between now and the completion of LMMS/lmms.io#198. will see |
@tresf Right, as you mentioned on Discord/#Developer(in October), I missed this and manually bumped the year in d0cd42e. The project year currently shows 2017. |
@zonkmachine thanks. Yeah, that's fine. The goal was to make this part of the website automatic changes. I can revert that commit on a forked branch during testing. |
* Allow PROJECT_YEAR override * Generate release information and build with it * Delegate to maintenance tasks
PROJECT_YEAR
depends on build time, which is a problem with reproducible builds.This patch allows the year to be set on configure. This solution is needed until a bot includes the information in the source tree.This patch allows to use information from the folder
release-info
, which will come from a tarball generated in the Travis build. The command to buildlmms-VERSION-release-info.tar.gz
ismake release-info
and requires Git.