Package init

This commit is contained in:
overweight 2019-09-30 11:17:06 -04:00
commit 420ff00377
10 changed files with 725 additions and 0 deletions

View File

@ -0,0 +1,265 @@
From 7bd867808aad05d691456a8301c8737ded9fd64b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 25 Aug 2011 10:54:47 +0100
Subject: [PATCH] Remove sub-classing from OO.o mime-types
https://bugs.freedesktop.org/show_bug.cgi?id=40354
---
freedesktop.org.xml.in | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index 29ed9ef..542f1f7 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -845,7 +845,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.calc">
<_comment>OpenOffice Calc spreadsheet</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -858,7 +857,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.calc.template">
<_comment>OpenOffice Calc template</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -871,7 +869,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.draw">
<_comment>OpenOffice Draw drawing</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -884,7 +881,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.draw.template">
<_comment>OpenOffice Draw template</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -897,7 +893,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.impress">
<_comment>OpenOffice Impress presentation</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -910,7 +905,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.impress.template">
<_comment>OpenOffice Impress template</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -923,7 +917,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.math">
<_comment>OpenOffice Math formula</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -936,7 +929,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.writer">
<_comment>OpenOffice Writer document</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -949,7 +941,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.writer.global">
<_comment>OpenOffice Writer global document</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -962,7 +953,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.sun.xml.writer.template">
<_comment>OpenOffice Writer template</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -977,7 +967,6 @@ command to generate the output files.
<_comment>ODT document</_comment>
<acronym>ODT</acronym>
<expanded-acronym>OpenDocument Text</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -992,7 +981,6 @@ command to generate the output files.
<_comment>ODT document (Flat XML)</_comment>
<acronym>FODT</acronym>
<expanded-acronym>OpenDocument Text (Flat XML)</expanded-acronym>
- <sub-class-of type="application/xml"/>
<generic-icon name="x-office-document"/>
<glob pattern="*.fodt"/>
</mime-type>
@@ -1000,7 +988,6 @@ command to generate the output files.
<_comment>ODT template</_comment>
<acronym>ODT</acronym>
<expanded-acronym>OpenDocument Text</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1015,7 +1002,6 @@ command to generate the output files.
<_comment>OTH template</_comment>
<acronym>OTH</acronym>
<expanded-acronym>OpenDocument HTML</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="text-html"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1030,7 +1016,6 @@ command to generate the output files.
<_comment>ODM document</_comment>
<acronym>ODM</acronym>
<expanded-acronym>OpenDocument Master</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1045,7 +1030,6 @@ command to generate the output files.
<_comment>ODG drawing</_comment>
<acronym>ODG</acronym>
<expanded-acronym>OpenDocument Drawing</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1060,7 +1044,6 @@ command to generate the output files.
<_comment>ODG drawing (Flat XML)</_comment>
<acronym>FODG</acronym>
<expanded-acronym>OpenDocument Drawing (Flat XML)</expanded-acronym>
- <sub-class-of type="application/xml"/>
<generic-icon name="image-x-generic"/>
<glob pattern="*.fodg"/>
</mime-type>
@@ -1068,7 +1051,6 @@ command to generate the output files.
<_comment>ODG template</_comment>
<acronym>ODG</acronym>
<expanded-acronym>OpenDocument Drawing</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1083,7 +1065,6 @@ command to generate the output files.
<_comment>ODP presentation</_comment>
<acronym>ODP</acronym>
<expanded-acronym>OpenDocument Presentation</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1098,7 +1079,6 @@ command to generate the output files.
<_comment>ODP presentation (Flat XML)</_comment>
<acronym>FODP</acronym>
<expanded-acronym>OpenDocument Presentation (Flat XML)</expanded-acronym>
- <sub-class-of type="application/xml"/>
<generic-icon name="x-office-presentation"/>
<glob pattern="*.fodp"/>
</mime-type>
@@ -1106,7 +1086,6 @@ command to generate the output files.
<_comment>ODP template</_comment>
<acronym>ODP</acronym>
<expanded-acronym>OpenDocument Presentation</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-presentation"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1121,7 +1100,6 @@ command to generate the output files.
<_comment>ODS spreadsheet</_comment>
<acronym>ODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1136,7 +1114,6 @@ command to generate the output files.
<_comment>ODS spreadsheet (Flat XML)</_comment>
<acronym>FODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet (Flat XML)</expanded-acronym>
- <sub-class-of type="application/xml"/>
<generic-icon name="x-office-spreadsheet"/>
<glob pattern="*.fods"/>
</mime-type>
@@ -1144,7 +1121,6 @@ command to generate the output files.
<_comment>ODS template</_comment>
<acronym>ODS</acronym>
<expanded-acronym>OpenDocument Spreadsheet</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1159,7 +1135,6 @@ command to generate the output files.
<_comment>ODC chart</_comment>
<acronym>ODC</acronym>
<expanded-acronym>OpenDocument Chart</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1174,7 +1149,6 @@ command to generate the output files.
<_comment>ODC template</_comment>
<acronym>ODC</acronym>
<expanded-acronym>OpenDocument Chart</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-spreadsheet"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1189,7 +1163,6 @@ command to generate the output files.
<_comment>ODF formula</_comment>
<acronym>ODF</acronym>
<expanded-acronym>OpenDocument Formula</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1204,7 +1177,6 @@ command to generate the output files.
<_comment>ODF template</_comment>
<acronym>ODF</acronym>
<expanded-acronym>OpenDocument Formula</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1219,7 +1191,6 @@ command to generate the output files.
<_comment>ODB database</_comment>
<acronym>ODB</acronym>
<expanded-acronym>OpenDocument Database</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1235,7 +1206,6 @@ command to generate the output files.
<_comment>ODI image</_comment>
<acronym>ODI</acronym>
<expanded-acronym>OpenDocument Image</expanded-acronym>
- <sub-class-of type="application/zip"/>
<generic-icon name="image-x-generic"/>
<magic priority="70">
<match type="string" value="PK\003\004" offset="0">
@@ -1248,7 +1218,6 @@ command to generate the output files.
</mime-type>
<mime-type type="application/vnd.openofficeorg.extension">
<_comment>OpenOffice.org extension</_comment>
- <sub-class-of type="application/zip"/>
<generic-icon name="x-office-document"/>
<glob pattern="*.oxt" />
</mime-type>
--
2.7.4

View File

@ -0,0 +1,26 @@
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

View File

@ -0,0 +1,24 @@
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

View File

@ -0,0 +1,28 @@
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

22
eog-defaults.list Normal file
View File

@ -0,0 +1,22 @@
image/bmp=eog.desktop;
image/gif=eog.desktop;
image/jpeg=eog.desktop;
image/jpg=eog.desktop;
image/pjpeg=eog.desktop;
image/png=eog.desktop;
image/tiff=eog.desktop;
image/x-bmp=eog.desktop;
image/x-gray=eog.desktop;
image/x-icb=eog.desktop;
image/x-ico=eog.desktop;
image/x-png=eog.desktop;
image/x-portable-anymap=eog.desktop;
image/x-portable-bitmap=eog.desktop;
image/x-portable-graymap=eog.desktop;
image/x-portable-pixmap=eog.desktop;
image/x-xbitmap=eog.desktop;
image/x-xpixmap=eog.desktop;
image/x-pcx=eog.desktop;
image/svg+xml=eog.desktop;
image/svg+xml-compressed=eog.desktop;
image/vnd.wap.wbmp=eog.desktop;

54
file-roller-defaults.list Normal file
View File

@ -0,0 +1,54 @@
application/x-7z-compressed=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-7z-compressed-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-ace=org.gnome.FileRoller.desktop;
application/x-alz=org.gnome.FileRoller.desktop;
application/x-ar=org.gnome.FileRoller.desktop;
application/x-arj=org.gnome.FileRoller.desktop;
application/x-bzip=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-bzip-compressed-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-bzip1=org.gnome.FileRoller.desktop;
application/x-bzip1-compressed-tar=org.gnome.FileRoller.desktop;
application/x-cabinet=org.gnome.FileRoller.desktop;
application/x-compress=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-compressed-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-cpio=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-deb=org.gnome.FileRoller.desktop;
application/x-ear=org.gnome.FileRoller.desktop;
application/x-ms-dos-executable=org.gnome.FileRoller.desktop;
application/x-gtar=org.gnome.FileRoller.desktop;
application/x-gzip=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-gzpostscript=org.gnome.FileRoller.desktop;
application/x-java-archive=org.gnome.FileRoller.desktop;
application/x-lha=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-lhz=org.gnome.FileRoller.desktop;
application/x-lrzip=org.gnome.FileRoller.desktop;
application/x-lrzip-compressed-tar=org.gnome.FileRoller.desktop;
application/x-lz4=org.gnome.FileRoller.desktop;
application/x-lzip=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-lzip-compressed-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-lzma=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-lzma-compressed-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-lzop=org.gnome.FileRoller.desktop;
application/x-lz4-compressed-tar=org.gnome.FileRoller.desktop;
application/x-lzop-compressed-tar=org.gnome.FileRoller.desktop;
application/x-ms-wim=org.gnome.FileRoller.desktop;
application/x-rar=org.gnome.FileRoller.desktop;
application/x-rar-compressed=org.gnome.FileRoller.desktop;
application/x-source-rpm=org.gnome.FileRoller.desktop;
application/x-rzip=org.gnome.FileRoller.desktop;
application/x-rzip-compressed-tar=org.gnome.FileRoller.desktop;
application/x-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-tarz=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-stuffit=org.gnome.FileRoller.desktop;
application/x-war=org.gnome.FileRoller.desktop;
application/x-xz=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-xz-compressed-tar=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-zip=org.gnome.FileRoller.desktop;
application/x-zip-compressed=org.gnome.FileRoller.desktop;
application/x-zoo=org.gnome.FileRoller.desktop;
application/zip=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-archive=org.gnome.FileRoller.desktop;
application/vnd.ms-cab-compressed=org.gnome.FileRoller.desktop;
application/vnd.debian.binary-package=org.gnome.FileRoller.desktop;
application/gzip=org.gnome.Nautilus.desktop;org.gnome.FileRoller.desktop;
application/x-source-rpm=org.gnome.FileRoller.desktop;

97
gnome-mimeapps.list Normal file
View File

@ -0,0 +1,97 @@
[Default Applications]
application/x-dia-diagram=dia.desktop
text/x-vcard=evolution.desktop
text/directory=evolution.desktop
text/calendar=evolution.desktop
application/x-cd-image=gnome-disk-image-mounter.desktop
application/x-raw-disk-image=gnome-disk-image-writer.desktop
application/x-raw-disk-image-xz-compressed=gnome-disk-image-writer.desktop
image/x-compressed-xcf=gimp.desktop
image/x-xcf=gimp.desktop
image/x-psd=gimp.desktop
image/x-fits=gimp.desktop
image/bmp=eog.desktop;gthumb.desktop;
image/gif=eog.desktop;gthumb.desktop;
image/x-icb=eog.desktop;gthumb.desktop;
image/x-ico=eog.desktop;gthumb.desktop;
image/x-pcx=eog.desktop;gthumb.desktop;
image/x-portable-anymap=eog.desktop;gthumb.desktop;
image/x-portable-bitmap=eog.desktop;gthumb.desktop;
image/x-portable-graymap=eog.desktop;gthumb.desktop;
image/x-portable-pixmap=eog.desktop;gthumb.desktop;
image/x-xbitmap=eog.desktop;gthumb.desktop;
image/x-xpixmap=eog.desktop;gthumb.desktop;
image/svg+xml=eog.desktop;gthumb.desktop;
application/vnd.ms-word=libreoffice-writer.desktop
application/vnd.wordperfect=libreoffice-writer.desktop
application/vnd.sun.xml.writer=libreoffice-writer.desktop
application/vnd.sun.xml.writer.global=libreoffice-writer.desktop
application/vnd.sun.xml.writer.template=libreoffice-writer.desktop
application/vnd.stardivision.writer=libreoffice-writer.desktop
application/vnd.oasis.opendocument.text=libreoffice-writer.desktop
application/vnd.oasis.opendocument.text-template=libreoffice-writer.desktop
application/vnd.oasis.opendocument.text-web=libreoffice-writer.desktop
application/vnd.oasis.opendocument.text-master=libreoffice-writer.desktop
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop
application/vnd.openxmlformats-officedocument.wordprocessingml.template=libreoffice-writer.desktop
application/vnd.ms-excel=libreoffice-calc.desktop
application/vnd.stardivision.calc=libreoffice-calc.desktop
application/vnd.sun.xml.calc=libreoffice-calc.desktop
application/vnd.sun.xml.calc.template=libreoffice-calc.desktop
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop
application/vnd.openxmlformats-officedocument.spreadsheetml.template=libreoffice-calc.desktop
application/vnd.oasis.opendocument.spreadsheet=libreoffice-calc.desktop
application/vnd.oasis.opendocument.spreadsheet-template=libreoffice-calc.desktop
application/vnd.ms-powerpoint=libreoffice-impress.desktop
application/vnd.stardivision.impress=libreoffice-impress.desktop
application/vnd.sun.xml.impress=libreoffice-impress.desktop
application/vnd.sun.xml.impress.template=libreoffice-impress.desktop
application/vnd.oasis.opendocument.presentation=libreoffice-impress.desktop
application/vnd.oasis.opendocument.presentation-template=libreoffice-impress.desktop
application/vnd.openxmlformats-officedocument.presentationml.presentation=libreoffice-impress.desktop
application/vnd.openxmlformats-officedocument.presentationml.template=libreoffice-impress.desktop
application/vnd.stardivision.draw=libreoffice-draw.desktop
application/vnd.sun.xml.draw=libreoffice-draw.desktop
application/vnd.sun.xml.draw.template=libreoffice-draw.desktop
application/vnd.oasis.opendocument.graphics=libreoffice-draw.desktop
application/vnd.oasis.opendocument.graphics-template=libreoffice-draw.desktop
application/vnd.oasis.opendocument.formula=libreoffice-math.desktop
application/vnd.sun.xml.math=libreoffice-math.desktop
application/vnd.stardivision.math=libreoffice-math.desktop
application/vnd.oasis.opendocument.database=libreoffice-base.desktop
application/vnd.sun.xml.base=libreoffice-base.desktop
application/pdf=org.gnome.Evince.desktop
application/postscript=org.gnome.Evince.desktop
application/x-qw=gnome-gnucash.desktop
application/x-gnucash=gnome-gnucash.desktop
application/vnd.lotus-1-2-3=gnumeric.desktop
application/x-oleo=gnumeric.desktop
application/x-gnumeric=gnumeric.desktop
application/x-xbase=gnumeric.desktop
application/x-abiword=abiword.desktop
application/x-dvi=org.gnome.Evince.desktop
application/x-catalog=gpk-install-catalog.desktop
application/x-rpm=gpk-install-local-file.desktop
text/csv=libreoffice-calc.desktop
text/plain=org.gnome.gedit.desktop
text/html=firefox.desktop
application/xhtml+xml=firefox.desktop
inode/directory=org.gnome.Nautilus.desktop
x-content/blank-cd=brasero-nautilus.desktop
x-content/blank-dvd=brasero-nautilus.desktop
x-content/blank-bd=brasero-nautilus.desktop
x-content/blank-hddvd=brasero-nautilus.desktop
x-content/video-dvd=totem.desktop
x-content/video-vcd=totem.desktop
x-content/video-svcd=totem.desktop
#x-content/video-bluray=totem.desktop
#x-content/video-hddvd=totem.desktop
x-content/audio-cdda=rhythmbox.desktop
x-content/audio-dvd=rhythmbox.desktop
x-content/audio-player=rhythmbox.desktop
x-content/image-dcf=shotwell.desktop
x-content/image-picturecd=shotwell.desktop
# URI scheme handlers
x-scheme-handler/mailto=evolution.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop

Binary file not shown.

82
shared-mime-info.spec Normal file
View File

@ -0,0 +1,82 @@
Name: shared-mime-info
Version: 1.10
Release: 4
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
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
BuildRequires: gcc libxml2-devel glib2-devel gettext intltool perl-XML-Parser
%global __requires_exclude ^/usr/bin/pkg-config$
%description
The shared-mime-info package contains the core database of common types
and the update-mime-database command used to extend it. It requires
glib2 to be installed for building the update command. Additionally, it
uses intltool for translations, though this is only a dependency for
the maintainers.
%package_help
%prep
%autosetup -n %{name}-%{version}
%build
%configure --disable-silent-rules --disable-update-mimedb
make
%install
PKGSYSTEM_ENABLE_FSYNC=0 \
%make_install
find $RPM_BUILD_ROOT%{_datadir}/mime -type d \
| sed -e "s|^$RPM_BUILD_ROOT|%%dir |" > %{name}.files
find $RPM_BUILD_ROOT%{_datadir}/mime -type f -not -path "*/packages/*" \
| sed -e "s|^$RPM_BUILD_ROOT|%%ghost |" >> %{name}.files
install -d $RPM_BUILD_ROOT%{_datadir}/applications
install -p -m 644 %SOURCE1 $RPM_BUILD_ROOT%{_datadir}/applications/gnome-mimeapps.list
cat %SOURCE2 >> $RPM_BUILD_ROOT%{_datadir}/applications/gnome-mimeapps.list
cat %SOURCE3 >> $RPM_BUILD_ROOT%{_datadir}/applications/gnome-mimeapps.list
cat %SOURCE4 >> $RPM_BUILD_ROOT%{_datadir}/applications/gnome-mimeapps.list
pushd $RPM_BUILD_ROOT%{_datadir}/applications
install -p -m 644 gnome-mimeapps.list mimeapps.list
popd
%post
/bin/touch --no-create %{_datadir}/mime/packages &>/dev/null ||:
%transfiletriggerin -- %{_datadir}/mime
update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%transfiletriggerpostun -- %{_datadir}/mime
update-mime-database -n %{_datadir}/mime &> /dev/null ||:
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/update-mime-database
%{_datadir}/applications/*.list
%{_datadir}/mime/packages/*.org.xml
%{_datadir}/pkgconfig/shared-mime-info.pc
%exclude %{_datadir}/locale/*
%files help
%doc README NEWS HACKING shared-mime-info-spec.xml
%{_mandir}/man1/*.gz
%changelog
* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10-4
- Package init

127
totem-defaults.list Normal file
View File

@ -0,0 +1,127 @@
application/mxf=org.gnome.Totem.desktop;
application/ogg=rhythmbox.desktop;org.gnome.Totem.desktop;
application/ram=org.gnome.Totem.desktop;
application/sdp=org.gnome.Totem.desktop;
application/smil=org.gnome.Totem.desktop;
application/smil+xml=org.gnome.Totem.desktop;
application/vnd.apple.mpegurl=org.gnome.Totem.desktop;
application/vnd.ms-wpl=org.gnome.Totem.desktop;
application/vnd.rn-realmedia=org.gnome.Totem.desktop;
application/x-extension-m4a=org.gnome.Totem.desktop;
application/x-extension-mp4=org.gnome.Totem.desktop;
application/x-flac=org.gnome.Totem.desktop;
application/x-flash-video=org.gnome.Totem.desktop;
application/x-matroska=org.gnome.Totem.desktop;
application/x-netshow-channel=org.gnome.Totem.desktop;
application/x-ogg=rhythmbox.desktop;org.gnome.Totem.desktop;
application/x-quicktime-media-link=org.gnome.Totem.desktop;
application/x-quicktimeplayer=org.gnome.Totem.desktop;
application/x-shorten=org.gnome.Totem.desktop;
application/x-smil=org.gnome.Totem.desktop;
application/xspf+xml=org.gnome.Totem.desktop;
audio/3gpp=org.gnome.Totem.desktop;
audio/ac3=org.gnome.Totem.desktop;
audio/AMR=org.gnome.Totem.desktop;
audio/AMR-WB=org.gnome.Totem.desktop;
audio/basic=org.gnome.Totem.desktop;
audio/midi=org.gnome.Totem.desktop;
audio/mp2=org.gnome.Totem.desktop;
audio/mp4=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/mpeg=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/mpegurl=org.gnome.Totem.desktop;
audio/ogg=org.gnome.Totem.desktop;
audio/prs.sid=org.gnome.Totem.desktop;
audio/vnd.rn-realaudio=org.gnome.Totem.desktop;
audio/x-aiff=org.gnome.Totem.desktop;
audio/x-ape=org.gnome.Totem.desktop;
audio/x-flac=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-gsm=org.gnome.Totem.desktop;
audio/x-it=org.gnome.Totem.desktop;
audio/x-m4a=org.gnome.Totem.desktop;
audio/x-matroska=org.gnome.Totem.desktop;
audio/x-mod=org.gnome.Totem.desktop;
audio/x-mp3=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-mpeg=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-mpegurl=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-ms-asf=org.gnome.Totem.desktop;
audio/x-ms-asx=org.gnome.Totem.desktop;
audio/x-ms-wax=org.gnome.Totem.desktop;
audio/x-ms-wma=org.gnome.Totem.desktop;
audio/x-musepack=org.gnome.Totem.desktop;
audio/x-pn-aiff=org.gnome.Totem.desktop;
audio/x-pn-au=org.gnome.Totem.desktop;
audio/x-pn-realaudio=org.gnome.Totem.desktop;
audio/x-pn-realaudio-plugin=org.gnome.Totem.desktop;
audio/x-pn-wav=org.gnome.Totem.desktop;
audio/x-pn-windows-acm=org.gnome.Totem.desktop;
audio/x-realaudio=org.gnome.Totem.desktop;
audio/x-real-audio=org.gnome.Totem.desktop;
audio/x-s3m=org.gnome.Totem.desktop;
audio/x-sbc=org.gnome.Totem.desktop;
audio/x-scpls=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-speex=org.gnome.Totem.desktop;
audio/x-stm=org.gnome.Totem.desktop;
audio/x-tta=org.gnome.Totem.desktop;
audio/x-wav=org.gnome.Totem.desktop;
audio/x-wavpack=org.gnome.Totem.desktop;
audio/x-vorbis=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-vorbis+ogg=rhythmbox.desktop;org.gnome.Totem.desktop;
audio/x-xm=org.gnome.Totem.desktop;
image/vnd.rn-realpix=org.gnome.Totem.desktop;
image/x-pict=org.gnome.Totem.desktop;
misc/ultravox=org.gnome.Totem.desktop;
text/google-video-pointer=org.gnome.Totem.desktop;
text/x-google-video-pointer=org.gnome.Totem.desktop;
video/3gp=org.gnome.Totem.desktop;
video/3gpp=org.gnome.Totem.desktop;
video/dv=org.gnome.Totem.desktop;
video/divx=org.gnome.Totem.desktop;
video/fli=org.gnome.Totem.desktop;
video/flv=org.gnome.Totem.desktop;
video/mp2t=org.gnome.Totem.desktop;
video/mp4=org.gnome.Totem.desktop;
video/mp4v-es=org.gnome.Totem.desktop;
video/mpeg=org.gnome.Totem.desktop;
video/msvideo=org.gnome.Totem.desktop;
video/ogg=org.gnome.Totem.desktop;
video/quicktime=org.gnome.Totem.desktop;
video/vivo=org.gnome.Totem.desktop;
video/vnd.divx=org.gnome.Totem.desktop;
video/vnd.mpegurl=org.gnome.Totem.desktop;
video/vnd.rn-realvideo=org.gnome.Totem.desktop;
video/vnd.vivo=org.gnome.Totem.desktop;
video/webm=org.gnome.Totem.desktop;
video/x-anim=org.gnome.Totem.desktop;
video/x-avi=org.gnome.Totem.desktop;
video/x-flc=org.gnome.Totem.desktop;
video/x-fli=org.gnome.Totem.desktop;
video/x-flic=org.gnome.Totem.desktop;
video/x-flv=org.gnome.Totem.desktop;
video/x-m4v=org.gnome.Totem.desktop;
video/x-matroska=org.gnome.Totem.desktop;
video/x-mpeg=org.gnome.Totem.desktop;
video/x-mpeg2=org.gnome.Totem.desktop;
video/x-ms-asf=org.gnome.Totem.desktop;
video/x-ms-asx=org.gnome.Totem.desktop;
video/x-msvideo=org.gnome.Totem.desktop;
video/x-ms-wm=org.gnome.Totem.desktop;
video/x-ms-wmv=org.gnome.Totem.desktop;
video/x-ms-wmx=org.gnome.Totem.desktop;
video/x-ms-wvx=org.gnome.Totem.desktop;
video/x-nsv=org.gnome.Totem.desktop;
video/x-ogm+ogg=org.gnome.Totem.desktop;
video/x-theora+ogg=org.gnome.Totem.desktop;
video/x-totem-stream=org.gnome.Totem.desktop;
x-content/video-dvd=org.gnome.Totem.desktop;
x-content/video-vcd=org.gnome.Totem.desktop;
x-content/video-svcd=org.gnome.Totem.desktop;
x-scheme-handler/pnm=org.gnome.Totem.desktop;
x-scheme-handler/mms=org.gnome.Totem.desktop;
x-scheme-handler/net=org.gnome.Totem.desktop;
x-scheme-handler/rtp=org.gnome.Totem.desktop;
x-scheme-handler/rtmp=org.gnome.Totem.desktop;
x-scheme-handler/rtsp=org.gnome.Totem.desktop;
x-scheme-handler/mmsh=org.gnome.Totem.desktop;
x-scheme-handler/uvox=org.gnome.Totem.desktop;
x-scheme-handler/icy=org.gnome.Totem.desktop;
x-scheme-handler/icyx=org.gnome.Totem.desktop;