Skip to content

Instantly share code, notes, and snippets.

@dlangille
Created September 2, 2019 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlangille/72a7c5da37d2fc62146f13d942bbe32a to your computer and use it in GitHub Desktop.
Save dlangille/72a7c5da37d2fc62146f13d942bbe32a to your computer and use it in GitHub Desktop.
Parsing FreeBSD commit emails for FreshPorts
From https://docs.freebsd.org/cgi/getmsg.cgi?fetch=1248070+0+current/svn-ports-all+raw
See on FreshPorts: https://www.freshports.org/ports-mgmt/pkg_replace/
From owner-svn-ports-all@freebsd.org Mon Sep 2 16:33:55 2019
Return-Path: <owner-svn-ports-all@freebsd.org>
Delivered-To: svn-ports-all@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 7764BE281B;
Mon, 2 Sep 2019 16:33:55 +0000 (UTC)
(envelope-from swills@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)
server-signature RSA-PSS (4096 bits)
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 46MbJ32Hpyz40bq;
Mon, 2 Sep 2019 16:33:55 +0000 (UTC)
(envelope-from swills@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 3226E1CE88;
Mon, 2 Sep 2019 16:33:55 +0000 (UTC)
(envelope-from swills@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x82GXtNP076945;
Mon, 2 Sep 2019 16:33:55 GMT (envelope-from swills@FreeBSD.org)
Received: (from swills@localhost)
by repo.freebsd.org (8.15.2/8.15.2/Submit) id x82GXsLH076944;
Mon, 2 Sep 2019 16:33:54 GMT (envelope-from swills@FreeBSD.org)
Message-Id: <201909021633.x82GXsLH076944@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: swills set sender to
swills@FreeBSD.org using -f
From: Steve Wills <swills@FreeBSD.org>
Date: Mon, 2 Sep 2019 16:33:54 +0000 (UTC)
To: ports-committers@freebsd.org, svn-ports-all@freebsd.org,
svn-ports-head@freebsd.org
Subject: svn commit: r510825 - head/ports-mgmt/pkg_replace
X-SVN-Group: ports-head
X-SVN-Commit-Author: swills
X-SVN-Commit-Paths: head/ports-mgmt/pkg_replace
X-SVN-Commit-Revision: 510825
X-SVN-Commit-Repository: ports
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-ports-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for the ports tree <svn-ports-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-ports-all>,
<mailto:svn-ports-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-all/>
List-Post: <mailto:svn-ports-all@freebsd.org>
List-Help: <mailto:svn-ports-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-ports-all>,
<mailto:svn-ports-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Sep 2019 16:33:55 -0000
Author: swills
Date: Mon Sep 2 16:33:54 2019
New Revision: 510825
URL: https://svnweb.freebsd.org/changeset/ports/510825
Log:
ports-mgmt/pkg_replace: Update to 20190827
PR: 240142
Submitted by: kdeguchi@sz.tokoha-u.ac.jp (maintainer)
Modified:
head/ports-mgmt/pkg_replace/Makefile (contents, props changed)
head/ports-mgmt/pkg_replace/distinfo (contents, props changed)
Modified: head/ports-mgmt/pkg_replace/Makefile
==============================================================================
--- head/ports-mgmt/pkg_replace/Makefile Mon Sep 2 16:31:02 2019 (r510824)
+++ head/ports-mgmt/pkg_replace/Makefile Mon Sep 2 16:33:54 2019 (r510825)
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= pkg_replace
-PORTVERSION= 20181024
+PORTVERSION= 20190827
CATEGORIES= ports-mgmt
MASTER_SITES= http://member.tokoha-u.ac.jp/~kdeguchi/download/
Modified: head/ports-mgmt/pkg_replace/distinfo
==============================================================================
--- head/ports-mgmt/pkg_replace/distinfo Mon Sep 2 16:31:02 2019 (r510824)
+++ head/ports-mgmt/pkg_replace/distinfo Mon Sep 2 16:33:54 2019 (r510825)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1540340325
-SHA256 (pkg_replace-20181024.tar.xz) = 35254ed3d6e2b73e8e654edfc52c9257a0b687a769c0dce0f996bf013aef4179
-SIZE (pkg_replace-20181024.tar.xz) = 16404
+TIMESTAMP = 1566887355
+SHA256 (pkg_replace-20190827.tar.xz) = f689393b4f6cf895c53fcde6f371970e195b474c6b22142ff78c8e92bca89591
+SIZE (pkg_replace-20190827.tar.xz) = 17444
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE UPDATES PUBLIC "-//FreshPorts//DTD FreshPorts 2.0//EN" "https://www.freshports.org/docs/fp-updates.dtd">
<UPDATES Version="1.3.2.1">
<UPDATE>
<DATE Year="2019" Month="9" Day="2"></DATE>
<TIME Minute="33" Hour="16" Second="54" Timezone="UTC"></TIME>
<OS Branch="head" Id="FreeBSD" Repo="ports"></OS>
<LOG>ports-mgmt/pkg_replace: Update to 20190827
PR: 240142
Submitted by: kdeguchi@sz.tokoha-u.ac.jp (maintainer)</LOG>
<PEOPLE>
<UPDATER Handle="swills"></UPDATER>
<SUBMITTER>kdeguchi@sz.tokoha-u.ac.jp (maintainer)</SUBMITTER>
</PEOPLE>
<MESSAGE EncodingLosses="false" Subject="svn commit: r510825 - head/ports-mgmt/pkg_replace" Id="201909021633.x82GXsLH076944@repo.freebsd.org">
<DATE Day="2" Month="9" Year="2019"></DATE>
<TIME Hour="16" Minute="33" Timezone="UTC" Second="54"></TIME>
<REPOSITORY>ports</REPOSITORY>
<REVISION>510825</REVISION>
<TO Email="ports-committers@freebsd.org"></TO>
<TO Email="svn-ports-all@freebsd.org,"></TO>
</MESSAGE>
<FILES>
<FILE Path="head/ports-mgmt/pkg_replace/Makefile" Revision="510825" Action="Modify"></FILE>
<FILE Revision="510825" Path="head/ports-mgmt/pkg_replace/distinfo" Action="Modify"></FILE>
</FILES>
<PR Id="240142"></PR>
</UPDATE>
</UPDATES>
https://svnweb.freebsd.org/ports?view=revision&revision=510825
Can the XML structure be created in full based on the information contained in the repo?
@dlangille
Copy link
Author

A short run through the data indicates the commit contains sufficient information to populate the XML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment