commit
b49d70fbb8
21
0001-Fix-pkg-config-installation-path.patch
Normal file
21
0001-Fix-pkg-config-installation-path.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From 96f1795fb16d9ae67c9eabfc0e0f45a34794ae43 Mon Sep 17 00:00:00 2001
|
||||
From: chxssg <chxssg@qq.com>
|
||||
Date: Thu, 30 Jul 2020 20:24:36 +0800
|
||||
Subject: [PATCH] Fix pkg-config installation path
|
||||
|
||||
---
|
||||
data/meson.build | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/data/meson.build b/data/meson.build
|
||||
--- a/data/meson.build
|
||||
+++ b/data/meson.build
|
||||
@@ -38,4 +38,5 @@ pkgconfig.generate(
|
||||
name: 'shared-mime-info',
|
||||
description: 'Freedesktop common MIME database',
|
||||
version: meson.project_version(),
|
||||
+ install_dir: get_option('datadir') / 'pkgconfig'
|
||||
)
|
||||
--
|
||||
2.23.0
|
||||
|
||||
26
0002-Update-compilation-instructions.patch
Normal file
26
0002-Update-compilation-instructions.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/README.md b/README.md
|
||||
index 750ebd5a2ad89c7fdf6167bd4310e1f58a24fafc..c23d9d5cd2b8618c5ebdc53ad8f5dcd01981c990 100644
|
||||
--- a/README.md
|
||||
+++ b/README.md
|
||||
@@ -13,15 +13,13 @@ For more information about the database see the [Shared MIME Info Specification
|
||||
## Installation
|
||||
|
||||
To install do:
|
||||
+```sh
|
||||
+$ meson _build -Dprefix=/usr
|
||||
+$ ninja -v -C _build install
|
||||
+```
|
||||
|
||||
- $ ./configure --prefix=/usr --sysconfdir=/etc
|
||||
- $ make
|
||||
- $ sudo make install
|
||||
-
|
||||
-If you are building from git then you will have to run `./autogen.sh` first.
|
||||
-
|
||||
-It requires glib to be installed for building the update command.
|
||||
-Additionally, it uses gettext and itstool for translations.
|
||||
+It requires the glib development package to be installed as well as
|
||||
+gettext and itstool.
|
||||
This database is translated at Transifex.
|
||||
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From 2a7b8f1608bf4ad42fdac5992c6b33050b6d8fea Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Tue, 24 Jul 2018 13:57:24 +0200
|
||||
Subject: [PATCH 07/41] Fix memleak in write_data()
|
||||
|
||||
s is allocated but never freed.
|
||||
---
|
||||
update-mime-database.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/update-mime-database.c b/update-mime-database.c
|
||||
index 2ef3596..d48e69a 100644
|
||||
--- a/update-mime-database.c
|
||||
+++ b/update-mime-database.c
|
||||
@@ -2240,6 +2240,8 @@ write_data (FILE *cache, const gchar *n, gint len)
|
||||
|
||||
i = fwrite (s, l, 1, cache);
|
||||
|
||||
+ g_free(s);
|
||||
+
|
||||
return i == 1;
|
||||
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
From e94a220c30fe08991f5e72e9a02644b13a3fe0d2 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Tue, 24 Jul 2018 13:53:05 +0200
|
||||
Subject: [PATCH 05/41] Fix potential fd leak on error in sync_file()
|
||||
|
||||
---
|
||||
update-mime-database.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/update-mime-database.c b/update-mime-database.c
|
||||
index dec1cfa..5780bd9 100644
|
||||
--- a/update-mime-database.c
|
||||
+++ b/update-mime-database.c
|
||||
@@ -974,6 +974,7 @@ sync_file(const gchar *pathname, GError **error)
|
||||
if (fdatasync(fd) == -1)
|
||||
{
|
||||
set_error_from_errno(error);
|
||||
+ close(fd);
|
||||
return -1;
|
||||
}
|
||||
if (close(fd) == -1)
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
From a4242c868c1ee7e65bbdab7ac07c50ebdb16638a Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Tue, 24 Jul 2018 13:55:15 +0200
|
||||
Subject: [PATCH 06/41] Fix potential memleak in parse_string_mask()
|
||||
|
||||
parsed_mask needs to be freed before the potential exit in
|
||||
g_return_val_if_fail()
|
||||
---
|
||||
update-mime-database.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/update-mime-database.c b/update-mime-database.c
|
||||
index 5780bd9..2ef3596 100644
|
||||
--- a/update-mime-database.c
|
||||
+++ b/update-mime-database.c
|
||||
@@ -1339,8 +1339,8 @@ static char *parse_string_mask(const char *mask, int len, GError **error)
|
||||
|
||||
return parsed_mask;
|
||||
err:
|
||||
- g_return_val_if_fail(error == NULL || *error != NULL, NULL);
|
||||
g_free(parsed_mask);
|
||||
+ g_return_val_if_fail(error == NULL || *error != NULL, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Binary file not shown.
BIN
shared-mime-info-2.0.tar.bz2
Normal file
BIN
shared-mime-info-2.0.tar.bz2
Normal file
Binary file not shown.
@ -1,22 +1,20 @@
|
||||
Name: shared-mime-info
|
||||
Version: 1.10
|
||||
Release: 4
|
||||
Name: shared-mime-info
|
||||
Version: 2.0
|
||||
Release: 1
|
||||
Summary: Shared MIME information database
|
||||
License: GPLv2+
|
||||
URL: https://freedesktop.org/wiki/Software/shared-mime-info/
|
||||
|
||||
Source0: http://freedesktop.org/~hadess/%{name}-%{version}.tar.xz
|
||||
Source0: http://freedesktop.org/~hadess/%{name}-%{version}.tar.bz2
|
||||
Source1: gnome-mimeapps.list
|
||||
Source2: totem-defaults.list
|
||||
Source3: file-roller-defaults.list
|
||||
Source4: eog-defaults.list
|
||||
|
||||
Patch0: 0001-Remove-sub-classing-from-OO.o-mime-types.patch
|
||||
Patch6001: Fix-potential-fd-leak-on-error-in-sync_file.patch
|
||||
Patch6002: Fix-potential-memleak-in-parse_string_mask.patch
|
||||
Patch6003: Fix-memleak-in-write_data.patch
|
||||
Patch0: 0001-Fix-pkg-config-installation-path.patch
|
||||
Patch1: 0002-Update-compilation-instructions.patch
|
||||
|
||||
BuildRequires: gcc libxml2-devel glib2-devel gettext intltool perl-XML-Parser
|
||||
BuildRequires: gcc libxml2-devel glib2-devel gettext intltool perl-XML-Parser meson itstool xmlto
|
||||
|
||||
%global __requires_exclude ^/usr/bin/pkg-config$
|
||||
|
||||
@ -30,15 +28,18 @@ the maintainers.
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%configure --disable-silent-rules --disable-update-mimedb
|
||||
make
|
||||
#%%configure --disable-silent-rules --disable-update-mimedb
|
||||
#make
|
||||
%meson
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
PKGSYSTEM_ENABLE_FSYNC=0 \
|
||||
%make_install
|
||||
#PKGSYSTEM_ENABLE_FSYNC=0 \
|
||||
#%%make_install
|
||||
%meson_install
|
||||
|
||||
find $RPM_BUILD_ROOT%{_datadir}/mime -type d \
|
||||
| sed -e "s|^$RPM_BUILD_ROOT|%%dir |" > %{name}.files
|
||||
@ -55,6 +56,9 @@ pushd $RPM_BUILD_ROOT%{_datadir}/applications
|
||||
install -p -m 644 gnome-mimeapps.list mimeapps.list
|
||||
popd
|
||||
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
%post
|
||||
/bin/touch --no-create %{_datadir}/mime/packages &>/dev/null ||:
|
||||
|
||||
@ -71,12 +75,16 @@ update-mime-database -n %{_datadir}/mime &> /dev/null ||:
|
||||
%{_datadir}/applications/*.list
|
||||
%{_datadir}/mime/packages/*.org.xml
|
||||
%{_datadir}/pkgconfig/shared-mime-info.pc
|
||||
%{_datadir}/gettext/*
|
||||
%exclude %{_datadir}/locale/*
|
||||
|
||||
%files help
|
||||
%doc README NEWS HACKING shared-mime-info-spec.xml
|
||||
%doc README.md NEWS HACKING.md data/shared-mime-info-spec.xml
|
||||
%{_mandir}/man1/*.gz
|
||||
|
||||
%changelog
|
||||
* Thu Jul 31 2020 chxssg<chxssg@qq.com> - 2.0-1
|
||||
- Update to 2.0
|
||||
|
||||
* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10-4
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user