aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules/buildsystem/templates')
-rwxr-xr-xmodules/buildsystem/templates/submit_package.pl19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/buildsystem/templates/submit_package.pl b/modules/buildsystem/templates/submit_package.pl
new file mode 100755
index 00000000..3a34591b
--- /dev/null
+++ b/modules/buildsystem/templates/submit_package.pl
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my $svn_server = 'svn.<%= domain %>';
+my $packagersgroup="<%= packagers_group %>";
+my $createsrpm="<%= createsrpm_path %>";
+
+my $login = getpwuid($<);
+my (undef, undef, undef, $members) = getgrnam $packagersgroup;
+if (not $members =~ /\b$login\b/) {
+ print "You are not in $packagersgroup group\n";
+ exit 1;
+}
+
+# for bug 914
+# https://bugs.mageia.org/show_bug.cgi?id=914
+map { $_ =~ s|^svn\+ssh://$svn_server/|svn://$svn_server/| } @ARGV;
+exec $createsrpm , @ARGV;