[arch-commits] Commit in skopeo/trunk (2 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Thu Oct 11 07:31:33 UTC 2018
Date: Thursday, October 11, 2018 @ 07:31:33
Author: bpiotrowski
Revision: 392259
0.1.31-1
Modified:
skopeo/trunk/0001-Revert-ostree-add-selinux-label-for-each-file.patch
skopeo/trunk/PKGBUILD
----------------------------------------------------------+
0001-Revert-ostree-add-selinux-label-for-each-file.patch | 35 ++++---------
PKGBUILD | 20 ++++---
2 files changed, 24 insertions(+), 31 deletions(-)
Modified: 0001-Revert-ostree-add-selinux-label-for-each-file.patch
===================================================================
--- 0001-Revert-ostree-add-selinux-label-for-each-file.patch 2018-10-11 07:28:17 UTC (rev 392258)
+++ 0001-Revert-ostree-add-selinux-label-for-each-file.patch 2018-10-11 07:31:33 UTC (rev 392259)
@@ -1,18 +1,8 @@
-From 6b8fffe3e9a8525679b8a653fcd9b05dc2f5984a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <b at bpiotrowski.pl>
-Date: Sat, 17 Mar 2018 21:33:23 +0100
-Subject: [PATCH] Revert "ostree: add selinux label for each file"
-
-This reverts commit 9b4510f6d1627c8e53c3303a8fe48ca7842c2ace.
----
- ostree/ostree_dest.go | 60 ++++++---------------------------------------------
- 1 file changed, 7 insertions(+), 53 deletions(-)
-
diff --git a/ostree/ostree_dest.go b/ostree/ostree_dest.go
-index 1d97daf..c1c8557 100644
+index 2e0d7fcf..a8e879ed 100644
--- a/ostree/ostree_dest.go
+++ b/ostree/ostree_dest.go
-@@ -14,31 +14,25 @@ import (
+@@ -15,31 +15,25 @@ import (
"os/exec"
"path/filepath"
"strconv"
@@ -45,7 +35,7 @@
import "C"
type blobToImport struct {
-@@ -156,7 +150,7 @@ func (d *ostreeImageDestination) PutBlob(stream io.Reader, inputInfo types.BlobI
+@@ -158,7 +152,7 @@ func (d *ostreeImageDestination) PutBlob(ctx context.Context, stream io.Reader,
return types.BlobInfo{Digest: computedDigest, Size: size}, nil
}
@@ -54,7 +44,7 @@
entries, err := ioutil.ReadDir(dir)
if err != nil {
return err
-@@ -171,42 +165,13 @@ func fixFiles(selinuxHnd *C.struct_selabel_handle, root string, dir string, user
+@@ -173,42 +167,13 @@ func fixFiles(selinuxHnd *C.struct_selabel_handle, root string, dir string, user
continue
}
@@ -98,16 +88,16 @@
if err != nil {
return err
}
-@@ -262,7 +227,7 @@ func generateTarSplitMetadata(output *bytes.Buffer, file string) (digest.Digest,
+@@ -264,7 +229,7 @@ func generateTarSplitMetadata(output *bytes.Buffer, file string) (digest.Digest,
return digester.Digest(), written, nil
}
-func (d *ostreeImageDestination) importBlob(selinuxHnd *C.struct_selabel_handle, repo *otbuiltin.Repo, blob *blobToImport) error {
+func (d *ostreeImageDestination) importBlob(repo *otbuiltin.Repo, blob *blobToImport) error {
+ // TODO: This can take quite some time, and should ideally be cancellable using a context.Context.
+
ostreeBranch := fmt.Sprintf("ociimage/%s", blob.Digest.Hex())
- destinationPath := filepath.Join(d.tmpDirPath, blob.Digest.Hex(), "root")
- if err := ensureDirectoryExists(destinationPath); err != nil {
-@@ -283,7 +248,7 @@ func (d *ostreeImageDestination) importBlob(selinuxHnd *C.struct_selabel_handle,
+@@ -287,7 +252,7 @@ func (d *ostreeImageDestination) importBlob(selinuxHnd *C.struct_selabel_handle,
if err := archive.UntarPath(blob.BlobPath, destinationPath); err != nil {
return err
}
@@ -116,7 +106,7 @@
return err
}
} else {
-@@ -292,7 +257,7 @@ func (d *ostreeImageDestination) importBlob(selinuxHnd *C.struct_selabel_handle,
+@@ -296,7 +261,7 @@ func (d *ostreeImageDestination) importBlob(selinuxHnd *C.struct_selabel_handle,
return err
}
@@ -125,7 +115,7 @@
return err
}
}
-@@ -400,17 +365,6 @@ func (d *ostreeImageDestination) Commit() error {
+@@ -404,17 +369,6 @@ func (d *ostreeImageDestination) Commit(ctx context.Context) error {
return err
}
@@ -143,7 +133,7 @@
checkLayer := func(hash string) error {
blob := d.blobs[hash]
// if the blob is not present in d.blobs then it is already stored in OSTree,
-@@ -418,7 +372,7 @@ func (d *ostreeImageDestination) Commit() error {
+@@ -422,7 +376,7 @@ func (d *ostreeImageDestination) Commit(ctx context.Context) error {
if blob == nil {
return nil
}
@@ -152,6 +142,3 @@
if err != nil {
return err
}
---
-2.16.2
-
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-10-11 07:28:17 UTC (rev 392258)
+++ PKGBUILD 2018-10-11 07:31:33 UTC (rev 392259)
@@ -1,7 +1,7 @@
# Maintainer: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
pkgname=skopeo
-pkgver=0.1.29
+pkgver=0.1.31
pkgrel=1
pkgdesc='A command line utility for various operations on container images and image repositories.'
arch=(x86_64)
@@ -8,20 +8,26 @@
url='https://github.com/projectatomic/skopeo'
license=(APACHE)
depends=(gpgme device-mapper ostree)
-makedepends=(go-pie go-md2man btrfs-progs)
-source=($pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz
+makedepends=(go-pie go-md2man btrfs-progs git)
+_commit=b0b750dfa1bc598a643945c7f292204fa0f0bf09 # tags/v0.1.31
+source=(git+$url#commit=$_commit
0001-Revert-ostree-add-selinux-label-for-each-file.patch)
-sha256sums=('ed155ed41e48c786de21dad3e15704bbb5539b30123682ff5236ebd09efa7f28'
- '4810389fbf2ecfb6d8c762c4de6387bac173e422cf03841bfcbee1af8045649a')
+sha256sums=('SKIP'
+ 'e9ac315d13c61e18cd96e17d35e6623ed5fa6dc444c2536ce24c80aed159d8c9')
+pkgver() {
+ cd $pkgname
+ git describe --tags | sed 's/^v//;s/-/+/g'
+}
+
prepare() {
- pushd $pkgname-$pkgver/vendor/github.com/containers/image
+ pushd $pkgname/vendor/github.com/containers/image
patch -p1 -i "$srcdir/0001-Revert-ostree-add-selinux-label-for-each-file.patch"
popd
export GOPATH="$srcdir"
mkdir -p src/github.com/projectatomic
- cp -r $pkgname-$pkgver src/github.com/projectatomic/skopeo
+ cp -r $pkgname src/github.com/projectatomic/skopeo
}
build() {
More information about the arch-commits
mailing list