diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..316c420 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fsnotify-1.4.7.tar.gz diff --git a/0001-Fix-TestInotifyOverflow.patch b/0001-Fix-TestInotifyOverflow.patch new file mode 100644 index 0000000..4ac4776 --- /dev/null +++ b/0001-Fix-TestInotifyOverflow.patch @@ -0,0 +1,46 @@ +From 70cc4a11de4adb99aa24da1e7b1782da5535beaa Mon Sep 17 00:00:00 2001 +From: Matthias Stone +Date: Thu, 30 Aug 2018 14:03:37 -0600 +Subject: [PATCH] Fix TestInotifyOverflow (#265) + +* Queued inotify events could have been read by the test before max_queued_events was hit +--- + inotify_test.go | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/inotify_test.go b/inotify_test.go +index 54f3f00..2c11d2e 100644 +--- a/inotify_test.go ++++ b/inotify_test.go +@@ -11,6 +11,7 @@ import ( + "os" + "path/filepath" + "strings" ++ "sync" + "testing" + "time" + ) +@@ -390,9 +391,12 @@ func TestInotifyOverflow(t *testing.T) { + + errChan := make(chan error, numDirs*numFiles) + ++ // All events need to be in the inotify queue before pulling events off it to trigger this error. ++ wg := sync.WaitGroup{} + for dn := 0; dn < numDirs; dn++ { + testSubdir := fmt.Sprintf("%s/%d", testDir, dn) + ++ wg.Add(1) + go func() { + for fn := 0; fn < numFiles; fn++ { + testFile := fmt.Sprintf("%s/%d", testSubdir, fn) +@@ -409,8 +413,10 @@ func TestInotifyOverflow(t *testing.T) { + continue + } + } ++ wg.Done() + }() + } ++ wg.Wait() + + creates := 0 + overflows := 0 diff --git a/golang-github-fsnotify.spec b/golang-github-fsnotify.spec new file mode 100644 index 0000000..56df30d --- /dev/null +++ b/golang-github-fsnotify.spec @@ -0,0 +1,80 @@ +# Generated by go2rpm +%bcond_without check + +# https://github.com/fsnotify/fsnotify +%global goipath github.com/fsnotify/fsnotify +Version: 1.4.7 + +%gometa + +%global goaltipaths gopkg.in/fsnotify/fsnotify.v1 gopkg.in/fsnotify/v1/fsnotify + +%global common_description %{expand: +Package Fsnotify provides a platform-independent interface for file system +notifications.} + +%global golicenses LICENSE +%global godocs AUTHORS CHANGELOG.md CONTRIBUTING.md README.md + +Name: %{goname} +Release: 6%{?dist} +Summary: Cross-platform file system notifications for Go + +# Upstream license specification: BSD-3-Clause +License: BSD +URL: %{gourl} +Source0: %{gosource} +Patch0: https://github.com/fsnotify/fsnotify/commit/70cc4a11de4adb99aa24da1e7b1782da5535beaa.patch#/0001-Fix-TestInotifyOverflow.patch + +BuildRequires: golang(golang.org/x/sys/unix) + +%description +%{common_description} + +%gopkg + +%prep +%goprep +%patch0 -p1 + +%install +%gopkginstall + +%if %{with check} +%check +%gocheck +%endif + +%gopkgfiles + +%changelog +* Wed Apr 24 12:36:18 CEST 2019 Robert-André Mauchin - 1.4.7-6 +- Update to new macros + +* Fri Mar 08 2019 Robert-André Mauchin - 1.4.7-5 +- Rewrite using new Go packaging +- Add alternate import path "gopkg.in/fsnotify/fsnotify.v1" + +* Tue Feb 05 2019 Elliott Sales de Andrade - 1.4.7-4 +- Backport patch to fix TestInotifyOverflow + +* Fri Feb 01 2019 Fedora Release Engineering - 1.4.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.4.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Feb 13 2018 Athos Ribeiro - 1.4.7-1 +- Update version + +* Wed Feb 07 2018 Fedora Release Engineering - 1.4.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 1.4.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sun Feb 26 2017 Frederico Lima - 1.4.2-1 +- First package for Fedora diff --git a/sources b/sources new file mode 100644 index 0000000..c3b5b37 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fsnotify-1.4.7.tar.gz) = 840943043c49c837641f04b976f2ba610fc03bd31030ca6442744d51fa9241da1905730ea11466e249a5bd37437f1e2a433a012a64ce872a1562c941bd5bfcbf