Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003234Doomseeker[All Projects] Bugpublic2017-09-01 11:452018-03-04 09:12
ReporterWubTheCaptain 
Assigned ToBlzut3 
PrioritynormalSeverityminorReproducibilitysometimes
Statusneeds testingResolutionopen 
Platformx86_64OSDebian GNU/LinuxOS Versionbuster/sid
Product Version1.1 
Target Version1.2Fixed in Version 
Summary0003234: src/core/svnrevision.h may create "unexpected upstream changes" issues with dpkg-source
DescriptionDuring the build process, directory listing of src/core/ may change unexpectedly and no longer matches upstream source archive. It is not cleaned up after build.

src/core/svnrevision.h is not included in source tar ball distribution. updaterevision tool autocreates this file during the build process.

Another possibility is svnrevision.h is removed from src/core/CMakeFileListing.txt during or after the build, causing "unexpected upstream changes" again.

This creates issues/burden on Debian package maintainers and reproducibility, requiring manual cleanup or patching for packaging Debian's .deb packages.
Steps To Reproduce

  1. Download Doomseeker 1.1 source fromhttp://doomseeker.drdteam.org/files/doomseeker-1.1_src.tar.bz2. [^]

  2. Extract it: tar xfvj doomseeker-1.1_src.tar.bz2

  3. Change directory to the extracted folder: cd doomseeker-1.1_src

  4. Create stub Debian packaging files for the next step (accepting single package and any details): dh_make -p doomseeker_1.1 -f ../doomseeker-1.1_src.tar.bz2

  5. Run debuild: debuild -us -uc

  6. Hit ^C (Ctrl+C) to cancel the build, or wait until the build is finished.

  7. Repeat previous debuild step.

  8. debuild fails to dpkg-source with error about "unexpected upstream changes".

Additional Informationdoomseeker_1.1-1_amd64.build (failed build) results after first build attached.

"make clean" (or fakeroot ./debian/rules clean) doesn't clean this file, as far as I'm aware. It is also excluded in the .hgignore file.
Attached Files? file icon doomseeker_1.1-1_amd64.build [^] (1,058 bytes) 2017-09-01 11:45
? file icon doomseeker_1.1-1.diff.NLEjW2 [^] (1,659 bytes) 2017-09-01 11:46
log file icon dpkg.log [^] (712 bytes) 2017-09-01 11:48

- Relationships
child of 0003246confirmedWubTheCaptain Debian packaging. 

-  Notes
User avatar (0018353)
Zalewa (developer)
2017-09-20 21:26

I think this file should be built in CMAKE_CURRENT_BINARY_DIR instead of src/core/. Doomseeker already looks for includes in that dir because that's where Qt tools build their files.
User avatar (0018365)
Zalewa (developer)
2017-09-24 16:11
edited on: 2017-09-24 16:12

I will have to retract the above statement as it would stand in contradiction with 3255 (reproducible builds).

Instead, svnrevision.h with properly filled information should be included in the source package and if 'updaterevision' tool fails to detect the repository it should not attempt to generate the file if that file already exists.

If the file doesn't exist and there's no repository to create it from, an invalid file should be created just as it is now.

User avatar (0018373)
WubTheCaptain (developer)
2017-09-24 18:07

At least the latter sounds like a sensible solution. Go for it.
User avatar (0018387)
WubTheCaptain (developer)
2017-09-25 17:47

Renaming the file to svnrevision.h.in and generating svnrevision.h from it may work.https://wiki.debian.org/UpstreamGuide#Cleaning_the_Tree [^]
User avatar (0018389)
Zalewa (developer)
2017-09-25 19:26
edited on: 2017-09-25 19:27

The svnrevision.h contains information that can be only generated from the repository. If you tarball the source code up and remove the .hg dir, then the information to generate svnrevision.h cannot be obtained anymore. The generator tool will create an invalid, yet compilable file instead (ie. revision info will be set to zero).

If we don't include the generated svnrevision.h in the archive, then how can we deterministically reproduce a build without the repository? The same page even suggests to use autorevision to export VCS metadata and include it in the tarball: https://wiki.debian.org/UpstreamGuide#Out-of-VCS_Builds. [^] This is exactly what is happening here, even though we use "our" own tool for that.

A template file seems to be hardly needed for a file that contains 3 #defines, none of which should be manually modified in any way.

As I see it, there are 2 problems that need to be solved here:

Problem 1. svnrevision.h file should not be touched if it already exists and it's impossible to determine the correct info from the repo. In such case, it will be necessary to assume that svnrevision.h already contains the correct information and touching it in any way will destroy it. Of course, people can just change other parts of the code and then compile Doomseeker without invalidating svnrevision.h, but given that we will already have reproducible builds, executables comparisons will expose their modifications.

Problem 2. svnrevision.h is currently not included in the tar.bz2 archive with the rest of the source code. When code archive is released, an already generated and correct for the given commit svnrevision.h should be included in the archive as well.

User avatar (0018390)
Zalewa (developer)
2017-09-25 21:23

Ad. 1. I have now checked and this is actually exactly what happens already:https://bitbucket.org/Doomseeker/doomseeker/src/2499674facfea585309bd0183de2bd270a253bb2/tools/updaterevision/updaterevision.c?at=default&fileviewer=file-view-default#updaterevision.c-135 [^]

So, this leaves us only with 2., hence I'm reassigning this to Blzut3.
User avatar (0019127)
Blzut3 (administrator)
2018-03-04 09:12

Rewrote our source package generation script to take this into account:https://bitbucket.org/Doomseeker/doomseeker/commits/f9a3f83d268484152f216b1592eeb68052e7abdf [^]

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2017-09-01 11:45 WubTheCaptain New Issue
2017-09-01 11:45 WubTheCaptain File Added: doomseeker_1.1-1_amd64.build
2017-09-01 11:46 WubTheCaptain Note Added: 0018206
2017-09-01 11:46 WubTheCaptain File Added: doomseeker_1.1-1.diff.NLEjW2
2017-09-01 11:46 WubTheCaptain Note Deleted: 0018206
2017-09-01 11:48 WubTheCaptain File Added: dpkg.log
2017-09-01 16:29 Zalewa Relationship added child of 0003246
2017-09-20 21:26 Zalewa Note Added: 0018353
2017-09-20 21:26 Zalewa Assigned To => Zalewa
2017-09-20 21:26 Zalewa Status new => assigned
2017-09-24 16:11 Zalewa Note Added: 0018365
2017-09-24 16:12 Zalewa Note Edited: 0018365 View Revisions
2017-09-24 16:12 Zalewa Note Edited: 0018365 View Revisions
2017-09-24 18:07 WubTheCaptain Note Added: 0018373
2017-09-25 17:47 WubTheCaptain Note Added: 0018387
2017-09-25 19:26 Zalewa Note Added: 0018389
2017-09-25 19:27 Zalewa Note Edited: 0018389 View Revisions
2017-09-25 21:23 Zalewa Assigned To Zalewa => Blzut3
2017-09-25 21:23 Zalewa Note Added: 0018390
2017-12-17 17:04 Blzut3 Target Version => 1.2
2018-03-04 09:12 Blzut3 Note Added: 0019127
2018-03-04 09:12 Blzut3 Status assigned => needs testing






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker