From: espie Date: Sat, 4 Jan 2014 00:14:08 +0000 (+0000) Subject: vendor->signer X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=554b657c0324441d76f7ef8094aaebb22de8e19f;p=openbsd vendor->signer shorten pubkey -> pub (naddy@) \\ -> \e (jmc@) --- diff --git a/share/man/man5/bsd.port.mk.5 b/share/man/man5/bsd.port.mk.5 index 28d0f44a9cc..8630d30a7b2 100644 --- a/share/man/man5/bsd.port.mk.5 +++ b/share/man/man5/bsd.port.mk.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bsd.port.mk.5,v 1.391 2013/12/30 12:43:17 espie Exp $ +.\" $OpenBSD: bsd.port.mk.5,v 1.392 2014/01/04 00:14:08 espie Exp $ .\" .\" Copyright (c) 2000-2008 Marc Espie .\" @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: December 30 2013 $ +.Dd $Mdocdate: January 4 2014 $ .Dt BSD.PORT.MK 5 .Os .Sh NAME @@ -2643,7 +2643,7 @@ Set to .Xr pkg_create 1 options for signing packages directly during their creation. In particular, home-made packages should set -.Li -DVENDOR=name . +.Li -DSIGNER=name . .It Ev SKIPDIR See .Xr ports 7 . diff --git a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm index 1c83cd1f2bf..e28f1617f5b 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingElement.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingElement.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingElement.pm,v 1.217 2014/01/03 13:12:35 espie Exp $ +# $OpenBSD: PackingElement.pm,v 1.218 2014/01/04 00:14:08 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -1764,15 +1764,15 @@ sub check return; } -package OpenBSD::PackingElement::Vendor; +package OpenBSD::PackingElement::Signer; our @ISA=qw(OpenBSD::PackingElement::Unique); -sub keyword() { 'vendor' } +sub keyword() { 'signer' } __PACKAGE__->register_with_factory; -sub category() { "vendor" } +sub category() { "signer" } # XXX digital-signatures have to be unique, since they are a part # of the unsigned packing-list, with only the b64sig part removed -# (likewise for vendor) +# (likewise for signer) package OpenBSD::PackingElement::DigitalSignature; our @ISA=qw(OpenBSD::PackingElement::Unique); diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index a965fc09e85..ab5d5de81f1 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackingList.pm,v 1.124 2013/12/31 11:21:10 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.125 2014/01/04 00:14:08 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -438,7 +438,7 @@ sub match_pkgpath } our @unique_categories = - (qw(name url vendor digital-signature no-default-conflict manual-installation always-update explicit-update extrainfo localbase arch)); + (qw(name url signer digital-signature no-default-conflict manual-installation always-update explicit-update extrainfo localbase arch)); our @list_categories = (qw(conflict pkgpath incompatibility ask-update updateset depend diff --git a/usr.sbin/pkg_add/OpenBSD/Paths.pm b/usr.sbin/pkg_add/OpenBSD/Paths.pm index 68e55561a01..8d7281d4b22 100644 --- a/usr.sbin/pkg_add/OpenBSD/Paths.pm +++ b/usr.sbin/pkg_add/OpenBSD/Paths.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Paths.pm,v 1.23 2014/01/02 13:45:14 espie Exp $ +# $OpenBSD: Paths.pm,v 1.24 2014/01/04 00:14:08 espie Exp $ # # Copyright (c) 2007 Marc Espie # @@ -33,8 +33,8 @@ sub sysctl() { '/sbin/sysctl' } sub openssl() { '/usr/sbin/openssl' } sub pkgca() { '/etc/ssl/pkgca.pem' } sub signify() { '/usr/bin/signify' } -sub signifykey() { '/etc/openbsd.pubkey' } -sub signifyfwkey() { '/etc/openbsd-fw.pubkey' } +sub signifykey() { '/etc/signify/openbsd.pub' } +sub signifyfwkey() { '/etc/signify/openbsd-fw.pub' } sub pkg_add() { '/usr/sbin/pkg_add' } sub chmod() { '/bin/chmod' } # external command is used for symbolic modes. sub gzip() { '/usr/bin/gzip' } diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm index 8b4674c9e14..88f1364fb5f 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.81 2014/01/03 13:26:24 espie Exp $ +# $OpenBSD: PkgCreate.pm,v 1.82 2014/01/04 00:14:08 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie # @@ -1155,14 +1155,14 @@ sub create_archive return OpenBSD::Ustar->new($fh, $state, $dir); } -sub setup_vendor +sub setup_signer { my ($self, $plist, $state) = @_; - my $vendor = $state->{subst}->value('VENDOR'); - if (!defined $vendor) { + my $signer = $state->{subst}->value('SIGNER'); + if (!defined $signer) { return; } - OpenBSD::PackingElement::Vendor->add($plist, $vendor); + OpenBSD::PackingElement::Signer->add($plist, $signer); } sub sign_existing_package @@ -1174,7 +1174,7 @@ sub sign_existing_package my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS); $plist->set_infodir($dir); $self->add_signature($plist, $state); - $self->setup_vendor($plist, $state); + $self->setup_signer($plist, $state); $plist->save; my $tmp = OpenBSD::Temp::permanent_file($output, "pkg"); my $wrarc = $self->create_archive($state, $tmp, "."); @@ -1218,7 +1218,7 @@ sub add_extra_info my ($self, $plist, $state) = @_; my $subst = $state->{subst}; - $self->setup_vendor($plist, $state); + $self->setup_signer($plist, $state); my $fullpkgpath = $subst->value('FULLPKGPATH'); my $cdrom = $subst->value('PERMIT_PACKAGE_CDROM') || $subst->value('CDROM');; diff --git a/usr.sbin/pkg_add/OpenBSD/signify.pm b/usr.sbin/pkg_add/OpenBSD/signify.pm index acaa8b9873e..dd6d959adca 100644 --- a/usr.sbin/pkg_add/OpenBSD/signify.pm +++ b/usr.sbin/pkg_add/OpenBSD/signify.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: signify.pm,v 1.3 2014/01/03 17:10:57 espie Exp $ +# $OpenBSD: signify.pm,v 1.4 2014/01/04 00:14:08 espie Exp $ # # Copyright (c) 2013 Marc Espie # @@ -67,11 +67,11 @@ sub check_signature } else { $pubkey = OpenBSD::Paths->signifykey; } - if ($plist->has('vendor')) { - my $vendor = $plist->get('vendor')->name; - $pubkey = "/etc/signify/$vendor.pubkey"; + if ($plist->has('signer')) { + my $signer = $plist->get('signer')->name; + $pubkey = "/etc/signify/$signer.pub"; if (!-f $pubkey) { - $state->say("Unknown vendor #1", $vendor); + $state->say("Unknown signer #1", $signer); return 0; } } diff --git a/usr.sbin/pkg_add/package.5 b/usr.sbin/pkg_add/package.5 index 561921777db..c366d5f0cc9 100644 --- a/usr.sbin/pkg_add/package.5 +++ b/usr.sbin/pkg_add/package.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: package.5,v 1.15 2014/01/03 15:23:16 jmc Exp $ +.\" $OpenBSD: package.5,v 1.16 2014/01/04 00:14:08 espie Exp $ .\" Copyright (c) 2005-2006 Marc Espie .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -12,7 +12,7 @@ .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.Dd $Mdocdate: January 3 2014 $ +.Dd $Mdocdate: January 4 2014 $ .Dt PACKAGE 5 .Os .Sh NAME @@ -180,10 +180,10 @@ Original location of the package, automatically recorded in installed packages by .Xr pkg_add 1 . .Pp -.It Cm @vendor +.It Cm @signer Internal annotation corresponding to .Xr pkg_create 1 Ns 's -.Fl D Ar VENDOR +.Fl D Ar SIGNER option. .Pp .It Cm @wantlib Ar libspec diff --git a/usr.sbin/pkg_add/pkg_create.1 b/usr.sbin/pkg_add/pkg_create.1 index eb53ceab4bd..ded58f36dc2 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.88 2014/01/03 16:56:22 espie Exp $ +.\" $OpenBSD: pkg_create.1,v 1.89 2014/01/04 00:14:08 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: January 3 2014 $ +.Dd $Mdocdate: January 4 2014 $ .Dt PKG_CREATE 1 .Os .Sh NAME @@ -49,11 +49,11 @@ .Ek .Nm pkg_create .Op Fl s Ar signature-parameter -.Op Fl D Ar VENDOR Ns = Ns Ar value +.Op Fl D Ar SIGNER Ns = Ns Ar value .Fl f Ar packinglist .Nm pkg_create .Fl s Ar signature-parameter ... -.Op Fl D Ar VENDOR Ns = Ns Ar value +.Op Fl D Ar SIGNER Ns = Ns Ar value .Op Fl o Ar dir .Op Fl S Ar source .Op Ar pkgfile ... @@ -155,8 +155,8 @@ If defined, appended to the description. .It Ar USE_GROFF Set to 1 to have groff format manpages behind the scenes during package creation. -.It Ar VENDOR -Specify a vendor-name, mostly used for signing packages. +.It Ar SIGNER +Specify a signer name, used for signing packages. .El .It Fl d No [-] Ns Ar desc Fetch long description for package from file @@ -236,7 +236,7 @@ This can be any url admissible for a .Ev PKG_PATH , so that it is possible to sign packages during a transfer, e.g., .Bd -literal -offset indent -pkg_create -s signify -s mykey -DVENDOR=me \\ +pkg_create -s signify -s mykey -DSIGNER=me \e -o output -S scp://build-machine/packages/ .Ed .It Xo @@ -267,11 +267,11 @@ file. For .Xr signify 1 private usage, a -.Ar VENDOR +.Ar SIGNER must be specified, so that .Xr pkg_add 1 will be able to retrieve the correct public key from -.Pa /etc/signify/.pubkey . +.Pa /etc/signify/.pubkey . .It Fl U Ar undisplayfile Display the file (using .Xr more 1 )