mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
CPackDeb: sort package files before generating deb file
This should make the order in which the files are added to md5sums and archives is stable, thus making package files more reproducible. Fixes: #22361
This commit is contained in:
committed by
Brad King
parent
82183329a5
commit
9028195a22
@@ -2,6 +2,7 @@
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmCPackDebGenerator.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
@@ -525,6 +526,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
|
||||
return 0;
|
||||
}
|
||||
this->packageFiles = gl.GetFiles();
|
||||
// Sort files so that they have a reproducible order
|
||||
std::sort(this->packageFiles.begin(), this->packageFiles.end());
|
||||
}
|
||||
|
||||
int res = this->createDeb();
|
||||
@@ -551,6 +554,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
|
||||
return 0;
|
||||
}
|
||||
this->packageFiles = gl.GetFiles();
|
||||
// Sort files so that they have a reproducible order
|
||||
std::sort(this->packageFiles.begin(), this->packageFiles.end());
|
||||
|
||||
res = this->createDbgsymDDeb();
|
||||
if (res != 1) {
|
||||
@@ -672,6 +677,8 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
|
||||
return 0;
|
||||
}
|
||||
this->packageFiles = gl.GetFiles();
|
||||
// Sort files so that they have a reproducible order
|
||||
std::sort(this->packageFiles.begin(), this->packageFiles.end());
|
||||
|
||||
int res = this->createDeb();
|
||||
if (res != 1) {
|
||||
|
||||
Reference in New Issue
Block a user