# ex:ts=8 sw=4:
-# $OpenBSD: PackingElement.pm,v 1.213 2013/10/15 20:23:51 schwarze Exp $
+# $OpenBSD: PackingElement.pm,v 1.214 2013/12/30 09:14:49 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
return;
}
+package OpenBSD::PackingElement::Vendor;
+our @ISA=qw(OpenBSD::PackingElement::Unique);
+sub keyword() { 'vendor' }
+__PACKAGE__->register_with_factory;
+sub category() { "vendor" }
+
package OpenBSD::PackingElement::DigitalSignature;
our @ISA=qw(OpenBSD::PackingElement::Unique);
sub keyword() { 'digital-signature' }
# ex:ts=8 sw=4:
-# $OpenBSD: PackingList.pm,v 1.122 2013/12/25 14:38:15 espie Exp $
+# $OpenBSD: PackingList.pm,v 1.123 2013/12/30 09:14:49 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
}
our @unique_categories =
- (qw(name url digital-signature no-default-conflict manual-installation always-update explicit-update extrainfo localbase arch));
+ (qw(name url vendor 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
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.74 2013/12/29 13:40:54 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.75 2013/12/30 09:14:49 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
return OpenBSD::Ustar->new($fh, $state, $dir);
}
+sub setup_vendor
+{
+ my ($self, $plist, $state) = @_;
+ my $vendor = $state->{subst}->value('VENDOR');
+ if (!defined $vendor) {
+ return;
+ }
+ OpenBSD::PackingElement::Vendor->add($plist, $vendor);
+}
+
sub sign_existing_package
{
my ($self, $state, $pkg) = @_;
my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS);
$plist->set_infodir($dir);
$self->add_signature($plist, $state);
+ $self->setup_vendor($plist, $state);
$plist->save;
my $tmp = OpenBSD::Temp::permanent_file($output, "pkg");
my $wrarc = $self->create_archive($state, $tmp, ".");
my ($self, $plist, $state) = @_;
my $subst = $state->{subst};
+ $self->setup_vendor($plist, $state);
my $fullpkgpath = $subst->value('FULLPKGPATH');
my $cdrom = $subst->value('PERMIT_PACKAGE_CDROM') ||
$subst->value('CDROM');;