1
0
mirror of https://github.com/containers/buildah.git synced 2026-02-05 09:45:38 +01:00
Commit Graph

35 Commits

Author SHA1 Message Date
Nalin Dahyabhai
d406752b02 Drop unused hack/Dockerfile
Drop this Dockerfile, which was used by a script which was removed
before v1.14.0.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2025-11-13 10:25:48 -05:00
Paul Holzinger
e5b876571b Makefile: use libsqlite3 build when possible
Dynamically link sqlite3 when installed, the main motivation is that we
reduce the podman binary size with that. I see about 3.2 MB savings.

But also dynamically linking it means if there a vulnerabilities only
the sqlite3 distro package needs updating and we don't have to make a
new podman release with the vendored update.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-06-11 10:31:53 +02:00
Danish Prakash
17ee51d753 Makefile: use find to detect source files
The current list of sources doesn't list vendor sources and some other
.go files, requiring manual modifications to the Makefile to build
binaries. This change uses `find` (from Podman's Makefile) to detect .go
files across the repo.

Removes the validation script since we're no longer specifying sources
manually. And removes explicit *.go files as binary sources.

Signed-off-by: Danish Prakash <contact@danishpraka.sh>
2024-11-20 22:14:18 +05:30
Nalin Dahyabhai
f4d4bb240f Finish updating to go 1.22
Update references to specific versions of golang in the Makefile and the
Cirrus CI configuration to match go.mod, and add a check in the 'vendor'
target that CI runs that the image it's run inside is a close-enough
match to the version listed in go.mod.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-11-11 11:03:11 -05:00
Nalin Dahyabhai
09c231f830 Add a validation script for Makefile $(SOURCES)
Add a validation script that checks that we haven't forgotten to add any
new packages to the SOURCES definition in the top-level Makefile.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-08-22 17:29:26 -04:00
Giuseppe Scrivano
74f2c9bdf9 build: fix test for subid 4
libsubid changes its ABI in version 4.  Account for the different name
in the configure script.

Closes: https://github.com/containers/buildah/issues/4063

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-21 19:40:07 +02:00
Chris Evich
4cf93e3edc Fix use generic/ambiguous DEBUG name
The use of the generic 'DEBUG' name in varialbes or flags can be very
problematic and lead to difficult to troubleshoot problems.  Update CI
VM images to those including updated automation library that uses the
`$A_DEBUG` env. var. instaed.  Also update other repository files which
make use of the generic form.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-02 11:44:38 -04:00
Ed Santiago
ae8995568b [CI:DOCS] man pages: sort flags, and keep them that way
Enforce alphabetical ordering of command-line options in
man pages. Not as simple as with podman, because conventions
are different.

Reference: https://github.com/containers/podman/pull/13625

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-24 08:27:06 -06:00
Giuseppe Scrivano
87f6c19079 Makefile: build with systemd when available
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-02-14 10:05:35 +01:00
Giuseppe Scrivano
80f7b5f753 build: fix libsubid test
libsubid changes its ABI in version 4.  Account for the different name
in the configure script.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-20 09:10:41 +01:00
Daniel J Walsh
a9e66ec72b Add man page for Containerfile and .containerignore
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-29 11:19:10 -04:00
Daniel J Walsh
29ddd4b346 Add support for libsubid
This will enable remote access to /etc/subuid and /etc/subgid
information from ldap services, if shadow-utils ships with a libsubid.

[NO TESTS NEEDED] Since we have no way to test this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-27 08:16:01 -04:00
Nalin Dahyabhai
4d904fdfc1 make vendor-in-container
It looks like there's some behavior difference between the 1.13 that CI
uses and the 1.16 on my system.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-08-04 15:23:11 -04:00
Chris Evich
174cf8963f Cirrus: Update Ubuntu images to 21.04
Also simplify `lib.sh` after supporting changes incorporated
into automation library 2.x+ (present in all VM and container
images).

* No need to force-load `/etc/profile` and handle it's expectation
  to **not** being in `errexit` mode.
* Slightly re-arrange loading of automation library files for
  clarity.
* Remove dependency on updating `/etc/environment` for GPG.
* Remove redundant showrun() function (now present in automation
  library)
* Update comments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-26 14:15:12 -04:00
Chris Evich
d46d84e0db Cirrus: Make use of shared get_ci_vm container
Depends on:
    https://github.com/containers/automation_images/pull/57
    https://github.com/containers/automation/pull/64
    https://github.com/containers/automation/pull/66
    https://github.com/containers/automation/pull/67
    https://github.com/containers/automation/pull/68

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-05 13:19:57 -04:00
Chris Evich
bc9c02f68d Cirrus: Support new VM Images in get_ci_vm.sh
Due to necessary changes in both scripts and within images, updates are
necessary for this script to function.  These changes also bring
the script very close to being identical to the same in the
containers/podman repository.  The intent is to support a future
where this script can simply be shared across repos.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-12 16:26:43 -05:00
Josh Soref
c7963db369 Spelling
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-12-21 16:47:18 -05:00
Ed Santiago
6c1494c530 New CI check: xref --help vs man pages
Run 'buildah --help', recursively against all subcommands,
then cross-reference the results against docs/buildah*.md.
Report differences in subcommands and/or flags.

The majority of the changes in this PR are trivial (see
below) but a handful may be controversial and require
careful review:

  * Making 'bud' the default output of 'buildah help',
    with 'build-using-dockerfile' as an alias. This is
    the inverse of the situation until now: buildah
    would list build-using-dockerfile as the primary
    name. The man page, OTOH, lists 'bud'. The source
    file name is 'bud'. I suspect that most people
    type 'bud'. So, for consistency, I choose to make
    'bud' the default visible command.

  * add --encryption-key and --encrypt-layer documentation
    to buildah-commit.md, and --encrypt-layer to -push.md.
    Please double-check the wording here.

  * remove --notruncate from buildah-images.md. The option
    does not exist (although there is a TODO comment in
    the code). If it should exist, it is left to the
    reader to implement. I would humbly suggest that this
    is a good idea, for consistency with buildah containers.

  * remove --shm-size from buildah-pull.md. The option
    does not exist, and I suspect this was a copy-paste error.

  * remove --security-opt from run.go. It was unimplemented
    and undocumented.

  * remove --userns-[gu]id-map from buildah-bud.md. These
    are global options, not bud options, and are documented
    well enough in buildah.bud.

Trivial (IMO) changes:

  * split options in man pages, from '**--foo, -f**'
    to '**--foo**, **-f**'. This conforms with the style
    used in podman man pages.

  * add missing one-letter aliases (usually "-q", "-a")

  * add missing man page entries for some easy options

  * sort out-of-order subcommand listings in man pages

Finally, do note that this is a copy-and-alter duplicate of the
original script in podman, and that is horrible. In an ideal
world I would've been able to refactor the podman version into
something usable on both repos (and then more). It turns out the
differences in man page format and in special-case handling are
too broad to let me do a clean refactor.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-01 04:55:24 -06:00
Daniel J Walsh
2cf9c8f2b8 Fix up code based on codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-15 16:49:18 -04:00
Chris Evich
df51162765 Cirrus: Fixes from review feedback
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-05-04 11:45:14 -04:00
Chris Evich
2e050a184e Cirrus: Update to F31 + Use cache images
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-04-30 10:09:50 -04:00
Chris Evich
9411e927cd Bors: Enable app + Disable Travis
Add initial support for Bors-ng replacement for Homu providing "ever
green" merges of PRs.  Ref: https://bors.tech/

Note: Bors-ng cannot deal with tasks marked 'skipped' by Cirrus-CI when
testing or attempting a merge. All tasks must always run on all except
temporary branches.  The only significant marker for a required-for-merge
task are the status/pr-status name match strings in `bors.toml`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 16:22:44 -05:00
Chris Evich
90868620d4 Cirrus: Migrate off papr + implement VM testing
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 16:21:43 -05:00
Chris Evich
8869618456 Cirrus: Update packages + fixes for get_ci_vm.sh
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 16:21:43 -05:00
Daniel J Walsh
cd88667465 Ran buildah through codespell
Thanks to Dmitry Smirnov @onlyjob for suggesting this tool.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1985
Approved by: TomSweeneyRedHat
2019-11-20 17:38:41 +00:00
Giuseppe Scrivano
8a23247ce9 build: drop support for ostree
it is going to be removed from containers/image as well, so no longer
depend on it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-30 10:49:58 +01:00
Sascha Grunert
b288b7a3d9 Update shebangs to take env into consideration
Some operating systems don’t have `bash` in `/bin`, so we should take the
`$PATH` into consideration for searching it.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>

Closes: #1804
Approved by: TomSweeneyRedHat
2019-08-20 11:26:57 +00:00
Sascha Grunert
1de958dc99 Add automatic apparmor tag discovery
The 'apparmor' build tag is now added if libappamor was found on the
local system.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>

Closes: #1763
Approved by: rhatdan
2019-08-05 12:22:25 +00:00
Chris Evich
0b84b23e2e Cirrus: Initial implementation
Based on containers/storage

Signed-off-by: Chris Evich <cevich@redhat.com>

Closes: #1644
Approved by: rhatdan
2019-06-15 14:01:31 +00:00
Daniel J Walsh
316bd0a68b Add hack/build_speed.sh test speeds on building container images
The main goal of this script is test and time builds using Buildah or Docker.
 We hope to use it to help optimize Buildah build performance

 It takes two options
 First option tells the type of the container image
 build to do.  Valid options are:
       Docker  - docker build
       Buildah - buildah bud
       Both    - Do docker build followed by buildah bud

 Second Option specifies a directory or cleanup
 The script will 'find' files beginning with Dockerfile, for each Dockerfile
 it finds it will run a build with the Dockerfile and directory for the
 context. When it does the builds, it will call time on them to show how
 long the builds take.  The created image name will be a combination of the
 lowercased Directory name that the Dockerfile was found in plus the lower
 cased dockerfile name.

 if the second field is cleanup, the script will remove all images from the
 specified builder.

 The script does not check for conflicts on nameing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1505
Approved by: edsantiago
2019-04-11 19:43:45 +00:00
Valentin Rothberg
705ecf9f79 add hack/tree_status.sh script
This script can later be integrated into the CI and is meant to be run
after a `make vendor` to make sure that all-things-vendor are in sync.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>

Closes: #1350
Approved by: TomSweeneyRedHat
2019-02-20 17:22:16 +00:00
Lokesh Mandvekar
8df3a657c7 tests: run conformance test suite in Travis
Run conformance tests in after_script section of Travis with
non-blocking failures.

Follow up to #1003

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2018-09-26 15:23:36 -04:00
Daniel J Walsh
ba012ddec6 Move buildah from projecatatomic/buildah to containers/buildah
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-18 08:06:11 -04:00
Nalin Dahyabhai
bbbf6b2090 Don't build btrfs if it is not installed
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1016
Approved by: TomSweeneyRedHat
2018-09-14 19:08:50 +00:00
Lokesh Mandvekar
faa321f108 run container-diff tests in Travis
This commit will cause Travis to spawn a fedora container
which will build a Dockerfile using docker and buildah bud
and then compare both images using container-diff.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Closes: #1003
Approved by: rhatdan
2018-09-12 13:37:11 +00:00