From owner-svn-ports-head@freebsd.org Fri Nov 27 10:09:52 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 515E94A3E49; Fri, 27 Nov 2020 10:09:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cj9NJ1tzMz4sJQ; Fri, 27 Nov 2020 10:09:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2956913A47; Fri, 27 Nov 2020 10:09:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0ARA9q6d034318; Fri, 27 Nov 2020 10:09:52 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0ARA9p1V034316; Fri, 27 Nov 2020 10:09:51 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202011271009.0ARA9p1V034316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 27 Nov 2020 10:09:51 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r556436 - in head/www/hypermail: . files X-SVN-Group: ports-head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in head/www/hypermail: . files X-SVN-Commit-Revision: 556436 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 10:09:52 -0000 Author: bapt Date: Fri Nov 27 10:09:51 2020 New Revision: 556436 URL: https://svnweb.freebsd.org/changeset/ports/556436 Log: Add a patch to configure the snprintf pattern used for the filename of the archives. by default hypermail uses .4d while pipermail uses .6d. This configuration switch allows to change hypermail configuration to make it a drop in replacement for pipermail and not break existing archives links when switching from pipermail to hypermail. Added: head/www/hypermail/files/patch-message_pattern (contents, props changed) Modified: head/www/hypermail/Makefile Modified: head/www/hypermail/Makefile ============================================================================== --- head/www/hypermail/Makefile Fri Nov 27 10:05:41 2020 (r556435) +++ head/www/hypermail/Makefile Fri Nov 27 10:09:51 2020 (r556436) @@ -4,9 +4,10 @@ PORTNAME= hypermail PORTVERSION= 2.4.0 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= www mail -MAINTAINER= ports@FreeBSD.org +MAINTAINER= bapt@FreeBSD.org COMMENT= Program to generate a cross-referenced HTML mail archive LICENSE= GPLv2 Added: head/www/hypermail/files/patch-message_pattern ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/hypermail/files/patch-message_pattern Fri Nov 27 10:09:51 2020 (r556436) @@ -0,0 +1,47 @@ +diff --git src/file.c src/file.c +index cdfa67f..d35d187 100644 +--- src/file.c ++++ src/file.c +@@ -655,7 +655,7 @@ char *message_name (struct emailinfo *email) + else + { + #endif /* HAVE_LIBFNV */ +- sprintf (buffer, "%.4d", email->msgnum); ++ sprintf (buffer, set_message_pattern ? set_message_pattern : "%.4d" , email->msgnum); + return buffer; + #ifdef HAVE_LIBFNV + } +diff --git src/setup.c src/setup.c +index 3735391..0289a20 100644 +--- src/setup.c ++++ src/setup.c +@@ -146,6 +146,7 @@ char *set_mhtmlfooter; + char *set_attachmentlink; + char *set_unsafe_chars; + char *set_filename_base; ++char *set_message_pattern; + + char *set_folder_by_date; + char *set_latest_folder; +@@ -910,6 +911,9 @@ struct Config cfg[] = { + "# option is set to plus a file name extension if one can be found\n" + "# in the name supplied by the message. This option is mainly for\n" + "# languages that use different character sets from English.\n", FALSE}, ++ {"message_pattern", &set_message_pattern, NULL, CFG_STRING, ++ "# This option overrides the default pattern \"%.4d\" for creating\n" ++ "# html files.\n", FALSE}, + }; + + /* ---------------------------------------------------------------- */ +diff --git src/setup.h src/setup.h +index 3a57a26..7f944c0 100644 +--- src/setup.h ++++ src/setup.h +@@ -162,6 +162,7 @@ extern char *set_mhtmlfooter; + extern char *set_attachmentlink; + extern char *set_unsafe_chars; + extern char *set_filename_base; ++extern char *set_message_pattern; + extern bool set_linkquotes; + + extern char *set_antispamdomain;