summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam2021-06-17 22:46:45 -0700
committerSam2021-06-17 22:47:14 -0700
commit553526e31e3f4b0b68fbddd1f05177714683ac05 (patch)
tree981568d74d9fb15ece02905588ac8fa53431b1e7
downloadaur-553526e31e3f4b0b68fbddd1f05177714683ac05.tar.gz
upgpkg: containers-common-git 0.40.1_dev.r0.g3c56250-1
upstream release Initial upload: containers-common-git 0.40.1_dev.r0.g3c56250-1 feat(containers-common): :sparkles: Version 0.40.1_dev.r0.g3c56250
-rw-r--r--.SRCINFO33
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD127
-rw-r--r--mounts.conf2
4 files changed, 166 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5afc37d20e8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = containers-common-git
+ pkgdesc = Configuration files and manpages for containers (git)
+ pkgver = 0.40.1_dev.r0.g3c56250
+ pkgrel = 1
+ url = https://github.com/containers/common.git
+ arch = any
+ license = Apache
+ makedepends = go-md2man
+ makedepends = git
+ makedepends = libgpgme.so
+ provides = containers-common
+ conflicts = containers-common
+ options = emptydirs
+ backup = etc/containers/containers.conf
+ backup = etc/containers/mounts.conf
+ backup = etc/containers/policy.json
+ backup = etc/containers/registries.conf
+ backup = etc/containers/seccomp.json
+ backup = etc/containers/storage.conf
+ source = git+https://github.com/containers/common.git
+ source = image.tar.gz::https://api.github.com/repos/containers/image/tarball
+ source = podman.tar.gz::https://api.github.com/repos/containers/podman/tarball
+ source = skopeo.tar.gz::https://api.github.com/repos/containers/skopeo/tarball
+ source = storage.tar.gz::https://api.github.com/repos/containers/storage/tarball
+ source = mounts.conf
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = ae96bbb4a2a3e10759b1506754724bff0fa05feaf16958d19c73124e6b3fed45
+
+pkgname = containers-common-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..b0058072a56
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.tar.*
+src
+pkg
+common/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6b2734e6073
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,127 @@
+# Maintainer: samarthj <dev@samarthj.com>
+
+pkgname=containers-common-git
+_pkgname=containers-common
+_gitpkgname=common
+pkgver=0.40.1_dev.r0.g3c56250
+pkgrel=1
+pkgdesc="Configuration files and manpages for containers (git)"
+arch=('any')
+makedepends=('go-md2man' 'git' 'libgpgme.so')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+_baseurl="https://github.com/containers"
+_apiurl="https://api.github.com/repos/containers"
+url="$_baseurl/$_gitpkgname.git"
+license=(Apache)
+backup=(
+ 'etc/containers/containers.conf'
+ 'etc/containers/mounts.conf'
+ 'etc/containers/policy.json'
+ 'etc/containers/registries.conf'
+ 'etc/containers/seccomp.json'
+ 'etc/containers/storage.conf'
+)
+options=('emptydirs')
+source=("git+$url"
+ "image.tar.gz::$_apiurl/image/tarball"
+ "podman.tar.gz::$_apiurl/podman/tarball"
+ "skopeo.tar.gz::$_apiurl/skopeo/tarball"
+ "storage.tar.gz::$_apiurl/storage/tarball"
+ 'mounts.conf'
+)
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'ae96bbb4a2a3e10759b1506754724bff0fa05feaf16958d19c73124e6b3fed45')
+
+pkgver() {
+ cd "$srcdir/$_gitpkgname" || exit 1
+ commit=$(git rev-parse --short HEAD)
+ ver=$(grep const version/version.go | sed -re 's|.*"(.*)"$|\1|g')
+ echo "${ver//-/_}.r0.g${commit}"
+}
+
+prepare() {
+ for i in {1..4}; do
+ _tar="${source[$i]%%::*}"
+ _dirname=$(bsdtar -tf "$_tar" | awk -F / '{print $1; exit}')
+ mv "$_dirname" "${_tar%%.tar.gz}"
+ done
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+}
+
+build() {
+ (
+ cd "common" || exit 1
+ make docs
+ )
+ (
+ cd "image" || exit 1
+ make docs
+ )
+ (
+ cd "podman" || exit 1
+ go-md2man -in pkg/hooks/docs/oci-hooks.5.md \
+ -out oci-hooks.5
+ )
+ (
+ cd "storage" || exit 1
+ sed -r 's/(GOMD2MAN = ).*/\1 go-md2man/' -i docs/Makefile
+ make docs
+ )
+}
+
+package() {
+ # directories
+ install -vdm 755 "${pkgdir}/etc/containers/oci/hooks.d/"
+ install -vdm 755 "${pkgdir}/etc/containers/registries.conf.d/"
+ install -vdm 755 "${pkgdir}/usr/share/containers/oci/hooks.d/"
+ install -vdm 755 "${pkgdir}/var/lib/containers/"
+
+ # configs
+ install -vDm 644 mounts.conf -t "${pkgdir}/etc/containers/"
+
+ (
+ cd "common" || exit 1
+ # man pages and configs
+ make install PREFIX="$pkgdir"/usr
+ # copy configs to other locations
+ install -vDm 644 pkg/config/containers.conf -t "${pkgdir}/etc/containers/"
+ install -vDm 644 pkg/seccomp/seccomp.json -t "${pkgdir}/etc/containers/"
+ install -vDm 644 pkg/seccomp/seccomp.json -t "${pkgdir}/usr/share/containers/"
+ # license
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ )
+ (
+ cd "image" || exit 1
+ # configs
+ install -vDm 644 registries.conf -t "${pkgdir}/etc/containers/"
+ # man pages (the makefile has a bug can't use the install target)
+ install -vDm 644 docs/*.5 -t "${pkgdir}/usr/share/man/man5/"
+ )
+ (
+ cd "podman" || exit 1
+ install -vDm 644 ./*.5 -t "${pkgdir}/usr/share/man/man5/"
+ )
+ (
+ cd "skopeo" || exit 1
+ # configs
+ install -vDm 644 default-policy.json "${pkgdir}/etc/containers/policy.json"
+ install -vDm 644 default.yaml -t "${pkgdir}/etc/containers/registries.d/"
+ )
+ (
+ cd "storage" || exit 1
+ # configs
+ install -vDm 644 storage.conf -t "${pkgdir}/etc/containers/"
+ install -vDm 644 storage.conf -t "${pkgdir}/usr/share/containers/"
+ # man pages
+ make install PREFIX="$pkgdir"/usr
+ )
+}
diff --git a/mounts.conf b/mounts.conf
new file mode 100644
index 00000000000..c3ae13c8105
--- /dev/null
+++ b/mounts.conf
@@ -0,0 +1,2 @@
+# Configuration file for default mounts in containers (see man 5
+# containers-mounts.conf for further information)