diff --git a/gcr-4.0.0.tar.xz b/gcr-4.0.0.tar.xz new file mode 100644 index 0000000..012d174 Binary files /dev/null and b/gcr-4.0.0.tar.xz differ diff --git a/gcr4.spec b/gcr4.spec new file mode 100644 index 0000000..6245bff --- /dev/null +++ b/gcr4.spec @@ -0,0 +1,107 @@ +%ifarch %{valgrind_arches} +%global has_valgrind 1 +%endif + +Name: gcr4 +Version: 4.0.0 +Release: 1 +Summary: A library for bits of crypto UI and parsing +License: LGPLv2+ +URL: https://wiki.gnome.org/Projects/CryptoGlue +Source0: https://download.gnome.org/core/43/43.1/sources/gcr-%{version}.tar.xz + +Patch9000: remove-sensitive-info.patch + +BuildRequires: pkgconfig(gio-unix-2.0) pkgconfig(gobject-introspection-1.0) pkgconfig(gtk+-3.0) pkgconfig(p11-kit-1) >= 0.19.0 +BuildRequires: chrpath docbook-style-xsl libgcrypt-devel desktop-file-utils intltool vala gnupg2 libxslt meson +BuildRequires: gi-docgen gettext cmake pkgconfig(libsecret-1) pkgconfig(libsystemd) gtk4-devel +%if 0%{?has_valgrind} +BuildRequires: valgrind-devel +%endif +BuildRequires: /usr/bin/gpg2 +BuildRequires: openssh-clients +BuildRequires: openssh-clients +BuildRequires: libxslt + +Requires: %{name}-base%{?_isa} = %{version}-%{release} +Requires: openssh-clients + +%description +gcr is a library for displaying certificates, and crypto UI, accessing key stores. It also provides a viewer for +crypto files on the GNOME desktop.gck is a library for accessing PKCS#11 modules like smart cards. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Conflicts: %{name}-devel < 3.90.0 + +%description devel +The gcr-devel package includes the header files for the gcr library. + +%package base +Summary: Library files for gcr +Conflicts: %{name} < %{version} + +%description base +The gcr-base package includes the gcr-base library. + +%prep +%autosetup -n gcr-%{version} -p1 +# Use system valgrind headers instead +%if 0%{?has_valgrind} +rm -rf build/valgrind/ +%endif + +%build +%meson +%meson_build + +%install +%meson_install + +#%%find_lang %{name} + +%check +#desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/gcr-viewer.desktop + +%post +%systemd_user_post gcr-ssh-agent.service + +%preun +%systemd_user_preun gcr-ssh-agent.service + +%postun +%systemd_user_postun_with_restart gcr-ssh-agent.service + +#%%files -f %{name}.lang +%files +%defattr(-,root,root) +%doc NEWS README.md +%license COPYING +%{_bindir}/gcr-viewer-gtk4 +%{_libexecdir}/gcr-ssh-agent +%{_libexecdir}/gcr4-ssh-askpass +%{_userunitdir}/gcr-ssh-agent.service +%{_userunitdir}/gcr-ssh-agent.socket + +%files devel +%{_includedir}/gck-2 +%{_includedir}/gcr-4 +%{_libdir}/libgck-2.so +%{_libdir}/libgcr-4.so +%{_libdir}/pkgconfig/gck-2.pc +%{_libdir}/pkgconfig/gcr-4.pc +%{_datadir}/gir-1.0 +%{_datadir}/doc +%{_datadir}/vala/ + +%files base +%{_datadir}/locale +%{_libdir}/girepository-1.0 +%{_libdir}/libgck-2.so.* +%{_libdir}/libgcr-4.so.* + +%changelog +* Mon Jan 02 2023 lin zhang - 4.0.0-1 +- Add patch to remove sensitive info. +- Package init diff --git a/gcr4.yaml b/gcr4.yaml new file mode 100644 index 0000000..7cfa976 --- /dev/null +++ b/gcr4.yaml @@ -0,0 +1,4 @@ +version_control: gitlab.gnome +src_repo: gcr +tag_prefix: ^v +seperator: . diff --git a/remove-sensitive-info.patch b/remove-sensitive-info.patch new file mode 100644 index 0000000..c8d491c --- /dev/null +++ b/remove-sensitive-info.patch @@ -0,0 +1,25 @@ +From d12a449ba5ff74dc9a03755610f7a24e61e5c062 Mon Sep 17 00:00:00 2001 +From: zhouwenpei +Date: Sat, 28 Jan 2023 17:27:58 +0800 +Subject: [PATCH] remove sensitive information + +--- + gcr/gcr-ssh-askpass.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/gcr/gcr-ssh-askpass.c b/gcr/gcr-ssh-askpass.c +index fd9e20b..b4b33d4 100644 +--- a/gcr/gcr-ssh-askpass.c ++++ b/gcr/gcr-ssh-askpass.c +@@ -193,8 +193,6 @@ askpass_thread (gpointer data) + if (input->len == 0) + g_string_append (input, _("Enter your OpenSSH passphrase")); + +- g_debug ("asking for ssh-askpass password: %s", input->str); +- + password = g_tls_password_new (G_TLS_PASSWORD_NONE, input->str); + res = g_tls_interaction_invoke_ask_password (ctx->interaction, password, ctx->cancellable, &error); + +-- +2.33.0 +