From 40f29b70f63e53b1a60ae43d5a29e0245f8f4127 Mon Sep 17 00:00:00 2001 From: Valters Jansons Date: Mon, 17 Mar 2025 20:12:09 +0200 Subject: [PATCH] Update `versionmangle` to handle time in filename Since 2024-03-19, the database files have a time component in their filenames. Previously, versionmange handled the date component, dropping the dashes from 2024-03-19 to 0~20240319. However, now the time component gets added as a Debian revision, and messes the logic up. So with this commit the versionmange transforms timestamp into a similar upstream component, from -03:45 to ~0345. Upstream filename 2024-03-20-03:45 now becomes 0~20240320~0345, while retaining 2024-03-19 as 0~20240319 for backwards compatibility. --- debian/watch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/watch b/debian/watch index 016512a..ed7967d 100644 --- a/debian/watch +++ b/debian/watch @@ -1,13 +1,13 @@ # Automatically importing the new version does not work because mk-origtargz # can't handle a single xz compressed file. Use these commands to integrate a new version: # uscan -# unxz ../location-2022-07-06.db.xz -# mkdir ../libloc-database-0~20220706 -# mv ../location-2022-07-06.db ../libloc-database-0~20220706/location.db -# tar cJf ../libloc-database_0~20220706.orig.tar.xz ../libloc-database-0~20220706 -# rm -r ../libloc-database-0~20220706 -# gbp import-orig ../libloc-database_0~20220706.orig.tar.xz +# unxz ../location-2025-03-17-03:45.db.xz +# mkdir ../libloc-database-0~20250317~0345 +# mv ../location-2025-03-17-03:45.db ../libloc-database-0~20250317~0345/location.db +# tar cJf ../libloc-database_0~20250317~0345.orig.tar.xz ../libloc-database-0~20250317~0345 +# rm -r ../libloc-database-0~20250317~0345 +# gbp import-orig ../libloc-database_0~20250317~0345.orig.tar.xz version=4 -opts="versionmangle=s/(\d+)-(\d+)-(\d+)/0~$1$2$3/" \ +opts="versionmangle=s/-(\d+):(\d+)/~$1$2/;s/(\d+)-(\d+)-(\d+)/0~$1$2$3/" \ https://location.ipfire.org/databases/1/archive/ \ location@ANY_VERSION@.db.xz -- 2.47.2