#183 Retire this upstream
Merged 3 months ago by sgallagh. Opened 3 months ago by sgallagh.
sgallagh/fedora-packager retire  into  main

file removed
-2
@@ -1,2 +0,0 @@ 

- Dennis Gilmore <dennis@ausil.us>

- Jesse Keating <jkeating@redhat.com>

file removed
-674
@@ -1,674 +0,0 @@ 

-                     GNU GENERAL PUBLIC LICENSE

-                        Version 3, 29 June 2007

- 

-  Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>

-  Everyone is permitted to copy and distribute verbatim copies

-  of this license document, but changing it is not allowed.

- 

-                             Preamble

- 

-   The GNU General Public License is a free, copyleft license for

- software and other kinds of works.

- 

-   The licenses for most software and other practical works are designed

- to take away your freedom to share and change the works.  By contrast,

- the GNU General Public License is intended to guarantee your freedom to

- share and change all versions of a program--to make sure it remains free

- software for all its users.  We, the Free Software Foundation, use the

- GNU General Public License for most of our software; it applies also to

- any other work released this way by its authors.  You can apply it to

- your programs, too.

- 

-   When we speak of free software, we are referring to freedom, not

- price.  Our General Public Licenses are designed to make sure that you

- have the freedom to distribute copies of free software (and charge for

- them if you wish), that you receive source code or can get it if you

- want it, that you can change the software or use pieces of it in new

- free programs, and that you know you can do these things.

- 

-   To protect your rights, we need to prevent others from denying you

- these rights or asking you to surrender the rights.  Therefore, you have

- certain responsibilities if you distribute copies of the software, or if

- you modify it: responsibilities to respect the freedom of others.

- 

-   For example, if you distribute copies of such a program, whether

- gratis or for a fee, you must pass on to the recipients the same

- freedoms that you received.  You must make sure that they, too, receive

- or can get the source code.  And you must show them these terms so they

- know their rights.

- 

-   Developers that use the GNU GPL protect your rights with two steps:

- (1) assert copyright on the software, and (2) offer you this License

- giving you legal permission to copy, distribute and/or modify it.

- 

-   For the developers' and authors' protection, the GPL clearly explains

- that there is no warranty for this free software.  For both users' and

- authors' sake, the GPL requires that modified versions be marked as

- changed, so that their problems will not be attributed erroneously to

- authors of previous versions.

- 

-   Some devices are designed to deny users access to install or run

- modified versions of the software inside them, although the manufacturer

- can do so.  This is fundamentally incompatible with the aim of

- protecting users' freedom to change the software.  The systematic

- pattern of such abuse occurs in the area of products for individuals to

- use, which is precisely where it is most unacceptable.  Therefore, we

- have designed this version of the GPL to prohibit the practice for those

- products.  If such problems arise substantially in other domains, we

- stand ready to extend this provision to those domains in future versions

- of the GPL, as needed to protect the freedom of users.

- 

-   Finally, every program is threatened constantly by software patents.

- States should not allow patents to restrict development and use of

- software on general-purpose computers, but in those that do, we wish to

- avoid the special danger that patents applied to a free program could

- make it effectively proprietary.  To prevent this, the GPL assures that

- patents cannot be used to render the program non-free.

- 

-   The precise terms and conditions for copying, distribution and

- modification follow.

- 

-                        TERMS AND CONDITIONS

- 

-   0. Definitions.

- 

-   "This License" refers to version 3 of the GNU General Public License.

- 

-   "Copyright" also means copyright-like laws that apply to other kinds of

- works, such as semiconductor masks.

- 

-   "The Program" refers to any copyrightable work licensed under this

- License.  Each licensee is addressed as "you".  "Licensees" and

- "recipients" may be individuals or organizations.

- 

-   To "modify" a work means to copy from or adapt all or part of the work

- in a fashion requiring copyright permission, other than the making of an

- exact copy.  The resulting work is called a "modified version" of the

- earlier work or a work "based on" the earlier work.

- 

-   A "covered work" means either the unmodified Program or a work based

- on the Program.

- 

-   To "propagate" a work means to do anything with it that, without

- permission, would make you directly or secondarily liable for

- infringement under applicable copyright law, except executing it on a

- computer or modifying a private copy.  Propagation includes copying,

- distribution (with or without modification), making available to the

- public, and in some countries other activities as well.

- 

-   To "convey" a work means any kind of propagation that enables other

- parties to make or receive copies.  Mere interaction with a user through

- a computer network, with no transfer of a copy, is not conveying.

- 

-   An interactive user interface displays "Appropriate Legal Notices"

- to the extent that it includes a convenient and prominently visible

- feature that (1) displays an appropriate copyright notice, and (2)

- tells the user that there is no warranty for the work (except to the

- extent that warranties are provided), that licensees may convey the

- work under this License, and how to view a copy of this License.  If

- the interface presents a list of user commands or options, such as a

- menu, a prominent item in the list meets this criterion.

- 

-   1. Source Code.

- 

-   The "source code" for a work means the preferred form of the work

- for making modifications to it.  "Object code" means any non-source

- form of a work.

- 

-   A "Standard Interface" means an interface that either is an official

- standard defined by a recognized standards body, or, in the case of

- interfaces specified for a particular programming language, one that

- is widely used among developers working in that language.

- 

-   The "System Libraries" of an executable work include anything, other

- than the work as a whole, that (a) is included in the normal form of

- packaging a Major Component, but which is not part of that Major

- Component, and (b) serves only to enable use of the work with that

- Major Component, or to implement a Standard Interface for which an

- implementation is available to the public in source code form.  A

- "Major Component", in this context, means a major essential component

- (kernel, window system, and so on) of the specific operating system

- (if any) on which the executable work runs, or a compiler used to

- produce the work, or an object code interpreter used to run it.

- 

-   The "Corresponding Source" for a work in object code form means all

- the source code needed to generate, install, and (for an executable

- work) run the object code and to modify the work, including scripts to

- control those activities.  However, it does not include the work's

- System Libraries, or general-purpose tools or generally available free

- programs which are used unmodified in performing those activities but

- which are not part of the work.  For example, Corresponding Source

- includes interface definition files associated with source files for

- the work, and the source code for shared libraries and dynamically

- linked subprograms that the work is specifically designed to require,

- such as by intimate data communication or control flow between those

- subprograms and other parts of the work.

- 

-   The Corresponding Source need not include anything that users

- can regenerate automatically from other parts of the Corresponding

- Source.

- 

-   The Corresponding Source for a work in source code form is that

- same work.

- 

-   2. Basic Permissions.

- 

-   All rights granted under this License are granted for the term of

- copyright on the Program, and are irrevocable provided the stated

- conditions are met.  This License explicitly affirms your unlimited

- permission to run the unmodified Program.  The output from running a

- covered work is covered by this License only if the output, given its

- content, constitutes a covered work.  This License acknowledges your

- rights of fair use or other equivalent, as provided by copyright law.

- 

-   You may make, run and propagate covered works that you do not

- convey, without conditions so long as your license otherwise remains

- in force.  You may convey covered works to others for the sole purpose

- of having them make modifications exclusively for you, or provide you

- with facilities for running those works, provided that you comply with

- the terms of this License in conveying all material for which you do

- not control copyright.  Those thus making or running the covered works

- for you must do so exclusively on your behalf, under your direction

- and control, on terms that prohibit them from making any copies of

- your copyrighted material outside their relationship with you.

- 

-   Conveying under any other circumstances is permitted solely under

- the conditions stated below.  Sublicensing is not allowed; section 10

- makes it unnecessary.

- 

-   3. Protecting Users' Legal Rights From Anti-Circumvention Law.

- 

-   No covered work shall be deemed part of an effective technological

- measure under any applicable law fulfilling obligations under article

- 11 of the WIPO copyright treaty adopted on 20 December 1996, or

- similar laws prohibiting or restricting circumvention of such

- measures.

- 

-   When you convey a covered work, you waive any legal power to forbid

- circumvention of technological measures to the extent such circumvention

- is effected by exercising rights under this License with respect to

- the covered work, and you disclaim any intention to limit operation or

- modification of the work as a means of enforcing, against the work's

- users, your or third parties' legal rights to forbid circumvention of

- technological measures.

- 

-   4. Conveying Verbatim Copies.

- 

-   You may convey verbatim copies of the Program's source code as you

- receive it, in any medium, provided that you conspicuously and

- appropriately publish on each copy an appropriate copyright notice;

- keep intact all notices stating that this License and any

- non-permissive terms added in accord with section 7 apply to the code;

- keep intact all notices of the absence of any warranty; and give all

- recipients a copy of this License along with the Program.

- 

-   You may charge any price or no price for each copy that you convey,

- and you may offer support or warranty protection for a fee.

- 

-   5. Conveying Modified Source Versions.

- 

-   You may convey a work based on the Program, or the modifications to

- produce it from the Program, in the form of source code under the

- terms of section 4, provided that you also meet all of these conditions:

- 

-     a) The work must carry prominent notices stating that you modified

-     it, and giving a relevant date.

- 

-     b) The work must carry prominent notices stating that it is

-     released under this License and any conditions added under section

-     7.  This requirement modifies the requirement in section 4 to

-     "keep intact all notices".

- 

-     c) You must license the entire work, as a whole, under this

-     License to anyone who comes into possession of a copy.  This

-     License will therefore apply, along with any applicable section 7

-     additional terms, to the whole of the work, and all its parts,

-     regardless of how they are packaged.  This License gives no

-     permission to license the work in any other way, but it does not

-     invalidate such permission if you have separately received it.

- 

-     d) If the work has interactive user interfaces, each must display

-     Appropriate Legal Notices; however, if the Program has interactive

-     interfaces that do not display Appropriate Legal Notices, your

-     work need not make them do so.

- 

-   A compilation of a covered work with other separate and independent

- works, which are not by their nature extensions of the covered work,

- and which are not combined with it such as to form a larger program,

- in or on a volume of a storage or distribution medium, is called an

- "aggregate" if the compilation and its resulting copyright are not

- used to limit the access or legal rights of the compilation's users

- beyond what the individual works permit.  Inclusion of a covered work

- in an aggregate does not cause this License to apply to the other

- parts of the aggregate.

- 

-   6. Conveying Non-Source Forms.

- 

-   You may convey a covered work in object code form under the terms

- of sections 4 and 5, provided that you also convey the

- machine-readable Corresponding Source under the terms of this License,

- in one of these ways:

- 

-     a) Convey the object code in, or embodied in, a physical product

-     (including a physical distribution medium), accompanied by the

-     Corresponding Source fixed on a durable physical medium

-     customarily used for software interchange.

- 

-     b) Convey the object code in, or embodied in, a physical product

-     (including a physical distribution medium), accompanied by a

-     written offer, valid for at least three years and valid for as

-     long as you offer spare parts or customer support for that product

-     model, to give anyone who possesses the object code either (1) a

-     copy of the Corresponding Source for all the software in the

-     product that is covered by this License, on a durable physical

-     medium customarily used for software interchange, for a price no

-     more than your reasonable cost of physically performing this

-     conveying of source, or (2) access to copy the

-     Corresponding Source from a network server at no charge.

- 

-     c) Convey individual copies of the object code with a copy of the

-     written offer to provide the Corresponding Source.  This

-     alternative is allowed only occasionally and noncommercially, and

-     only if you received the object code with such an offer, in accord

-     with subsection 6b.

- 

-     d) Convey the object code by offering access from a designated

-     place (gratis or for a charge), and offer equivalent access to the

-     Corresponding Source in the same way through the same place at no

-     further charge.  You need not require recipients to copy the

-     Corresponding Source along with the object code.  If the place to

-     copy the object code is a network server, the Corresponding Source

-     may be on a different server (operated by you or a third party)

-     that supports equivalent copying facilities, provided you maintain

-     clear directions next to the object code saying where to find the

-     Corresponding Source.  Regardless of what server hosts the

-     Corresponding Source, you remain obligated to ensure that it is

-     available for as long as needed to satisfy these requirements.

- 

-     e) Convey the object code using peer-to-peer transmission, provided

-     you inform other peers where the object code and Corresponding

-     Source of the work are being offered to the general public at no

-     charge under subsection 6d.

- 

-   A separable portion of the object code, whose source code is excluded

- from the Corresponding Source as a System Library, need not be

- included in conveying the object code work.

- 

-   A "User Product" is either (1) a "consumer product", which means any

- tangible personal property which is normally used for personal, family,

- or household purposes, or (2) anything designed or sold for incorporation

- into a dwelling.  In determining whether a product is a consumer product,

- doubtful cases shall be resolved in favor of coverage.  For a particular

- product received by a particular user, "normally used" refers to a

- typical or common use of that class of product, regardless of the status

- of the particular user or of the way in which the particular user

- actually uses, or expects or is expected to use, the product.  A product

- is a consumer product regardless of whether the product has substantial

- commercial, industrial or non-consumer uses, unless such uses represent

- the only significant mode of use of the product.

- 

-   "Installation Information" for a User Product means any methods,

- procedures, authorization keys, or other information required to install

- and execute modified versions of a covered work in that User Product from

- a modified version of its Corresponding Source.  The information must

- suffice to ensure that the continued functioning of the modified object

- code is in no case prevented or interfered with solely because

- modification has been made.

- 

-   If you convey an object code work under this section in, or with, or

- specifically for use in, a User Product, and the conveying occurs as

- part of a transaction in which the right of possession and use of the

- User Product is transferred to the recipient in perpetuity or for a

- fixed term (regardless of how the transaction is characterized), the

- Corresponding Source conveyed under this section must be accompanied

- by the Installation Information.  But this requirement does not apply

- if neither you nor any third party retains the ability to install

- modified object code on the User Product (for example, the work has

- been installed in ROM).

- 

-   The requirement to provide Installation Information does not include a

- requirement to continue to provide support service, warranty, or updates

- for a work that has been modified or installed by the recipient, or for

- the User Product in which it has been modified or installed.  Access to a

- network may be denied when the modification itself materially and

- adversely affects the operation of the network or violates the rules and

- protocols for communication across the network.

- 

-   Corresponding Source conveyed, and Installation Information provided,

- in accord with this section must be in a format that is publicly

- documented (and with an implementation available to the public in

- source code form), and must require no special password or key for

- unpacking, reading or copying.

- 

-   7. Additional Terms.

- 

-   "Additional permissions" are terms that supplement the terms of this

- License by making exceptions from one or more of its conditions.

- Additional permissions that are applicable to the entire Program shall

- be treated as though they were included in this License, to the extent

- that they are valid under applicable law.  If additional permissions

- apply only to part of the Program, that part may be used separately

- under those permissions, but the entire Program remains governed by

- this License without regard to the additional permissions.

- 

-   When you convey a copy of a covered work, you may at your option

- remove any additional permissions from that copy, or from any part of

- it.  (Additional permissions may be written to require their own

- removal in certain cases when you modify the work.)  You may place

- additional permissions on material, added by you to a covered work,

- for which you have or can give appropriate copyright permission.

- 

-   Notwithstanding any other provision of this License, for material you

- add to a covered work, you may (if authorized by the copyright holders of

- that material) supplement the terms of this License with terms:

- 

-     a) Disclaiming warranty or limiting liability differently from the

-     terms of sections 15 and 16 of this License; or

- 

-     b) Requiring preservation of specified reasonable legal notices or

-     author attributions in that material or in the Appropriate Legal

-     Notices displayed by works containing it; or

- 

-     c) Prohibiting misrepresentation of the origin of that material, or

-     requiring that modified versions of such material be marked in

-     reasonable ways as different from the original version; or

- 

-     d) Limiting the use for publicity purposes of names of licensors or

-     authors of the material; or

- 

-     e) Declining to grant rights under trademark law for use of some

-     trade names, trademarks, or service marks; or

- 

-     f) Requiring indemnification of licensors and authors of that

-     material by anyone who conveys the material (or modified versions of

-     it) with contractual assumptions of liability to the recipient, for

-     any liability that these contractual assumptions directly impose on

-     those licensors and authors.

- 

-   All other non-permissive additional terms are considered "further

- restrictions" within the meaning of section 10.  If the Program as you

- received it, or any part of it, contains a notice stating that it is

- governed by this License along with a term that is a further

- restriction, you may remove that term.  If a license document contains

- a further restriction but permits relicensing or conveying under this

- License, you may add to a covered work material governed by the terms

- of that license document, provided that the further restriction does

- not survive such relicensing or conveying.

- 

-   If you add terms to a covered work in accord with this section, you

- must place, in the relevant source files, a statement of the

- additional terms that apply to those files, or a notice indicating

- where to find the applicable terms.

- 

-   Additional terms, permissive or non-permissive, may be stated in the

- form of a separately written license, or stated as exceptions;

- the above requirements apply either way.

- 

-   8. Termination.

- 

-   You may not propagate or modify a covered work except as expressly

- provided under this License.  Any attempt otherwise to propagate or

- modify it is void, and will automatically terminate your rights under

- this License (including any patent licenses granted under the third

- paragraph of section 11).

- 

-   However, if you cease all violation of this License, then your

- license from a particular copyright holder is reinstated (a)

- provisionally, unless and until the copyright holder explicitly and

- finally terminates your license, and (b) permanently, if the copyright

- holder fails to notify you of the violation by some reasonable means

- prior to 60 days after the cessation.

- 

-   Moreover, your license from a particular copyright holder is

- reinstated permanently if the copyright holder notifies you of the

- violation by some reasonable means, this is the first time you have

- received notice of violation of this License (for any work) from that

- copyright holder, and you cure the violation prior to 30 days after

- your receipt of the notice.

- 

-   Termination of your rights under this section does not terminate the

- licenses of parties who have received copies or rights from you under

- this License.  If your rights have been terminated and not permanently

- reinstated, you do not qualify to receive new licenses for the same

- material under section 10.

- 

-   9. Acceptance Not Required for Having Copies.

- 

-   You are not required to accept this License in order to receive or

- run a copy of the Program.  Ancillary propagation of a covered work

- occurring solely as a consequence of using peer-to-peer transmission

- to receive a copy likewise does not require acceptance.  However,

- nothing other than this License grants you permission to propagate or

- modify any covered work.  These actions infringe copyright if you do

- not accept this License.  Therefore, by modifying or propagating a

- covered work, you indicate your acceptance of this License to do so.

- 

-   10. Automatic Licensing of Downstream Recipients.

- 

-   Each time you convey a covered work, the recipient automatically

- receives a license from the original licensors, to run, modify and

- propagate that work, subject to this License.  You are not responsible

- for enforcing compliance by third parties with this License.

- 

-   An "entity transaction" is a transaction transferring control of an

- organization, or substantially all assets of one, or subdividing an

- organization, or merging organizations.  If propagation of a covered

- work results from an entity transaction, each party to that

- transaction who receives a copy of the work also receives whatever

- licenses to the work the party's predecessor in interest had or could

- give under the previous paragraph, plus a right to possession of the

- Corresponding Source of the work from the predecessor in interest, if

- the predecessor has it or can get it with reasonable efforts.

- 

-   You may not impose any further restrictions on the exercise of the

- rights granted or affirmed under this License.  For example, you may

- not impose a license fee, royalty, or other charge for exercise of

- rights granted under this License, and you may not initiate litigation

- (including a cross-claim or counterclaim in a lawsuit) alleging that

- any patent claim is infringed by making, using, selling, offering for

- sale, or importing the Program or any portion of it.

- 

-   11. Patents.

- 

-   A "contributor" is a copyright holder who authorizes use under this

- License of the Program or a work on which the Program is based.  The

- work thus licensed is called the contributor's "contributor version".

- 

-   A contributor's "essential patent claims" are all patent claims

- owned or controlled by the contributor, whether already acquired or

- hereafter acquired, that would be infringed by some manner, permitted

- by this License, of making, using, or selling its contributor version,

- but do not include claims that would be infringed only as a

- consequence of further modification of the contributor version.  For

- purposes of this definition, "control" includes the right to grant

- patent sublicenses in a manner consistent with the requirements of

- this License.

- 

-   Each contributor grants you a non-exclusive, worldwide, royalty-free

- patent license under the contributor's essential patent claims, to

- make, use, sell, offer for sale, import and otherwise run, modify and

- propagate the contents of its contributor version.

- 

-   In the following three paragraphs, a "patent license" is any express

- agreement or commitment, however denominated, not to enforce a patent

- (such as an express permission to practice a patent or covenant not to

- sue for patent infringement).  To "grant" such a patent license to a

- party means to make such an agreement or commitment not to enforce a

- patent against the party.

- 

-   If you convey a covered work, knowingly relying on a patent license,

- and the Corresponding Source of the work is not available for anyone

- to copy, free of charge and under the terms of this License, through a

- publicly available network server or other readily accessible means,

- then you must either (1) cause the Corresponding Source to be so

- available, or (2) arrange to deprive yourself of the benefit of the

- patent license for this particular work, or (3) arrange, in a manner

- consistent with the requirements of this License, to extend the patent

- license to downstream recipients.  "Knowingly relying" means you have

- actual knowledge that, but for the patent license, your conveying the

- covered work in a country, or your recipient's use of the covered work

- in a country, would infringe one or more identifiable patents in that

- country that you have reason to believe are valid.

- 

-   If, pursuant to or in connection with a single transaction or

- arrangement, you convey, or propagate by procuring conveyance of, a

- covered work, and grant a patent license to some of the parties

- receiving the covered work authorizing them to use, propagate, modify

- or convey a specific copy of the covered work, then the patent license

- you grant is automatically extended to all recipients of the covered

- work and works based on it.

- 

-   A patent license is "discriminatory" if it does not include within

- the scope of its coverage, prohibits the exercise of, or is

- conditioned on the non-exercise of one or more of the rights that are

- specifically granted under this License.  You may not convey a covered

- work if you are a party to an arrangement with a third party that is

- in the business of distributing software, under which you make payment

- to the third party based on the extent of your activity of conveying

- the work, and under which the third party grants, to any of the

- parties who would receive the covered work from you, a discriminatory

- patent license (a) in connection with copies of the covered work

- conveyed by you (or copies made from those copies), or (b) primarily

- for and in connection with specific products or compilations that

- contain the covered work, unless you entered into that arrangement,

- or that patent license was granted, prior to 28 March 2007.

- 

-   Nothing in this License shall be construed as excluding or limiting

- any implied license or other defenses to infringement that may

- otherwise be available to you under applicable patent law.

- 

-   12. No Surrender of Others' Freedom.

- 

-   If conditions are imposed on you (whether by court order, agreement or

- otherwise) that contradict the conditions of this License, they do not

- excuse you from the conditions of this License.  If you cannot convey a

- covered work so as to satisfy simultaneously your obligations under this

- License and any other pertinent obligations, then as a consequence you may

- not convey it at all.  For example, if you agree to terms that obligate you

- to collect a royalty for further conveying from those to whom you convey

- the Program, the only way you could satisfy both those terms and this

- License would be to refrain entirely from conveying the Program.

- 

-   13. Use with the GNU Affero General Public License.

- 

-   Notwithstanding any other provision of this License, you have

- permission to link or combine any covered work with a work licensed

- under version 3 of the GNU Affero General Public License into a single

- combined work, and to convey the resulting work.  The terms of this

- License will continue to apply to the part which is the covered work,

- but the special requirements of the GNU Affero General Public License,

- section 13, concerning interaction through a network will apply to the

- combination as such.

- 

-   14. Revised Versions of this License.

- 

-   The Free Software Foundation may publish revised and/or new versions of

- the GNU General Public License from time to time.  Such new versions will

- be similar in spirit to the present version, but may differ in detail to

- address new problems or concerns.

- 

-   Each version is given a distinguishing version number.  If the

- Program specifies that a certain numbered version of the GNU General

- Public License "or any later version" applies to it, you have the

- option of following the terms and conditions either of that numbered

- version or of any later version published by the Free Software

- Foundation.  If the Program does not specify a version number of the

- GNU General Public License, you may choose any version ever published

- by the Free Software Foundation.

- 

-   If the Program specifies that a proxy can decide which future

- versions of the GNU General Public License can be used, that proxy's

- public statement of acceptance of a version permanently authorizes you

- to choose that version for the Program.

- 

-   Later license versions may give you additional or different

- permissions.  However, no additional obligations are imposed on any

- author or copyright holder as a result of your choosing to follow a

- later version.

- 

-   15. Disclaimer of Warranty.

- 

-   THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY

- APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT

- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM

- IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF

- ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

- 

-   16. Limitation of Liability.

- 

-   IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING

- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS

- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY

- GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE

- USE OR INABILITY TO USE THE PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),

- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF

- SUCH DAMAGES.

- 

-   17. Interpretation of Sections 15 and 16.

- 

-   If the disclaimer of warranty and limitation of liability provided

- above cannot be given local legal effect according to their terms,

- reviewing courts shall apply local law that most closely approximates

- an absolute waiver of all civil liability in connection with the

- Program, unless a warranty or assumption of liability accompanies a

- copy of the Program in return for a fee.

- 

-                      END OF TERMS AND CONDITIONS

- 

-             How to Apply These Terms to Your New Programs

- 

-   If you develop a new program, and you want it to be of the greatest

- possible use to the public, the best way to achieve this is to make it

- free software which everyone can redistribute and change under these terms.

- 

-   To do so, attach the following notices to the program.  It is safest

- to attach them to the start of each source file to most effectively

- state the exclusion of warranty; and each file should have at least

- the "copyright" line and a pointer to where the full notice is found.

- 

-     <one line to give the program's name and a brief idea of what it does.>

-     Copyright (C) <year>  <name of author>

- 

-     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 3 of the License, or

-     (at your option) any later version.

- 

-     This program is distributed in the hope that it will be useful,

-     but WITHOUT ANY WARRANTY; without even the implied warranty of

-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

-     GNU General Public License for more details.

- 

-     You should have received a copy of the GNU General Public License

-     along with this program.  If not, see <http://www.gnu.org/licenses/>.

- 

- Also add information on how to contact you by electronic and paper mail.

- 

-   If the program does terminal interaction, make it output a short

- notice like this when it starts in an interactive mode:

- 

-     <program>  Copyright (C) <year>  <name of author>

-     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.

-     This is free software, and you are welcome to redistribute it

-     under certain conditions; type `show c' for details.

- 

- The hypothetical commands `show w' and `show c' should show the appropriate

- parts of the General Public License.  Of course, your program's commands

- might be different; for a GUI interface, you would use an "about box".

- 

-   You should also get your employer (if you work as a programmer) or school,

- if any, to sign a "copyright disclaimer" for the program, if necessary.

- For more information on this, and how to apply and follow the GNU GPL, see

- <http://www.gnu.org/licenses/>.

- 

-   The GNU General Public License does not permit incorporating your program

- into proprietary programs.  If your program is a subroutine library, you

- may consider it more useful to permit linking proprietary applications with

- the library.  If this is what you want to do, use the GNU Lesser General

- Public License instead of this License.  But first, please read

- <http://www.gnu.org/philosophy/why-not-lgpl.html>.

file removed
-272
@@ -1,272 +0,0 @@ 

- * Mon Nov 24 2014 Dennis Gilmore <dennis@ausil.us> - 0.5.10.3-1

- - remove fedora-cvs script as the cvs server no longer exists (dennis)

- - Make fas url configurable for fedora-server-ca.cert. (rbean)

- - Remove unused imports. (rbean)

- - Remove another unused import. (rbean)

- - Conditionalize CRL checking for el6. (rbean)

- - Remove unused imports. (rbean)

- - Add CRL checking to fedora-cert. (rbean)

- - fedoradev-pkgowners: Update pkgdb URL (opensource)

- - Enable -oserial-api-visible (nb)

- - Add -o-static-ticket -o-strong-pw1 -o-strong-pw2 -o-man-update to

-   ykpersonalize arguments (nb)

- 

- * Thu Apr 18 2013 Dennis Gilmore <dennis@ausil.us> - 0.5.10.1-1

- - drop sparc support

- - make browser cert only happen with extra flag

- 

- * Sun May 22 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.2-1

- - Strip the .py off of fixbranches (jkeating)

- - Unconditionally check for new branch style (jkeating)

- - Stop setting push.default (#705468) (jkeating)

- - Make sure packages are built before lint (#702893) (jkeating)

- - Except more build submission errors (#702235) (jkeating)

- - Move the fixbranches.py script out of the $PATH (#698646) (jkeating)

- - fedpkg: Support branch completion on non-default remotes (tmz)

- - fedpkg: Update bash completion for new branch names (tmz)

- - Fix retiring a package with a provided message (#701626) (jkeating)

- - add arm specific and s390 specific packages so they get sent to the right

-   place (dennis)

- - initial go at using consistent targets across all targets dist-rawhide is

-   still used for master branch (dennis)

- - only pass in a target arch to local builds when specified on the command

-   line some arches notably x86, arm and sparc dont build for the base arch you

-   end up with .i386 .arm or .sparc rpms when you really want something else

-   (dennis)

- 

- * Thu Apr 14 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.0-1

- - Add the fixbranches script (jkeating)

- - Handle local branches without config entries (jkeating)

- - Don't exceed 80 chars (jkeating)

- - Use raw strings for regexes (jkeating)

- - Add a check for new-style branches (jkeating)

- - Fix string multiline (jkeating)

- - Add a force option (jkeating)

- - Add ability to check status of conversion (jkeating)

- - Use logger for path errors (jkeating)

- - Fix up debugging and logging (jkeating)

- - Whitespace fix (jkeating)

- - Add a dry-run option (jkeating)

- - Add a client side script to fix branch data (jkeating)

- 

- * Sat Apr 09 2011 Jesse Keating <jkeating@redhat.com> - 0.5.8.1-1

- - Man page comment syntax fix. (ville.skytta)

- - Make sure the bodhi.template file got written out (#683602) (jkeating)

- - Wrap the diff in a try (#681789) (jkeating)

- - Don't try to upload directories. (#689947) (jkeating)

- - Fix tag-request (#684418) (jkeating)

- 

- * Fri Mar 04 2011 Jesse Keating <jkeating@redhat.com> - 0.5.7.0-1

- - If chain has sets, handle them right (#679126) (jkeating)

- - Add code to handle chain builds with sets better. (jkeating)

- - Document the arches argument to the build function (jkeating)

- - Fix "fedpkg help" command (make it work again) (#681242) (hun)

- - Always generate a new srpm (#681359) (jkeating)

- - Fix up uses of path (ticket #96) (jkeating)

- - Clean up hardcoded "origin" (ticket #95) (jkeating)

- - Fix obvious error in definition of curl command (pebolle)

- - Fix fedpkg.1 target dependencies (hun)

- 

- * Wed Feb 23 2011 Jesse Keating <jkeating@redhat.com> - 0.5.6.0-1

- - Fix improper use of strip() (jkeating)

- - Improve the way we detect branch data (jkeating)

- - Leave a hint about things to remove later (jkeating)

- - Fix clone to work with old/new branch styles (jkeating)

- - Add new and old support to switch_branches (jkeating)

- - Update the regexes used for finding branches (jkeating)

- - Clarify and make more exact the branch regex (jkeating)

- - Don't use temporary editor files for spec (#677121) (jkeating)

- - fedpkg requires rpm-build (#676973) (jkeating)

- - Don't error out just from stderr from rpm (jkeating)

- 

- * Wed Feb 09 2011 Jesse Keating <jkeating@redhat.com> - 0.5.5.0-1

- - rearrnage import and drop hints about why (jkeating)

- - Move some module imports to command runtime (hun)

- - Move actual man page generation call (hun)

- - Move location/name of man_page module (hun)

- - Re-add 'lint' command hookup into argparse magic (hun)

- - Catch errors parsing spec to get name. (#676383) (jkeating)

- 

- * Wed Feb 09 2011 Jesse Keating <jkeating@redhat.com> - 0.5.4.0-1

- - Add changes from dist-git (jkeating)

- - Re-arrange verify-files and slight fixups (jkeating)

- - Add "fedpkg verify-files" command (hun)

- - Provide feedback about new-ticket. (ticket 91) (jkeating)

- - Remove wrong comment. (jkeating)

- - Add the new pull options to bash completion (jkeating)

- - Add a --rebase and --no-rebase option to pull (jkeating)

- - Whitespace fixes (jkeating)

- - Update the documentation for a lot of commands (jkeating)

- - Handle working from a non-existent path (#675398) (jkeating)

- - Fix an traceback when failing to watch a build. (jkeating)

- - Handle arches argument for scratch builds (#675285) (jkeating)

- - Trim the "- " out of clogs.  (#675892) (jkeating)

- - Exit with an error when appropriate (jkeating)

- - Kill the Commands section. (jkeating)

- - Add build time man page generator (hun)

- - Add help text for global --user option (hun)

- - Comment typo fix (hun)

- - Move argparse setup into parse_cmdline function (hun)

- - Comment typo fix (hun)

- - Require python-hashlib on EL5 and 4 (jkeating)

- - Catch a traceback when trying to build from local branch (jkeating)

- 

- * Mon Jan 31 2011 Jesse Keating <jkeating@redhat.com> 0.5.3.0-1

- - Catch the case where there is no branch merge point (#622592) (jkeating)

- - Fix whitespace (jkeating)

- - Add an argument to override the "distribution" (jkeating)

- - upload to lookaside cache tgz files (dennis)

- - Handle traceback if koji is down or unreachable. (jkeating)

- - If we don't have a remote branch, query koji (#619979) (jkeating)

- - Add a method to create an anonymous koji session (jkeating)

- - Make sure we have sources for mockbuild (#665555) (jwboyer) (jkeating)

- - Revert "Make sure we have an srpm when doing a mockbuild (#665555)" (jkeating)

- - Regenerate the srpm if spec file is newer (ticket #84) (jkeating)

- - Improve cert failure message (Ticket 90) (jkeating)

- - Get package name from the specfile. (Ticket 75) (jkeating)

- - Handle anonymous clones in clone_with_dirs. (#660183) (ricky)

- - Make sure we have an srpm when doing a mockbuild (#665555) (jkeating)

- - Catch all errors from watching tasks. (#670305) (jkeating)

- - Fix a traceback when koji goes offline (#668889) (jkeating)

- - Fix traceback with lint (ticket 89) (jkeating)

- 

- * Wed Jan 05 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.2.0

- - switch away from list2cmdline() Patch from Toshio

- https://bugzilla.redhat.com/show_bug.cgi?id=667433#c7 (dennis)

- - Import subprocess from stdlib when possible (dennis)

- - Logout before watching tasks (jkeating)

- - Add a tool to generate the rpm changelog (jkeating)

- - Handle having no sources file (#656897) (jkeating)

- - Add a dash of error checking to update (#655576) (jkeating)

- - Fix a traceback on expried credentials (#634946) (jkeating)

- - Backport a bugfix from koji upstream to fix 628504 (jkeating)

- - Fix up the commit command (jkeating)

- - print filename of downloaded source (dan)

- - Handle source files with spaces in them. Trac #85 (jkeating)

- - Remove parenthesises on mymodule.nvr (Jochen)

- - Fix error in clone by renaming self.join.join to os.path.join (Jochen)

- - Fix error to call the diff functionen in import_srpm (Jochen)

- - add author and copyright info for fedora-burn-yubikey (dennis)

- - install fedora-burn-yubikey into sbindir (dennis)

- - add fedora-burn-yubikey script used for setting up yubikeys for fedora (dennis)

- - Whitespace fixes (jkeating)

- - Reorder options in fedpkg.bash alphabeticly (Jochen)

- - Fixups in the retire function (jkeating)

- - Implementing a retire command (Jochen)

- - bash completion changes cleanup (jvcelak)

- - Put tag-request in the bash completion file (jkeating)

- - Don't use short options in bash completion (jkeating)

- - Add a tag request function (Xavier Lamien) (jkeating)

- - fedpkg: Don't mix options and commands, drop redundant short options (tmz)

- - Fix up the diff changes from jochen (jkeating)

- - Minor fixes for lint -i changes (jkeating)

- - Remove unused variable (jkeating)

- - Fix up commit with tag changes (jkeating)

- - Include path to clog (jkeating)

- - No short options in commit completion (jkeating)

- - Handle paths with push/pull (jkeating)

- - expand on pull help output (jkeating)

- - Fix up tag commands (jkeating)

- - Fix up some contributed docstrings (jkeating)

- - Don't use the unnecessary getnvr() (jkeating)

- - Only list long options in bash completion for tag (jkeating)

- - Whitespace fix (jkeating)

- - Move diff function out of the PackageModule class (Jochen)

- - Distlinguish between new empty repositories and retiered packages (Jochen)

- - Add -i (info) switch to the lint command (Jochen)

- - Add a -t (tag) switch for the commit command (Jochen)

- - Add a -c (clog) switch to the commit command (Jochen)

- - Move pull and push function out of PackageModule (Jochen)

- - Implementation of a pull command (Jochen)

- - Implenentation of a tag command (Jochen)

- - Remove stream keyword in logging.StreamHandler (Jochen)

- - Don't use log.error from within the library (jkeating)

- - fedpkg: Complete --srpm for the build command (tmz)

- - fedpkg: Use git plumbing to complete branch names (tmz)

- - fedpkg: Remove filenames option from completion (tmz)

- - fedpkg: Use _filedir for path completion (tmz)

- - Fix up the logger for what goes where (jkeating)

- - Make our logger print to stdout (jkeating)

- - Also redirect stderr over to stdout on non-terms (jkeating)

- - Name the process variables right (#632097) (jkeating)

- - Minor whitespace fix (jkeating)

- - Remove errornous dots at the end of the help messages of the commit

- command (jkeating)

- - Fefactoring: Use getuser to determinate fas userid (Jochen)

- - bash-completion < 1.2 compatibility (tmz (jkeating)

- - fedpkg: Try not to add redundant gitignore entries (tmz)

- - fedpkg: better bash completion (jvcelak)

- 

- 

- * Thu Aug 12 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.1.2

- - fix rh bz 619733 619879 619935 620254 620465 620595 620648

- - 620653 620750 621148 621808 622291 622716

- 

- * Thu Jul 29 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.1.0

- - wrap fedora-cert in try except 

- -fedpkg fixes

- - require python-kitchen on EL-4 and 5

- 

- * Wed Jul 28 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.0.1

- - Fix checking for unpushed changes on a branch

- 

- * Wed Jul 28 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.0

- - update to 0.5.0 with the switch to dist-git

- 

- * Thu Jul 08 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.2.3

- - Handle importing an srpm into an empty repo <jkeating>

- 

- * Thu Jul 08 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.2.2

- - new release with lost of fedpkg fixes

- 

- * Mon Jun 14 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.2.1

- - set devel for F-14

- - point builds to koji.stg

- - correctly create a git url for koji

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.4.2

- - adds missing fedora_cert. in fedora-packager-setup bz#573941

- - Require python-argparse for fedpkg bz#574206

- - Require make and openssh-clients bz#542209

- - Patch to make cvs checkouts more robust bz#569954

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.4.1

- - add a missing "import sys" from fedora-cert bz#570370

- - Require GitPython for fedpkg

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.4.0-1

- - add fedpkg

- - make a fedora_cert python library

- - add basic date check for certs

- 

- * Jesse Keating <jkeating@redhat.com> - 0.3.8

- - add fedora-hosted

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.3.7

- - make sure user_cert is defined before refrencing it in fedora-cvs.py

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.3.6

- - default to annonymous checkout when there is no user cert RH BZ#514108

- - quote the passed arcuments to rpmbuild to make sure args get passed

- correctly RH BZ#513269

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.3.5

- - script for doing svn checkouts

- - add rpmbuild-md5

- - download usercerts

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.3.1

- - allow annonymouse cvs checkouts

- - always get new ca certs

- * Dennis Gilmore <dennis@ausil.us> - 0.3.0

- - use pyOpenSSL to determine username

- - make sure cert is valid

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.2.0

- - fedora-cvs now allows checking out multiple modules

- - update urls for fedorahosted

- - update for fas2

- 

- * Dennis Gilmore <dennis@ausil.us> - 0.1

- - Initial release we have a comps group 

- - fedora-packager-setup.sh and fedora-cvs

file removed
-84
@@ -1,84 +0,0 @@ 

- bin_SCRIPTS = \

- 	fedoradev-pkgowners \

- 	fedora-cert \

- 	fedora-getsvn \

- 	fedora-hosted \

- 	fkinit \

- 	pkgname \

- 	rpmbuild-md5 \

- 	stg-koji

- 

- sbin_SCRIPTS = fedora-burn-yubikey

- 

- CLEANFILES = $(bin_SCRIPTS) $(sbin_SCRIPTS)

- 

- EXTRA_DIST = \

- 	src/fedoradev-pkgowners \

- 	src/fedora-cert.py \

- 	src/fedora-getsvn \

- 	src/fedora-hosted.py \

- 	src/fedora-burn-yubikey.py \

- 	src/pkgname.py \

- 	src/rpmbuild-md5 \

- 	src/secondary-koji

- 

- fedoradev-pkgowners: $(srcdir)/src/fedoradev-pkgowners

- 	rm -f fedoradev-pkgowners

- 	install -p -m 755 -T $(srcdir)/src/fedoradev-pkgowners fedoradev-pkgowners

- 

- fedora-cert: $(srcdir)/src/fedora-cert.py

- 	rm -f fedora-cert

- 	install -p -m 755 -T $(srcdir)/src/fedora-cert.py fedora-cert

- 

- fedora-getsvn: $(srcdir)/src/fedora-getsvn

- 	rm -f fedora-getsvn

- 	install -p -m 755 -T $(srcdir)/src/fedora-getsvn fedora-getsvn

- 

- fedora-hosted: $(srcdir)/src/fedora-hosted.py

- 	rm -f fedora-hosted

- 	install -p -m 755 -T $(srcdir)/src/fedora-hosted.py fedora-hosted

- 

- fedora-burn-yubikey: $(srcdir)/src/fedora-burn-yubikey.py

- 	rm -f fedora-burn-yubikey

- 	install -p -m 755 -T $(srcdir)/src/fedora-burn-yubikey.py fedora-burn-yubikey

- 

- pkgname: $(srcdir)/src/pkgname.py

- 	rm -f pkgname

- 	install -p -m 755 -T $(srcdir)/src/pkgname.py pkgname

- 

- rpmbuild-md5: $(srcdir)/src/rpmbuild-md5

- 	rm -f rpmbuild-md5

- 	install -p -m 755 -T $(srcdir)/src/rpmbuild-md5 rpmbuild-md5

- 

- s390-koji: $(srcdir)/src/secondary-koji

- 	rm -f s390-koji

- 	install -p -m 755 -T $(srcdir)/src/secondary-koji s390-koji

- 

- stg-koji: $(srcdir)/src/secondary-koji

- 	rm -f stg-koji

- 	install -p -m 755 -T $(srcdir)/src/secondary-koji stg-koji

- 

- fkinit: $(srcdir)/src/fkinit

- 	rm -f fkinit

- 	install -p -m 755 -T $(srcdir)/src/fkinit fkinit

- 

- fedora_cert_PYTHON = $(wildcard $(srcdir)/src/fedora_cert/*.py)

- 

- fedora_certdir = $(pythondir)/fedora_cert

- EXTRA_DIST += configs/fedora.conf \

- 	configs/stg.conf

- kojiconf_DATA = $(srcdir)/configs/fedora.conf \

- 	$(srcdir)/configs/stg.conf

- kojiconfdir = $(sysconfdir)/koji.conf.d/

- 

- EXTRA_DIST += krb-configs/fedoraproject_org \

- 	krb-configs/stg_fedoraproject_org

- krb5conf_DATA = $(srcdir)/krb-configs/fedoraproject_org \

- 	$(srcdir)/krb-configs/stg_fedoraproject_org

- krb5confdir = $(sysconfdir)/krb5.conf.d

- 

- EXTRA_DIST += ipa_ca/fedoraproject_ipa_ca.crt \

- 	ipa_ca/stg_fedoraproject_ipa_ca.crt

- ipaca_DATA = $(srcdir)/ipa_ca/fedoraproject_ipa_ca.crt \

- 	$(srcdir)/ipa_ca/stg_fedoraproject_ipa_ca.crt

- ipacadir = $(sysconfdir)/pki/ipa

file removed
-28
@@ -1,28 +0,0 @@ 

- Mar 23 2010

- 0.4.2  minor bugfix release

- adds missing fedora_cert. in fedora-packager-setup bz#573941

- Require python-argparse for fedpkg bz#574206

- Require make and openssh-clients bz#542209

- Patch to make cvs checkouts more robust bz#569954

- 

- Jan 05 2010

- Moved repo to git

- work started by Jesse on fedpkg as a replacement for the old Makefiles

- 

- Aug 04 2009

- add fedora-hosted, a cli interface to our Trac setup

- 

- Jul 13 2009

- add rpmbuild-md5  it creates rpms with old style hashes

- 

- Jun 21 2009

- add hppa configs. fix bug in fedora-packager-setup trying to unlink non existant file

- 

- 

- Mar 02 2009

- rewrite fedora-packager-setup in python

- 

- Mar 30 2008

- We are now using pyOpenSSL to work out username  and checking that certificate is valid.

- 

- 

file removed
-9
@@ -1,9 +0,0 @@ 

- fedora-packager is a collection of tools and configuration files to enable developers

- to set up their development environment. it also provides a python library fedora_cert

- to manage koji certificates.

- 

- for contributions fork fedora-packager at https://pagure.io/fedora-packager/ and submit

- pull requests.

- 

- File issues with fedora-packager at https://pagure.io/fedora-packager/

- 

file added
+5
@@ -0,0 +1,5 @@ 

+ This project has been moved to Fedora's dist-git repository at

+ https://src.fedoraproject.org/rpms/fedora-packager

+ 

+ New contributions should be contributed there.

+ 

file removed
-5
@@ -1,5 +0,0 @@ 

- * Make Makefile work

- * add extra scripts to do cool useful things

- * do up a README 

- * complete NEWS and ChangeLog files

- - have it get the certificate directly when needed

file removed
-41
@@ -1,41 +0,0 @@ 

- #!/bin/sh

- # Run this to generate all the initial makefiles, etc.

- 

- srcdir=`dirname $0`

- test -z "$srcdir" && srcdir=.

- 

- (test -f $srcdir/configure.ac) || {

-     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"

-     echo " top-level package directory"

-     exit 1

- }

- 

- (${AUTORECONF:-autoreconf} --version) < /dev/null > /dev/null 2>&1 || {

-     echo

-     echo "**Error**: You must have \`autoreconf' installed."

-     echo "Download the appropriate package for your distribution,"

-     echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"

-     DIE=1

- }

- 

- (${AUTOMAKE:-automake} --version) < /dev/null > /dev/null 2>&1 || {

-     echo

-     echo "**Error**: You must have \`automake' installed."

-     echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"

-     DIE=1

- }

- 

- if test -n "$DIE"; then

-     exit 1

- fi

- 

- if test -z "$*"; then

-     echo "**Warning**: I am going to run \`configure' with no arguments."

-     echo "If you wish to pass any to it, please specify them on the"

-     echo \`$0\'" command line."

-     echo

- fi

- 

- conf_flags=""

- 

- ${AUTORECONF:-autoreconf} --install --verbose && ./configure $conf_flags $@

file removed
-16
@@ -1,16 +0,0 @@ 

- [fedora]

- 

- ;configuration for koji cli tool

- 

- ;url of XMLRPC server

- server = https://koji.fedoraproject.org/kojihub

- 

- ;url of web interface

- weburl = https://koji.fedoraproject.org/koji

- 

- ;url of package download site

- topurl = https://kojipkgs.fedoraproject.org/

- 

- authtype = kerberos

- 

- use_fast_upload = yes

file removed
-16
@@ -1,16 +0,0 @@ 

- [stg]

- 

- ;configuration for koji cli tool

- 

- ;url of XMLRPC server

- server = https://koji.stg.fedoraproject.org/kojihub

- 

- ;url of web interface

- weburl = https://koji.stg.fedoraproject.org/koji

- 

- ;url of package download site

- topurl = https://kojipkgs.stg.fedoraproject.org/

- 

- authtype = kerberos

- 

- use_fast_upload = yes

file removed
-6
@@ -1,6 +0,0 @@ 

- AC_INIT([fedora-packager], [0.6.0.4])

- AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip tar-pax])

- AM_PATH_PYTHON(,, [:])

- AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])

- AC_PATH_PROGS(BASH, sh bash)

- AC_OUTPUT(Makefile)

file removed
-497
@@ -1,497 +0,0 @@ 

- %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)

- %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

- %endif

- 

- Name:           fedora-packager

- Version:        0.6.0.6

- Release:        2%{?dist}

- Summary:        Tools for setting up a fedora maintainer environment

- 

- License:        GPLv2+

- URL:            https://pagure.io/fedora-packager

- Source0:        https://releases.pagure.org/fedora-packager/fedora-packager-%{version}.tar.bz2

- 

- BuildRequires:  python3-devel

- BuildRequires:  make

- BuildRequires:  automake

- Requires:       koji >= 1.11.0

- Requires:       bodhi-client

- Requires:       rpm-build rpmdevtools rpmlint

- Requires:       mock curl openssh-clients

- Requires:       redhat-rpm-config

- Requires:       fedpkg >= 1.0

- Requires:       systemd

- Obsoletes:      fedora-cert < 0.6.0.3-4

- Recommends:     fedora-packager-yubikey

- Recommends:     fedora-packager-kerberos

- 

- BuildArch:      noarch

- 

- %description

- Set of utilities useful for a fedora packager in setting up their environment.

- 

- %package yubikey

- Summary:        tool for setting up a yubikey for use in Fedora

- # For fedora-burn-yubikey.py

- Requires:       python3-yubico

- Recommends:     ykpers

- 

- BuildArch:      noarch

- 

- %description yubikey

- A tool for setting up a yubikey for use in fedora

- 

- %package kerberos

- Summary:        files for connecting via kerberos to Fedora

- # This is the version in which SNI was fixed

- %if 0%{?fedora}

- Requires:       krb5-workstation >= 1.14.3-4

- %else

- %if 0%{?rhel} >= 7

- Requires:       krb5-workstation  >= 1.14.1-24

- %else

- # older rhels wont fully work without configuration, but lets make sure they have krb

- # we should be able to assume newer RHELs's will have a new enough version

- Requires:       krb5-workstation

- %endif

- %endif

- Requires:       krb5-pkinit

- 

- BuildArch:      noarch

- 

- %description kerberos

- Files for connecting via kerberos to Fedora

- 

- %prep

- %setup -q

- 

- %build

- %configure PYTHON=%{__python3}

- %make_build

- 

- %install

- %make_install

- sed -i -r 's|#!/usr/bin/python$|#!%{__python3}|' %{buildroot}/usr/*bin/*

- 

- %files

- %license COPYING

- %doc TODO AUTHORS ChangeLog

- %{_bindir}/*

- %exclude %{_bindir}/fedora-hosted

- %exclude %{_bindir}/fedora-packager-setup

- %exclude %{_bindir}/fedoradev-pkgowners

- %exclude %{_bindir}/fedora-cert

- %exclude %{_bindir}/fkinit

- %exclude %{python3_sitelib}/fedora_cert

- 

- %config(noreplace) %{_sysconfdir}/koji.conf.d/*

- 

- 

- 

- %files yubikey

- %license COPYING

- %{_sbindir}/*

- 

- %files kerberos

- %license COPYING

- %{_bindir}/fkinit

- %config %{_sysconfdir}/krb5.conf.d/*

- %{_sysconfdir}/pki/ipa/*

- 

- %changelog

- * Fri Jun 04 2021 Dusty Mabe <dusty@dustymabe.com> - 0.6.0.6-2

- - Create subpackage for kerberos configs.

- - Fixes https://pagure.io/fedora-packager/issue/152

- 

- * Tue May 11 2021 Tomas Hrcka <thrcka@redhat.com> - 0.6.0.6-1

- - Add fkinit (sgallagh)

- 

- * Fri May 07 2021 Fabian Arrotin <arrfab@centos.org> - 0.6.0.5-2

- - minor change to have centos.org alias for kerberos auth to work client side

- 

- * Mon Mar 22 2021 Mohan Boddu <mboddu@bhujji.com> - 0.6.0.5-1

- - Update README - fix typo (cheese)

- - Add pkgname helper (churchyard)

- - remove krb_rdns setting (ktdreyer)

- - Fix version and specfile (ryanlerch)

- - Add pkinit config and ipa certs (ryanlerch)

- - update ipa cert for stg after rebuild (mobrien)

- 

- * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.4-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

- 

- * Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.4-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

- 

- * Tue Mar 31 2020 Mohan Boddu <mboddu@bhujji.com> - 0.6.0.4-1

- - Rebase to 0.6.0.4

-   * Remove obsolete fedora-packager-setup (tmz)

-   * Drop mercurial formatting from .gitignore (tmz)

-   * Fix for rhbz #1412260 (sergio)

-   * Option for the mode_yubikey_otp must be bytes and not string. (cverna)

- 

- * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.2-8

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

- 

- * Wed Jan 22 2020 Dennis Gilmore <dennis@ausil.us> - 0.6.0.2-7

- - move fedora-burn-yubikey to a subpackge rhbz#756413

- 

- * Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.2-6

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

- 

- * Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.2-5

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

- 

- * Tue Nov 27 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.6.0.2-4

- - Drop obsolete scripts, switch over to python 3 (#1024796)

-   * fedora-burn-yubikey is python3 compatible

-   Those old scripts have been removed:

-   * fedora-hosted is for fedorahosted.org, which doesn't exist anymore

-   * fedora-packager-setup and fedora-cert download certificates, which

-     have been replaced by kerberos authentication

-   * fedoradev-pkgowners talks to pkgdb, which is no more

-   The fedora-cert python2 package is also removed.

-   The other scripts are most likely obsolete too, but they are just bash

-   wrappers around other tools, so they are still packaged.

- 

- * Tue Jul 31 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6.0.2-3

- - Do not require packagedb-cli, it's not used anymore (#1024838)

- 

- * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.2-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

- 

- * Sun Apr 01 2018 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.6.0.2-1

- - Rebase to 0.6.0.2

- 

- * Thu Mar 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6.0.1-5

- - Update Python 2 dependency declarations to new packaging standards

-   (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

- 

- * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.1-4

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

- 

- * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.1-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

- 

- * Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0.1-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

- 

- * Thu Dec 22 2016 Dennis Gilmore <Dennis@ausil.us> - 0.6.0.1-1

- - install and include the new config file names (dennis)

- - rename configs and enable fast upload (dennis)

- - Configuration files in /etc/koji.conf.d need to end with .conf (puiterwijk)

- 

- * Sun Dec 11 2016 Dennis Gilmore <Dennis@ausil.us> - 0.6.0.0-2

- - fix up krb5-workstation requires

- 

- * Fri Dec 09 2016 Dennis Gilmore <Dennis@ausil.us> - 0.6.0.0-1

- - Make scripts executable in GIT (opensource)

- - Update bugzilla owners URL everywhere (opensource)

- - Properly except AuthError (opensource)

- 

- * Tue Oct 25 2016 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.5.10.7-4

- - Added kerberos configuration

- 

- * Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.10.7-3

- - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

- 

- * Sun May 22 2016 Till Maas <opensource@till.name> - 0.5.10.7-2

- - Use %%license

- - Update URL

- - Add fedora-cert Requires: python-fedora (#1213068) (Mike DePaulo <mikedep333@gmail.com>)

- - Add Requires: python-offtrac (#1213075) (Mike DePaulo <mikedep333@gmail.com>)

- - Require python-yubico

- 

- * Tue Mar 01 2016 Dennis Gilmore <dennis@ausil.us> - 0.5.10.7-1

- - 0.5.10.7 release (dennis)

- - add stg-koji command and fix up secondary configs (dennis)

- - switch to tar-pax so I can make tarballs (dennis)

- - Make fedora-packager-setup work with Python 3 (ville.skytta)

- - Make fedora-cert work with Python 3 (ville.skytta)

- - Python 3 fixes (ville.skytta)

- 

- * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.10.6-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

- 

- * Tue Aug 11 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.5.10.6-1

- - Reworked yubikey code to use python-yubico rather than subprocess (puiterwijk)

- - Use python API to write yubikey (puiterwijk)

- - fedora-cert: Fix checking against the CRL (bochecha)

- - fedora-cert: Fix typo (bochecha)

- 

- * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.10.5-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

- 

- * Mon Nov 24 2014 Dennis Gilmore <dennis@ausil.us> - 0.5.10.5-1

- - remove fedora-cvs script as the cvs server no longer exists (dennis)

- - Make fas url configurable for fedora-server-ca.cert. (rbean)

- - Remove unused imports. (rbean)

- - Remove another unused import. (rbean)

- - Conditionalize CRL checking for el6. (rbean)

- - Remove unused imports. (rbean)

- - Add CRL checking to fedora-cert. (rbean)

- - fedoradev-pkgowners: Update pkgdb URL (opensource)

- 

- * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.10.4-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

- 

- * Sun Mar 23 2014 Nick Bebout <nb@fedoraproject.org> - 0.5.10.4-1

- - fix fedora-burn-yubikey script to add -oserial-api-visible

- 

- * Tue Mar 18 2014 Nick Bebout <nb@fedoraproject.org> - 0.5.10.3-1

- - fix fedora-burn-yubikey script to work with slot 2

- 

- * Thu Dec 05 2013 Denis Gilmore <dennis@ausil.us> - 0.5.10.2-1

- - update to 0.5.10.2

- - drop sparc support

- 

- * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.10.1-4

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

- 

- * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.10.1-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

- 

- * Thu Jan 03 2013 Adam Jackson <ajax@redhat.com> 0.5.10.1-2

- - Requires: packagedb-cli (which also pulls in python-bugzilla)

- 

- * Mon Dec 03 2012 Nick Bebout <nb@fedoraproject.org> - 0.5.10.1-1

- - fix fedora-burn-yubikey to allow specifying what slot to use

- 

- * Fri Aug 03 2012 Dennis Gilmore <dennis@ausil.us> - 0.5.10.0-1

- - fix up secondary arch configs for newer koji

- - clean up message for browser import

- 

- * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.9.6-3

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

- 

- * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.9.6-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

- 

- * Tue Nov 08 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.6-1

- - Install secondary-arch files correctly

- 

- * Mon Nov 07 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.5-1

- - Move fedpkg to it's own package, no longer part of fedora-packager

- 

- * Fri Oct 28 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.4-1

- - Overload curl stuff (jkeating)

- - Hardcode fedpkg version requires (jkeating)

- - Fix up changelog date (jkeating)

- 

- * Thu Oct 27 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.3-1

- - Use the new plugin setup with rpkg

- - Change fedpkg version number to 1.0

- 

- * Sat Aug 27 2011 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.5.9.2-2

- - Fix operating URL of fedoradev-pkgowners (BZ #575517).

- 

- * Sun May 22 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.2-1

- - Strip the .py off of fixbranches (jkeating)

- - Unconditionally check for new branch style (jkeating)

- - Stop setting push.default (#705468) (jkeating)

- - Make sure packages are built before lint (#702893) (jkeating)

- - Except more build submission errors (#702235) (jkeating)

- - Move the fixbranches.py script out of the $PATH (#698646) (jkeating)

- - fedpkg: Support branch completion on non-default remotes (tmz)

- - fedpkg: Update bash completion for new branch names (tmz)

- - Fix retiring a package with a provided message (#701626) (jkeating)

- - add arm specific and s390 specific packages so they get sent to the right

-   place (dennis)

- - initial go at using consistent targets across all targets dist-rawhide is

-   still used for master branch (dennis)

- - only pass in a target arch to local builds when specified on the command line

-   some arches notably x86, arm and sparc dont build for the base arch you end

-   up with .i386 .arm or .sparc rpms when you really want something else

-   (dennis)

- 

- * Thu Apr 14 2011 Jesse Keating <jkeating@redhat.com> - 0.5.9.0-1

- - Add a check for new-style branches (jkeating)

- - Add a force option (jkeating)

- - Add ability to check status of conversion (jkeating)

- - Add a dry-run option (jkeating)

- - Add a client side script to fix branch data (jkeating)

- 

- * Sat Apr 09 2011 Jesse Keating <jkeating@redhat.com> - 0.5.8.1-1

- - Man page comment syntax fix. (ville.skytta)

- - Make sure the bodhi.template file got written out (#683602) (jkeating)

- - Wrap the diff in a try (#681789) (jkeating)

- - Don't try to upload directories. (#689947) (jkeating)

- - Fix tag-request (#684418) (jkeating)

- 

- * Fri Mar 04 2011 Jesse Keating <jkeating@redhat.com> - 0.5.7.0-1

- - If chain has sets, handle them right (#679126) (jkeating)

- - Fix "fedpkg help" command (make it work again) (#681242) (hun)

- - Always generate a new srpm (#681359) (jkeating)

- - Fix up uses of path (ticket #96) (jkeating)

- - Clean up hardcoded "origin" (ticket #95) (jkeating)

- - Fix obvious error in definition of curl command (pebolle)

- 

- * Wed Feb 23 2011 Jesse Keating <jkeating@redhat.com> - 0.5.6.0-1

- - Fix improper use of strip() (jkeating)

- - Improve the way we detect branch data (jkeating)

- - Fix clone to work with old/new branch styles (jkeating)

- - Add new and old support to switch_branches (jkeating)

- - Update the regexes used for finding branches (jkeating)

- - Don't use temporary editor files for spec (#677121) (jkeating)

- - fedpkg requires rpm-build (#676973) (jkeating)

- - Don't error out just from stderr from rpm (jkeating)

- 

- * Wed Feb 09 2011 Jesse Keating <jkeating@redhat.com> - 0.5.5.0-1

- - Re-add 'lint' command hookup into argparse magic (hun)

- - Catch errors parsing spec to get name. (#676383) (jkeating)

- 

- * Wed Feb 09 2011 Jesse Keating <jkeating@redhat.com> - 0.5.4.0-1

- - Re-arrange verify-files and slight fixups (jkeating)

- - Add "fedpkg verify-files" command (hun)

- - Provide feedback about new-ticket. (ticket 91) (jkeating)

- - Add the new pull options to bash completion (jkeating)

- - Add a --rebase and --no-rebase option to pull (jkeating)

- - Update the documentation for a lot of commands (jkeating)

- - Handle working from a non-existent path (#675398) (jkeating)

- - Fix an traceback when failing to watch a build. (jkeating)

- - Handle arches argument for scratch builds (#675285) (jkeating)

- - Trim the "- " out of clogs.  (#675892) (jkeating)

- - Exit with an error when appropriate (jkeating)

- - Add build time man page generator (hun)

- - Add help text for global --user option (hun)

- - Move argparse setup into parse_cmdline function (hun)

- - Require python-hashlib on EL5 and 4 (jkeating)

- - Catch a traceback when trying to build from local branch (jkeating)

- 

- * Mon Jan 31 2011 Jesse Keating <jkeating@redhat.com> 0.5.3.0-1

- - Catch the case where there is no branch merge point (#622592) (jkeating)

- - Fix whitespace (jkeating)

- - Add an argument to override the "distribution" (jkeating)

- - upload to lookaside cache tgz files (dennis)

- - Handle traceback if koji is down or unreachable. (jkeating)

- - If we don't have a remote branch, query koji (#619979) (jkeating)

- - Add a method to create an anonymous koji session (jkeating)

- - Make sure we have sources for mockbuild (#665555) (jwboyer) (jkeating)

- - Revert "Make sure we have an srpm when doing a mockbuild (#665555)" (jkeating)

- - Regenerate the srpm if spec file is newer (ticket #84) (jkeating)

- - Improve cert failure message (Ticket 90) (jkeating)

- - Get package name from the specfile. (Ticket 75) (jkeating)

- - Handle anonymous clones in clone_with_dirs. (#660183) (ricky)

- - Make sure we have an srpm when doing a mockbuild (#665555) (jkeating)

- - Catch all errors from watching tasks. (#670305) (jkeating)

- - Fix a traceback when koji goes offline (#668889) (jkeating)

- - Fix traceback with lint (ticket 89) (jkeating)

- 

- * Wed Jan 05 2011 Dennis Gilmore <dennis@ausil.us> - 0.5.2.0-1

- - new release see ChangeLog

- 

- * Tue Aug 24 2010 Jesse Keating <jkeating@redhat.com> - 0.5.1.4-1

- - Fix setting push.default when cloning with dirs

- - Remove build --test option in bash completion

- 

- * Mon Aug 23 2010 Jesse Keating <jkeating@redhat.com> - 0.5.1.3-1

- - Error check the update call.  #625679

- - Use the correct remote when listing revs

- - Add the bash completion file

- - make fedora-cvs only do anonymous chackouts since cvs is read only now.

- - re-fix dist defines.

- - Short cut the failure on repeated builds

- - Allow passing srpms to the build command

- - clone: set repo's push.default to tracking

- - pull the username from fedora_cert to pass to bodhi

- - Catch double ^c's from build.  RHBZ #620465

- - Fix up chain building

- - Add missing process call for non-pipe no tty.

- 

- * Thu Aug 12 2010 Dennis Gilmore <dennis@asuil.us> - 0.5.1.2-1

- - fix rh bz 619733 619879 619935 620254 620465 620595 620648

- - 620653 620750 621148 621808 622291 622716

- 

- * Fri Jul 30 2010 Dennis Gilmore <dennis@ausil.us> -0.5.1.0-2

- - split fedpkg out on its own

- 

- * Thu Jul 29 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.1.0-1

- - wrap fedora-cert in try except 

- - fedpkg fixes

- - require python-kitchen on EL-4 and 5

- 

- * Wed Jul 28 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.0.1-1

- - Fix checking for unpushed changes on a branch

- 

- * Wed Jul 28 2010 Dennis Gilmore <dennis@ausil.us> - 0.5.0-1

- - update to 0.5.0 with the switch to dist-git

- 

- * Thu Jul 08 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.2.2-1

- - new release with lost of fedpkg fixes

- 

- * Mon Jun 14 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.2.1-1

- - set devel for F-14

- - point builds to koji.stg

- - correctly create a git url for koji

- 

- * Tue Mar 23 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.2-1

- - update to 0.4.2

- - adds missing fedora_cert. in fedora-packager-setup bz#573941

- - Require python-argparse for fedpkg bz#574206

- - Require make and openssh-clients bz#542209

- - Patch to make cvs checkouts more robust bz#569954

- 

- * Wed Mar 03 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.1-1

- - update to 0.4.1 

- - adds a missing "import sys" from fedora-cert bz#570370

- - Require GitPython for fedpkg

- 

- * Fri Feb 26 2010 Dennis Gilmore <dennis@ausil.us> - 0.4.0-1

- - update to 0.4.0 adds fedpkg 

- - make a fedora_cert python library 

- - add basic date check for certs 

- 

- * Tue Aug 04 2009 Jesse Keating <jkeating@redhat.com> - 0.3.8-1

- - Add fedora-hosted and require offtrac

- 

- * Thu Jul 30 2009 Dennis Gilmore <dennis@ausil.us> - 0.3.7-1

- - define user_cert in fedora-cvs before refrencing it 

- 

- * Tue Jul 28 2009 Dennis Gilmore <dennis@ausil.us> - 0.3.6-1

- - use anon checkout when a fedora cert doesnt exist bz#514108

- - quote arguments passed onto rpmbuild bz#513269

- 

- * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.5-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

- 

- * Mon Jul 13 2009 Dennis Gilmore <dennis@ausil.us> - 0.3.5-1

- - add new rpmbuild-md5 script to build old style hash srpms

- - it is a wrapper around rpmbuild

- 

- * Mon Jul  6 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 0.3.4-3

- - add Requires: redhat-rpm-config to be sure fedora packagers are using all available macros

- 

- * Wed Jun 24 2009 Dennis Gilmore <dennis@ausil.us> - 0.3.4-2

- - minor bump

- 

- * Mon Jun 22 2009 Dennis Gilmore <dennis@ausil.us> - 0.3.4-1

- - update to 0.3.4 

- - bugfix release with some new scripts

- 

- * Mon Mar 02 2009 Dennis Gilmore <dennis@ausil.us> - 0.3.3-1

- - update to 0.3.3

- 

- * Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2

- - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

- 

- * Mon Aug 18 2008 Dennis Gilmore <dennis@ausil.us> - 0.3.1-1

- - update to 0.3.1 fedora-cvs allows anonymous checkout

- - fix some Requires  add cvs curl and wget 

- 

- * Sun Mar 30 2008 Dennis Gilmore <dennis@ausil.us> - 0.3.0-1

- - update to 0.3.0 fedora-cvs uses pyOpenSSL to work out username

- - remove Requires on RCS's for fedora-hosted

- - rename fedora-packager-setup.sh to fedora-packager-setup

- 

- * Fri Feb 22 2008 Dennis Gilmore <dennis@ausil.us> - 0.2.0-1

- - new upstream release

- - update for fas2

- - fedora-cvs  can now check out multiple modules at once

- - only require git-core

- 

- * Mon Dec 03 2007 Dennis Gilmore <dennis@ausil.us> - 0.1.1-1

- - fix typo in description 

- - update to 0.1.1  fixes typo in fedora-cvs

- 

- * Sun Nov 11 2007 Dennis Gilmore <dennis@ausil.us> - 0.1-1

- - initial build

file removed
-113
@@ -1,113 +0,0 @@ 

- #!/usr/bin/python

- #

- # git-changelog - Output a rpm changelog

- #

- # Copyright (C) 2009-2010  Red Hat, Inc.

- #

- # This program is free software; you can redistribute it and/or modify

- # it under the terms of the GNU Lesser General Public License as published

- # by the Free Software Foundation; either version 2.1 of the License, or

- # (at your option) any later version.

- #

- # This program is distributed in the hope that it will be useful,

- # but WITHOUT ANY WARRANTY; without even the implied warranty of

- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

- # GNU Lesser General Public License for more details.

- #

- # You should have received a copy of the GNU Lesser General Public License

- # along with this program.  If not, see <http://www.gnu.org/licenses/>.

- #

- # Author: David Cantrell <dcantrell@redhat.com>

- # Author: Brian C. Lane <bcl@redhat.com>

- 

- import os

- import re

- import subprocess

- import sys

- import textwrap

- from optparse import OptionParser

- 

- 

- 

- class ChangeLog:

-     def __init__(self, name, version):

-         self.name = name

-         self.version = version

-         self.ignore = None

- 

-     def _getCommitDetail(self, commit, field):

-         proc = subprocess.Popen(['git', 'log', '-1',

-                                  "--pretty=format:%s" % field, commit],

-                                 universal_newlines=True,

-                                 stdout=subprocess.PIPE,

-                                 stderr=subprocess.PIPE).communicate()

- 

-         ret = proc[0].strip('\n').split('\n')

- 

-         if len(ret) == 1 and ret[0].find('@') != -1:

-             ret = ret[0].split('@')[0]

-         elif len(ret) == 1:

-             ret = ret[0]

-         else:

-             ret = filter(lambda x: x != '', ret)

- 

-         return ret

- 

-     def getLog(self):

-         if not self.name:

-             range = "%s.." % (self.version)

-         else:

-             range = "%s-%s.." % (self.name, self.version)

-         proc = subprocess.Popen(['git', 'log', '--pretty=oneline', range],

-                                 universal_newlines=True,

-                                 stdout=subprocess.PIPE,

-                                 stderr=subprocess.PIPE).communicate()

-         lines = filter(lambda x: x.find('l10n: ') != 41 and \

-                                  x.find('Merge commit') != 41 and \

-                                  x.find('Merge branch') != 41,

-                        proc[0].strip('\n').split('\n'))

- 

-         if self.ignore and self.ignore != '':

-             for commit in self.ignore.split(','):

-                 lines = filter(lambda x: not x.startswith(commit), lines)

- 

-         log = []

-         for line in lines:

-             fields = line.split(' ')

-             commit = fields[0]

- 

-             summary = self._getCommitDetail(commit, "%s")

-             long = self._getCommitDetail(commit, "%b")

-             author = self._getCommitDetail(commit, "%aE")

- 

-             log.append(("%s (%s)" % (summary.strip(), author)))

- 

-         return log

- 

-     def formatLog(self):

-         s = ""

-         for msg in self.getLog():

-             sublines = textwrap.wrap(msg, 77)

-             s = s + "- %s\n" % sublines[0]

- 

-             if len(sublines) > 1:

-                 for subline in sublines[1:]:

-                     s = s + "  %s\n" % subline

- 

-         return s

- 

- def main():

-     parser = OptionParser()

-     parser.add_option("-n", "--name", dest="name",

-                       help="Name of package used in tags")

-     parser.add_option("-v", "--version", dest="version",

-                       help="Last version, changelog is commits after this tag")

-     (options, args) = parser.parse_args()

- 

-     cl = ChangeLog(options.name, options.version)

-     print(cl.formatLog())

- 

- if __name__ == "__main__":

-     main()

- 

- 

@@ -1,22 +0,0 @@ 

- -----BEGIN CERTIFICATE-----

- MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQsFADA8MRowGAYDVQQKDBFGRURP

- UkFQUk9KRUNULk9SRzEeMBwGA1UEAwwVQ2VydGlmaWNhdGUgQXV0aG9yaXR5MB4X

- DTE2MTAxMzEzMDQ0NloXDTM2MTAxMzEzMDQ0NlowPDEaMBgGA1UECgwRRkVET1JB

- UFJPSkVDVC5PUkcxHjAcBgNVBAMMFUNlcnRpZmljYXRlIEF1dGhvcml0eTCCASIw

- DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALLFCPrsPD3YW/yzvId7UsWCq/Ac

- cD7IOtlt46slTa490TvfpwzB1IwA3H0LTEYV7LONMIxJIT8H4H2P7A/S4eDtA6sZ

- s26Qp+3YLj+jHOwvNiONG5YBIn6vgUKc1SdwyuQsNwcGsH1nV2vXrKYz4ccMud1P

- tzzwRMSWgwZLXcLvMMXYpDCxu4pVmgEtTnYz7Dii7MJ2aJsWEuslzjL6HjaegfGD

- JjXCrqmNKcgbgD7fQq05wiYw8AbArjhfObDO626b4naB0VxLb9vGTDBaRbIeL7Or

- nM11BWVqYAFFRZPL1jXkeb9Bpr9oj4PduRq6+tSZPa3wgtnoowAN2AqLHKMCAwEA

- AaOBsDCBrTAfBgNVHSMEGDAWgBQVrijBhrLB6xwkwjZroAlWJGIpvDAPBgNVHRMB

- Af8EBTADAQH/MA4GA1UdDwEB/wQEAwIBxjAdBgNVHQ4EFgQUFa4owYaywescJMI2

- a6AJViRiKbwwSgYIKwYBBQUHAQEEPjA8MDoGCCsGAQUFBzABhi5odHRwOi8vaXBh

- MDEucGh4Mi5mZWRvcmFwcm9qZWN0Lm9yZzo4MC9jYS9vY3NwMA0GCSqGSIb3DQEB

- CwUAA4IBAQAZE5ZVf2MROtRR2O00ecXwl3vBE72xw87EQdAQ6J9sDjug5YrVW6OU

- OfaRoVLyBSi5uPgj2RZ9VePdGNSDZ66DhspPtmbWcW0M1X2QPXwWQ/Idj3MfKE33

- b+V4A6T55p1kxXniNl0KZHlDVMECltwRBkd9mjr3LgWzk/EgqyiP56xrWEsvKUyv

- ZMvoyFky2/BaNTN8KOposjDQZwR5sqE/CJzm/QJPg/6zQ4/tkFDOc7ZqIVkfIqoY

- sycNYLLakqCV59xuJ2uDbV8Sn8LbH5+e3Px0mapnVxn8fJAPcCqDOmXJ5TVkVYlH

- nYYOskqEw5stHYuEwujR2uXo8vfmIMpZ

- -----END CERTIFICATE-----

@@ -1,27 +0,0 @@ 

- -----BEGIN CERTIFICATE-----

- MIIEqTCCAxGgAwIBAgIBATANBgkqhkiG9w0BAQsFADBAMR4wHAYDVQQKDBVTVEcu

- RkVET1JBUFJPSkVDVC5PUkcxHjAcBgNVBAMMFUNlcnRpZmljYXRlIEF1dGhvcml0

- eTAeFw0yMTAyMTExMzExMDBaFw00MTAyMTExMzExMDBaMEAxHjAcBgNVBAoMFVNU

- Ry5GRURPUkFQUk9KRUNULk9SRzEeMBwGA1UEAwwVQ2VydGlmaWNhdGUgQXV0aG9y

- aXR5MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA0MzQ9OVg4KTEs2Go

- ASwcW1z/tJc60x7HG5VFC6EWft3MPH1p4APLJ/BZ4F/+ChHbbG35NTig0qK0SiLY

- ct8Gyw66FoB2KQvks/1kCXuQquLnMCm9aEFAjlNDtUh9kcGrrjCfP4duwT6p/dl0

- Hue9J/FrCXfrxn3GSwizjC2ZZZV/sL3iDh3p2eBDksXpjGgQuDu2n+0g5U0dsNhM

- 9EYRkX2J/veESS3zpYDwRVHPwxIqmEGrK0wroqXwRZVf25HdsmP4B65Iz3aQKeXE

- plLtZ6P99YfORQvu9GLhcgLPl5RQpvRBGacpyzGLhXqpAIl31PyurC+9yAvLANFl

- Ncxf8ycvHGoOtiRPAbmWW+P+weuonmesHn8n3PV6JXcUkGoSFdfXw0MDAhLHCGQx

- 8DyrOZ8zskWdBzFxdCOIS/COnvUWBsjF6hzuUgIk3Ho89LyBYKZm1oC+ICTg94Au

- dE1MOZQ1A9RllN3LP1dHPiAdrtBduWPsCYcnmgeiHH+jLr2tAgMBAAGjga0wgaow

- HwYDVR0jBBgwFoAUQyunEUCOlySo2y3+sFr7ivM5yG8wDwYDVR0TAQH/BAUwAwEB

- /zAOBgNVHQ8BAf8EBAMCAcYwHQYDVR0OBBYEFEMrpxFAjpckqNst/rBa+4rzOchv

- MEcGCCsGAQUFBwEBBDswOTA3BggrBgEFBQcwAYYraHR0cDovL2lwYS1jYS5zdGcu

- ZmVkb3JhcHJvamVjdC5vcmcvY2Evb2NzcDANBgkqhkiG9w0BAQsFAAOCAYEADVXs

- 3iTxDA7cA6TDKfjs3GrHk94LnnLxAIKTubYEw1UZmVcx++JCy2uUc7Zorgq5WkNP

- xmqrKqhJTV6BzoVVhFxdof+ro3qW80dRcAtUm9heqr8HBGjoRMa/mMlDs7nb/0AH

- XLe7UWYGW3qoxxUIeMWL1U736agWVFxRSe4ng8uvrGac7tK0tW3oiAkId3PwL6BM

- jLaoMsfXFOK13GAP2P/VnuLDMJN6taR2BGQkqi7oZ9DmR6HcqG4MtYBiQgLhvH75

- JsKC/ROLtlC/gbShsy5WDy3Dbo/Ei8QMqhudQrtNlQeNUXASm8rUvkJmeIspTzPD

- fOywhVygYiyIvigGOmiuwtfpPQaPHOWsosgkwmzq104wnv2ILaQ8+oYf617bxldR

- 9d6l8OMOiYqt34fLbMSw15G+OEnl7t96USuCXIihVTU1Ykqmruhn/O4EeXd9QiIr

- 7qlGcnKJpxwLCmHBtw3kv8PgK9EjGQpLPFTPiIP0rSHTVTQFUb8IY+tGG0jz

- -----END CERTIFICATE-----

@@ -1,12 +0,0 @@ 

- [realms]

-  FEDORAPROJECT.ORG = {

-         kdc = https://id.fedoraproject.org/KdcProxy

-         kpasswd_server = https://id.fedoraproject.org/KdcProxy

-         pkinit_anchors = FILE:/etc/pki/ipa/fedoraproject_ipa_ca.crt

-  }

- [domain_realm]

-  .fedoraproject.org = FEDORAPROJECT.ORG

-  fedoraproject.org = FEDORAPROJECT.ORG

-  .centos.org = FEDORAPROJECT.ORG

-  centos.org = FEDORAPROJECT.ORG

- 

@@ -1,9 +0,0 @@ 

- [realms]

-  STG.FEDORAPROJECT.ORG = {

-         kdc = https://id.stg.fedoraproject.org/KdcProxy

-         kpasswd_server = https://id.stg.fedoraproject.org/KdcProxy

-         pkinit_anchors = FILE:/etc/pki/ipa/stg_fedoraproject_ipa_ca.crt

-  }

- [domain_realm]

-  .stg.fedoraproject.org = STG.FEDORAPROJECT.ORG

-  stg.fedoraproject.org = STG.FEDORAPROJECT.ORG

file removed
-54
@@ -1,54 +0,0 @@ 

- #!/bin/sh

- 

- set -e

- 

- wget="wget -q"

- cvs="cvs -q -z1"

- 

- me=""

- rpms=~/code/fedora

- 

- OWNERS=${OWNERS:-https://admin.fedoraproject.org/pkgdb/acls/bugzilla?tg_format=plain}

- CPAN=${CPAN:-"http://www.cpan.org"}

- packages=$HOME/.cpan/sources/modules/02packages.details.txt.gz

- 

- tmpdir=$( mktemp -d /tmp/cpancheck.XXXXXX )

- trap cleanup EXIT

- cleanup()

- {

-     set +e

-     [ -z "$tmpdir" -o ! -d "$tmpdir" ] || rm -rf "$tmpdir"

- }

- owners=$tmpdir/owners.list

- 

- mkdir -p $( dirna~/code/fedorame $packages )

- echo "Updating CPAN package details..."

- $wget -N -O $packages $CPAN/modules/$( basename $packages )

- 

- echo "Retrieving package owners list..."

- $wget -N -O $owners $OWNERS

- 

- for package in $( grep "\\b$me\\b" $owners | cut -d'|' -f2 | grep '^perl-' ) ; do

-     echo "Updating $package..."

-     ( cd $rpms && $cvs up $package )

- 

-     echo "Checking $package..."

- 

-     if [ ! -d $rpms/$package/devel ] ; then

-         echo " - No devel/, skipping..."

-         continue

-     fi

- 

-     module=$( echo $package | sed 's,^perl-,,;s/-/::/g' )

-     cpanversion=$( zgrep '^'$module' ' $packages | awk '{print $2}' )

-     pkgversion=$( grep '^Version:' $rpms/$package/devel/$package.spec \

-                     | awk '{print $2}' )

- 

-     if [ $cpanversion != $pkgversion ] ; then

-         echo " *** MISMATCH: devel is $pkgversion, CPAN is $cpanversion." >&2

-     else

-         echo "$package is up-to-date!"

-     fi

- done

- 

- # vi: set ai et:

@@ -1,93 +0,0 @@ 

- #!/usr/bin/python

- 

- # Copyright (C) 2010 Red Hat Inc.

- # Author: Mike McGrath <mmcgrath@redhat.com>

- # 

- # 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 of the License, or (at your

- # option) any later version.  See http://www.gnu.org/copyleft/gpl.html for

- # the full text of the license.

- 

- # ykpersonalize -ofixed=ccccccccccci -afcaa0c5bf2e83ec040e4aeb7f8565293 -ouid=1e7f1da7d6d1

- from fedora.client import AccountSystem, AuthError

- from getpass import getpass

- import sys

- import gettext

- from optparse import OptionParser

- import yubico

- 

- t = gettext.translation('fas', '/usr/share/locale', fallback = True)

- _ = t.gettext

- 

- try:

-     ykey = yubico.find_yubikey(False)

- except yubico.yubikey.YubiKeyError as ex:

-     print('Unable to get access to a yubikey: %s' % ex)

-     sys.exit(1)

- 

- parser = OptionParser(version = "0.1")

- parser.add_option('-u', '--username',

-                   dest = 'username',

-                   default = None,

-                   metavar = 'username',

-                   help = _('Fedora Account System username'))

- parser.add_option('-S', '--slot',

-                   dest = 'slot',

-                   default = '1',

-                   metavar = 'slot',

-                   help = _('The Yubikey slot to be used'))

- parser.add_option('-U', '--url',

-                   dest = 'url',

-                   default = 'https://admin.fedoraproject.org/accounts/',

-                   metavar = 'url',

-                   help = _('FAS URL (Default: https://admin.fedoraproject.org/accounts/'))

- 

- (opts, args) = parser.parse_args()

- slot = opts.slot

- 

- if not opts.username:

-     print(_('Please provide a username.'))

-     parser.print_help()

-     sys.exit(0)

- 

- print(_(

- '''

- Attention: You are about to reprogram your yubikey!  Please ensure it is

- plugged in to your USB slot before continuing.  The secret key currently on

- your yubikey will be destroyed as part of this operation!

- 

- '''))

- 

- print('Contacting %s' % opts.url)

- password = getpass('Password for %s: ' % opts.username)

- 

- fas = AccountSystem(username=opts.username, password=password, base_url=opts.url)

- try:

-     new_key = fas.send_request('yubikey/genkey', auth=True)

- except AuthError as e:

-     print(e)

-     sys.exit(1)

- 

- print("")

- print(_('New key generated in FAS, attempting to burn to yubikey'))

- print("")

- 

- opts = new_key['key'].split()

- 

- try:

-     ykconfig = ykey.init_config()

-     ykconfig.mode_yubikey_otp(f'h:{opts[1]}'.encode(), f'h:{opts[2]}'.encode())

-     ykconfig.fixed_string(str(f'm:{opts[0]}'))

-     ykconfig.ticket_flag('APPEND_CR', True)

-     ykconfig.config_flag('STATIC_TICKET', False)

-     if ykey.version_num() >= (2, 1):

-         ykconfig.config_flag('STRONG_PW1', False)

-         ykconfig.config_flag('STRONG_PW2', False)

-         ykconfig.config_flag('MAN_UPDATE', False)

-     if ykey.version_num() >= (2, 2):

-         ykconfig.extended_flag('SERIAL_API_VISIBLE', True)

-     ykey.write_config(ykconfig, slot=int(slot))

-     print("Success!  Your Yubikey ID is %s" % opts[0])

- except yubico.yubikey.YubiKeyError as ex:

-     print('Yubikey error: %s' % ex)

file removed
-97
@@ -1,97 +0,0 @@ 

- #!/usr/bin/python

- # fedora-cert - a command line tool to manage your fedora SSL user certificates

- #

- # Copyright (C) 2009-2014 Red Hat Inc.

- # Author(s):  Dennis Gilmore <dennis@ausil.us>

- #             Ralph Bean <rbean@redhat.com>

- #

- # 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 of the License, or (at your

- # option) any later version.  See http://www.gnu.org/copyleft/gpl.html for

- # the full text of the license.

- 

- import optparse

- import fedora_cert

- import os.path

- import sys

- 

- def main(opts):

-     if not opts.confkrb and not opts.really:

-         print("Unless you are very sure you need to, you probably "

-               "don't need to run this tool. Certificates are no "

-               "longer used by Fedora koji.")

-         print("Please see https://fedoraproject.org/wiki/ReleaseEngineering/FlagDay2016 "

-               "for more information. Pass -r if you really want a "

-               "certificate")

-         sys.exit(1)

-         return

- 

-     # lets read in the existing cert if it exists.

-     # gets us existing acc info

-     if not opts.username:

-         try:

-             username = fedora_cert.read_user_cert()

-         except:

-             print("Can't determine fas name, lets get a new cert")

-             try:

-                 fedora_cert.create_user_cert(None)

-             except fedora_cert.fedora_cert_error as e:

-                 print(e)

-                 sys.exit(1)

-             sys.exit(0)

-     else:

-         username = opts.username

- 

-     if opts.confkrb:

-         with open(os.path.expanduser('~/.fedora.upn'), 'w') as f:

-             f.write(username)

-         print('Kerberos username configured. Run kinit %s@FEDORAPROJECT.ORG' %

-               username)

-         sys.exit(0)

- 

-     #has cert expired? do we force a new cert? get a new one

-     if opts.newcert:

-         print("Getting a new User Certificate")

-         try:

-             fedora_cert.create_user_cert(username)

-         except fedora_cert.fedora_cert_error as e:

-             print(e)

-             sys.exit(1)

-         sys.exit(0)

-     if fedora_cert.certificate_expired():

-         print("Certificate has expired, getting a new one")

-         try:

-             fedora_cert.create_user_cert(username)

-         except fedora_cert.fedora_cert_error as e:

-             print(e)

-             sys.exit(1)

-         sys.exit(0)

-     if opts.verifycert:

-         print("Verifying Certificate")

-         try:

-             fedora_cert.verify_cert()

-         except fedora_cert.fedora_cert_error as e:

-             print(e)

-             sys.exit(1)

- 

-         import OpenSSL.crypto

-         if not hasattr(OpenSSL.crypto, 'load_crl'):

-             print("CRL Checking not available in this version of pyOpenSSL")

- 

- if __name__ == '__main__':

-     opt_p = optparse.OptionParser(usage="%prog [OPTIONS] ")

-     opt_p.add_option('-r', '--really', action='store_true', dest='really',

-                      default=False, help="Really get a certificate.")

-     opt_p.add_option('-u', '--username', action='store', dest='username',

-                      default=False, help="FAS Username.")

-     opt_p.add_option('-n', '--new-cert', action='store_true', dest='newcert',

-                      default=False, help="Generate a new Fedora Certificate.")

-     opt_p.add_option('-v', '--verify-cert', action='store_true', dest='verifycert',

-                      default=False, help="Verify Certificate.")

-     opt_p.add_option('-k', '--configure-krb', action='store_true', dest='confkrb',

-                      default=False, help="Configure krb5.")

- 

-     (opts, args) = opt_p.parse_args()

- 

-     main(opts)

file removed
-22
@@ -1,22 +0,0 @@ 

- #! /bin/sh

- 

- if [ $# -ne 3 ];

- then

- 	echo "Usage: $0 <project> <url> <revision>"

- 	exit 1

- fi

- 

- project=$1

- url=$2

- rev=$3

- 

- tmpdir=`mktemp -d`

- curdir=`pwd`

- 

- (

-     cd ${tmpdir}

-     LANG=C TZ=GMT svn export ${url} -r ${rev} ${project}

-     tar cjvf ${curdir}/${project}-svn${rev}.tar.bz2 ${project}

- )

- 

- rm -rf ${tmpdir}

file removed
-456
@@ -1,456 +0,0 @@ 

- #!/usr/bin/python

- # fedora-hosted - a commandline frontend for the Fedora Hosted Projects Trac

- #

- # Copyright (C) 2008 Red Hat Inc.

- # Author: Jesse Keating <jkeating@redhat.com>

- #

- # 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 of the License, or (at your

- # option) any later version.  See http://www.gnu.org/copyleft/gpl.html for

- # the full text of the license.

- 

- # TODO: this file should probably go away and be far more generic

- # And we should load specific things like url structure from a config

- # store of some sort.

- 

- import getpass

- import optparse

- import offtrac

- import sys

- import time

- import os

- import os.path

- import subprocess

- import textwrap

- import six

- from six.moves import input

- 

- # Define some constants

- BASEURL = 'fedorahosted.org/'

- WRAP_LEN = 60

- LINE_LEN = 75

- 

- # List currently available commands

- cmdlist = ('list', 'list-milestones', 'ticket-info', 'milestone-info',

-            'new-ticket', 'new-milestone', 'show', 'update-ticket', 'close')

- 

- 

- def getOtherConfiguration(opts):

-     """

-     Try to search for configuration variables in other locations,

-     than just on the command line.

- 

-     """

-     searched_keys = ('user', 'password', 'project', )

-     other_conf = {

-         'user': opts.user,

-         'password': opts.password,

-         'project': opts.project

-     }

- 

-     # Look for configuration in the configuration file

-     config_file = os.path.expanduser("~/.fedora/tracrc")

-     if os.path.exists(config_file):

-         from six.moves.configparser import SafeConfigParser

-         conf_rc = SafeConfigParser()

-         conf_rc.read(config_file)

-         if conf_rc.has_section('trac'):

-             for var in searched_keys:

-                 if (not other_conf[var]) and conf_rc.has_option('trac', var):

-                     other_conf[var] = conf_rc.get('trac', var)

- 

-     # Look for configuration in the local git configuration

-     proc = subprocess.Popen('git rev-parse --git-dir',

-         stdout=open("/dev/null", 'w'), shell=True)

-     ret = os.WEXITSTATUS(os.waitpid(proc.pid, 0)[1])

-     if ret == 0:

-         raw_value = subprocess.Popen(['git', 'config',

-             '--get-regexp', r'trac\..*'],

-             stdout=subprocess.PIPE).communicate()[0].strip()

-         values = dict([line.strip().split()[:2]

-             for line in raw_value.split('\n') if line])

-         for var in searched_keys:

-             key = "trac.%s" % var

-             if (not other_conf[var]) and key in values:

-                 other_conf[var] = values[key]

-     return other_conf

- 

- 

- def wrap_text(text, width=WRAP_LEN):

-     """

-     Wrap text without joining all lines together first. See this

-     note in the textwrap documentation:

-         If replace_whitespace is false, newlines may appear in

-         the middle of a line and cause strange output. For this

-         reason, text should be split into paragraphs (using

-         str.splitlines() or similar) which are wrapped

-         separately.

-     """

-     out = []

-     raw_lines = text.splitlines()

-     for rawl in raw_lines:

-         out += textwrap.wrap(rawl, width)

-     return out

- 

- 

- def edit_description():

-     """

-     Open editor on temporary file and return the result.

-     """

-     import tempfile

-     if 'EDITOR' in os.environ:

-         editprog = os.environ['EDITOR']

-     else:

-         editprog = "/bin/vi"

- 

-     descfile = tempfile.NamedTemporaryFile()

-     editproc = subprocess.Popen(editprog + " " + descfile.name, shell=True)

-     os.waitpid(editproc.pid, 0)[1]

-     outstr = descfile.read().strip()

-     descfile.close()

-     return outstr

- 

- 

- def list_tickets(opts):

-     """

-     List all tickets with some details.

-     """

-     # setup the query string

-     query = "status%s" % opts.status

-     if opts.owner:

-         query += "&owner=%s" % opts.owner

-     if opts.component:

-         query += "&component=%s" % opts.component

-     if opts.type:

-         query += "&type=%s" % opts.type

- 

-     results = trac.query_tickets(query)

-     tickets_info = get_ticket_info(results, comments=False)

-     for ticket in tickets_info:

-         meta = ticket[3]

-         wrapped_summary = wrap_text(meta['summary'])

-         print("%4s (%5s): %s" % ("#" + str(ticket[0]), meta['status'],

-             wrapped_summary[0]))

-         for line in wrapped_summary[1:]:

-             print("%13s %s" % ('', line))

- 

- 

- def collect_comments(ticketNos):

-     idx_keys = ('time', 'who', 'what', 'oldValue', 'newValue', 'permanent',)

-     trac.setup_multicall()

-     for ticket in ticketNos:

-         trac.server.ticket.changeLog(ticket)

-     ret = trac.do_multicall()[0]

-     changes = []

- 

-     for log_item in ret:

-         change_item = {}

-         for key in idx_keys:

-             change_item[key] = log_item[idx_keys.index(key)]

-         changes.append(change_item)

-     return changes

- 

- 

- def show_tickets(tickets):

-     for ticket in tickets:

-         meta = ticket[3]

-         wrapped_summary = wrap_text(meta['summary'])

-         wrapped_desc = wrap_text(meta['description'])

-         if not wrapped_desc:  # yes, I have managed to have empty description

-             wrapped_desc = [""]

-         if 'milestone' not in meta:

-             meta['milestone'] = "<none>"

- 

-         print("%4s (%5s): %s" % ('#' + str(ticket[0]), meta['status'],

-             wrapped_summary[0]))

-         for line in wrapped_summary[1:]:

-             print("%14s %s" % ('', line))

-         print("%s" % "-" * LINE_LEN)

-         print("component: %s, priority: %s, milestone: %s" % \

-             (meta['component'], meta['priority'], meta['milestone']))

-         print("%s" % "=" * LINE_LEN)

-         print("Description: %s" % wrapped_desc[0])

-         for line in wrapped_desc[1:]:

-             print("%12s %s" % ('', line))

- 

-         for item in meta['changelog']:

-             if item['what'] == 'comment' and item['newValue']:

-                 wrapped_comment = wrap_text(six.u(item['newValue']),

-                     WRAP_LEN + 9)

-                 print("%s\n%2s: %s" % ('-' * LINE_LEN, item['oldValue'],

-                     wrapped_comment[0]))

-                 for line in wrapped_comment[1:]:

-                     print("%3s %s" % ('', line))

-         if len(tickets) > 1:

-             print("\n")

- 

- 

- def get_ticket_info(args, comments=True):

-     out = []

-     # Setup the trac object for multicall

-     trac.setup_multicall()

-     for number in args:

-         trac.get_ticket(number)

-     # Do the multicall and print out the results

-     for result in trac.do_multicall():

-         if comments:

-             result[3]['changelog'] = collect_comments([result[0]])

-         out.append(result)

-     return out

- 

- 

- # Define some functions

- def setup_action_parser(action):

-     """Setup parsers for the various action types"""

- 

-     usage = "usage: %%prog %s [options]" % action

-     p = optparse.OptionParser(usage=usage)

- 

-     if action == "list":

-         p.add_option("--owner", "-o")

-         p.add_option("--status", "-s", default="!=closed",

-                      help="Query string for status, default is '!=closed'")

-         p.add_option("--component", "-c")

-         p.add_option("--type", "-t")

- 

- #    elif action == "list-milestones":

- #        p.add_option("--name", "-n",

- #                     help="Show information about a particular milestone")

- #        p.add_option("--all", "-a", action="store_true",

- #                     help="Show all milestones, otherwise only show active.")

- 

-     elif action == "ticket-info":

-         p.set_usage("usage: %%prog %s [ticket numbers]" % action)

- 

-     elif action == "show":

-         p.set_usage("usage: %%prog %s [ticket numbers]" % action)

- 

-     elif action == "milestone_info":

-         p.set_usage("usage: %%prog %s [milestones]" % action)

- 

-     elif action == "new-ticket":

-         p.add_option("--summary", "-s", help="REQUIRED!")

-         p.add_option("--description", "-d", default=None)

-         p.add_option("--descedit", "-D", action="store_true", dest="descedit")

-         p.add_option("--type", "-t", default=None)

-         p.add_option("--priority", "-p", default=None)

-         p.add_option("--milestone", "-m", default=None)

-         p.add_option("--component", "-C", default=None)

-         p.add_option("--version", "-v", default=None)

-         p.add_option("--keyword", "-k", action="append",

-                      help="Keyword to add, can be used multiple times.")

-         p.add_option("--assignee", "-a", default=None)

-         p.add_option("--cc", action="append",

-                      help="Carbon Copy address, can be used multiple times.")

-         # This one is a little backwards.  The rpc call is actually notify,

-         # and defaults to false, but we want to default to true.

-         p.add_option("--stealth", action="store_false", default=True,

-                      help="Suppress initial notification of this ticket.")

- 

-     elif action == "update-ticket":

-         p.add_option("--ticket", "-n", help="Ticket number.  REQUIRED!")

-         p.add_option("--comment", "-c", default='',

-             help="Value - make program to open $EDITOR for editing it.")

-         p.add_option("--summary", "-s", default=None)

-         p.add_option("--description", "-d", default=None)

-         p.add_option("--type", "-t", default=None)

-         p.add_option("--priority", "-p", default=None)

-         p.add_option("--milestone", "-m", default=None)

-         p.add_option("--component", "-C", default=None)

-         p.add_option("--version", "-v", default=None)

-         p.add_option("--keyword", "-k", action="append",

-                      help="Keyword to add, can be used multiple times.")

-         p.add_option("--assignee", "-a", default=None)

-         p.add_option("--cc", action="append",

-                      help="Carbon Copy address, can be used multiple times.")

-         p.add_option("--status", "-S", default=None)

-         p.add_option("--resolution", "-r", default=None)

-         # This one is a little backwards.  The rpc call is actually notify,

-         # and defaults to false, but we want to default to true.

-         p.add_option("--stealth", action="store_false", default=True,

-                      help="Suppress notification of this update.")

- 

-     elif action == "close":

-         p.add_option("--comment", "-c", default='', help="Comment; - to open $EDITOR.")

-         p.add_option("--resolution", "-r", default=None)

-         p.add_option("--ticket", "-n", default=None, help="Ticket number")

-         p.add_option("--stealth", action="store_false", default=True,

-                      help="Suppress notification of this update.")

- 

-     elif action == "new-milestone":

-         p.add_option("--name", "-n", help="REQUIRED!")

-         p.add_option("--description", "-d", default=None)

-         p.add_option("--due", "-D", default=None,

-                      help="Due date in MM-DD-YY format.")

- 

-     return p

- 

- 

- # get command line options

- usage = "usage: %prog [global options] COMMAND [options]"

- usage += "\nCommands: %s" % ', '.join(cmdlist)

- parser = optparse.OptionParser(usage=usage)

- parser.disable_interspersed_args()

- 

- parser.add_option("--user", "-u")

- parser.add_option("--password", "-p")

- parser.add_option("--project", "-P")

- 

- # Parse our global options

- (opts, args) = parser.parse_args()

- 

- # See if we got a command

- if len(args) and args[0] in cmdlist:

-     action = args.pop(0)

- else:

-     parser.print_help()

-     sys.exit(1)

- 

- # Parse the command

- action_parser = setup_action_parser(action)

- (actopt, actargs) = action_parser.parse_args(args)

- 

- # Check other locations of configuration for required variables

- oopts = getOtherConfiguration(opts)

- 

- if not oopts['user']:

-     oopts['user'] = input('Username: ')

- 

- if not oopts['password']:

-     oopts['password'] = getpass.getpass('Password for %s: ' % oopts['user'])

- 

- if not oopts['project']:

-     oopts['project'] = input('Project space: ')

- 

- 

- # Create the TracServ object

- uri = 'https://%s:%s@%s/%s/login/xmlrpc' % (oopts['user'],

-                                             oopts['password'],

-                                             BASEURL,

-                                             oopts['project'])

- trac = offtrac.TracServer(uri)

- 

- # Try to do something

- if action == "list":

-     list_tickets(actopt)

- elif action == "list-milestones":

-     results = trac.list_milestones()

-     print(results)

- 

- elif action == "ticket-info":

-     if not actargs:  # FIXME, this isn't working

-         action_parser.print_help()

-         sys.exit(1)

-     print("\n".join([six.u(ticket) for ticket in get_ticket_info(actargs)]))

- 

- elif action == "show":

-     if not actargs:  # FIXME, this isn't working

-         action_parser.print_help()

-         sys.exit(1)

-     show_tickets(get_ticket_info(actargs))

- 

- elif action == "milestone-info":

-     if not actargs:  # FIXME, this isn't working

-         action_parser.print_help()

-         sys.exit(1)

-     trac.setup_multicall()

-     for milestone in actargs:

-         trac.get_milestone(milestone)

-     for result in trac.do_multicall():

-         print(result)

- 

- elif action == "new-ticket":

-     # Check to make sure we got all we need

-     if actopt.summary and (actopt.description or actopt.descedit):

-         pass

-     else:

-         action_parser.print_help()

-         sys.exit(1)

-     # Wrap up our keywords and cc into one string, if any

-     keywords = None

-     ccs = None

-     if actopt.keyword:

-         keywords = ' '.join(actopt.keyword)

-     if actopt.cc:

-         ccs = ' '.join(actopt.cc)

- 

-     if actopt.descedit:

-         actopt.description = edit_description()

- 

-     result = trac.create_ticket(actopt.summary, actopt.description,

-                               actopt.type, actopt.priority, actopt.milestone,

-                               actopt.component, actopt.version, keywords,

-                               actopt.assignee, ccs, actopt.stealth)

-     print(result)

- 

- elif action == "update-ticket":

-     # Check to make sure we got all we need

-     if actopt.ticket:

-         pass

-     else:

-         action_parser.print_help()

-         sys.exit(1)

- 

-     if actopt.comment == "-":

-         actopt.comment = edit_description()

- 

-     # Wrap up our keywords and cc into one string, if any

-     keywords = None

-     ccs = None

-     if actopt.keyword:

-         keywords = ' '.join(actopt.keyword)

-     if actopt.cc:

-         ccs = ' '.join(actopt.cc)

- 

-     result = trac.update_ticket(actopt.ticket, actopt.comment, actopt.summary,

-                                 actopt.type, actopt.description,

-                                 actopt.priority, actopt.milestone,

-                                 actopt.component, actopt.version, keywords,

-                                 ccs, actopt.status, actopt.resolution,

-                                 actopt.assignee, actopt.stealth)

- 

-     if result[0].isdigit():

-         print("Something's wrong; result:\n%s" % result)

-         sys.exit(2)

- 

- elif action == "close":

-     if (len(actargs) > 0) and actargs[-1].isdigit():

-         actopt.ticket = int(actargs[-1])

- 

-     if (not actopt.ticket):

-         action_parser.print_help()

-         sys.exit(1)

-     else:

-         actopt.status = "closed"

- 

-     if not actopt.resolution:

-         if (len(actargs) > 1):

-             actopt.resolution = actargs[-2]

-         else:

-             actopt.resolution = "fixed"

- 

-     if actopt.comment == "-":

-         actopt.comment = edit_description()

- 

-     result = trac.update_ticket(actopt.ticket, actopt.comment,

-                                 status=actopt.status, resolution=actopt.resolution,

-                                 notify=actopt.stealth)

- 

-     if result[3]['status'] == 'closed':

-         print("OK")

-     else:

-         print("Something is wrong; result:\n%s" % result)

-         sys.exit(2)

- 

- elif action == "new-milestone":

-     if not actopt.name:

-         action_parser.print_help()

-         sys.exit(1)

-     # Convert due date to seconds if needed

-     due = None

-     if actopt.due:

-         due = int(time.mktime(time.strptime(actopt.due, "%m-%d-%y")))

- 

-     result = trac.create_milestone(actopt.name, actopt.description, due)

-     print(result)  # The result here is "0" if successful, printing isn't fun

file removed
-1847
@@ -1,1847 +0,0 @@ 

- #!/usr/bin/env python 

- #

- # QA check script.

- #

- # Input a bug id, and it downloads the SRPM and checks it. 

- # See --help for more info

- #

- # Created Mar 8 2004 by Erik S. LaBianca <erik[AT]ilsw.com>

- # Modified by Aurelien Bompard <gauret[AT]free.fr>

- # Mostly rewritten in September 2005 by Aurelien Bompard for Fedora Extras

- #

- # License: GPL

- #

- 

- # TODO: Packaging/Guidelines#FileDeps

- #       Check that all files are UTF-8 encoded

- #       Packaging/Conflicts

- 

- version = "$Rev: 181 $"[6:-2]

- 

- REQUIRES = ["/usr/bin/mock", "/usr/bin/less", "/usr/bin/diff", "/usr/bin/rpmlint",

-             "/usr/bin/desktop-file-validate" ]

- 

- GUIDELINES = [ { "name": "Guidelines", 

-                  "version": 119 },

-                { "name": "ReviewGuidelines", 

-                  "version": 52 },

-              ]

- 

- SELF_URL = "http://gauret.free.fr/fichiers/rpms/fedora/fedora-qa"

- 

- import sys

- try:

-     import re

-     import os.path

-     import commands # XXX py3

-     import rpm

-     import rpmUtils

-     import getopt

-     import urlgrabber

-     import urlgrabber.progress

-     import md5

-     import xml

-     from xml.dom import minidom

-     from six.moves import configparser, input

-     import yum

-     import glob

-     import stat

- except ImportError as e:

-     print("ERROR importing a module:")

-     print(e)

-     sys.exit(1)

- except KeyboardInterrupt:

-     print("Interrupted by user")

-     sys.exit(1)

- 

- 

- ###########################

- 

- # General functions

- 

- class QAError(Exception): pass

- 

- 

- def pr(text, debug_text=1):

-     """print function taking debug mode into account"""

-     if debug == 0:

-         return

-     elif debug >= debug_text:

-         print(text)

- 

- def parse_options():

-     '''Parses command line options with getopts and returns a tuple'''

-     shortOpts = "dhiulc:bov"

-     longOpts = ["debug", "help", "livna", "usage", "list", "check=", "build", "local", "version"]

-     try:

-         optlist, args = getopt.gnu_getopt(sys.argv[1:], shortOpts, longOpts)

-     except getopt.GetoptError as e:

-         print("You asked for an invalid option:")

-         print(e)

-         print("")

-         print_usage()

-     debug = 1

-     bugID = 0

-     origin = "fedora"

-     do_checks = []

-     local = False

-     for opt, arg in optlist:

-         if opt == "-d" or opt == "--debug":

-             debug = 2

-         elif opt == "-h" or opt == "--help" \

-           or opt == "-u" or opt == "--usage":

-             print_usage()

-         elif opt == "-i" or opt == "--livna":

-             origin = "livna"

-         elif opt == "-l" or opt == "--list":

-             for check in list_checks():

-                 print("%s : %s" % (check, getattr(eval(check),"__doc__")))

-             sys.exit(0)

-         elif opt == "-c" or opt == "--check":

-             do_checks = arg.split(",")

-         elif opt == "-b" or opt == "--build":

-             add_check = False

-             for check in list_checks():

-                 if check == "CheckBuildMock":

-                     add_check = True

-                 if add_check:

-                     do_checks.append(check)

-         elif opt == "-o" or opt == "--local":

-             local = True

-         elif opt == "-v" or opt == "--version":

-             print("%s version %s" % (os.path.basename(sys.argv[0]), version))

-             sys.exit(0)

-     if len(args) != 1:

-         print_usage()

-     else:

-         arg = args[0]

-     return (arg, origin, debug, do_checks, local)

- 

- def print_usage():

-     scriptName = os.path.basename(sys.argv[0])

-     print("""Description of %s:

- Starts the Fedora QA process by downloading the most recent SRPM from bugzilla,

- and doing most of the QA checks automatically.

- 

- Usage:

-  %s [options] [bugzilla_bug_id | srpm_filename]

- 

- Options:

-  -d, --debug  .................... debug mode

-  -l, --list   .................... list all available checks

-  -c <check>, --check=<check>  .... only run the specified check

-  -b, --build  .................... only run the build and the following checks

-  -i, --livna  .................... process a livna package

-  -o, --local  .................... use the local files (don't download anything)

-  -h, --help  ..................... this help message

-  -u, --usage  .................... this help message

-  -v, --version  .................. print the version

- """ % (scriptName, scriptName))

-     sys.exit(1)

- 

- def list_checks():

-     """Lists available checks"""

-     checks = []

-     for name in globals().keys():

-         if type(eval(name)) == type(QACheck) and issubclass(eval(name), QACheck) and name != "QACheck":

-             checks.append(name)

-     checks.sort(lambda x,y: cmp(eval(x).order, eval(y).order))

-     return checks

- 

- def check_requires(requires_list):

-     for file in requires_list:

-         if not os.path.exists(file):

-             print("ERROR ! Missing dependency: "+file)

-             sys.exit(1)

- 

- def parse_config():

-     conffilepath = "%s/.fedora-qa" % os.getenv("HOME")

-     if not os.path.exists(conffilepath):

-         conffile = open(conffilepath, "w")

-         conffile.write("[DEFAULTS]\nreportsdir = ~/reports\n")

-         conffile.close()

-     confparser = configparser.ConfigParser()

-     confparser.read(conffilepath)

-     conf = {}

-     for name, value in confparser.items("DEFAULTS"):

-         conf[name] = os.path.expanduser(value)

-     return conf

- 

- def check_guidelines(pages):

-     '''Checks if the guidelines have changed, and warn about it'''

-     baseurl = "http://fedoraproject.org/wiki/Packaging/"

-     for page in pages:

-         try:

-             data = urlgrabber.urlread("%s%s?action=info" % (baseurl, page["name"]))

-             #version_list = re.compile('\n<tr>  <td>([0-9]+)</td>\n  <td>[0-9: -]{19}</td>\n  <td>[0-9]+</td>\n').findall(data)

-             version_list = re.compile('\n<tr>  <td>([0-9]+)</td>\n').findall(data)

-         except urlgrabber.grabber.URLGrabError:

-             version_list = []

-         if version_list == []:

-             print("Warning: I can't check if the wiki page %s has changed" % page["name"])

-             continue

-         version = version_list[0] # First version number in page -> last version of the page

-         if not version:

-             print("Warning: I can't check if the wiki page %s has changed" % page["name"])

-             return

-         if int(version) > page["version"]:

-             print("Warning: the guidelines have changed !")

-             print("Please check what changed in the following page:")

-             print(baseurl+page["name"])

-             print("since revision %s, or get an updated version of this script from:" % page["version"])

-             print(SELF_URL)

- 

- 

- ############################

- ############################

- 

- class QAPackageError(QAError): pass

- 

- # Class for the src.rpm

- 

- class QAPackage:

-     """This object is a package to run the QA tests on

-        The constructor takes the filename as its argument"""

- 

-     sources = {}

-     patches = {}

-     sourceMd5 = {}

-     sourcedir = ""

-     rpmfilenames = []

-     needswork = []

-     passed = []

-     info = []

-     checklist = []

-     hdr = None

-     spec = None

-     total_checks = 0

- 

-     def __init__(self, filename, origin="fedora", reportDir=""):

-         self.filename = filename

-         if not os.path.exists(filename):

-             raise QAPackageError("no such SRPM")

-         self.origin = origin

-         pr("Setting srpm variables", 2)

-         self.set_srpm_variables()

-         # create dir for reports

-         if reportDir == "":

-             self.reportDir = "reports/"+self.name

-         else:

-             self.reportDir = reportDir+"/"+self.name

-         if not os.path.exists(self.reportDir):

-             os.makedirs(self.reportDir)

-         self.notes = os.path.join(self.reportDir, "notes")

-         if not os.path.exists(self.notes):

-             notes = open(self.notes, "w")

-             notes.write("Notes:\n\n")

-             notes.close()

- 

-     def set_srpm_variables(self):

-         '''get the rpm variables from the srpm'''

-         # set specfile

-         ts = rpm.ts("", rpm._RPMVSF_NOSIGNATURES)

-         self.hdr = rpmUtils.miscutils.hdrFromPackage(ts, self.filename)

-         filelist = self.hdr[rpm.RPMTAG_FILENAMES]

-         fileflags = self.hdr[rpm.RPMTAG_FILEFLAGS]

-         try:

-             specfile = filelist[ fileflags.index(32) ]

-         except ValueError:

-             raise QAPackageError("ERROR: Didn't find spec file !")

-         specdir = commands.getoutput('rpm -q --qf "$(rpm -E %%{_specdir})" --nosignature -p %s 2>/dev/null' % self.filename)

-         self.specfile = os.path.join(specdir, specfile)

-         pr("Specfile found: %s" % self.specfile, 2)

-         # set tags

-         fedoraver = commands.getoutput('rpm -q --qf "%{version}" fedora-release')

-         naevr = rpmUtils.miscutils.pkgTupleFromHeader(self.hdr)

-         self.name = naevr[0]

-         self.version = naevr[3]

-         self.arch = naevr[1]

-         self.epoch = naevr[2]

-         self.release = naevr[4]

-         # arch is noarch or default buildarch

-         buildarch = commands.getoutput('rpm --eval "%_arch"')

-         if self.arch != "noarch":

-             self.arch = buildarch

-         # set paths

-         # do as specdir, if sourcedir contains %name...

-         self.sourcedir = commands.getoutput('rpm -q  --qf "$(rpm -E %%{_sourcedir})" --nosignature -p %s 2>/dev/null' % self.filename)

-         # extract specfile

-         os.system('rpm2cpio %s | cpio --quiet -i %s 2>/dev/null' % (self.filename, specfile))

-         # extracts sources and URLs from the spec file

-         self.spec = ts.parseSpec(specfile)

-         sourceList = self.spec.sources()

-         for (name, id, type) in sourceList:

-             if type == 1: # Source

-                 self.sources[id] = name

-             elif type == 2: # Patch

-                 self.patches[id] = name

-         # Get the list of binary rpms from the specfile - does not always work, see php-extras package

-         #rpmFileList = commands.getoutput('rpm -q --define "dist .fc%s" ' % fedoraver \

-         #                +'--qf "%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm\n" --specfile %s' % specfile).split('\n')

-         #for file in rpmFileList:

-         #    if not file.startswith(self.name+"-debuginfo"):

-         #        self.rpmfilenames.append(file)

-         # remove extracted specfile

-         os.remove(specfile)

- 

- 

-     def rpmEval(self, text):

-         '''Evaluate a variable with rpm's variables set and returns it'''

-         command = "rpmbuild -bp --nodeps --force --define '__spec_prep_pre echo %s; exit 0' --define 'setup :' %s | tail -n 1" % (text, self.specfile)

-         return commands.getoutput(command)

- 

-     def installSRPM(self):

-         '''installs the SRPM on the system, and backs up the old spec file if it exists'''

-         if os.path.exists(self.specfile):

-             os.rename(self.specfile, self.specfile+".old")

-         installStatus, installOutput = commands.getstatusoutput('rpm --nosignature -i %s' % (self.filename))

-         if installStatus > 0:

-             raise QAPackageError("ERROR: Unable to install SRPM: %s" % installOutput)

- 

-     def getReleaseFromSpec(self):

-         '''Call rpm on the specfile to get the dist tag right on the release tag. Can only be done after install'''

-         self.release = commands.getoutput('rpm -q --qf "%%{R}\n" --nosignature --specfile %s 2>/dev/null | head -1' % self.specfile)

- 

-     def setChecks(self, list):

-         self.checklist = list

- 

-     def addCheck(self, check):

-         self.checklist.append(check)

- 

-     def getReport(self, printonly=False):

-         '''Print out the QA report'''

-         report = "Review for release %s:\n" % self.release

-         for item in self.passed:

-             report += "* %s\n" % item

-         report += "* INSERT RESULT OF RUN TEST\n"

-         if self.needswork != []:

-             report += "\nNeeds work:\n"

-             for item in self.needswork:

-                 report += "* %s\n" % item

-         if self.info != []:

-             report += "\nMinor:\n"

-             for item in self.info:

-                 report += "* %s\n" % item

-         report += "\n(%s checks have been run)\n" % self.total_checks

-         report += "\n\n"

-         notesFD = open(self.notes, "r")

-         report += notesFD.read()

-         notesFD.close()

-         return report

- 

-     def printReport(self):

-         """Prints the report to stdout"""

-         report = self.getReport()

-         pr("----------------------------------------")

-         pr(report)

-         pr("----------------------------------------")

-         pr('All files can be found in the "%s" directory' % self.reportDir)

-         pr('The spec file is "%s"' % self.specfile)

- 

-     def saveReport(self):

-         """Saves the report to the reportDir"""

-         report = self.getReport()

-         reportFD = open(os.path.join(self.reportDir, "report"), "w")

-         reportFD.write(report)

-         reportFD.close()

- 

-     def runChecks(self):

-         pr("Checking %s, version %s, release %s..." % (self.name, self.version, self.release))

-         self.checklist.sort()

-         for check_item in self.checklist:

-             check_item.check()

- 

- 

- 

- ##########################

- 

- # Test Class :

- 

- class QACheck:

- 

-     target = None

-     order = 0

-     editor = "vim -o" # Vim in multiwindow mode. Use "Ctrl+W +" to enlarge the current window

- 

-     def __init__(self, target):

-         """Needs a QAPackage as argument: the package to test on"""

-         self.target = target

-         if "EDITOR" in os.environ:

-             self.editor = os.environ["EDITOR"]

- 

-     def __cmp__(self, other):

-         if other.order > self.order:

-             return -1

-         elif other.order == self.order:

-             return 0

-         elif other.order < self.order:

-             return 1

- 

-     def has_passed(self, message):

-         """ The test passed """

-         self.target.passed.append(message)

- 

-     def has_failed(self, message, severity="needswork"):

-         """ The test failed """

-         pr(message)

-         if severity == "info":

-             self.target.info.append(message)

-         else:

-             self.target.needswork.append(message)

- 

-     def approve(self, testname):

-         """asks the user if he likes what he sees, and if not, generate a needswork review"""

-         pr(testname+": is it OK ? (press Enter if yes, or else type your comment below)")

-         answer = input().strip()

-         if answer == "":

-             self.has_passed(testname+" looks OK")

-         else:

-             self.has_failed(testname+": "+answer)

- 

-     def ask(self, prompt, default="y"):

-         """asks a question and returns true or false"""

-         if default == "y":

-             choice = " ([y]/n)"

-         else:

-             choice = " (y/[n])"

-         print(prompt+choice)

-         answer = raw_input().strip()

-         if (default == "y" and answer != "n") or answer == "y":

-             return 1

-         else:

-             return 0

- 

-     def check_built(self):

-         """Checks that the binary rpm is built."""

-         files = "%s/*-%s-%s*.%s.rpm" % (self.target.reportDir, self.target.version, 

-                                         self.target.release, self.target.arch)

-         rpms_list = glob.glob(files)

-         rpms_list = [ os.path.basename(r) for r in rpms_list ]

-         if not rpms_list:

-             pr("Binary package is not built yet")

-             #print(files)

-             return False

-         else:

-             self.target.rpmfilenames = rpms_list

-             return True

- 

-     def check(self):

-         """main checking function, to be redefined by subclasses"""

-         self.target.total_checks += 1

-         pass

- 

- 

- ##########################

- # Checks

- 

- class CheckName(QACheck):

-     """ask the user if the name-version-release is correct"""

- 

-     order = 10

- 

-     def check(self):

-         pr("Checking name", 2)

-         message_failed = "Package does not follow Fedora's package naming guildlines\n  (wiki: PackageNamingGuidelines)"

-         if self.target.origin == "livna":

-             ext = ".lvn."

-         else:

-             ext = ""

-         if self.target.release.count(ext) == 0:

-             self.has_failed(message_failed)

-             return

-         version_regexp = re.compile(r"""^

-             [\d\.]+     # version number

-             ([a-z]+)?   # optional tag for quick bugfix release

-             $""", re.VERBOSE)

-         release_regexp = re.compile(r"""^

-             (           # Either normal release tag, or non-numeric (pre-releases, snapshots)

-             [1-9]+\d*   # normal release number, to be incremented. Does not start with 0

-             |           # now come the non-numeric cases

-             0\.         # pre-release: prefix with 0

-             [1-9]+\d*   # release number, to be incremented. Does not start with 0

-             \.\w+       # alphatag or snapshot tag

-             )           # end of the non-numeric cases

-             (\.fc\d+    # dist tag

-             (\.\d+)?    # minor release bumps for old branches

-             )?          # the dist tag is optional, and minor release bumps for old branches may only be used if dist tag is used

-             $""", re.VERBOSE)

-         # tested with: all examples on the PackageNamingGuidelines, plus:

-         #   "1" (good), 

-         #   "1.fc6" (good), 

-         #   "0.1.a" (good), 

-         #   "0.2a" (bad, "a" should be after a dot),

-         #   "1.fc6.1" (good, branch-specific bump)

-         #   "1.1" (bad, branch-specific bump without the dist tag)

- 

-         version_match = version_regexp.match(self.target.version)

-         release_match = release_regexp.match(self.target.release)

-         question = "Are the name, version and release correct according to Fedora's package naming guidelines " \

-                   +"(http://fedoraproject.org/wiki/Packaging/NamingGuidelines)"

-         if version_match and release_match:

-             question += "\n(looks good to my automatic check)"

-         else:

-             question += "\n(looks wrong to my automatic check)"

-         answer = self.ask(question)

-         if answer == 1:

-             self.has_passed("RPM name is OK")

-         else:

-             self.has_failed(message_failed)

-         self.target.total_checks += 1

- 

- 

- class CheckSpecDiff(QACheck):

-     """diff the spec files in case of update"""

- 

-     order = 20

- 

-     def check(self):

-         pr("Checking spec diff", 2)

-         if os.path.exists(self.target.specfile+".old"):

-             diff = commands.getoutput('diff -bu "%s.old" "%s"' % (self.target.specfile, self.target.specfile))

-             diffFilePath = os.path.join(self.target.reportDir,"spec.diff")

-             if diff == "":

-                 pr("The spec file didn't change", 2)

-                 if os.path.exists(diffFilePath):

-                     if self.ask("View the last spec diff ?"):

-                         os.system('%s "%s" "%s"' % (self.editor, diffFilePath, self.target.notes))

-             else:

-                 diffFd = open(diffFilePath, "w")

-                 diffFd.write(diff)

-                 diffFd.close()

-                 if self.ask("Diff the spec files ?"):

-                     os.system('%s "%s" "%s"' % (self.editor, diffFilePath, self.target.notes))

- 

- 

- class CheckSources(QACheck):

-     """check upstream sources: returns a list of lines for the report"""

- 

-     order = 30

- 

-     def check(self):

-         pr("Checking upstream sources", 2)

-         for (sourceId, sourceUrl) in self.target.sources.items():

-             sourceFileName = os.path.basename(sourceUrl)

-             if sourceUrl.count('tp://') == 0 and sourceUrl.count('https://') == 0:

-                 if self.ask("Source %s is not downloadable (%s). View it in 'less' ?" % (sourceId, sourceUrl)):

-                     os.system('less "%s"' % self.target.sourcedir+"/"+sourceFileName)

-             else:

-                 pr("Checking source %s" % sourceId)

-                 if os.path.exists(sourceFileName):

-                     pr("Using already downloaded source", 2)

-                 else:

-                     pr("Downloading source from %s" % sourceUrl, 2)

-                     try:

-                         urlgrabber.urlgrab(sourceUrl, reget='check_timestamp', progress_obj=urlgrabber.progress.TextMeter(fo=sys.stdout))

-                     except urlgrabber.grabber.URLGrabError as e:

-                         self.has_failed("Source %s is not available (%s)\n  (wiki: QAChecklist item 2)" % (sourceId, sourceUrl))

-                         pr(e, 2)

-                         continue

-                 if os.path.exists(sourceFileName):

-                     upstream_file = open(sourceFileName, "r")

-                     upstream_md5 = md5.new(upstream_file.read()).hexdigest()

-                     upstream_file.close()

-                     local_file = open(self.target.sourcedir+"/"+sourceFileName, "r")

-                     local_md5 = md5.new(local_file.read()).hexdigest()

-                     if upstream_md5 == local_md5:

-                         self.has_passed("Source %s is the same as upstream" % sourceFileName)

-                     else:

-                         self.has_failed("Source "+sourceFileName+" is different from upstream\n  (wiki: QAChecklist item 2)")

-         self.target.total_checks += 1

- 

- 

- class CheckPatches(QACheck):

-     """checks the patches in the srpm"""

- 

-     order = 40

- 

-     def check(self):

-         pr("Checking patches", 2)

-         if not self.target.patches:

-             return

-         pr("Patches found: %s." % ", ".join(self.target.patches.values()) )

-         if self.ask("Look at the patches ?"):

-             for (patchId, patchName) in self.target.patches.items():

-                 os.system('%s "%s" "%s"' % (self.editor, self.target.sourcedir+"/"+os.path.basename(patchName), self.target.notes))

-         self.target.total_checks += 1

- 

- 

- class CheckBRConsistency(QACheck):

-     """Checks that only one of $RPM_BUILD_ROOT or %{buildroot} is used"""

- 

-     order = 50

- 

-     def check(self):

-         pr("Checking BuildRoot Consistency", 2)

- # TODO: do it in python with re

-         use_shell = 0

-         use_macro = 0

-         status, output = commands.getstatusoutput("grep -qs '\$RPM_BUILD_ROOT' %s" % self.target.specfile)

-         if status == 0:

-             use_shell = 1

-         status, output = commands.getstatusoutput("egrep -qs '%%\{?buildroot\}?' %s" % self.target.specfile)

-         if status == 0:

-             use_macro = 1

-         if use_shell and use_macro:

-             self.has_failed("Use of buildroot is not consistant\n  (wiki: Packaging/Guidelines#UsingBuildRootOptFlags)")

-         self.target.total_checks += 1

- 

- 

- class CheckBuildRoot(QACheck):

-     """Checks that the BuildRoot is the Fedora-preferred one"""

- 

-     order = 60

- 

-     def check(self):

-         pr("Checking buildroot", 2)

-         buildroot = self.target.spec.buildRoot()

-         preferred_br_tag = "%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)"

-         preferred_br = self.target.rpmEval(preferred_br_tag)

-         if buildroot != preferred_br:

-             self.has_failed("BuildRoot should be "+preferred_br_tag+"\n  (wiki: Packaging/Guidelines#BuildRoot)")

-         self.target.total_checks += 1

- 

- 

- class CheckDFU(QACheck):

-     """Checks that the desktop-file-utils is required if desktop-file-install is used"""

- 

-     order = 70

- 

-     def check(self):

-         pr("Checking desktop-file-utils", 2)

-         try:

-             install = self.target.spec.install()

-         except SystemError:

-             self.has_failed("There is no %install section")

-             return

-         if install.count("desktop-file-install") == 0:

-             return

-         buildrequires = self.target.hdr[rpm.RPMTAG_REQUIRES]

-         if "desktop-file-utils" not in buildrequires:

-             self.has_failed("BuildRequires: desktop-file-utils is missing")

-         self.target.total_checks += 1

- 

- 

- class CheckBRExceptions(QACheck):

-     """Checks that the package does not have excluded BuildRequires"""

- 

-     order = 80

- 

-     def check(self):

-         pr("Checking buildrequires exceptions", 2)

-         # Try getting the list from the wiki

-         try:

-             data = urlgrabber.urlread("http://fedoraproject.org/wiki/Extras/FullExceptionList")

-             # Parse the HTML page

-             regexp = re.compile('''<pre>([\w+\n-]+)</pre>''')

-             br_exceptions = regexp.findall(data)

-             if len(br_exceptions) > 0: # If the format changed and the regexp fails

-                 br_exceptions = br_exceptions[0].strip().split("\n")

-         except urlgrabber.grabber.URLGrabError:

-             br_exceptions = []

- 

-         if br_exceptions == []:

-             # if it failed, use this list (from http://fedoraproject.org/wiki/Packaging/Guidelines#Exceptions)

-             br_exceptions = ["bash", "bzip2", "coreutils", "cpio", "diffutils", "fedora-release", 

-                              "findutils", "gawk", "gcc", "gcc-c++", "grep", "gzip", "info", "make", "patch", 

-                              "rpm-build", "redhat-rpm-config", "sed", "tar", "unzip", "util-linux-ng", "which",]

- 

-         buildrequires = self.target.hdr[rpm.RPMTAG_REQUIRES]

-         for br in buildrequires:

-             if br in br_exceptions:

-                 self.has_failed("BuildRequires: %s should not be included\n  (wiki: Packaging/Guidelines#Exceptions)" % br)

-         self.target.total_checks += 1

- 

- 

- class CheckEncoding(QACheck):

-     """Checks that the spec file is in ASCII or UTF-8"""

- 

-     order = 90

- 

-     def check(self):

-         pr("Checking encoding", 2)

-         spec = open(self.target.specfile, "r")

-         spectext = spec.read()

-         spec.close()

-         enc_ok = False

-         for enc in ["utf-8", "ascii"]:

-             try:

-                 unicode(spectext, enc, "strict") # XXX py3

-             except ValueError:

-                 pass

-             else:

-                 enc_ok = True

-                 break

-         if not enc_ok:

-             self.has_failed("Encoding should be UTF-8")

-         self.target.total_checks += 1

- 

- 

- class CheckSpecName(QACheck):

-     """Checks that the spec filename is %{name}.spec"""

- 

-     order = 100

- 

-     def check(self):

-         pr("Checking spec name", 2)

-         specfile = os.path.basename(self.target.specfile)

-         if not specfile == "%s.spec" % self.target.name:

-             self.has_failed("Specfile should be in the format %{name}.spec\n  (wiki: Packaging/ReviewGuidelines)")

-         self.target.total_checks += 1

- 

- 

- class CheckSMPFlags(QACheck):

-     """Checks that the smp flags are set for make"""

- 

-     order = 110

- 

-     def check(self):

-         pr("Checking SMP flags", 2)

-         try:

-             buildscript = self.target.spec.build()

-         except SystemError as e: # No build script

-             return

-         if self.target.arch == "noarch" or buildscript.count("make") == 0:

-             return

-         if buildscript.count(self.target.rpmEval("%{_smp_mflags}")) == 0:

-             self.has_failed("Missing SMP flags. If it doesn't build with it, please add a comment\n  (wiki: Packaging/Guidelines#parallelmake)")

-         self.target.total_checks += 1

- 

- 

- class CheckQTEnvVars(QACheck):

-     """Checks that the QT environment variables are set"""

- 

-     order = 120

- 

-     def check(self):

-         pr("Checking QT env vars", 2)

-         buildrequires = self.target.hdr[rpm.RPMTAG_REQUIRES]

-         #buildrequires = commands.getoutput("rpm -qpR --nosignature %s" % self.target.filename)

-         #if buildrequires.count("qt-devel") == 0 and buildrequires.count("kde") == 0:

-         needs_qt = False

-         for br in buildrequires:

-             if br == "qt-devel":

-                 needs_qt = True

-             if br.startswith("kde") and br.endswith("-devel"):

-                 needs_qt = True

-         if not needs_qt:

-             return

-         buildscript = self.target.spec.build()

-         if buildscript.count("unset QTDIR") == 0 and buildscript.count(". /etc/profile.d/qt.sh") == 0:

-             self.has_failed("QT environment variable are not sourced", "info")

-         self.target.total_checks += 1

- 

- 

- class CheckRelocatable(QACheck):

-     """Checks that the package is not marked Relocatable"""

- 

-     order = 130

- 

-     def check(self):

-         pr("Checking relocatable instruction", 2)

-         spec = open(self.target.specfile, "r")

-         for line in spec:

-             if line.startswith("Prefix:") > 0:

-                 self.has_failed("Package is marked as relocatable, please check.\n  (wiki: Packaging/Guidelines#RelocatablePackages)")

-                 spec.close()

-                 return

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckClean(QACheck):

-     """Checks that the specfile contains a proper %%clean section"""

- 

-     order = 140

- 

-     def check(self):

-         pr("Checking %%clean", 2)

-         message = "there must be a proper %clean section\n  (wiki: Packaging/ReviewGuidelines)"

-         buildroot = self.target.spec.buildRoot()

-         try:

-             clean = self.target.spec.clean()

-         except SystemError:

-             self.has_failed(message)

-             return

-         if clean.count(buildroot) == 0 and clean.count("$RPM_BUILD_ROOT") == 0:

-             self.has_failed(message)

-         self.target.total_checks += 1

- 

- 

- class CheckBRDuplicates(QACheck):

-     """Checks that the package does not have duplicate BuildRequires"""

- 

-     order = 150

- 

-     buildrequires_clean = []

-     already_required = []

- 

-     class YumBaseNoLog(yum.YumBase):

-         def log(self, level, msg):

-             pass

- 

-     def check_br(self, pkgname):

-         exact,match,unmatch = yum.packages.parsePackages(self.repoq.pkgSack.returnNewestByNameArch(), [pkgname], casematch=1)

-         if not exact:

-             return

-         requires = exact[0].requiresList()

-         for req in requires:

-             if req.count("rpmlib") > 0:

-                 continue # filter out rpmlib deps

-             if req.count(" ") > 0:

-                 req = req.split(" ")[0] # versioned dependency

-             if req in self.buildrequires_clean:

-                 pr("found duplicate: "+req, 2)

-                 self.buildrequires_clean.remove(req)

-                 self.already_required.append( (req, pkgname) )

-             #self.check_br(req) # Check recursively. Maybe a little overkill...

- 

-     def check(self):

-         pr("Checking for duplicate buildrequires", 2)

-         buildrequires = self.target.hdr[rpm.RPMTAG_REQUIRES]

-         buildrequires = [br for br in buildrequires if br.count("rpmlib") == 0] # filter out rpmlib dependency

-         if len(buildrequires) < 2:

-             return

-         if not self.ask("Check for duplicate BuildRequires ? (may be long, %s of them)" % len(buildrequires), "n"):

-             return

-         self.buildrequires_clean = buildrequires[:]

-         self.repoq = self.YumBaseNoLog()

-         self.repoq.doConfigSetup()

-         cachedir = yum.misc.getCacheDir()

-         if cachedir is None:

-             pr("Error: could not make cachedir, aborting test.")

-             return

-         self.repoq.repos.setCacheDir(cachedir)

-         pr("setting up repositories...")

-         self.repoq.doRepoSetup()

-         try:

-             self.repoq.doSackSetup()

-             self.repoq.doTsSetup()

-         except yum.Errors.RepoError as e:

-             pr(e)

-             pr("Error, aborting test.")

-             return

-         pr("checking buildrequires...")

-         for br in buildrequires:

-             sys.stdout.write("\r[%s/%s]" % (buildrequires.index(br)+1, len(buildrequires)))

-             sys.stdout.flush()

-             self.check_br(br)

-         sys.stdout.write("\r")

-         sys.stdout.flush()

-         if self.already_required:

-             message = "Duplicate BuildRequires: "

-             for buildreq, by in self.already_required:

-                 message += "%s (by %s), " % (buildreq, by)

-             self.has_failed(message[:-2], "info")

-         self.target.total_checks += 1

- 

- 

- class CheckRPMMacros(QACheck):

-     """Checks that paths are replaced with RPM macros"""

- 

-     order = 160

- 

-     def check(self):

-         pr("Checking rpmmacros", 2)

-         spec = open(self.target.specfile, "r")

-         for line in spec:

-             if line.count("/usr") > 0 or line.count("/var") > 0:

-                 self.has_failed("Spec file: some paths are not replaced with RPM macros\n  (wiki: Packaging/Guidelines#macros)")

-                 spec.close()

-                 return

-             if line.startswith("%changelog"):

-                 break

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckRequiresPrePost(QACheck):

-     """Checks that the form "Requires(pre,post)" is not used"""

- 

-     order = 170

- 

-     def check(self):

-         pr("Checking Requires(pre,post,...)", 2)

-         spec = open(self.target.specfile, "r")

-         expr = re.compile("^Requires\([\w\s]+,[\w\s]+(,[\w\s]+)*\):.*")

-         for line in spec:

-             if expr.match(line):

-                 self.has_failed("Spec file: the \"Requires(*.*)\" notation should be split\n  (wiki: Packaging/Guidelines#reqprepost)")

-                 spec.close()

-                 return

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckLatestVersion(QACheck):

-     """Checks that the package uses the latest version"""

- 

-     order = 180

- 

-     def fmcheck(self, xmlpage):

-         """Do the check on freshmeat"""

-         xmldoc = minidom.parse(xmlpage)

-         lastversion_node = xmldoc.getElementsByTagName('latest_release_version')[0].firstChild

-         if not lastversion_node:

-             return None

-         lastversion = xmldoc.getElementsByTagName('latest_release_version')[0].firstChild.data

-         return lastversion

- 

-     def check(self):

-         pr("Checking for the latest version", 2)

-         url = "http://freshmeat.net/projects-xml/%(name)s/%(name)s.xml" % {"name": self.target.name}

-         try:

-             xmlpage = urlgrabber.urlopen(url)

-         except urlgrabber.grabber.URLGrabError as e:

-             pr("Can't access Freshmeat, aborting test")

-             return

-         try:

-             lastversion = self.fmcheck(xmlpage)

-         except xml.parsers.expat.ExpatError:

-             pr("Project not found on Freshmeat. Please enter the project's Freshmeat name (or press Enter to abort):")

-             answer = raw_input().strip()

-             if not answer:

-                 pr("Aborting test")

-                 return

-             url = "http://freshmeat.net/projects-xml/%(name)s/%(name)s.xml" % {"name": answer}

-             xmlpage = urlgrabber.urlopen(url)

-             try:

-                 lastversion = self.fmcheck(xmlpage)

-             except xml.parsers.expat.ExpatError:

-                 pr("Project still not found. Aborting test.")

-                 return

-         if lastversion is None:

-             pr("The Freshmeat page does not have version information, aborting.")

-             return

-         if lastversion != self.target.version:

-             answer = self.ask("According to Freshmeat, the latest version is %s.\n" % lastversion +\

-                               "Is this package using the latest version ?")

-             if answer != 1:

-                 self.has_failed("The latest version is %s. Please update" % lastversion, "info")

-             else:

-                 self.has_passed("This is the latest version")

-         else:

-             self.has_passed("This is the latest version")

-         self.target.total_checks += 1

- 

- 

- class CheckForbiddenTag(QACheck):

-     """Checks that the package does not contain forbidden tags"""

- 

-     order = 190

- 

-     def check(self):

-         pr("Checking for forbidden tag", 2)

-         spec = open(self.target.specfile, "r")

-         for line in spec:

-             for tag in ["Vendor", "Packager", "Copyright"]:

-                 if line.startswith(tag+":"):

-                     self.has_failed("Spec file: tag %s is forbidden\n  (wiki: Packaging/Guidelines#tags)" % tag)

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckDownloadableSource(QACheck):

-     """checks if at least one of the source is an URL"""

- 

-     order = 200

- 

-     def check(self):

-         pr("Checking for downloadable sources", 2)

-         for (sourceId, sourceUrl) in self.target.sources.items():

-             if sourceUrl.count('tp://') > 0:

-                 return

-         self.has_failed("No downloadable source. Please give the full URL in the Source tag.")

-         self.target.total_checks += 1

- 

- 

- class CheckCleanBRInInstall(QACheck):

-     """Checks that the specfile cleans the BuildRoot in %install"""

- 

-     order = 210

- 

-     def check(self):

-         pr("Checking for BR cleaning in %install", 2)

-         message = "The BuildRoot must be cleaned at the beginning of %install"

-         buildroot = self.target.spec.buildRoot()

-         try:

-             install = self.target.spec.install().split("\n")

-         except SystemError:

-             self.has_failed("There is no %install section")

-             return

-         self.target.total_checks += 1

-         expr = re.compile("^(/bin/)?rm -(rf|fr) (\$RPM_BUILD_ROOT|%s)" % buildroot)

-         for line in install:

-             if expr.match(line):

-                 return

-         self.has_failed(message)

- 

- 

- class CheckFindLangGettext(QACheck):

-     """Checks that gettext is Required if the %find_lang macro is used"""

- 

-     order = 220

- 

-     def check(self):

-         pr("Checking translations requirement", 2)

-         try:

-             install = self.target.spec.install()

-         except SystemError:

-             self.has_failed("There is no %install section")

-             return

-         if install.count("/usr/lib/rpm/redhat/find-lang.sh") == 0:

-             return

-         buildrequires = self.target.hdr[rpm.RPMTAG_REQUIRES]

-         if "gettext" not in buildrequires:

-             self.has_failed("BuildRequires: gettext is missing (required to build the translations)")

-         self.target.total_checks += 1

- 

- 

- class CheckNoarch(QACheck):

-     """checks if the package is improperly built for noarch"""

- 

-     order = 230

- 

-     def check(self):

-         if not self.target.arch == "noarch":

-             return

-         pr("Checking invalid use of noarch", 2)

-         spec = open(self.target.specfile, "r")

-         for line in spec:

-             if line.count("%_libdir") > 0 or line.count("%{_libdir}") > 0:

-                 self.has_failed("The package cannot be noarch since it installs files to %{_libdir}")

-                 spec.close()

-                 return

-             if line.startswith("%changelog"):

-                 break

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckMakeInstallMacro(QACheck):

-     """Checks that the %makeinstall macro is not used"""

- 

-     order = 240

- 

-     def check(self):

-         pr("Checking for the %makeinstall macro", 2)

-         spec = open(self.target.specfile, "r")

-         for line in spec:

-             if line.count("%makeinstall") > 0 or line.count("%{makeinstall}") > 0:

-                 self.has_failed("The %makeinstall macro should not be used\n  (wiki: Packaging/Guidelines#MakeInstall)")

-                 spec.close()

-                 return

-             if line.startswith("%changelog"):

-                 break

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckGhostPyo(QACheck):

-     """checks if the *.pyo files are %%ghost'ed"""

- 

-     order = 250

- 

-     def check(self):

-         pr("Checking ghosting of *.pyo files", 2)

-         spec = open(self.target.specfile, "r")

-         for line in spec:

-             if line.startswith("%ghost") and line.endswith(".pyo"):

-                 self.has_failed("The .pyo files should not be %%ghost'ed\n (wiki: Packaging/Python#pyos)")

-                 spec.close()

-                 return

-             if line.startswith("%changelog"):

-                 break

-         spec.close()

-         self.target.total_checks += 1

- 

- 

- class CheckSpec(QACheck):

-     '''Just read the spec file'''

- 

-     order = 980

- 

-     def check(self):

-         pr("Checking spec file", 2)

-         if self.ask("Look at the spec file ?"):

-             os.system('%s "%s" "%s"' % (self.editor, self.target.specfile, self.target.notes))

- 

- 

- class CheckDiffTemplate(QACheck):

-     """Diff against the template for relevant packages"""

- 

-     order = 990

- 

-     def check(self):

-         pr("Checking diff against template", 2)

-         for template in [ "python", "perl", "ruby" ]:

-             if self.target.name.startswith("%s-" % template):

-                 if self.ask("Diff against the spec template ?"):

-                     os.system('diff -bu "/usr/share/fedora/spectemplate-%s.spec" "%s" | less' % \

-                                  (template, self.target.specfile))

- 

- 

- class CheckBuildMock(QACheck):

-     """Builds the RPM with mock"""

- 

-     order = 1000

- 

-     def check(self, root="default"):

-         status, output = commands.getstatusoutput("which mock")

-         if os.WEXITSTATUS(status) == 1:

-             pr("mock is not available")

-             return

-         if not self.ask("Build the RPM in mock ?"):

-             return

-         pr("Starting build in mock")

-         command = 'mock --resultdir="%s" rebuild %s' % (self.target.reportDir, self.target.filename)

-         status = os.system(command)

-         if status > 0:

-             pr("WARNING: Build failed ! (command: %s)" % command)

-             self.has_failed("Build failed in mock")

-             pr("mock command was: '%s'" % command)

-         else:

-             self.has_passed("Builds fine in mock")

-         if self.ask("View the build log ?"):

-             rpmlog = os.path.join(self.target.reportDir, "build.log")

-             os.system('less "%s"' % rpmlog)

-         self.target.total_checks += 1

- 

- 

- class CheckRpmlint(QACheck):

-     """unleashes rpmlint at the srpm and the binary rpm if the build is complete"""

- 

-     order = 1100

- 

-     def check(self):

-         pr("Launching rpmlint")

-         status, srpmRpmlint = commands.getstatusoutput("rpmlint "+self.target.filename)

-         if os.WEXITSTATUS(status) == 127:

-             pr("WARNING: rpmlint is not available, please install it")

-             return

-         srpmRpmlintFD = open(self.target.reportDir+"/rpmlint-srpm.log", "w")

-         srpmRpmlintFD.write(srpmRpmlint)

-         srpmRpmlintFD.close()

-         pr("Source RPM:")

-         pr(srpmRpmlint)

-         if self.check_built():

-             for file in self.target.rpmfilenames:

-                 filepath = self.target.reportDir+"/"+file

-                 rpmRpmlint = commands.getoutput("rpmlint "+filepath)

-                 rpmRpmlintFD = open(self.target.reportDir+"/rpmlint-rpm.log", "a")

-                 rpmRpmlintFD.write("rpmlint of %s:" % file)

-                 rpmRpmlintFD.write(rpmRpmlint)

-                 rpmRpmlintFD.write("\n\n")

-                 rpmRpmlintFD.close()

-                 subpackage = file[:file.rindex(self.target.version)-1]

-                 pr("\nrpmlint of %s:" % subpackage)

-                 pr(rpmRpmlint)

-                 if len(self.target.rpmfilenames) == 1:

-                     self.approve("rpmlint")

-                 else:

-                     self.approve("rpmlint of "+subpackage)

-         self.target.total_checks += 1

- 

- 

- class CheckFiles(QACheck):

-     """checks files list and ownership"""

- 

-     order = 1110

- 

-     def check(self):

-         pr("Checking files", 2)

-         if not self.check_built():

-             return

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             pr("Files in package %s:" % file)

-             os.system("rpm -qplv %s | less" % filepath)

-             subpackage = file[:file.rindex(self.target.version)-1]

-             if len(self.target.rpmfilenames) == 1:

-                 self.approve("File list")

-             else:

-                 self.approve("File list of "+subpackage)

- 

- 

- class CheckDesktopFile(QACheck):

-     """checks the presence of a .desktop file if the package depends on xorg."""

- 

-     order = 1120

- 

-     def check(self):

-         pr("Checking desktop file", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         is_graphical = False

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             requires = filehdr[rpm.RPMTAG_REQUIRES]

-             for r in requires:

-                 if r.startswith("libX11.so."):

-                     is_graphical = True

-         if not is_graphical:

-             return

-         has_desktopfile = False

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             for f in filelist:

-                 if f.startswith("/usr/share/applications/") and f.endswith(".desktop"):

-                     has_desktopfile = True

-         if not has_desktopfile:

-             self.has_failed("The package should contain a .desktop file\n  (wiki: Packaging/Guidelines#desktop)")

-         self.target.total_checks += 1

- 

- 

- class CheckLicenseFile(QACheck):

-     """checks the presence of a license file."""

- 

-     order = 1130

- 

-     def check(self):

-         pr("Checking license file", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         has_licensefile = False

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             for f in filelist:

-                 if f.startswith("/usr/share/doc/") and ( f.lower().count("license") > 0 or \

-                    f.lower().count("copying") > 0 or f.lower().count("copyright") > 0 ):

-                     has_licensefile = True

-         if not has_licensefile:

-             self.has_failed("The package should contain the text of the license\n  (wiki: Packaging/ReviewGuidelines)")

-         self.target.total_checks += 1

- 

- 

- class CheckFileListedTwice(QACheck):

-     """checks if a file has been listed multiple times in %%files"""

- 

-     order = 1140

- 

-     def check(self):

-         pr("Checking files listed multiple times", 2)

-         if not self.check_built():

-             return

-         status, output = commands.getstatusoutput("grep '^warning: File listed twice:' %s/build.log" % self.target.reportDir)

-         if status == 0:

-             self.has_failed("File list: some files were listed multiple times\n  (wiki: Packaging/ReviewGuidelines)")

-         self.target.total_checks += 1

- 

- 

- class CheckDefattr(QACheck):

-     """checks if all the %%files sections contain %%defattr() instructions"""

- 

-     order = 1150

- 

-     def check(self):

-         pr("Checking defattr", 2)

-         if not self.check_built():

-             return

-         files_num = commands.getoutput("grep '^%%files' %s | wc -l" % self.target.specfile)

-         defattr_num = commands.getoutput("grep '^%%defattr' %s | wc -l" % self.target.specfile)

-         if files_num > defattr_num:

-             self.has_failed("Each %files section should have a %defattr line\n  (wiki: Packaging/ReviewGuidelines)")

-         self.target.total_checks += 1

- 

- 

- class CheckLibtoolArchives(QACheck):

-     """checks the presence of a .la libtool archives"""

- 

-     order = 1160

- 

-     def check(self):

-         pr("Checking .la files", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             for f in filelist:

-                 if os.path.dirname(f) == "/usr/lib/" and f.endswith(".la"):

-                     self.has_failed("The package contains libtool archive files (*.la)\n  (wiki: Packaging/Guidelines#StaticLibraries)")

-                     return

-         self.target.total_checks += 1

- 

- 

- class CheckDesktopFileProperties(QACheck):

-     """checks if the desktop files are valid"""

- 

-     order = 1170

-     valid_cats = None

- 

-     def check_categories(self, categories):

-         if "X-Fedora" in categories:

-             self.has_failed("Desktop file: the Categories tag should not contain X-Fedora any more\n  (wiki: Packaging/Guidelines#desktop)")

-         if "Application" in categories:

-             self.has_failed("Desktop file: the Categories tag should not contain Application any more\n  (wiki: Packaging/Guidelines#desktop)")

-         # check if the category is valid

-         valid_cats_url = "http://standards.freedesktop.org/menu-spec/latest/apa.html"

- 

-         # get the list of valid categories

-         if not self.valid_cats:

-             try:

-                 data = urlgrabber.urlread(valid_cats_url)

-             except urlgrabber.grabber.URLGrabError:

-                 return # Can't check...

-             # Parse the HTML page

-             regexp = re.compile('''<tr><td>([a-zA-Z0-9]+)</td><td>.+?</td><td(?: class="auto-generated")?>.+?</td></tr>''')

-             self.valid_cats = regexp.findall(data)

- 

-         if len(self.valid_cats) == 0: # Regexp must have failed... don't check.

-             return

-         for cat in categories:

-             pr("  checking desktop files category '%s'" % cat, 2)

-             if not cat.startswith("X-") and cat not in self.valid_cats:

-                 self.has_failed("Desktop file: the category %s is not valid\n  (%s)" % (cat, valid_cats_url))

- 

- 

-     def check(self):

-         pr("Checking desktop files validity", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             desktopfiles = []

-             for f in filelist:

-                 if f.startswith("/usr/share/applications/") and f.endswith(".desktop"):

-                     desktopfiles.append(f)

-             if not desktopfiles:

-                 continue

-             for dfile in desktopfiles:

- 

-                 # Check vendor

-                 if os.path.dirname(dfile).endswith("applications") and not os.path.basename(dfile).startswith("fedora"):

-                     self.has_failed("Desktop file: vendor should be fedora\n  (wiki: Packaging/Guidelines#desktop)")

-                 self.target.total_checks += 1

- 

-                 # extract it

-                 os.system('rpm2cpio %s | cpio --quiet -i -d .%s' % (filepath, dfile)) # exctract it

- 

-                 # Validate with desktop-file-validate

-                 status, output = commands.getstatusoutput("desktop-file-validate .%s" % dfile)

-                 if status != 0:

-                     self.has_failed("Desktop file: desktop-file-validate found errors in %s : %s" % (os.path.basename(dfile), output))

-                 self.target.total_checks += 1

-                 

-                 # Various tests

-                 dfile_fd = open("."+dfile, "r")

-                 for line in dfile_fd:

-                     # Check categories

-                     if line.startswith("Categories"):

-                         categories = line.strip().replace("Categories=", "").split(";")

-                         if categories[-1] == "":

-                             categories = categories[:-1]

-                         self.check_categories(categories)

-                         self.target.total_checks += 1

-                     # Check MimeType scriptlets

-                     if line.startswith("MimeType") and line.strip().replace("MimeType=", "") != "":

-                         scripts = { "post": filehdr[rpm.RPMTAG_POSTIN],

-                                     "postun": filehdr[rpm.RPMTAG_POSTUN],

-                                   }

-                         if scripts["post"].count("update-desktop-database") == 0 \

-                             or scripts["postun"].count("update-desktop-database") == 0:

-                             self.has_failed("Scriptlets: missing update-desktop-database\n  (wiki: ScriptletSnippets)")

-                         self.target.total_checks += 1

-                     # Check Icon

-                     if line.startswith("Icon"):

-                         icon = line.strip().replace("Icon=", "")

-                         if not icon.startswith("/") and icon[-4:] in [".png", ".svg", ".xpm"]:

-                             self.has_failed("Desktop file: the Icon tag should either use the full path to the icon or the icon name without extension\n  (wiki:Packaging/Guidelines#desktop)")

-                         self.target.total_checks += 1

-                 dfile_fd.close()

-                 os.system("rm -rf usr")

- 

- 

- class CheckScriptletsRequirements(QACheck):

-     """Checks that the usual programs found in the scriptlets are Required"""

- 

-     order = 1180

- 

-     def check(self):

-         pr("Checking scriptlets requirements", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             scripts = { "pre": filehdr[rpm.RPMTAG_PREIN],

-                         "preun": filehdr[rpm.RPMTAG_PREUN],

-                         "post": filehdr[rpm.RPMTAG_POSTIN],

-                         "postun": filehdr[rpm.RPMTAG_POSTUN],

-                       }

-             requires = filehdr[rpm.RPMTAG_REQUIRES]

-             progs_check = {"service": "initscripts",

-                            "chkconfig": "chkconfig",

-                            "scrollkeeper-update": "scrollkeeper",

-                            "install-info": "info",

-                            "gconftool-2": "GConf2",

-                           }

-             for prog, package in progs_check.items():

-                 for scriptname, script in scripts.items():

-                     if script.count(prog) > 0 and package not in requires:

-                         filename_required = False

-                         for r in requires: # Check if the filename is not required instead of the package

-                             if r.endswith(prog):

-                                 filename_required = True

-                         if not filename_required:

-                             self.has_failed("Missing dependancy on %s for %%%s (package %s)" % (prog, scriptname, package))

-         self.target.total_checks += 1

- 

- 

- class CheckLangTag(QACheck):

-     """checks that the translation files are tagged"""

- 

-     order = 1190

- 

-     def check(self):

-         pr("Checking lang files", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             filelang = filehdr[rpm.RPMTAG_FILELANGS]

-             for filename, lang in zip(filelist, filelang):

-                 if filename.startswith("/usr/share/locale/") and filename.endswith(".mo"):

-                     if not lang:

-                         self.has_failed("The translation files are not properly tagged\n  (wiki: Packaging/ReviewGuidelines)")

-                         return

-         self.target.total_checks += 1

- 

- 

- class CheckDBUpdate(QACheck):

-     """checks that the package updates the proper database in the scriptlets if it has corresponding files"""

- 

-     order = 1200

- 

-     def checkFileUpdateDB(self, prefix, updater, scriptlist=["post","postun"]):

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             need_update = False

-             for f in filelist:

-                 if f.startswith(prefix):

-                     need_update = True

-             if need_update:

-                 scripts = { "pre": filehdr[rpm.RPMTAG_PREIN],

-                             "preun": filehdr[rpm.RPMTAG_PREUN],

-                             "post": filehdr[rpm.RPMTAG_POSTIN],

-                             "postun": filehdr[rpm.RPMTAG_POSTUN],

-                           }

-                 for scr in scriptlist:

-                     if scripts[scr].count(updater) == 0:

-                         message = "missing \"%s\" in %%%s (wiki: ScriptletSnippets)" % (updater, scr)

-                         if len(self.target.rpmfilenames) > 1:

-                             message += " (in subpackage %s)" % filehdr[rpm.RPMTAG_NAME]

-                         self.has_failed("Scriptlets: "+message)

- 

-     def check(self):

-         pr("Checking for the need to update databases in scriptlets", 2)

-         if not self.check_built():

-             return

-         # format : (<if there are files in these dirs>, <run this script>, <in these scriptlets>)

-         check_list = [ ("/usr/share/omf/", "scrollkeeper-update", ["post","postun"]),

-                        ("/usr/share/mime/packages/", "update-mime-database", ["post","postun"]),

-                        ("/usr/share/icons/", "gtk-update-icon-cache", ["post","postun"]),

-                        ("/usr/share/info/", "install-info", ["post","preun"]),

-                        ("/etc/gconf/schemas/", "gconftool-2", ["pre","post","preun"]),

-                        ("/etc/rc.d/init.d/", "chkconfig", ["post","preun"]),

-                        ("/etc/rc.d/init.d/", "service", ["preun","postun"]),

-                      ]

-         for prefix, updater, scriptlist in check_list:

-             pr("  checking %s..." % updater, 2)

-             self.checkFileUpdateDB(prefix, updater, scriptlist)

-         self.target.total_checks += 1

- 

- 

- class CheckOwnedDirs(QACheck):

-     """checks that the package does not own standard dirs"""

- 

-     order = 1210

- 

-     def check(self):

-         pr("Checking directory ownership", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         standard_dirs = []

-         # Get the list of files in packages "filesystem" and "man"

-         for pkg in ("filesystem", "man"):

-             mi = ts.dbMatch("name", pkg)

-             for hdr in mi: # there should be only one result, but we do a for loop anyway (follows the docs)

-                 standard_dirs.extend(hdr[rpm.RPMTAG_FILENAMES])

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             for filename in filelist:

-                 if filename in standard_dirs:

-                     self.has_failed("The package owns %s, which is a standard directory\n  (wiki: Packaging/ReviewGuidelines)" % filename)

-         self.target.total_checks += 1

- 

- 

- class CheckConfigFiles(QACheck):

-     """checks config files list and ownership"""

- 

-     order = 1220

- 

-     def check(self):

-         pr("Checking config files", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filetags = filehdr[rpm.RPMTAG_FILEFLAGS]

-             filenames = filehdr[rpm.RPMTAG_FILENAMES]

-             filemodes = filehdr[rpm.RPMTAG_FILEMODES]

-             filetags = filehdr[rpm.RPMTAG_FILEFLAGS]

-             files = zip(filenames, filemodes, filetags)

-             has_conf_file = False

-             for tag in filetags:

-                 if tag & rpm.RPMFILE_CONFIG:

-                     has_conf_file = True

-             if not has_conf_file:

-                 continue

-             pr("Config files in package %s:" % file)

-             os.system("rpm -qpcv %s | less" % filepath)

-             subpackage = file[:file.rindex(self.target.version)-1]

-             self.approve("Config files of "+subpackage)

- 

- 

- class CheckPkgconfig(QACheck):

-     """checks if the package needs to Require pkgconfig"""

- 

-     order = 1230

- 

-     def check(self):

-         pr("Checking pkgconfig files", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         is_graphical = False

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             has_pkgconfig = False

-             for f in filelist:

-                 if f.startswith("/usr/lib/pkgconfig/") and f.endswith(".pc"):

-                     has_pkgconfig = True

-             if not has_pkgconfig:

-                 continue

-             requires = filehdr[rpm.RPMTAG_REQUIRES]

-             has_pkgconfig = False

-             for r in requires:

-                 if r.count("pkgconfig"):

-                     has_pkgconfig = True

-             if not has_pkgconfig:

-                 self.has_failed("As %s ships a pkgconfig file (.pc), it should have \"Requires: pkgconfig\"" % filehdr[rpm.RPMTAG_NAME])

-         self.target.total_checks += 1

- 

- 

- class CheckHicolor(QACheck):

-     """checks if the package needs to Require hicolor-icon-theme"""

- 

-     order = 1240

- 

-     def check(self):

-         pr("Checking hicolor icons", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         is_graphical = False

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             has_hicolor = False

-             for f in filelist:

-                 if f.startswith("/usr/share/icons/hicolor/"):

-                     has_hicolor = True

-             if not has_hicolor:

-                 continue

-             requires = filehdr[rpm.RPMTAG_REQUIRES]

-             has_hicolor = False

-             for r in requires:

-                 if r.count("hicolor-icon-theme"):

-                     has_hicolor = True

-             if not has_hicolor:

-                 self.has_failed("As %s ships icons in the hicolor directory, it should have \"Requires: hicolor-icon-theme\"\n  https://www.redhat.com/archives/fedora-extras-list/2006-September/msg00282.html" % self.target.name)

-         self.target.total_checks += 1

- 

- 

- class CheckOptFlags(QACheck):

-     """checks if the rpm honors the compiler flags"""

- 

-     order = 1250

- 

-     def check(self):

-         pr("Checking compiler flags", 2)

-         if not self.check_built():

-             return

-         if self.target.arch == "noarch":

-             return

-         optflags = commands.getoutput("rpm --eval '%{optflags}'")

-         buildlog = open(self.target.reportDir+"/build.log", "r")

-         flags_count = 0

-         for line in buildlog:

-             if line.count(optflags):

-                 flags_count += 1

-         buildlog.close()

-         if flags_count <= 3: # 3 because of the definitions by the %configure macro

-             self.has_failed("Does not seem to obey the compiler flags\n  (wiki: Packaging/Guidelinesi#CompilerFlags)")

-         self.target.total_checks += 1

- 

- class CheckStaticLibs(QACheck):

-     """checks the presence of statically-linked libraries"""

- 

-     order = 1260

- 

-     def check(self):

-         pr("Checking static libs", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filelist = filehdr[rpm.RPMTAG_FILENAMES]

-             for f in filelist:

-                 if os.path.dirname(f) == "/usr/lib/" and f.endswith(".a"):

-                     self.has_failed("The package contains static libraries\n  (wiki: Packaging/Guidelines#StaticLinkage)")

-                     return

-         self.target.total_checks += 1

- 

- class CheckConfigFilesLocation(QACheck):

-     """checks config files location"""

- 

-     order = 1270

- 

-     def check(self):

-         pr("Checking config files location", 2)

-         if not self.check_built():

-             return

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filenames = filehdr[rpm.RPMTAG_FILENAMES]

-             filetags = filehdr[rpm.RPMTAG_FILEFLAGS]

-             files = zip(filenames, filetags)

-             for filename, filetag in files:

-                 if filetag & rpm.RPMFILE_CONFIG:

-                     if filename.startswith("/usr"):

-                         self.has_failed("The file '%s' is flagged as %%config and is in /usr\n  (wiki: Packaging/Guidelines#Config)" % filename)

-         self.target.total_checks += 1

- 

- class CheckInitScripts(QACheck):

-     """checks init scripts"""

- 

-     order = 1280

- 

-     def check(self):

-         pr("Checking init scripts", 2)

-         if not self.check_built():

-             return

-         init_scripts_number = 0

-         ts = rpm.ts()

-         for file in self.target.rpmfilenames:

-             filepath = self.target.reportDir+"/"+file

-             if not os.path.exists(filepath):

-                 continue

-             filehdr = rpmUtils.miscutils.hdrFromPackage(ts, filepath)

-             filenames = filehdr[rpm.RPMTAG_FILENAMES]

-             filemodes = filehdr[rpm.RPMTAG_FILEMODES]

-             filetags = filehdr[rpm.RPMTAG_FILEFLAGS]

-             files = zip(filenames, filemodes, filetags)

-             for filename, filemode, filetag in files:

-                 if not filename.startswith("/etc/rc.d/init.d/"):

-                     continue

-                 init_scripts_number += 1

-                 if filetag & rpm.RPMFILE_CONFIG:

-                     self.has_failed("The init script '%s' is flagged as %%config\n  (wiki: Packaging/Guidelines#Init)" % filename)

-                 if stat.S_IMODE(filemode) != 493: # mode 755 : stat.S_IRWXU + stat.S_IRGRP + stat.S_IXGRP + stat.S_IROTH + stat.S_IXOTH

-                     self.has_failed("The init script '%s' does not have mode 755\n  (wiki: Packaging/Guidelines#Init)" % filename)

-         self.target.total_checks += init_scripts_number

- 

- 

- 

- 

- 

- 

- 

- 

- ##########################

- 

- # Class for Bugzilla

- 

- class QABugError(QAError): pass

- 

- class QABug:

-     """These objects are the Bugzilla bugs from Fedora Extras or Livna.org"""

- 

-     bugID = None

-     webpage = None

-     

-     def __init__(self, bugID, origin="fedora"):

-         try:

-             self.bugID = int(bugID)

-         except ValueError:

-             raise QABugError("This does not look like a bug ID, and I can't find this SRPM.")

-         self.bugzillaURL = 'https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=%d'

-         if origin == "livna":

-             self.bugzillaURL = 'http://bugzilla.livna.org/show_bug.cgi?id=%d'

- 

-     def get_srpm(self, local=False):

-         '''Gets the SRPM from the web'''

-         srpmURL = self.get_srpm_url()

-         filename = os.path.basename(srpmURL)

-         if local and os.path.exists(filename):

-             return filename

-         elif local and not os.path.exists(filename):

-             pr("File %s not found, downloading..." % filename)

-         pr("Downloading SRPM from: %s" % srpmURL)

-         try:

-             urlgrabber.urlgrab(srpmURL, reget='check_timestamp', progress_obj=urlgrabber.progress.TextMeter(fo=sys.stdout))

-         except urlgrabber.grabber.URLGrabError as e:

-             pr("ERROR: can't find SRPM")

-             sys.exit(1)

-         return filename

- 

-     def get_srpm_url(self):

-         '''Parses bugzilla to get the SRPM URL'''

-         if not self.webpage:

-             try:

-                 self.webpage = urlgrabber.urlread(self.bugzillaURL % self.bugID)

-             except urlgrabber.grabber.URLGrabError:

-                 raise QABugError("Can't access bugzilla, please download the srpm manually")

-         srpmList = re.compile('"((ht|f)tp(s)?://.*?\.src\.rpm)"', re.IGNORECASE).findall(self.webpage)

-         if srpmList == []:

-             raise QABugError("no srpm found in page, please download it manually")

-         srpmURL = srpmList[-1][0] # Use the last one. We could also use the newer one with rpmUtils.miscutils.compareEVR()

-         if not srpmURL:

-             errormsg = "impossible to find the srpm in the page, " \

-                       +"please download it manually.\n%s" % srpmList

-             raise QABugError(errormsg)

-         self.filename = os.path.basename(srpmURL)

-         pr("SRPM URL: "+srpmURL, 2)

-         return srpmURL

- 

-     def get_subject(self):

-         '''Parses bugzilla to get the Subject'''

-         if not self.webpage:

-             try:

-                 self.webpage = urlgrabber.urlread(self.bugzillaURL % self.bugID)

-             except urlgrabber.grabber.URLGrabError:

-                 return "" # that's not a blocking error.

-         subjectList = re.compile('<title>Bug %s: (Review Request: )?(.*)</title>' % self.bugID, re.IGNORECASE).findall(self.webpage)

-         if subjectList == []:

-             return ""

-         subject = subjectList[0][1]

-         if not subject:

-             return ""

-         pr("Found subject: "+subject, 2)

-         return subject

- 

- 

- ###############################

- 

- ## MAIN

- 

- 

- if __name__ == "__main__":

-     print("Checking for updated guidelines on the wiki...")

-     check_requires(REQUIRES)

-     #pr("Checking for updated guidelines...", 2)

-     check_guidelines(GUIDELINES)

-     try:

-         conf = parse_config()

-         # get options and arguments

-         arg, origin, debug, do_checks, local = parse_options()

-         if do_checks:

-             for do_check in do_checks:

-                 if do_check not in list_checks():

-                     print("ERROR: %s is not an available check" % do_check)

-                     sys.exit(1)

-         if not arg.endswith("src.rpm"):

-             bug = QABug(arg, origin)

-             print("Starting QA for bug %s (%s)" % (arg, bug.get_subject()))

-             srpmFileName = bug.get_srpm(local)

-         else:

-             print("Starting QA for local srpm %s" % arg)

-             srpmFileName = arg

-         try:

-             srpm = QAPackage(srpmFileName, origin, conf["reportsdir"])

-         except QAPackageError as e:

-             print("ERROR: %s" % e)

-             sys.exit(1)

-         pr("Installing SRPM", 2)

-         srpm.installSRPM()

-         srpm.getReleaseFromSpec()

-         if do_checks:

-             for do_check in do_checks:

-                 check = eval(do_check)(srpm)

-                 srpm.addCheck(check)

-         else:

-             for name in list_checks():

-                 check = eval(name)(srpm)

-                 srpm.addCheck(check)

-         srpm.runChecks()

-         if not do_checks: # We only save reports on full run (with all checks)

-             srpm.saveReport()

-         srpm.printReport()

-     except QABugError as e:

-         print("ERROR: %s" % e)

-         sys.exit(1)

-     except KeyboardInterrupt:

-         print("Interrupted by user")

-         sys.exit(1)

- 

- 

- 

- # vim: set expandtab tabstop=4 shiftwidth=4 :

- 

@@ -1,124 +0,0 @@ 

- # fedora-cert - a Python library for Managing fedora SSL Certificates

- #

- # Copyright (C) 2009-2014 Red Hat Inc.

- # Author(s):  Dennis Gilmore <dennis@ausil.us>

- #             Ralph Bean <rbean@redhat.com>

- #

- # 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 of the License, or (at your

- # option) any later version.  See http://www.gnu.org/copyleft/gpl.html for

- # the full text of the license.

- 

- import os

- import getpass

- from fedora.client.fas2 import AccountSystem

- from fedora.client.fas2 import CLAError

- from fedora.client import AuthError

- from OpenSSL import crypto

- import requests

- import datetime

- from six.moves import input

- 

- # Define our own error class

- class fedora_cert_error(Exception):

-     pass

- 

- def _open_cert():

-     """

-     Read in the certificate so we dont duplicate the code 

-     """

-      # Make sure we can even read the thing.

-     cert_file = os.path.join(os.path.expanduser('~'), ".fedora.cert")

-     if not os.access(cert_file, os.R_OK):

-         raise fedora_cert_error("""!!!    cannot read your ~/.fedora.cert file   !!!

- !!! Ensure the file is readable and try again !!!""")

-     raw_cert = open(cert_file).read()

-     my_cert = crypto.load_certificate(crypto.FILETYPE_PEM, raw_cert)

-     return my_cert

- 

- def verify_cert():

-     """

-     Check that the user cert is valid. 

-     things to check/return

-     not revoked

-     Expiry time warn if less than 21 days

-     """

-     if os.path.exists(os.path.expanduser('~/.fedora.upn')):

-         print('Kerberos configured, cert ignored')

-         return

- 

-     my_cert = _open_cert()

-     valid_until = my_cert.get_notAfter()[:8].decode()

- 

-     dateFmt = '%Y%m%d'

-     delta = datetime.datetime.now() + datetime.timedelta(days=21)

-     warn = datetime.datetime.strftime(delta, dateFmt)

- 

-     print('cert expires: %s-%s-%s' % (valid_until[:4], valid_until[4:6], valid_until[6:8]))

- 

-     if valid_until < warn:

-         print('WARNING: Your cert expires soon.')

- 

-     if hasattr(crypto, 'load_crl'):

-         crl_url = "https://admin.fedoraproject.org/ca/crl.pem"

-         raw_crl = requests.get(crl_url).content

-         crl = crypto.load_crl(crypto.FILETYPE_PEM, raw_crl)

-         revoked = crl.get_revoked()

-         serial_no = my_cert.get_serial_number()

-         if serial_no in [int(cert.get_serial(), 16) for cert in revoked]:

-             print('WARNING: Your cert appears in the revocation list.')

-             print('        ', crl_url)

- 

- def certificate_expired():

-     """

-     Check to see if ~/.fedora.cert is expired

-     Returns True or False

- 

-     """

-     my_cert = _open_cert()

- 

-     if my_cert.has_expired():

-         return True

-     else:

-         return False

- 

- def read_user_cert():

-     """

-     Figure out the Fedora user name from ~/.fedora.cert

- 

-     """

-     if os.path.exists(os.path.expanduser('~/.fedora.upn')):

-         with open(os.path.expanduser('~/.fedora.upn'), 'r') as f:

-             return f.read().replace('\n', '')

- 

-     my_cert = _open_cert()

- 

-     subject = str(my_cert.get_subject())

-     subject_line = subject.split("CN=")

-     cn_parts = subject_line[1].split("/")

-     username = cn_parts[0]

-     return username

- 

- def create_user_cert(username=None):

-     if not username:

-         username = input('FAS Username: ')

-     password = getpass.getpass('FAS Password: ')

-     try:

-         fas = AccountSystem('https://admin.fedoraproject.org/accounts/', username=username, password=password)

-         cert = fas.user_gencert()

-         fas.logout()

-     except AuthError:

-         raise fedora_cert_error("Invalid username/password.")

-     except CLAError:

-         fas.logout()

-         raise fedora_cert_error("""You must sign the CLA before you can generate your certificate.\n

- To do this, go to https://admin.fedoraproject.org/accounts/cla/""")

-     cert_file = os.path.join(os.path.expanduser('~'), ".fedora.cert")

-     try:

-         FILE = open(cert_file,"w")

-         FILE.write(cert)

-         FILE.close()

-     except:

-         raise fedora_cert_error("""Can not open cert file for writing.

- Please paste certificate into ~/.fedora.cert\n\n%s""" % cert)

file removed
-250
@@ -1,250 +0,0 @@ 

- #!/bin/bash

- #

- # fedoradev-pkgowners - Output list of packages owners by packages name

- # Copyright (c) 2007 Thorsten Leemhuis <fedora@leemhuis.info>

- #

- # Permission is hereby granted, free of charge, to any person obtaining

- # a copy of this software and associated documentation files (the

- # "Software"), to deal in the Software without restriction, including

- # without limitation the rights to use, copy, modify, merge, publish,

- # distribute, sublicense, and/or sell copies of the Software, and to

- # permit persons to whom the Software is furnished to do so, subject to

- # the following conditions:

- #

- # The above copyright notice and this permission notice shall be

- # included in all copies or substantial portions of the Software.

- #

- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,

- # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

- # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND

- # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE

- # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION

- # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION

- # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

- #

- 

- ## constants

- BUGZILLA_OWNERS_URL="https://admin.fedoraproject.org/pkgdb/api/bugzilla"

- 

- ## globally used

- file_fadcsvdata=

- file_pkgdbfiledata=

- list_of_packages=

- print_comaintainers=

- print_email=

- print_realname=

- tmpfile_owners=

- 

- ##  globally used with defaults

- myprog_name=fedoradev-pkgowners

- myprog_version=0.0.1

- # look for Fedora (and not epel) by default:

- filter_for="Fedora"

- 

- # initialization

- this_init()

- {

- 	# we need to get the package names from somewhere

- 	# if there is a better way to check that input is comeing from a 

- 	#  pipe please let me know

- 	if [[ ! "${list_of_packages}" ]] && [[ ! -p /proc/$$/fd/0 ]]; then

- 		echo "Provide list of package names on command line or via pipe" >&2

- 		exit 2

- 	fi

- 

- 	# we need fasfile for some optional output options

- 	if ( [[ "${print_email}" ]] || [[ "${print_realname}" ]] ) && [[ ! "${file_fadcsvdata}" ]] ; then

- 		echo "Please provide the name of the file with the FAS dumb via --fasfile <file>" >&2

- 		echo " Download it using your FAS username and password from:" >&2

- 		echo " https://admin.fedora.redhat.com/accounts/dump-group.cgi?group=cvsextras&format=csv"  >&2

- 		exit 2

- 	fi

- 

- 	# check fasfile -- needs to be local, thus check first

- 	if [[ "${file_fadcsvdata}" ]]; then

- 		if [[ ! -s "${file_fadcsvdata}" ]]; then

- 			echo "Empty or nonexistent fas-datafile ${file_fadcsvdata}" >&2

- 			exit 2

- 		fi

- 

- 		# check if that file contains data as we expect it

- 		if ! grep --max-count=1 -E '^.*,.*@.*,(user|sponsor|administrator),[0-9]*$' "${file_fadcsvdata}" &>/dev/null; then

- 			echo "File ${file_fadcsvdata} does not look like a fas file in cvs format" >&2

- 			exit 2

- 		fi

- 	fi

- 

- 	# pkgdb bugzilla data for owners

- 	if [[ "${file_pkgdbfiledata}" ]]; then

- 		if [[ ! -s "${file_pkgdbfiledata}" ]]; then

- 			echo "Empty or nonexistent pkgdb-datafile ${file_pkgdbfiledata}" >&2

- 			exit 2

- 		fi

- 	else

- 		# download it to tmpfile

- 	

- 		# remove tmpfile_owners on CTRL+C

- 		trap "this_finish" 2

- 

- 		# download owners

- 		tmpfile_owners=$(mktemp -t ${myprog_name}.XXXXXXXXX)

- 		wget --quiet --output-document="${tmpfile_owners}" "${BUGZILLA_OWNERS_URL}"

- 	

- 		# did download of owners succeed?

- 		local returncode=$?

- 		if (( ${returncode} > 0 )) || [[ ! -s "${tmpfile_owners}" ]] ; then

- 			echo "Could not download informations about owners from"$'\n'"${BUGZILLA_OWNERS_URL} ; aborting!" >&2

- 			this_finish

- 			exit 2

- 		fi

- 

- 		# 

- 		file_pkgdbfiledata="${tmpfile_owners}"

- 	fi

- 

- 	# check if that file contains data as we expect it

- 	if ! grep --max-count=1 -E '^Fedora*\|.*\|.*\|.*\|\|' "${file_pkgdbfiledata}" &>/dev/null; then

- 		echo "File ${file_pkgdbfiledata} does not look like a pgkdb bugzilla dump" >&2

- 		this_finish

- 		exit 2

- 	fi

- }

- 

- lookup_package()

- {

- 	local package_info="$(grep "${filter_for}|${1}|" "${file_pkgdbfiledata}")"

- 	if [[ ! "${package_info}" ]]; then

- 		# grep did not find anything or something else went wrong, eg.

- 		# https://fedorahosted.org/packagedb/ticket/138

- 		echo "Warning: could not find info for ${1}" >&2

- 		return 1

- 	fi

- 

- 	# owner?

- 	local owner="$(echo ${package_info} | cut -d '|' -f 4)"

- 	if [[ ! "${owner}" || "${owner}" == orphan ]]; then

- 		# No owner, assume orphan

- 		owner="(orphan)"

- 	fi

- 

- 	# co-maintainers?

- 	if [[ "${print_comaintainers}" ]]; then

- 		local comaintainers="$(echo ${package_info} | cut -d '|' -f 6 | sed 's| |,|g') "

- 		if [[ "${comaintainers}" = " " ]]; then

- 			comaintainers="(none)"

- 		fi

- 	fi

- 

- 	# more data?

- 	if [[ "${print_email}" ]] || [[ "${print_realname}" ]]; then

- 		local fasline="$(grep -E "^${owner},.*@.*,(user|sponsor|administrator),[0-9]*$" "${file_fadcsvdata}")"

- 		if [[ "${fasline}" ]]; then

- 			[[ "${print_email}" ]] && local email_owner="$(echo ${fasline} | cut -d ',' -f 2) "

- 			[[ "${print_realname}" ]] && local realname_owner="$(echo ${fasline} | cut -d ',' -f 3) "

- 		else

- 			echo "Could not find FAS-data for ${owner}" >&2

- 			[[ "${print_email}" ]] && local email_owner="(unknown) "

- 			[[ "${print_realname}" ]] && local realname_owner="(unknown) "

- 		fi

- 

- 		# feature for later: print more info for co-maintainers as well?

- 	fi

- 	

- 	# print

- 	echo "${owner} ${1} ${email_owner}${realname_owner}${comaintainers}"

- }

- 

- this_finish()

- {

- 	[[ -e "${tmpfile_owners}" ]] && rm "${tmpfile_owners}"

- }

- 

- myprog_help()

- {

- 	echo "Usage: ${myprog_name}  [options] [list of pkgnames]"

- 	echo "       echo pkgname | ${myprog_name} [options]"

- 	echo $'\n'"Outputs list of Fedora packages owners for packages from [list] or stdin"

- 	echo $'\n'"Available options:"

- 	echo " --comaintainers    -- print comaintainers as well"

- 	echo " --email            -- print email (needs --fasfile<file>)"

- 	echo " --epel             -- look epel owner(s) up"

- 	echo " --fasfile <file>   -- get email or real name from fas-file ; download uri:"

- 	echo "   https://admin.fedora.redhat.com/accounts/dump-group.cgi?group=cvsextras&format=csv"

- 	echo " --pkgdbfile <file> -- get pkgowners from local file instead of downloading it from:"

- 	echo "   ${BUGZILLA_OWNERS_URL}"

- 	echo " --realname         -- print realname (needs --fasfile <file>)"

- 	echo

- 	echo " --help             -- this text"

- 	echo " --version          -- output version"

- 	echo

- 	echo " Hint: use '${myprog_name} | sort | column -t' for properly formated output."

- }

- 

- # parse cmdline options

- while [ "${1}" ] ; do

- 	case "${1}" in

- 		--comaintainers)

- 			print_comaintainers="true"

- 			shift

- 			;;

- 		--email)

- 			print_email="true"

- 			shift

- 			;;

- 		--epel)

- 			filter_for="Fedora EPEL"

- 			shift

- 			;;

- 		--fasfile)

- 			shift

- 			file_fadcsvdata="${1}"

- 			shift

- 			;;

- 		--realname)

- 			print_realname="true"

- 			shift

- 			;;

- 		--pkgdbfile)

- 			shift

- 			file_pkgdbfiledata="${1}"

- 			shift

- 			;;

- 		--help)

- 			myprog_help

- 			exit 0

- 			;;

- 		--version)

- 			echo "${myprog_name} ${myprog_version}"

- 			exit 0

- 			;;

- 		--*)

- 			echo "Error: Unknown option '${1}'." >&2

- 			myprog_help >&2

- 			exit 2

- 			;;

- 		*)

- 			list_of_packages="${list_of_packages} ${1}"

- 			shift

- 			;;

- 	esac

- done

- 

- # initialization and startup checks

- this_init

- 

- # go

- if [[ "${list_of_packages}" ]]; then

- 	for package in ${list_of_packages} ; do

- 		lookup_package ${package}

- 	done

- elif [[ -p /proc/$$/fd/0 ]]; then

- 	# read list of packages from stdin (seperated by newline or space)

- 	while read list_of_packages ; do

- 		for package in ${list_of_packages} ; do

- 			lookup_package ${package}

- 		done

- 	done

- fi

- 

- # cleanup

- this_finish

file removed
-122
@@ -1,122 +0,0 @@ 

- #!/bin/bash

- 

- # Created by argbash-init v2.10.0

- # ARG_OPTIONAL_SINGLE([user],[u],[Fedora account name],[$USER])

- # ARG_OPTIONAL_BOOLEAN([staging],[],[Use the staging infrastructure])

- # ARG_HELP([Acquire a Kerberos ticket-granting ticket for Fedora],[If the environment variable \$FKINIT_OTP is set, it will be read for the one-time password instead of prompting for it.])

- # ARGBASH_GO()

- # needed because of Argbash --> m4_ignore([

- ### START OF CODE GENERATED BY Argbash v2.10.0 one line above ###

- # Argbash is a bash code generator used to get arguments parsing right.

- # Argbash is FREE SOFTWARE, see https://argbash.io for more info

- 

- 

- die()

- {

- 	local _ret="${2:-1}"

- 	test "${_PRINT_HELP:-no}" = yes && print_help >&2

- 	echo "$1" >&2

- 	exit "${_ret}"

- }

- 

- 

- begins_with_short_option()

- {

- 	local first_option all_short_options='uh'

- 	first_option="${1:0:1}"

- 	test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0

- }

- 

- # THE DEFAULTS INITIALIZATION - OPTIONALS

- _arg_user="$USER"

- _arg_staging="off"

- 

- 

- print_help()

- {

- 	printf '%s\n' "Acquire a Kerberos ticket-granting ticket for Fedora"

- 	printf 'Usage: %s [-u|--user <arg>] [--(no-)staging] [-h|--help]\n' "$0"

- 	printf '\t%s\n' "-u, --user: Fedora account name (default: '$USER')"

- 	printf '\t%s\n' "--staging, --no-staging: Use the staging infrastructure (off by default)"

- 	printf '\t%s\n' "-h, --help: Prints help"

- 	printf '\n%s\n' "If the environment variable \$FKINIT_OTP is set, it will be read for the one-time password instead of prompting for it."

- }

- 

- 

- parse_commandline()

- {

- 	while test $# -gt 0

- 	do

- 		_key="$1"

- 		case "$_key" in

- 			-u|--user)

- 				test $# -lt 2 && die "Missing value for the optional argument '$_key'." 1

- 				_arg_user="$2"

- 				shift

- 				;;

- 			--user=*)

- 				_arg_user="${_key##--user=}"

- 				;;

- 			-u*)

- 				_arg_user="${_key##-u}"

- 				;;

- 			--no-staging|--staging)

- 				_arg_staging="on"

- 				test "${1:0:5}" = "--no-" && _arg_staging="off"

- 				;;

- 			-h|--help)

- 				print_help

- 				exit 0

- 				;;

- 			-h*)

- 				print_help

- 				exit 0

- 				;;

- 			*)

- 				_PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1

- 				;;

- 		esac

- 		shift

- 	done

- }

- 

- parse_commandline "$@"

- 

- # OTHER STUFF GENERATED BY Argbash

- 

- ### END OF CODE GENERATED BY Argbash (sortof) ### ])

- # [ <-- needed because of Argbash

- 

- finalize()

- {

-   rm -f $armorcache

- }

- 

- set -e

- 

- armorcache=$(mktemp)

- trap finalize EXIT

- 

- if [ "$_arg_staging" == "on" ]; then

-     domain=STG.FEDORAPROJECT.ORG

- else

-     domain=FEDORAPROJECT.ORG

- fi

- 

- kinit -n @$domain -c FILE:$armorcache

- 

- F_PASSWORD=$(systemd-ask-password "FAS password:")

- F_OTP=${FKINIT_OTP:-$(systemd-ask-password "FAS OTP (leave blank if not configured):")}

- 

- kinit -T FILE:$armorcache $_arg_user@$domain <<< "${F_PASSWORD}${F_OTP}" >/dev/null

- unset F_PASSWORD

- unset F_OTP

- 

- # Display the active credential cache overview

- echo

- klist

- 

- 

- # ^^^  TERMINATE YOUR CODE BEFORE THE BOTTOM ARGBASH MARKER  ^^^

- 

- # ] <-- needed because of Argbash

file removed
-57
@@ -1,57 +0,0 @@ 

- #!/bin/sh

- 

- # This script came from http://fedoraproject.org/wiki/PackageMaintainers/UsefulScripts 

- # initiall contributed by Contributed by Ignacio Vazquez-Abrams, modified to work with pkgdb by ToshioKuratomi

- 

- 

- PKGDBURL=${PACKAGEDBURL:-'https://admin.fedoraproject.org/pkgdb'}

- PKGDBADDRESS=${PKGDBURL}/acls/bugzilla?tg_format=plain

- 

- download=1

- 

- while getopts :f:u:o:n opt ; do

-   case $opt in

-     u)

-       user="$OPTARG"

-       ;;

-     f)

-       file="$OPTARG"

-       ;;

-     o)

-       owners="$OPTARG"

-       ;;

-     n)

-       download=0

-       ;;

-     \?)

-       echo "Usage: $(basename $0) [-u <fedora username>] [-f <plague-client config file>] [-o <owners.list>] -n"

-       echo "  -o -- must point to a file downloaded from:"

-       echo "    $PKGDBADDRESS"

-       echo "    This script will automatically download a copy if <owners.list>"

-       echo "    does not exist."

-       echo "  -n Do not download even if the file is nonexistent"

-       exit 255

-       ;;

-   esac

- done

- 

- file=${file:-~/.plague-client.cfg}

- 

- [ -f "$file" -o -z "$email" ] || { echo "File $file does not exist" ; exit 1 ; }

- 

- user=${user:-$(awk 'BEGIN { FS="[ =]+" } $1 == "upload_user" { print $2 }' < "$file")}

- 

- owners=${owners:-/var/tmp/owners.list}

- if [ ! -e $owners ] ; then

-   if [ $download -le 0 ] ; then

-     echo "$owners does not exist.  Cannot lookup packages"

-     exit 1

-   fi

-   if [ ! -e `dirname $owners` ] ; then

-     mkdir -p `dirname $owners` || exit $?

-   fi

-   wget $PKGDBADDRESS -O $owners

- fi

- 

- awk -v user="$user" 'BEGIN { FS="|" } $1 ~ "^Fedora( EPEL| OLPC)?" && $4 == user { printf "%-11ls  %s\n", $1, $2 }' < $owners

- 

file removed
-25
@@ -1,25 +0,0 @@ 

- #!/bin/sh

- 

- # written by Ville Skyttä

- # pulled in from http://fedoraproject.org/wiki/PackageMaintainers/UsefulScripts

- 

- VERBOSE=

- 

- while [ -n "$1" ] ; do

-     [ "$1" = "-v" ] && { VERBOSE=1 ; shift ; continue ; }

-     [ -f "$1" ] || { [ -n "$VERBOSE" ] && echo "???: $1" ; shift ; continue ; }

- 

-     cat="cat"

-     case "$1" in 

-        *.bz|*.bz2) cat="bzip2 -dcf" ;; 

-        *.gz) cat="gzip -dcf" ;;

-     esac

- 

-     if $cat "$1" | iconv -f utf-8 -t utf-8 >/dev/null 2>&1 ; then

-         [ -n "$VERBOSE" ] && echo "yes: $1"

-     else

-         echo " NO: $1"

-     fi

- 

-     shift

- done

file removed
-32
@@ -1,32 +0,0 @@ 

- #!/usr/bin/python3

- """

- Pipe package NEVRAs into this script to get package names.

- 

- NEVRA stands for Name, Epoch, Version, Release, Architecture. E.g.:

- 

-     $ echo fedora-packager-0:0.6.0.4-1.fc32.noarch | pkgname

-     fedora-packager

- 

- You can omit epoch and/or architecture:

- 

-     $ echo fedora-packager-0.6.0.4-1.fc32 | pkgname

-     fedora-packager

- 

- But, if version and release is omitted, the script can produce invalid results:

- 

-     $ echo fedora-packager | pkgname

-     fedora

- 

- Created by Miro Hrončok, with suggestions from Adam Williamson.

- 

- This script is trivial, consider it Public Domain.

- """

- import fileinput

- import sys

- 

- 

- if len(sys.argv) > 1:

-     sys.exit(__doc__.strip())

- 

- for line in fileinput.input():

-     print(line.rsplit("-", 2)[0])

file removed
-6
@@ -1,6 +0,0 @@ 

- #!/bin/bash

- rpmbuild --define "_source_filedigest_algorithm 1" \

-          --define "_binary_filedigest_algorithm 1" \

-          --define "_binary_payload w9.gzdio" \

-          --define "_source_payload w9.gzdio" \

-          --define "_default_patch_fuzz 2" "$@"

file removed
-12
@@ -1,12 +0,0 @@ 

- #! /bin/sh

- 

- arch=`basename $0 | cut -d '-' -f 1`

- 

- config="/etc/koji.conf.d/${arch}.conf"

- 

- if [ ! -f $config ]; then

-     echo "Config file for $arch doesn't exist"

-     exit 1

- fi

- 

- koji --profile ${arch} "$@"