aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/tarfile.cc
AgeCommit message (Collapse)Author
2024-08-08tree-wide: automated migration to charptr_castJade Lovelace
The lint did it :3 Change-Id: I2d9f276b01ebbf14101de4257ea13e44ff6fe0a0
2024-08-08tree-wide: fix a pile of lintsJade Lovelace
This: - Converts a bunch of C style casts into C++ casts. - Removes some very silly pointer subtraction code (which is no more or less busted on i686 than it began) - Fixes some "technically UB" that never had to be UB in the first place. - Makes finally follow the noexcept status of the inner function. Maybe in the future we should ban the function from not being noexcept, but that is not today. - Makes various locally-used exceptions inherit from std::exception. Change-Id: I22e66972602604989b5e494fd940b93e0e6e9297
2024-07-23tree-wide: NULL -> nullptrJade Lovelace
This is slightly more type safe and is more in line with modern C++. Change-Id: Ia7a8df1c7788085020d1bdc941d6f9cee356144e
2024-05-29util.hh: Delete remaining file and clean up headersTom Hubrecht
Change-Id: Ic1f68e6af658e94ef7922841dd3ad4c69551ef56
2024-05-29util.{hh,cc}: Split out file-system.{hh,cc}Tom Hubrecht
Change-Id: Ifa89a529e7e34e7291eca87d802d2f569cf2493e
2024-03-04Merge pull request #9557 from bryanhonof/bryanhonof.fix-apple-double-shenaniganseldritch horrors
Add option to libarchive so it behaves correctly (cherry picked from commit c3827ff6348a4d5199eaddf8dbc2ca2e2ef46ec5) Change-Id: Ib0f928851093f4c644bac071d1c8f8aeec803198
2023-04-25TarArchive: Remove a duplicate constant and increase the buffer sizeEelco Dolstra
2022-11-01tarfile: set directory mode to at least 0500, don't extract fflagsYorick van Pelt
We don't need SGID, or any ACL's. We also want to keep every dir +rx.
2022-03-24Revert "TarArchive: Small refactoring"Maximilian Bosch
This reverts commit 50a35860ee9237d341948437c5f70a7f0987d393. With this change Nix fails to open bzip2 logfiles that were created from builds with no stdout/stderr.
2021-12-10extract_archive: fix "Hard-link target '...'" errorYorick van Pelt
Fixes #5741
2021-12-10extract_archive: use copy_pathname instead of set_pathname.Yorick van Pelt
Libarchive documentation mentions that archive_entry_set_pathname expects us to keep the passed string alive, which we don't.
2021-08-30TarArchive: Small refactoringEelco Dolstra
2021-08-30Don't segfault if archive_entry_pathname() returns nullEelco Dolstra
Issues #4499.
2021-04-15Drop libbz2 / zlib / lzma dependency + style fixesEelco Dolstra
2021-03-10Use libarchive for all compressionYorick van Pelt
2020-12-02read(): Use char * instead of unsigned char *Eelco Dolstra
This gets rid of some pointless casts.
2019-12-19tarfile.cc: Restore timestampsEelco Dolstra
This is needed to get the lastModified attribute of GitHub flakes.
2019-12-19tarfile.cc: Don't change the cwdEelco Dolstra
Nix is multithreaded so it's not safe to change the cwd.
2019-12-19tarfile.cc: Style fixesEelco Dolstra
2019-12-09further clean up libarchive codeYorick van Pelt
2019-12-07Clean up libarchive supportPuck Meerburg
2019-12-07remove rust unpack_tarfile ffiYorick van Pelt
2019-12-07code 'cleanup'Yorick van Pelt
2019-12-07add wrapper function around libarchive to c++ errorsYorick van Pelt
2019-12-07fixup! libarchive proof of conceptYorick van Pelt
2019-12-07libarchive proof of conceptYorick van Pelt
2019-11-27Fix segfault on i686-linuxEelco Dolstra
https://hydra.nixos.org/build/107467517 Seems that on i686-linux, gcc and rustc disagree on how to return 1-word structs: gcc has the caller pass a pointer to the result, while rustc has the callee return the result in a register. Work around this by using a bare pointer.
2019-11-26Drop remaining uses of external "tar"Eelco Dolstra
Also, fetchGit now runs in O(1) memory since we pipe the output of 'git archive' directly into unpackTarball() (rather than first reading it all into memory).
2019-11-26Move code aroundEelco Dolstra