Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2018 07:07:08 +0000 (UTC)
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r458955 - in head/sysutils/container-diff: . files
Message-ID:  <201801140707.w0E7784m097168@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sunpoet
Date: Sun Jan 14 07:07:08 2018
New Revision: 458955
URL: https://svnweb.freebsd.org/changeset/ports/458955

Log:
  Fix build on -head (OSVERSION >= 1200031)
  
  Ino is still uint32 for all versions of FreeBSD.
  
  Reference:	https://golang.org/src/syscall/ztypes_freebsd_386.go
  		https://golang.org/src/syscall/ztypes_freebsd_amd64.go
  		https://golang.org/src/syscall/ztypes_freebsd_arm.go

Added:
  head/sysutils/container-diff/files/patch-uint32-Ino
     - copied unchanged from r458954, head/sysutils/container-diff/files/extra-patch-without-ino64
Deleted:
  head/sysutils/container-diff/files/extra-patch-without-ino64
Modified:
  head/sysutils/container-diff/Makefile

Modified: head/sysutils/container-diff/Makefile
==============================================================================
--- head/sysutils/container-diff/Makefile	Sun Jan 14 07:07:02 2018	(r458954)
+++ head/sysutils/container-diff/Makefile	Sun Jan 14 07:07:08 2018	(r458955)
@@ -20,13 +20,6 @@ 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
 

Copied: head/sysutils/container-diff/files/patch-uint32-Ino (from r458954, head/sysutils/container-diff/files/extra-patch-without-ino64)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/container-diff/files/patch-uint32-Ino	Sun Jan 14 07:07:08 2018	(r458955, copy of r458954, head/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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801140707.w0E7784m097168>