From 58a63a6b6709eb355b61bde88606c21742e30309 Mon Sep 17 00:00:00 2001 From: espie Date: Thu, 13 Jan 2022 12:21:22 +0000 Subject: [PATCH] allow disabling the @ts tweak, which may come in handy for new fw_update that doesn't grok them. --- usr.sbin/pkg_add/OpenBSD/PkgCreate.pm | 7 +++++-- usr.sbin/pkg_add/pkg_create.1 | 12 ++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 56f76cfb23a..995c87dbeaa 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: PkgCreate.pm,v 1.173 2021/11/09 12:22:09 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.174 2022/01/13 12:21:22 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -133,6 +133,7 @@ sub handle_options } $state->{wrkobjdir} = $state->defines('WRKOBJDIR'); $state->{fullpkgpath} = $state->{subst}->value('FULLPKGPATH') // ''; + $state->{no_ts_in_plist} = $state->defines('NO_TS_IN_PLIST'); } sub parse_userdb @@ -312,7 +313,9 @@ sub compute_checksum $result->add_digest($self->compute_digest($fname)) unless $state->{bad}; $result->add_size($size); - $result->add_timestamp($mtime); + unless ($state->{no_ts_in_plist}) { + $result->add_timestamp($mtime); + } } } elsif (-d _) { $state->error("#1 should be a file and not a directory", $fname); diff --git a/usr.sbin/pkg_add/pkg_create.1 b/usr.sbin/pkg_add/pkg_create.1 index e0782f03d3a..cbf28302c47 100644 --- a/usr.sbin/pkg_add/pkg_create.1 +++ b/usr.sbin/pkg_add/pkg_create.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: pkg_create.1,v 1.123 2021/11/26 12:14:33 espie Exp $ +.\" $OpenBSD: pkg_create.1,v 1.124 2022/01/13 12:21:22 espie Exp $ .\" .\" Documentation and design originally from FreeBSD. All the code has .\" been rewritten since. We keep the documentation's notice: @@ -21,7 +21,7 @@ .\" [jkh] Took John's changes back and made some additional extensions for .\" better integration with FreeBSD's new ports collection. .\" -.Dd $Mdocdate: November 26 2021 $ +.Dd $Mdocdate: January 13 2022 $ .Dt PKG_CREATE 1 .Os .Sh NAME @@ -127,6 +127,8 @@ Some specific .Ar names have extra meaning, see .Xr bsd.port.mk 5 +and +.Xr package 5 for details: .Pp .Bl -tag -width FULLPKGPATH -compact @@ -153,6 +155,12 @@ see If defined, appended to the description. .It Cm MAINTAINER If defined, appended to the description. +.It Cm NO_TS_IN_PLIST +If set, disable the +.Cm @ts +annotations in the generated package, rely on the normal +.Xr tar 1 +timestamps instead. .It Cm USE_GROFF Set to 1 to have groff format manpages behind the scenes during package creation. -- 2.20.1