[packages/links2] - updated to 2.23 (native support for saving cookies) - removed obsolete links2-cookies-save.patch
witekfl
witekfl at pld-linux.org
Mon May 24 09:52:19 CEST 2021
commit 60740215c30a64d1b2ae4fdbd7a824e8a8c58939
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date: Mon May 24 09:50:20 2021 +0200
- updated to 2.23 (native support for saving cookies)
- removed obsolete links2-cookies-save.patch
links2-cookies-save.patch | 103 ----------------------------------------------
links2.spec | 6 +--
2 files changed, 2 insertions(+), 107 deletions(-)
---
diff --git a/links2.spec b/links2.spec
index 210f1f0..3c8b5ea 100644
--- a/links2.spec
+++ b/links2.spec
@@ -13,13 +13,13 @@ Summary(pt_BR.UTF-8): O links é um browser para modo texto, similar ao lynx
Summary(ru.UTF-8): Текстовый WWW броузер типа Lynx
Summary(uk.UTF-8): Текстовий WWW броузер типу Lynx
Name: links2
-Version: 2.22
+Version: 2.23
Release: 1
Epoch: 1
License: GPL v2
Group: Applications/Networking
Source0: http://links.twibright.com/download/links-%{version}.tar.bz2
-# Source0-md5: 55f745dea500aac52cede98bab8d96e2
+# Source0-md5: 64215ef5e6e35ae8b131d78fcb162f12
Source1: %{name}.desktop
Source2: %{name}.1.pl
Source3: %{name}.png
@@ -27,7 +27,6 @@ Source4: glinks.desktop
Patch0: %{name}-links-g_if_glinks.patch
Patch2: %{name}-img.patch
Patch3: %{name}-convert-old-bookmarks.patch
-Patch4: %{name}-cookies-save.patch
Patch5: %{name}-config-dirs.patch
Patch6: %{name}-gzip_fallback.patch
Patch10: %{name}-pl-update.patch
@@ -114,7 +113,6 @@ Links - це текстовий WWW броузер, на перший погля
%{?with_graphics:%patch0 -p1}
%patch2 -p1
%patch3 -p1
-%patch4 -p1
%patch5 -p1
%patch6 -p1
#%%patch10 -p1
diff --git a/links2-cookies-save.patch b/links2-cookies-save.patch
deleted file mode 100644
index 40fe0d9..0000000
--- a/links2-cookies-save.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- links-2.22/cookies.c.old 2019-04-07 20:17:57.000000000 +0200
-+++ links-2.22/cookies.c 2021-03-20 18:58:47.864668687 +0100
-@@ -202,8 +202,28 @@
-
- void free_cookies(void)
- {
-+ unsigned char *cookfile;
-+ FILE *fp;
-+ struct cookie *c;
-+ struct list_head *lc;
- free_list(struct c_domain, c_domains);
-- /* !!! FIXME: save cookies */
-+
-+ cookfile = stracpy(links_home);
-+ if (! cookfile) return;
-+ add_to_strn(&cookfile, "cookies");
-+
-+ fp = fopen(cookfile, "w");
-+ mem_free(cookfile);
-+ if (fp == NULL) return;
-+
-+ foreach (struct cookie, c, lc, all_cookies) {
-+ if (c->expires && ! cookie_expired(c))
-+ fprintf(fp, "%s %s %s %s %s %d %d\n", c->name, c->value,
-+ c->server?c->server:(unsigned char *)"", c->path?c->path:(unsigned char *)"",
-+ c->domain?c->domain:(unsigned char *)"", (int)c->expires, c->secure);
-+ }
-+ fclose(fp);
-+
- while (!list_empty(all_cookies)) {
- struct cookie *c = list_struct(all_cookies.next, struct cookie);
- del_from_list(c);
-@@ -213,6 +233,68 @@
-
- void init_cookies(void)
- {
-- /* !!! FIXME: read cookies */
--}
-+ unsigned char in_buffer[MAX_STR_LEN];
-+ unsigned char *cookfile, *p, *q;
-+ FILE *fp;
-+
-+ /* must be called after init_home */
-+ if (! links_home) return;
-+
-+ cookfile = stracpy(links_home);
-+ if (! cookfile) return;
-+ add_to_strn(&cookfile, "cookies");
-+
-+ fp = fopen(cookfile, "r");
-+ mem_free(cookfile);
-+ if (fp == NULL) return;
-+
-+ while (fgets(in_buffer, MAX_STR_LEN, fp)) {
-+ struct cookie *cookie;
-+
-+ if (!(cookie = mem_alloc(sizeof(struct cookie)))) return;
-+ memset(cookie, 0, sizeof(struct cookie));
-
-+ q = in_buffer; p = strchr(in_buffer, ' ');
-+ if (p == NULL) goto inv;
-+ *p++ = '\0';
-+ cookie->name = stracpy(q);
-+
-+ q = p; p = strchr(p, ' ');
-+ if (p == NULL) goto inv;
-+ *p++ = '\0';
-+ cookie->value = stracpy(q);
-+
-+ q = p; p = strchr(p, ' ');
-+ if (p == NULL) goto inv;
-+ *p++ = '\0';
-+ cookie->server = stracpy(q);
-+
-+ q = p; p = strchr(p, ' ');
-+ if (p == NULL) goto inv;
-+ *p++ = '\0';
-+ cookie->path = stracpy(q);
-+
-+ q = p; p = strchr(p, ' ');
-+ if (p == NULL) goto inv;
-+ *p++ = '\0';
-+ cookie->domain = stracpy(q);
-+
-+ q = p; p = strchr(p, ' ');
-+ if (p == NULL) goto inv;
-+ *p++ = '\0';
-+ cookie->expires = atoi(q);
-+
-+ cookie->secure = atoi(p);
-+
-+ /*cookie->id = cookie_id++;*/
-+
-+ accept_cookie(cookie);
-+
-+ continue;
-+
-+inv:
-+ free_cookie(cookie);
-+ free(cookie);
-+ }
-+ fclose(fp);
-+}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/links2.git/commitdiff/60740215c30a64d1b2ae4fdbd7a824e8a8c58939
More information about the pld-cvs-commit
mailing list