From d4ea513f27788e2c700a788c1c9580497a568031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Thu, 15 Dec 2016 12:51:35 +0100 Subject: [PATCH 1/2] Add --use-latest-psl to tools/psl, now default Fixes #76 --- tools/psl.1 | 7 +++++-- tools/psl.c | 12 +++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/psl.1 b/tools/psl.1 index ccc85aa..a4c77ea 100644 --- a/tools/psl.1 +++ b/tools/psl.1 @@ -42,12 +42,15 @@ show library version information \fB\-\-print\-info\fR print info about library builtin data .SH PUBLIC SUFFIX DATA -By default, `psl' will use built-in Public Suffix data. +By default, `psl' will use the latest available Public Suffix data. .br You can also direct it to use a different file: .TP +\fB\-\-use\-latest\-data\fR +use the latest available PSL data [default] +.TP \fB\-\-use\-builtin\-data\fR -use the builtin PSL data [default] +use the builtin PSL data .TP \fB\-\-load\-psl\-file\fR load PSL data from file diff --git a/tools/psl.c b/tools/psl.c index 2c5504e..f11af1f 100644 --- a/tools/psl.c +++ b/tools/psl.c @@ -45,7 +45,8 @@ static void usage(int err, FILE* f) fprintf(f, "\n"); fprintf(f, "Options:\n"); fprintf(f, " --version show library version information\n"); - fprintf(f, " --use-builtin-data use the builtin PSL data [default]\n"); + fprintf(f, " --use-latest-data use the latest PSL data available [default]\n"); + fprintf(f, " --use-builtin-data use the builtin PSL data\n"); fprintf(f, " --load-psl-file load PSL data from file\n"); fprintf(f, " --is-public-suffix check if domains are public suffixes [default]\n"); fprintf(f, " --is-cookie-domain-acceptable \n"); @@ -92,6 +93,15 @@ int main(int argc, const char *const *argv) mode = 4; cookie_domain = *(++arg); } + else if (!strcmp(*arg, "--use-latest-data")) { + psl_free(psl); + if (psl_file) { + fprintf(stderr, "Dropped data from %s\n", psl_file); + psl_file = NULL; + } + if (!(psl = (psl_ctx_t *) psl_latest(NULL))) + printf("No PSL data available\n"); + } else if (!strcmp(*arg, "--use-builtin-data")) { psl_free(psl); if (psl_file) { From 7d5f3a67af0431653cd1118b2db5dc0c0bd2d8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Thu, 15 Dec 2016 13:01:45 +0100 Subject: [PATCH 2/2] Release v0.16.1 --- NEWS | 4 ++++ configure.ac | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index cf2a11d..2daf02b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ Copyright (C) 2014-2016 Tim Rühsen +15.12.2016 Release V0.16.1 + * Fix SO_VERSION to 6:0:1 + * Add --use-latest-psl to tools/psl as default + 16.12.2016 Release V0.16.0 * Add functions psl_latest() and psl_dist_filename() * Do not taint out variable on error in psl_str_to_utf8lower() diff --git a/configure.ac b/configure.ac index 2ad1d45..cb6b859 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT([libpsl], [0.16.0], [tim.ruehsen@gmx.de], [libpsl], [https://github.com/rockdaboot/libpsl]) +AC_INIT([libpsl], [0.16.1], [tim.ruehsen@gmx.de], [libpsl], [https://github.com/rockdaboot/libpsl]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.10 no-define foreign]) @@ -88,7 +88,7 @@ PKG_PROG_PKG_CONFIG # 4. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. # 5. If any interfaces have been added since the last public release, then increment age. # 6. If any existing interfaces have been removed or changed since the last public release, then set age to 0. -AC_SUBST([LIBPSL_SO_VERSION], [6:0:0]) +AC_SUBST([LIBPSL_SO_VERSION], [6:0:1]) AC_SUBST([LIBPSL_VERSION], $VERSION) # Check for enable/disable builtin PSL data