Commit Graph

7 Commits

Author SHA1 Message Date
Jan Kaluza a0a9ac6380 Switch common, storage and image to monorepo.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-08-29 15:04:28 +02:00
flouthoc aadfc5cf30
unit_test: use Parallel test where possible
Add `t.Parallel()` to unit tests whereever its possible without race.

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2025-02-04 11:07:15 -08:00
Nalin Dahyabhai 8ae99121c1 CI: enable the gofumpt linter
Turn on the gofumpt linter.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-08-15 13:17:44 -04:00
Nalin Dahyabhai 4f3876d8ec Add godoc for pkg/parse.GetTempDir
Add some godoc for pkg/parse.GetTempDir()

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-11-15 14:27:21 -05:00
Aditya R 9c99d7ca88
run: use internal.GetTempDir with os.MkdirTemp
Projects which are using buildah as a library and set `TMPDIR` manually
can stumble upon a use-case where `TMPDIR` was set to a relative path.

Such as `export TMPDIR=.` in such case buildah will try to create a
temporary root using `Mkdirtemp` leading to a point where bundle is not
generated correctly since path was relative.

Following use case can be resolved by making sure that buildah always
converts relative path to absolute path and `GetTempDir` does it well.

Example reproducer with podman

```Dockerfile
FROM alpine
RUN echo hello
```

```console
export TMPDIR=.
podman build --no-cache -t test .
```

Expected failure
```console
STEP 1/2: FROM alpine
STEP 2/2: RUN echo hello
error running container: checking permissions on "buildah2341274198": stat buildah2341274198: no such file or directory
ERRO[0000] did not get container create message from subprocess: EOF
Error: building at STEP "RUN echo hello": while running runtime: exit status 1
```

Closes: RHEL-2598

Signed-off-by: Aditya R <arajan@redhat.com>
2023-10-11 21:49:18 +05:30
Daniel J Walsh e90b3502b7
GetTmpDir is not using ImageCopyTmpdir correctly
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-09-14 08:12:52 -04:00
Paul Holzinger 0191bc6710
Split GetTempDir from internal/util
With this pkg/parse does not depend on libimage.

[NO NEW TESTS NEEDED]

Based on Miloslav's work: https://github.com/containers/podman/pull/19718

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-09-12 15:21:04 +02:00