Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-magic for openSUSE:Factory checked in at 2026-11-17 17:17:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-magic (Old) and /work/SRC/openSUSE:Factory/.ghc-magic.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-magic" Tue Nov 17 17:17:11 2026 rev:6 rq:1397771 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-magic/ghc-magic.changes 2026-06-18 18:41:45.295862117 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-magic.new.1251/ghc-magic.changes 2026-11-17 17:19:06.009324400 +0100 @@ -1,0 +2,25 @@ +Tue Jun 9 15:09:45 UTC 2026 - Peter Simons <[email protected]> + +- Update magic to version 2.0.0. + ## 2.0.0 (2026-06-09) + + A modernizing redesign, and the first release in which `magic` is genuinely safe and correct under real-world use. The reasons to upgrade: + + - **Thread-safe handles.** `Magic` is now an opaque handle whose operations are serialised by an internal per-handle lock, so sharing one handle across threads is safe (it was previously a silent data race). Use distinct handles for parallelism. (`Magic` was the transparent synonym `type Magic = ForeignPtr CMagic`, so the `CMagic` phantom type is no longer exported.) + - **Correct on any filename.** Paths are now `OsPath`, which stores the OS-native path bytes verbatim and avoids the lossy locale round-trip that `String` paths suffer on unusual filenames. `magicFile` takes an `OsPath`; `magicLoad`, `magicCompile`, and `magicCheck` take `[OsPath]` (the empty list means the default database); `magicGetPath` returns `[OsPath]`. The new `Magic.FilePath` module offers the whole API with ordinary `String` paths for convenience. + - **Correct on any in-memory data.** Removed `magicString`, which round-tripped data through the locale encoding and corrupted non-text bytes. Identify in-memory data with `magicByteString` (raw bytes) or `magicCString` (a raw pointer). + - **Memory-safe loading from memory.** Restored `magicLoadBuffers :: Magic -> [ByteString] -> IO ()` (removed in 1.1.2): the handle now retains the supplied buffers for its lifetime, so embedding and loading a compiled database from memory is memory-safe. + - **Typed, catchable errors.** Failures raise a dedicated `MagicException` carrying the failing operation and `libmagic`'s message, with a readable `displayException`, instead of a generic `IOError`. (`magicOpen` still raises an `errno` `IOError`, as there is no handle yet to query.) + - **Correct, ergonomic flags.** A `MagicFlags` bit-mask newtype replaces the old `MagicFlag` enumeration, whose `Enum`-as-bit-mask design mishandled aliased and composite constants. Combine flags with `(<>)`, start from `mempty`, test with `hasFlag`, narrow with `removeFlags`; each flag is a pattern synonym, and `show` prints the set flags by name. + - **`Text` results.** `magicFile`, `magicStdin`, `magicCString`, `magicByteString`, and `magicDescriptor` return `Text`. + - **Good-citizen instances.** Added `Generic` and `NFData` for `MagicFlags`, `MagicParam`, and `MagicException`. + + ### Migrating from 1.x + + - Results are `Text`: add `Data.Text.unpack` where you still need `String`. + - In-memory data: `magicString` becomes `magicByteString` (pass a `ByteString`). + - Flags: `magicOpen [MagicMimeType, MagicError]` becomes `magicOpen (MagicMimeType <> MagicError)`, and `[]` becomes `mempty`. + - Paths: adopt `OsPath`, or `import Magic.FilePath` to keep `String` paths. + - Catch `MagicException` instead of `IOException`. + +------------------------------------------------------------------- Old: ---- magic-1.1.2.tar.gz New: ---- magic-2.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-magic.spec ++++++ --- /var/tmp/diff_new_pack.eZdCUD/_old 2026-11-17 17:19:06.731354877 +0100 +++ /var/tmp/diff_new_pack.eZdCUD/_new 2026-11-17 17:19:06.733354962 +0100 @@ -20,7 +20,7 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.1.2 +Version: 2.0.0 Release: 0 Summary: Interface to C file/magic library License: BSD-3-Clause @@ -31,7 +31,15 @@ BuildRequires: ghc-base-prof BuildRequires: ghc-bytestring-devel BuildRequires: ghc-bytestring-prof +BuildRequires: ghc-deepseq-devel +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-filepath-devel +BuildRequires: ghc-filepath-prof +BuildRequires: ghc-os-string-devel +BuildRequires: ghc-os-string-prof BuildRequires: ghc-rpm-macros +BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof BuildRequires: pkgconfig BuildRequires: pkgconfig(libmagic) ExcludeArch: %{ix86} @@ -40,8 +48,6 @@ BuildRequires: ghc-HUnit-prof BuildRequires: ghc-directory-devel BuildRequires: ghc-directory-prof -BuildRequires: ghc-filepath-devel -BuildRequires: ghc-filepath-prof BuildRequires: ghc-unix-devel BuildRequires: ghc-unix-prof %endif ++++++ magic-1.1.2.tar.gz -> magic-2.0.0.tar.gz ++++++ ++++ 1741 lines of diff (skipped)
