| Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
| Name: ghc-magic | Distribution: openSUSE Tumbleweed |
| Version: 2.0.0 | Vendor: openSUSE |
| Release: 1.1 | Build date: Tue Jun 9 17:09:45 2026 |
| Group: Unspecified | Build host: reproducible |
| Size: 279451 | Source RPM: ghc-magic-2.0.0-1.1.src.rpm |
| Packager: http://bugs.opensuse.org | |
| Url: https://hackage.haskell.org/package/magic | |
| Summary: Interface to C file/magic library | |
This package provides a Haskell interface to the C libmagic library. With it, you can determine the type of a file by examining its contents rather than its name. The Haskell interface provides a full-featured binding. Note: this package requires the C libmagic library (part of the 'file' package) and its development headers to be installed at build time.
BSD-3-Clause
* Tue Jun 09 2026 Peter Simons <psimons@suse.com>
- 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`.
* Tue Jun 09 2026 Peter Simons <psimons@suse.com>
- Update magic to version 1.1.2.
Upstream added a new change log file in this release. With no
previous version to compare against, the automatic updater cannot
reliable determine the relevante entries for this release.
* Thu Mar 30 2023 Peter Simons <psimons@suse.com>
- Updated spec file to conform with ghc-rpm-macros-2.5.2.
* Thu Dec 17 2020 Ondřej Súkup <mimi.vx@gmail.com>
- disable %{ix86} build
* Tue Aug 18 2020 Peter Simons <psimons@suse.com>
- Replace %setup -q with the more modern %autosetup macro.
* Tue Jun 09 2020 psimons@suse.com
- Add magic at version 1.1.
/usr/lib64/ghc-9.12.4/lib/libHSmagic-2.0.0-LE2TpDjewePEIGR8wEHorS-ghc9.12.4.so /usr/share/licenses/ghc-magic /usr/share/licenses/ghc-magic/COPYING
Generated by rpm2html 1.8.1
Fabrice Bellet, Wed Nov 25 00:03:46 2026