Mailinglist Archive: opensuse-commit (1083 mails)
| < Previous | Next > |
commit rarian
- From: root@xxxxxxxxxxxxxxx (h_root)
- Date: Sat, 01 Sep 2007 13:14:16 +0200
- Message-id: <20070901111416.D55A9678331@xxxxxxxxxxxxxxx>
Hello community,
here is the log from the commit of package rarian
checked in at Sat Sep 1 13:14:16 CEST 2007.
--------
--- GNOME/rarian/rarian.changes 2007-08-04 00:13:08.000000000 +0200
+++ /mounts/work_src_done/STABLE/rarian/rarian.changes 2007-09-01 06:54:21.447079000 +0200
@@ -1,0 +2,9 @@
+Sat Sep 1 06:51:24 CEST 2007 - hpj@xxxxxxx
+
+- Add rarian-0.5.6-eof-crash.patch (bugs.freedesktop.org #12131).
+- Add rarian-0.5.6-identifier-basename-crash.patch
+ (bugs.freedesktop.org #12226).
+- Add rarian-0.5.6-docs-from-desktop-entries.patch, which lets us
+ find documentation specified by applications' .desktop files.
+
+-------------------------------------------------------------------
New:
----
rarian-0.5.6-docs-from-desktop-entries.patch
rarian-0.5.6-eof-crash.patch
rarian-0.5.6-identifier-basename-crash.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rarian.spec ++++++
--- /var/tmp/diff_new_pack.i20276/_old 2007-09-01 13:14:05.000000000 +0200
+++ /var/tmp/diff_new_pack.i20276/_new 2007-09-01 13:14:05.000000000 +0200
@@ -14,10 +14,13 @@
BuildRequires: docbook_4 gcc-c++ intltool libxslt-devel perl-XML-Parser pkg-config sgml-skel
Summary: Rarian is designed to be a replacement for scrollkeeper.
Version: 0.5.6
-Release: 1
+Release: 10
Source0: rarian-%{version}.tar.bz2
Patch0: abuild.patch
-License: GPL v2 only
+Patch1: rarian-0.5.6-eof-crash.patch
+Patch2: rarian-0.5.6-identifier-basename-crash.patch
+Patch3: rarian-0.5.6-docs-from-desktop-entries.patch
+License: GPL v2 or later, LGPL v2 or later
Group: Development/Libraries/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
URL: ftp://ftp.gnome.org/pub/gnome/sources/rarian/
@@ -61,6 +64,9 @@
%setup -q
#%setup -q -a 1
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
%configure
@@ -94,6 +100,12 @@
%{_libdir}/pkgconfig/*.pc
%changelog
+* Sat Sep 01 2007 - hpj@xxxxxxx
+- Add rarian-0.5.6-eof-crash.patch (bugs.freedesktop.org #12131).
+- Add rarian-0.5.6-identifier-basename-crash.patch
+ (bugs.freedesktop.org #12226).
+- Add rarian-0.5.6-docs-from-desktop-entries.patch, which lets us
+ find documentation specified by applications' .desktop files.
* Fri Aug 03 2007 - maw@xxxxxxx
- BuildRequire gcc-c++ and pkg-config
- s#%%run_ldconfig#/sbin/ldconfig# in %%post and add it to %%postun
++++++ rarian-0.5.6-docs-from-desktop-entries.patch ++++++
diff -upr rarian-0.5.6-pre/librarian/rarian-main.c rarian-0.5.6-post/librarian/rarian-main.c
--- rarian-0.5.6-pre/librarian/rarian-main.c 2007-07-31 14:58:19.000000000 -0500
+++ rarian-0.5.6-post/librarian/rarian-main.c 2007-08-30 22:56:55.000000000 -0500
@@ -223,13 +223,20 @@ past:
int_path = rrn_strndup (cur_path, (first_colon-cur_path));
else
int_path = strdup (cur_path);
- check_path = malloc (sizeof(char)*(strlen(int_path)+6));
- sprintf (check_path, "%s/help", int_path);
+
+ check_path = malloc (sizeof (char) * (strlen (int_path) + 14));
+ snprintf (check_path, sizeof (char) * (strlen (int_path) + 14),
+ "%s/help", int_path);
#if ENABLE_OMF_READ
process_omf_dir (int_path);
#endif
process_locale_dirs (check_path);
scan_directory (check_path);
+
+ snprintf (check_path, sizeof (char) * (strlen (int_path) + 14),
+ "%s/applications", int_path);
+ scan_directory (check_path);
+
if (int_path && *int_path) {
free (int_path);
}
@@ -286,7 +293,8 @@ scan_directory (char *dir)
sprintf (tmp, "%s/%s", dir, dp->d_name);
suffix = strrchr (tmp, '.');
- if (!strcmp (suffix, ".document")) {
+ if (!strcmp (suffix, ".document") ||
+ !strcmp (suffix, ".desktop")) {
process_file (tmp);
} else if (!strcmp (suffix, ".section")) {
process_section (tmp);
diff -upr rarian-0.5.6-pre/librarian/rarian-reg-full.c rarian-0.5.6-post/librarian/rarian-reg-full.c
--- rarian-0.5.6-pre/librarian/rarian-reg-full.c 2007-08-30 22:37:10.000000000 -0500
+++ rarian-0.5.6-post/librarian/rarian-reg-full.c 2007-08-30 22:56:55.000000000 -0500
@@ -101,7 +101,8 @@ rrn_reg_parse_file_full (char *filename)
if (!real || real[0] == '\n' || real[0] == '#') {
/* Black Line or comment. Ignore. */
} else if (real[0] == '[') {
- if (!strncmp (real, "[Document]", 10)) {
+ if (!strncmp (real, "[Document]", 10) ||
+ !strncmp (real, "[Desktop Entry]", 15)) {
mode = 0;
if (sect) {
@@ -151,7 +152,7 @@ rrn_reg_parse_file_full (char *filename)
}
}
- if (!reg->name || !reg->uri || !reg->type || !reg->categories ) {
+ if (!reg->name || !reg->uri || !reg->categories ) {
rrn_reg_free_full (reg);
reg = NULL;
}
@@ -271,6 +272,9 @@ process_categories_full (char *cat_strin
int i;
do {
semi = strchr (current_break, ';');
+ if (!semi)
+ semi = strchr (current_break, '|');
+
if (result) {
tmp = malloc (sizeof (char *)*ncats);
for (i=0; i< ncats; i++) {
@@ -636,9 +640,20 @@ process_path_full (RrnRegFull *reg)
*/
return;
}
- /* Otherwise, promote to file: URI scheme, reusing the prefix vble */
- prefix = malloc (sizeof (char) * (strlen(entry->text)+6));
- sprintf (prefix, "file:%s", entry->text);
+
+ if (entry->text [0] == '/') {
+ /* If it's an absolute path, promote to file: URI scheme,
+ * reusing the prefix vble */
+ prefix = malloc (sizeof (char) * (strlen(entry->text) + 8));
+ snprintf (prefix, sizeof (char) * (strlen (entry->text) + 8),
+ "file://%s", entry->text);
+ } else {
+ /* Else, use the ghelp: URI scheme */
+ prefix = malloc (sizeof (char) * (strlen (entry->text) + 7));
+ snprintf (prefix, sizeof (char) * (strlen (entry->text) + 7),
+ "ghelp:%s", entry->text);
+ }
+
free (entry->text);
entry->text = prefix;
entry = entry->next;
diff -upr rarian-0.5.6-pre/librarian/rarian-reg-utils.c rarian-0.5.6-post/librarian/rarian-reg-utils.c
--- rarian-0.5.6-pre/librarian/rarian-reg-utils.c 2007-08-30 22:37:10.000000000 -0500
+++ rarian-0.5.6-post/librarian/rarian-reg-utils.c 2007-08-30 22:56:55.000000000 -0500
@@ -117,7 +117,8 @@ rrn_reg_parse_file (char *filename)
if (!real || real[0] == '\n' || real[0] == '#') {
/* Black Line or comment. Ignore. */
} else if (real[0] == '[') {
- if (!strncmp (real, "[Document]", 10)) {
+ if (!strncmp (real, "[Document]", 10) ||
+ !strncmp (real, "[Desktop Entry]", 15)) {
mode = 0;
if (sect) {
@@ -167,7 +168,7 @@ rrn_reg_parse_file (char *filename)
}
}
- if (!reg->name || !reg->uri || !reg->type || !reg->categories ) {
+ if (!reg->name || !reg->uri || !reg->categories ) {
rrn_reg_free (reg);
reg = NULL;
}
@@ -311,6 +312,9 @@ process_categories (char *cat_string)
int i;
do {
semi = strchr (current_break, ';');
+ if (!semi)
+ semi = strchr (current_break, '|');
+
if (result) {
tmp = malloc (sizeof (char *)*ncats);
for (i=0; i< ncats; i++) {
@@ -736,10 +740,22 @@ process_path (RrnReg *reg)
*/
return;
}
- /* Otherwise, promote to file: URI scheme, reusing the prefix vble */
- prefix = malloc (sizeof (char) * (strlen(reg->uri)+8));
- sprintf (prefix, "file://%s", reg->uri);
+
+ if (reg->uri [0] == '/') {
+ /* If it's an absolute path, promote to file: URI scheme,
+ * reusing the prefix vble */
+ prefix = malloc (sizeof (char) * (strlen (reg->uri) + 8));
+ snprintf (prefix, sizeof (char) * (strlen (reg->uri) + 8),
+ "file://%s", reg->uri);
+ } else {
+ /* Else, use the ghelp: URI scheme */
+ prefix = malloc (sizeof (char) * (strlen (reg->uri) + 7));
+ snprintf (prefix, sizeof (char) * (strlen (reg->uri) + 7),
+ "ghelp:%s", reg->uri);
+ }
+
free (reg->uri);
+
reg->uri = prefix;
while (child) {
process_section_path (reg->uri, child);
++++++ rarian-0.5.6-eof-crash.patch ++++++
diff -upr rarian-0.5.6-pre/librarian/rarian-reg-utils.c rarian-0.5.6-post/librarian/rarian-reg-utils.c
--- rarian-0.5.6-pre/librarian/rarian-reg-utils.c 2007-07-31 12:16:06.000000000 -0500
+++ rarian-0.5.6-post/librarian/rarian-reg-utils.c 2007-08-23 23:26:22.000000000 -0500
@@ -97,13 +97,18 @@ rrn_reg_parse_file (char *filename)
char *tmp;
char *result = NULL;
tmp = strdup (buf);
- buf = fgets (buf, 1023, file);
+ if (fgets (buf, 1023, file)) {
result = malloc (sizeof (char) * (strlen(tmp)+strlen(buf)+2));
strcpy (result, tmp);
strcat (result, buf);
free (tmp);
free (buf);
- buf = result;
+ buf = result;
+ } else {
+ free (buf);
+ buf = tmp;
+ break;
+ }
}
real = buf;
while (*real && isspace(*real) && *real != '\n') {
++++++ rarian-0.5.6-identifier-basename-crash.patch ++++++
diff -upr rarian-0.5.6-pre/librarian/rarian-reg-full.c rarian-0.5.6-post/librarian/rarian-reg-full.c
--- rarian-0.5.6-pre/librarian/rarian-reg-full.c 2007-07-31 12:16:06.000000000 -0500
+++ rarian-0.5.6-post/librarian/rarian-reg-full.c 2007-08-30 19:22:37.000000000 -0500
@@ -171,12 +171,12 @@ rrn_reg_parse_file_full (char *filename)
sep = strrchr (filename, '/');
last = strrchr (filename, '.');
- if (!last || !sep) {
+ if (!last || !sep || last < sep) {
fprintf (stderr, "Error: Can't cut put basename properly\n");
rrn_reg_free_full (reg);
return NULL;
}
- basename = rrn_strndup (last+1, sep-last+1);
+ basename = rrn_strndup (sep + 1, last - (sep + 1));
reg->identifier = malloc (sizeof (char)*(strlen(basename)+11));
sprintf (reg->identifier, "org.other.%s", basename);
free (basename);
diff -upr rarian-0.5.6-pre/librarian/rarian-reg-utils.c rarian-0.5.6-post/librarian/rarian-reg-utils.c
--- rarian-0.5.6-pre/librarian/rarian-reg-utils.c 2007-08-30 19:19:41.000000000 -0500
+++ rarian-0.5.6-post/librarian/rarian-reg-utils.c 2007-08-30 19:22:30.000000000 -0500
@@ -187,12 +187,12 @@ rrn_reg_parse_file (char *filename)
sep = strrchr (filename, '/');
last = strrchr (filename, '.');
- if (!last || !sep) {
+ if (!last || !sep || last < sep) {
fprintf (stderr, "Error: Can't cut put basename properly\n");
rrn_reg_free (reg);
return NULL;
}
- basename = rrn_strndup (last+1, sep-last+1);
+ basename = rrn_strndup (sep + 1, last - (sep + 1));
reg->identifier = malloc (sizeof (char)*(strlen(basename)+11));
sprintf (reg->identifier, "org.other.%s", basename);
free (basename);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx
| < Previous | Next > |