summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2016-09-06 10:41:52 +0000
committerMarc Espie <espie@cvs.openbsd.org>2016-09-06 10:41:52 +0000
commit7cefce90640e01a20742167d6b1737e0ac658ee0 (patch)
tree6207838532a25480bb2bb0ce2b858956b34c2faa /usr.sbin
parentc36cbf0aa08066b5f4310cfa03c7991852645fcc (diff)
remove code that allows pkg_create to sign
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm4
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgSign.pm11
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Signer.pm16
-rw-r--r--usr.sbin/pkg_add/pkg_create.112
4 files changed, 14 insertions, 29 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index 32e95eb2433..4c2002e7671 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.121 2016/06/21 10:40:37 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.122 2016/09/06 10:41:51 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -104,7 +104,7 @@ sub handle_options
$state->SUPER::handle_options('p:f:d:M:U:A:B:P:W:qQ',
'[-nQqvx] [-A arches] [-B pkg-destdir] [-D name[=value]]',
'[-L localbase] [-M displayfile] [-P pkg-dependency]',
- '[-s signing-parameter] [-U undisplayfile] [-W wantedlib]',
+ '[-U undisplayfile] [-W wantedlib]',
'[-d desc -D COMMENT=value -f packinglist -p prefix]',
'pkg-name');
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm
index e2d8f4ebe66..99cb4b5ac39 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgSign.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgSign.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgSign.pm,v 1.8 2016/05/09 14:17:24 espie Exp $
+# $OpenBSD: PkgSign.pm,v 1.9 2016/09/06 10:41:51 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -38,10 +38,17 @@ sub handle_options
sub {
$state->{source} = shift;
},
+ 's' =>
+ sub {
+ push(@{$state->{signature_params}}, shift);
+ },
};
- $state->SUPER::handle_options('Cij:o:S:',
+ $state->SUPER::handle_options('Cij:o:S:s:',
'[-Cv] [-D name[=value]] -s x509|signify [-s cert] -s priv',
'[-o dir] [-S source] [pkg-name...]');
+ if (defined $state->{signature_params}) {
+ $state->{signer} = OpenBSD::Signer->factory($state);
+ }
if (!defined $state->{signer}) {
$state->usage("Can't invoke command without valid signing parameters");
}
diff --git a/usr.sbin/pkg_add/OpenBSD/Signer.pm b/usr.sbin/pkg_add/OpenBSD/Signer.pm
index 9415bcadf5d..7806e71bdba 100644
--- a/usr.sbin/pkg_add/OpenBSD/Signer.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Signer.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: Signer.pm,v 1.6 2015/01/04 14:10:20 espie Exp $
+# $OpenBSD: Signer.pm,v 1.7 2016/09/06 10:41:51 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -110,20 +110,6 @@ sub compute_signature
package OpenBSD::CreateSign::State;
our @ISA = qw(OpenBSD::AddCreateDelete::State);
-sub handle_options
-{
- my ($state, $opt_string, @usage) = @_;
- $state->{opt}{s} =
- sub {
- push(@{$state->{signature_params}}, shift);
- };
- $state->{no_exports} = 1;
- $state->SUPER::handle_options($opt_string.'s:', @usage);
- if (defined $state->{signature_params}) {
- $state->{signer} = OpenBSD::Signer->factory($state);
- }
-}
-
sub create_archive
{
my ($state, $filename, $dir) = @_;
diff --git a/usr.sbin/pkg_add/pkg_create.1 b/usr.sbin/pkg_add/pkg_create.1
index 8632a5b6c52..d74706cfad7 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.102 2016/06/28 15:30:29 espie Exp $
+.\" $OpenBSD: pkg_create.1,v 1.103 2016/09/06 10:41:51 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: June 28 2016 $
+.Dd $Mdocdate: September 6 2016 $
.Dt PKG_CREATE 1
.Os
.Sh NAME
@@ -37,7 +37,6 @@
.Op Fl L Ar localbase
.Op Fl M Ar displayfile
.Op Fl P Ar pkgpath : Ns Ar pkgspec : Ns Ar default
-.Op Fl s Ar signature-parameter
.Op Fl U Ar undisplayfile
.Op Fl W Ar libspec
.Fl d Ar desc
@@ -48,7 +47,6 @@
.Ar pkg-name
.Ek
.Nm pkg_create
-.Op Fl s Ar signature-parameter
.Fl f Ar packinglist
.Sh DESCRIPTION
The
@@ -221,12 +219,6 @@ Print out the actual packing-list of the package being generated
(query mode).
Most often used in combination with
.Fl n .
-.It Fl s Ar signature-parameter
-Specify signature parameters for signing packages on-the-fly during
-building.
-Refer to
-.Xr pkg_sign 1
-for the meaning of the parameters and the signing process.
.It Fl U Ar undisplayfile
Display the file (using
.Xr more 1 )