From 7654a1f262d0da0cb3ddea8c92baf07cfab3b1be Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 20 Jan 2011 17:35:27 +0000 Subject: move mga-signpackage to bin directory and add it in Makefile.PL --- Makefile.PL | 3 ++- bin/mga-signpackage | 29 +++++++++++++++++++++++++++++ mga-signpackage | 29 ----------------------------- 3 files changed, 31 insertions(+), 30 deletions(-) create mode 100755 bin/mga-signpackage delete mode 100755 mga-signpackage diff --git a/Makefile.PL b/Makefile.PL index 09ff7f7..933d412 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,7 +9,8 @@ WriteMakefile( EXE_FILES => [ 'bin/youri-submit', 'bin/youri-submit-restricted', - 'bin/youri-submit-proxy' + 'bin/youri-submit-proxy', + 'bin/mga-signpackage' ], PREREQ_PM => { 'Youri::Config' => 0, diff --git a/bin/mga-signpackage b/bin/mga-signpackage new file mode 100755 index 0000000..435e92e --- /dev/null +++ b/bin/mga-signpackage @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w + +use strict; +use RPM4::Sign; +use File::Spec; + +sub signpackage { + my ($file, $name, $path) = @_; + + # check if parent directory is writable + my $parent = (File::Spec->splitpath($file))[1]; + die "Unsignable package, parent directory is read-only" + unless -w $parent; + + my $sign = RPM4::Sign->new( + name => $name, + path => $path, + passphrase => '', + ); + + $sign->rpmssign($file) +} + +if (@ARGV != 3) { + exit 1; +} + +signpackage(@ARGV); + diff --git a/mga-signpackage b/mga-signpackage deleted file mode 100755 index 435e92e..0000000 --- a/mga-signpackage +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use RPM4::Sign; -use File::Spec; - -sub signpackage { - my ($file, $name, $path) = @_; - - # check if parent directory is writable - my $parent = (File::Spec->splitpath($file))[1]; - die "Unsignable package, parent directory is read-only" - unless -w $parent; - - my $sign = RPM4::Sign->new( - name => $name, - path => $path, - passphrase => '', - ); - - $sign->rpmssign($file) -} - -if (@ARGV != 3) { - exit 1; -} - -signpackage(@ARGV); - -- cgit v1.2.1