Dominique Leuenberger 2024-09-17 07:22:34 +00:00 committed by Git OBS Bridge
commit 0463b05a22
9 changed files with 398 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

23
_service Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="url">https://gitlab.gnome.org/sophie-h/glycin.git</param>
<param name="scm">git</param>
<param name="revision">1.1.1</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">v?(.*)\+0</param>
<param name="versionrewrite-replacement">\1</param>
<param name="filename">glycin-loaders</param>
</service>
<service name="set_version" mode="manual"/>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">zst</param>
</service>
<service name="cargo_vendor" mode="manual">
<param name="srcdir">glycin</param>
<param name="update">true</param>
</service>
</services>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:83d9f90052f0dfe3814d1711da5d811e3031fbfa293dac6c98e4ccc0ee9114ab
size 10424845

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4d8a185438f053831c3b4db629a632d63b8b85280d3c367a5842a93e3b509b70
size 11085837

183
glycin-loaders.changes Normal file
View File

@ -0,0 +1,183 @@
-------------------------------------------------------------------
Mon Sep 16 11:08:00 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.1.1:
+ Glycin failed to detect the SVGZ format since the files were
just detected as gzip files via the magic bytes.
- Bump maximum version of pkgconfig(libjxl) BuildRequires.
-------------------------------------------------------------------
Fri Sep 13 15:28:21 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.1.0:
+ Fixed: tests: Update to test image which uses an explicit font
name in SVG, not depending on the correct default font setting
on the system for the test to pass.
+ Changed: glycin-utils: Don't use regex feature of env-logger to
save almost 1 MB binary size in each loader.
- Changes from version 1.1.beta:
+ Add tests for animations
+ Automatically detect if glycin is used inside a Flatpak
development environment and disable sandbox in that case.
Otherwise, flatpak-spawn wouldn't use the loaders from the
right Flatpak or might not find a installed Flatpak at all.
+ Capture the stderr and stdout from loaders and editors and
included it in the new ErrorCtx type that the API now returns.
+ Also include free swap as free memory in the calculation of how
much memory a loader can use.
+ If the fontconfig cache was not up-to-date, rendering SVGs with
text would fail. There is now a loader config option to enable
passing a writable fontconfig cache dir into the loader
sandbox. This fixes the issue. The cache is per loader binary.
+ Sealing memfds sometimes fails. Is is solved via retrying the
seal until it works. In the past this was limited to very short
time of retries. The interval is now much longer and properly
async.
+ There was an error in the hardcoded limit for the texture size.
The limit is now fixed and 8GB as intended.
- Changes from version 1.1.alpha:
+ A specific error if no loaders are configured instead of giving
an unknown format error.
+ Bindings for C and other languages via GObject Introspection
under the name libglycin and libglycin-gtk4.
+ Loaders are now accompanied by editors that can return an image
with image operations applied.
+ Option to use tokio throughout instead of async-io.
+ glycin: List of mime types `glycin::DEFAULT_MIME_TYPES` that
the default loaders support.
+ glycin: New loader option to apply transformations like
rotate/mirror from metadata by default.
+ loaders: Use specific OutOfMemory error type.
+ glycin: Use a specific error type when no loaders are
configured.
+ jxl: Libjxl version 0.10 is now required.
+ svg: Use C bindings in SVG loader to reduce binary size.
- Stop exporting rustflags, no longer needed.
- Add pkgconfig(librsvg-2.0), pkgconfig(lcms2), pkgconfig(lcms2),
pkgconfig(gobject-introspection-1.0) and pkgconfig(vapigen)
BuildRequires: New dependencies.
- Add new sub-packages and needed macros and Requires for them:
+ libglycin-1-0
+ libglycin-gtk4-1-0
+ typelib-1_0-Gly_1
+ typelib-1_0-GlyGtk4_1
+ glycin-loaders-devel
-------------------------------------------------------------------
Thu Apr 4 08:02:58 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.0.1:
+ loaders/utils: Register SIGSYS handler as early as possible for
better debugging for unallowed syscalls.
+ sandbox: Allow membarrier, open, stat syscalls.
-------------------------------------------------------------------
Mon Mar 18 08:06:39 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.0.0:
+ glycin: Change to stable crate version.
+ svg: Change to stable rsvg version.
-------------------------------------------------------------------
Mon Mar 4 07:58:53 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.0.rc:
+ glycin: Allow fstat syscall.
+ glycin: Treat files detected as XML as SVG if they have .svg
file ending.
+ jxl: Allow libjxl 0.10 as well.
-------------------------------------------------------------------
Fri Feb 23 09:29:38 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.0.beta.2:
+ api: Rename a few functions.
+ api: Use memfds for larger metadata like Exif or ICC profiles.
+ glycin/glycin-utils: Drop all uses of anyhow.
+ glycin/glycin-utils: Use thiserror to define types.
+ glycin: Check image width and height are not zero.
+ loaders/image-rs: Disable memory limits since we have our own.
+ loaders: Use new error utils tracking code location.
-------------------------------------------------------------------
Mon Feb 19 17:53:15 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.0.beta.1:
+ Update to zbus 4.0.
+ glycin: Use more fine-tuned memory limits using max 80%
available memory.
-------------------------------------------------------------------
Mon Feb 12 16:05:17 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version 1.0.beta:
+ Consitently use Loader instead of Decoder terminology in code.
+ glycin: Add seccomp filter based on allow list for bwrap
sandboxes.
+ jxl: Support Exif.
- Changes from version 1.0.alpha:
+ Replace async-std with other crates
+ Use a new D-Bus API version 1+ allowing for backward compatible
extendability.
-------------------------------------------------------------------
Thu Nov 30 12:58:21 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Run service with new obs-service-cargo, drop cargo_config as
source and clean up spec and. Cargo_audit and cargo_config are
now part of the cargo_vendor tarball/service, but in this case,
since the sourcedir in _service is called glycin, we need to keep
the manual set cargo_audit in _service to clear validation.
-------------------------------------------------------------------
Tue Nov 14 20:05:44 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.1.2:
+ GIF/APNG/WEBP: Assume frame length of 100ms if provided frame
length is zero or invalid.
-------------------------------------------------------------------
Mon Sep 18 22:31:36 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.1.1:
+ Distribute correct Cargo.lock for glycin-loaders tarballs.
-------------------------------------------------------------------
Fri Sep 15 09:31:16 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Switch to full cargo packaging, add service and setup vendoring.
-------------------------------------------------------------------
Thu Sep 14 18:31:22 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.1.0:
+ Update dependencies.
-------------------------------------------------------------------
Sun Sep 3 21:28:52 UTC 2023 - Luciano Santos <luc14n0@opensuse.org>
- Update to version 0.1.rc:
+ No visible changes for the user.
-------------------------------------------------------------------
Wed Aug 23 18:54:59 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.1.beta.4:
+ Relicense under MPL-2.0 OR LGPL-2.1-or-later
+ Add symlinks for license files in crates
+ Add cairo dependency for svg loader
+ HEIC: Fix filetype detection in config
+ tests:
- Add HEIC tests
- Add option to skip image formats in tests
- Run required install before tests (can be disabled)
- Add pkgconfig(cairo) BuildRequires, new dependency.
- Pass explicit
loaders=glycin-heif,glycin-image-rs,glycin-jxl,glycin-svg to
meson, ensure we build all the loaders.
- Update License tag following upstreams relicense.
-------------------------------------------------------------------
Tue Aug 22 14:01:24 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Initial package, version 0.1.beta.3.

4
glycin-loaders.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: glycin-loaders
version: 1.1.1
mtime: 1726480753
commit: ce58882288245c1650a444243e0e90c87e53f835

155
glycin-loaders.spec Normal file
View File

@ -0,0 +1,155 @@
#
# spec file for package glycin-loaders
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without jxl
Name: glycin-loaders
Version: 1.1.1
Release: 0
Summary: Sandboxed image rendering
License: LGPL-2.1-or-later OR MPL-2.0
URL: https://gitlab.gnome.org/sophie-h/glycin
Source0: %{name}-%{version}.tar.zst
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: clang
BuildRequires: git
BuildRequires: meson
BuildRequires: pkgconfig
%if %{with jxl}
BuildRequires: (pkgconfig(libjxl) >= 0.8.2 with pkgconfig(libjxl) < 0.13.0)
%endif
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk4) >= 4.12.0
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libheif) >= 1.17.4
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libseccomp) >= 2.5.0
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(vapigen)
%description
Sandboxed and extendable image decoding.
%package -n libglycin-1-0
Summary: Shared library for %{name}
%description -n libglycin-1-0
Sandboxed and extendable image decoding.
This package provides the shared library for %{name}
%package -n libglycin-gtk4-1-0
Summary: Shared library for %{name}
%description -n libglycin-gtk4-1-0
Sandboxed and extendable image decoding.
This package provides the shared library for %{name}
%package -n typelib-1_0-Gly_1
Summary: Introspection bindings for %{name}
%description -n typelib-1_0-Gly_1
Sandboxed and extendable image decoding.
This package provides introspection bindings for %{name}
%package -n typelib-1_0-GlyGtk4_1
Summary: Introspection bindings for %{name}
%description -n typelib-1_0-GlyGtk4_1
Sandboxed and extendable image decoding.
This package provides introspection bindings for %{name}
%package devel
Summary: Development Files for %{name}
Requires: libglycin-1-0 = %{version}
Requires: libglycin-gtk4-1-0 = %{version}
Requires: typelib-1_0-GlyGtk4_1 = %{version}
Requires: typelib-1_0-Gly_1 = %{version}
%description devel
Sandboxed and extendable image decoding.
This package provides developments files for %{name}
%prep
%autosetup -p1 -a1
%build
%meson \
-Dloaders=glycin-heif,glycin-image-rs,glycin-svg%[%{with jxl}?",glycin-jxl":""] \
%{nil}
%meson_build
%install
%meson_install
%ldconfig_scriptlets -n libglycin-1-0
%ldconfig_scriptlets -n libglycin-gtk4-1-0
%files
%dir %{_libexecdir}/glycin-loaders
%dir %{_libexecdir}/glycin-loaders/1+
%{_libexecdir}/glycin-loaders/1+/glycin-heif
%{_libexecdir}/glycin-loaders/1+/glycin-image-rs
%{_libexecdir}/glycin-loaders/1+/glycin-svg
%dir %{_datadir}/glycin-loaders
%dir %{_datadir}/glycin-loaders/1+
%dir %{_datadir}/glycin-loaders/1+/conf.d
%{_datadir}/glycin-loaders/1+/conf.d/glycin-heif.conf
%{_datadir}/glycin-loaders/1+/conf.d/glycin-image-rs.conf
%{_datadir}/glycin-loaders/1+/conf.d/glycin-svg.conf
%if %{with jxl}
%{_libexecdir}/glycin-loaders/1+/glycin-jxl
%{_datadir}/glycin-loaders/1+/conf.d/glycin-jxl.conf
%endif
%files -n libglycin-1-0
%{_libdir}/libglycin-1.so.0
%files -n libglycin-gtk4-1-0
%{_libdir}/libglycin-gtk4-1.so.0
%files -n typelib-1_0-Gly_1
%{_libdir}/girepository-1.0/Gly-1.typelib
%files -n typelib-1_0-GlyGtk4_1
%{_libdir}/girepository-1.0/GlyGtk4-1.typelib
%files devel
%dir %{_includedir}/glycin-1
%{_includedir}/glycin-1/glycin.h
%dir %{_includedir}/glycin-gtk4-1
%{_includedir}/glycin-gtk4-1/glycin-gtk4.h
%{_libdir}/libglycin-1.so
%{_libdir}/libglycin-gtk4-1.so
%{_libdir}/pkgconfig/glycin-1.pc
%{_libdir}/pkgconfig/glycin-gtk4-1.pc
%{_datadir}/gir-1.0/Gly-1.gir
%{_datadir}/gir-1.0/GlyGtk4-1.gir
%{_datadir}/vala/vapi/libglycin-1.deps
%{_datadir}/vala/vapi/libglycin-1.vapi
%{_datadir}/vala/vapi/libglycin-gtk4-1.deps
%{_datadir}/vala/vapi/libglycin-gtk4-1.vapi
%changelog

3
vendor.tar.zst Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e507262d9164572641821a3e6cdc29b9ad57592aaedad0de7a72ff9710c1a8e
size 28657751