diff --git a/doxygen.changes b/doxygen.changes index 4d6d236..653a7c1 100644 --- a/doxygen.changes +++ b/doxygen.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 17 17:14:00 UTC 2023 - Bernhard Wiedemann + +- Add reproducible.patch to make doxytags output reproducible (boo#1201579) + ------------------------------------------------------------------- Mon Apr 24 12:16:18 UTC 2023 - Dominique Leuenberger diff --git a/doxygen.spec b/doxygen.spec index 0fdc3fe..e0b374f 100644 --- a/doxygen.spec +++ b/doxygen.spec @@ -39,6 +39,7 @@ Patch20: https://github.com/doxygen/doxygen/commit/966d69c603b5.patch#/Fi Patch21: https://github.com/doxygen/doxygen/commit/7b2a6027775b.patch#/Fix-boundingbox-parsing_part2.patch Patch22: https://github.com/doxygen/doxygen/commit/f3514d578633.patch#/Fix-boundingbox-parsing_part3.patch Patch23: https://github.com/doxygen/doxygen/commit/8129939c312e.patch#/Fix-boundingbox-parsing_part4.patch +Patch24: reproducible.patch BuildRequires: bison BuildRequires: cmake >= 2.8.12 BuildRequires: flex @@ -77,6 +78,7 @@ as well. %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 %build %cmake \ diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..d17dec2 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,75 @@ +Index: doxygen-1.9.6/filesystem/filesystem.hpp +=================================================================== +--- doxygen-1.9.6.orig/filesystem/filesystem.hpp ++++ doxygen-1.9.6/filesystem/filesystem.hpp +@@ -5548,12 +5548,13 @@ public: + impl(const path& path, directory_options options) + : _base(path) + , _options(options) +- , _dir(nullptr) ++ , _namelist(nullptr) ++ , _namelisti(-1) + , _entry(nullptr) + { + if (!path.empty()) { +- _dir = ::opendir(path.native().c_str()); +- if (!_dir) { ++ _namelisti = _namelistn = ::scandir(path.native().c_str(), &_namelist, NULL, alphasort); ++ if (_namelistn == -1) { + auto error = errno; + _base = filesystem::path(); + if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) { +@@ -5568,19 +5569,23 @@ public: + impl(const impl& other) = delete; + ~impl() + { +- if (_dir) { +- ::closedir(_dir); ++ if (_namelist) { ++ for (int i=_namelistn-1; i>=0; i--) { ++ free(_namelist[i]); ++ } ++ free(_namelist); ++ _namelist = nullptr; + } + } + void increment(std::error_code& ec) + { +- if (_dir) { ++ if (_namelist) { + bool skip; + do { + skip = false; + errno = 0; +- _entry = ::readdir(_dir); +- if (_entry) { ++ if (_namelisti > 0 ) { ++ _entry = _namelist[--_namelisti]; + _dir_entry._path = _base; + _dir_entry._path.append_name(_entry->d_name); + copyToDirEntry(); +@@ -5590,8 +5595,11 @@ public: + } + } + else { +- ::closedir(_dir); +- _dir = nullptr; ++ for (int i=_namelistn-1; i>=0; i--) { ++ free(_namelist[i]); ++ } ++ free(_namelist); ++ _namelist = nullptr; + _dir_entry._path.clear(); + if (errno) { + ec = detail::make_system_error(); +@@ -5634,7 +5642,9 @@ public: + } + path _base; + directory_options _options; +- DIR* _dir; ++ int _namelisti; ++ int _namelistn; ++ struct dirent **_namelist; + struct ::dirent* _entry; + directory_entry _dir_entry; + std::error_code _ec;