aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* lddtree: keep relativeness of invoked program in elf wrapperTakuto Ikuta2023-12-221-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes clang's resource dir relative when we pass -no-canonical-prefixes flag like below. $ chromium/.cros_cache/chrome-sdk/tarballs/$BOARD+$VERSION+target_toolchain/usr/bin/clang -no-canonical-prefixes -### Chromium OS 7.0_pre328903_p20180425-r5 clang version 7.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git e7408fe366bb18923fa360b069b4e4566203f34f) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 95561668f063fbcb8195bde05ecede721ece4ba4) (based on LLVM 7.0.0svn) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: chromium/.cros_cache/chrome-sdk/tarballs/kevin+10750.0.0+target_toolchain/usr/bin Without this patch, -no-canonical-prefixes has no meaning. $ chromium/.cros_cache/chrome-sdk/tarballs/$BOARD+$VERSION+target_toolchain/usr/bin/clang -no-canonical-prefixes -### Chromium OS 7.0_pre328903_p20180425-r5 clang version 7.0.0 (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git e7408fe366bb18923fa360b069b4e4566203f34f) (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git 95561668f063fbcb8195bde05ecede721ece4ba4) (based on LLVM 7.0.0svn) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: $HOME/chromium/.cros_cache/chrome-sdk/tarballs/kevin+10750.0.0+target_toolchain/usr/bin This is a part of effort for build cache sharing when using goma by removing absolute path from compile result. Instead of enforcing relative path, I keep relativeness of compiler path. I confirmed this works as following with a debug line to show ${base}.elf. (sdk daisy R70-11005.0.0) tikuta@tikuta ~/chromium/src $ ln -s build/cros_cache/chrome-sdk/tarballs/daisy+11005.0.0+target_toolchain/usr/bin/clang-7 clang (sdk daisy R70-11005.0.0) tikuta@tikuta ~/chromium/src $ ./clang ${base}.elf: './build/cros_cache/chrome-sdk/tarballs/daisy+11005.0.0+target_toolchain/usr/bin/clang-7.elf' clang-7: error: no input files In previous versions of this change, it ran like below: (sdk daisy R70-11005.0.0) tikuta@tikuta ~/chromium/src $ ./clang ${base}.elf: '/usr/local/google/home/tikuta/chromium/src/build/cros_cache/chrome-sdk/tarballs/daisy+11005.0.0+target_toolchain/usr/bin/clang-7.elf' clang-7: error: no input files I confirmed this can build base_unittests on daisy and amd64-generic after creating a new CrOS SDK with chromiumos-sdk-tryjob. Bug: https://crbug.com/846610 Bug: https://crbug.com/876604 Signed-off-by: Takuto Ikuta <tikuta@chromium.org> Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: fix argcomplete typingMike Frysinger2023-12-151-2/+2
| | | | | | | | mypy wants a cast here to avoid warning: lddtree.py:59: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment] Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: use f-string in warn messageMike Frysinger2023-12-151-1/+1
| | | | | Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: Add --wrapper-preloadDavid Riley2023-12-151-2/+29
| | | | | | | | | --wrapper-preload allows the wrapper to be generated always specifying an LD_PRELOAD via the --preload option of the loader. Signed-off-by: David Riley <davidriley@chromium.org> Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* github: update to checkout@v3Mike Frysinger2023-12-143-4/+4
| | | | | Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* pylintrc: remove old entriesMike Frysinger2023-12-141-3/+0
| | | | | Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: add docstring for all classesMike Frysinger2023-12-141-0/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Revert "paxinc: include <alloca.h> for alloca"Mike Frysinger2023-12-141-1/+0
| | | | | | | | | | | This reverts commit 781a3856ae53df051563645b45d8ff7033aea113. The header is already included in porting.h. We want to keep all system headers centralized in porting.h and not sprinkle across the other modules. Signed-off-by: Mike Frysinger <vapier@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix fuzz-dumpelf testAliaksei Urbanski2023-11-232-1/+11
| | | | | | | | | | | | | | Not sure why, but the dumpelf.fuzz fuzzer fails when it's calling prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, ...) at security_init. So I suggest disabling seccomp for fuzzy testing. Also, in order to not run indefinitely, the fuzzer must be executed with some reasonable options. https://releases.llvm.org/14.0.0/docs/LibFuzzer.html#options Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com> Closes: https://github.com/gentoo/pax-utils/pull/13 Signed-off-by: Sam James <sam@gentoo.org>
* README: fix typo: s/peforming/performing.Frederic Cambus2023-02-131-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* lddtree: allow lddtree.sh to find Xenocara libraries on OpenBSD.Frederic Cambus2023-02-131-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* porting.h: include <stddef.h> for size_t, sort includesSam James2023-01-291-2/+3
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* paxinc: include <alloca.h> for allocaSam James2023-01-291-0/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Undo IWYU fixesSam James2023-01-2918-182/+2
| | | | | | | | | | | | I wasn't paying enough attention, it's better to just fold the needed bits into porting.h. This reverts commit ffedc60fa41d307bda28fd108e6ff1b8da1fc2ee. This reverts commit f8287200aec0ca33ef07fafcdd5aef0aa6eb1306. This reverts commit aa907a42d89ddfd5a7e64d8182a1da35277f2f6e. Bug: https://github.com/gentoo/pax-utils/pull/11#issuecomment-1407566344 Signed-off-by: Sam James <sam@gentoo.org>
* .github: add Alpine CISam James2023-01-291-0/+34
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* *: IWYU fixes deuxSam James2023-01-2912-3/+11
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* *: IWYU fixesSam James2023-01-2814-2/+157
| | | | | | | Separate from the first commit as this one was done programmatically with dev-util/include-what-you-use. Signed-off-by: Sam James <sam@gentoo.org>
* Make headers standalone (missing includes, prep for clang-tidy)Sam James2023-01-286-0/+17
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* meson.build: release 1.3.7v1.3.7Sam James2023-01-261-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* meson: fix installation of (pre-generated) man pages w/o xmltoSam James2023-01-221-5/+1
| | | | | Fixes: 502631b86d63c4604b0ed78ad86a054e9726e897 Signed-off-by: Sam James <sam@gentoo.org>
* meson: release 1.3.6v1.3.6Sam James2023-01-061-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* CI: Add ASAN, UBSAN to CISam James2023-01-061-6/+4
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* travis: dropSam James2022-11-021-0/+0
| | | | | | Followup to 22e3de54dee0d4efa6c3d14753f847677f0e8d98. Signed-off-by: Sam James <sam@gentoo.org>
* .github: update muon URLSam James2022-11-021-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* .github: run build-test-ci for all branchesSam James2022-11-021-2/+1
| | | | | | Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/pax-utils/pull/8 Signed-off-by: Sam James <sam@gentoo.org>
* meson: include generated man pages in dist tarballsSam James2022-11-023-13/+38
| | | | | | | | | | | | | | | | | Meson doesn't have an idiomatic way of doing this (for once!) so we have to (per Eli Schwartz, thanks!) have: 1. a dist script which duplicates the build rule; 2. some meson.build if/else logic with fs.exists() to prefer the built manpage when using tarballs Sadly, still can't easily regenerate man pages if you apply a patch downstream though. We use Michael Stapelberg's example from the linked bug as inspiration. Bug: https://github.com/mesonbuild/meson/issues/2166 Reported-by: psykose <alice@ayaya.dev> Thanks-to: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Sam James <sam@gentoo.org>
* pylint: reformat with blackMike Frysinger2022-09-281-11/+8
| | | | | | Also drop a few Python 2 specific things. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: reformat with blackMike Frysinger2022-09-281-209/+294
| | | | | | Largely this is just single quotes -> double quotes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: avoid shadowing function argsMike Frysinger2022-09-281-8/+8
| | | | | | | pylint warns about redefining |lib| here, and it's right -- the code is a little hard to follow because of it. So give it a diff name. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: simplify join logicMike Frysinger2022-09-281-2/+3
| | | | | | No need to create a list to past to join when we can pass a generator. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: add typing info to more placesMike Frysinger2022-09-281-26/+61
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: switch to f-strings in most placesMike Frysinger2022-09-281-17/+18
| | | | | | These are a bit more readable than % formatting. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: Add logging for ELFParseErrorManoj Gupta2022-09-281-1/+5
| | | | | | | | | Add logging inside parseELF to print the bad file if the parser fails with ELFParseError. Bug: https://issuetracker.google.com/issues/203821449 Signed-off-by: Manoj Gupta <manojgupta@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: specify utf-8 encoding with text filesMike Frysinger2022-09-211-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: sort importsMike Frysinger2022-09-211-2/+2
| | | | | | Should be no functional change. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* lddtree: update CrOS copyright lineMike Frysinger2022-09-211-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* man: reorder xmlto argumentsMike Gilbert2022-09-071-2/+2
| | | | | | Bug: https://bugs.gentoo.org/869110 Thanks-to: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* meson.build: prepare for 1.3.5v1.3.5Sam James2022-07-311-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* gha: add muon to Linux test matrixArsen Arsenović2022-07-122-12/+32
| | | | | | Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Closes: https://github.com/gentoo/pax-utils/pull/7 Signed-off-by: Sam James <sam@gentoo.org>
* Improve build-related documentationArsen Arsenović2022-07-122-15/+16
| | | | | Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>
* security.h: suppress unused argument warning on allow_forkingArsen Arsenović2022-07-122-1/+2
| | | | | Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>
* Probe the target system for needed headersArsen Arsenović2022-07-122-15/+12
| | | | | | | | | | | This prevents new or unconventional systems requiring upstream changes, though, this is not perfect, as it doesn't address some of the other defines related to OSes the preprocessor does (namely, wrt the ldso cache handling). I didn't touch these yet as I took a more conservative approach of (probably) not changing what happens at runtime. Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>
* Convert build system to mesonArsen Arsenović2022-07-1228-769/+295
| | | | | | | | | | | | | | | | | Some notes about the new build systems: - I don't fully understand the testing system, but I think I understood it well enough to implement an equivalent one. - use_seccomp could be replaced by detecting seccomp support at runtime (without support, Linux returns -EINVAL in include/linux/seccomp.h) - The fuzzing test is broken and seems to have been for a while (see commit 67f3ba64c91b5e1ac9fbbd0bc039fb8ca653cae1, it fails to fuzz on my machine) - make-tarball.sh has been replaced with meson dist - hopefully this works. meson dist should also call seccomp-bpf.c to update seccomp-bpf.h Signed-off-by: Arsen Arsenović <arsen@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>
* seccomp: allow madvise() call (glibc 2.35+)v1.3.4WANG Xuerui2022-04-252-38/+41
| | | | | | Closes: https://bugs.gentoo.org/836735 Reviewed-by: Sam James <sam@gentoo.org> Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
* GH: apt-get update before installing depsWANG Xuerui2022-03-241-2/+2
| | | | | | Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Closes: https://github.com/gentoo/pax-utils/pull/6 Signed-off-by: Sam James <sam@gentoo.org>
* paxelf: add LoongArch to recognized ELF machine typesWANG Xuerui2022-03-242-1/+3
| | | | | Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* lddtree: add --skip-missingJae Hoon Kim2022-03-091-1/+5
| | | | | | | | | | | | | | | | Allow explicitly ignoring missing files. $ lddtree --root=/build/$BOARD --copy-to-tree=. --copy-non-elfs /sbin/lvm /sbin/lvmdump lddtree: warning: /build/brya/sbin/lvm: did not match any paths $ echo $? 1 lddtree --root=/build/$BOARD --copy-to-tree=. --copy-non-elfs --skip-missing /sbin/lvm /sbin/lvmdump lddtree: warning: /build/brya/sbin/lvm: did not match any paths $ echo $? 0 Signed-off-by: Jae Hoon Kim <kimjae@chromium.org> Signed-off-by: Mike Frysinger <vapier@chromiium.org>
* README: attempt to fix github build status badgeFabian Groffen2022-02-071-1/+1
| | | | Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* GH: simplify coverity GH actionMike Frysinger2022-02-051-9/+2
| | | | | | Newer version has better defaults. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* porting: don't include alloca.h on NetBSDFrederic Cambus2022-01-221-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>