diff --git a/florist-fix-locking-full-size-file-even-when-growing.patch b/florist-fix-locking-full-size-file-even-when-growing.patch new file mode 100644 index 0000000..100cd57 --- /dev/null +++ b/florist-fix-locking-full-size-file-even-when-growing.patch @@ -0,0 +1,29 @@ +--- a/libsrc/posix-file_locking.adb ++++ b/libsrc/posix-file_locking.adb +@@ -81,7 +81,7 @@ + if Lock.Whole_File then + T.l_whence := SEEK_SET; + T.l_start := 0; +- T.l_len := off_t (POSIX.IO.File_Size (File)); ++ T.l_len := 0; + else + T.l_whence := C_Whence (Lock.Starting_Point); + T.l_start := off_t (Lock.Start); +@@ -126,7 +126,7 @@ + if Lock.Whole_File then + T.l_whence := SEEK_SET; + T.l_start := 0; +- T.l_len := off_t (POSIX.IO.File_Size (File)); ++ T.l_len := 0; + else + T.l_whence := C_Whence (Lock.Starting_Point); + T.l_start := off_t (Lock.Start); +@@ -152,7 +152,7 @@ + if Lock.Whole_File then + T.l_whence := SEEK_SET; + T.l_start := 0; +- T.l_len := off_t (POSIX.IO.File_Size (File)); ++ T.l_len := 0; + else + T.l_whence := C_Whence (Lock.Starting_Point); + T.l_start := off_t (Lock.Start); diff --git a/florist-fix-number-of-elements-to-write.patch b/florist-fix-number-of-elements-to-write.patch new file mode 100644 index 0000000..8cd5c60 --- /dev/null +++ b/florist-fix-number-of-elements-to-write.patch @@ -0,0 +1,11 @@ +--- a/libsrc/posix-io.adb ++++ b/libsrc/posix-io.adb +@@ -477,7 +477,7 @@ + + loop + Result := write +- (int (File), Item'Address + Written, size_t (To_Write - Written)); ++ (int (File), Item'Address + Written, size_t (To_Write)); + -- Exit if write fails or zero-length write succeeds. + exit when Result <= 0; + Written := Written + Storage_Offset (Result); diff --git a/florist.spec b/florist.spec index 60df0ce..fc8cdd7 100644 --- a/florist.spec +++ b/florist.spec @@ -15,6 +15,15 @@ License: GPLv2+ with exceptions URL: https://github.com/%{upstream_owner}/%{upstream_name} Source: %{url}/archive/%{upstream_gittag}/%{upstream_name}-%{upstream_version}.tar.gz +# The following patches have been downloaded from a fork of Florist that +# continued public maintenance of the library while it was not available through +# AdaCore's GitHub page. See the patch files for details. + +# [Bugfix] https://github.com/AdaCore/florist/issues/6 +Patch: %{name}-fix-locking-full-size-file-even-when-growing.patch +# [Bugfix] https://github.com/AdaCore/florist/issues/7 +Patch: %{name}-fix-number-of-elements-to-write.patch + BuildRequires: fedora-gnat-project-common BuildRequires: gprbuild gcc-gnat