summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/2011-January/001512.html
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/2011-January/001512.html')
-rw-r--r--zarb-ml/mageia-sysadm/2011-January/001512.html6058
1 files changed, 6058 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2011-January/001512.html b/zarb-ml/mageia-sysadm/2011-January/001512.html
new file mode 100644
index 000000000..eb1918c29
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/2011-January/001512.html
@@ -0,0 +1,6058 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+ <HEAD>
+ <TITLE> [Mageia-sysadm] [209] add mandriva version of youri-submit, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/submit/trunk at revision 271600
+ </TITLE>
+ <LINK REL="Index" HREF="index.html" >
+ <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B209%5D%20add%20mandriva%20version%20of%20youri-submit%2C%0A%20downloaded%20from%20http%3A//svn.%0A%20mandriva.com/svn/soft/build_system/youri/submit/trunk%20at%20revision%20271600&In-Reply-To=%3C20110105131906.65E664193F%40valstar.mageia.org%3E">
+ <META NAME="robots" CONTENT="index,nofollow">
+ <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
+ <LINK REL="Previous" HREF="001511.html">
+ <LINK REL="Next" HREF="001513.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[Mageia-sysadm] [209] add mandriva version of youri-submit, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/submit/trunk at revision 271600</H1>
+ <B>root at mageia.org</B>
+ <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B209%5D%20add%20mandriva%20version%20of%20youri-submit%2C%0A%20downloaded%20from%20http%3A//svn.%0A%20mandriva.com/svn/soft/build_system/youri/submit/trunk%20at%20revision%20271600&In-Reply-To=%3C20110105131906.65E664193F%40valstar.mageia.org%3E"
+ TITLE="[Mageia-sysadm] [209] add mandriva version of youri-submit, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/submit/trunk at revision 271600">root at mageia.org
+ </A><BR>
+ <I>Wed Jan 5 14:19:06 CET 2011</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="001511.html">[Mageia-sysadm] [653] - do not try to do ssl when we cannot, this confuse epoll
+</A></li>
+ <LI>Next message: <A HREF="001513.html">[Mageia-sysadm] [210] add mandriva version of youri-core, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/core/trunk/ at revision 271600
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#1512">[ date ]</a>
+ <a href="thread.html#1512">[ thread ]</a>
+ <a href="subject.html#1512">[ subject ]</a>
+ <a href="author.html#1512">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>Revision: 209
+Author: boklm
+Date: 2011-01-05 14:19:06 +0100 (Wed, 05 Jan 2011)
+Log Message:
+-----------
+add mandriva version of youri-submit, downloaded from <A HREF="http://svn.mandriva.com/svn/soft/build_system/youri/submit/trunk">http://svn.mandriva.com/svn/soft/build_system/youri/submit/trunk</A> at revision 271600
+
+Added Paths:
+-----------
+ build_system/mdv-youri-submit/
+ build_system/mdv-youri-submit/branches/
+ build_system/mdv-youri-submit/tags/
+ build_system/mdv-youri-submit/trunk/
+ build_system/mdv-youri-submit/trunk/ChangeLog
+ build_system/mdv-youri-submit/trunk/MANIFEST.SKIP
+ build_system/mdv-youri-submit/trunk/Makefile.PL
+ build_system/mdv-youri-submit/trunk/README
+ build_system/mdv-youri-submit/trunk/TODO
+ build_system/mdv-youri-submit/trunk/bin/
+ build_system/mdv-youri-submit/trunk/bin/youri-check.in
+ build_system/mdv-youri-submit/trunk/bin/youri-submit
+ build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in
+ build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in
+ build_system/mdv-youri-submit/trunk/bin/youri-submit.in
+ build_system/mdv-youri-submit/trunk/etc/
+ build_system/mdv-youri-submit/trunk/etc/bash_completion.d/
+ build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit
+ build_system/mdv-youri-submit/trunk/etc/submit.conf
+ build_system/mdv-youri-submit/trunk/lib/
+ build_system/mdv-youri-submit/trunk/lib/Youri/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm
+ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm
+ build_system/mdv-youri-submit/trunk/t/
+ build_system/mdv-youri-submit/trunk/t/00distribution.t
+
+Added: build_system/mdv-youri-submit/trunk/ChangeLog
+===================================================================
+--- build_system/mdv-youri-submit/trunk/ChangeLog (rev 0)
++++ build_system/mdv-youri-submit/trunk/ChangeLog 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,606 @@
++2008-02-19 07:50 pixel
++
++ * lib/Youri/Submit/Action/Unpack.pm: fix &quot;grep_files&quot; handling
++
++2008-02-12 09:42 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: do not make rpmlint errors
++ fatal anymore (asked by fcrozat)
++
++2008-02-08 17:49 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: remove results occurences and
++ update doc
++
++2008-02-08 17:48 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: make all rpmlint errors fatal
++
++2008-02-08 17:44 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: removed unneeded parentheses
++
++2008-02-08 17:44 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: make clear
++ repository/target/define are unused
++
++2008-02-08 17:43 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: use scalar for fd
++
++2008-01-31 16:35 pixel
++
++ * lib/Youri/Submit/Action/Link.pm: also call -&gt;set_arch_changed
++ when linking a noarch file to another arch
++ (this still doesn't explain media/media_info/MD5SUM not being
++ remade, but it
++ can help...)
++
++2007-12-21 14:37 blino
++
++ * bin/youri-submit.in: merge youri-submit into youri-submit.in
++
++2007-12-19 13:43 blino
++
++ * lib/Youri/Submit/Action/Archive.pm: only log main/updates
++ modifications, not contrib/updates or non-free/updates which are
++ legal
++
++2007-12-19 13:37 blino
++
++ * lib/Youri/Submit/Action/Archive.pm: add spuk's debug code for bug
++ 34999
++
++2007-12-17 19:45 blino
++
++ * bin/youri-submit: add an &quot;allow_omitting_packages&quot; global option,
++ to be able to run youri even if no packages are specified on the
++ command line (useful if packages are fetched in pre action)
++
++2007-12-17 19:34 blino
++
++ * bin/youri-submit: improve error messages for pres/posts actions
++ (patch from raoh's copy, probably from warly)
++
++2007-12-17 19:33 blino
++
++ * bin/youri-submit: fix typo about posts actions (patch from raoh's
++ copy, probably from warly)
++
++2007-12-13 15:01 pixel
++
++ * lib/Youri/Submit/Check/Version.pm: - empty {authorized_users}
++ doesn't imply every one is allowed to bypass freeze check!
++ - {authorized_users} should be checked more strictly
++
++2007-12-07 18:26 spuk
++
++ * lib/Youri/Submit/Action/Sendcache.pm: - make Sendcache send debug
++ packages only if explicitly told to, to save space
++
++2007-11-30 19:29 spuk
++
++ * lib/Youri/Submit/Action/UpdateMdvDb.pm: Youri action to update
++ the Mandriva maintainers database.
++
++2007-10-04 20:07 blino
++
++ * lib/Youri/Submit/Check/Host.pm: make host reject message more
++ explicit by print arch (useful when VMware-player for x86_64
++ actually uses i386 as rpm arch...)
++
++2007-09-26 11:21 blino
++
++ * lib/Youri/Submit/Action/Install.pm: improve log message
++
++2007-09-26 11:19 blino
++
++ * lib/Youri/Submit/Action/Install.pm: fix installed filename (oops)
++
++2007-09-26 09:58 blino
++
++ * lib/Youri/Submit/Action/Install.pm: throw exception on failure,
++ not to delete files that can be copied because of lack of space
++ (upstream commit 1398)
++
++2007-09-25 10:49 pixel
++
++ * lib/Youri/Submit/Action/Unpack.pm: allow to unpack only some
++ files (for release-notes.txt in mandriva-release-common)
++
++2007-09-22 13:11 blino
++
++ * lib/Youri/Submit/Check/Version.pm: allow authorized users to
++ upload everything even during full freeze
++
++2007-08-31 12:51 pixel
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: handle new rpmlint format
++ (not useful at the moment since we still use old rpmlint, but may
++ be useful in
++ the future)
++
++2007-08-31 10:03 blino
++
++ * lib/Youri/Submit/Action/DkmsModuleInfo.pm: adapt to new
++ SOURCEPACKAGE value in prebuilt dkms kernel
++
++2007-08-29 13:21 blino
++
++ * lib/Youri/Submit/Action/DkmsModuleInfo.pm: initial
++ Youri::Submit::Action::DkmsModuleInfo module
++
++2007-08-07 12:50 pixel
++
++ * lib/Youri/Submit/Action/Link.pm: we need the same workaround as
++ done in Action::Install
++
++2007-07-16 09:27 blino
++
++ * lib/Youri/Submit/Post/Genhdlist2.pm: remove unused variable
++
++2007-07-08 02:44 spuk
++
++ * lib/Youri/Submit/Check/Recency.pm: - check for newer/current
++ revisions in default section when submitted to another section
++ (bug #30635)
++
++2007-07-02 09:17 pixel
++
++ * lib/Youri/Submit/Action/CVS.pm: drop mdv specific stuff (mdv
++ doesn't use this action anymore)
++
++2007-06-28 07:40 pixel
++
++ * lib/Youri/Submit/Action/Link.pm: do update hdlist for every arch
++ after linking noarch packages (#31638)
++
++2007-06-28 07:37 pixel
++
++ * lib/Youri/Submit/Action/Install.pm: simplify ($arch is not used
++ by -&gt;set_install_dir_changed)
++
++2007-06-23 13:54 pixel
++
++ * lib/Youri/Submit/Action/Mail.pm, lib/Youri/Submit/Reject/Mail.pm:
++ keep raw changelogs to avoid changing the format (backport)
++
++2007-06-23 08:10 spuk
++
++ * lib/Youri/Submit/Check/Recency.pm: - check for newer and same
++ existing revisions in a single pass
++ - use proper get_revisions() instead of get_install_file() hack,
++ as the
++ latter will use the current file name, and thus will fail to
++ check for an
++ existing package revision when submitting, because submitted
++ SRPMs have a
++ different name (&quot;@rev:foobar-...&quot;) than what goes into the
++ repository
++
++2007-06-22 13:51 pixel
++
++ * lib/Youri/Submit/Post/CleanRpmsrate.pm: ensure we don't do
++ anything if nothing changed
++
++2007-06-22 13:41 pixel
++
++ * lib/Youri/Submit/Post/Genhdlist2.pm: more atomic generation of
++ MD5SUM
++
++2007-06-22 13:35 pixel
++
++ * lib/Youri/Submit/Post/Genhdlist2.pm: - need to redo global
++ MD5SUM. This MD5SUM is mostly obsolete, but is still needed up to
++ 2007.1
++ (and needed even on cooker for existing urpmi.cfg)
++ - don't use --blind. hopefully not needed
++
++2007-06-22 06:45 pixel
++
++ * lib/Youri/Submit/Post/Genhdlist2.pm: call genhdlist2 with (new)
++ option --allow-empty-media
++
++2007-06-21 10:13 blino
++
++ * lib/Youri/Submit/Post/CleanRpmsrate.pm: uniquify arch list
++
++2007-06-21 08:16 pixel
++
++ * lib/Youri/Submit/Action/Install.pm,
++ lib/Youri/Submit/Post/Genhdlist2.pm: new action Genhdlist2
++
++2007-06-14 18:23 mrl
++
++ * lib/Youri/Submit/Action/Sendcache.pm: - As this action is unique,
++ avoid too much flexibility and simplify the code.
++ - Use . for hidding temporary files instead of .new suffix.
++
++2007-06-13 18:36 mrl
++
++ * lib/Youri/Submit/Action/Sendcache.pm: - Adapted for working with
++ iurt cache.
++
++2007-06-13 01:48 spuk
++
++ * lib/Youri/Submit/Action/Link.pm: no such 'cd' function, 'chdir'
++ it is...
++
++2007-05-08 06:22 spuk
++
++ * lib/Youri/Submit/Reject/Mail.pm: fixing the Big SVN Breakage:
++ reverting last commit, restoring state as of latest working
++ checkout in ken
++
++2007-05-08 06:06 spuk
++
++ * lib/Youri/Submit/Post/Gendistrib.pm: fixing the Big SVN Breakage:
++ restoring state as of working checkout in ken
++
++2007-05-08 06:00 spuk
++
++ * lib/Youri/Submit/Action/Scp.pm: fixing the Big SVN Breakage:
++ Scp.pm was changed into Send.pm
++
++2007-05-05 06:16 spuk
++
++ * lib/Youri/Submit/Check/Section.pm: Check if package submission
++ was for the correct section.
++
++2007-03-24 11:36 spuk
++
++ * lib/Youri/Submit/Action/Archive.pm: - moved hack for verbosity to
++ start of code, with a remark
++ - removed double $path from debug string
++
++2007-03-15 12:36 mrl
++
++ * lib/Youri/Submit/Check/Version.pm: - Fixed version_freeze mode:
++ do not allow any upload with a different version
++ from what is already present on the repository.
++ - Added an ACL control for maintainers allowed to bypass this
++ restriction as option
++ authorized_users.
++
++2007-03-15 12:32 mrl
++
++ * lib/Youri/Submit/Check/Version.pm: - Improved indentation.
++ - Added some comments regarding possible bugs in freeze modes.
++
++2005-05-24 14:40 Sawyer
++
++ * lib/Youri/Submit/Reject/Mail.pm: LOST
++
++2007-03-10 07:49 spuk
++
++ * lib/Youri/Submit/Action/Archive.pm: The extra '/' was causing the
++ string to not be matched by the regexp below
++ for getting $rep_section and $rep_main_section, in the end making
++ the SRPMs
++ of all other subsections be removed when a newer package was
++ uploaded for any
++ subsection. (#28719)
++
++2007-02-26 10:56 blino
++
++ * lib/Youri/Submit/Post/CleanRpmsrate.pm: initial
++ Post::CleanRpmsrate module
++
++2007-02-14 12:10 blino
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: match rpmlint errors that have
++ no value (such as non-xdg-migrated-menu, the only one we
++ currently use...)
++
++2007-02-09 22:11 blino
++
++ * bin/youri-submit: get -&gt; get_arg
++
++2007-02-09 22:09 blino
++
++ * bin/youri-submit: merge changes from ken/kenobi
++
++2007-02-09 22:09 blino
++
++ * bin/youri-submit: create youri-submit from youri-submit.in
++
++2007-02-09 19:39 blino
++
++ * lib/Youri/Submit/Check/ACL.pm: add section in acl error message
++
++2007-02-09 19:34 blino
++
++ * lib/Youri/Submit/Reject/Mail.pm: do not use packager adress as
++ from, it may be invalid (non-free packages) or not subscribed to
++ maintainers
++
++2007-02-09 18:51 blino
++
++ * lib/Youri/Submit/Reject/Mail.pm: fix changelog in reject mail
++
++2007-02-09 18:50 blino
++
++ * lib/Youri/Submit/Reject/Mail.pm: fix reject mail
++
++2007-02-08 17:28 pixel
++
++ * lib/Youri/Submit/Action/Unpack.pm: also give directories to &quot;cpio
++ -pdu&quot; to ensure directories are created with same rights
++
++2007-02-08 14:09 pixel
++
++ * lib/Youri/Submit/Action/Unpack.pm: This action plugin unpack
++ package files somewhere.
++ When unpack_inside_distribution_root is set, dest_directory is
++ relative to the distribution root.
++ When the package is a noarch, the wanted files are unpacked in
++ distribution root of each archs.
++
++ eg:
++ unpack_installer_images:
++ class: Youri::Submit::Action::Unpack
++ options:
++ name: drakx-installer-images
++ source_subdir: /usr/lib*/drakx-installer-images
++ dest_directory: .
++ unpack_inside_distribution_root: 1
++
++2007-01-30 10:02 pixel
++
++ * lib/Youri/Submit/Check/ACL.pm, lib/Youri/Submit/Check/Host.pm,
++ lib/Youri/Submit/Check/Queue_recency.pm,
++ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/SVN.pm,
++ lib/Youri/Submit/Check/Source.pm, lib/Youri/Submit/Check/Type.pm,
++ lib/Youri/Submit/Check/Version.pm, lib/Youri/Submit/Pre/Rsync.pm,
++ lib/Youri/Submit/Reject/Archive.pm,
++ lib/Youri/Submit/Reject/Clean.pm,
++ lib/Youri/Submit/Reject/Install.pm,
++ lib/Youri/Submit/Reject/Mail.pm: fix $Id$ expansion
++
++2007-01-30 10:01 pixel
++
++ * lib/Youri/Submit/Plugin.pm, lib/Youri/Submit/Post.pm,
++ lib/Youri/Submit/Pre.pm, lib/Youri/Submit/Reject.pm: fix pod and
++ $Id$ expansion
++
++2007-01-30 10:00 pixel
++
++ * lib/Youri/Submit/Post.pm: fix pod
++
++2007-01-30 09:59 pixel
++
++ * lib/Youri/Submit/Action/Send.pm: fix pod
++
++2007-01-30 09:58 pixel
++
++ * lib/Youri/Submit/Action/Markrelease.pm,
++ lib/Youri/Submit/Action/Scp.pm: fix pod
++
++2007-01-30 09:49 pixel
++
++ * lib/Youri/Submit/Action/Clean.pm,
++ lib/Youri/Submit/Action/Link.pm,
++ lib/Youri/Submit/Action/Markrelease.pm,
++ lib/Youri/Submit/Action/Rpminfo.pm,
++ lib/Youri/Submit/Action/Scp.pm, lib/Youri/Submit/Action/Send.pm:
++ fix $Id$ expansion
++
++2007-01-26 11:25 blino
++
++ * lib/Youri/Submit/Check/ACL.pm: really match section in ACL
++
++2007-01-26 11:24 blino
++
++ * lib/Youri/Submit/Check/ACL.pm: fix arch ACL matching (and thus
++ allow ACLs to match again)
++
++2006-12-24 10:31 mandrake
++
++ * lib/Youri/Submit/Post.pm, lib/Youri/Submit/Pre.pm,
++ lib/Youri/Submit/Reject.pm: Removing previous pristine/
++ directory.
++
++2006-12-24 03:15 mandrake
++
++ * lib/Youri/Submit/Action.pm: %repsys markrelease
++ version: 1.0
++ release: 0.20061223.3mdv2007.1
++ revision: 101968
++
++ Copying 1.0-0.20061223.3mdv2007.1 to releases/ directory.
++
++2006-10-16 16:05 warly
++
++ * lib/Youri/Submit/Check.pm: merging dev with upstream
++
++2006-11-14 22:01 mrl
++
++ * lib/Youri/Submit/Action/Rpminfo.pm: - Renamed package name tag.
++
++2006-11-14 16:38 mrl
++
++ * lib/Youri/Submit/Action/RpmInfo.pm,
++ lib/Youri/Submit/Action/Rpminfo.pm: - Renamed, due to some
++ enforcement (cfengine?).
++
++2006-11-14 13:23 mrl
++
++ * lib/Youri/Submit/Action/RpmInfo.pm: - Added package summary to
++ .info files.
++
++2006-11-13 12:40 mrl
++
++ * lib/Youri/Submit/Action/RpmInfo.pm: - First version of web
++ interface.
++
++2006-10-31 11:40 mandrake
++
++ * lib/Youri/Submit/Action/Archive.pm: unlink file in Archive for
++ the moment (should be done in clean but the code to detect which
++ packages is obsoleted has to be moved
++
++2006-10-26 11:26 mandrake
++
++ * lib/Youri/Submit/Action/CVS.pm: we perform CVS commit
++ asynchronously
++
++2006-10-26 11:21 mandrake
++
++ * lib/Youri/Submit/Action/Install.pm: rename the rpm to remove the
++ prefix
++
++2006-10-26 11:18 mandrake
++
++ * lib/Youri/Submit/Action/Mail.pm: fix double .
++
++2006-10-26 11:16 mandrake
++
++ * lib/Youri/Submit/Post/Gendistrib.pm: add gendistrib command
++ directly into gendistrib module
++
++2006-10-26 11:14 mandrake
++
++ * lib/Youri/Submit/Pre/Rsync.pm: return correct packages table for
++ groups
++
++2006-10-26 11:10 mandrake
++
++ * lib/Youri/Submit/Reject/Install.pm: get_reject_path seems to be
++ the new name
++
++2006-10-26 11:07 mandrake
++
++ * lib/Youri/Submit/Reject/Mail.pm: $last_change is sometime empty
++
++2006-10-24 11:07 warly
++
++ * bin/youri-submit.in: exit with an error code if an error occured
++ in one group; s/Upload/Submit/; use new structure name from
++ upstream
++
++2006-10-23 11:48 warly
++
++ * lib/Youri/Submit/Check/ACL.pm,
++ lib/Youri/Submit/Check/Queue_recency.pm,
++ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/SVN.pm,
++ lib/Youri/Submit/Check/Source.pm,
++ lib/Youri/Submit/Check/Version.pm: must return an empty value
++
++2006-10-18 12:46 warly
++
++ * lib/Youri/Submit/Check/Rpmlint.pm: remove debug code
++
++2006-10-17 16:10 warly
++
++ * lib/Youri/Submit/Check/ACL.pm: now checks must return the error
++ message
++
++2006-10-17 16:04 warly
++
++ * lib/Youri/Submit/Check/ACL.pm, lib/Youri/Submit/Check/Host.pm,
++ lib/Youri/Submit/Check/Queue_recency.pm,
++ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/SVN.pm,
++ lib/Youri/Submit/Check/Source.pm,
++ lib/Youri/Submit/Check/Version.pm: now checks must return the
++ error message
++
++2006-10-17 15:16 warly
++
++ * lib/Youri/Submit/Action/Clean.pm,
++ lib/Youri/Submit/Action/Link.pm, lib/Youri/Submit/Check/ACL.pm,
++ lib/Youri/Submit/Check/Host.pm,
++ lib/Youri/Submit/Check/Queue_recency.pm,
++ lib/Youri/Submit/Check/SVN.pm, lib/Youri/Submit/Check/Source.pm,
++ lib/Youri/Submit/Check/Type.pm,
++ lib/Youri/Submit/Check/Version.pm, lib/Youri/Submit/Post.pm,
++ lib/Youri/Submit/Pre.pm, lib/Youri/Submit/Reject.pm:
++ s/Upload/Submit/g
++
++2006-10-17 13:53 warly
++
++ * ., ChangeLog, MANIFEST.SKIP, Makefile.PL, README, TODO,
++ bin/youri-submit-proxy.in, bin/youri-submit-restricted.in,
++ bin/youri-submit.in, etc, etc/bash_completion.d,
++ etc/bash_completion.d/youri-submit, etc/submit.conf,
++ lib/Youri/Submit/Plugin.pm, t, t/00distribution.t: merge with
++ upstream
++
++2006-10-16 16:27 warly
++
++ * lib/Youri/Submit/Post/Gendistrib.pm,
++ lib/Youri/Submit/Pre/Rsync.pm,
++ lib/Youri/Submit/Reject/Archive.pm,
++ lib/Youri/Submit/Reject/Clean.pm,
++ lib/Youri/Submit/Reject/Install.pm,
++ lib/Youri/Submit/Reject/Mail.pm: Now the module is Submit and not
++ Upload
++
++2006-10-16 16:26 warly
++
++ * lib/Youri/Submit/Check, lib/Youri/Submit/Check/History.pm,
++ lib/Youri/Submit/Check/Precedence.pm,
++ lib/Youri/Submit/Check/Recency.pm,
++ lib/Youri/Submit/Check/Rpmlint.pm, lib/Youri/Submit/Check/Tag.pm,
++ lib/Youri/Submit/Check/Type.pm: merging dev with upstream
++
++2006-10-16 16:15 warly
++
++ * lib/Youri/Submit/Post.pm, lib/Youri/Submit/Pre.pm,
++ lib/Youri/Submit/Reject.pm: now plugins are complete abstract
++ classes
++
++2006-10-16 16:08 warly
++
++ * lib/Youri/Submit/Action.pm: merging dev with upstream
++
++2006-10-16 16:05 warly
++
++ * lib/Youri/Submit/Check.pm: merging dev with upstream
++
++2006-10-16 13:03 warly
++
++ * lib/Youri/Submit/Action/Markrelease.pm,
++ lib/Youri/Submit/Action/Scp.pm, lib/Youri/Submit/Action/Send.pm:
++ Now the Module is Submit
++
++2006-10-16 12:57 warly
++
++ * lib/Youri/Submit/Action, lib/Youri/Submit/Action/Archive.pm,
++ lib/Youri/Submit/Action/Bugzilla.pm,
++ lib/Youri/Submit/Action/CVS.pm, lib/Youri/Submit/Action/Clean.pm,
++ lib/Youri/Submit/Action/Install.pm,
++ lib/Youri/Submit/Action/Link.pm, lib/Youri/Submit/Action/Mail.pm,
++ lib/Youri/Submit/Action/RSS.pm, lib/Youri/Submit/Action/Sign.pm:
++ merging dev with upstream
++
++2006-10-16 11:33 warly
++
++ * bin/youri-check.in: add new youri subsections (from upstream)
++
++2006-10-16 11:30 warly
++
++ * lib/Youri/Submit: add new youri subsections (from upstream)
++
++2006-10-16 11:30 warly
++
++ * lib/Youri: add new youri subsections (from upstream)
++
++2006-10-16 11:30 warly
++
++ * lib: add new youri subsections (from upstream)
++
++2006-10-16 11:22 warly
++
++ * bin/youri-submit.in: add new youri subsections (from upstream)
++
++2006-10-16 11:18 warly
++
++ * bin: add new youri subsections (from upstream)
++
++2006-10-16 11:18 warly
++
++ * .: add new youri subsections (from upstream)
++
++2006-04-23 Guillaume Rousse &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">guillomovitch at zarb.org</A>&gt; 0.9
++ * initial release
+
+Added: build_system/mdv-youri-submit/trunk/MANIFEST.SKIP
+===================================================================
+--- build_system/mdv-youri-submit/trunk/MANIFEST.SKIP (rev 0)
++++ build_system/mdv-youri-submit/trunk/MANIFEST.SKIP 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,11 @@
++\.tar\.gz$
++\.SKIP$
++~$
++^pm_to_blib$
++^Makefile$
++^Makefile\.old$
++^bin/youri-submit$
++^bin/youri-submit-restricted$
++^bin/youri-submit-proxy$
++.svn
++blib
+
+Added: build_system/mdv-youri-submit/trunk/Makefile.PL
+===================================================================
+--- build_system/mdv-youri-submit/trunk/Makefile.PL (rev 0)
++++ build_system/mdv-youri-submit/trunk/Makefile.PL 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,97 @@
++# $Id: Makefile.PL 1723 2006-10-17 13:53:27Z warly $
++use ExtUtils::MakeMaker;
++use Config;
++
++WriteMakefile(
++ NAME =&gt; 'youri-submit',
++ VERSION =&gt; 0.9,
++ AUTHOR =&gt; 'Youri project &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">youri at zarb.org</A>&gt;',
++ EXE_FILES =&gt; [
++ 'bin/youri-submit',
++ 'bin/youri-submit-restricted',
++ 'bin/youri-submit-proxy'
++ ],
++ PREREQ_PM =&gt; {
++ 'Youri::Config' =&gt; 0,
++ 'Youri::Utils' =&gt; 0,
++ 'Pod::Simple::HTMLBatch' =&gt; 0
++ },
++ PREFIX =&gt; '/usr/local',
++ INSTALLPRIVLIB =&gt; $Config{installprivlib},
++ INSTALLSITELIB =&gt; $Config{installsitelib},
++ INSTALLVENDORLIB =&gt; $Config{installvendorlib},
++ INSTALLMAN3DIR =&gt; $Config{installman3dir},
++ INSTALLSITEMAN3DIR =&gt; $Config{installsiteman3dir},
++ INSTALLVENDORMAN3DIR =&gt; $Config{installvendorman3dir},
++ INSTALLSCRIPT =&gt; '$(PREFIX)/bin',
++ INSTALLSITESCRIPT =&gt; '$(PREFIX)/bin',
++ INSTALLVENDORSCRIPT =&gt; '$(PREFIX)/bin',
++ INSTALLMAN1DIR =&gt; '$(PREFIX)/share/man/man1',
++ INSTALLSITEMAN1DIR =&gt; '$(PREFIX)/share/man/man1',
++ INSTALLVENDORMAN1DIR =&gt; '$(PREFIX)/share/man/man1',
++);
++
++package MY;
++
++sub post_constants {
++ my ($self) = @_;
++ my $sysconfdir = $self-&gt;{ARGS}-&gt;{SYSCONFDIR} || '$(PREFIX)/etc';
++ return &lt;&lt;EOF;
++SYSCONFDIR = $sysconfdir
++EOF
++}
++
++sub top_targets {
++ my ($self) = @_;
++ my $top_targets = $self-&gt;SUPER::top_targets(@_);
++ $top_targets =~ s/all :: pure_all manifypods/all :: pure_all manifypods htmlifypods/;
++ $top_targets .= &lt;&lt;'EOF';
++htmlifypods : $(TO_INST_PM)
++ if [ ! -d blib/html ]; then mkdir blib/html; fi
++ perl -MPod::Simple::HTMLBatch -e Pod::Simple::HTMLBatch::go lib blib/html
++ pod2html &lt; bin/youri-submit &gt; blib/html/youri-submit.html
++ pod2html &lt; bin/youri-submit-restricted &gt; blib/html/youri-submit-restricted.html
++ pod2html &lt; bin/youri-submit-proxy &gt; blib/html/youri-submit-proxy.html
++EOF
++ return $top_targets;
++}
++
++sub install {
++ my ($self) = @_;
++ my $install = $self-&gt;SUPER::install(@_);
++ $install =~ s/install :: all pure_install doc_install/install :: all pure_install doc_install config_install completion_install/;
++ $install .= &lt;&lt;'EOF';
++config_install :
++ install -d -m 755 $(DESTDIR)$(SYSCONFDIR)/youri
++ install -m 644 etc/submit.conf $(DESTDIR)$(SYSCONFDIR)/youri
++
++completion_install :
++ install -d -m 755 $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
++ install -m 644 etc/bash_completion.d/youri-submit $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
++EOF
++ return $install;
++}
++
++sub installbin {
++ my ($self) = @_;
++ my $installbin = $self-&gt;SUPER::installbin(@_);
++ $installbin .= &lt;&lt;'EOF';
++bin/youri-submit : bin/youri-submit.in Makefile
++ perl -p \
++ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
++ &lt; $&lt; &gt; $@
++
++bin/youri-submit-restricted : bin/youri-submit-restricted.in Makefile
++ perl -p \
++ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
++ -e 's|\@bindir\@|$(PREFIX)/bin|;' \
++ &lt; $&lt; &gt; $@
++
++bin/youri-submit-proxy : bin/youri-submit-proxy.in Makefile
++ perl -p \
++ -e 's|\@sysconfdir\@|$(SYSCONFDIR)|;' \
++ -e 's|\@bindir\@|$(PREFIX)/bin|;' \
++ &lt; $&lt; &gt; $@
++EOF
++ return $installbin;
++}
+
+Added: build_system/mdv-youri-submit/trunk/README
+===================================================================
+--- build_system/mdv-youri-submit/trunk/README (rev 0)
++++ build_system/mdv-youri-submit/trunk/README 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,45 @@
++YOURI project
++-------------
++
++YOURI stands for &quot;Youri Offers an Upload &amp; Repository Infrastucture&quot;. It aims
++to build tools making management of a coherent set of packages easier.
++
++Description
++-----------
++Managing a package repository involves many tasks, such as keeping packages
++tree tidy, generating packages indexes, synchronising bug report system,
++running coherency checks, checking for available updates, etc...
++
++Instead of a gazillion project-specific scripts, we aim to provide a generic package-format independant framework, so as to build coherent and robust tools.
++
++Components
++----------
++Available software in this release
++- youri-check allows to check packages
++- youri-upload allows to upload packages
++
++Installation
++------------
++To install, just use:
++perl Makefile.PL
++make
++make test
++
++All standard MakeMaker variables are usable, with the addition of SYSCONFDIR to
++specify configuration files destination.
++
++Copyright and License
++---------------------
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under
++the same terms as Perl itself.
++
++Authors
++-------
++Guillaume Rousse &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">guillomovitch at zarb.org</A>&gt;,
++Pascal Terjan &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">pterjan at zarb.org</A>&gt;
++Damien Krotkine &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">dams at zarb.org</A>&gt;
++Olivier Thauvin &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">nanardon at zarb.org</A>&gt;
++Ville Skytt\xE4 &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">ville.skytta at iki.fi</A>&gt;
++
+
+Added: build_system/mdv-youri-submit/trunk/TODO
+===================================================================
+--- build_system/mdv-youri-submit/trunk/TODO (rev 0)
++++ build_system/mdv-youri-submit/trunk/TODO 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,6 @@
++1.0 Goals
++=========
++
++- svn support
++- automatic bugzilla ticket closing on upload
++- more customizable (template based ?) mail notification
+
+Added: build_system/mdv-youri-submit/trunk/bin/youri-check.in
+===================================================================
+--- build_system/mdv-youri-submit/trunk/bin/youri-check.in (rev 0)
++++ build_system/mdv-youri-submit/trunk/bin/youri-check.in 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,395 @@
++#!/usr/bin/perl
++# $Id: youri-check.in 1699 2006-10-16 11:33:58Z warly $
++
++=head1 NAME
++
++youri-check - package check agent
++
++=head1 VERSION
++
++Version 1.0
++
++=head1 SYNOPSIS
++
++youri-check [options] &lt;mode&gt;
++
++Options:
++
++ --config &lt;file&gt; use file &lt;file&gt; as config file
++ --skip-media &lt;media&gt; skip media &lt;media&gt;
++ --skip-plugin &lt;plugin&gt; skip plugin &lt;plugin&gt;
++ --parallel parallel run
++ --verbose verbose run
++ --test test run
++ --help print this help message
++
++=head1 DESCRIPTION
++
++B&lt;youri-check&gt; allows to check packages in a repository.
++
++In input mode, all medias defined in configuration are passed to a list of
++input plugins, each of them storing their result in a persistent resultset. In
++output mode, this resultset is passed to a list of output plugins, each of them
++producing arbitrary effects.
++
++=head1 OPTIONS
++
++=over
++
++=item B&lt;--config&gt; &lt;file&gt;
++
++Use given file as configuration, instead of normal one.
++
++=item B&lt;--skip-media&gt; &lt;media&gt;
++
++Skip media with given identity.
++
++=item B&lt;--skip-plugin&gt; &lt;plugin&gt;
++
++Skip plugin with given identity.
++
++=item B&lt;--parallel&gt;
++
++Run all plugins parallelously
++
++=item B&lt;--verbose&gt;
++
++Produce more verbose output (can be used more than once)
++
++=item B&lt;--test&gt;
++
++Don't perform any modification.
++
++=item B&lt;--help&gt;
++
++Print a brief help message and exits.
++
++=back
++
++=head1 CONFIGURATION
++
++Configuration is read from the first file found among:
++
++=over
++
++=item * the one specified by B&lt;--config&gt; option on command-line
++
++=item * $HOME/.youri/check.conf
++
++=item * @sysconfdir@/youri/check.conf
++
++=back
++
++All additional configuration files specified by B&lt;includes&gt; directive are then
++processed. Then command line options. Any directive overrides prior definition.
++
++=over
++
++=item B&lt;includes&gt; I&lt;files&gt;
++
++Uses space-separated list I&lt;files&gt; as a list of additional configuration files.
++
++=item B&lt;resolver&gt; I&lt;id&gt;
++
++Declare a maintainer resolver object with identity I&lt;id&gt;.
++
++=item B&lt;preferences&gt; I&lt;id&gt;
++
++Declare a maintainer preferences object with identity I&lt;id&gt;.
++
++=item B&lt;resultset&gt; I&lt;id&gt;
++
++Declare a resultset object with identity I&lt;id&gt;.
++
++=item B&lt;medias&gt; I&lt;ids&gt;
++
++Declares a list of media objects with identity taken in space-separated list
++I&lt;ids&gt;.
++
++=item B&lt;inputs&gt; I&lt;ids&gt;
++
++Declares a list of input plugin objects with identity taken in space-separated
++list I&lt;ids&gt;.
++
++=item B&lt;outputs&gt; I&lt;ids&gt;
++
++Declares a list of output plugin objects with identity taken in space-separated
++list I&lt;ids&gt;.
++
++=back
++
++Each object declared in configuration must be fully defined later, using a
++configuration section, starting with bracketed object identity, followed by at
++least a class directive, then any number of additional object-specific
++directives.
++
++Example:
++
++ objects = foo
++
++ [foo]
++ class = Foo::Bar
++ key1 = value1
++ key2 = value2
++
++=head1 SEE ALSO
++
++Youri::Config, for configuration file format.
++
++Each used plugin man page, for available options.
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++use strict;
++use warnings;
++
++use Youri::Config;
++use Youri::Utils;
++use Pod::Usage;
++use Net::Config qw/%NetConfig/;
++use DateTime;
++
++my $config = Youri::Config-&gt;new(
++ command_spec =&gt; [
++ 'config=s',
++ 'skip-plugin=s@',
++ 'skip-media=s@',
++ 'parallel!',
++ 'help|h!',
++ 'test|t!',
++ 'verbose|v!'
++ ],
++ file_spec =&gt; [
++ 'includes=s',
++ 'resolver=s',
++ 'preferences=s',
++ 'resultset=s',
++ 'medias=s',
++ 'inputs=s',
++ 'outputs=s'
++ ],
++ directories =&gt; [ '@sysconfdir@', &quot;$ENV{HOME}/.youri&quot; ],
++ file_name =&gt; 'check.conf',
++ caller =&gt; $0,
++);
++
++pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No mode specified, aborting\n&quot;
++) unless @ARGV;
++
++my $mode = $ARGV[0];
++
++# convenient global flags
++my $test = $config-&gt;get('test');
++my $verbose = $config-&gt;get('verbose');
++
++# libnet configuration
++my %netconfig = $config-&gt;get_section('netconfig');
++$NetConfig{$_} = $netconfig{$_} foreach keys %netconfig;
++
++# resultset creation
++my $resultset_id = $config-&gt;get('resultset');
++die &quot;No resultset defined&quot; unless $resultset_id;
++
++report(&quot;Creating resultset $resultset_id&quot;);
++my $resultset = create_instance(
++ 'Youri::Check::Resultset',
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ $config-&gt;get_section($resultset_id)
++);
++
++my $children;
++
++my %skip_plugins = map { $_ =&gt; 1 } @{$config-&gt;get('skip-plugin')};
++
++if ($mode eq 'input') {
++
++ # additional objects
++
++ my $resolver;
++ my $resolver_id = $config-&gt;get('resolver');
++ if ($resolver_id) {
++ report(&quot;Creating maintainer resolver $resolver_id&quot;);
++ eval {
++ $resolver = create_instance(
++ 'Youri::Check::Maintainer::Resolver',
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 1 ? $verbose - 2 : 0,
++ $config-&gt;get_section($resolver_id)
++ );
++ };
++ print STDERR &quot;Failed to create maintainer resolver $resolver_id: $@\n&quot; if $@;
++ }
++
++ my $preferences;
++ my $preferences_id = $config-&gt;get('preferences');
++ if ($preferences_id) {
++ report(&quot;Creating maintainer preferences $preferences_id&quot;);
++ eval {
++ $preferences = create_instance(
++ 'Youri::Check::Maintainer::Preferences',
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 1 ? $verbose - 2 : 0,
++ $config-&gt;get_section($preferences_id)
++ );
++ };
++ print STDERR &quot;Failed to create maintainer preferences $preferences_id: $@\n&quot; if $@;
++ }
++
++ my @medias;
++ my %skip_medias = map { $_ =&gt; 1 } @{$config-&gt;get('skip-media')};
++ foreach my $id (split(/\s+/, $config-&gt;get('medias'))) {
++ next if $skip_medias{$id};
++ report(&quot;Creating media $id&quot;);
++ eval {
++ push(
++ @medias,
++ create_instance(
++ 'Youri::Media',
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ $config-&gt;get_section($id)
++ )
++ );
++ };
++ print STDERR &quot;Failed to create media $id: $@\n&quot; if $@;
++ }
++
++ # prepare resultset
++ $resultset-&gt;reset();
++ $resultset-&gt;set_resolver($resolver);
++
++
++ foreach my $id (split(/\s+/, $config-&gt;get('inputs'))) {
++ next if $skip_plugins{$id};
++ report(&quot;Creating input $id&quot;);
++ my $input;
++ eval {
++ $input = create_instance(
++ 'Youri::Check::Input',
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ resolver =&gt; $resolver,
++ preferences =&gt; $preferences,
++ $config-&gt;get_section($id)
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create input $id: $@\n&quot;;
++ } else {
++ if ($config-&gt;get('parallel')) {
++ # fork
++ my $pid = fork;
++ die &quot;Can't fork: $!&quot; unless defined $pid;
++ if ($pid) {
++ # parent process
++ $children++;
++ next;
++ }
++ }
++ eval {
++ $input-&gt;prepare(@medias);
++ };
++ if ($@) {
++ print STDERR &quot;Failed to prepare input $id: $@\n&quot;;
++ } else {
++ # clone resultset in child process
++ $resultset = $config-&gt;get('parallel') ?
++ $resultset-&gt;clone() :
++ $resultset;
++
++ foreach my $media (@medias) {
++ next if $media-&gt;skip_input($id);
++ my $media_id = $media-&gt;get_id();
++ report(&quot;running input $id on media $media_id&quot;);
++ eval {
++ $input-&gt;run($media, $resultset);
++ };
++ if ($@) {
++ print STDERR &quot;Failed to run input $id on media $media_id: $@\n&quot;;
++ }
++ }
++ }
++ if ($config-&gt;get('parallel')) {
++ # child process
++ exit;
++ }
++ }
++ }
++
++} elsif ($mode eq 'output') {
++
++ foreach my $id (split(/\s+/, $config-&gt;get('outputs'))) {
++ next if $skip_plugins{$id};
++ report(&quot;Creating output $id&quot;);
++ my $output;
++ eval {
++ $output = create_instance(
++ 'Youri::Check::Output',
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ config =&gt; $config,
++ $config-&gt;get_section($id)
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create output $id: $@\n&quot;;
++ } else {
++ if ($config-&gt;get('parallel')) {
++ # fork
++ my $pid = fork;
++ die &quot;Can't fork: $!&quot; unless defined $pid;
++ if ($pid) {
++ # parent process
++ $children++;
++ next;
++ }
++ }
++
++ # clone resultset in child process
++ $resultset = $config-&gt;get('parallel') ?
++ $resultset-&gt;clone() :
++ $resultset;
++
++ report(&quot;running output $id&quot;);
++ eval {
++ $output-&gt;run($resultset);
++ };
++ if ($@) {
++ print STDERR &quot;Failed to run output $id: $@\n&quot;;
++ }
++
++ if ($config-&gt;get('parallel')) {
++ # child process
++ exit;
++ }
++ }
++ }
++} else {
++ die &quot;Invalid mode $mode&quot;;
++}
++
++# wait for all forked processus termination
++while ($children) {
++ wait;
++ $children--;
++}
++
++sub report {
++ my ($message) = @_;
++ print DateTime-&gt;now()-&gt;strftime('[%H:%M:%S] ')
++ if $verbose &gt; 1;
++ print &quot;$message\n&quot;
++ if $verbose &gt; 0;
++}
+
+
+Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-check.in
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: build_system/mdv-youri-submit/trunk/bin/youri-submit
+===================================================================
+--- build_system/mdv-youri-submit/trunk/bin/youri-submit (rev 0)
++++ build_system/mdv-youri-submit/trunk/bin/youri-submit 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,534 @@
++#!/usr/bin/perl
++# $Id: youri-submit 232579 2007-12-17 19:45:47Z blino $
++
++=head1 NAME
++
++youri-submit - package submission tool
++
++=head1 VERSION
++
++Version 2.0
++
++=head1 SYNOPSIS
++
++youri-submit [options] &lt;target&gt; &lt;files&gt;
++
++youri-submit --list &lt;category&gt; [target]
++
++youri-submit --help [category] [item]
++
++Options:
++
++ --config &lt;file&gt; use file &lt;file&gt; as config file
++ --skip-pre &lt;pre&gt; skip pre &lt;pre&gt;
++ --skip-check &lt;check&gt; skip check &lt;check&gt;
++ --skip-action &lt;action&gt; skip action &lt;action&gt;
++ --skip-post &lt;post&gt; skip post &lt;post&gt;
++ --skip-reject &lt;reject&gt; skip reject &lt;reject&gt;
++ --define &lt;key&gt;=&lt;value&gt; pass additional values
++ --clean delete package after success
++ --verbose verbose run
++ --test test run
++ --list &lt;category&gt; list items from given category
++ --help [category] display contextual help
++
++=head1 DESCRIPTION
++
++B&lt;youri-submit&gt; allows to submit packages to a repository.
++
++All packages given on command lines are passed to a list of check plugins,
++depending on given upload target. If none of them fails, all packages are
++passed to a list of action plugins, depending also on given upload target.
++
++=head1 OPTIONS
++
++=over
++
++=item B&lt;--config&gt; I&lt;file&gt;
++
++Use given file as configuration, instead of normal one.
++
++=item B&lt;--skip-pre&gt; I&lt;id&gt;
++
++Skip pre transaction plugin with given identity
++
++=item B&lt;--skip-check&gt; I&lt;id&gt;
++
++Skip check plugin with given identity.
++
++=item B&lt;--skip-action&gt; I&lt;id&gt;
++
++Skip action plugin with given identity.
++
++=item B&lt;--skip-post&gt; I&lt;id&gt;
++
++Skip post transaction plugin with given identity.
++
++=item B&lt;--skip-reject&gt; I&lt;id&gt;
++
++Skip reject action plugin with given identity.
++
++=item B&lt;--define&gt; &lt;key&gt;=&lt;value&gt;
++
++Define additional parameters, to be used by plugins.
++
++=item B&lt;--clean&gt;
++
++Delete submited packages upon successfull submission.
++
++=item B&lt;--verbose&gt;
++
++Produce more verbose output (can be used more than once)
++
++=item B&lt;--test&gt;
++
++Don't perform any modification.
++
++=item B&lt;--list&gt; I&lt;category&gt;
++
++List available items from given category and exits. Category must be either
++B&lt;targets&gt;, B&lt;actions&gt; or B&lt;checks&gt;. A target is needed for the two last ones.
++
++=item B&lt;--help&gt; I&lt;category&gt;
++
++Display help for given category and exits. Category must be either
++B&lt;repository&gt;, B&lt;action&gt; or B&lt;check&gt;. An item is needed for the two last ones.
++If no category given, display standard help.
++
++=back
++
++=head1 CONFIGURATION
++
++Configuration is read from the first file found among:
++
++=over
++
++=item * the one specified by B&lt;--config&gt; option on command-line
++
++=item * $HOME/.youri/submit.conf
++
++=item * /usr/local/etc/youri/submit.conf
++
++=back
++
++The configuration file should be a YAML-format files, with the following
++mandatory top-level directives:
++
++=over
++
++=item B&lt;repository&gt;
++
++The definition of repository plugin to be used.
++
++=item B&lt;targets&gt;
++
++The list of available submission targets, each one being composed from the
++following keys:
++
++=over
++
++=item B&lt;checks&gt;
++
++The list of check plugins to use for this target.
++
++=item B&lt;actions&gt;
++
++The list of action plugins to use for this target.
++
++=back
++
++=item B&lt;checks&gt;
++
++The list of check plugin definitions, indexed by their identity.
++
++=item B&lt;actions&gt;
++
++The list of action plugin definitions, indexed by their identity.
++
++=back
++
++=head1 SEE ALSO
++
++Youri::Config, for additional details about configuration file format.
++
++Each used plugin man page, for available options.
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++use strict;
++use warnings;
++
++use Youri::Config;
++use Youri::Utils;
++use Pod::Usage;
++
++my $config = Youri::Config-&gt;new(
++ args =&gt; {
++ 'skip-check' =&gt; '=s@',
++ 'skip-action' =&gt; '=s@',
++ 'define' =&gt; '=s%',
++ 'verbose' =&gt; '|v!',
++ 'clean' =&gt; '!',
++ 'test' =&gt; '|t!',
++ 'list' =&gt; '|l!',
++ 'config' =&gt; '=s',
++ 'skip-prei' =&gt; '=s@',
++ 'skip-post' =&gt; '=s@',
++ 'skip-reject' =&gt; '=s@',
++ },
++ directories =&gt; [ &quot;$ENV{HOME}/.youri&quot;, '/usr/local/etc/youri' ],
++ file =&gt; 'submit.conf',
++);
++
++if ($config-&gt;get_arg('list')) {
++ my $category = $ARGV[0];
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No category specified, aborting\n&quot;)
++ unless $category;
++ if ($category eq 'targets') {
++ print join(' ', keys %{$config-&gt;get_param('targets')});
++ } elsif ($category eq 'checks' || $category eq 'actions') {
++ my $target = $ARGV[1];
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No target specified, aborting\n&quot;)
++ unless $target;
++ if ($category eq 'checks') {
++ my $checks = $config-&gt;get_param('targets')-&gt;{$target}-&gt;{checks};
++ print join(' ', @{$checks}) if $checks;
++ } else {
++ my $actions = $config-&gt;get_param('targets')-&gt;{$target}-&gt;{actions};
++ print join(' ', @{$actions}) if $actions;
++ }
++ } else {
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;Invalid category $category, aborting\n&quot;)
++ }
++ print &quot;\n&quot;;
++ exit 0;
++}
++
++if ($config-&gt;get_arg('help')) {
++ my $category = $ARGV[0];
++ my ($item, $section);
++ if ($category eq 'repository') {
++ $section = $config-&gt;get_param('repository');
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No repository defined, aborting\n&quot;
++ ) unless $section;
++ } elsif ($category eq 'check' || $category eq 'action') {
++ $item = $ARGV[1];
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No item specified, aborting\n&quot;
++ ) unless $item;
++ if ($category eq 'check') {
++ $section = $config-&gt;get_param('checks')-&gt;{$item};
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No such check $item defined, aborting\n&quot;
++ ) unless $section;
++ } else {
++ $section = $config-&gt;get_param('actions')-&gt;{$item};
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No such action $item defined, aborting\n&quot;
++ ) unless $section;
++ }
++ } else {
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;Invalid category $category, aborting\n&quot;)
++ }
++ my $file = $section-&gt;{class} . '.pm';
++ $file =~ s/::/\//g;
++ pod2usage(
++ -verbose =&gt; 99,
++ -sections =&gt; 'NAME|DESCRIPTION',
++ -input =&gt; $file,
++ -pathlist =&gt; \@INC
++ );
++}
++
++
++pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No target specified, aborting\n&quot;)
++ unless @ARGV &gt; 0;
++pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No packages specified, aborting\n&quot;)
++ unless @ARGV &gt; 1 || $config-&gt;get_param('allow_omitting_packages');
++
++# convenient global flags
++my $test = $config-&gt;get_arg('test');
++my $verbose = $config-&gt;get_arg('verbose');
++
++# check target
++my $target = shift @ARGV;
++my $target_conf = $config-&gt;get_param('targets')-&gt;{$target};
++
++# create repository
++my $repository;
++my $repository_conf = $config-&gt;get_param('repository');
++die &quot;No repository declared&quot; unless $repository_conf;
++print &quot;Creating repository\n&quot; if $verbose;
++eval {
++ $repository = create_instance(
++ 'Youri::Repository',
++ $repository_conf,
++ {
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ targets =&gt; [ keys %{$config-&gt;get_param('targets')} ],
++ }
++ );
++};
++die &quot;Failed to create repository: $@\n&quot; if $@;
++
++# perfrom pre action
++my @errors;
++my $pre_packages = [];
++my $skip_pres = $config-&gt;get_arg('skip-pre');
++my %skip_pres = $skip_pres ? map { $_ =&gt; 1 } @{$skip_pres} : ();
++foreach my $id (@{$target_conf-&gt;{pres}}) {
++ next if $skip_pres{$id};
++ print &quot;Creating pre $id\n&quot; if $verbose;
++ my $pre;
++ my $pre_conf = $config-&gt;get_param('pres')-&gt;{$id};
++
++ if (!$pre_conf) {
++ print STDERR &quot;No such pre $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $pre = create_instance(
++ 'Youri::Submit::Pre',
++ $pre_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create pre $id: $@\n&quot;;
++ } else {
++ print &quot;running pre $id\n&quot; if $verbose;
++ my @err = $pre-&gt;run(
++ $pre_packages,
++ $repository,
++ $target,
++ $config-&gt;get_arg('define')
++ );
++ push(@errors, @err) if $err[0];
++ }
++}
++
++if (@errors) {
++ print &quot;Pre-submission errors, aborting:\n&quot;;
++ foreach my $error (@errors) {
++ print &quot; - $error\n&quot;;
++ }
++ exit(1)
++}
++
++# create packages group
++my $group_error;
++my @packages_group;
++foreach my $group ([ map { { section =&gt; &quot;&quot;, file =&gt; $_ } } @ARGV ], @$pre_packages) {
++ my @packages;
++ foreach my $opt (@$group) {
++ print &quot;Preparing upload for $opt-&gt;{file} in $opt-&gt;{section}\n&quot; if $verbose;
++ $repository-&gt;{packages}{$opt-&gt;{file}}{section} = $opt-&gt;{section};
++ push(
++ @packages,
++ create_instance(
++ 'Youri::Package',
++ {
++ class =&gt; $repository-&gt;get_package_class(),
++ },
++ {
++ file =&gt; $opt-&gt;{file},
++ %$opt
++ },
++ )
++ );
++ }
++ @packages or next;
++
++# check all packages pass all tests
++ my %errors;
++ my $skip_check = $config-&gt;get_arg('skip-check');
++ my %skip_check = $skip_check ? map { $_ =&gt; 1 } @{$skip_check} : ();
++ my @error;
++ foreach my $id (@{$target_conf-&gt;{checks}}) {
++ next if $skip_check{$id};
++ print &quot;Creating check $id\n&quot; if $verbose;
++ my $check;
++ my $check_conf = $config-&gt;get_param('checks')-&gt;{$id};
++
++ if (!$check_conf) {
++ print STDERR &quot;No such check $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $check = create_instance(
++ 'Youri::Submit::Check',
++ $check_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create check $id: $@\n&quot;;
++ } else {
++ foreach my $package (@packages) {
++ print &quot;running check $id on package $package\n&quot; if $verbose;
++ my @errors = $check-&gt;run(
++ $package,
++ $repository,
++ $target,
++ $config-&gt;get_arg('define')
++ );
++ push(@{$errors{$package}}, @errors) if $errors[0];
++ }
++ }
++ }
++ if (%errors) {
++ print &quot;Submission errors, aborting:\n&quot;;
++ foreach my $package (keys %errors) {
++ print &quot;- $package:\n&quot;;
++ foreach my $error (@{$errors{$package}}) {
++ print &quot; - $error\n&quot;;
++ }
++ }
++ # reject the packages
++ my $skip_rejects = $config-&gt;get_arg('skip-reject');
++ my %skip_rejects = $skip_rejects ? map { $_ =&gt; 1 } @{$skip_rejects} : ();
++ foreach my $id (@{$target_conf-&gt;{rejects}}) {
++ next if $skip_rejects{$id};
++ print &quot;Creating reject $id\n&quot; if $verbose;
++ my $reject;
++ my $reject_conf = $config-&gt;get_param('rejects')-&gt;{$id};
++
++ if (!$reject_conf) {
++ print STDERR &quot;No such reject $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $reject = create_instance(
++ 'Youri::Submit::Reject',
++ $reject_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create reject $id: $@\n&quot;;
++ } else {
++ foreach my $package (@packages) {
++ print &quot;running reject $id on package $package\n&quot; if $verbose;
++ eval {
++ $reject-&gt;run($package, \%errors, $repository, $target, $config-&gt;get_arg('define'));
++ };
++ if ($@) {
++ print STDERR &quot;Failed to run action $id on package $package: $@\n&quot;;
++ }
++ }
++ }
++ }
++ $group_error = 1;
++ next
++ }
++
++# proceed further
++ my $skip_action = $config-&gt;get_arg('skip-action');
++ my %skip_action = $skip_action ? map { $_ =&gt; 1 } @{$skip_action} : ();
++ foreach my $id (@{$target_conf-&gt;{actions}}) {
++ next if $skip_action{$id};
++ print &quot;Creating action $id\n&quot; if $verbose;
++ my $action;
++ my $action_conf = $config-&gt;get_param('actions')-&gt;{$id};
++
++ if (!$action_conf) {
++ print STDERR &quot;No such action $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $action = create_instance(
++ 'Youri::Submit::Action',
++ $action_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create action $id: $@\n&quot;;
++ } else {
++ foreach my $package (@packages) {
++ print &quot;running action $id on package $package\n&quot; if $verbose;
++ eval {
++ $action-&gt;run(
++ $package,
++ $repository,
++ $target,
++ $config-&gt;get_arg('define')
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to run action $id on package $package: $@\n&quot;;
++ }
++ }
++ }
++ }
++
++ if ($config-&gt;get_arg('clean')) {
++ foreach my $package (@packages) {
++ print &quot;cleaning file $package\n&quot; if $verbose;
++ unlink $package-&gt;as_file();
++ }
++ }
++}
++
++# perfrom post action
++my $skip_post = $config-&gt;get_arg('skip-post');
++my %skip_post = $skip_post ? map { $_ =&gt; 1 } @{$skip_post} : ();
++foreach my $id (@{$target_conf-&gt;{posts}}) {
++ next if $skip_post{$id};
++ print &quot;Creating post $id\n&quot; if $verbose;
++ my $post;
++ my $post_conf = $config-&gt;get_param('posts')-&gt;{$id};
++
++ if (!$post_conf) {
++ print STDERR &quot;No such post $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $post = create_instance(
++ 'Youri::Submit::Post',
++ $post_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create post $id: $@\n&quot;;
++ } else {
++ print &quot;running post $id\n&quot; if $verbose;
++ my @err = $post-&gt;run($repository, $target, $config-&gt;get_arg('define'));
++ print STDERR &quot;Error $id: @err\n&quot; if @err
++ }
++}
++
++exit(1) if $group_error;
+
+
+Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in
+===================================================================
+--- build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in (rev 0)
++++ build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,77 @@
++#!/usr/bin/perl
++
++=head1 NAME
++
++youri-submit-proxy - proxy wrapper over youri-submit-restricted
++
++=head1 VERSION
++
++Version 1.0
++
++=head1 SYNOPSIS
++
++youri-submit-proxy [options] &lt;target&gt; &lt;files&gt;
++
++=head1 DESCRIPTION
++
++youri-submit-proxy is a proxy wrapper over youri-submit-restricted, intended to
++be used in collaborative work to change uid before calling it through sudo.
++
++=head1 SEE ALSO
++
++youri-submit-restricted(1), youri-submit(1)
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++use strict;
++use warnings;
++use Fcntl ':mode';
++use File::Basename;
++
++my ($uid, $gid);
++if (-l $0) {
++ # this is a symlink, get uid and gid from it
++ ($uid, $gid) = (lstat($0))[4, 5];
++} else {
++ ($uid, $gid) = (stat($0))[4, 5];
++}
++my $user = getpwuid($uid) or die &quot;unknown uid $uid&quot;;
++my $prog = '@bindir@/youri-submit-restricted';
++
++my %dirs;
++my @options;
++foreach my $arg (@ARGV) {
++ if (-f $arg) {
++ # push parent dir in list
++ my $parent = dirname($arg);
++ $dirs{$parent}++;
++ }
++ push(@options, $arg);
++}
++
++foreach my $dir (keys %dirs) {
++ # save original perms and gid
++ my ($orig_mode, $orig_gid) = (stat($dir))[2,5];
++ $dirs{$dir} = {
++ mode =&gt; $orig_mode,
++ gid =&gt; $orig_gid
++ };
++ # ensure correct perms and gid
++ chown -1, $gid, $dir;
++ chmod $orig_mode|S_IRGRP|S_IWGRP, $dir;
++}
++
++# call wrapped program
++system('sudo', '-H', '-u', $user, $prog, @options);
++
++foreach my $dir (keys %dirs) {
++ # restore original perms and gid
++ chown -1, $dirs{$dir}-&gt;{gid}, $dir;
++ chmod $dirs{$dir}-&gt;{mode}, $dir;
++}
+
+
+Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit-proxy.in
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in
+===================================================================
+--- build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in (rev 0)
++++ build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,64 @@
++#!/usr/bin/perl -T
++
++=head1 NAME
++
++youri-submit-restricted - filtering wrapper over youri-submit
++
++=head1 VERSION
++
++Version 1.0
++
++=head1 SYNOPSIS
++
++youri-submit-restricted [options] &lt;target&gt; &lt;files&gt;
++
++=head1 DESCRIPTION
++
++youri-submit-restricted is just a filtering wrapper over youri-submit, intended
++to be used in collaborative work to sanitize environment and options before
++calling it.
++
++=head1 SEE ALSO
++
++youri-submit(1)
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++use strict;
++use warnings;
++
++my $prog = '@bindir@/youri-submit';
++my @prohibited_options = qw/--config --skip-check --skip-action/;
++my %prohibited_options = map { $_ =&gt; 1 } @prohibited_options;
++my @prohibited_envvars = qw/
++ ENV BASH_ENV IFS CDPATH
++ PERLLIB PERL5LIB PERL5OPT PERLIO
++ PERLIO_DEBUG PERL5DB PERL_ENCODING
++ PERL_HASH_SEED PERL_SIGNALS PERL_UNICODE
++/;
++
++my @options;
++while (my $arg = shift @ARGV) {
++ if ($prohibited_options{$arg}) {
++ # drop prohibited options
++ print STDERR &quot;prohibited option $arg, skipping\n&quot;;
++ shift @ARGV;
++ } else {
++ # untaint everything else
++ $arg =~ /(.*)/;
++ push(@options, $1);
++ }
++}
++
++# secure ENV
++$ENV{PATH} = &quot;/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin&quot;;
++delete $ENV{$_} foreach @prohibited_envvars;
++
++# call wrapped program
++system($prog, @options);
+
+
+Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit-restricted.in
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: build_system/mdv-youri-submit/trunk/bin/youri-submit.in
+===================================================================
+--- build_system/mdv-youri-submit/trunk/bin/youri-submit.in (rev 0)
++++ build_system/mdv-youri-submit/trunk/bin/youri-submit.in 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,534 @@
++#!/usr/bin/perl
++# $Id: youri-submit.in 232668 2007-12-21 14:37:04Z blino $
++
++=head1 NAME
++
++youri-submit - package submission tool
++
++=head1 VERSION
++
++Version 2.0
++
++=head1 SYNOPSIS
++
++youri-submit [options] &lt;target&gt; &lt;files&gt;
++
++youri-submit --list &lt;category&gt; [target]
++
++youri-submit --help [category] [item]
++
++Options:
++
++ --config &lt;file&gt; use file &lt;file&gt; as config file
++ --skip-pre &lt;pre&gt; skip pre &lt;pre&gt;
++ --skip-check &lt;check&gt; skip check &lt;check&gt;
++ --skip-action &lt;action&gt; skip action &lt;action&gt;
++ --skip-post &lt;post&gt; skip post &lt;post&gt;
++ --skip-reject &lt;reject&gt; skip reject &lt;reject&gt;
++ --define &lt;key&gt;=&lt;value&gt; pass additional values
++ --clean delete package after success
++ --verbose verbose run
++ --test test run
++ --list &lt;category&gt; list items from given category
++ --help [category] display contextual help
++
++=head1 DESCRIPTION
++
++B&lt;youri-submit&gt; allows to submit packages to a repository.
++
++All packages given on command lines are passed to a list of check plugins,
++depending on given upload target. If none of them fails, all packages are
++passed to a list of action plugins, depending also on given upload target.
++
++=head1 OPTIONS
++
++=over
++
++=item B&lt;--config&gt; I&lt;file&gt;
++
++Use given file as configuration, instead of normal one.
++
++=item B&lt;--skip-pre&gt; I&lt;id&gt;
++
++Skip pre transaction plugin with given identity
++
++=item B&lt;--skip-check&gt; I&lt;id&gt;
++
++Skip check plugin with given identity.
++
++=item B&lt;--skip-action&gt; I&lt;id&gt;
++
++Skip action plugin with given identity.
++
++=item B&lt;--skip-post&gt; I&lt;id&gt;
++
++Skip post transaction plugin with given identity.
++
++=item B&lt;--skip-reject&gt; I&lt;id&gt;
++
++Skip reject action plugin with given identity.
++
++=item B&lt;--define&gt; &lt;key&gt;=&lt;value&gt;
++
++Define additional parameters, to be used by plugins.
++
++=item B&lt;--clean&gt;
++
++Delete submited packages upon successfull submission.
++
++=item B&lt;--verbose&gt;
++
++Produce more verbose output (can be used more than once)
++
++=item B&lt;--test&gt;
++
++Don't perform any modification.
++
++=item B&lt;--list&gt; I&lt;category&gt;
++
++List available items from given category and exits. Category must be either
++B&lt;targets&gt;, B&lt;actions&gt; or B&lt;checks&gt;. A target is needed for the two last ones.
++
++=item B&lt;--help&gt; I&lt;category&gt;
++
++Display help for given category and exits. Category must be either
++B&lt;repository&gt;, B&lt;action&gt; or B&lt;check&gt;. An item is needed for the two last ones.
++If no category given, display standard help.
++
++=back
++
++=head1 CONFIGURATION
++
++Configuration is read from the first file found among:
++
++=over
++
++=item * the one specified by B&lt;--config&gt; option on command-line
++
++=item * $HOME/.youri/submit.conf
++
++=item * /usr/local/etc/youri/submit.conf
++
++=back
++
++The configuration file should be a YAML-format files, with the following
++mandatory top-level directives:
++
++=over
++
++=item B&lt;repository&gt;
++
++The definition of repository plugin to be used.
++
++=item B&lt;targets&gt;
++
++The list of available submission targets, each one being composed from the
++following keys:
++
++=over
++
++=item B&lt;checks&gt;
++
++The list of check plugins to use for this target.
++
++=item B&lt;actions&gt;
++
++The list of action plugins to use for this target.
++
++=back
++
++=item B&lt;checks&gt;
++
++The list of check plugin definitions, indexed by their identity.
++
++=item B&lt;actions&gt;
++
++The list of action plugin definitions, indexed by their identity.
++
++=back
++
++=head1 SEE ALSO
++
++Youri::Config, for additional details about configuration file format.
++
++Each used plugin man page, for available options.
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++use strict;
++use warnings;
++
++use Youri::Config;
++use Youri::Utils;
++use Pod::Usage;
++
++my $config = Youri::Config-&gt;new(
++ args =&gt; {
++ 'skip-check' =&gt; '=s@',
++ 'skip-action' =&gt; '=s@',
++ 'define' =&gt; '=s%',
++ 'verbose' =&gt; '|v!',
++ 'clean' =&gt; '!',
++ 'test' =&gt; '|t!',
++ 'list' =&gt; '|l!',
++ 'config' =&gt; '=s',
++ 'skip-prei' =&gt; '=s@',
++ 'skip-post' =&gt; '=s@',
++ 'skip-reject' =&gt; '=s@',
++ },
++ directories =&gt; [ &quot;$ENV{HOME}/.youri&quot;, '@sysconfdir@/youri' ],
++ file =&gt; 'submit.conf',
++);
++
++if ($config-&gt;get_arg('list')) {
++ my $category = $ARGV[0];
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No category specified, aborting\n&quot;)
++ unless $category;
++ if ($category eq 'targets') {
++ print join(' ', keys %{$config-&gt;get_param('targets')});
++ } elsif ($category eq 'checks' || $category eq 'actions') {
++ my $target = $ARGV[1];
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No target specified, aborting\n&quot;)
++ unless $target;
++ if ($category eq 'checks') {
++ my $checks = $config-&gt;get_param('targets')-&gt;{$target}-&gt;{checks};
++ print join(' ', @{$checks}) if $checks;
++ } else {
++ my $actions = $config-&gt;get_param('targets')-&gt;{$target}-&gt;{actions};
++ print join(' ', @{$actions}) if $actions;
++ }
++ } else {
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;Invalid category $category, aborting\n&quot;)
++ }
++ print &quot;\n&quot;;
++ exit 0;
++}
++
++if ($config-&gt;get_arg('help')) {
++ my $category = $ARGV[0];
++ my ($item, $section);
++ if ($category eq 'repository') {
++ $section = $config-&gt;get_param('repository');
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No repository defined, aborting\n&quot;
++ ) unless $section;
++ } elsif ($category eq 'check' || $category eq 'action') {
++ $item = $ARGV[1];
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No item specified, aborting\n&quot;
++ ) unless $item;
++ if ($category eq 'check') {
++ $section = $config-&gt;get_param('checks')-&gt;{$item};
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No such check $item defined, aborting\n&quot;
++ ) unless $section;
++ } else {
++ $section = $config-&gt;get_param('actions')-&gt;{$item};
++ pod2usage(
++ -verbose =&gt; 0,
++ -message =&gt; &quot;No such action $item defined, aborting\n&quot;
++ ) unless $section;
++ }
++ } else {
++ pod2usage(-verbose =&gt; 0, -message =&gt; &quot;Invalid category $category, aborting\n&quot;)
++ }
++ my $file = $section-&gt;{class} . '.pm';
++ $file =~ s/::/\//g;
++ pod2usage(
++ -verbose =&gt; 99,
++ -sections =&gt; 'NAME|DESCRIPTION',
++ -input =&gt; $file,
++ -pathlist =&gt; \@INC
++ );
++}
++
++
++pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No target specified, aborting\n&quot;)
++ unless @ARGV &gt; 0;
++pod2usage(-verbose =&gt; 0, -message =&gt; &quot;No packages specified, aborting\n&quot;)
++ unless @ARGV &gt; 1 || $config-&gt;get_param('allow_omitting_packages');
++
++# convenient global flags
++my $test = $config-&gt;get_arg('test');
++my $verbose = $config-&gt;get_arg('verbose');
++
++# check target
++my $target = shift @ARGV;
++my $target_conf = $config-&gt;get_param('targets')-&gt;{$target};
++
++# create repository
++my $repository;
++my $repository_conf = $config-&gt;get_param('repository');
++die &quot;No repository declared&quot; unless $repository_conf;
++print &quot;Creating repository\n&quot; if $verbose;
++eval {
++ $repository = create_instance(
++ 'Youri::Repository',
++ $repository_conf,
++ {
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ targets =&gt; [ keys %{$config-&gt;get_param('targets')} ],
++ }
++ );
++};
++die &quot;Failed to create repository: $@\n&quot; if $@;
++
++# perfrom pre action
++my @errors;
++my $pre_packages = [];
++my $skip_pres = $config-&gt;get_arg('skip-pre');
++my %skip_pres = $skip_pres ? map { $_ =&gt; 1 } @{$skip_pres} : ();
++foreach my $id (@{$target_conf-&gt;{pres}}) {
++ next if $skip_pres{$id};
++ print &quot;Creating pre $id\n&quot; if $verbose;
++ my $pre;
++ my $pre_conf = $config-&gt;get_param('pres')-&gt;{$id};
++
++ if (!$pre_conf) {
++ print STDERR &quot;No such pre $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $pre = create_instance(
++ 'Youri::Submit::Pre',
++ $pre_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create pre $id: $@\n&quot;;
++ } else {
++ print &quot;running pre $id\n&quot; if $verbose;
++ my @err = $pre-&gt;run(
++ $pre_packages,
++ $repository,
++ $target,
++ $config-&gt;get_arg('define')
++ );
++ push(@errors, @err) if $err[0];
++ }
++}
++
++if (@errors) {
++ print &quot;Pre-submission errors, aborting:\n&quot;;
++ foreach my $error (@errors) {
++ print &quot; - $error\n&quot;;
++ }
++ exit(1)
++}
++
++# create packages group
++my $group_error;
++my @packages_group;
++foreach my $group ([ map { { section =&gt; &quot;&quot;, file =&gt; $_ } } @ARGV ], @$pre_packages) {
++ my @packages;
++ foreach my $opt (@$group) {
++ print &quot;Preparing upload for $opt-&gt;{file} in $opt-&gt;{section}\n&quot; if $verbose;
++ $repository-&gt;{packages}{$opt-&gt;{file}}{section} = $opt-&gt;{section};
++ push(
++ @packages,
++ create_instance(
++ 'Youri::Package',
++ {
++ class =&gt; $repository-&gt;get_package_class(),
++ },
++ {
++ file =&gt; $opt-&gt;{file},
++ %$opt
++ },
++ )
++ );
++ }
++ @packages or next;
++
++# check all packages pass all tests
++ my %errors;
++ my $skip_check = $config-&gt;get_arg('skip-check');
++ my %skip_check = $skip_check ? map { $_ =&gt; 1 } @{$skip_check} : ();
++ my @error;
++ foreach my $id (@{$target_conf-&gt;{checks}}) {
++ next if $skip_check{$id};
++ print &quot;Creating check $id\n&quot; if $verbose;
++ my $check;
++ my $check_conf = $config-&gt;get_param('checks')-&gt;{$id};
++
++ if (!$check_conf) {
++ print STDERR &quot;No such check $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $check = create_instance(
++ 'Youri::Submit::Check',
++ $check_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create check $id: $@\n&quot;;
++ } else {
++ foreach my $package (@packages) {
++ print &quot;running check $id on package $package\n&quot; if $verbose;
++ my @errors = $check-&gt;run(
++ $package,
++ $repository,
++ $target,
++ $config-&gt;get_arg('define')
++ );
++ push(@{$errors{$package}}, @errors) if $errors[0];
++ }
++ }
++ }
++ if (%errors) {
++ print &quot;Submission errors, aborting:\n&quot;;
++ foreach my $package (keys %errors) {
++ print &quot;- $package:\n&quot;;
++ foreach my $error (@{$errors{$package}}) {
++ print &quot; - $error\n&quot;;
++ }
++ }
++ # reject the packages
++ my $skip_rejects = $config-&gt;get_arg('skip-reject');
++ my %skip_rejects = $skip_rejects ? map { $_ =&gt; 1 } @{$skip_rejects} : ();
++ foreach my $id (@{$target_conf-&gt;{rejects}}) {
++ next if $skip_rejects{$id};
++ print &quot;Creating reject $id\n&quot; if $verbose;
++ my $reject;
++ my $reject_conf = $config-&gt;get_param('rejects')-&gt;{$id};
++
++ if (!$reject_conf) {
++ print STDERR &quot;No such reject $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $reject = create_instance(
++ 'Youri::Submit::Reject',
++ $reject_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create reject $id: $@\n&quot;;
++ } else {
++ foreach my $package (@packages) {
++ print &quot;running reject $id on package $package\n&quot; if $verbose;
++ eval {
++ $reject-&gt;run($package, \%errors, $repository, $target, $config-&gt;get_arg('define'));
++ };
++ if ($@) {
++ print STDERR &quot;Failed to run action $id on package $package: $@\n&quot;;
++ }
++ }
++ }
++ }
++ $group_error = 1;
++ next
++ }
++
++# proceed further
++ my $skip_action = $config-&gt;get_arg('skip-action');
++ my %skip_action = $skip_action ? map { $_ =&gt; 1 } @{$skip_action} : ();
++ foreach my $id (@{$target_conf-&gt;{actions}}) {
++ next if $skip_action{$id};
++ print &quot;Creating action $id\n&quot; if $verbose;
++ my $action;
++ my $action_conf = $config-&gt;get_param('actions')-&gt;{$id};
++
++ if (!$action_conf) {
++ print STDERR &quot;No such action $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $action = create_instance(
++ 'Youri::Submit::Action',
++ $action_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create action $id: $@\n&quot;;
++ } else {
++ foreach my $package (@packages) {
++ print &quot;running action $id on package $package\n&quot; if $verbose;
++ eval {
++ $action-&gt;run(
++ $package,
++ $repository,
++ $target,
++ $config-&gt;get_arg('define')
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to run action $id on package $package: $@\n&quot;;
++ }
++ }
++ }
++ }
++
++ if ($config-&gt;get_arg('clean')) {
++ foreach my $package (@packages) {
++ print &quot;cleaning file $package\n&quot; if $verbose;
++ unlink $package-&gt;as_file();
++ }
++ }
++}
++
++# perfrom post action
++my $skip_post = $config-&gt;get_arg('skip-post');
++my %skip_post = $skip_post ? map { $_ =&gt; 1 } @{$skip_post} : ();
++foreach my $id (@{$target_conf-&gt;{posts}}) {
++ next if $skip_post{$id};
++ print &quot;Creating post $id\n&quot; if $verbose;
++ my $post;
++ my $post_conf = $config-&gt;get_param('posts')-&gt;{$id};
++
++ if (!$post_conf) {
++ print STDERR &quot;No such post $id, skipping\n&quot;;
++ next;
++ }
++ eval {
++ $post = create_instance(
++ 'Youri::Submit::Post',
++ $post_conf,
++ {
++ id =&gt; $id,
++ test =&gt; $test,
++ verbose =&gt; $verbose &gt; 0 ? $verbose - 1 : 0,
++ }
++ );
++ };
++ if ($@) {
++ print STDERR &quot;Failed to create post $id: $@\n&quot;;
++ } else {
++ print &quot;running post $id\n&quot; if $verbose;
++ my @err = $post-&gt;run($repository, $target, $config-&gt;get_arg('define'));
++ print STDERR &quot;Error $id: @err\n&quot; if @err
++ }
++}
++
++exit(1) if $group_error;
+
+
+Property changes on: build_system/mdv-youri-submit/trunk/bin/youri-submit.in
+___________________________________________________________________
+Added: svn:executable
+ + *
+
+Added: build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit
+===================================================================
+--- build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit (rev 0)
++++ build_system/mdv-youri-submit/trunk/etc/bash_completion.d/youri-submit 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,60 @@
++# youri-submit completion
++# $Id$
++
++_youri-submit()
++{
++
++ local cur prev config
++
++ COMPREPLY=()
++ cur=${COMP_WORDS[COMP_CWORD]}
++ prev=${COMP_WORDS[COMP_CWORD-1]}
++
++ case &quot;$prev&quot; in
++ --config)
++ _filedir
++ return 0
++ ;;
++ --list)
++ COMPREPLY=( $( compgen -W 'targets checks actions' -- $cur ) )
++ return 0
++ ;;
++ --help)
++ COMPREPLY=( $( compgen -W 'repository check action' -- $cur ) )
++ return 0
++ ;;
++ esac
++
++ if [[ &quot;$cur&quot; == -* ]]; then
++ COMPREPLY=( $( compgen -W '--define --clean -l --list -h --help -t \
++ --test -v --verbose' -- $cur ) )
++ # add dangereous option for main command
++ if [[ ${COMP_WORDS[0]} == youri-submit ]]; then
++ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} --config --skip-check \
++ --skip-action' -- $cur ) )
++ fi
++ else
++ _count_args
++ case $args in
++ 1)
++ _find_config
++ COMPREPLY=( $( compgen -W '$( youri-submit $config --list targets )' -- $cur ) )
++ ;;
++ *)
++ _filedir
++ ;;
++ esac
++ fi
++
++}
++complete -F _youri-submit youri-submit youri-submit-restricted youri-submit-proxy
++
++_find_config()
++{
++ for (( i=1; i &lt; COMP_CWORD; i++ )); do
++ if [[ &quot;${COMP_WORDS[i]}&quot; == --config ]]; then
++ config=&quot;--config ${COMP_WORDS[i+1]}&quot;
++ break
++ fi
++ done
++}
+
+Added: build_system/mdv-youri-submit/trunk/etc/submit.conf
+===================================================================
+--- build_system/mdv-youri-submit/trunk/etc/submit.conf (rev 0)
++++ build_system/mdv-youri-submit/trunk/etc/submit.conf 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,134 @@
++# youri-submit sample configuration file
++# $Id: submit.conf 1723 2006-10-17 13:53:27Z warly $
++
++# helper variables
++home: /home/user
++
++# repository definition
++repository:
++ class: Youri::Repository::PLF
++ options:
++ install_root: ${home}/ftp/mandriva
++ version_root: ${home}/cvs
++ archive_root: ${home}/backup/mandriva
++ noarch: i586
++
++# targets definitions
++targets:
++ cooker:
++ checks:
++ - tag
++ - recency
++ - history
++ actions:
++ - sign
++ - install
++ - link
++ - archive
++ - clean
++ - bugzilla
++ - cvs
++ - mail
++ - rss
++
++ 2006.0:
++ checks:
++ - type
++ - tag
++ - recency
++ - history
++ - precedence
++ actions:
++ - sign
++ - install
++ - link
++ - archive
++ - clean
++
++# checks definitions
++checks:
++ tag:
++ class: Youri::Submit::Check::Tag
++ options:
++ tags:
++ release: 'plf$'
++ packager: '&lt;\<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">w+ at zarb</A>\.org&gt;$'
++ distribution: '^Mandriva Linux$'
++ vendor: '^Penguin Liberation Front$'
++
++ recency:
++ class: Youri::Submit::Check::Recency
++
++ history:
++ class: Youri::Submit::Check::History
++
++ precedence:
++ class: Youri::Submit::Check::Precedence
++ options:
++ target: cooker
++
++ type:
++ class: Youri::Submit::Check::Type
++ type: binary
++
++# actions definitions
++actions:
++ sign:
++ class: Youri::Submit::Action::Sign
++ options:
++ name: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf at zarb.org</A>
++ path: ${home}/.gnupg
++ passphrase: s3kr3t
++
++ install:
++ class: Youri::Submit::Action::Install
++
++ link:
++ class: Youri::Submit::Action::Link
++
++ archive:
++ class: Youri::Submit::Action::Archive
++
++ clean:
++ class: Youri::Submit::Action::Clean
++
++ mail:
++ class: Youri::Submit::Action::Mail
++ options:
++ mta: /usr/sbin/sendmail
++ to: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf-announce at zarb.org</A>
++ reply_to: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf-discuss at zarb.org</A>
++ from: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf at zarb.org</A>
++ prefix: RPM
++ cc:
++ hot-base: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">david at dindinx.org</A> <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">bellamy at neverland.net</A>
++ dcgui: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">mathen at ketelhot.de</A>
++ dclib: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">mathen at ketelhot.de</A>
++ Video-DVDRip: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">dvdrip-users at exit1.org</A>
++ hackVideo-DVDRip: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">dvdrip-users at exit1.org</A>
++ goosnes: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">tak at bard.sytes.net</A>
++ avidemux: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">fixounet at free.fr</A>
++ vobcopy: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">robos at muon.de</A>
++ drip: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">drip-devel at lists.sourceforge.net</A>
++ libdscaler: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">vektor at dumbterm.net</A>
++ xawdecode: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">pingus77 at ifrance.com</A>
++
++ rss:
++ class: Youri::Submit::Action::RSS
++ options:
++ file: ${home}/www/changelog.rss
++ title: PLF packages updates
++ link: <A HREF="http://plf.zarb.org/">http://plf.zarb.org/</A>
++ description: ChangeLog for PLF packages
++
++ cvs:
++ class: Youri::Submit::Action::CVS
++
++ bugzilla:
++ class: Youri::Submit::Action::Bugzilla
++ options:
++ host: localhost
++ base: plf_bugs
++ user: plf
++ pass: s3kr3t
++ contact: <A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">plf at zarb.org</A>
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Archive.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,90 @@
++# $Id: Archive.pm 265457 2010-01-28 13:09:30Z pterjan $
++package Youri::Submit::Action::Archive;
++
++=head1 NAME
++
++Youri::Submit::Action::Archive - Old revisions archiving
++
++=head1 DESCRIPTION
++
++This action plugin ensures archiving of old package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ @_
++ );
++
++ $self-&gt;{_perms} = $options{perms};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ # FIXME: workaround for $self-&gt;{_verbose} not being initialized properly
++ $self-&gt;{_verbose} = 1;
++ # all this should be in Mandriva_upload.pm
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ my $main_section = $repository-&gt;_get_main_section($package, $target, $define);
++ print &quot;section $section main_section $main_section\n&quot; if $self-&gt;{_verbose};
++ my $arch = $package-&gt;get_arch();
++ $arch = $self-&gt;{_noarch} if $arch eq 'noarch';
++ my $path = $arch eq 'src' ? &quot;$target/SRPMS&quot; : &quot;$target/$arch/media&quot;;
++ $path = &quot;$repository-&gt;{_install_root}/$path&quot;;
++ $path =~ s,/+,/,g;
++ foreach my $replaced_package (
++ $repository-&gt;get_replaced_packages($package, $target, $define)
++ ) {
++ my $file = $replaced_package-&gt;get_file();
++
++ # trap for debugging bug 34999
++ if ($file =~ /\/[\d.]+\/(main\/updates|.*\/release)/) {
++ my $bugmsg = &quot;BUG#34999 WARNING: trying to remove from a release: $file\n&quot;;
++ open(BUG34999LOG, '&gt;&gt;', &quot;/home/mandrake/bug34999.log&quot;);
++ print $bugmsg;
++ print BUG34999LOG localtime().&quot;: &quot;.$bugmsg;
++ close BUG34999LOG;
++
++ next;
++ }
++
++ my ($rep_section, $rep_main_section) = $file =~ m,$path/(([^/]+)/.*)/[^/]+.rpm,;
++ # We do accept duplicate version for other submedia of the same main media section
++ print &quot;(path '$path') file '$file' section '$rep_section' main_section '$rep_main_section'\n&quot; if $self-&gt;{_verbose};
++ next if $rep_main_section eq $main_section &amp;&amp; $rep_section ne $section;
++ my $dest = $repository-&gt;get_archive_dir($package, $target, $define);
++
++ print &quot;archiving file $file to $dest\n&quot; if $self-&gt;{_verbose};
++
++ unless ($self-&gt;{_test}) {
++ # create destination dir if needed
++ system(&quot;install -d -m &quot; . ($self-&gt;{_perms} + 111) . &quot; $dest&quot;)
++ unless -d $dest;
++
++ # install file to new location
++ system(&quot;install -m $self-&gt;{_perms} $file $dest&quot;);
++
++ print &quot;deleting file $file\n&quot; if $self-&gt;{_verbose};
++ unlink $file unless $self-&gt;{_test};
++ }
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Bugzilla.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,81 @@
++# $Id: Bugzilla.pm 1700 2006-10-16 12:57:42Z warly $
++package Youri::Submit::Action::Bugzilla;
++
++=head1 NAME
++
++Youri::Submit::Action::Bugzilla - Bugzilla synchronisation
++
++=head1 DESCRIPTION
++
++This action plugin ensures synchronisation with Bugzilla.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use Youri::Bugzilla;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ host =&gt; '',
++ base =&gt; '',
++ user =&gt; '',
++ pass =&gt; '',
++ contact =&gt; '',
++ @_
++ );
++
++ $self-&gt;{_bugzilla} = Youri::Bugzilla-&gt;new(
++ $options{host},
++ $options{base},
++ $options{user},
++ $options{pass}
++ );
++ $self-&gt;{_contact} = $options{contact};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ return unless $package-&gt;is_source();
++
++ my $name = $package-&gt;get_name();
++ my $version = $package-&gt;get_version();
++ my $summary = $package-&gt;get_summary();
++ my $packager = $package-&gt;get_packager();
++ $packager =~ s/.*&lt;(.*)&gt;/$1/;
++
++ if ($self-&gt;{_bugzilla}-&gt;has_package($name)) {
++ my %versions =
++ map { $_ =&gt; 1 }
++ $self-&gt;{_bugzilla}-&gt;get_versions($name);
++ unless ($versions{$version}) {
++ print &quot;adding version $version to bugzilla\n&quot; if $self-&gt;{_verbose};
++ $self-&gt;{_bugzilla}-&gt;add_version($name, $version)
++ unless $self-&gt;{_test};
++ }
++ } else {
++ print &quot;adding package $name to bugzilla\n&quot; if $self-&gt;{_verbose};
++ $self-&gt;{_bugzilla}-&gt;add_package(
++ $name,
++ $summary,
++ $version,
++ $packager,
++ $self-&gt;{_contact}
++ ) unless $self-&gt;{_test};
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/CVS.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,135 @@
++# $Id: CVS.pm 224115 2007-07-02 09:17:15Z pixel $
++package Youri::Submit::Action::CVS;
++
++=head1 NAME
++
++Youri::Submit::Action::CVS - CVS versionning
++
++=head1 DESCRIPTION
++
++This action plugin ensures CVS versionning of package sources.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use Cwd;
++use File::Temp qw/tempdir/;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ exclude =&gt; '\.(tar(\.(gz|bz2))?|zip)$',
++ perms =&gt; 644,
++ @_
++ );
++
++ $self-&gt;{_exclude} = $options{exclude};
++ $self-&gt;{_perms} = $options{perms};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ return unless $package-&gt;is_source();
++
++ my $name = $package-&gt;get_name();
++ my $version = $package-&gt;get_version();
++ my $release = $package-&gt;get_release();
++
++ my $root = $repository-&gt;get_version_root();
++ my $path = $repository-&gt;get_version_path($package, $target, $define);
++
++ # remember original directory
++ my $original_dir = cwd();
++
++ # get a safe temporary directory
++ my $dir = tempdir( CLEANUP =&gt; 1 );
++ chdir $dir;
++
++ # first checkout base directory only
++ system(&quot;cvs -Q -d $root co -l $path&quot;);
++
++ # try to checkout package directory
++ my $dest = $path . '/' . $name;
++ system(&quot;cvs -Q -d $root co $dest&quot;);
++
++ # create directory if previous import failed
++ unless (-d $dest) {
++ print &quot;adding directory $dest\n&quot; if $self-&gt;{_verbose};
++ system(&quot;install -d -m &quot; . ($self-&gt;{_perms} + 111) . &quot; $dest&quot;);
++ system(&quot;cvs -Q -d $root add $dest&quot;);
++ }
++
++ chdir $dest;
++
++ # remove all files
++ unlink grep { -f } glob '*';
++
++ # extract all rpm files locally
++ $package-&gt;extract();
++
++ # remove excluded files
++ if ($self-&gt;{_exclude}) {
++ unlink grep { -f &amp;&amp; /$self-&gt;{_exclude}/ } glob '*';
++ }
++
++ # uncompress all compressed files
++ system(&quot;bunzip2 *.bz2 2&gt;/dev/null&quot;);
++ system(&quot;gunzip *.gz 2&gt;/dev/null&quot;);
++
++ my (@to_remove, @to_add, @to_add_binary);
++ foreach my $line (`cvs -nq update`) {
++ if ($line =~ /^\? (\S+)/) {
++ if (-B $1) {
++ push(@to_add_binary, $1);
++ } else {
++ push(@to_add, $1);
++ }
++ }
++ if ($line =~ /^U (\S+)/) {
++ push(@to_remove, $1);
++ }
++ }
++ if (@to_remove) {
++ my $to_remove = join(' ', @to_remove);
++ print &quot;removing file(s) $to_remove\n&quot; if $self-&gt;{_verbose};
++ system(&quot;cvs -Q remove $to_remove&quot;);
++ }
++ if (@to_add) {
++ my $to_add = join(' ', @to_add);
++ print &quot;adding text file(s) $to_add\n&quot; if $self-&gt;{_verbose};
++ system(&quot;cvs -Q add $to_add&quot;);
++ }
++ if (@to_add_binary) {
++ my $to_add_binary = join(' ', @to_add_binary);
++ print &quot;adding binary file(s) $to_add_binary\n&quot; if $self-&gt;{_verbose};
++ system(&quot;cvs -Q add -kb $to_add_binary&quot;);
++ }
++
++ print &quot;committing current directory\n&quot; if $self-&gt;{_verbose};
++ system(&quot;cvs -Q commit -m $version-$release&quot;) unless $self-&gt;{_test};
++
++ # tag new release
++ my $tag = &quot;r$version-$release&quot;;
++ $tag =~ s/\./_/g;
++ print &quot;tagging current directory as $tag\n&quot; if $self-&gt;{_verbose};
++ system(&quot;cvs -Q tag $tag&quot;) unless $self-&gt;{_test};
++
++ # get back to original directory
++ chdir $original_dir;
++
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Clean.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,40 @@
++# $Id: Clean.pm 4742 2007-01-30 09:49:58Z pixel $
++package Youri::Submit::Action::Clean;
++
++=head1 NAME
++
++Youri::Submit::Action::Clean - Old revisions cleanup
++
++=head1 DESCRIPTION
++
++This action plugin ensures cleanup of old package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ foreach my $replaced_package (
++ $repository-&gt;get_replaced_packages($package, $target, $define)
++ ) {
++ my $file = $replaced_package-&gt;as_file();
++ print &quot;deleting file $file\n&quot; if $self-&gt;{_verbose};
++ unlink $file unless $self-&gt;{_test};
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/DkmsModuleInfo.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,111 @@
++# $Id$
++package Youri::Submit::Action::DkmsModuleInfo;
++
++=head1 NAME
++
++Youri::Submit::Action::DkmsModuleInfo - extract and commit info from dkms package.
++
++=head1 DESCRIPTION
++
++This action plugin extract modalias and description from dkms packages and commit them
++on a SVN module.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++use File::Temp qw/tempdir/;
++use File::Basename;
++use SVN::Client;
++
++#- inlineed from MDK::Common::Various
++sub chomp_ { my @l = @_; chomp @l; wantarray() ? @l : $l[0] }
++
++sub _init {
++ my ($self, %options) = @_;
++
++ croak &quot;undefined svn module&quot; unless $options{svn_module};
++
++ foreach my $var ('svn_module') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my ($dkms_name) = $package-&gt;get_canonical_name =~ /^dkms-(.*)$/ or return;
++ my $package_name = $package-&gt;get_name;
++ my ($kver) = $package_name =~ /^$dkms_name-kernel-(.*)$/ or return;
++
++ my @files = map { $_-&gt;[0] } $package-&gt;get_files;
++ my @module_files = grep { m!^(/lib/modules/|/var/lib/dkms-binary/).*\.ko(\.gz)?$! } @files
++ or return;
++
++ print &quot;Submit::Action::DkmsModuleInfo: proceeding with $package_name\n&quot; if $self-&gt;{_verbose};
++
++ my $tempdir = tempdir(CLEANUP =&gt; 1);
++ my $file = $package-&gt;as_file;
++ my $cmd = &quot;rpm2cpio $file | (cd $tempdir ; cpio --quiet -id)&quot;;
++ print &quot;Submit::Action::DkmsModuleInfo: doing $cmd\n&quot; if $self-&gt;{_verbose};
++ if (system($cmd) != 0) {
++ print &quot;Submit::Action::DkmsModuleInfo: failed!\n&quot; if $self-&gt;{_verbose};
++ return;
++ }
++
++ my @fields = qw(description alias);
++
++ my (%modules);
++ foreach my $file (@module_files) {
++ print &quot;Submit::Action::DkmsModuleInfo: extracting $file\n&quot; if $self-&gt;{_verbose};
++ my $module = $file;
++ $module =~ s!.*/!!;
++ $module =~ s!\.ko(\.gz)$!!;
++ $modules{$module}{$_} = [ chomp_(`/sbin/modinfo -F $_ $tempdir$file`) ]
++ foreach @fields;
++ }
++
++ eval {
++ my $svn = SVN::Client-&gt;new();
++ my $dir = $tempdir . '/' . basename($self-&gt;{_svn_module});
++ my $revision = $svn-&gt;checkout($self-&gt;{_svn_module}, $dir, 'HEAD', 0);
++ my $vdir = $dir . '/' . $kver;
++ $svn-&gt;update($vdir, 'HEAD', 0);
++ -d $vdir or $svn-&gt;mkdir($vdir);
++ foreach my $module (keys %modules) {
++ print &quot;Submit::Action::DkmsModuleInfo: adding module $module\n&quot; if $self-&gt;{_verbose};
++ foreach my $field (@fields) {
++ my $file = &quot;$vdir/$module.$field&quot;;
++ $svn-&gt;update($file, 'HEAD', 0);
++ my $exists = -f $file;
++ open(my $fh, &quot;&gt;&quot;, $file);
++ print $fh map { &quot;$_\n&quot; } @{$modules{$module}{$field}};
++ $svn-&gt;add($file, 1) if !$exists;
++ }
++ }
++
++ $svn-&gt;log_msg(sub { $_[0] = \&quot;add dkms info for $dkms_name with kernel $kver&quot; });
++ $svn-&gt;commit($vdir, 0);
++ };
++ if (my $error = $@) {
++ print &quot;Submit::Action::DkmsModuleInfo: commit to svn failed ($error)!\n&quot; if $self-&gt;{_verbose};
++ return;
++ }
++
++ 1;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Install.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,74 @@
++# $Id: Install.pm 229772 2007-09-26 11:21:07Z blino $
++package Youri::Submit::Action::Install;
++
++=head1 NAME
++
++Youri::Submit::Action::Install - Package installation
++
++=head1 DESCRIPTION
++
++This action plugin ensures installation of new package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ @_
++ );
++
++ $self-&gt;{_perms} = $options{perms};
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $file = $package-&gt;as_file();
++ my $rpm = $package-&gt;get_file_name();
++ my $dest = $repository-&gt;get_install_dir($package, $target, $define);
++
++ # FIXME remove prefix this should be done by a function
++ $rpm =~ s/^\d{14}\.\w*\.\w+\.\d+_//;
++ $rpm =~ s/^\@\d+://;
++ print &quot;installing file $file to $dest/$rpm\n&quot; if $self-&gt;{_verbose};
++
++ unless ($self-&gt;{_test}) {
++ # create destination dir if needed
++ if (! -d $dest) {
++ my $status =
++ system(&quot;install -d -m &quot; . ($self-&gt;{_perms} + 111) . &quot; $dest&quot;);
++ croak &quot;Unable to create directory $dest: $?&quot; if $status;
++ }
++
++ # install file to new location
++ my $status =
++ system(&quot;install -m $self-&gt;{_perms} $file $dest/$rpm&quot;);
++ croak &quot;Unable to install file $file to $dest/$rpm: $?&quot; if $status;
++
++ my $arch = $package-&gt;get_arch();
++ $repository-&gt;set_arch_changed($target, $arch);
++ $repository-&gt;set_install_dir_changed($dest);
++ }
++ $package-&gt;{_file} = &quot;$dest/$rpm&quot;;
++ print &quot;deleting file $file\n&quot; if $self-&gt;{_verbose};
++ unlink $file unless $self-&gt;{_test};
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Link.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,80 @@
++# $Id: Link.pm 233641 2008-01-31 16:35:55Z pixel $
++package Youri::Submit::Action::Link;
++
++=head1 NAME
++
++Youri::Submit::Action::Link - Noarch packages linking
++
++=head1 DESCRIPTION
++
++This action plugin ensures linking of noarch packages between arch-specific
++directories.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use Cwd;
++use File::Spec;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ symbolic =&gt; 0, # use symbolic linking
++ @_
++ );
++
++ $self-&gt;{_symbolic} = $options{symbolic};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ # only needed for noarch packages
++ return unless $package-&gt;get_arch() eq 'noarch';
++
++ my $default_dir = $repository-&gt;get_install_dir($package, $target, $define);
++ my $file = $package-&gt;get_file_name();
++
++ # FIXME remove prefix this should be done by a function
++ $file =~ s/^\d{14}\.\w*\.\w+\.\d+_//;
++ $file =~ s/^\@\d+://;
++
++ foreach my $arch ($repository-&gt;get_extra_arches()) {
++ # compute installation target, forcing arch
++ my $other_dir = $repository-&gt;get_install_dir(
++ $package,
++ $target,
++ $define,
++ { arch =&gt; $arch }
++ );
++
++ if (! $self-&gt;{_test}) {
++ my $current_dir = cwd();
++ chdir $other_dir;
++ my $default_file = File::Spec-&gt;abs2rel($default_dir) . '/' . $file;
++ if ($self-&gt;{_symbolic}) {
++ symlink $default_file, $file;
++ } else {
++ link $default_file, $file;
++ }
++ chdir $current_dir;
++ print &quot;set_install_dir_changed($other_dir) for updated $file\n&quot;;
++ $repository-&gt;set_install_dir_changed($other_dir);
++ $repository-&gt;set_arch_changed($target, $arch);
++ }
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Mail.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,131 @@
++# $Id: Mail.pm 223952 2007-06-23 13:54:13Z pixel $
++package Youri::Submit::Action::Mail;
++
++=head1 NAME
++
++Youri::Submit::Action::Mail - Mail notification
++
++=head1 DESCRIPTION
++
++This action plugin ensures mail notification of new package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use MIME::Entity;
++use Encode qw/from_to/;
++use Carp;
++use Youri::Package;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ mta =&gt; '/usr/sbin/sendmail',
++ to =&gt; '',
++ from =&gt; '',
++ cc =&gt; '',
++ prefix =&gt; '',
++ encoding =&gt; 'quoted-printable',
++ charset =&gt; 'iso-8859-1',
++ @_
++ );
++
++ croak &quot;undefined mail MTA&quot; unless $options{mta};
++ croak &quot;invalid mail MTA $options{mta}&quot; unless -x $options{mta};
++ croak &quot;undefined to&quot; unless $options{to};
++ if ($options{cc}) {
++ croak &quot;cc should be an hashref&quot; unless ref $options{cc} eq 'HASH';
++ }
++ croak &quot;invalid charset $options{charset}&quot;
++ unless Encode::resolve_alias($options{charset});
++
++ $self-&gt;{_mta} = $options{mta};
++ $self-&gt;{_to} = $options{to};
++ $self-&gt;{_from} = $options{from};
++ $self-&gt;{_cc} = $options{cc};
++ $self-&gt;{_prefix} = $options{prefix};
++ $self-&gt;{_encoding} = $options{encoding};
++ $self-&gt;{_charset} = $options{charset};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ return unless $package-&gt;is_source();
++
++ my $from = $package-&gt;get_packager();
++
++ # force from adress if defined
++ $from =~ s/&lt;.*&gt;/&lt;$self-&gt;{_from}&gt;/ if $self-&gt;{_from};
++
++ my $subject = $self-&gt;get_subject($package, $repository, $target, $define);
++ my $content = $self-&gt;get_content($package, $repository, $target, $define);
++
++ # ensure proper codeset conversion
++ # for informations coming from package
++ my $charset = $repository-&gt;get_package_charset();
++ from_to($content, $charset, $self-&gt;{_charset});
++ from_to($subject, $charset, $self-&gt;{_charset});
++
++ my $mail = MIME::Entity-&gt;build(
++ Type =&gt; 'text/plain',
++ Charset =&gt; $self-&gt;{_charset},
++ Encoding =&gt; $self-&gt;{_encoding},
++ From =&gt; $from,
++ To =&gt; $self-&gt;{_to},
++ Subject =&gt; $subject,
++ Data =&gt; $content,
++ );
++
++ if ($self-&gt;{_cc}) {
++ my $cc = $self-&gt;{_cc}-&gt;{$package-&gt;get_name()};
++ $mail-&gt;head()-&gt;add('cc', $cc) if $cc;
++ }
++
++ if ($self-&gt;{_test}) {
++ $mail-&gt;print(\*STDOUT);
++ } else {
++ open(MAIL, &quot;| $self-&gt;{_mta} -t -oi -oem&quot;) or die &quot;Can't open MTA program: $!&quot;;
++ $mail-&gt;print(\*MAIL);
++ close MAIL;
++ }
++
++}
++
++sub get_subject {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ return
++ ($self-&gt;{_prefix} ? '[' . $self-&gt;{_prefix} . '] ' : '' ) .
++ &quot;$target &quot; . ($section ? &quot;$section &quot; : '' ) .
++ $package-&gt;as_formated_string('%{name}-%{version}-%{release}');
++}
++
++sub get_content {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $information = $package-&gt;get_information();
++ my $last_change = $package-&gt;get_last_change();
++
++ return
++ $information . &quot;\n&quot; .
++ $last_change-&gt;[Youri::Package::CHANGE_AUTHOR] . &quot;:\n&quot; .
++ $last_change-&gt;[Youri::Package::CHANGE_TEXT];
++}
++
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Markrelease.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,56 @@
++# $Id: Markrelease.pm 4743 2007-01-30 09:58:30Z pixel $
++package Youri::Submit::Action::Markrelease;
++
++=head1 NAME
++
++Youri::Submit::Action::Markrelease - calls markrelease
++
++=head1 DESCRIPTION
++
++This action plugin calls markrelease
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ @_
++ );
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ $package-&gt;is_source or return 1;
++ my $file = $package-&gt;get_file();
++ my $srpm_name = $package-&gt;get_canonical_name;
++
++ if ($repository-&gt;package_in_svn($srpm_name)) {
++ my $svn = $repository-&gt;get_svn_url();
++ my ($rev) = $file =~ /.*\/.*?\@(\d+):/;
++ print &quot;Run repsys markrelease -f $file -r $rev $svn/$srpm_name\n&quot;;
++ # FIXME repsys ask for a username and password
++ # FIXME we should use the key in /var/home/mandrake so that /home/mandrake does not
++ # need to be mounted
++ system('repsys', 'markrelease', '-f', $file, '-r', $rev, &quot;$svn/$srpm_name&quot;);
++ }
++ 1
++}
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/RSS.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,102 @@
++# $Id: RSS.pm 1700 2006-10-16 12:57:42Z warly $
++package Youri::Submit::Action::RSS;
++
++=head1 NAME
++
++Youri::Submit::Action::RSS - RSS notification
++
++=head1 DESCRIPTION
++
++This action plugin ensures RSS notification of new package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use XML::RSS;
++use Encode qw/from_to/;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ file =&gt; '',
++ title =&gt; '',
++ link =&gt; '',
++ description =&gt; '',
++ charset =&gt; 'iso-8859-1',
++ max_items =&gt; 10,
++ @_
++ );
++
++ croak &quot;undefined rss file&quot; unless $options{file};
++ croak &quot;invalid charset $options{charset}&quot;
++ unless Encode::resolve_alias($options{charset});
++
++ $self-&gt;{_file} = $options{file};
++ $self-&gt;{_title} = $options{title};
++ $self-&gt;{_link} = $options{link};
++ $self-&gt;{_description} = $options{description};
++ $self-&gt;{_charset} = $options{charset};
++ $self-&gt;{_max_items} = $options{max_items};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ return unless $package-&gt;is_source();
++
++ my $subject = $package-&gt;as_formated_string('%{name}-%{version}-%{release}');
++ my $content = $package-&gt;get_information();
++
++ $content =~ s/$/&lt;br\/&gt;/mg;
++
++ # ensure proper codeset conversion
++ # for informations coming from package
++ my $charset = $repository-&gt;get_package_charset();
++ from_to($content, $charset, $self-&gt;{_charset});
++ from_to($subject, $charset, $self-&gt;{_charset});
++
++ my $rss = XML::RSS-&gt;new(
++ encoding =&gt; $self-&gt;{_charset},
++ encode_output =&gt; 1
++ );
++
++ my $file = $self-&gt;{_file};
++ if (-e $file) {
++ $rss-&gt;parsefile($file);
++ splice(@{$rss-&gt;{items}}, $self-&gt;{_max_items})
++ if @{$rss-&gt;{items}} &gt;= $self-&gt;{_max_items};
++ } else {
++ $rss-&gt;channel(
++ title =&gt; $self-&gt;{_title},
++ link =&gt; $self-&gt;{_link},
++ description =&gt; $self-&gt;{_description},
++ language =&gt; 'en'
++ );
++ }
++
++ $rss-&gt;add_item(
++ title =&gt; $subject,
++ description =&gt; $content,
++ mode =&gt; 'insert'
++ );
++
++ if ($self-&gt;{_test}) {
++ print $rss-&gt;as_string();
++ } else {
++ $rss-&gt;save($file);
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Rpminfo.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,69 @@
++# $Id: Rpminfo.pm 4742 2007-01-30 09:49:58Z pixel $
++package Youri::Submit::Action::Rpminfo;
++
++=head1 NAME
++
++Youri::Submit::Action::RpmInfo - Creates .info files
++
++=head1 DESCRIPTION
++
++This action plugin ensures the creation of .info files
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use File::Basename;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ uphost =&gt; '',
++ user =&gt; '',
++ ssh_key =&gt; '',
++ verbose =&gt; '',
++ @_
++ );
++ croak &quot;undefined upload host&quot; unless $options{uphost};
++ croak &quot;undefined ssh key&quot; unless $options{ssh_key};
++
++ foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $file = $package-&gt;get_file();
++ my $dest = $repository-&gt;get_upload_dir($package, $target, $define);
++
++ print &quot;Caching rpm information $file on $dest\n&quot; if $self-&gt;{_verbose};
++ my $base = basename ($file);
++ $dest =~ s/\/[0-9]{14}\./\/*./;
++
++ my $cmd = &quot;ssh -i $self-&gt;{_ssh_key} $self-&gt;{_user}\@$self-&gt;{_uphost} \&quot;srpm=`echo /$dest$base`; rpm -q --qf '\%{name}\n\%{epoch}\n\%{version}-\%{release}\n\%{summary}\n' -p \\\$srpm &gt; \\\$srpm.info\&quot;&quot;;
++ print &quot;Submit::Action::RpmInfo: doing $cmd\n&quot; if $self-&gt;{_verbose};
++ if (!$self-&gt;{_test}) {
++ if (!system($cmd)) {
++ print &quot;Submit::Action::RpmInfo: rpminfo succeeded!\n&quot;;
++ return 1
++ }
++ print &quot;Submit::Action::RpmInfo: rpminfo failed!\n&quot;;
++ }
++}
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Send.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,77 @@
++# $Id: Send.pm 4744 2007-01-30 09:59:07Z pixel $
++package Youri::Submit::Action::Send;
++
++=head1 NAME
++
++Youri::Submit::Action::Send - upload package
++
++=head1 DESCRIPTION
++
++This action plugin uploads the package on uphost
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use File::Basename;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ uphost =&gt; '',
++ user =&gt; '',
++ ssh_key =&gt; '',
++ verbose =&gt; '',
++ keep_svn_release =&gt; '',
++ @_
++ );
++ croak &quot;undefined upload host&quot; unless $options{uphost};
++ croak &quot;undefined ssh key&quot; unless $options{ssh_key};
++
++ foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose', 'keep_svn_release') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $file = $package-&gt;get_file();
++ my $dest = $repository-&gt;get_upload_dir($package, $target, $define);
++
++ print &quot;Sending file $file to $dest\n&quot; if $self-&gt;{_verbose};
++ my $base;
++ if ($self-&gt;{_keep_svn_release}) {
++ $base = basename($file)
++ } else {
++ ($base) = $file =~ /.*\/(?:@\d+:)?([^\/]*)/
++ }
++
++ my $cmd = &quot;scp -i $self-&gt;{_ssh_key} $file $self-&gt;{_user}\@$self-&gt;{_uphost}:/$dest$base.new&quot;;
++ my $cmd2 = &quot;ssh -i $self-&gt;{_ssh_key} $self-&gt;{_user}\@$self-&gt;{_uphost} \&quot;mv /$dest$base.new /$dest$base\&quot;&quot;;
++ print &quot;Submit::Action::Send: doing $cmd\n$cmd2\n&quot; if 1 || $self-&gt;{_verbose};
++ if (!$self-&gt;{_test}) {
++ if (!system($cmd)) {
++ if (!system($cmd2)) {
++ print &quot;Submit::Action::Send: upload succeeded!\n&quot;;
++ return 1
++ }
++ }
++ print &quot;Submit::Action::Send: upload failed!\n&quot;;
++ }
++}
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sendcache.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,81 @@
++# $Id: Sendcache.pm 232350 2007-12-07 18:26:17Z spuk $
++package Youri::Submit::Action::Sendcache;
++
++=head1 NAME
++
++Youri::Submit::Action::Sendcache - upload package to cache
++
++=head1 DESCRIPTION
++
++This action plugin uploads the package on uphost
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use File::Basename;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ uphost =&gt; '',
++ user =&gt; '',
++ ssh_key =&gt; '',
++ verbose =&gt; '',
++ root =&gt; '',
++ debug_pkgs =&gt; 0,
++ @_
++ );
++ croak &quot;undefined upload host&quot; unless $options{uphost};
++ croak &quot;undefined ssh key&quot; unless $options{ssh_key};
++
++ foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose', 'root', 'debug_pkgs') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ # only cache debug packages if option debug_pkgs is true
++ return if ($package-&gt;is_debug() &amp;&amp; !$self-&gt;{_debug_pkgs});
++
++ my $file = $package-&gt;get_file();
++ my $dest = $repository-&gt;get_upload_dir($package, $target, $define);
++ $dest =~ s!$repository-&gt;{_upload_root}/$repository-&gt;{_queue}!$self-&gt;{_root}!;
++
++ print &quot;Sending file $file to $dest\n&quot; if $self-&gt;{_verbose};
++ my $destfile = &quot;$dest&quot;.basename($file);
++ $destfile =~ s,/[^/_]+_([^/]+)$,/$1,;
++ $destfile =~ s,/@\d+:,/,;
++ my $destfilehidden = $destfile;
++ $destfilehidden =~ s,/([^/]+)$,/.$1,;
++
++ my $cmd = &quot;scp -i $self-&gt;{_ssh_key} $file $self-&gt;{_user}\@$self-&gt;{_uphost}:/$destfilehidden&quot;;
++ my $cmd2 = &quot;ssh -i $self-&gt;{_ssh_key} $self-&gt;{_user}\@$self-&gt;{_uphost} \&quot;mv /$destfilehidden /$destfile\&quot;&quot;;
++ print &quot;Submit::Action::Send: doing $cmd\n$cmd2\n&quot; if 1 || $self-&gt;{_verbose};
++ if (!$self-&gt;{_test}) {
++ if (!system($cmd)) {
++ if (!system($cmd2)) {
++ print &quot;Submit::Action::Sendcache: upload succeeded!\n&quot;;
++ return 1
++ }
++ }
++ print &quot;Submit::Action::Sendcache: upload failed!\n&quot;;
++ }
++}
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Sign.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,56 @@
++# $Id: Sign.pm 1700 2006-10-16 12:57:42Z warly $
++package Youri::Submit::Action::Sign;
++
++=head1 NAME
++
++Youri::Submit::Action::Sign - GPG signature
++
++=head1 DESCRIPTION
++
++This action plugin ensures GPG signature of packages.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ name =&gt; '',
++ path =&gt; $ENV{HOME} . '/.gnupg',
++ passphrase =&gt; '',
++ @_
++ );
++
++ croak &quot;undefined name&quot; unless $options{name};
++ croak &quot;undefined path&quot; unless $options{path};
++ croak &quot;invalid path $options{path}&quot; unless -d $options{path};
++
++ $self-&gt;{_name} = $options{name};
++ $self-&gt;{_path} = $options{path};
++ $self-&gt;{_passphrase} = $options{passphrase};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ $package-&gt;sign(
++ $self-&gt;{_name},
++ $self-&gt;{_path},
++ $self-&gt;{_passphrase}
++ ) unless $self-&gt;{_test};
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/Unpack.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,82 @@
++# $Id: Unpack.pm 115370 2007-01-30 09:59:07Z pixel $
++package Youri::Submit::Action::Unpack;
++
++=head1 NAME
++
++Youri::Submit::Action::Unpack - unpack package files
++
++=head1 DESCRIPTION
++
++This action plugin unpack package files somewhere.
++When unpack_inside_distribution_root is set, dest_directory is relative to the distribution root.
++When the package is a noarch, the wanted files are unpacked in distribution root of each archs.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use File::Temp qw/tempdir/;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my ($self, %options) = @_;
++
++ croak &quot;undefined package name&quot; unless $options{name};
++ croak &quot;undefined source sub directory&quot; unless $options{source_subdir};
++ croak &quot;undefined destination directory&quot; unless $options{dest_directory};
++
++ foreach my $var ('name', 'dest_directory', 'source_subdir', 'grep_files', 'unpack_inside_distribution_root') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ $package-&gt;get_name eq $self-&gt;{_name} or return;
++
++ my @dests = $self-&gt;{_unpack_inside_distribution_root} ?
++ (map { &quot;$_/$self-&gt;{_dest_directory}&quot; } $repository-&gt;get_distribution_roots($package, $target))
++ : $self-&gt;{_dest_directory};
++ my $file = $package-&gt;as_file;
++ print &quot;Unpacking rpm $file$self-&gt;{_source_subdir} to @dests\n&quot; if $self-&gt;{_verbose};
++
++ my $tempdir = tempdir(CLEANUP =&gt; 1);
++
++ my $cmd = &quot;rpm2cpio $file | (cd $tempdir ; cpio -id)&quot;;
++ print &quot;Submit::Action::Unpack: doing $cmd\n&quot; if $self-&gt;{_verbose};
++ if (!$self-&gt;{_test} &amp;&amp; system($cmd) != 0) {
++ print &quot;Submit::Action::Unpack: failed!\n&quot; if $self-&gt;{_verbose};
++ return;
++ }
++
++ foreach my $dest (@dests) {
++ my $find_grep = $self-&gt;{_grep_files} ? &quot;find | grep '$self-&gt;{_grep_files}'&quot; : 'find';
++ my $cmd = &quot;cd $tempdir/$self-&gt;{_source_subdir}; $find_grep | cpio -pdu $dest&quot;;
++ print &quot;Submit::Action::Unpack: doing $cmd\n&quot; if $self-&gt;{_verbose};
++ if (!$self-&gt;{_test}) {
++ my @l = glob(&quot;$tempdir/$self-&gt;{_source_subdir}&quot;);
++ if (@l == 1 &amp;&amp; -d $l[0]) {
++ if (system($cmd) != 0) {
++ print &quot;Submit::Action::Unpack: failed!\n&quot; if $self-&gt;{_verbose};
++ }
++ } else {
++ print &quot;Submit::Action::Unpack: directory $self-&gt;{_source_subdir} doesn't exist in package $self-&gt;{_name}\n&quot;;
++ }
++ }
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action/UpdateMdvDb.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,62 @@
++# $Id$
++package Youri::Submit::Action::UpdateMdvDb;
++
++=head1 NAME
++
++Youri::Submit::Action::UpdateMdvDb - Mandriva maintainers database updater
++
++=head1 DESCRIPTION
++
++This action plugin calls an external script to update last commit info, as
++well as add new packages, in the package maintainers database at
++&lt;<A HREF="http://maint.mandriva.com/">http://maint.mandriva.com/</A>&gt;.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Action/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ @_
++ );
++
++ # path for mdvdb-updaterep script
++ $self-&gt;{_mdvdb_updaterep} = $options{mdvdb_updaterep};
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ # only SRPMs matter
++ return unless $package-&gt;is_source();
++
++ unless ($self-&gt;{_test}) {
++ my $pkg_name = $package-&gt;get_name();
++ my $pkg_media = $repository-&gt;_get_main_section($package, $target, $define);
++ $package-&gt;get_packager() =~ m/(\w[-_.\w]+\@[-_.\w]+)\W/;
++ my $pkg_commiter = $1;
++
++ if (system($self-&gt;{_mdvdb_updaterep}, &quot;update&quot;, $pkg_name, $pkg_media, $pkg_commiter, &quot;youri&quot;)) {
++ print &quot;ERROR: &quot;.$self-&gt;{_mdvdb_updaterep}.&quot; failed for '$pkg_name', '$pkg_media', '$pkg_commiter'.\n&quot;;
++ } else {
++ print &quot;Updated package maintainers DB for '$pkg_name', '$pkg_media', '$pkg_commiter'.\n&quot; if $self-&gt;{_verbose};
++ }
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2007, Mandriva
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Action.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,27 @@
++# $Id: Base.pm 631 2006-01-26 22:22:23Z guillomovitch $
++package Youri::Submit::Action;
++
++=head1 NAME
++
++Youri::Submit::Action - Abstract action plugin
++
++=head1 DESCRIPTION
++
++This abstract class defines action plugin interface.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Plugin/;
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/ACL.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,71 @@
++# $Id: ACL.pm 4817 2007-02-09 19:39:05Z blino $
++package Youri::Submit::Check::ACL;
++
++=head1 NAME
++
++Youri::Submit::Check::Tag - Incorrect tag values check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages with incorrect tag values, based on regular
++expressions.
++
++=cut
++
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++my $acl;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ acl_file =&gt; '',
++ @_
++ );
++ $acl = get_acl($options{acl_file});
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $file = $package-&gt;get_full_name();
++ my $arch = $package-&gt;get_arch();
++ my $srpm = $package-&gt;get_canonical_name;
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ my $user = $define-&gt;{user};
++ foreach my $t (keys %$acl) {
++ next if $target !~ /$t/;
++ foreach my $acl (@{$acl-&gt;{$t}}) {
++ my ($a, $media, $r, $users) = @$acl;
++ next if $arch !~ $a || $srpm !~ $r || $section !~ $media;
++ if ($user =~ /$users/) {
++ return
++ } else {
++ return &quot;$user is not authorized to upload packages belonging to $srpm in section $section (authorized persons: &quot; . join(', ', split '\|', $users) . &quot;)&quot;;
++ }
++ }
++ }
++ return
++}
++
++sub get_acl {
++ my ($file) = @_;
++ my %acl;
++ open my $f, $file;
++ while (&lt;$f&gt;) {
++ my ($dis, $arch, $media, $regexp, $users) = split ' ';
++ push @{$acl{$dis}}, [ $arch , $media, $regexp, $users ]
++ }
++ \%acl
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/History.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,61 @@
++# $Id: History.pm 1707 2006-10-16 16:26:42Z warly $
++package Youri::Submit::Check::History;
++
++=head1 NAME
++
++Youri::Submit::Check::History - Non-linear history check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages whose history does not include last
++available revision one.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use Youri::Package;
++use base qw/Youri::Submit::Check/;
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ my $last_revision =
++ $repository-&gt;get_last_older_revision($package, $target, $define);
++
++ if ($last_revision) {
++ # skip the test if last revision has been produced from another source package, as it occurs during package split/merges
++ return
++ if $last_revision-&gt;get_canonical_name()
++ ne $package-&gt;get_canonical_name();
++
++ my ($last_revision_number) = $last_revision-&gt;get_last_change()-&gt;[Youri::Package::CHANGE_AUTHOR] =~ /(\S+)\s*$/;
++ my %entries =
++ map { $_ =&gt; 1 }
++ map { /(\S+)\s*$/ }
++ map { $_-&gt;[Youri::Package::CHANGE_AUTHOR] }
++ $package-&gt;get_changes();
++ unless ($entries{$last_revision_number}) {
++ push(
++ @errors,
++ &quot;Last changelog entry $last_revision_number from last revision &quot; . $last_revision-&gt;get_full_name() . &quot; missing from current changelog&quot;
++ );
++ }
++ }
++
++ return @errors;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Host.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,63 @@
++# $Id: Host.pm 230850 2007-10-04 20:07:25Z blino $
++package Youri::Submit::Check::Host;
++
++=head1 NAME
++
++Youri::Submit::Check::Tag - Incorrect tag values check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages with incorrect tag values, based on regular
++expressions.
++
++=cut
++
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++my $host;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ host_file =&gt; '',
++ @_
++ );
++ $host = get_host($options{host_file})
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $file = $package-&gt;get_file;
++ my $arch = $package-&gt;get_arch;
++ my $buildhost = $package-&gt;as_formated_string('%{buildhost}');
++ foreach my $h (keys %$host) {
++ next if $buildhost !~ $h;
++ if ($arch =~ $host-&gt;{$h}) {
++ return
++ }
++ }
++ &quot;Packages build on host $buildhost are not authorized for arch $arch&quot;;
++}
++
++sub get_host {
++ my ($file) = @_;
++ my %host;
++ open my $f, $file;
++ while (&lt;$f&gt;) {
++ my ($host, $arch) = split ' ';
++ $host{$host} = $arch
++ }
++ \%host
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Precedence.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,58 @@
++# $Id: Precedence.pm 1707 2006-10-16 16:26:42Z warly $
++package Youri::Submit::Check::Precedence;
++
++=head1 NAME
++
++Youri::Submit::Check::Precedence - Release check against another check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages whose an older revision already exists for
++another upload target.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ _target =&gt; undef, # mandatory targets
++ @_
++ );
++
++ die &quot;undefined target&quot; unless $options{target};
++
++ $self-&gt;{_target} = $options{target};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ my @older_revisions =
++ $repository-&gt;get_older_revisions($package, $self-&gt;{_target}, $define);
++ if (@older_revisions) {
++ push(
++ @errors,
++ &quot;Older revisions still exists for $self-&gt;{_target}: &quot; . join(', ', @older_revisions)
++ );
++ }
++
++ return @errors;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Queue_recency.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,40 @@
++# $Id: Queue_recency.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Check::Queue_recency;
++
++=head1 NAME
++
++Youri::Submit::Check::Recency - Release check against current target
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages whose a current or newer revision already
++exists for current upload target.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @newer_revisions =
++ $repository-&gt;get_upload_newer_revisions($package, $target, $define);
++ if (@newer_revisions) {
++ return &quot;Newer revisions already exists for $target in upload queue: &quot; . join(', ', @newer_revisions);
++ }
++ return
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Recency.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,64 @@
++# $Id: Recency.pm 224793 2007-07-08 02:44:48Z spuk $
++package Youri::Submit::Check::Recency;
++
++=head1 NAME
++
++Youri::Submit::Check::Recency - Release check against current target
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages whose a current or newer revision already
++exists for current upload target.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ my @revisions = $repository-&gt;get_revisions($package, $target, $define, undef, sub { return $_[0]-&gt;compare($package) &gt;= 0 });
++ if (@revisions) {
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ push(
++ @errors,
++ &quot;Current or newer revision(s) already exists in $section for $target: &quot; .
++ join(', ', @revisions)
++ );
++ }
++
++ my $defined_section = $define-&gt;{section};
++
++ # if the user provided a section, check also in the default section
++ if ($defined_section) {
++ $define-&gt;{section} = undef;
++ my @default_revisions = $repository-&gt;get_revisions($package, $target, $define, undef, sub { return $_[0]-&gt;compare($package) &gt;= 0 });
++ if (@default_revisions) {
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ push(
++ @errors,
++ &quot;Current or newer revision(s) already exists in $section for $target: &quot; .
++ join(', ', @default_revisions)
++ );
++ }
++ $define-&gt;{section} = $defined_section;
++ }
++
++ return @errors;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Rpmlint.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,90 @@
++# $Id: Rpmlint.pm 234384 2008-02-12 09:42:32Z blino $
++package Youri::Submit::Check::Rpmlint;
++
++=head1 NAME
++
++Youri::Submit::Check::Rpmlint - Rpmlint-based check
++
++=head1 DESCRIPTION
++
++This check plugin wraps rpmlint, and reject packages triggering results
++declared as fatal.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++=head2 new(%args)
++
++Creates and returns a new Youri::Submit::Check::Rpmlint object.
++
++Specific parameters:
++
++=over
++
++=item results $results
++
++List of rpmlint result id considered as fatal.
++
++=item path $path
++
++Path to the rpmlint executable (default: /usr/bin/rpmlint)
++
++=item config $config
++
++Specific rpmlint configuration.
++
++=back
++
++=cut
++
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ results =&gt; undef,
++ path =&gt; '/usr/bin/rpmlint',
++ config =&gt; '',
++ @_
++ );
++
++ croak &quot;no results to check&quot; unless $options{results};
++ croak &quot;fatal should be an arrayref&quot; unless ref $options{results} eq 'ARRAY';
++
++ $self-&gt;{_config} = $options{config};
++ $self-&gt;{_path} = $options{path};
++ $self-&gt;{_pattern} = '^(?:' . join('|', @{$options{results}}) . ')$';
++}
++
++sub run {
++ my ($self, $package, $_repository, $_target, $_define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ my $command = &quot;$self-&gt;{_path} -f $self-&gt;{_config} &quot; . $package-&gt;as_file;
++ open(my $RPMLINT, &quot;$command |&quot;) or die &quot;Can't run $command: $!&quot;;
++ while (my $line = &lt;$RPMLINT&gt;) {
++ $line =~ /^[EW]: \S+ (\S+)(.*)$/ # old rpmlint format
++ || $line =~ /^\S+: [EW]: (\S+)(.*)$/ or next; # new rpmlint format
++ my ($id, $value) = ($1, $2);
++ if ($id =~ /$self-&gt;{_pattern}/o) {
++ push(@errors, &quot;$id$value&quot;);
++ }
++ }
++
++ return @errors;
++}
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under
++the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/SVN.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,79 @@
++# $Id: SVN.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Check::SVN;
++
++=head1 NAME
++
++Youri::Submit::Check::Tag - Incorrect tag values check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages with incorrect tag values, based on regular
++expressions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ svn =&gt; '',
++ @_
++ );
++ $self-&gt;{_svn} = $options{svn};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ if ($section =~ /\/(testing|backport)$/) {
++ # FIXME, right now ignore packages in SVN for testing and backports
++ # we need to find a clean way to handle them
++ return
++ }
++
++ $package-&gt;is_source or return;
++ my $file = $package-&gt;get_file_name;
++ my $srpm_name = $package-&gt;get_canonical_name;
++ if ($repository-&gt;package_in_svn($srpm_name)) {
++ if ($file !~ /(^|\/|$define-&gt;{prefix}_)@\d+:\Q$srpm_name/) {
++ return &quot;package $srpm_name is in the SVN, the uploaded SRPM must look like @&lt;svn rev&gt;:$srpm_name-&lt;version&gt;-&lt;release&gt;.src.rpm (created with getsrpm-mdk $srpm_name)&quot;;
++ } else {
++ print &quot;Package $file is correct\n&quot;;
++ }
++ }
++ return
++}
++
++sub simple_prompt {
++ my $cred = shift;
++ my $realm = shift;
++ my $default_username = shift;
++ my $may_save = shift;
++ my $pool = shift;
++
++ print &quot;Enter authentication info for realm: $realm\n&quot;;
++ print &quot;Username: &quot;;
++ my $username = &lt;&gt;;
++ chomp($username);
++ $cred-&gt;username($username);
++ print &quot;Password: &quot;;
++ my $password = &lt;&gt;;
++ chomp($password);
++ $cred-&gt;password($password);
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Section.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,58 @@
++# $Id: Precedence.pm 1707 2006-10-16 16:26:42Z warly $
++package Youri::Submit::Check::Section;
++
++=head1 NAME
++
++Youri::Submit::Check::Section - Check if package was submitted to the right section
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages which were submitted to a section
++different than the one where an older version already exists.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ my $submitted_main_section = $repository-&gt;_get_main_section($package, $target, $define);
++
++ # undefine section, so that Repository::_get_section() of Mandriva_upload.pm
++ # finds the section from existing packages
++ my $defined_section = $define-&gt;{section};
++ undef $define-&gt;{section};
++
++ my $old_main_section = $repository-&gt;_get_main_section($package, $target, $define);
++ my @older_revisions = $repository-&gt;get_older_revisions($package, $target, $define);
++
++ # restore defined section
++ $define-&gt;{section} = $defined_section;
++
++ if (@older_revisions &amp;&amp; $submitted_main_section ne $old_main_section) {
++ push(
++ @errors,
++ &quot;Section should be $old_main_section, not $submitted_main_section.&quot;
++ );
++ }
++
++
++ return @errors;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2007, Mandriva
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Source.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,45 @@
++# $Id: Source.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Check::Source;
++
++=head1 NAME
++
++Youri::Submit::Check::Tag - Incorrect tag values check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages with incorrect tag values, based on regular
++expressions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ @_
++ );
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $file = $package-&gt;as_file();
++ if (!$package-&gt;is_source()) {
++ return &quot;Package $file is not a source rpm&quot;;
++ }
++ return
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Tag.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,61 @@
++# $Id: Tag.pm 1707 2006-10-16 16:26:42Z warly $
++package Youri::Submit::Check::Tag;
++
++=head1 NAME
++
++Youri::Submit::Check::Tag - Incorrect tag values check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages with incorrect tag values, based on regular
++expressions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ tags =&gt; undef, # expected tag values
++ @_
++ );
++
++ croak &quot;no tags to check&quot; unless $options{tags};
++ croak &quot;tag should be an hashref&quot; unless ref $options{tags} eq 'HASH';
++
++ $self-&gt;{_tags} = $options{tags};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ foreach my $tag (keys %{$self-&gt;{_tags}}) {
++ my $value = $package-&gt;get_tag($tag);
++ if ($value !~ /$self-&gt;{_tags}-&gt;{$tag}/) {
++ push(
++ @errors,
++ &quot;invalid value $value for tag $tag&quot;
++ );
++ }
++ }
++
++ return @errors;
++
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Type.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,54 @@
++# $Id: Type.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Check::Type;
++
++=head1 NAME
++
++Youri::Submit::Check::Type - Type check
++
++=head1 DESCRIPTION
++
++This check plugin rejects packages with incorrect type.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Check/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ type =&gt; undef, # expected type
++ @_
++ );
++
++ croak &quot;no type to check&quot; unless $options{type};
++ croak &quot;invalid type value&quot; unless $options{type} =~ /^(?:source|binary)$/;
++
++ $self-&gt;{_type} = $options{type};
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my @errors;
++
++ my $type = $package-&gt;get_type();
++ if ($type ne $self-&gt;{_type}) {
++ push(@errors, &quot;invalid type $type&quot;);
++ }
++
++ return @errors;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check/Version.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,102 @@
++# $Id: Version.pm 267050 2010-03-23 17:36:49Z nvigier $
++package Youri::Submit::Check::Version;
++
++=head1 NAME
++
++Youri::Submit::Check::Version - Check if older version already exist in cooker (used in freeze period)
++
++=head1 DESCRIPTION
++
++This check plugin rejects new version of packages if they are not mentioned as authorized
++in the configuration file or in a non frozen section.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use URPM;
++use base qw/Youri::Submit::Check/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ @_
++ );
++
++ foreach my $target (keys %options) {
++ $self-&gt;{$target} = $options{$target}
++ }
++}
++
++sub run {
++ my ($self, $package, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $opt = $self-&gt;{$target};
++ return if $opt-&gt;{mode} eq 'normal';
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++ my $name = $package-&gt;get_canonical_name;
++ return if $name =~ /$opt-&gt;{authorized_packages}/;
++ my $arch = $repository-&gt;get_arch($package, $target, $define);
++ return if $arch =~ /$opt-&gt;{authorized_arches}/;
++ if ($opt-&gt;{mode} eq 'version_freeze') {
++ return if $section =~ /$opt-&gt;{authorized_sections}/;
++ my $user = $define-&gt;{user};
++ return if $user =~ /^($opt-&gt;{authorized_users})$/;
++ my ($package_version) = $package =~ /-([^-]+)-[^-]+\.src$/;
++ $define-&gt;{arch} = 'src';
++ my @revisions = $repository-&gt;get_revisions($package, $target, $define, undef,
++ sub {
++ my ($version) = $_[0] =~ /-([^-]+)-[^-]+\.src$/;
++ URPM::ranges_overlap(&quot;== $version&quot;, &quot;&lt; $package_version&quot;)
++ }
++ );
++ $define-&gt;{arch} = '';
++ if (@revisions) {
++ return &quot;FREEZE, package @revisions of different versions exist in $target\n&quot;;
++ }
++ }
++ # FIXME: The following code is not working and must be reviewed.
++ elsif ($opt-&gt;{mode} eq 'freeze') {
++ my $user = $define-&gt;{user};
++ return if (defined($opt-&gt;{authorized_users}) &amp;&amp; $user =~ /^($opt-&gt;{authorized_users})$/);
++ # XXX: So freeze mode really only check for this exceptions?
++ if ($section !~ /$opt-&gt;{authorized_sections}/) {
++ return &quot;FREEZE: repository $target section $section is frozen, you can still submit your packages in testing\nTo do so use your.devel --define section=&lt;section&gt; $target &lt;package 1&gt; &lt;package 2&gt; ... &lt;package n&gt;&quot;;
++ }
++ } else {
++ # FIXME: Calls to get_source_package seems invalid nowadays.
++ # This results on $source having a null content.
++ my $source = $package-&gt;get_source_package;
++ my ($package_version) = $source =~ /-([^-]+)-[^-]+\.src\.rpm$/;
++ $define-&gt;{arch} = 'src';
++ # FIXME: get_revisions now expects the filter as the 5th element, and not the 4th.
++ my @revisions = $repository-&gt;get_revisions($package, $target, $define,
++ sub {
++ # FIXME: Calls to get_source_package seems invalid nowadays.
++ # This results on $source_package having a null content.
++ my $source_package = $_[0]-&gt;get_source_package;
++ my ($version) = $source_package =~ /-([^-]+)-[^-]+\.src\.rpm$/;
++ print STDERR &quot;Found version $version\n&quot;;
++ URPM::ranges_overlap(&quot;== $version&quot;, &quot;&lt; $package_version&quot;)
++ }
++ );
++ $define-&gt;{arch} = '';
++ if (@revisions) {
++ return &quot;FREEZE, package @revisions of different versions exist in $target\n&quot;;
++ }
++ }
++ return
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2006, YOURI project
++Copyright (C) 2006, Mandriva
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
++
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Check.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,27 @@
++# $Id: Base.pm 631 2006-01-26 22:22:23Z guillomovitch $
++package Youri::Submit::Check;
++
++=head1 NAME
++
++Youri::Submit::Check - Abstract check plugin
++
++=head1 DESCRIPTION
++
++This abstract class defines check plugin interface.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Plugin/;
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Plugin.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,93 @@
++# $Id: Plugin.pm 4746 2007-01-30 10:01:14Z pixel $
++package Youri::Submit::Plugin;
++
++=head1 NAME
++
++Youri::Submit::Plugin - Abstract youri-submit plugin
++
++=head1 DESCRIPTION
++
++This abstract class defines youri-submit plugin interface.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++
++=head1 CLASS METHODS
++
++=head2 new(%args)
++
++Creates and returns a new Youri::Submit::Plugin object.
++
++No generic parameters (subclasses may define additional ones).
++
++Warning: do not call directly, call subclass constructor instead.
++
++=cut
++
++sub new {
++ my $class = shift;
++ croak &quot;Abstract class&quot; if $class eq __PACKAGE__;
++
++ my %options = (
++ id =&gt; '', # object id
++ test =&gt; 0, # test mode
++ verbose =&gt; 0, # verbose mode
++ @_
++ );
++
++ my $self = bless {
++ _id =&gt; $options{id},
++ _test =&gt; $options{test},
++ _verbose =&gt; $options{verbose},
++ }, $class;
++
++ $self-&gt;_init(%options);
++
++ return $self;
++}
++
++sub _init {
++ # do nothing
++}
++
++=head1 INSTANCE METHODS
++
++=head2 get_id()
++
++Returns plugin identity.
++
++=cut
++
++sub get_id {
++ my ($self) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ return $self-&gt;{_id};
++}
++
++=head2 run($package, $repository, $target, $define)
++
++Execute action on given L&lt;Youri::Package&gt; object.
++
++=head1 SUBCLASSING
++
++The following methods have to be implemented:
++
++=over
++
++=item run
++
++=back
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/CleanRpmsrate.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,53 @@
++# $Id: CleanRpmsrate.pm 115367 2007-01-30 09:47:04Z pixel $
++package Youri::Submit::Post::CleanRpmsrate;
++
++=head1 NAME
++
++Youri::Submit::Post::CleanRpmsrate - calls clean-rpmsrate
++
++=head1 DESCRIPTION
++
++Calls clean-rpmsrate
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Post/;
++
++#- inlined from MDK::Common::DataStructure
++sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
++
++sub _init {
++}
++
++sub run {
++ my ($self, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $root = $repository-&gt;get_install_root();
++ my @changed = @{$repository-&gt;get_arch_changed($target)};
++ if (grep { $_ eq 'i586' } @changed) {
++ # x86_64 uses i586 pkgs, so rpmsrate need to be rebuild
++ @changed = uniq(@changed, 'x86_64');
++ }
++ foreach my $arch (@changed) {
++ my $rpmsrate = &quot;$root/$target/$arch/media/media_info/rpmsrate&quot;;
++ my @media = &quot;$root/$target/$arch/media/main/release&quot;;
++ system(&quot;cp&quot;, &quot;$rpmsrate-raw&quot;, &quot;$rpmsrate-new&quot;);
++ system(&quot;clean-rpmsrate&quot;, &quot;$rpmsrate-new&quot;, @media);
++ system(&quot;mv&quot;, &quot;-f&quot;, &quot;$rpmsrate-new&quot;, $rpmsrate);
++ }
++ return
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2007, Mandriva &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">blino at mandriva.com</A>&gt;
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
++
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Gendistrib.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,66 @@
++# $Id: Gendistrib.pm 115367 2007-01-30 09:47:04Z pixel $
++package Youri::Submit::Post::Gendistrib;
++
++=head1 NAME
++
++Youri::Submit::Post::Gendistrib - calls gendistrib
++
++=head1 DESCRIPTION
++
++Calls gendistrib
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Post/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ user =&gt; '',
++ host =&gt; '',
++ source =&gt; '',
++ destination =&gt; '',
++ @_
++ );
++
++ foreach my $var ('tmpdir', 'command') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++}
++
++sub run {
++ my ($self, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $root = $repository-&gt;get_install_root();
++ (undef, undef, my $hour) = gmtime(time);
++ # during the night, use complete hdlist rebuild
++ my $fast = '--fast';
++ $fast = ''; # blino: don't use fast for now, it might be broken
++ if ($hour &gt; 22 &amp;&amp; $hour &lt; 5) {
++ if ($hour &lt; 4) {
++ $fast = '--blind'
++ } else {
++ $fast = ''
++ }
++ }
++ foreach my $arch (@{$repository-&gt;get_arch_changed($target)}) {
++ my $cmd = &quot;TMPDIR=$self-&gt;{_tmpdir}/$target/$arch time $self-&gt;{_command} --nochkdep --nobadrpm $fast --noclean $root/$target/$arch&quot;;
++ print &quot;$cmd\n&quot;;
++ system($cmd);
++ }
++ return
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, Mandriva &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">warly at mandriva.com</A>&gt;
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
++
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post/Genhdlist2.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,82 @@
++# $Id: Gendistrib.pm 115367 2007-01-30 09:47:04Z pixel $
++package Youri::Submit::Post::Genhdlist2;
++
++=head1 NAME
++
++Youri::Submit::Post::Genhdlist2 - calls genhdlist2
++
++=head1 DESCRIPTION
++
++Calls genhdlist2
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Post/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ user =&gt; '',
++ host =&gt; '',
++ source =&gt; '',
++ destination =&gt; '',
++ @_
++ );
++
++ foreach my $var ('command') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++}
++
++sub run {
++ my ($self, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++ my $root = $repository-&gt;get_install_root();
++ my @changed = @{$repository-&gt;get_install_dir_changed($target)};
++ if (!@changed) {
++ print &quot;nothing to do\n&quot;;
++ return;
++ }
++ foreach my $dir (@changed) {
++ my $file_deps = &quot;$dir/../../media_info/file-deps&quot;;
++ my $file_deps_option = -e $file_deps ? &quot;--file-deps $file_deps&quot; : '';
++ my $cmd = &quot;time $self-&gt;{_command} -v --versioned --allow-empty-media $file_deps_option $dir&quot;;
++ print &quot;$cmd\n&quot;;
++ system($cmd) == 0 or print &quot;ERROR: $cmd failed\n&quot;;
++ }
++
++ # need to redo global MD5SUM. This MD5SUM is mostly obsolete, but is still needed up to 2007.1
++ # (and even on cooker for existing urpmi.cfg)
++ foreach my $arch (@{$repository-&gt;get_arch_changed($target)}) {
++ my $dir = &quot;$root/$target/$arch/media/media_info&quot;;
++ my $cmd = &quot;cd $dir ; time md5sum hdlist_* synthesis.*&quot;;
++ print &quot;$cmd\n&quot;;
++ my $m = `$cmd`;
++ open my $f, '&gt;', &quot;$dir/MD5SUM&quot; or die &quot;Can't write $dir/MD5SUM: $!\n&quot;;
++ print $f $m;
++
++ {
++ require MDV::Distribconf::Build;
++ my $distrib = MDV::Distribconf::Build-&gt;new(&quot;$root/$target/$arch&quot;);
++ $distrib-&gt;loadtree or die &quot;$root/$target/$arch does not seem to be a distribution tree\n&quot;;
++ $distrib-&gt;parse_mediacfg;
++ $distrib-&gt;write_version($distrib-&gt;getfullpath(undef, &quot;VERSION&quot;));
++ print &quot;updated $root/$target/$arch/VERSION\n&quot;;
++ }
++ }
++ return;
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, Mandriva &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">warly at mandriva.com</A>&gt;
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
++
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Post.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,27 @@
++# $Id: Post.pm 4746 2007-01-30 10:01:14Z pixel $
++package Youri::Submit::Post;
++
++=head1 NAME
++
++Youri::Submit::Post - Abstract post plugin
++
++=head1 DESCRIPTION
++
++This abstract class defines post plugin interface.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Plugin/;
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2006, Mandriva
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre/Rsync.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,87 @@
++# $Id: Rsync.pm 267280 2010-04-01 19:57:53Z bogdano $
++package Youri::Submit::Pre::Rsync;
++
++=head1 NAME
++
++Youri::Submit::Pre::Rsync - Old revisions archiving
++
++=head1 DESCRIPTION
++
++This action plugin ensures archiving of old package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Pre/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ user =&gt; '',
++ host =&gt; '',
++ source =&gt; '',
++ destination =&gt; '',
++ @_
++ );
++
++ foreach my $var ('user', 'host', 'source', 'destination') {
++ $self-&gt;{&quot;_$var&quot;} = $options{$var};
++ }
++}
++
++sub run {
++ my ($self, $pre_packages, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ if (system(&quot;rsync --exclude '*.new' --exclude '.*' --remove-sent-files -avlPHe 'ssh -xc arcfour' $self-&gt;{_user}\@$self-&gt;{_host}:$self-&gt;{_source}/$target/ $self-&gt;{_destination}/$target/&quot;)) {
++ $self-&gt;{_error} = &quot;Rsync command failed ($!)&quot;;
++ return
++ }
++ my $queue = &quot;$self-&gt;{_destination}/$target&quot;;
++ $self-&gt;{_error} = &quot;Reading queue directory failed&quot;;
++ # now get the packages downloaded
++ my %packages;
++ opendir my $queuedh, &quot;$self-&gt;{_destination}/$target/&quot; or return &quot;Could not open $self-&gt;{_destination}/$target&quot;;
++ opendir my $targetdh, $queue or return &quot;Could not open $queue&quot;;
++ my $idx;
++ foreach my $media (readdir $targetdh) {
++ $media =~ /^\.{1,2}$/ and next;
++ print &quot;$target - $media\n&quot;;
++ if (-d &quot;$queue/$media&quot;) {
++ opendir my $submediadh, &quot;$queue/$media&quot; or return &quot;Could not open $queue/$media&quot;;
++ foreach my $submedia (readdir $submediadh) {
++ $submedia =~ /^\.{1,2}$/ and next;
++ print &quot;$target - $media - $submedia\n&quot;;
++ opendir my $rpmdh, &quot;$queue/$media/$submedia&quot; or return &quot;Could not open $queue/$media/$submedia&quot;;
++ foreach my $rpm (readdir $rpmdh) {
++ $rpm =~ /^\.{1,2}$/ and next;
++ print &quot;$target - $media - $submedia : $rpm\n&quot;;
++ my $file = &quot;$queue/$media/$submedia/$rpm&quot;;
++ $file =~ s/\/+/\//g;
++ if ($rpm =~ /^(\d{14}\.\w+\.\w+\.\d+)_.*\.rpm$/) {
++ push @{$packages{$1}{rpms}}, { section =&gt; &quot;$media/$submedia&quot;, file =&gt; $file };
++ } elsif ($rpm =~ /\.rpm$/) {
++ $idx++;
++ push @{$packages{&quot;independant_$idx&quot;}{rpms}}, { section =&gt; &quot;$media/$submedia&quot;, file =&gt; $file }
++ }
++ }
++ }
++ }
++ }
++ foreach my $key (keys %packages) {
++ push @$pre_packages, $packages{$key}{rpms}
++ }
++ return
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, Mandriva &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">warly at mandriva.com</A>&gt;
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Pre.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,27 @@
++# $Id: Pre.pm 4746 2007-01-30 10:01:14Z pixel $
++package Youri::Submit::Pre;
++
++=head1 NAME
++
++Youri::Submit::Pre - Abstract pre plugin
++
++=head1 DESCRIPTION
++
++This abstract class defines pre plugin interface.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Plugin/;
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2006, Mandriva
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Archive.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,61 @@
++# $Id: Archive.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Reject::Install;
++
++=head1 NAME
++
++Youri::Submit::Action::Archive - Old revisions archiving
++
++=head1 DESCRIPTION
++
++This action plugin ensures archiving of old package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Reject/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ @_
++ );
++
++ $self-&gt;{_perms} = $options{perms};
++
++ return $self;
++}
++
++sub run {
++ my ($self, $package, $errors, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $file = $package-&gt;get_file();
++ my $rpm = $package-&gt;get_file_name();
++ my $dest = $repository-&gt;get_reject_dir($package, $target, $define);
++
++ # FIXME remove prefix this should be done by a function
++ $rpm =~ s/^\d{14}\.\w+\.\w+\.\d+_//;
++ print &quot;installing file $file to $dest/$rpm\n&quot; ;#if $self-&gt;{_verbose};
++
++ unless ($self-&gt;{_test}) {
++ # create destination dir if needed
++ system(&quot;install -d -m &quot; . ($self-&gt;{_perms} + 111) . &quot; $dest/&quot;)
++ unless -d $dest;
++
++ # install file to new location
++ system(&quot;install -m $self-&gt;{_perms} $file $dest/$rpm&quot;);
++ }
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Clean.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,36 @@
++# $Id: Clean.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Reject::Clean;
++
++=head1 NAME
++
++Youri::Submit::Action::Clean - Old revisions cleanup
++
++=head1 DESCRIPTION
++
++This action plugin ensures cleanup of old package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Reject/;
++
++sub run {
++ my ($self, $package, $errors, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $file = $package-&gt;get_file();
++ print &quot;deleting file $file\n&quot; if $self-&gt;{_verbose};
++ unlink $file unless $self-&gt;{_test};
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Install.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,63 @@
++# $Id: Install.pm 4747 2007-01-30 10:02:41Z pixel $
++package Youri::Submit::Reject::Install;
++
++=head1 NAME
++
++Youri::Submit::Action::Archive - Old revisions archiving
++
++=head1 DESCRIPTION
++
++This action plugin ensures archiving of old package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Reject/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ perms =&gt; 644,
++ @_
++ );
++
++ $self-&gt;{_perms} = $options{perms};
++ $self-&gt;{_verbose} = $options{verbose};
++}
++
++sub run {
++ my ($self, $package, $errors, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $file = $package-&gt;get_file();
++ my $rpm = $package-&gt;get_file_name();
++ my $dest = $repository-&gt;get_reject_path($package, $target, $define);
++
++ # FIXME remove prefix this should be done by a function
++ $rpm =~ s/^\d{14}\.\w+\.\w+\.\d+_//;
++ print &quot;installing file $file to $dest/$rpm\n&quot; if $self-&gt;{_verbose};
++
++ unless ($self-&gt;{_test}) {
++ # create destination dir if needed
++ system(&quot;install -d -m &quot; . ($self-&gt;{_perms} + 111) . &quot; $dest/&quot;)
++ unless -d $dest;
++
++ # install file to new location
++ system(&quot;install -m $self-&gt;{_perms} $file $dest/$rpm&quot;);
++ }
++ $package-&gt;{_file} = &quot;$dest/$rpm&quot;;
++ print &quot;deleting file $file\n&quot; if $self-&gt;{_verbose};
++ unlink $file unless $self-&gt;{_test};
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject/Mail.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,112 @@
++# $Id: Mail.pm 223952 2007-06-23 13:54:13Z pixel $
++package Youri::Submit::Reject::Mail;
++
++=head1 NAME
++
++Youri::Submit::Action::Mail - Mail notification
++
++=head1 DESCRIPTION
++
++This action plugin ensures mail notification of new package revisions.
++
++=cut
++
++use warnings;
++use strict;
++use MIME::Entity;
++use Encode qw/from_to/;
++use Carp;
++use Youri::Package;
++use base qw/Youri::Submit::Reject/;
++
++sub _init {
++ my $self = shift;
++ my %options = (
++ mta =&gt; '/usr/sbin/sendmail',
++ to =&gt; '',
++ from =&gt; '',
++ cc =&gt; '',
++ prefix =&gt; '',
++ encoding =&gt; 'quoted-printable',
++ charset =&gt; 'iso-8859-1',
++ @_
++ );
++
++ croak &quot;undefined mail MTA&quot; unless $options{mta};
++ croak &quot;invalid mail MTA $options{mta}&quot; unless -x $options{mta};
++ croak &quot;undefined to&quot; unless $options{to};
++ if ($options{cc}) {
++ croak &quot;cc should be an hashref&quot; unless ref $options{cc} eq 'HASH';
++ }
++ croak &quot;invalid charset $options{charset}&quot;
++ unless Encode::resolve_alias($options{charset});
++
++ $self-&gt;{_mta} = $options{mta};
++ $self-&gt;{_to} = $options{to};
++ $self-&gt;{_from} = $options{from};
++ $self-&gt;{_cc} = $options{cc};
++ $self-&gt;{_prefix} = $options{prefix};
++ $self-&gt;{_encoding} = $options{encoding};
++ $self-&gt;{_charset} = $options{charset};
++}
++
++sub run {
++ my ($self, $package, $errors, $repository, $target, $define) = @_;
++ croak &quot;Not a class method&quot; unless ref $self;
++
++ my $section = $repository-&gt;_get_section($package, $target, $define);
++
++ my $subject =
++ ($self-&gt;{_prefix} ? '[' . $self-&gt;{_prefix} . '] ' : '' ) . ($section ? &quot;$section &quot; : '') .
++ $package-&gt;get_revision_name();
++ my $information = $package-&gt;get_information();
++ my $last_change = $package-&gt;get_last_change();
++ my $author = $last_change-&gt;[Youri::Package::CHANGE_AUTHOR] if $last_change;
++ my $list = $last_change-&gt;[Youri::Package::CHANGE_TEXT] if $last_change;
++ my $content =
++ &quot;Errors: \n\n&quot; . join(&quot;\n&quot;, map {
++ ( &quot;* $_&quot;, (map { &quot; - $_&quot; } @{$errors-&gt;{$_}}), &quot;\n&quot;);
++ } sort(keys %$errors)) . &quot;\n&quot; .
++ $information . &quot;\n&quot; .
++ $author . &quot;:\n$list&quot;;
++
++ # ensure proper codeset conversion
++ # for informations coming from package
++ my $charset = $repository-&gt;get_package_charset();
++ from_to($content, $charset, $self-&gt;{_charset});
++ from_to($subject, $charset, $self-&gt;{_charset});
++
++ my $mail = MIME::Entity-&gt;build(
++ Type =&gt; 'text/plain',
++ Charset =&gt; $self-&gt;{_charset},
++ Encoding =&gt; $self-&gt;{_encoding},
++ From =&gt; $self-&gt;{_from},
++ To =&gt; $self-&gt;{_to},
++ Subject =&gt; $subject,
++ Data =&gt; $content,
++ );
++
++ if ($self-&gt;{_cc}) {
++ my $cc = $self-&gt;{_cc}-&gt;{$package-&gt;get_name()};
++ $mail-&gt;head()-&gt;add('cc', $cc) if $cc;
++ }
++
++ if ($self-&gt;{_test}) {
++ $mail-&gt;print(\*STDOUT);
++ } else {
++ open(MAIL, &quot;| $self-&gt;{_mta} -t -oi -oem&quot;) or die &quot;Can't open MTA program: $!&quot;;
++ $mail-&gt;print(\*MAIL);
++ close MAIL;
++ }
++
++}
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2002-2006, YOURI project
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm
+===================================================================
+--- build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm (rev 0)
++++ build_system/mdv-youri-submit/trunk/lib/Youri/Submit/Reject.pm 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,27 @@
++# $Id: Reject.pm 4746 2007-01-30 10:01:14Z pixel $
++package Youri::Submit::Reject;
++
++=head1 NAME
++
++Youri::Submit::Reject - Abstract reject plugin
++
++=head1 DESCRIPTION
++
++This abstract class defines reject plugin interface.
++
++=cut
++
++use warnings;
++use strict;
++use Carp;
++use base qw/Youri::Submit::Plugin/;
++
++=head1 COPYRIGHT AND LICENSE
++
++Copyright (C) 2006, Mandriva
++
++This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
++
++=cut
++
++1;
+
+Added: build_system/mdv-youri-submit/trunk/t/00distribution.t
+===================================================================
+--- build_system/mdv-youri-submit/trunk/t/00distribution.t (rev 0)
++++ build_system/mdv-youri-submit/trunk/t/00distribution.t 2011-01-05 13:19:06 UTC (rev 209)
+@@ -0,0 +1,15 @@
++#!/usr/bin/perl
++# $Id: 00distribution.t 1723 2006-10-17 13:53:27Z warly $
++
++use Test::More;
++
++BEGIN {
++ eval {
++ require Test::Distribution;
++ };
++ if($@) {
++ plan skip_all =&gt; 'Test::Distribution not installed';
++ } else {
++ import Test::Distribution only =&gt; [ qw/use pod description/ ];
++ }
++}
+
+
+Property changes on: build_system/mdv-youri-submit/trunk/t/00distribution.t
+___________________________________________________________________
+Added: svn:executable
+ + *
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;/pipermail/mageia-sysadm/attachments/20110105/2b91b15e/attachment-0001.html&gt;
+</PRE>
+
+
+
+
+
+
+
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="001511.html">[Mageia-sysadm] [653] - do not try to do ssl when we cannot, this confuse epoll
+</A></li>
+ <LI>Next message: <A HREF="001513.html">[Mageia-sysadm] [210] add mandriva version of youri-core, downloaded from http://svn. mandriva.com/svn/soft/build_system/youri/core/trunk/ at revision 271600
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#1512">[ date ]</a>
+ <a href="thread.html#1512">[ thread ]</a>
+ <a href="subject.html#1512">[ subject ]</a>
+ <a href="author.html#1512">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
+mailing list</a><br>
+</body></html>