pkg-components-0.6/0000755000000000000000000000000012204404142011202 5ustar pkg-components-0.6/build_stages/0000755000000000000000000000000012204404142013647 5ustar pkg-components-0.6/build_stages/install0000755000000000000000000000116212204404142015243 0ustar #!/bin/sh TDIR=COMPONENTS/${DH_COMPONENT} DESTDIR=debian/ if [ -z ${PACKAGE} ] then echo PACKAGE not set exit 1 fi PERL=$(which perl) PERL="${PERL} -I../../debian/${PACKAGE}/usr/share/perl5" if [ -z ${DH_COMPONENT} ] then echo DH_COMPONENT not set exit 1 fi if [ ! -d ${TDIR} ] then echo ${TDIR} not a directory exit 1 fi if dh_auto_install -D ${TDIR} then EXIT_STATUS=0 else EXIT_STATUS=1 fi if [ -e ${DH_COMPONENT}/Changes ] then if dh_install ${TDIR}/Changes usr/share/doc/${PACKAGE}/${DH_COMPONENT} then EXIT_STATUS=0 else EXIT_STATUS=1 fi fi exit $EXIT_STATUS pkg-components-0.6/build_stages/config0000755000000000000000000000107012204404142015040 0ustar #!/bin/sh TDIR=COMPONENTS/${DH_COMPONENT} export PERL5LIB=${CURDIR}/debian/${PACKAGE}/usr/share/perl5 if [ -z ${PACKAGE} ] then echo PACKAGE not set exit 1 fi PERL=$(which perl) if [ -z ${DH_COMPONENT} ] then echo DH_COMPONENT not set exit 1 fi if [ ! -d ${TDIR} ] then echo ${TDIR} not a directory exit 1 fi if [ ! -d ${PERL5LIB} ] then echo ${PERL5LIB} not a directory exit 1 fi echo perl5lib: ${PERL5LIB} echo tdir: ${TDIR} if dh_auto_configure -D ${TDIR} then EXIT_STATUS=0 else EXIT_STATUS=1 fi exit $EXIT_STATUS pkg-components-0.6/build_stages/patch0000755000000000000000000000135412204404142014677 0ustar #!/bin/sh TDIR=COMPONENTS/${DH_COMPONENT} SDIR=debian/components/${DH_COMPONENT} if [ -z ${DH_COMPONENT} ] then echo DH_COMPONENT not set exit 1 fi if [ ! -d ${TDIR} ] then echo ${TDIR} not a directory exit 1 fi if [ ! -d ${SDIR}/patches ] then # if no patches directory in source exit quietly exit 0; fi if mkdir ${TDIR}/debian then if ! ln -s ../../../${SDIR}/patches ${TDIR}/debian/patches then echo "Cannot link ${TDIR}/debian/patches" exit 1 fi else echo "Cannot make ${TDIR}/debian" exit 1 fi cd ${TDIR} SERIES=`quilt series` if [ -z $SERIES ] then cd ../.. exit 0 fi if quilt push -a then EXIT_STATUS=0 else EXIT_STATUS=1 fi cd ../.. exit $EXIT_STATUS pkg-components-0.6/build_stages/copy0000755000000000000000000000126412204404142014552 0ustar #!/usr/bin/make -f main: check COMPONENTS/${DH_COMPONENT}/debian/compat COMPONENTS/${DH_COMPONENT}/debian/control check: @test -n ${DH_COMPONENT} COMPONENTS/${DH_COMPONENT}/debian/control : COMPONENTS/${DH_COMPONENT}/debian touch COMPONENTS/${DH_COMPONENT}/debian/control COMPONENTS/${DH_COMPONENT}/debian/compat : COMPONENTS/${DH_COMPONENT}/debian cp debian/compat COMPONENTS/${DH_COMPONENT}/debian COMPONENTS/${DH_COMPONENT}/debian : COMPONENTS/${DH_COMPONENT} mkdir -p COMPONENTS/${DH_COMPONENT}/debian COMPONENTS/${DH_COMPONENT}: COMPONENTS ${DH_COMPONENT} mkdir COMPONENTS/${DH_COMPONENT} cp -R ${DH_COMPONENT}/* COMPONENTS/${DH_COMPONENT} COMPONENTS: mkdir -p COMPONENTS pkg-components-0.6/build_stages/test0000755000000000000000000000062112204404142014553 0ustar #!/bin/sh TDIR=COMPONENTS/${DH_COMPONENT} if [ -z ${PACKAGE} ] then echo PACKAGE not set exit 1 fi if [ -z ${DH_COMPONENT} ] then echo DH_COMPONENT not set exit 1 fi if [ ! -d ${TDIR} ] then echo ${TDIR} not a directory exit 1 fi if dh_auto_test -D ${TDIR} -- -I../../debian/${PACKAGE}/usr/share/perl5 then EXIT_STATUS=0 else EXIT_STATUS=1 fi exit $EXIT_STATUS pkg-components-0.6/build_stages/build0000755000000000000000000000066112204404142014677 0ustar #!/bin/sh TDIR=COMPONENTS/${DH_COMPONENT} if [ -z ${PACKAGE} ] then echo PACKAGE not set exit 1 fi PERL=$(which perl) PERL="${PERL} -I../../debian/${PACKAGE}/usr/share/perl5" if [ -z ${DH_COMPONENT} ] then echo DH_COMPONENT not set exit 1 fi if [ ! -d ${TDIR} ] then echo ${TDIR} not a directory exit 1 fi if dh_auto_build -D ${TDIR} then EXIT_STATUS=0 else EXIT_STATUS=1 fi exit $EXIT_STATUS pkg-components-0.6/MANIFEST0000644000000000000000000000111612204404142012332 0ustar bin/dh_components Build.PL build_stages/build build_stages/config build_stages/copy build_stages/install build_stages/patch build_stages/test lib/Debian/Debhelper/Dh_components.pm lib/Debian/Debhelper/Sequence/components.pm MANIFEST This list of files MANIFEST.SKIP README t/00.load.t t/01.basic.t t/02.options.t t/data/test1/bargle t/data/test1/comp1/xxx t/data/test1/comp2/boogie t/data/test1/comp2/build t/data/test1/comp2/config t/data/test1/comp2/copy t/data/test1/comp2/install t/data/test1/comp2/patch t/data/test1/comp2/test t/data/test1/comp3/patch t/pod-coverage.t t/pod.t TODO pkg-components-0.6/MANIFEST.SKIP0000644000000000000000000000006412204404142013100 0ustar ^debian/.* \.git ^MYMETA.yml$ ^_build ^Build$ ^blib pkg-components-0.6/Build.PL0000644000000000000000000000113712204404142012500 0ustar use strict; use warnings; use Module::Build; my $builder = Module::Build->new( module_name => 'Debian::Debhelper::Dh_components', license => 'perl', dist_author => 'Nicholas Bamber ', dist_version_from => 'lib/Debian/Debhelper/Dh_components.pm', build_requires => { 'Test::More' => 0, }, requires => { 'version' => 0, 'Debian::Control' => 0.77, }, create_makefile_pl => 'traditional', add_to_cleanup => [ 'Debian-Debhelper-Dh_components-*' ], ); $builder->create_build_script(); pkg-components-0.6/README0000644000000000000000000001277212204404142012073 0ustar pkg-components PURPOSE To provide a means of managing the build of components in a Debian package. HISTORY Typically there is a one-to-one correspondence between perl modules and perl debian packages. However the ftp masters generally disallow packages where the packaging takes up more diskspace than the code. To get round this related modules are sometimes packaged as a bundle. The code that manages this is copied from package to package and gets harder to maintain as it evolves. The most significant bit of support provided by the Debian infrastructure for packaging bundles is described in http://raphaelhertzog.com/2010/09/07/how-to-use-multiple-upstream-tarballs-in-debian-source-packages/ However one must notice this quote: The supplementary tarball is now part of the source package but we're not making anything useful out of it. We have to modify debian/rules... to install the new files in the binary package. So this package aims to take that support to the next level. Certainly it aims to do better than the ad hoc code currently in Debian perl packages. Currently it only supports the core functionality of integrating the components into the build process. However there is nothing in the package which is perl specific, apart from the default build stage scripts which can easily be overridden. TODO * The uscan-components script is somewhat in a beta state at the moment. * Probably ought to make the whole thing "build system" aware. * Need better support for other bits and pieces like component changelogs. * For components relying on Makefile.PL it seems to be necessary to set PERL5LIB in the testing build stage * Eventually could do with interest from other languages . * File::Slurp might be better than Perl6::Slurp. INSTRUCTIONS These instructions assume you have installed the 'pkg-components' package. 1. First prepare your core package as you would normally. So now for version V of your package P you have a P directory and the files: P_V.orig.tar.gz; P_V-1.debian.tar.gz; P_V-1.dsc. 2. Now suppose you have component upstream tarballs C_A_v1.tar.gz and C_B_v1.tar.gz. You need to choose names for these components which are purely alphanumeric . Actually the component names can also contain the hyphen "-". Assume that we name these ca and cb. The directory inside the source directory corresponding to the component must be this component name and the sub tar ball must also be renamed according to this name. All these rules come from with the dpkg-source executable. 3. Copy the tarballs to the appropriate name cp C_A_v1.tar.gz P_V.orig-ca.tar.gz cp C_B_v1.tar.gz P_V.orig-cb.tar.gz 4. Unpack the component tarballs into those sub-directories. cd P tar -zxf ../P_V.orig-ca.tar.gz tar -zxf ../P_V.orig-cb.tar.gz 4. Create component sub-directories. mv C_A-v1 ca mv C_B-v1 cb 6. Make a components sub-directory and one for each component. mkdir debian/components mkdir debian/components/ca mkdir debian/components/cb 7. In your debian/rules file add the '--with components' argument to the 'dh' command. 8. To build the copyright file from appropriate components but the copyright file for the main module in debian/components/copyright. In each debian/components/[C]/copyright put the copyright file for that component but minus the header stanza. Also the license stanzas can be ommitted if they are present else where. The generated copyright files must be added to the debian/clean file. 9. You use the substvar infrastructure to manage the component dependencies separately from the main dependencies. To do this creaate a control file in the component directory, say debian/components/x/control . dh_components will then create subtvar variables x:Depends, x:Breaks and so on. 10. Make sure your build dependencies require at least pkg-components (>= 0.3). 11. You probably want to list the components and their versions in the long description. 12. For each component directory you should have a watch file and a version file. The latter just contains the upstream version of the component and is maintained by the uscan-components script. 12. If you are lucky this is all you will need to do. What dpkg-buildpackage will do with what you have done is for each component and each build stage (one of: copy, patch, config, build, test, install) run the appropriate little script. 13. The pkg-components package comes with an example README.source explaining the peculiarities of a package built using pkg-components. 14. The default build stage scripts are located in /usr/share/pkg-components/build_stages. You can vary one or more build stages for the entire package by having an appropriately named script in the debian/components directory. You can vary a build stage for a specifc component by putting the relevant script in that components directory below debian/components. DEPRECATED It seems that the patch build stage is probably unncessary because of how dpkg-source handles patches. Please consider the patch build stage deprecated and do not use it. If this turns out not to be true please raise a bug report. ISSUES It seems to be relatively easy for a dummy patch to infect the build. It would be nice to understand the issue in sufficient detail to be able to defend against it. In the meantime downloading fresh correct source from the repository and using fresh tar balls seems to resolve this issue. The build stage scripts are currently in a state of hacky flux. There is a need to rewrite them from scratch and to think about how to generalize them. pkg-components-0.6/TODO0000644000000000000000000000432212204404142011673 0ustar Issues ====== 1.) cut dummy dh_components command 12/09/2010 2.) sequence installation in debhelper 12/09/2010 3.) create perl module as core of dh_components 12/09/2010 4.) Add mandatory arguments 12/09/2010 5.) Look for debian/components directory 12/09/2010 6.) Identify build stages [hard coded] 12/09/2010 7.) man pages 12/09/2010 8.) Iterate through components 13/09/2010 9.) Allow stopping build stages at given stage 16/09/2010 10.) test cases for components and build stages 16/09/2010 11.) Identify which rules files handle which targets 16/09/2010 12.) Implement build process functionality 16/09/2010 14.) Experiment with libwww-search-perl 16/09/2010 15.) Create copy rules 16/09/2010 16.) Create patch rules 17/09/2010 17.) Fix package name 18/09/2010 18.) Create config rules 23/10/2010 19.) Create build rules 23/10/2010 20.) Create test rules 23/10/2010 21.) Create install rules 23/10/2010 22.) Add dh_component_clean n/a 23.) Integrate with dpkg-buildpackage 01/09/2011 24.) Add functionality for managing copyright like files 01/09/2011 25.) Experiment with CGI::Application::Plugin::Authentication 01/09/2011 26.) Add functionality for creating substvar variables 01/09/2011 27.) Experiment with CGI::Application::Plugin::Authentication 01/09/2011 28.) uscan wrapper 15/10/2011 29.) Experiment with WWW::Search 15/10/2011 30.) Fix copyright 23/10/2010 31.) Get Lintian cleanliness 23/10/2010 pkg-components-0.6/t/0000755000000000000000000000000012204404142011445 5ustar pkg-components-0.6/t/pod.t0000644000000000000000000000021112204404142012406 0ustar #!perl use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); pkg-components-0.6/t/02.options.t0000644000000000000000000000161512204404142013550 0ustar use Test::More tests => 8; use Debian::Debhelper::Dh_components; my $components = Debian::Debhelper::Dh_components->new( dir=>'t/data/test1', package=> 'Test1', build_stages=>['blah','bargle','boogie'], components=>['mungle1','comp2','mungle2'], rules_locations=>[ 't/data/test1/%', 't/data/test1', ], ); isa_ok($components, 'Debian::Debhelper::Dh_components'); my $bs = join '|', $components->build_stages; is($bs, 'blah|bargle|boogie', 'build stages'); is($components->directory, 't/data/test1', 'directory'); is($components->package, 'Test1', 'package'); my @comps = sort $components->components; is_deeply(\@comps, ['comp2'], 'component listing'); is($components->script('comp2','bargle'),"t/data/test1/bargle", 'bargle'); is($components->script('comp2','boogie'),"t/data/test1/comp2/boogie", 'boogie'); is($components->script('comp2','blah'),undef, 'blah'); pkg-components-0.6/t/00.load.t0000644000000000000000000000032612204404142012770 0ustar use Test::More tests => 2; BEGIN { use_ok( 'Debian::Debhelper::Dh_components' ); use_ok( 'Debian::Parse::Uscan' ); } diag( "Testing Debian::Debhelper::Dh_components $Debian::Debhelper::Dh_components::VERSION" ); pkg-components-0.6/t/03.uscan.t0000644000000000000000000000077212204404142013172 0ustar use Test::More tests => 2; use Debian::Parse::Uscan; use Perl6::Slurp; use Test::Deep; my $parser = Debian::Parse::Uscan->new; isa_ok($parser, 'Debian::Parse::Uscan'); my $output = slurp 't/data/uscan.txt'; cmp_deeply($parser->parse($output), { local_version => '0.20', remote_version => '0.20', downloaded_file => 'CGI-Application-Plugin-Authentication-0.20.tar.gz', symlink => 'libcgi-application-plugin-authentication-perl_0.20.orig.tar.gz', }, 'results'); pkg-components-0.6/t/pod-coverage.t0000644000000000000000000000016012204404142014202 0ustar #!perl use Test::More; use Test::Pod::Coverage tests=>1; pod_coverage_ok('Debian::Debhelper::Dh_components'); pkg-components-0.6/t/01.basic.t0000644000000000000000000000563212204404142013140 0ustar use Test::More tests => 37; use Debian::Debhelper::Dh_components; use Readonly; use Perl6::Slurp; use Test::LongString; use Test::NoWarnings; use Test::Deep; Readonly my $COPYRIGHT_OUT => 't/data/copyright/out1'; my $components = Debian::Debhelper::Dh_components->new( dir=>'t/data/test1', package=> 'Test1', rules_locations=>[ 't/data/test1/%', 't/data/test1', 'build_stages', ], ); isa_ok($components, 'Debian::Debhelper::Dh_components'); my $bs = join '|', $components->build_stages; is($bs, 'copy|patch|config|build|test|install', 'build stages'); is($components->directory, 't/data/test1', 'directory'); is($components->package, 'Test1', 'package'); my @comps = sort $components->components; is_deeply(\@comps, ['comp1', 'comp2', 'comp3'], 'component listing'); foreach my $bs ($components->build_stages) { is($components->script('comp1',$bs),"build_stages/$bs", $bs); } foreach my $bs ($components->build_stages) { is($components->script('comp2',$bs),"t/data/test1/comp2/$bs", $bs); } foreach my $bs ($components->build_stages) { is($components->script('comp3',$bs), $bs eq 'patch' ? "t/data/test1/comp3/$bs" : "build_stages/$bs", $bs); } $components->build_copyright($COPYRIGHT_OUT); my $expected = slurp 't/data/copyright/expected1'; my $out = slurp $COPYRIGHT_OUT; # We cannot entirely assume the order in which the components # will be assembled. See #647278. is(length $out, length $expected, "file contents length"); my @expected = split /\n\n/, $expected; foreach my $stanza (@expected) { contains_string($out, $stanza, "file contents stanza"); } my $substvars = $components->substvars(); my @substvars = $components->substvars(); cmp_bag($substvars, \@substvars, 'wantarray'); cmp_bag($substvars, [ {deppackage=>'dep3',component=>'comp2',substvar=>'Depends',rel=>undef,ver=>undef}, {deppackage=>'dep4',component=>'comp2',substvar=>'Depends',rel=>'>=',ver=>'1.67'}, {deppackage=>'dep1',component=>'comp1',substvar=>'Depends',rel=>undef,ver=>undef}, {deppackage=>'dep2',component=>'comp1',substvar=>'Depends',rel=>'>=',ver=>'0.67'}, {deppackage=>'rec1',component=>'comp1',substvar=>'Recommends',rel=>undef,ver=>undef}, {deppackage=>'rec2',component=>'comp1',substvar=>'Recommends',rel=>'=',ver=>'0.650'}, {deppackage=>'sug1',component=>'comp1',substvar=>'Suggests',rel=>'<=',ver=>'0.8'}, {deppackage=>'enh1',component=>'comp1',substvar=>'Enhances',rel=>undef,ver=>undef}, {deppackage=>'repl1',component=>'comp1',substvar=>'Replaces',rel=>undef,ver=>undef}, {deppackage=>'pre1',component=>'comp1',substvar=>'Pre-Depends',rel=>undef,ver=>undef}, {deppackage=>'confl1',component=>'comp1',substvar=>'Conflicts',rel=>undef,ver=>undef}, {deppackage=>'break1',component=>'comp1',substvar=>'Breaks',rel=>undef,ver=>undef}, ], 'substvars'); unlink $COPYRIGHT_OUT; pkg-components-0.6/t/data/0000755000000000000000000000000012204404142012356 5ustar pkg-components-0.6/t/data/copyright/0000755000000000000000000000000012204404142014366 5ustar pkg-components-0.6/t/data/copyright/add10000644000000000000000000000351712204404142015130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Nicholas Bamber Source: http://github.com/periapt/pkg-components Upstream-Name: pkg-components Comment: This is a test. Files: test/* Copyright: 2007-2011, Nicholas Bamber License: BSD License: BSD Copyright (c) The Regents of the University of California. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. pkg-components-0.6/t/data/copyright/expected10000644000000000000000000005434712204404142016210 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pkg-components Upstream-Contact: Nicholas Bamber Source: http://github.com/periapt/pkg-components Files: * Copyright: 2010-2011, Nicholas Bamber License: Artistic or GPL-2+ Files: lib/Debian/Copyright* Copyright: 2011, Nicholas Bamber 2009, Damyan Ivanov [Portions] License: GPL-2+ Files: comp2/* Copyright: 2007-2011, Nicholas Bamber License: BSD Files: comp2/test.png Copyright: 2011, Nicholas Bamber License: Creative_Commons Attribution 3.0 Unported Files: comp3/* Copyright: 2010-2011, Nicholas Bamber License: Artistic License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the complete text of version 2 of the General Public License can be found in `/usr/share/common-licenses/GPL-2'. License: BSD Copyright (c) The Regents of the University of California. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: Creative_Commons Attribution 3.0 Unported THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. 1. Definitions a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. 2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, d. to Distribute and Publicly Perform Adaptations. e. For the avoidance of doubt: i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. 4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4 (a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3 (b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. 5. Representations, Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. Termination a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. 8. Miscellaneous a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. **** Creative Commons Notice **** Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at http://creativecommons.org/. pkg-components-0.6/t/data/uscan.txt0000644000000000000000000000153012204404142014227 0ustar -- Scanning for watchfiles in . -- Found watchfile in ./debian -- In debian/watch, processing watchfile line: http://search.cpan.org/dist/CGI-Application-Plugin-Authentication/ .*/CGI-Application-Plugin-Authentication-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ -- Found the following matching hrefs: /CPAN/authors/id/S/SI/SILASMONK/CGI-Application-Plugin-Authentication-0.20.tar.gz Newest version on remote site is 0.20, local version is 0.20 => Package is up to date Newest version on remote site is 0.20, local version is 0.20 => Forcing download as requested -- Downloading updated package CGI-Application-Plugin-Authentication-0.20.tar.gz -- Successfully downloaded updated package CGI-Application-Plugin-Authentication-0.20.tar.gz and symlinked libcgi-application-plugin-authentication-perl_0.20.orig.tar.gz to it -- Scan finished pkg-components-0.6/t/data/test1/0000755000000000000000000000000012204404142013416 5ustar pkg-components-0.6/t/data/test1/bargle0000755000000000000000000000000012204404142014566 0ustar pkg-components-0.6/t/data/test1/copyright.in0000644000000000000000000000215312204404142015757 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Nicholas Bamber Source: http://github.com/periapt/pkg-components Upstream-Name: pkg-components Files: * Copyright: 2010-2011, Nicholas Bamber License: Artistic or GPL-2+ Files: lib/Debian/Copyright* Copyright: 2011, Nicholas Bamber 2009, Damyan Ivanov [Portions] License: GPL-2+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the complete text of version 2 of the General Public License can be found in `/usr/share/common-licenses/GPL-2'. pkg-components-0.6/t/data/test1/comp3/0000755000000000000000000000000012204404142014437 5ustar pkg-components-0.6/t/data/test1/comp3/patch0000755000000000000000000000000012204404142015452 0ustar pkg-components-0.6/t/data/test1/comp3/copyright0000644000000000000000000000057012204404142016374 0ustar Files: comp3/* Copyright: 2010-2011, Nicholas Bamber License: Artistic License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. pkg-components-0.6/t/data/test1/comp2/0000755000000000000000000000000012204404142014436 5ustar pkg-components-0.6/t/data/test1/comp2/install0000755000000000000000000000000012204404142016020 0ustar pkg-components-0.6/t/data/test1/comp2/control0000644000000000000000000000047112204404142016043 0ustar Source: comp2 Section: devel Priority: optional Maintainer: Nicholas Bamber Build-Depends-Indep: blah1, blah2 Build-Depends: debhelper (>= 7) Standards-Version: 3.9.2 Package: comp2 Architecture: all Depends: dep3, dep4 (>= 1.67) Description: second component This is a test component. pkg-components-0.6/t/data/test1/comp2/config0000755000000000000000000000000012204404142015617 0ustar pkg-components-0.6/t/data/test1/comp2/boogie0000755000000000000000000000000012204404142015616 0ustar pkg-components-0.6/t/data/test1/comp2/patch0000755000000000000000000000000012204404142015451 0ustar pkg-components-0.6/t/data/test1/comp2/copy0000755000000000000000000000000012204404142015324 0ustar pkg-components-0.6/t/data/test1/comp2/copyright0000644000000000000000000005203012204404142016371 0ustar Files: comp2/* Copyright: 2007-2011, Nicholas Bamber License: BSD Files: comp2/test.png Copyright: 2011, Nicholas Bamber License: Creative_Commons Attribution 3.0 Unported License: BSD Copyright (c) The Regents of the University of California. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: Creative_Commons Attribution 3.0 Unported THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. 1. Definitions a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. 2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, d. to Distribute and Publicly Perform Adaptations. e. For the avoidance of doubt: i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. 4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4 (a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3 (b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. 5. Representations, Warranties and Disclaimer UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. Termination a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. 8. Miscellaneous a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. **** Creative Commons Notice **** Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at http://creativecommons.org/. pkg-components-0.6/t/data/test1/comp2/test0000755000000000000000000000000012204404142015331 0ustar pkg-components-0.6/t/data/test1/comp2/build0000755000000000000000000000000012204404142015451 0ustar pkg-components-0.6/t/data/test1/comp1/0000755000000000000000000000000012204404142014435 5ustar pkg-components-0.6/t/data/test1/comp1/control0000644000000000000000000000072312204404142016042 0ustar Source: comp1 Section: devel Priority: optional Maintainer: Nicholas Bamber Build-Depends-Indep: blah1, blah2 Build-Depends: debhelper (>= 7) Standards-Version: 3.9.2 Package: comp1 Architecture: all Depends: dep1, dep2 (>= 0.67) Recommends: rec1, rec2 (= 0.650) Suggests: sug1 (<= 0.8) | sug2 (>= 1.4) Enhances: enh1 Replaces: repl1 Pre-Depends: pre1 Conflicts: confl1 Breaks: break1 Description: first component This is a test component. pkg-components-0.6/t/data/test1/comp1/xxx0000644000000000000000000000000012204404142015175 0ustar pkg-components-0.6/lib/0000755000000000000000000000000012204404142011750 5ustar pkg-components-0.6/lib/Debian/0000755000000000000000000000000012204404142013132 5ustar pkg-components-0.6/lib/Debian/Debhelper/0000755000000000000000000000000012204404142015024 5ustar pkg-components-0.6/lib/Debian/Debhelper/Dh_components.pm0000644000000000000000000002044012204404142020162 0ustar package Debian::Debhelper::Dh_components; use warnings; use strict; use Carp; use Readonly; use DirHandle; use Debian::Copyright; use Debian::Control; Readonly my $BUILD_STAGES => [ 'copy', 'patch', 'config', 'build', 'test', 'install' ]; Readonly my $RULES_LOCATIONS => [ 'debian/components/%', 'debian/components', '/usr/share/pkg-components/build_stages', ]; Readonly my @DEPENDENCY_TYPES => ( 'Depends', 'Recommends', 'Suggests', 'Enhances', 'Replaces', 'Pre_Depends', 'Conflicts', 'Breaks', ); our $VERSION = '0.3'; sub new { my $class = shift; my %args = @_; $args{build_stages} ||= $BUILD_STAGES; $args{rules_locations} ||= $RULES_LOCATIONS; my $components_specified = exists $args{components}; my %components; if ($components_specified) { %components = map {$_ => 1} @{$args{components}}; } $args{components} = []; my $self = \%args; bless $self, $class; my $dir_handle = DirHandle->new($self->{dir}); if ($dir_handle) { my $copyright_file = "$self->{dir}/copyright.in"; if (-r $copyright_file) { $self->{copyright} = Debian::Copyright->new(); $self->{copyright}->read($copyright_file); } $self->{substvars} = []; while(my $file = $dir_handle->read) { next if $file =~ /^\./; next if not -d "$self->{dir}/$file"; next if $components_specified and not exists $components{$file}; push @{$self->{components}}, $file; my $copyright_frag = "$self->{dir}/$file/copyright"; if ($self->{copyright} && -r $copyright_frag) { $self->{copyright}->read($copyright_frag); } my $substvars_frag = "$self->{dir}/$file/control"; if ($self->{substvars} && -r $substvars_frag) { $self->_read_substvars($substvars_frag, $file); } } } return $self; } sub build_stages { my $self = shift; return @{$self->{build_stages}}; } sub directory { my $self = shift; return $self->{dir}; } sub package { my $self = shift; return $self->{package}; } sub components { my $self = shift; return @{$self->{components}}; } sub script { my $self = shift; my $component = shift; my $build_stage = shift; return undef if ! grep {$component eq $_} $self->components; return undef if ! grep {$build_stage eq $_} $self->build_stages; foreach my $loc (@{$self->{rules_locations}}) { my $thisloc = $loc; $thisloc =~ s{%}{$component}g; my $script = "$thisloc/$build_stage"; return $script if -x $script; } return undef; } sub build_copyright { my $self = shift; my $file = shift; if ($self->{copyright}) { $self->{copyright}->write($file); } return; } sub _read_substvars { my $self = shift; my $filename = shift; my $component = shift; my $control = Debian::Control->new; $control->read($filename); my ($binary) = $control->binary_tie->Values(0); foreach my $type (@DEPENDENCY_TYPES) { my $filetype = $type; $filetype =~ s{_}{-}gxms; my @dependencies = @{$binary->$type}; foreach my $dep (@dependencies) { my $dep1 = $dep; if ($dep->alternatives) { my @alternatives = @{$dep->alternatives}; croak "cannot pick dependency from $dep" if scalar @alternatives < 1; $dep1 = $alternatives[0]; } my %data = ( component => $component, substvar => $filetype, deppackage => $dep1->pkg, rel => undef, ver => undef, ); if ($dep1->rel) { $data{rel} = $dep1->rel; $data{ver} = $dep1->ver->as_string; } push @{$self->{substvars}}, \%data; } } return; } sub substvars { my $self = shift; return wantarray ? @{$self->{substvars}} : $self->{substvars}; } # Module implementation here 1; # Magic true value required at end of module __END__ =head1 NAME Debian::Debhelper::Dh_components - Data for Debian components handling =head1 VERSION This document describes Debian::Debhelper::Dh_components version 0.3 =head1 SYNOPSIS use Debian::Debhelper::Dh_components; my $components = Debian::Debhelper::Dh_components->new; =head1 DESCRIPTION Back-end for C command. The module has three tasks: =over =item merging of documents (not implemented); =item merging of C merging (not implemented); =item cascading implementation of component build process (not implemented). =back =head1 INTERFACE =head2 new This is a constructor which takes a number of named arguments. =over 4 =item C This is the path to a components directory. Typically this will just be C. This argument is mandatory. =item C This is the package name and is mandatory. =item C If this argument, an array reference, is given it will override the normal sequence of build stages. =item C If this parameter, an array reference, is set only those components listed will be considered. =item C If this parameter, an array reference, is given it will override the normal location of build stage scripts. =back =head2 build_stages This returns the build stages in the order in which they should occur: copy, patch, config, build, test, install. =head2 directory This returns the directory name that was passed to the constructor. =head2 package This returns the package name that was passed to the constructor. =head2 components This returns an array listing the components found in that component directory. =head2 script This method takes two arguments, the component and the build stage, and returns the script that needs to be run. =head2 build_copyright If this method finds a file C in the components directory, it merges in any component copyright files in the component directories and writes the result to the specified location. =head2 substvars This method returns the appropriate C variables parsed from C files in each component sub-directory as a hash reference. =head1 CONFIGURATION AND ENVIRONMENT Debian::Debhelper::Dh_components requires no configuration files or environment variables. =head1 DEPENDENCIES None. =head1 BUGS AND LIMITATIONS This module is only really intended for Debian and related systems. No bugs have been reported. Please report any bugs or feature requests to C, or through the web interface at L. =head1 AUTHOR Nicholas Bamber C<< >> =head1 LICENCE AND COPYRIGHT Copyright (c) 2010, Nicholas Bamber C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. pkg-components-0.6/lib/Debian/Debhelper/Sequence/0000755000000000000000000000000012204404142016574 5ustar pkg-components-0.6/lib/Debian/Debhelper/Sequence/components.pm0000644000000000000000000000017312204404142021320 0ustar #!/usr/bin/perl use warnings; use strict; use Debian::Debhelper::Dh_Lib; insert_after("dh_install", "dh_components"); 1; pkg-components-0.6/lib/Debian/Parse/0000755000000000000000000000000012204404142014204 5ustar pkg-components-0.6/lib/Debian/Parse/Uscan.pm0000644000000000000000000001006112204404142015611 0ustar package Debian::Parse::Uscan; use warnings; use strict; use Carp; use Readonly; our $VERSION = '0.3'; sub new { my $class = shift; my $self = {}; bless $self, $class; return $self; } sub parse { my $self = shift; my $string = shift; my $results = {}; # Get versions if ($string =~ m{ ^ # beginning of line Newest\sversion\son\sremote\ssite\sis\s (\S+) # remote version ,\slocal\sversion\sis\s (\S+) # local version $ # end of line }xms) { $results->{remote_version} = $1; $results->{local_version} = $2; } # Downloaded file if ($string =~ m{ ^ # beginning of line \-\-\s Successfully\sdownloaded\supdated\spackage\s (\S+) # downloaded file $ # end of line }xms) { $results->{downloaded_file} = $1; } # Symlink if ($string =~ m{ ^ # beginning of line \s+ # large initial space and\ssymlinked\s (\S+) # symlink \sto\sit $ # end of line }xms) { $results->{symlink} = $1; } return $results; } # Module implementation here 1; # Magic true value required at end of module __END__ =head1 NAME Debian::Parse::Uscan - Utility method to parse verbose uscan output =head1 VERSION This document describes Debian::Parse::Uscan version 0.3 =head1 SYNOPSIS use Debian::Parse::Uscan; my $parser = Debian::Parse::Uscan->new; my $details = $parser->parse($uscan_output); print "Local version: $details->{local_version}\n"; print "Downloaded: $details->{downloaded}\n"; =head1 DESCRIPTION This is a simple utility class that encapsulates the regular expressions needed to glean information from the verbose output of C. =head1 INTERFACE =head2 new This is a constructor. =head2 parse The C method takes the output as a string as an argument and returns a hash reference containing the extracted fields. =head1 DEPENDENCIES None. =head1 BUGS AND LIMITATIONS This module is only really intended for Debian and related systems. No bugs have been reported. Please report any bugs or feature requests to C, or through the web interface at L. =head1 AUTHOR Nicholas Bamber C<< >> =head1 LICENCE AND COPYRIGHT Copyright (c) 2010, Nicholas Bamber C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. pkg-components-0.6/debian/0000755000000000000000000000000012204404142012424 5ustar pkg-components-0.6/debian/rules0000755000000000000000000000067212204404142013511 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ pkg-components-0.6/debian/install0000644000000000000000000000023012204404142014010 0ustar bin/dh_components usr/bin/ lib/Debian/Debhelper/Sequence/components.pm usr/share/perl5/Debian/Debhelper/Sequence/ build_stages usr/share/pkg-components pkg-components-0.6/debian/control0000644000000000000000000000273612204404142014037 0ustar Source: pkg-components Maintainer: Debian Perl Group Uploaders: Nicholas Bamber , Olof Johansson Section: devel Priority: optional Build-Depends: debhelper (>= 9) Build-Depends-Indep: dh-make-perl (>= 0.77), libdebian-copyright-perl (>= 0.2), libperl6-slurp-perl, libreadonly-perl, libreadonly-xs-perl, libtest-deep-perl, libtest-longstring-perl, libtest-nowarnings-perl, libtest-pod-coverage-perl, libtest-pod-perl Standards-Version: 3.9.4 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/pkg-components.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/pkg-components.git Homepage: http://lists.debian.org/debian-devel/2010/09/msg00208.html Package: pkg-components Architecture: all Depends: dh-make-perl (>= 0.77), dpkg-dev, libdebian-copyright-perl (>= 0.2), libperl6-slurp-perl, libreadonly-perl, libreadonly-xs-perl, make, ${misc:Depends}, ${perl:Depends} Suggests: devscripts Description: debhelper tool to help maintain bundles Support for additional components in debian/rules To be activated one would need to run 'dh --with components $@' and also there would have to be a 'debian/components' directory. pkg-components-0.6/debian/source/0000755000000000000000000000000012204404142013724 5ustar pkg-components-0.6/debian/source/format0000644000000000000000000000001512204404142015133 0ustar 3.0 (native) pkg-components-0.6/debian/changelog0000644000000000000000000000533212204404142014301 0ustar pkg-components (0.6) unstable; urgency=low [ Salvatore Bonaccorso ] * Change Vcs-Git to canonical URI (git://anonscm.debian.org) [ Olof Johansson ] * Adapt to changes in Debian::Control API (Closes: #719414, #719370) [ gregor herrmann ] * Use canonical URI for Vcs-Git field. -- Olof Johansson Mon, 12 Aug 2013 11:14:01 +0200 pkg-components (0.5) unstable; urgency=low [ gregor herrmann ] * debian/control: update {versioned,alternative} (build) dependencies. [ Nicholas Bamber ] * Upgrade Debian::Copyright version to 0.2 - Official version of DEP-5 copyright format * Raised standards version to 3.9.4 * Raised compatibility level and debhelper version to 9 * Updated copyright and removed unused lintian override -- Nicholas Bamber Wed, 12 Dec 2012 10:07:05 +0000 pkg-components (0.4) unstable; urgency=medium * Made t/01.basic.t not so dependent on order (partially closes: #647278) * Fixed build dependencies (Closes: #647278) * Moving package into Debian Perl Group * Updating repository fields * Added Suggests clause for devscripts as uscan-components depends on uscan -- Nicholas Bamber Sat, 05 Nov 2011 18:15:20 +0000 pkg-components (0.3) unstable; urgency=low * Added support for copyright merging * Updated README and TODO and debian/copyright * Raised standards version to 3.9.2 * Added support for substvars * Added wrapper for uscan (uscan-components) * Added example README.source * Added source override for debian copyright format -- Nicholas Bamber Fri, 21 Oct 2011 22:12:03 +0100 pkg-components (0.2) unstable; urgency=low * Changed section to 'devel' in accordance with override * Fixed repository data in control file * Add versioned dependency on dpkg-dev to ensure we have support for the 3.0 (quilt) format * Fixed number of directory levels in copy build stage now that the format expected by dpkg-source is better understood. * Added check for Changes file in component, which if found will be installed into doc directory * Setting PERL5LIB environment variable in config so that testing components can work correctly * Shifted sequence so that dh_components runs immediately after the core install, so that components can be tested. * Updated README file to reflect latest status. * Setting CURDIR when calling build stage scripts * Setting PERL5LIB inside the config build stage based upon CURDIR -- Nicholas Bamber Sun, 12 Dec 2010 11:12:11 +0000 pkg-components (0.1) unstable; urgency=low * Initial release (Closes: #601498) -- Nicholas Bamber Sat, 11 Sep 2010 22:29:27 +0100 pkg-components-0.6/debian/compat0000644000000000000000000000000212204404142013622 0ustar 9 pkg-components-0.6/debian/copyright0000644000000000000000000000176012204404142014363 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Nicholas Bamber Upstream-Name: pkg-components Source: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/pkg-components.git Files: * Copyright: 2010-2012, Nicholas Bamber License: Artistic or GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the General Public License can be found in `/usr/share/common-licenses/GPL-1'. pkg-components-0.6/debian/docs0000644000000000000000000000000712204404142013274 0ustar README pkg-components-0.6/debian/pkg-components.examples0000644000000000000000000000001312204404142017122 0ustar examples/* pkg-components-0.6/examples/0000755000000000000000000000000012204404142013020 5ustar pkg-components-0.6/examples/README.source0000644000000000000000000000071112204404142015176 0ustar This package is built using pkg-components. To download current and latest upstream tarballs see the uscan-components script in that package. Note also that the binary copyright file is a merger of debian/components/copyright.in and debian/components/*/copyright. Various Debian tools require a static file in debian/copyright. If for some reason the generated copyright file changes copy from debian/$PACKAGE.copyright to debian/copyright after a build. pkg-components-0.6/bin/0000755000000000000000000000000012204404142011752 5ustar pkg-components-0.6/bin/dh_components0000755000000000000000000001322312204404142014541 0ustar #!/usr/bin/perl use strict; use warnings; use Debian::Debhelper::Dh_Lib; use Debian::Debhelper::Dh_components; use Readonly; use Cwd; Readonly my $COMMA_RE => qr/,/; Readonly my $CWD => getcwd; init(options=>{ "purge!"=>\$dh{PURGE}, "components=s" => \$dh{COMPONENTS}, "build_stages=s" => \$dh{BUILD_STAGES}, "rules_locations=s" => \$dh{RULES_LOCATIONS}, }); # Work through the packages and components foreach my $package (getpackages()) { my $dir = find_components_dir($package); next if !$dir; my %args = (dir=>$dir, package=>$package); if ($dh{BUILD_STAGES}) { $args{build_stages} = [split $COMMA_RE, $dh{BUILD_STAGES}]; } if ($dh{COMPONENTS}) { $args{components} = [split $COMMA_RE, $dh{COMPONENTS}]; } if ($dh{RULE_LOCATIONS}) { $args{rules_locations} = [split $COMMA_RE, $dh{RULES_LOCATIONS}]; } my $component_data = Debian::Debhelper::Dh_components->new(%args); foreach my $c ($component_data->components) { foreach my $bs ($component_data->build_stages) { my $script = $component_data->script($c, $bs); my $command = "CURDIR=$CWD PACKAGE=$package DH_COMPONENT=$c $script"; doit($command); } } my $copyright_file = "$CWD/debian/$package.copyright"; if (not -f $copyright_file) { verbose_print("Building $copyright_file"); $component_data->build_copyright($copyright_file); } foreach my $dependency ($component_data->substvars) { my $var = "$dependency->{component}:$dependency->{substvar}"; my $verrel = $dependency->{rel} ? "($dependency->{rel} $dependency->{ver})" : ""; my $deppackage = $dependency->{deppackage}; addsubstvar($package, $var, $deppackage, $verrel); } } # Clean up the old components directory if ($dh{PURGE} or not defined $dh{PURGE}) { doit("rm -rf COMPONENTS"); } exit(0); sub find_components_dir { my $package = shift; my $dir = "debian/$package.components"; return $dir if -d $dir; $dir = "debian/components"; return $dir if -d $dir && $package eq $dh{FIRSTPACKAGE}; return; } =head1 NAME dh_components - build additional components =head1 SYNOPSIS B [S>] [B<--components> I[,I,...]] [B<--build_stages> I[,I,...]] [B<--rules_locations> I[,I,...]] =head1 DESCRIPTION C is a debhelper program that is responsible for handling additional components that come from separate upstream sources. The aim is to turn each component into a "mini Debian package". It takes the following actions: =over =item Run through the various build stages for each package and component. =item Optionally stitch together the Debian copyright files. =item Generate the C file from the component control files. =item Purge the components working directory (unless the I<--no-purge> option is set). =back =head1 FILES =over 4 =item debian/I.components =item debian/components These directories contain all the component data for a given binary package. The second form only works for the first binary in a source package and is overridden by the equivalent first form. =item debian/[I.]components/I This is a directory that contains the files specific to that component. In some ways it is like a cut-down version of the debian directory. =item debian/[I.]components/I =item debian/[I.]components/ =item /usr/share/pkg-components/build_stages These are the default locations of the build stage scripts in the order of precedence with highest first. These can be overridden using the C<--rules_locations>. =item debian/[I.]components/copyright.in This file provides the DEP-5 copyright stanzas for the package but without any of the component stanzas. It forms the basis for the I.copyright file. =item debian/[I.]components/I/copyright This file provides a DEP-5 fragment of the Debian copyright for this component. It will be merged into the main copyright file at I.copyright. Any duplicate C clauses will be shown only once. =item debian/[I.]components/I/control If present this file should look like a Debian control file for the component. The package name of the binary stanza should match the component name. The C, C, C, C, C, C, C, C fields are read and turned into substitution variables. So if you have a component C which declares a Depends on C, then a substvar variable C will be created with the value C. The source package stanza is ignored but can be used to document which build dependencies are due to the component. =back =head1 OPTIONS =over 4 =item B<--build_stages b1,b2,...> If this option is listed the sequence described will be used instead of the normal one. =item B<--components c1,c2,...> If this option is listed only those components listed will be considered. =item B<--rules_locations r1,r2,...> If this option is listed the specified locations will be used instead of the default ones. One can use C<%> to mean the component. Thus to explicitly specify the default one would set: --rules_locations debian/components/%,debian/components,/usr/share/pkg-components/build_stages =back =head1 CONFIGURATION To enable this functionality it is necessary to pass the argument C<--with components> to the C programa in the C file. =head1 SEE ALSO L This program is used with debhelper. L =head1 AUTHOR Nicholas Bamber =cut pkg-components-0.6/bin/uscan-components0000755000000000000000000001460112204404142015176 0ustar #!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Pod::Usage; use Readonly; use Carp; use DirHandle; use Perl6::Slurp; use Debian::Parse::Uscan; Readonly my %VALUED_ARGS=>( useragent=>1, timeout=>1, destdir=>1, ); Readonly my $MAIN_WATCH_FILE => 'debian/watch'; Readonly my $COMPONENTS_DIR => 'debian/components'; # This might need reconsideration if we ever support --destdir Readonly my $DEST_DIR => '..'; my %watch_files; my %versions; my $dry_run = 0; my $help = 0; my $man = 0; my $verbose = 0; my $upgrade = 0; my %args = ( 'dry-run' => \$dry_run, 'help' => \$help, 'man' => \$man, 'verbose' => \$verbose, 'upgrade' => \$upgrade, ); GetOptions(\%args, 'dry-run!', 'help|?', 'man', 'report!', 'upgrade!', 'report-status!', # 'destdir=s', 'timeout=i', 'pasv!', 'pasv!', 'verbose!', # 'repack', # 'rename', 'debug', 'useragent|user-agent=s', ) or pod2usage(2); pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose=>2) if $man; delete $args{help}; delete $args{man}; delete $args{'dry-run'}; delete $args{verbose}; delete $args{upgrade}; if (not -r $MAIN_WATCH_FILE) { croak "Could not read $MAIN_WATCH_FILE"; } my $dir = DirHandle->new($COMPONENTS_DIR); if (defined $dir) { for(my $file = $dir->read; defined $file; $file = $dir->read) { next if $file =~ m{\A\.}xms; next if not -d $file; $watch_files{$file} = "$COMPONENTS_DIR/$file/watch"; if (not -r $watch_files{$file}) { croak "Could not read $watch_files{$file}"; } my $version_file = "$COMPONENTS_DIR/$file/version"; if (-r $version_file) { $versions{$file} = slurp $version_file; } else { $versions{$file} = undef; } } } else { croak "Could not read $COMPONENTS_DIR"; } my $usage = "uscan --verbose "; foreach my $arg (keys %args) { if ($VALUED_ARGS{$arg}) { $usage .= "--$arg=$args{$arg} "; } elsif ($args{$arg}) { $usage .= "--$arg "; } else { $usage .= "--no-$arg "; } } if (not $upgrade) { $usage .= " --force-download"; } my $uscan_parser = Debian::Parse::Uscan->new; my $main_uscan = "$usage --watch=$MAIN_WATCH_FILE"; if (not $upgrade) { $main_uscan .= " --download-current-version"; } if (my $main_results = _doit($main_uscan)) { my $main_details = $dry_run ? "" : $uscan_parser->parse($main_results); foreach my $component (keys %watch_files) { my $comp_uscan = $dry_run ? "\t" : ""; $comp_uscan .= "$usage --watch=$watch_files{$component} --no-symlink"; if (not $upgrade and defined $versions{$component}) { $comp_uscan .= " --download-version=$versions{$component}"; } my $comp_results = _doit($comp_uscan); exit(1) if not $comp_results; if (not $dry_run) { my $comp_details = $uscan_parser->parse($comp_results); my $symlink = $main_details->{symlink}; $symlink =~ s{\.orig\.}{.orig-$component\.}xms; my $comp_ln = ""; if ($comp_results) { $comp_ln = "ln -s $DEST_DIR/$comp_details->{downloaded_file} $DEST_DIR/$symlink"; } else { my $oldtar = $symlink; $oldtar =~ s{\.[^\.]+\.orig-}{\.$main_details->{local_version}\.orig-}xms; $comp_ln = "cp $DEST_DIR/$oldtar $DEST_DIR/$symlink"; } exit(1) if not _doit($comp_ln); if (open my $fh, ">", "$COMPONENTS_DIR/$component/version") { print {$fh} $comp_details->{remote_version}; } } } } exit(0); sub _doit { my $command = shift; if ($dry_run) { print "$command\n"; return 1; } my $output = `$command`; if ($verbose) { print $output; } if ($? == 0) { return $output; } elsif ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { my $signal = $? & 127; my $preposition = $? & 128 ? 'with' : 'without'; print "child died with signal $signal, $preposition coredump\n"; } else { my $value = $? >> 8; print "child exited with value $value\n" } return; } =head1 NAME uscan-components - wrapper around uscan for package and components =head1 SYNOPSIS B [S>] =head1 DESCRIPTION C is a wrapper around C for packages using C. Firstly it will check that both the package and all the components have watch files; and will return an error if they do not. Then it will run uscan on the main watch file. If that downloads something it will run uscan on each of the components. It accepts a number of uscan options all of which are passed onto to each invocation of uscan. =head1 OPTIONS =over 4 =item B<--upgrade> =item B<--no-upgrade> By default the current versions of the various components will be downloaded. This resolves into B<--force-download> and either B<--download-current-version> or B<--upstream-version> for the main and component tarballs respectively. The current versions of the components are stored in the files: CIC. If the B<--upgrade> option is applied then instead the latest version will be requested and the version files updated accordingly. =item B<--dry-run> If set no actual uscan will not actually be called but those that might be will be listed. =item B<--help> Prints a brief help message and exits. =item B<--man> Prints the manual page and exits. =item B<--verbose> =item B<--no-verbose> These options simulate the verbosity flag being passed to C. The actual invocations must always be verbose as the information is required to correctly rename the component files. However the output is not passed back to the user if verbosity is turned off. =item B<--report> =item B<--report-status> =item B<--pasv> =item B<--no-pasv> =item B<--timeout> =item B<--debug> =item B<--user-agent>, B<--useragent> All of the these arguments are passed straight to each uscan invocation. =back =head1 FILES For each component the watch file is assumed to be in CIC and the component version is maintained in CIC. =head1 SEE ALSO L =head1 AUTHOR Nicholas Bamber =cut