Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
golang-github-cznic-fileutil
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Go Packaging Team
packages
golang-github-cznic-fileutil
Commits
a8dbbc2c
Commit
a8dbbc2c
authored
8 years ago
by
Roger Shimizu
Browse files
Options
Downloads
Patches
Plain Diff
debian/patches: Add a patch from upstream
Patch to fix FTBFS on 32-bit system Closes: #860660
parent
cf84d6f4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+15
-0
15 additions, 0 deletions
debian/changelog
debian/patches/0001-TestPuch-Fix-32-bit-issues.-Closes-16.patch
+162
-0
162 additions, 0 deletions
.../patches/0001-TestPuch-Fix-32-bit-issues.-Closes-16.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
178 additions
and
0 deletions
debian/changelog
+
15
−
0
View file @
a8dbbc2c
golang-github-cznic-fileutil (0.0~git20150708.0.1c9c88f-2) UNRELEASED; urgency=medium
* Team upload.
[ Tim Potter ]
* debian/control:
- Add me to uploaders.
[ Roger Shimizu ]
* debian/patches:
- Add a patch from upstream to fix FTBFS on 32-bit system.
(Closes: #860660).
-- Roger Shimizu <rogershimizu@gmail.com> Thu, 04 May 2017 12:54:44 +0900
golang-github-cznic-fileutil (0.0~git20150708.0.1c9c88f-1) unstable; urgency=medium
* Initial release (Closes: #813950).
...
...
This diff is collapsed.
Click to expand it.
debian/patches/0001-TestPuch-Fix-32-bit-issues.-Closes-16.patch
0 → 100644
+
162
−
0
View file @
a8dbbc2c
From 90cf820aafe8f7df39416fdbb932029ff99bd1ab Mon Sep 17 00:00:00 2001
From: Jan Mercl <0xjnml@gmail.com>
Date: Wed, 22 Mar 2017 22:50:52 +0100
Subject: [PATCH] TestPuch: Fix 32-bit issues. Closes #16.
---
fileutil_arm.go | 2 ++
fileutil_darwin.go | 2 ++
fileutil_freebsd.go | 2 ++
fileutil_linux.go | 2 ++
fileutil_netbsd.go | 2 ++
fileutil_openbsd.go | 2 ++
fileutil_plan9.go | 2 ++
fileutil_solaris.go | 2 ++
fileutil_windows.go | 2 ++
punch_test.go | 6 ++++++
10 files changed, 24 insertions(+)
diff --git a/fileutil_arm.go b/fileutil_arm.go
index 9410d1b..c7b54f0 100644
--- a/fileutil_arm.go
+++ b/fileutil_arm.go
@@ -9,6 +9,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Not supported on ARM.
func PunchHole(f *os.File, off, len int64) error {
diff --git a/fileutil_darwin.go b/fileutil_darwin.go
index c2b7628..5d939b2 100644
--- a/fileutil_darwin.go
+++ b/fileutil_darwin.go
@@ -11,6 +11,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Not supported on OSX.
func PunchHole(f *os.File, off, len int64) error {
diff --git a/fileutil_freebsd.go b/fileutil_freebsd.go
index cefec0c..5a76993 100644
--- a/fileutil_freebsd.go
+++ b/fileutil_freebsd.go
@@ -11,6 +11,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Unimplemented on FreeBSD.
func PunchHole(f *os.File, off, len int64) error {
diff --git a/fileutil_linux.go b/fileutil_linux.go
index 8babfc5..a894cb7 100644
--- a/fileutil_linux.go
+++ b/fileutil_linux.go
@@ -15,6 +15,8 @@
import (
"syscall"
)
+const hasPunchHole = true
+
func n(s []byte) byte {
for i, c := range s {
if c < '0' || c > '9' {
diff --git a/fileutil_netbsd.go b/fileutil_netbsd.go
index ca778d6..d641021 100644
--- a/fileutil_netbsd.go
+++ b/fileutil_netbsd.go
@@ -11,6 +11,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Similar to FreeBSD, this is
// unimplemented.
diff --git a/fileutil_openbsd.go b/fileutil_openbsd.go
index 428171b..5c08989 100644
--- a/fileutil_openbsd.go
+++ b/fileutil_openbsd.go
@@ -9,6 +9,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Similar to FreeBSD, this is
// unimplemented.
diff --git a/fileutil_plan9.go b/fileutil_plan9.go
index a2db64e..86787e5 100644
--- a/fileutil_plan9.go
+++ b/fileutil_plan9.go
@@ -9,6 +9,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Unimplemented on Plan 9.
func PunchHole(f *os.File, off, len int64) error {
diff --git a/fileutil_solaris.go b/fileutil_solaris.go
index 61dfcde..3866686 100644
--- a/fileutil_solaris.go
+++ b/fileutil_solaris.go
@@ -11,6 +11,8 @@
import (
"os"
)
+const hasPunchHole = false
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Not supported on Solaris.
func PunchHole(f *os.File, off, len int64) error {
diff --git a/fileutil_windows.go b/fileutil_windows.go
index 3a81f2f..1e5d629 100644
--- a/fileutil_windows.go
+++ b/fileutil_windows.go
@@ -12,6 +12,8 @@
import (
"unsafe"
)
+const hasPunchHole = true
+
// PunchHole deallocates space inside a file in the byte range starting at
// offset and continuing for len bytes. Not supported on Windows.
func PunchHole(f *os.File, off, len int64) error {
diff --git a/punch_test.go b/punch_test.go
index 766f6f4..946ff5d 100644
--- a/punch_test.go
+++ b/punch_test.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build amd64 amd64p32 arm64 arm64be ppc64 ppc64le mips64 mips64le mips64p32 mips64p32le sparc64
+
package fileutil
import (
@@ -46,6 +48,10 @@
func TestPunch(t *testing.T) {
if buf[n-1] == 0 {
t.Errorf("%d. file at %d has been overwritten with 0!", i, j-1+n)
}
+ if !hasPunchHole {
+ continue
+ }
+
for k, v := range buf[1 : n-1] {
if v != 0 {
t.Errorf("%d. error reading file at %d got %d, want 0.", i, k, v)
--
2.11.0
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
a8dbbc2c
0001-TestPuch-Fix-32-bit-issues.-Closes-16.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment