Sync from SUSE:SLFO:Main libsecret revision 0765acf03dbfb2c19c46036942a8941d

This commit is contained in:
Adrian Schröter 2024-05-03 15:49:27 +02:00
commit 7128089a6f
6 changed files with 575 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
baselibs.conf Normal file
View File

@ -0,0 +1 @@
libsecret-1-0

BIN
libsecret-0.20.5.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
diff --git a/egg/egg-libgcrypt.c b/egg/egg-libgcrypt.c
index 22f005d..a01fb11 100644
--- a/egg/egg-libgcrypt.c
+++ b/egg/egg-libgcrypt.c
@@ -107,11 +107,6 @@ egg_libgcrypt_initialize (void)
gcry_set_log_handler (log_handler, NULL);
gcry_set_outofcore_handler (no_mem_handler, NULL);
gcry_set_fatalerror_handler (fatal_handler, NULL);
- gcry_set_allocation_handler ((gcry_handler_alloc_t)g_malloc,
- (gcry_handler_alloc_t)egg_secure_alloc,
- egg_secure_check,
- (gcry_handler_realloc_t)egg_secure_realloc,
- egg_secure_free);
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
}

391
libsecret.changes Normal file
View File

@ -0,0 +1,391 @@
-------------------------------------------------------------------
Tue Feb 22 09:28:12 UTC 2022 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.20.5:
+ Drop autotools-based build
+ Use G_GNUC_NULL_TERMINATED where appropriate
+ collection, methods, prompt: Port to GTask
+ Detect local storage in snaps in the same way as flatpaks
+ Add bash-completion for secret-tool
+ secret-tool: Add locking capabilities to secret tool
+ secret-file-backend: Avoid closing the same file descriptor
twice
+ Add support for TPM2 based secret storage
+ Create default collection after DBus.Error.UnknownObject
+ Port documentation to gi-docgen
+ GI annotation and documentation fixes
+ Build fixes
+ Updated translations.
- Replace gtk-doc with pkgconfig(gi-docgen) BuildRequires following
upstreams port.
- Drop patch fixed upstream: libsecret-handle-UnknownObject.patch
-------------------------------------------------------------------
Wed Sep 22 06:23:46 UTC 2021 - Alynx Zhou <alynx.zhou@suse.com>
- Add libsecret-handle-UnknownObject.patch: some Secret Service
API backend implementations (like keepassxc) throws
UnknownObject instead of UnknownMethod, this patch handles it.
(bsc#1190499, glgo#GNOME/libsecret!94)
-------------------------------------------------------------------
Thu Sep 16 02:01:38 UTC 2021 - Stanislav Brabec <sbrabec@suse.com>
- Remove obsolete translation-update-upstream support
(jsc#SLE-21105).
-------------------------------------------------------------------
Sat Oct 10 16:57:04 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.20.4:
+ Secret-file-collection: Make MAC comparison constant time.
+ Initialize libgcrypt for SecretFileCollection.
+ meson:
- Add tests for GIR-based languages.
- Add option introspection.
+ man: Add a bugtracker section to the manpage.
+ Updated translations.
-------------------------------------------------------------------
Wed Apr 29 20:33:36 UTC 2020 - Michael Gorse <mgorse@suse.com>
- Enable FIPS patch on leap (jsc#SLE-11882).
-------------------------------------------------------------------
Wed Apr 15 08:41:27 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.20.3:
+ secret-file-backend: Fix use-after-free in flatpak.
+ docs: Add man subdir only if manpage is enabled.
-------------------------------------------------------------------
Wed Mar 11 10:44:56 UTC 2020 - bjorn.lie@gmail.com
- Update to version 0.20.2:
+ secret-file-collection: force little-endian in GVariant.
+ Prefer g_info() over g_message().
+ meson: Don't specify shared_library().
+ docs: Make sure to set install: true.
- Rename sub-package libsecret-tools to secret-tool: Align with the
actual binary provided and remove a rpmlint warning. Add Provides
and Obsoletes to ease upgrades for our end-users.
- Drop Group tag from spec.
-------------------------------------------------------------------
Tue Jan 28 20:42:07 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.20.1:
+ Build fixes.
-------------------------------------------------------------------
Sat Jan 25 14:17:20 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- No longer recommend -lang: supplements are in use
-------------------------------------------------------------------
Mon Jan 13 15:21:54 UTC 2020 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.20.0:
+ secret-backend:
- New interface to represent password storage backend.
- Add local-storage backend.
+ item: Port to GTask.
+ Build fixes.
+ Updated translations.
-------------------------------------------------------------------
Sun Sep 8 10:51:30 NZST 2019 - luke@ljones.dev
- Update to version 0.19.1:
+ service: Fix secret_service_ensure_session_finish error
propagation.
- Changes from version 0.19.0:
+ secret-password: Add necessary functions to migrate from D-Bus
based API.
+ egg: Request that secure memory not be dumped to disk.
+ Add version macros.
+ Add missing GType to flags in .gir.
+ paths: Port from GSimpleAsyncResult to GTask.
+ build: Bump meson_version to 0.50.
+ Build and test fixes.
-------------------------------------------------------------------
Sat Mar 2 12:33:07 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 0.18.8:
+ Add support for g_autoptr() to our types.
+ Remove deprecated g_type_class_add_private().
+ Bump GLib dependency (2.44+).
+ Add meson build support.
+ Fix vapi generation.
+ Build fixes.
+ Updated translations.
-------------------------------------------------------------------
Sat Dec 29 10:05:27 UTC 2018 - bjorn.lie@gmail.com
- Update to version 0.18.7:
+ Migrate from intltool to gettext.
+ Fix uninitialized memory returned by
secret_item_get_schema_name().
+ secret-session: Avoid double-free in
service_encode_plain_secret().
+ Port tap script to Python 3.
+ Build and test fixes.
+ Updated translations.
- Drop intltool BuildRequires: No longer needed following upstreams
port to gettext.
-------------------------------------------------------------------
Thu Mar 29 23:44:12 UTC 2018 - luc14n0@linuxmail.org
- Update to version 0.18.6:
+ Fix shared key derivation between libsecret and gnome-keyring
(bgo#778357).
+ Avoid run-time error when gnome-keyring is not responding
(bgo#787391).
+ Enable cross compilation (bgo#748111).
+ GI annotation fixes (bgo#785034).
+ Fix textual typos (bgo#782206).
+ Updated translations.
- Drop libsecret-secret-size.patch: fixed upstream.
-------------------------------------------------------------------
Sat Mar 10 00:23:06 UTC 2018 - jengelh@inai.de
- SRPM group fix. Update summaries.
- Remove duplicate commands. Limit fdupes to /usr.
-------------------------------------------------------------------
Wed Feb 28 16:36:16 UTC 2018 - dimstar@opensuse.org
- Modernize spec-file by calling spec-cleaner
-------------------------------------------------------------------
Mon Jul 17 15:25:56 UTC 2017 - dimstar@opensuse.org
- Add libsecret-secret-size.patch: Ensure that generated secret
occupies the same number of bytes as prime. Eliminates random
errors while libsecret tries to talk to gnome-keyring
(bgo#778357, bsc#1043861).
-------------------------------------------------------------------
Fri Mar 25 15:12:37 UTC 2016 - zaitor@opensuse.org
- Update to version 0.18.5:
+ Build fixes.
+ Port tests to Python 3 (bgo#761834).
+ Fix textual typos (bgo#763143).
+ Updated translations.
-------------------------------------------------------------------
Tue Jan 19 08:56:19 UTC 2016 - zaitor@opensuse.org
- Update to version 0.18.4:
+ Multithreading fixes (bgo#756766).
+ Fix memory leaks (bgo#756766).
+ Updated translations.
-------------------------------------------------------------------
Thu Nov 26 03:02:09 CET 2015 - hpj@suse.com
- Add libsecret-bsc932232-use-libgcrypt-allocators.patch
(bsc#932232).
-------------------------------------------------------------------
Tue Aug 4 08:09:41 UTC 2015 - zaitor@opensuse.org
- Update to version 0.18.3:
+ Documentation fixes.
+ Updated translations.
-------------------------------------------------------------------
Wed Apr 22 09:33:38 UTC 2015 - dimstar@opensuse.org
- Update to version 0.18.2:
+ Testing fixes.
+ Documentation typo (bgo#747654).
+ Build fixes (bgo#743444).
+ Accomodate libgcrypt 1.6+.
+ Updated translations.
- Changes from version 0.18.1:
+ Testing fix (bgo#726909).
-------------------------------------------------------------------
Fri Mar 7 07:38:47 UTC 2014 - dimstar@opensuse.org
- Update to version 0.18:
+ Mark most of unstable API as stable.
+ Bump Glib dependency (2.38+).
+ Add secret_service_encode_dbus_secret() and decode functions.
+ Use TAP for testing, parallel tests, and non-recursive make.
+ Updated FSF's address.
+ Remove unstable vapi (bgo#721429).
+ Build fixes: bgo#720087, bgo#720244, bgo#707452.
+ Updated translations.
- Drop typelib-1_0-SecretUnstable-0 subpackage: no more unstable
APIs (incl. dependency to this package from the -devel package).
-------------------------------------------------------------------
Mon Aug 26 17:06:51 UTC 2013 - dimstar@opensuse.org
- Update to version 0.16:
+ Clarify documentation for secret_service_clear_xxx()
(bgo#705629).
+ Pass return_type to prompt async begin functions, rather than
finish.
+ Simpler way to use custom service/collection/item types.
+ service: Rename secret_service_new() and friends to xxx_open().
+ Add secret_value_get_text() function to return NULL terminated
secret.
+ Fix return types in secret_service_search_finish() on error
paths (bgo#698040).
+ Testing fixes (bgo#705202).
+ Build fixes (bgo#704233).
+ Updated translations.
-------------------------------------------------------------------
Mon Mar 18 08:41:56 UTC 2013 - dimstar@opensuse.org
- Update to version 0.15:
+ Tweak predefined schemas (bgo#695791).
+ Updated translations.
-------------------------------------------------------------------
Mon Mar 4 19:12:36 UTC 2013 - dimstar@opensuse.org
- Update to version 0.14:
+ Add a 'search' command to the tool for looking up items
(bgo#693881).
+ Try to unlock locked collection when storing an item
(bgo#693723).
+ Improve validation of the attributes table (bgo#694107).
+ Allow empty SecretValue contents (bgo#694787).
+ Introspection fixes (bgo#694448).
+ Updated translations.
-------------------------------------------------------------------
Mon Feb 4 22:26:04 UTC 2013 - dimstar@opensuse.org
- Update to version 0.13:
+ Build fixes.
+ Updated translations.
-------------------------------------------------------------------
Thu Nov 22 10:09:16 UTC 2012 - dimstar@opensuse.org
- Update to version 0.12:
+ When storing a secret, create default keyring if necessary.
+ Share the memory pool with the gcr or libgnome-keyring library.
+ Testing and other fixes.
+ Build fixes.
-------------------------------------------------------------------
Tue Oct 16 07:15:52 UTC 2012 - dimstar@opensuse.org
- Update to version 0.11:
+ Better critical preconditions for invalid attributes.
-------------------------------------------------------------------
Wed Sep 19 09:33:01 UTC 2012 - dimstar@opensuse.org
- Update to version 0.10:
+ Updated translations.
-------------------------------------------------------------------
Sat Sep 15 15:37:23 UTC 2012 - dimstar@opensuse.org
- Change vala BuildRequires to a versioned BuildRequires: no reason
to waste build power if vala is not recent enough.
-------------------------------------------------------------------
Mon Aug 20 16:53:30 UTC 2012 - dimstar@opensuse.org
- Update to version 0.9:
+ Add a manual page for secret-tool.
+ Fix up libsecret licensing.
+ Build and testing fixes.
- Add docbook-xsl-stylesheets and xsltproc BuildRequires in order
to be able to build the man pages.
-------------------------------------------------------------------
Mon Aug 6 18:36:19 UTC 2012 - dimstar@opensuse.org
- Update to version 0.8:
+ Fix up libsecret licensing (bgo#681255).
+ Initialize gettext correctly.
+ Fix crash in secret-tool.
+ Build and testing fixes.
-------------------------------------------------------------------
Tue Jul 17 12:31:46 UTC 2012 - dimstar@opensuse.org
- Update to version 0.7:
+ Match schema names for notes and network passwords
+ Add flags argument to secret_collection_for_alias()
+ Correct flags behavior for SecretCollection
+ Build fixes
- Changes from version 0.6:
+ Rename secret_password_remove() to secret_password_clear()
and similar names for related functions.
+ The secret_attribute_build() functions are stable
+ The predefined secret schemas are stable
+ Build fixes
- Changes from version 0.5:
+ secret_service_remove() removes all unlocked matching items
+ Make sure that we have some attributes when searching
+ Add flags for item and collection creation
+ Add way to get schema name from a SecretItem
+ Rename secret_service_read_alias() to
secret_collection_for_alias()
+ Split the stable and unstable APIs into separate
pkg-config files, girs and vapis
+ Bump the library major version number to 1
+ Document how to migrate from libgnome-keyring
+ Document how to use libsecret from C, js, python, vala
+ Documentation fixes
- Changes from version 0.4:
+ Implement per collection search
+ Register secret service errors as GDBus errors
+ Cache default SecretService object, and provide a way to
'disconnect' it. Also 'disconnect' if service goes away.
+ Better use of aliases when storing passwords
+ Rename functions that operate on a dbus object path
+ Accept NULL as a SecretService parameter for many methods
+ Make loading items for a collection optional
+ More consistent use of schemas
+ Able to unlock and load secrets while searching for items
+ Cache the secret value on SecretItem
+ Add vala bindings and tests
+ Remove most varargs other than the simple password functions
+ Add SECRET_SCHEMA_NOTE schema
+ Lots of bug fixes
+ Documentation fixes
+ Testing fixes
+ Build fixes
- Add vala BuildRequires: required to build the new bindings.
-------------------------------------------------------------------
Wed Jun 27 18:57:33 UTC 2012 - dimstar@opensuse.org
- Update to version 0.3:
+ Add methods to get services from collections, items
+ Add methods to read and set aliases
+ Add methods which handle prompts for a DBus object path
+ Header path fix
+ Documentation fixes
-------------------------------------------------------------------
Tue Apr 17 06:47:09 UTC 2012 - vuntz@opensuse.org
- Update to version 0.2:
+ Fix header copyright issues
+ Add missing 'authtype' attribute to the 'network' schema
+ Add secret-schemas.h to the 'stable' API
+ Build fixes
-------------------------------------------------------------------
Mon Apr 2 06:11:57 UTC 2012 - vuntz@opensuse.org
- New package with 0.1 as initial version.

141
libsecret.spec Normal file
View File

@ -0,0 +1,141 @@
#
# spec file for package libsecret
#
# Copyright (c) 2022 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/
#
%define have_lang 1
Name: libsecret
Version: 0.20.5
Release: 0
Summary: Library for accessing the Secret Service API
License: LGPL-2.1-or-later
URL: https://wiki.gnome.org/Projects/Libsecret
Source0: https://download.gnome.org/sources/libsecret/0.20/%{name}-%{version}.tar.xz
Source99: baselibs.conf
## SLE-only patches start at 1000
# PATCH-FIX-SLE libsecret-bsc932232-use-libgcrypt-allocators.patch bsc#932232 hpj@suse.com -- use libgcrypt allocators for FIPS mode
Patch1000: libsecret-bsc932232-use-libgcrypt-allocators.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
BuildRequires: gobject-introspection-devel >= 1.29
BuildRequires: libgcrypt-devel >= 1.2.2
BuildRequires: meson >= 0.50
BuildRequires: pkgconfig
BuildRequires: vala >= 0.17.2.12
BuildRequires: xsltproc
BuildRequires: pkgconfig(gi-docgen)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.44.0
%description
libsecret is a library for storing and retrieving passwords and other
secrets. It communicates with the "Secret Service" using DBus.
%package -n libsecret-1-0
Summary: Library for accessing the Secret Service API
%if %{have_lang}
# To make the lang package happy
Provides: %{name} = %{version}
%endif
%description -n libsecret-1-0
libsecret is a library for storing and retrieving passwords and other
secrets. It communicates with the "Secret Service" using DBus.
%package -n typelib-1_0-Secret-1
Summary: Introspection bindings for the Secret Service API library
%description -n typelib-1_0-Secret-1
libsecret is a library for storing and retrieving passwords and other
secrets. It communicates with the "Secret Service" using DBus.
This package provides the GObject Introspection bindings for libsecret.
%package -n secret-tool
Summary: Store and retrieve passwords
Obsoletes: libsecret-tools < %{version}
Provides: libsecret-tools = %{version}
%description -n secret-tool
Secret-tool is a command line tool that can be used to store and
retrieve passwords.
%package devel
Summary: Development files for the Secret Service API library
Requires: libsecret-1-0 = %{version}
Requires: typelib-1_0-Secret-1 = %{version}
%description devel
libsecret is a library for storing and retrieving passwords and other
secrets. It communicates with the "Secret Service" using DBus.
%if %{have_lang}
%lang_package
%endif
%prep
%setup -q
%if 0%{?sle_version}
%patch1000 -p1
%endif
%build
%meson \
%{nil}
%meson_build
%install
%meson_install
find %{buildroot} -type f -name "*.la" -delete -print
%if %{have_lang}
%find_lang %{name} %{?no_lang_C}
%endif
%fdupes %{buildroot}/%{_prefix}
%post -n libsecret-1-0 -p /sbin/ldconfig
%postun -n libsecret-1-0 -p /sbin/ldconfig
%files -n libsecret-1-0
%license COPYING
%doc NEWS README.md
%{_libdir}/libsecret-1.so.*
%files -n typelib-1_0-Secret-1
%{_libdir}/girepository-1.0/Secret-1.typelib
%files -n secret-tool
%{_bindir}/secret-tool
%{_mandir}/man1/secret-tool.1%{?ext_man}
%files devel
%{_libdir}/libsecret-1.so
%{_libdir}/pkgconfig/libsecret-1.pc
%{_libdir}/pkgconfig/libsecret-unstable.pc
%{_includedir}/libsecret-1/
%{_datadir}/gir-1.0/Secret-1.gir
%doc %{_datadir}/doc/libsecret-1/
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/libsecret-1.deps
%{_datadir}/vala/vapi/libsecret-1.vapi
%if %{have_lang}
%files lang -f %{name}.lang
%endif
%changelog