summaryrefslogtreecommitdiff
path: root/sysutils/container-diff
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/container-diff')
-rw-r--r--sysutils/container-diff/Makefile33
-rw-r--r--sysutils/container-diff/distinfo3
-rw-r--r--sysutils/container-diff/files/extra-patch-without-ino6453
-rw-r--r--sysutils/container-diff/pkg-descr15
4 files changed, 104 insertions, 0 deletions
diff --git a/sysutils/container-diff/Makefile b/sysutils/container-diff/Makefile
new file mode 100644
index 000000000000..ec26fca0598c
--- /dev/null
+++ b/sysutils/container-diff/Makefile
@@ -0,0 +1,33 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= container-diff
+PORTVERSION= 0.6.0
+DISTVERSIONPREFIX= v
+CATEGORIES= sysutils
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Diff your Docker containers
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+GO_PKGNAME= github.com/${GH_ACCOUNT}/${GH_PROJECT}
+USES= go
+
+PLIST_FILES= bin/container-diff
+
+GH_ACCOUNT= GoogleCloudPlatform
+USE_GITHUB= yes
+
+.include <bsd.port.options.mk>
+
+# Change inode size from 64 bits to 32 bits for systems without ino64 support
+.if ${OSVERSION} < 1200031
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-without-ino64
+.endif
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/container-diff ${STAGEDIR}${PREFIX}/bin/container-diff
+
+.include <bsd.port.mk>
diff --git a/sysutils/container-diff/distinfo b/sysutils/container-diff/distinfo
new file mode 100644
index 000000000000..a9e796a620f9
--- /dev/null
+++ b/sysutils/container-diff/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1515077060
+SHA256 (GoogleCloudPlatform-container-diff-v0.6.0_GH0.tar.gz) = 0493e59b9dad52ed65b23029431fa93e85a1f00b9a77a5042dcd3d4053e983b9
+SIZE (GoogleCloudPlatform-container-diff-v0.6.0_GH0.tar.gz) = 2534142
diff --git a/sysutils/container-diff/files/extra-patch-without-ino64 b/sysutils/container-diff/files/extra-patch-without-ino64
new file mode 100644
index 000000000000..a26888c5dfcc
--- /dev/null
+++ b/sysutils/container-diff/files/extra-patch-without-ino64
@@ -0,0 +1,53 @@
+--- vendor/github.com/docker/docker/pkg/archive/archive_unix.go.orig 2017-12-27 17:49:24 UTC
++++ vendor/github.com/docker/docker/pkg/archive/archive_unix.go
+@@ -58,7 +58,7 @@ func setHeaderForSpecialDevice(hdr *tar.
+ return
+ }
+
+-func getInodeFromStat(stat interface{}) (inode uint64, err error) {
++func getInodeFromStat(stat interface{}) (inode uint32, err error) {
+ s, ok := stat.(*syscall.Stat_t)
+
+ if ok {
+--- vendor/github.com/docker/docker/pkg/archive/archive.go.orig 2017-12-27 17:49:24 UTC
++++ vendor/github.com/docker/docker/pkg/archive/archive.go
+@@ -378,7 +378,7 @@ type tarAppender struct {
+ Buffer *bufio.Writer
+
+ // for hardlink mapping
+- SeenFiles map[uint64]string
++ SeenFiles map[uint32]string
+ IDMappings *idtools.IDMappings
+ ChownOpts *idtools.IDPair
+
+@@ -391,7 +391,7 @@ type tarAppender struct {
+
+ func newTarAppender(idMapping *idtools.IDMappings, writer io.Writer, chownOpts *idtools.IDPair) *tarAppender {
+ return &tarAppender{
+- SeenFiles: make(map[uint64]string),
++ SeenFiles: make(map[uint32]string),
+ TarWriter: tar.NewWriter(writer),
+ Buffer: pools.BufioWriter32KPool.Get(nil),
+ IDMappings: idMapping,
+--- vendor/github.com/docker/docker/pkg/archive/changes_unix.go.orig 2017-12-27 17:49:24 UTC
++++ vendor/github.com/docker/docker/pkg/archive/changes_unix.go
+@@ -28,7 +28,7 @@ func (info *FileInfo) isDir() bool {
+ return info.parent == nil || info.stat.Mode()&unix.S_IFDIR != 0
+ }
+
+-func getIno(fi os.FileInfo) uint64 {
++func getIno(fi os.FileInfo) uint32 {
+ return fi.Sys().(*syscall.Stat_t).Ino
+ }
+
+--- vendor/github.com/docker/docker/pkg/archive/changes.go.orig 2017-12-27 17:49:24 UTC
++++ vendor/github.com/docker/docker/pkg/archive/changes.go
+@@ -363,7 +363,7 @@ func ChangesDirs(newDir, oldDir string)
+ func ChangesSize(newDir string, changes []Change) int64 {
+ var (
+ size int64
+- sf = make(map[uint64]struct{})
++ sf = make(map[uint32]struct{})
+ )
+ for _, change := range changes {
+ if change.Kind == ChangeModify || change.Kind == ChangeAdd {
diff --git a/sysutils/container-diff/pkg-descr b/sysutils/container-diff/pkg-descr
new file mode 100644
index 000000000000..98e0f198e29f
--- /dev/null
+++ b/sysutils/container-diff/pkg-descr
@@ -0,0 +1,15 @@
+container-diff is a tool for analyzing and comparing container images.
+
+container-diff can examine images along several different criteria, including:
+- Docker Image History
+- Image file system
+- Apt packages
+- pip packages
+- npm packages
+
+These analyses can be performed on a single image, or a diff can be performed on
+two images to compare. The tool can help users better understand what is
+changing inside their images, and give them a better look at what their images
+contain.
+
+WWW: https://github.com/GoogleCloudPlatform/container-diff