From 287fd5a6db40a53ca3cd43bd7feff122408177e3 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 13 May 2009 05:10:46 +0000 Subject: [PATCH 001/514] Setup of module ghc-rpm-macros --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..382833f --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: ghc-rpm-macros +# $Id$ +NAME := ghc-rpm-macros +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From b640c1a84ee948c730deb1eaf95b60683c8fca34 Mon Sep 17 00:00:00 2001 From: Yaakov Meir Nemoy Date: Wed, 13 May 2009 07:37:39 +0000 Subject: [PATCH 002/514] Initial import --- AUTHORS | 3 + COPYING | 674 ++++++++++++++++++++++++++++++++++++++++++++ ghc-rpm-macros.ghc | 38 +++ ghc-rpm-macros.spec | 73 +++++ import.log | 1 + 5 files changed, 789 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ghc-rpm-macros.ghc create mode 100644 ghc-rpm-macros.spec create mode 100644 import.log diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..9725c64 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Bryan O'Sullivan +Jens Petersen +Yaakov Nemoy \ No newline at end of file diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc new file mode 100644 index 0000000..6103094 --- /dev/null +++ b/ghc-rpm-macros.ghc @@ -0,0 +1,38 @@ +%cabal %{_bindir}/runghc Setup + +%cabal_configure \ +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' + +%cabal_makefile \ +%cabal makefile -f cabal-rpm.mk \ +make -f cabal-rpm.mk %{_smp_mflags} \ +%{nil} + +%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v + +%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version} +%ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version} + +%ghc_gen_filelists() \ +rm -f %1-devel.files %1-prof.files %1-doc.files \ +echo '%defattr(-,root,root,-)' > %1-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \ +echo '%defattr(-,root,root,-)' > %1-prof.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \ +echo '%defattr(-,root,root,-)' > %1-doc.files \ +echo '%{ghcdocdir}' >> %1-doc.files \ +%{nil} + +%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script + +%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{ghcpkgdir} + +%ghc_register_pkg %{ghcpkgdir}/register.sh >/dev/null || : + +%ghc_unregister_pkg %{ghcpkgdir}/unregister.sh >/dev/null || : + +%ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : + +%ghc_version %(ghc --numeric-version) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec new file mode 100644 index 0000000..c3be4b9 --- /dev/null +++ b/ghc-rpm-macros.spec @@ -0,0 +1,73 @@ +Name: ghc-rpm-macros +Version: 0.1 +Release: 6%{?dist} +Summary: Macros for building packages for GHC + +Group: Development/Libraries +License: GPLv3 +URL: https://fedoraproject.org/wiki/Haskell_SIG + +# This is a Fedora maintained package which is specific to +# our distribution. Thus the source is only available from +# within this srpm. +Source0: ghc-rpm-macros.ghc +Source1: COPYING +Source2: AUTHORS +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +%description +A set of macros for building GHC packages following the Haskell Guidelines +of the Haskell SIG. This package probably shouldn't be installed on its own +as GHC is needed in order to make use of these macros. + +%prep +%setup -c -T +cp %{SOURCE1} %{SOURCE2} . + + +%build +echo no build stage needed + + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm +cp -p %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING AUTHORS +%{_sysconfdir}/rpm/macros.ghc + + + +%changelog +* Sat May 9 2009 Yaakov M. Nemoy - 0.1-6 +- removes archs and replaces with noarch +- bumps to avoid conflicts with jens + +* Fri May 8 2009 Jens Petersen - 0.1-5 +- make it arch specific to fedora ghc archs +- setup a build dir so it can build from the current working dir + +* Wed May 6 2009 Yaakov M. Nemoy - 0.1-4 +- renamed license file +- removed some extraneous comments needed only at review time + +* Wed May 6 2009 Yaakov M. Nemoy - 0.1-3 +- updated license to GPLv3 +- added AUTHORS file + +* Tue May 5 2009 Yaakov M. Nemoy - 0.1-2 +- moved copying license from %%build to %%prep + +* Mon May 4 2009 Yaakov M. Nemoy - 0.1-1 +- creation of package + diff --git a/import.log b/import.log new file mode 100644 index 0000000..55a3c88 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +ghc-rpm-macros-0_1-6_fc10:HEAD:ghc-rpm-macros-0.1-6.fc10.src.rpm:1242200218 From fb06b40394ab3e8a43c50c89dc1344390b1d1a06 Mon Sep 17 00:00:00 2001 From: Yaakov Meir Nemoy Date: Wed, 13 May 2009 07:44:36 +0000 Subject: [PATCH 003/514] makes macros file a conf file --- ghc-rpm-macros.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c3be4b9..de51304 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros Version: 0.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -44,11 +44,13 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING AUTHORS -%{_sysconfdir}/rpm/macros.ghc - +%config(noreplace) %{_sysconfdir}/rpm/macros.ghc %changelog +* Wed May 13 2009 Yaakov M. Nemoy - 0.1-7 +- specifies the macros file as a %%conf + * Sat May 9 2009 Yaakov M. Nemoy - 0.1-6 - removes archs and replaces with noarch - bumps to avoid conflicts with jens From c938f3baec9dfc5de3259a66af8ba68cf338b542 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Jun 2009 09:24:58 +0000 Subject: [PATCH 004/514] drop version from ghcdocdir since it breaks haddock indexing --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 6103094..08a179e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -10,7 +10,7 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v -%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version} +%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}} %ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version} %ghc_gen_filelists() \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index de51304..dad98a7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros -Version: 0.1 -Release: 7%{?dist} +Version: 0.2 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jun 9 2009 Jens Petersen - 0.2-1 +- drop version from ghcdocdir since it breaks haddock indexing + * Wed May 13 2009 Yaakov M. Nemoy - 0.1-7 - specifies the macros file as a %%conf From 86afb6d6725ad6b8d39cd388bafc5efd1b2e231e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 00:05:15 +0000 Subject: [PATCH 005/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index dad98a7..2785d0d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros Version: 0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Tue Jun 9 2009 Jens Petersen - 0.2-1 - drop version from ghcdocdir since it breaks haddock indexing From 082b15a21d9f5ff4ddabb246eaeadfbc6ecf8ce6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 22 Sep 2009 03:25:59 +0000 Subject: [PATCH 006/514] version ghcdocdir to allow multiple doc versions like ghcpkgdir --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 08a179e..6103094 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -10,7 +10,7 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v -%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}} +%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version} %ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version} %ghc_gen_filelists() \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2785d0d..b5887b9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros -Version: 0.2 -Release: 2%{?dist} +Version: 0.2.1 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 22 2009 Jens Petersen - 0.2.1-1 +- version ghcdocdir to allow multiple doc versions like ghcpkgdir + * Fri Jul 24 2009 Fedora Release Engineering - 0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 87815fa4c08921311c51e9d0a169df38e59c347a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 22 Sep 2009 10:08:17 +0000 Subject: [PATCH 007/514] revert last change - unversion ghcdocdir --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 6103094..08a179e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -10,7 +10,7 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v -%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version} +%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}} %ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version} %ghc_gen_filelists() \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b5887b9..25191aa 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros Version: 0.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Sep 22 2009 Jens Petersen - 0.2.1-2 +- no, revert versioned ghcdocdir again! + * Tue Sep 22 2009 Jens Petersen - 0.2.1-1 - version ghcdocdir to allow multiple doc versions like ghcpkgdir From 5edaabc99824629560c247d5e075a96a30b18b81 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 Nov 2009 07:45:33 +0000 Subject: [PATCH 008/514] add %GHCRequires for automatically versioned library deps --- ghc-rpm-macros.ghc | 3 +++ ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 08a179e..c0c2511 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -36,3 +36,6 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : %ghc_version %(ghc --numeric-version) + +%GHCRequires() \ +Requires: ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/%1-//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 25191aa..98915d3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros -Version: 0.2.1 -Release: 2%{?dist} +Version: 0.2.2 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 16 2009 Jens Petersen - 0.2.2-1 +- add %%GHCRequires for automatically versioned library deps + * Tue Sep 22 2009 Jens Petersen - 0.2.1-2 - no, revert versioned ghcdocdir again! From 32ffe2c854c9b1439c880cbf9a7355669a0d4367 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 Nov 2009 09:14:11 +0000 Subject: [PATCH 009/514] use the latest installed pkg version for %GHCRequires --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index c0c2511..4e23fc6 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -38,4 +38,4 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_version %(ghc --numeric-version) %GHCRequires() \ -Requires: ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/%1-//") +Requires: ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 98915d3..02512a8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.2.2 +Version: 0.2.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 16 2009 Jens Petersen - 0.2.3-1 +- use the latest installed pkg version for %%GHCRequires + * Mon Nov 16 2009 Jens Petersen - 0.2.2-1 - add %%GHCRequires for automatically versioned library deps From b8f63cfff065c52cca73a3a8a2cd80bc5d96a59e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 Nov 2009 09:56:31 +0000 Subject: [PATCH 010/514] change GHCRequires to ghc_pkg_ver --- ghc-rpm-macros.ghc | 3 +-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 4e23fc6..181d59a 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -37,5 +37,4 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_version %(ghc --numeric-version) -%GHCRequires() \ -Requires: ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") +%ghc_pkg_ver() ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 02512a8..26f2525 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.2.3 +Version: 0.2.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 16 2009 Jens Petersen - 0.2.4-1 +- change GHCRequires to ghc_pkg_ver + * Mon Nov 16 2009 Jens Petersen - 0.2.3-1 - use the latest installed pkg version for %%GHCRequires From d007836b70bafa8b301f559dfa962dfde99148fd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 Nov 2009 12:27:56 +0000 Subject: [PATCH 011/514] make ghc_pkg_ver only return pkg version --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 181d59a..8b37b8d 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -37,4 +37,4 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_version %(ghc --numeric-version) -%ghc_pkg_ver() ghc-%1-%2 = %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") +%ghc_pkg_ver() %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 26f2525..061cbb4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.2.4 +Version: 0.2.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 16 2009 Jens Petersen - 0.2.5-1 +- make ghc_pkg_ver only return pkg version + * Mon Nov 16 2009 Jens Petersen - 0.2.4-1 - change GHCRequires to ghc_pkg_ver From 99a8a6ebf23b030745a375cf586d70b36493d05c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:19:25 +0000 Subject: [PATCH 012/514] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 382833f..df03db1 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: ghc-rpm-macros -# $Id$ +# $Id: Makefile,v 1.1 2009/05/13 05:10:46 kevin Exp $ NAME := ghc-rpm-macros SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From b22ec8887d7fe10eb69f129a247fb2385191fa2c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 11 Dec 2009 18:17:07 +0000 Subject: [PATCH 013/514] major updates for ghc-6.12, package.conf.d, and shared libraries - add shared support to cabal_configure, ghc_gen_filelists - version ghcdocdir - replace ghc_gen_scripts, ghc_install_scripts, ghc_register_pkg, ghc_unregister_pkg with cabal_pkg_conf - allow (ghc to) override ghc_version --- ghc-rpm-macros.ghc | 32 +++++++++++++++++--------------- ghc-rpm-macros.spec | 10 +++++++++- 2 files changed, 26 insertions(+), 16 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 8b37b8d..2c0eb62 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,7 +1,7 @@ %cabal %{_bindir}/runghc Setup %cabal_configure \ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} %cabal_makefile \ %cabal makefile -f cabal-rpm.mk \ @@ -10,31 +10,33 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v -%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}} -%ghcpkgdir %{_libdir}/ghc-%(ghc --numeric-version)/%{?pkg_name}%{!?pkg_name:%name}-%{version} +%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version} +%ghcpkgdir %{_libdir}/ghc-%{ghc_version}/%{?pkg_name}%{!?pkg_name:%name}-%{version} %ghc_gen_filelists() \ -rm -f %1-devel.files %1-prof.files %1-doc.files \ +rm -f %1.files %1-devel.files %1-prof.files %1-doc.files \ +echo '%defattr(-,root,root,-)' > %1.files \ +echo '%dir %{ghcpkgdir}' >> %1.files \ +echo '%attr(755,root,root) %{ghcpkgdir}/libHS%{?pkg_name}%{!?pkg_name:%name}-%{version}-ghc%{ghc_version}.so' >> %1.files \ echo '%defattr(-,root,root,-)' > %1-devel.files \ +echo '%{_libdir}/ghc-%{ghc_version}/package.conf.d/%{?pkg_name}%{!?pkg_name:%name}-%{version}-*.conf' >> %1-devel.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' -o -name 'libHS*.so' \\) >> %1-devel.files \ echo '%defattr(-,root,root,-)' > %1-prof.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1.files %1-devel.files %1-prof.files \ echo '%defattr(-,root,root,-)' > %1-doc.files \ echo '%{ghcdocdir}' >> %1-doc.files \ %{nil} -%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script - -%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{ghcpkgdir} - -%ghc_register_pkg %{ghcpkgdir}/register.sh >/dev/null || : - -%ghc_unregister_pkg %{ghcpkgdir}/unregister.sh >/dev/null || : - %ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : -%ghc_version %(ghc --numeric-version) +%ghc_version %{!?ghc_version:%(ghc --numeric-version)}%{?ghc_version} %ghc_pkg_ver() %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") + +%cabal_pkg_conf \ +%cabal register --gen-pkg-config \ +mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%(ghc --numeric-version)/package.conf.d \ +install --mode=0644 %{?pkg_name}%{!?pkg_name:%name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d + diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 061cbb4..6c8381c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.2.5 +Version: 0.3.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Dec 12 2009 Jens Petersen - 0.3.0-1 +- major updates for ghc-6.12, package.conf.d, and shared libraries +- add shared support to cabal_configure, ghc_gen_filelists +- version ghcdocdir +- replace ghc_gen_scripts, ghc_install_scripts, ghc_register_pkg, ghc_unregister_pkg + with cabal_pkg_conf +- allow (ghc to) override ghc_version + * Mon Nov 16 2009 Jens Petersen - 0.2.5-1 - make ghc_pkg_ver only return pkg version From 8b0ec9d34e748c636936019fff80cd729d0248aa Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 15 Dec 2009 21:50:31 +0000 Subject: [PATCH 014/514] - use ghc_version_override to override ghc_version - fix pkg .conf filelist match --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2c0eb62..ff4e772 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -19,7 +19,7 @@ echo '%defattr(-,root,root,-)' > %1.files \ echo '%dir %{ghcpkgdir}' >> %1.files \ echo '%attr(755,root,root) %{ghcpkgdir}/libHS%{?pkg_name}%{!?pkg_name:%name}-%{version}-ghc%{ghc_version}.so' >> %1.files \ echo '%defattr(-,root,root,-)' > %1-devel.files \ -echo '%{_libdir}/ghc-%{ghc_version}/package.conf.d/%{?pkg_name}%{!?pkg_name:%name}-%{version}-*.conf' >> %1-devel.files \ +echo '%{_libdir}/ghc-%{ghc_version}/package.conf.d/%{?pkg_name}%{!?pkg_name:%name}-%{version}*.conf' >> %1-devel.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' -o -name 'libHS*.so' \\) >> %1-devel.files \ echo '%defattr(-,root,root,-)' > %1-prof.files \ @@ -31,7 +31,7 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : -%ghc_version %{!?ghc_version:%(ghc --numeric-version)}%{?ghc_version} +%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} %ghc_pkg_ver() %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6c8381c..0c84f53 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.3.0 +Version: 0.3.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Dec 15 2009 Jens Petersen - 0.3.1-1 +- use ghc_version_override to override ghc_version +- fix pkg .conf filelist match + * Sat Dec 12 2009 Jens Petersen - 0.3.0-1 - major updates for ghc-6.12, package.conf.d, and shared libraries - add shared support to cabal_configure, ghc_gen_filelists From dffc2c5084a4ec5de15d18d4821985333259bc6f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Dec 2009 14:42:16 +0000 Subject: [PATCH 015/514] - add cabal_configure_dynamic - add ghc_requires, ghc_doc_requires, ghc_prof_requires --- ghc-rpm-macros.ghc | 15 +++++++++++++++ ghc-rpm-macros.spec | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ff4e772..4ffc09e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -3,6 +3,8 @@ %cabal_configure \ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} +%cabal_configure_dynamic %cabal_configure --ghc-option=-dynamic + %cabal_makefile \ %cabal makefile -f cabal-rpm.mk \ make -f cabal-rpm.mk %{_smp_mflags} \ @@ -40,3 +42,16 @@ echo '%{ghcdocdir}' >> %1-doc.files \ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%(ghc --numeric-version)/package.conf.d \ install --mode=0644 %{?pkg_name}%{!?pkg_name:%name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d +%ghc_requires Requires: ghc = %{ghc_version}\ +Requires(post): ghc = %{ghc_version}\ +Requires(postun): ghc = %{ghc_version}\ +%if %{with shared}\ +Requires: ghc-%{?pkg_name}%{!?pkg_name:%name} = %{version}-%{release}\ +%endif + +%ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ +Requires(post): ghc-doc = %{ghc_version}\ +Requires(postun): ghc-doc = %{ghc_version} + +%ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ +Requires: ghc-%{?pkg_name}%{!?pkg_name:%name}-devel = %{version}-%{release} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0c84f53..46c0f03 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.3.1 +Version: 0.4.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Dec 24 2009 Jens Petersen - 0.4.0-1 +- add cabal_configure_dynamic +- add ghc_requires, ghc_doc_requires, ghc_prof_requires + * Tue Dec 15 2009 Jens Petersen - 0.3.1-1 - use ghc_version_override to override ghc_version - fix pkg .conf filelist match From 23340a3f9706c37e50071e37b53cc71ec1706bdd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 9 Jan 2010 15:58:27 +0000 Subject: [PATCH 016/514] - pkg_name must be set now for binlib packages too - new ghc_lib_package and ghc_binlib_package macros make packaging too easy - ghc_package_devel, ghc_package_doc, and ghc_package_prof helper macros - ghc_gen_filelists now defaults to ghc-%%{pkg_name} - add dynamic bcond to cabal_configure instead of cabal_configure_dynamic --- ghc-rpm-macros.ghc | 149 +++++++++++++++++++++++++++++++++++++------- ghc-rpm-macros.spec | 9 ++- 2 files changed, 136 insertions(+), 22 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 4ffc09e..4fd3791 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,9 +1,7 @@ %cabal %{_bindir}/runghc Setup %cabal_configure \ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} - -%cabal_configure_dynamic %cabal_configure --ghc-option=-dynamic +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} %cabal_makefile \ %cabal makefile -f cabal-rpm.mk \ @@ -12,23 +10,24 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v -%ghcdocdir %{_docdir}/ghc/libraries/%{?pkg_name}%{!?pkg_name:%{name}}-%{version} -%ghcpkgdir %{_libdir}/ghc-%{ghc_version}/%{?pkg_name}%{!?pkg_name:%name}-%{version} +%ghcdocdir %{_docdir}/ghc/libraries/%{pkg_name}-%{version} +%ghcpkgdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version} %ghc_gen_filelists() \ -rm -f %1.files %1-devel.files %1-prof.files %1-doc.files \ -echo '%defattr(-,root,root,-)' > %1.files \ -echo '%dir %{ghcpkgdir}' >> %1.files \ -echo '%attr(755,root,root) %{ghcpkgdir}/libHS%{?pkg_name}%{!?pkg_name:%name}-%{version}-ghc%{ghc_version}.so' >> %1.files \ -echo '%defattr(-,root,root,-)' > %1-devel.files \ -echo '%{_libdir}/ghc-%{ghc_version}/package.conf.d/%{?pkg_name}%{!?pkg_name:%name}-%{version}*.conf' >> %1-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> %1-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' -o -name 'libHS*.so' \\) >> %1-devel.files \ -echo '%defattr(-,root,root,-)' > %1-prof.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1.files %1-devel.files %1-prof.files \ -echo '%defattr(-,root,root,-)' > %1-doc.files \ -echo '%{ghcdocdir}' >> %1-doc.files \ +basepkg=%{?1}%{!?1:ghc-%{pkg_name}} \ +rm -f ${basepkg}.files ${basepkg}-devel.files ${basepkg}-prof.files ${basepkg}-doc.files \ +echo '%defattr(-,root,root,-)' > ${basepkg}.files \ +echo '%dir %{ghcpkgdir}' >> ${basepkg}.files \ +echo '%attr(755,root,root) %{ghcpkgdir}/libHS%{pkg_name}-%{version}-ghc%{ghc_version}.so' >> ${basepkg}.files \ +echo '%defattr(-,root,root,-)' > ${basepkg}-devel.files \ +echo '%{_libdir}/ghc-%{ghc_version}/package.conf.d/%{pkg_name}-%{version}*.conf' >> ${basepkg}-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> ${basepkg}-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' -o -name 'libHS*.so' \\) >> ${basepkg}-devel.files \ +echo '%defattr(-,root,root,-)' > ${basepkg}-prof.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> ${basepkg}-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basepkg}.files ${basepkg}-devel.files ${basepkg}-prof.files \ +echo '%defattr(-,root,root,-)' > ${basepkg}-doc.files \ +echo '%{ghcdocdir}' >> ${basepkg}-doc.files \ %{nil} %ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : @@ -40,13 +39,13 @@ echo '%{ghcdocdir}' >> %1-doc.files \ %cabal_pkg_conf \ %cabal register --gen-pkg-config \ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%(ghc --numeric-version)/package.conf.d \ -install --mode=0644 %{?pkg_name}%{!?pkg_name:%name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d +install --mode=0644 %{pkg_name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d %ghc_requires Requires: ghc = %{ghc_version}\ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ %if %{with shared}\ -Requires: ghc-%{?pkg_name}%{!?pkg_name:%name} = %{version}-%{release}\ +Requires: ghc-%{pkg_name} = %{version}-%{release}\ %endif %ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ @@ -54,4 +53,112 @@ Requires(post): ghc-doc = %{ghc_version}\ Requires(postun): ghc-doc = %{ghc_version} %ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ -Requires: ghc-%{?pkg_name}%{!?pkg_name:%name}-devel = %{version}-%{release} +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} + +%ghc_lib_package(n:c:h:)\ +%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%if %{with shared}\ +%files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\ +%defattr(-,root,root,-)\ +%{_docdir}/%{name}-%{version}\ +%endif\ +\ +%ghc_package_devel\ +\ +%ghc_package_doc\ +\ +%ghc_package_prof\ + + +%ghc_binlib_package(n:c:h:l:v:)\ +%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%package -n %{ghc_pkg_name}\ +Summary: Library for %{common_summary}\ +Group: System Environment/Libraries\ +%{-v:Version: %{-v*}}\ +%{-l:License: %{-l*}}\ +\ +%description -n %{ghc_pkg_name}\ +%{common_description}\ +\ +This package provides the shared library.\ +\ +%ghc_lib_package\ + + +%ghc_package_devel(n:c:h:l:v:)\ +%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%package -n %{ghc_pkg_name}-devel\ +Summary: %{common_summary} development files\ +Group: Development/Libraries\ +%{-v:Version: %{-v*}}\ +%{-l:License: %{-l*}}\ +%{?ghc_requires}\ +%{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\ +%{-h:Requires: %{-h*}}\ +%{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ +%{-c:Requires: %{-c*}}\ +\ +%description -n %{ghc_pkg_name}-devel\ +%{common_description}\ +\ +This package contains the development files.\ +\ +%post -n %{ghc_pkg_name}-devel\ +ghc-pkg recache\ +\ +%postun -n %{ghc_pkg_name}-devel\ +ghc-pkg recache\ +\ +%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\ +%defattr(-,root,root,-)\ +%if %{without shared}\ +%{_docdir}/%{name}-%{version}\ +%endif\ + +%ghc_package_doc(n:h:l:v:)\ +%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%package -n %{ghc_pkg_name}-doc\ +Summary: Documentation for %{common_summary}\ +Group: Development/Libraries\ +%{-v:Version: %{-v*}}\ +%{-l:License: %{-l*}}\ +%{?ghc_doc_requires}\ +%{!-h:%{?ghc_pkg_deps:Requires: %(echo %{ghc_pkg_deps} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}}\ +%{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ +\ +%description -n %{ghc_pkg_name}-doc\ +%{common_description}\ +\ +This package contains development documentation files.\ +\ +%post -n %{ghc_pkg_name}-doc\ +%ghc_reindex_haddock\ +\ +%postun -n %{ghc_pkg_name}-doc\ +if [ "$1" -eq 0 ] ; then\ + %ghc_reindex_haddock\ +fi\ +\ +%files -n %{ghc_pkg_name}-doc -f %{ghc_pkg_name}-doc.files\ +%defattr(-,root,root,-)\ + +%ghc_package_prof(n:h:l:v:)\ +%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%package -n %{ghc_pkg_name}-prof\ +Summary: Profiling libraries for %{common_summary}\ +Group: Development/Libraries\ +%{-v:Version: %{-v*}}\ +%{-l:License: %{-l*}}\ +%{?ghc_prof_requires}\ +%{!-h:%{?ghc_pkg_deps:Requires: %(echo %{ghc_pkg_deps} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\ +%{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ +\ +%description -n %{ghc_pkg_name}-prof\ +%{common_description}\ +\ +This package contains the profiling library.\ +\ +%files -n %{ghc_pkg_name}-prof -f %{ghc_pkg_name}-prof.files\ +%defattr(-,root,root,-)\ + diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 46c0f03..cd4e845 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.4.0 +Version: 0.5.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,13 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jan 10 2010 Jens Petersen - 0.5.0-1 +- pkg_name must be set now for binlib packages too +- new ghc_lib_package and ghc_binlib_package macros make packaging too easy +- ghc_package_devel, ghc_package_doc, and ghc_package_prof helper macros +- ghc_gen_filelists now defaults to ghc-%%{pkg_name} +- add dynamic bcond to cabal_configure instead of cabal_configure_dynamic + * Thu Dec 24 2009 Jens Petersen - 0.4.0-1 - add cabal_configure_dynamic - add ghc_requires, ghc_doc_requires, ghc_prof_requires From c97ee70960ccbec76c418bce476fcae3105646ff Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 10 Jan 2010 14:59:10 +0000 Subject: [PATCH 017/514] - add ghcdocbasedir - revert ghcdocdir to match upstream ghc - ghcdocdir and ghcpkgdir now take optional name version args - update ghc_gen_filelists to new optional name version args - handle docdir in ghc_gen_filelists - ghc_reindex_haddock uses ghcdocbasedir - summary and description options added to ghc_binlib_package, ghc_package_devel, ghc_package_doc, and ghc_package_prof --- ghc-rpm-macros.ghc | 80 ++++++++++++++++++++++++--------------------- ghc-rpm-macros.spec | 12 ++++++- 2 files changed, 54 insertions(+), 38 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 4fd3791..dacafee 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -10,27 +10,33 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v -%ghcdocdir %{_docdir}/ghc/libraries/%{pkg_name}-%{version} -%ghcpkgdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version} +%ghcdocbasedir %{_docdir}/ghc/html +%ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{?2}%{!?2:%{version}} +%ghcpkgdir() %{_libdir}/ghc-%{ghc_version}/%{?1}%{!?1:%{pkg_name}}-%{?2}%{!?2:%{version}} %ghc_gen_filelists() \ -basepkg=%{?1}%{!?1:ghc-%{pkg_name}} \ -rm -f ${basepkg}.files ${basepkg}-devel.files ${basepkg}-prof.files ${basepkg}-doc.files \ -echo '%defattr(-,root,root,-)' > ${basepkg}.files \ -echo '%dir %{ghcpkgdir}' >> ${basepkg}.files \ -echo '%attr(755,root,root) %{ghcpkgdir}/libHS%{pkg_name}-%{version}-ghc%{ghc_version}.so' >> ${basepkg}.files \ -echo '%defattr(-,root,root,-)' > ${basepkg}-devel.files \ -echo '%{_libdir}/ghc-%{ghc_version}/package.conf.d/%{pkg_name}-%{version}*.conf' >> ${basepkg}-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed 's/^/%dir /' >> ${basepkg}-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' -o -name 'libHS*.so' \\) >> ${basepkg}-devel.files \ -echo '%defattr(-,root,root,-)' > ${basepkg}-prof.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> ${basepkg}-prof.files \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basepkg}.files ${basepkg}-devel.files ${basepkg}-prof.files \ -echo '%defattr(-,root,root,-)' > ${basepkg}-doc.files \ -echo '%{ghcdocdir}' >> ${basepkg}-doc.files \ +basepkg=%{?1}%{!?1:%{pkg_name}} \ +basefile=ghc-${basepkg} \ +version=%{?2}%{!?2:%{version}} \ +rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \ +echo "%defattr(-,root,root,-)" > ${basefile}.files \ +if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ + %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{!?with_shared:-devel}.files} %{?1::} \ +fi \ +echo "%dir %{ghcpkgdir}" >> ${basefile}.files \ +echo "%attr(755,root,root) %{ghcpkgdir}/libHS${basepkg}-${version}-ghc%{ghc_version}.so" >> ${basefile}.files \ +echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \ +echo "%{_libdir}/ghc-%{ghc_version}/package.conf.d/${basepkg}-${version}*.conf" >> ${basefile}-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basefile}-devel.files \ +echo "%defattr(-,root,root,-)" > ${basefile}-prof.files \ +find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ +echo "%defattr(-,root,root,-)" > ${basefile}-doc.files \ +echo "%{ghcdocdir}" >> ${basefile}-doc.files \ %{nil} -%ghc_reindex_haddock ( cd %{_docdir}/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : +%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} @@ -60,7 +66,6 @@ Requires: ghc-%{pkg_name}-devel = %{version}-%{release} %if %{with shared}\ %files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\ %defattr(-,root,root,-)\ -%{_docdir}/%{name}-%{version}\ %endif\ \ %ghc_package_devel\ @@ -70,26 +75,28 @@ Requires: ghc-%{pkg_name}-devel = %{version}-%{release} %ghc_package_prof\ -%ghc_binlib_package(n:c:h:l:v:)\ -%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%ghc_binlib_package(n:c:h:l:v:s:d:)\ +%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ +%define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}\ -Summary: Library for %{common_summary}\ +Summary: Library for %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ Group: System Environment/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ \ %description -n %{ghc_pkg_name}\ -%{common_description}\ +%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ \ This package provides the shared library.\ \ %ghc_lib_package\ -%ghc_package_devel(n:c:h:l:v:)\ -%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%ghc_package_devel(n:c:h:l:v:s:d:)\ +%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ +%define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ -Summary: %{common_summary} development files\ +Summary: %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}} development files\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -100,7 +107,7 @@ Group: Development/Libraries\ %{-c:Requires: %{-c*}}\ \ %description -n %{ghc_pkg_name}-devel\ -%{common_description}\ +%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ \ This package contains the development files.\ \ @@ -112,14 +119,12 @@ ghc-pkg recache\ \ %files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\ %defattr(-,root,root,-)\ -%if %{without shared}\ -%{_docdir}/%{name}-%{version}\ -%endif\ -%ghc_package_doc(n:h:l:v:)\ -%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%ghc_package_doc(n:h:l:v:s:d:)\ +%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ +%define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-doc\ -Summary: Documentation for %{common_summary}\ +Summary: Documentation for %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -128,7 +133,7 @@ Group: Development/Libraries\ %{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ \ %description -n %{ghc_pkg_name}-doc\ -%{common_description}\ +%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ \ This package contains development documentation files.\ \ @@ -143,10 +148,11 @@ fi\ %files -n %{ghc_pkg_name}-doc -f %{ghc_pkg_name}-doc.files\ %defattr(-,root,root,-)\ -%ghc_package_prof(n:h:l:v:)\ -%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ +%ghc_package_prof(n:h:l:v:s:d:)\ +%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ +%define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-prof\ -Summary: Profiling libraries for %{common_summary}\ +Summary: Profiling libraries for %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -155,7 +161,7 @@ Group: Development/Libraries\ %{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ \ %description -n %{ghc_pkg_name}-prof\ -%{common_description}\ +%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ \ This package contains the profiling library.\ \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cd4e845..2479dcb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.0 +Version: 0.5.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,16 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 11 2010 Jens Petersen - 0.5.1-1 +- add ghcdocbasedir +- revert ghcdocdir to match upstream ghc +- ghcdocdir and ghcpkgdir now take optional name version args +- update ghc_gen_filelists to new optional name version args +- handle docdir in ghc_gen_filelists +- ghc_reindex_haddock uses ghcdocbasedir +- summary and description options to ghc_binlib_package, ghc_package_devel, + ghc_package_doc, and ghc_package_prof + * Sun Jan 10 2010 Jens Petersen - 0.5.0-1 - pkg_name must be set now for binlib packages too - new ghc_lib_package and ghc_binlib_package macros make packaging too easy From 5f3759a686833c412ee38ecb0cb2917b5c9364ae Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jan 2010 03:13:01 +0000 Subject: [PATCH 018/514] use -n in ghc_requires and ghc_prof_requires for when no pkg_name --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index dacafee..d81f67d 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -51,7 +51,7 @@ install --mode=0644 %{pkg_name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ %if %{with shared}\ -Requires: ghc-%{pkg_name} = %{version}-%{release}\ +Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{version}-%{release}\ %endif %ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ @@ -59,7 +59,7 @@ Requires(post): ghc-doc = %{ghc_version}\ Requires(postun): ghc-doc = %{ghc_version} %ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ -Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{version}-%{release} %ghc_lib_package(n:c:h:)\ %define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2479dcb..90ae020 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.1 +Version: 0.5.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 11 2010 Jens Petersen - 0.5.2-1 +- use -n in ghc_requires and ghc_prof_requires for when no pkg_name + * Mon Jan 11 2010 Jens Petersen - 0.5.1-1 - add ghcdocbasedir - revert ghcdocdir to match upstream ghc From 9d7c9aecc00f505a1f2ccbe64e89fb7a72591801 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jan 2010 05:13:02 +0000 Subject: [PATCH 019/514] drop "Library for" from base lib summary --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index d81f67d..44f8e9e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -79,7 +79,7 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{version}-%{release} %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}\ -Summary: Library for %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ +Summary: %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ Group: System Environment/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 90ae020..dbf7f50 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.2 +Version: 0.5.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 11 2010 Jens Petersen - 0.5.3-1 +- drop "Library for" from base lib summary + * Mon Jan 11 2010 Jens Petersen - 0.5.2-1 - use -n in ghc_requires and ghc_prof_requires for when no pkg_name From a0bbde907a1a300ad1c89215059ec8711d730030 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 11 Jan 2010 06:51:22 +0000 Subject: [PATCH 020/514] use -v in ghc_requires and ghc_prof_requires for version --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 44f8e9e..29081fb 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -51,7 +51,7 @@ install --mode=0644 %{pkg_name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ %if %{with shared}\ -Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{version}-%{release}\ +Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ %endif %ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ @@ -59,7 +59,7 @@ Requires(post): ghc-doc = %{ghc_version}\ Requires(postun): ghc-doc = %{ghc_version} %ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ -Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{version}-%{release} +Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release} %ghc_lib_package(n:c:h:)\ %define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index dbf7f50..95cb088 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.3 +Version: 0.5.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jan 11 2010 Jens Petersen - 0.5.4-1 +- use -v in ghc_requires and ghc_prof_requires for version + * Mon Jan 11 2010 Jens Petersen - 0.5.3-1 - drop "Library for" from base lib summary From 4393386478a468ce1bda4140e5ab0180bd87ab24 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 14 Jan 2010 14:32:25 +0000 Subject: [PATCH 021/514] - drop optional 2nd version arg from ghcdocdir, ghcpkgdir, and ghc_gen_filelists: multiversion subpackages are not supported - add ghcpkgbasedir - bring back some shared conditions which were dropped temporarily - test for ghcpkgdir and ghcdocdir in ghc_gen_filelists - allow optional pkgname arg for cabal_pkg_conf - can now package gtk2hs --- ghc-rpm-macros.ghc | 31 +++++++++++++++++++++---------- ghc-rpm-macros.spec | 11 ++++++++++- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 29081fb..baf9d65 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -11,29 +11,40 @@ make -f cabal-rpm.mk %{_smp_mflags} \ %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v %ghcdocbasedir %{_docdir}/ghc/html -%ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{?2}%{!?2:%{version}} -%ghcpkgdir() %{_libdir}/ghc-%{ghc_version}/%{?1}%{!?1:%{pkg_name}}-%{?2}%{!?2:%{version}} +%ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{version} +%ghcpkgbasedir %{_libdir}/ghc-%{ghc_version} +%ghcpkgdir() %{ghcpkgbasedir}/%{?1}%{!?1:%{pkg_name}}-%{version} %ghc_gen_filelists() \ -basepkg=%{?1}%{!?1:%{pkg_name}} \ -basefile=ghc-${basepkg} \ -version=%{?2}%{!?2:%{version}} \ +pkgname=%{?1}%{!?1:%{pkg_name}} \ +basefile=ghc-${pkgname} \ +pkgnamever=${pkgname}-%{version} \ rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \ echo "%defattr(-,root,root,-)" > ${basefile}.files \ if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{!?with_shared:-devel}.files} %{?1::} \ fi \ +%if %{with shared} \ +if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ echo "%dir %{ghcpkgdir}" >> ${basefile}.files \ -echo "%attr(755,root,root) %{ghcpkgdir}/libHS${basepkg}-${version}-ghc%{ghc_version}.so" >> ${basefile}.files \ +echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \ +fi \ +%endif \ echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \ -echo "%{_libdir}/ghc-%{ghc_version}/package.conf.d/${basepkg}-${version}*.conf" >> ${basefile}-devel.files \ +echo "%{_libdir}/ghc-%{ghc_version}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \ +if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basefile}-devel.files \ +fi \ echo "%defattr(-,root,root,-)" > ${basefile}-prof.files \ +if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ +fi \ echo "%defattr(-,root,root,-)" > ${basefile}-doc.files \ +if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \ echo "%{ghcdocdir}" >> ${basefile}-doc.files \ +fi \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ %{nil} %ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : @@ -44,8 +55,8 @@ echo "%{ghcdocdir}" >> ${basefile}-doc.files \ %cabal_pkg_conf \ %cabal register --gen-pkg-config \ -mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%(ghc --numeric-version)/package.conf.d \ -install --mode=0644 %{pkg_name}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d +mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d \ +install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d %ghc_requires Requires: ghc = %{ghc_version}\ Requires(post): ghc = %{ghc_version}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 95cb088..d7338b1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.4 +Version: 0.5.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,15 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jan 15 2010 Jens Petersen - 0.5.5-1 +- drop optional 2nd arg for version from ghcdocdir, ghcpkgdir, and + ghc_gen_filelists: multiversion subpackages are not supported +- add ghcpkgbasedir +- bring back some shared conditions which were dropped temporarily +- test for ghcpkgdir and ghcdocdir in ghc_gen_filelists +- allow optional pkgname arg for cabal_pkg_conf +- can now package gtk2hs + * Mon Jan 11 2010 Jens Petersen - 0.5.4-1 - use -v in ghc_requires and ghc_prof_requires for version From 191657b65420e2315415f9d4abada0532afc23a5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 14 Jan 2010 14:35:34 +0000 Subject: [PATCH 022/514] tweak version arg changelog --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d7338b1..ec54a2d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -49,7 +49,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Fri Jan 15 2010 Jens Petersen - 0.5.5-1 -- drop optional 2nd arg for version from ghcdocdir, ghcpkgdir, and +- drop optional 2nd version arg from ghcdocdir, ghcpkgdir, and ghc_gen_filelists: multiversion subpackages are not supported - add ghcpkgbasedir - bring back some shared conditions which were dropped temporarily From d9a9b5f4affe6d41ca74d411d7cf94b5933de44b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 12 Apr 2010 14:52:34 +0000 Subject: [PATCH 023/514] - drop unused ghc_pkg_ver macro - add ghc_pkg_recache macro --- ghc-rpm-macros.ghc | 20 +++++++++++--------- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index baf9d65..8868530 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -47,17 +47,13 @@ fi \ sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ %{nil} -%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : - %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -%ghc_pkg_ver() %(ghc-pkg list --global --simple-output %1|sed -e "s/.*%1-//") - %cabal_pkg_conf \ %cabal register --gen-pkg-config \ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d \ install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d - + %ghc_requires Requires: ghc = %{ghc_version}\ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ @@ -84,7 +80,7 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v %ghc_package_doc\ \ %ghc_package_prof\ - +%{nil} %ghc_binlib_package(n:c:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ @@ -101,7 +97,9 @@ Group: System Environment/Libraries\ This package provides the shared library.\ \ %ghc_lib_package\ +%{nil} +%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : %ghc_package_devel(n:c:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ @@ -123,13 +121,16 @@ Group: Development/Libraries\ This package contains the development files.\ \ %post -n %{ghc_pkg_name}-devel\ -ghc-pkg recache\ +%ghc_pkg_recache\ \ %postun -n %{ghc_pkg_name}-devel\ -ghc-pkg recache\ +%ghc_pkg_recache\ \ %files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\ %defattr(-,root,root,-)\ +%{nil} + +%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : %ghc_package_doc(n:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ @@ -158,6 +159,7 @@ fi\ \ %files -n %{ghc_pkg_name}-doc -f %{ghc_pkg_name}-doc.files\ %defattr(-,root,root,-)\ +%{nil} %ghc_package_prof(n:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ @@ -178,4 +180,4 @@ This package contains the profiling library.\ \ %files -n %{ghc_pkg_name}-prof -f %{ghc_pkg_name}-prof.files\ %defattr(-,root,root,-)\ - +%{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ec54a2d..92dce43 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.5 +Version: 0.5.6 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 12 2010 Jens Petersen - 0.5.6-1 +- drop unused ghc_pkg_ver macro +- add ghc_pkg_recache macro + * Fri Jan 15 2010 Jens Petersen - 0.5.5-1 - drop optional 2nd version arg from ghcdocdir, ghcpkgdir, and ghc_gen_filelists: multiversion subpackages are not supported From a0e7adadfe6a4b7a1dddee9cd6cce5776f971df6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 20 Jun 2010 12:10:25 +0000 Subject: [PATCH 024/514] - add comments over macros - drop unused cabal_makefile --- ghc-rpm-macros.ghc | 28 +++++++++++++++++++++++----- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 8868530..b043fc9 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,20 +1,23 @@ +# "cabal" %cabal %{_bindir}/runghc Setup +# configure %cabal_configure \ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} -%cabal_makefile \ -%cabal makefile -f cabal-rpm.mk \ -make -f cabal-rpm.mk %{_smp_mflags} \ -%{nil} - +# install %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v +# root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html +# ghcdocdir [pkgname] %ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{version} +# top library dir %ghcpkgbasedir %{_libdir}/ghc-%{ghc_version} +# ghcpkgdir [pkgname] %ghcpkgdir() %{ghcpkgbasedir}/%{?1}%{!?1:%{pkg_name}}-%{version} +# ghc_gen_filelists [pkgname] %ghc_gen_filelists() \ pkgname=%{?1}%{!?1:%{pkg_name}} \ basefile=ghc-${pkgname} \ @@ -47,13 +50,17 @@ fi \ sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ %{nil} +# compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} +# create and install package.conf file +# cabal_pkg_conf [pkgname] %cabal_pkg_conf \ %cabal register --gen-pkg-config \ mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d \ install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d +# devel pkg basic requires %ghc_requires Requires: ghc = %{ghc_version}\ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ @@ -61,13 +68,16 @@ Requires(postun): ghc = %{ghc_version}\ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ %endif +# doc pkg basic requires %ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ Requires(post): ghc-doc = %{ghc_version}\ Requires(postun): ghc-doc = %{ghc_version} +# prof pkg basic requires %ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release} +# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] %ghc_lib_package(n:c:h:)\ %define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ %if %{with shared}\ @@ -82,6 +92,7 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v %ghc_package_prof\ %{nil} +# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] %ghc_binlib_package(n:c:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ @@ -101,6 +112,10 @@ This package provides the shared library.\ %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : +# for docs post and postun +%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : + +# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] %ghc_package_devel(n:c:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ @@ -130,8 +145,10 @@ This package contains the development files.\ %defattr(-,root,root,-)\ %{nil} +# re-index haddock %ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : +# ghc_package_doc [-n pkgname] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] %ghc_package_doc(n:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ @@ -161,6 +178,7 @@ fi\ %defattr(-,root,root,-)\ %{nil} +# ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] %ghc_package_prof(n:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 92dce43..36b7c3c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.6 +Version: 0.5.7 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jun 20 2010 Jens Petersen - 0.5.7-1 +- add comments over macros +- drop unused cabal_makefile + * Mon Apr 12 2010 Jens Petersen - 0.5.6-1 - drop unused ghc_pkg_ver macro - add ghc_pkg_recache macro From eaf24211e8503db15a3e680375acf2b5502f4437 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 20 Jun 2010 12:44:49 +0000 Subject: [PATCH 025/514] add ghc_strip_shared to strip shared libraries --- ghc-rpm-macros.ghc | 3 +++ ghc-rpm-macros.spec | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index b043fc9..9ee61ce 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -199,3 +199,6 @@ This package contains the profiling library.\ %files -n %{ghc_pkg_name}-prof -f %{ghc_pkg_name}-prof.files\ %defattr(-,root,root,-)\ %{nil} + +# ghc_strip_shared +%ghc_strip_shared find $RPM_BUILD_ROOT%{ghcpkgbasedir} -name "*.so" | xargs strip diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 36b7c3c..14ac62c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.7 +Version: 0.5.8 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sun Jun 20 2010 Jens Petersen - 0.5.8-1 +- add ghc_strip_shared to strip shared libraries + * Sun Jun 20 2010 Jens Petersen - 0.5.7-1 - add comments over macros - drop unused cabal_makefile From 07f858eab5d00b3fcdbbf2fc766a57016f9205c7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Jun 2010 10:05:24 +0000 Subject: [PATCH 026/514] replace ghc_strip_shared with ghc_strip_dynlinked --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 9ee61ce..6607546 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -200,5 +200,5 @@ This package contains the profiling library.\ %defattr(-,root,root,-)\ %{nil} -# ghc_strip_shared -%ghc_strip_shared find $RPM_BUILD_ROOT%{ghcpkgbasedir} -name "*.so" | xargs strip +# ghc_strip_dynlinked +%ghc_strip_dynlinked find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print | xargs strip diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 14ac62c..e7ca748 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.8 +Version: 0.5.9 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jun 23 2010 Jens Petersen - 0.5.9-1 +- replace ghc_strip_shared with ghc_strip_dynlinked + * Sun Jun 20 2010 Jens Petersen - 0.5.8-1 - add ghc_strip_shared to strip shared libraries From 4e07127a2c25382510c2c60a65431d549897d1c2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 Jun 2010 10:24:53 +0000 Subject: [PATCH 027/514] make ghc_strip_dynlinked conditional on no debug_package --- ghc-rpm-macros.ghc | 5 ++++- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 6607546..87cb302 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -201,4 +201,7 @@ This package contains the profiling library.\ %{nil} # ghc_strip_dynlinked -%ghc_strip_dynlinked find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print | xargs strip +%ghc_strip_dynlinked\ +%if 0%{!?__debug_package:1}\ +find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print | xargs strip\ +%endif diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e7ca748..ca283ef 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.5.9 +Version: 0.6.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Jun 23 2010 Jens Petersen - 0.6.0-1 +- make ghc_strip_dynlinked conditional on no debug_package + * Wed Jun 23 2010 Jens Petersen - 0.5.9-1 - replace ghc_strip_shared with ghc_strip_dynlinked From f7eafbf000e0cf3d226194c1df08397122227a6c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 24 Jun 2010 02:13:22 +0000 Subject: [PATCH 028/514] - drop the summary -s and description -d package options since rpm does not seem to allow white\ space in macro option args anyway --- ghc-rpm-macros.ghc | 24 ++++++++++++------------ ghc-rpm-macros.spec | 6 +++++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 87cb302..2cfb035 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -92,18 +92,18 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v %ghc_package_prof\ %{nil} -# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] +# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] %ghc_binlib_package(n:c:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}\ -Summary: %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ +Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\ Group: System Environment/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ \ %description -n %{ghc_pkg_name}\ -%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ +%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ \ This package provides the shared library.\ \ @@ -115,12 +115,12 @@ This package provides the shared library.\ # for docs post and postun %ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : -# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] +# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] %ghc_package_devel(n:c:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ -Summary: %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}} development files\ +Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name}} development files\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -131,7 +131,7 @@ Group: Development/Libraries\ %{-c:Requires: %{-c*}}\ \ %description -n %{ghc_pkg_name}-devel\ -%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ +%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ \ This package contains the development files.\ \ @@ -148,12 +148,12 @@ This package contains the development files.\ # re-index haddock %ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : -# ghc_package_doc [-n pkgname] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] +# ghc_package_doc [-n pkgname] [-h pkgdepslist] [-l licensetag] [-v version] %ghc_package_doc(n:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-doc\ -Summary: Documentation for %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ +Summary: Documentation for %{?common_summary}%{!?common_summary:%{local_pkg_name}}\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -162,7 +162,7 @@ Group: Development/Libraries\ %{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ \ %description -n %{ghc_pkg_name}-doc\ -%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ +%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ \ This package contains development documentation files.\ \ @@ -178,12 +178,12 @@ fi\ %defattr(-,root,root,-)\ %{nil} -# ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-s summary] [-d description] +# ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] %ghc_package_prof(n:h:l:v:s:d:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-prof\ -Summary: Profiling libraries for %{-s:%{-s*}}%{!-s:%{?common_summary}%{!?common_summary:%{local_pkg_name}}}\ +Summary: Profiling libraries for %{?common_summary}%{!?common_summary:%{local_pkg_name}}\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -192,7 +192,7 @@ Group: Development/Libraries\ %{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ \ %description -n %{ghc_pkg_name}-prof\ -%{-d:%{-d*}}%{!-d:%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}}\ +%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ \ This package contains the profiling library.\ \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ca283ef..3a31541 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.6.0 +Version: 0.6.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 24 2010 Jens Petersen - 0.6.1-1 +- drop the summary -s and description -d package options since rpm does not + seem to allow white\ space in macro option args anyway + * Wed Jun 23 2010 Jens Petersen - 0.6.0-1 - make ghc_strip_dynlinked conditional on no debug_package From 85dddb6d0b51ea5c0690aad3ddb427dea77c9d54 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 24 Jun 2010 06:05:43 +0000 Subject: [PATCH 029/514] couple more fallback summary tweaks --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2cfb035..5128e73 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -120,7 +120,7 @@ This package provides the shared library.\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ -Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name}} development files\ +Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library} development files\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -153,7 +153,7 @@ This package contains the development files.\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-doc\ -Summary: Documentation for %{?common_summary}%{!?common_summary:%{local_pkg_name}}\ +Summary: Documentation for %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3a31541..d741af6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.6.1 +Version: 0.6.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 24 2010 Jens Petersen - 0.6.2-1 +- a couple more fallback summary tweaks + * Thu Jun 24 2010 Jens Petersen - 0.6.1-1 - drop the summary -s and description -d package options since rpm does not seem to allow white\ space in macro option args anyway From 28ead10bfc725612314fd3262590dac7f160a58c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 26 Jun 2010 08:53:39 +0000 Subject: [PATCH 030/514] new ghc_bin_build, ghc_bin_install, ghc_lib_build, ghc_lib_install --- ghc-rpm-macros.ghc | 23 +++++++++++++++++++++++ ghc-rpm-macros.spec | 5 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 5128e73..60269c5 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -205,3 +205,26 @@ This package contains the profiling library.\ %if 0%{!?__debug_package:1}\ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print | xargs strip\ %endif + +# ghc_bin_build +%ghc_bin_build\ +%cabal_configure --ghc\ +%cabal build + +# ghc_lib_build +%ghc_lib_build\ +%cabal_configure --ghc -p\ +%cabal build\ +%cabal haddock + +# ghc_bin_install +%ghc_bin_install\ +%cabal_install\ +%ghc_strip_dynlinked + +# ghc_lib_install +%ghc_lib_install\ +%cabal_install\ +%cabal_pkg_conf\ +%ghc_gen_filelists\ +%ghc_strip_dynlinked diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d741af6..adf10a5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.6.2 +Version: 0.7.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jun 26 2010 Jens Petersen - 0.7.0-1 +- new ghc_bin_build, ghc_bin_install, ghc_lib_build, ghc_lib_install + * Thu Jun 24 2010 Jens Petersen - 0.6.2-1 - a couple more fallback summary tweaks From 428e0de417313986bd60b64f8769e5b9cf0b6d55 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 28 Jun 2010 07:33:22 +0000 Subject: [PATCH 031/514] - support hscolour'ing of src via haddock - really remove redundant summary and description option flags --- ghc-rpm-macros.ghc | 14 ++++++-------- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 60269c5..a22fdd2 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -93,7 +93,7 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v %{nil} # ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_binlib_package(n:c:h:l:v:s:d:)\ +%ghc_binlib_package(n:c:h:l:v:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}\ @@ -112,11 +112,8 @@ This package provides the shared library.\ %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : -# for docs post and postun -%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : - # ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_package_devel(n:c:h:l:v:s:d:)\ +%ghc_package_devel(n:c:h:l:v:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ @@ -145,11 +142,12 @@ This package contains the development files.\ %defattr(-,root,root,-)\ %{nil} +# for docs post and postun # re-index haddock %ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : # ghc_package_doc [-n pkgname] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_package_doc(n:h:l:v:s:d:)\ +%ghc_package_doc(n:h:l:v:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-doc\ @@ -179,7 +177,7 @@ fi\ %{nil} # ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_package_prof(n:h:l:v:s:d:)\ +%ghc_package_prof(n:h:l:v:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-prof\ @@ -215,7 +213,7 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' %ghc_lib_build\ %cabal_configure --ghc -p\ %cabal build\ -%cabal haddock +%cabal haddock %{?with_hscolour:--hyperlink-source} # ghc_bin_install %ghc_bin_install\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index adf10a5..29e0ce5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.7.0 +Version: 0.7.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 28 2010 Jens Petersen - 0.7.1-1 +- support hscolour'ing of src from haddock +- really remove redundant summary and description option flags + * Sat Jun 26 2010 Jens Petersen - 0.7.0-1 - new ghc_bin_build, ghc_bin_install, ghc_lib_build, ghc_lib_install From 4e21230c7d51594c95879467bbe114173531fb21 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 15 Jul 2010 14:43:34 +0000 Subject: [PATCH 032/514] merge -doc into -devel and provide -o obsoletes doc subpackage option --- ghc-rpm-macros.ghc | 61 ++++++++++++--------------------------------- ghc-rpm-macros.spec | 5 +++- 2 files changed, 20 insertions(+), 46 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index a22fdd2..a091a49 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -22,7 +22,7 @@ pkgname=%{?1}%{!?1:%{pkg_name}} \ basefile=ghc-${pkgname} \ pkgnamever=${pkgname}-%{version} \ -rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files ${basefile}-doc.files \ +rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ echo "%defattr(-,root,root,-)" > ${basefile}.files \ if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{!?with_shared:-devel}.files} %{?1::} \ @@ -43,9 +43,8 @@ echo "%defattr(-,root,root,-)" > ${basefile}-prof.files \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \ fi \ -echo "%defattr(-,root,root,-)" > ${basefile}-doc.files \ if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \ -echo "%{ghcdocdir}" >> ${basefile}-doc.files \ +echo "%{ghcdocdir}" >> ${basefile}-devel.files \ fi \ sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ %{nil} @@ -77,8 +76,8 @@ Requires(postun): ghc-doc = %{ghc_version} %ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release} -# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] -%ghc_lib_package(n:c:h:)\ +# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-o obsolete-docver] +%ghc_lib_package(n:c:h:o:)\ %define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ %if %{with shared}\ %files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\ @@ -87,13 +86,11 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v \ %ghc_package_devel\ \ -%ghc_package_doc\ -\ %ghc_package_prof\ %{nil} -# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_binlib_package(n:c:h:l:v:)\ +# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-o obsolete-docver] +%ghc_binlib_package(n:c:h:l:v:o:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}\ @@ -112,8 +109,11 @@ This package provides the shared library.\ %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : -# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_package_devel(n:c:h:l:v:)\ +# for docs post and postun +%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : + +# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-o obsolete-docver] +%ghc_package_devel(n:c:h:l:v:o:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ @@ -122,10 +122,13 @@ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ %{?ghc_requires}\ +%{?ghc_doc_requires}\ %{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\ %{-h:Requires: %{-h*}}\ %{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ %{-c:Requires: %{-c*}}\ +%{-o:Obsoletes: %{ghc_pkg_name}-doc < %{-o*}}\ +%{-o:Provides: %{ghc_pkg_name}-doc = %{version}-%{release}}\ \ %description -n %{ghc_pkg_name}-devel\ %{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ @@ -134,45 +137,13 @@ This package contains the development files.\ \ %post -n %{ghc_pkg_name}-devel\ %ghc_pkg_recache\ +%ghc_reindex_haddock\ \ %postun -n %{ghc_pkg_name}-devel\ %ghc_pkg_recache\ -\ -%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\ -%defattr(-,root,root,-)\ -%{nil} - -# for docs post and postun -# re-index haddock -%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : - -# ghc_package_doc [-n pkgname] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_package_doc(n:h:l:v:)\ -%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ -%define ghc_pkg_name ghc-%{local_pkg_name}\ -%package -n %{ghc_pkg_name}-doc\ -Summary: Documentation for %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\ -Group: Development/Libraries\ -%{-v:Version: %{-v*}}\ -%{-l:License: %{-l*}}\ -%{?ghc_doc_requires}\ -%{!-h:%{?ghc_pkg_deps:Requires: %(echo %{ghc_pkg_deps} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}}\ -%{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ -\ -%description -n %{ghc_pkg_name}-doc\ -%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ -\ -This package contains development documentation files.\ -\ -%post -n %{ghc_pkg_name}-doc\ %ghc_reindex_haddock\ \ -%postun -n %{ghc_pkg_name}-doc\ -if [ "$1" -eq 0 ] ; then\ - %ghc_reindex_haddock\ -fi\ -\ -%files -n %{ghc_pkg_name}-doc -f %{ghc_pkg_name}-doc.files\ +%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\ %defattr(-,root,root,-)\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 29e0ce5..d3c3410 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.7.1 +Version: 0.8.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jul 16 2010 Jens Petersen - 0.8.0-1 +- merge -doc into -devel and provide -o obsoletes doc subpackage option + * Mon Jun 28 2010 Jens Petersen - 0.7.1-1 - support hscolour'ing of src from haddock - really remove redundant summary and description option flags From 601aa5ffc199ec8f2ee25da624b9376d8177b8f2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Jul 2010 08:08:37 +0000 Subject: [PATCH 033/514] - fix ghc_strip_dynlinked when no dynlinked files - devel should provide doc also when not obsoleting --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index a091a49..2f99c79 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -128,7 +128,7 @@ Group: Development/Libraries\ %{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ %{-c:Requires: %{-c*}}\ %{-o:Obsoletes: %{ghc_pkg_name}-doc < %{-o*}}\ -%{-o:Provides: %{ghc_pkg_name}-doc = %{version}-%{release}}\ +Provides: %{ghc_pkg_name}-doc = %{version}-%{release}\ \ %description -n %{ghc_pkg_name}-devel\ %{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ @@ -172,7 +172,7 @@ This package contains the profiling library.\ # ghc_strip_dynlinked %ghc_strip_dynlinked\ %if 0%{!?__debug_package:1}\ -find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print | xargs strip\ +find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ %endif # ghc_bin_build diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d3c3410..8e788bf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.8.0 +Version: 0.8.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -48,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jul 16 2010 Jens Petersen - 0.8.1-1 +- fix ghc_strip_dynlinked for no dynlinked files +- devel should provide doc also when not obsoleting + * Fri Jul 16 2010 Jens Petersen - 0.8.0-1 - merge -doc into -devel and provide -o obsoletes doc subpackage option From 17c8f12bbb0cdd7ec8eb5f2f3fa418d3be3eadd2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Jul 2010 08:09:36 +0000 Subject: [PATCH 034/514] improve changelog --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8e788bf..0827cca 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -49,7 +49,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Fri Jul 16 2010 Jens Petersen - 0.8.1-1 -- fix ghc_strip_dynlinked for no dynlinked files +- fix ghc_strip_dynlinked when no dynlinked files - devel should provide doc also when not obsoleting * Fri Jul 16 2010 Jens Petersen - 0.8.0-1 From 8c3e84353fefd557af3d8d7dcc4e368f77963f00 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 15:34:54 +0000 Subject: [PATCH 035/514] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index df03db1..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: ghc-rpm-macros -# $Id: Makefile,v 1.1 2009/05/13 05:10:46 kevin Exp $ -NAME := ghc-rpm-macros -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 55a3c88..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -ghc-rpm-macros-0_1-6_fc10:HEAD:ghc-rpm-macros-0.1-6.fc10.src.rpm:1242200218 From 742ca58b86682acab4be8aa412f7f37aba61ee86 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 30 Sep 2010 12:21:16 +1000 Subject: [PATCH 036/514] add ghc-deps.sh for hash rpm metadata and add ghc_pkg_obsoletes - add ghc-deps.sh for ghc package hash rpm metadata provides and requires - turn on hash provides and disable debuginfo by default - make shared and hscolour default - use without_shared and without_hscolour to disble them - add ghc_pkg_obsoletes for obsoleting old packages - use ghcpkgbasedir - always obsolete -doc packages, but keep -o for now for backward compatibility --- ghc-deps.sh | 35 +++++++++++++++++++++++++++++++++++ ghc-rpm-macros.ghc | 39 +++++++++++++++++++++++---------------- ghc-rpm-macros.spec | 22 ++++++++++++++++++---- 3 files changed, 76 insertions(+), 20 deletions(-) create mode 100755 ghc-deps.sh diff --git a/ghc-deps.sh b/ghc-deps.sh new file mode 100755 index 0000000..9e2caa0 --- /dev/null +++ b/ghc-deps.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# find rpm provides and requires for Haskell GHC libraries + +#set -x + +# To use add the following lines to spec file: +# %define _use_internal_dependency_generator 0 +# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires +# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides + +[ $# -ne 1 ] && echo "Usage: `basename $0` [--provides|--requires]" && exit 1 + +MODE=$1 + +case $MODE in + --provides) FIELD=id ;; + --requires) FIELD=depends +esac + +files=$(cat) + +PKGCONF=$(echo $files | tr [:blank:] '\n' | grep package.conf.d) + +if [ -n "$PKGCONF" ]; then + CONFDIR=$(dirname $PKGCONF) + PKGS=$(ghc-pkg -f $CONFDIR describe '*' | awk '/^name: / {print $2}') + for pkg in $PKGS; do + HASHS=$(ghc-pkg -f $CONFDIR field $pkg $FIELD | sed -e "s/^$FIELD: \+//") + for i in $HASHS; do + echo "ghc($i)" + done + done +fi + +echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2f99c79..8a18acd 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -3,7 +3,7 @@ # configure %cabal_configure \ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{?with_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} # install %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v @@ -25,16 +25,16 @@ pkgnamever=${pkgname}-%{version} \ rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ echo "%defattr(-,root,root,-)" > ${basefile}.files \ if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ - %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{!?with_shared:-devel}.files} %{?1::} \ + %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \ fi \ -%if %{with shared} \ +%if 0%{!?without_shared:1} \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ echo "%dir %{ghcpkgdir}" >> ${basefile}.files \ echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \ fi \ %endif \ echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \ -echo "%{_libdir}/ghc-%{ghc_version}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \ +echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basefile}-devel.files \ @@ -56,14 +56,14 @@ sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${b # cabal_pkg_conf [pkgname] %cabal_pkg_conf \ %cabal register --gen-pkg-config \ -mkdir -p $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d \ -install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{_libdir}/ghc-%{ghc_version}/package.conf.d +mkdir -p $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \ +install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d # devel pkg basic requires %ghc_requires Requires: ghc = %{ghc_version}\ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ -%if %{with shared}\ +%if 0%{!?without_shared:1}\ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ %endif @@ -76,10 +76,10 @@ Requires(postun): ghc-doc = %{ghc_version} %ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release} -# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-o obsolete-docver] +# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op) %ghc_lib_package(n:c:h:o:)\ -%define ghc_pkg_name %{-n:ghc-%{-n*}}%{!-n:ghc-%{pkg_name}}\ -%if %{with shared}\ +%define ghc_pkg_name ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}\ +%if 0%{!?without_shared:1}\ %files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\ %defattr(-,root,root,-)\ %endif\ @@ -89,7 +89,7 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{v %ghc_package_prof\ %{nil} -# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-o obsolete-docver] +# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] (-o deprecated no-op) %ghc_binlib_package(n:c:h:l:v:o:)\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ @@ -112,8 +112,12 @@ This package provides the shared library.\ # for docs post and postun %ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : -# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] [-o obsolete-docver] +# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] (-o deprecated no-op) %ghc_package_devel(n:c:h:l:v:o:)\ +%global _use_internal_dependency_generator 0\ +%global __find_provides /usr/lib/rpm/ghc-deps.sh --provides\ +#%%global __find_requires /usr/lib/rpm/ghc-deps.sh --requires\ +%global debug_package %{nil}\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ @@ -127,7 +131,9 @@ Group: Development/Libraries\ %{-h:Requires: %{-h*}}\ %{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ %{-c:Requires: %{-c*}}\ -%{-o:Obsoletes: %{ghc_pkg_name}-doc < %{-o*}}\ +%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ +Obsoletes: %{ghc_pkg_name}-doc < %{version}-%{release}\ Provides: %{ghc_pkg_name}-doc = %{version}-%{release}\ \ %description -n %{ghc_pkg_name}-devel\ @@ -157,8 +163,9 @@ Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ %{?ghc_prof_requires}\ -%{!-h:%{?ghc_pkg_deps:Requires: %(echo %{ghc_pkg_deps} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\ -%{-h:Requires: %(echo %{-h*} | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ +%{!-h:%{?ghc_pkg_deps:Requires: %(echo "%{ghc_pkg_deps}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\ +%{-h:Requires: %(echo "%{-h*}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ \ %description -n %{ghc_pkg_name}-prof\ %{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ @@ -184,7 +191,7 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' %ghc_lib_build\ %cabal_configure --ghc -p\ %cabal build\ -%cabal haddock %{?with_hscolour:--hyperlink-source} +%cabal haddock %{!?without_hscolour:--hyperlink-source} %{?with_devhelp:--haddock-option=--html-help=devhelp} # ghc_bin_install %ghc_bin_install\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0827cca..01531b0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.8.1 +Version: 0.9.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -13,14 +13,15 @@ URL: https://fedoraproject.org/wiki/Haskell_SIG Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS +Source3: ghc-deps.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch %description A set of macros for building GHC packages following the Haskell Guidelines -of the Haskell SIG. This package probably shouldn't be installed on its own -as GHC is needed in order to make use of these macros. +of the Fedora Haskell SIG. This package probably shouldn't be installed on +its own as GHC is needed in order to make use of these macros. %prep %setup -c -T @@ -34,7 +35,10 @@ echo no build stage needed %install rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm -cp -p %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc +install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc + +mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm +install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %clean @@ -45,9 +49,19 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc COPYING AUTHORS %config(noreplace) %{_sysconfdir}/rpm/macros.ghc +%{_prefix}/lib/rpm %changelog +* Sat Sep 25 2010 Jens Petersen - 0.9.0-1 +- add ghc-deps.sh to add ghc package hash rpm metadata provides and requires +- turn on hash provides and disable debuginfo by default +- make shared and hscolour default +- use without_shared and without_hscolour to disble them +- add ghc_pkg_obsoletes for obsoleting old packages +- use ghcpkgbasedir +- always obsolete -doc packages, but keep -o for now for backward compatibility + * Fri Jul 16 2010 Jens Petersen - 0.8.1-1 - fix ghc_strip_dynlinked when no dynlinked files - devel should provide doc also when not obsoleting From 02c69a3bd25dbc612505b92fa27a474a561b70c5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 30 Sep 2010 13:12:47 +1000 Subject: [PATCH 037/514] fix without_shared build so it actually works --- ghc-rpm-macros.ghc | 12 +++++++----- ghc-rpm-macros.spec | 11 +++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 8a18acd..e311dcd 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -23,17 +23,17 @@ pkgname=%{?1}%{!?1:%{pkg_name}} \ basefile=ghc-${pkgname} \ pkgnamever=${pkgname}-%{version} \ rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ -echo "%defattr(-,root,root,-)" > ${basefile}.files \ -if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ - %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \ -fi \ %if 0%{!?without_shared:1} \ +echo "%defattr(-,root,root,-)" > ${basefile}.files \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ echo "%dir %{ghcpkgdir}" >> ${basefile}.files \ echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \ fi \ %endif \ echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \ +if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ + %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \ +fi \ echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \ if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \ @@ -46,7 +46,7 @@ fi \ if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \ echo "%{ghcdocdir}" >> ${basefile}-devel.files \ fi \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" %{!?without_shared:${basefile}.files} ${basefile}-devel.files ${basefile}-prof.files \ %{nil} # compiler version @@ -102,7 +102,9 @@ Group: System Environment/Libraries\ %description -n %{ghc_pkg_name}\ %{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ \ +%if 0%{!?without_shared:1} \ This package provides the shared library.\ +%endif \ \ %ghc_lib_package\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 01531b0..a7ddbab 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.9.0 +Version: 0.9.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -53,11 +53,14 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Sat Sep 25 2010 Jens Petersen - 0.9.0-1 -- add ghc-deps.sh to add ghc package hash rpm metadata provides and requires +* Thu Sep 30 2010 Jens Petersen - 0.9.1-1 +- fix without_shared build so it actually works + +* Thu Sep 30 2010 Jens Petersen - 0.9.0-1 +- add rpm provides and requires script ghc-deps.sh for package hash metadata - turn on hash provides and disable debuginfo by default - make shared and hscolour default -- use without_shared and without_hscolour to disble them +- use without_shared and without_hscolour to disable them - add ghc_pkg_obsoletes for obsoleting old packages - use ghcpkgbasedir - always obsolete -doc packages, but keep -o for now for backward compatibility From 7232a81da95e5376c5c5baa9f4bc2b777b4b1fad Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Nov 2010 15:01:27 +1000 Subject: [PATCH 038/514] implement rpm ghc-pkg hash metadata for precise automatic library dependency tracking - add buildroot/ghcpkgbasedir to ghc-deps.sh args - calculate package and metadata by checking all library files in stdin - prof depends on devel, devel on base - update macros.ghc: - rename ghc_requires to ghc_devel_requires - drop ghc_doc_requires - ghc_reindex_haddock is deprecated and now a no-op --- AUTHORS | 6 ++++- ghc-deps.sh | 55 ++++++++++++++++++++++++++++----------------- ghc-rpm-macros.ghc | 27 ++++++++-------------- ghc-rpm-macros.spec | 5 ++++- 4 files changed, 53 insertions(+), 40 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9725c64..adc72fc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,7 @@ +Maintainer: +Jens Petersen + +Initial implementation: Bryan O'Sullivan Jens Petersen -Yaakov Nemoy \ No newline at end of file +Yaakov Nemoy diff --git a/ghc-deps.sh b/ghc-deps.sh index 9e2caa0..720dc75 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,35 +1,50 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -#set -x - # To use add the following lines to spec file: # %define _use_internal_dependency_generator 0 -# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires -# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides +# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghcpkgbasedir} +# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghcpkgbasedir} -[ $# -ne 1 ] && echo "Usage: `basename $0` [--provides|--requires]" && exit 1 +[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}" && exit 1 MODE=$1 - -case $MODE in - --provides) FIELD=id ;; - --requires) FIELD=depends -esac +PKGBASEDIR=$2 +PKGCONFDIR=$PKGBASEDIR/package.conf.d files=$(cat) -PKGCONF=$(echo $files | tr [:blank:] '\n' | grep package.conf.d) +#set -x -if [ -n "$PKGCONF" ]; then - CONFDIR=$(dirname $PKGCONF) - PKGS=$(ghc-pkg -f $CONFDIR describe '*' | awk '/^name: / {print $2}') - for pkg in $PKGS; do - HASHS=$(ghc-pkg -f $CONFDIR field $pkg $FIELD | sed -e "s/^$FIELD: \+//") - for i in $HASHS; do - echo "ghc($i)" - done - done +if [ -d "$PKGCONFDIR" ]; then + for i in $files; do + LIB_FILE=$(echo $i | grep /libHS | grep -v /libHSrts) + if [ -n "$LIB_FILE" ]; then + case $LIB_FILE in + *.so) META=ghc ;; + *_p.a) META=ghc-prof SELF=ghc-devel ;; + *.a) META=ghc-devel SELF=ghc ;; + esac + if [ -n "$META" ]; then + case $MODE in + --provides) FIELD=id ;; + --requires) FIELD=depends ;; + *) echo "`basename $0`: Need --provides or --requires" ; exit 1 + esac + PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/*\([^/]\+\)/libHS.*%\1%") + HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") + for i in $HASHS; do + echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" + done + if [ "$MODE" = "--requires" -a -n "$SELF" ]; then + HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") + for i in $HASHS; do + echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" + done + fi + fi + fi + done fi echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e311dcd..9d2d1cb 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -60,21 +60,12 @@ mkdir -p $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \ install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d # devel pkg basic requires -%ghc_requires Requires: ghc = %{ghc_version}\ -Requires(post): ghc = %{ghc_version}\ -Requires(postun): ghc = %{ghc_version}\ -%if 0%{!?without_shared:1}\ -Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ -%endif - -# doc pkg basic requires -%ghc_doc_requires Requires: ghc-doc = %{ghc_version}\ -Requires(post): ghc-doc = %{ghc_version}\ -Requires(postun): ghc-doc = %{ghc_version} +%ghc_devel_requires Requires(post): ghc = %{ghc_version}\ +Requires(postun): ghc = %{ghc_version} # prof pkg basic requires -%ghc_prof_requires Requires: ghc-prof = %{ghc_version}\ -Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release} +%ghc_prof_requires \ +%{nil} # ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op) %ghc_lib_package(n:c:h:o:)\ @@ -112,13 +103,14 @@ This package provides the shared library.\ %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : # for docs post and postun -%ghc_reindex_haddock ( cd %{ghcdocbasedir}/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || : +%ghc_reindex_haddock\ +%{nil} # ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] (-o deprecated no-op) %ghc_package_devel(n:c:h:l:v:o:)\ %global _use_internal_dependency_generator 0\ -%global __find_provides /usr/lib/rpm/ghc-deps.sh --provides\ -#%%global __find_requires /usr/lib/rpm/ghc-deps.sh --requires\ +%global __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghcpkgbasedir}\ +%global __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghcpkgbasedir}\ %global debug_package %{nil}\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ @@ -127,8 +119,7 @@ Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library} Group: Development/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ -%{?ghc_requires}\ -%{?ghc_doc_requires}\ +%{?ghc_devel_requires}\ %{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\ %{-h:Requires: %{-h*}}\ %{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a7ddbab..98a9ca7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.9.1 +Version: 0.10.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -53,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Nov 22 2010 Jens Petersen - 0.10.0-1 +- turn pkg hash metadata (for ghc-7 builds) + * Thu Sep 30 2010 Jens Petersen - 0.9.1-1 - fix without_shared build so it actually works From 3ca7af736f82900125ce346742a32b846bfb8013 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Nov 2010 17:08:28 +1000 Subject: [PATCH 039/514] bring back the explicit n-v-r internal package requires for devel and prof packages --- ghc-rpm-macros.ghc | 7 +++++-- ghc-rpm-macros.spec | 12 ++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 9d2d1cb..3e72baf 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -61,10 +61,13 @@ install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{ghc # devel pkg basic requires %ghc_devel_requires Requires(post): ghc = %{ghc_version}\ -Requires(postun): ghc = %{ghc_version} +Requires(postun): ghc = %{ghc_version}\ +%if 0%{!?without_shared:1}\ +Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ +%endif # prof pkg basic requires -%ghc_prof_requires \ +%ghc_prof_requires Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ %{nil} # ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 98a9ca7..c3d2269 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.10.0 +Version: 0.10.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -53,8 +53,16 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Nov 23 2010 Jens Petersen - 0.10.1-1 +- bring back the explicit n-v-r internal package requires for devel and prof packages + * Mon Nov 22 2010 Jens Petersen - 0.10.0-1 -- turn pkg hash metadata (for ghc-7 builds) +- turn on pkg hash metadata (for ghc-7 builds) +- ghc-deps.sh now requires an extra buildroot/ghcpkgbasedir arg +- automatic internal package deps from prof to devel to base +- rename ghc_requires to ghc_devel_requires +- drop ghc_doc_requires +- ghc_reindex_haddock is deprecated and now a no-op * Thu Sep 30 2010 Jens Petersen - 0.9.1-1 - fix without_shared build so it actually works From 2f1663e620a15d31d9b8a24e78638fc0282607ba Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Nov 2010 23:48:16 +1000 Subject: [PATCH 040/514] ignore ghc's builtin pseudo-libs --- ghc-deps.sh | 20 ++++++++++++-------- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 720dc75..a475c3d 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -12,13 +12,19 @@ MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d +case $MODE in + --provides) FIELD=id ;; + --requires) FIELD=depends ;; + *) echo "`basename $0`: Need --provides or --requires" ; exit 1 +esac + files=$(cat) #set -x if [ -d "$PKGCONFDIR" ]; then for i in $files; do - LIB_FILE=$(echo $i | grep /libHS | grep -v /libHSrts) + LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") if [ -n "$LIB_FILE" ]; then case $LIB_FILE in *.so) META=ghc ;; @@ -26,15 +32,13 @@ if [ -d "$PKGCONFDIR" ]; then *.a) META=ghc-devel SELF=ghc ;; esac if [ -n "$META" ]; then - case $MODE in - --provides) FIELD=id ;; - --requires) FIELD=depends ;; - *) echo "`basename $0`: Need --provides or --requires" ; exit 1 - esac - PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/*\([^/]\+\)/libHS.*%\1%") + PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") for i in $HASHS; do - echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" + case $i in + *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;; + *) ;; + esac done if [ "$MODE" = "--requires" -a -n "$SELF" ]; then HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c3d2269..5ce3994 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.10.1 +Version: 0.10.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -53,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Nov 23 2010 Jens Petersen - 0.10.2-1 +- ignore ghc's builtin pseudo-libs + * Tue Nov 23 2010 Jens Petersen - 0.10.1-1 - bring back the explicit n-v-r internal package requires for devel and prof packages From 21e17e346811bde0b6a4cd151a648c1942ebfc50 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 26 Nov 2010 12:29:14 +1000 Subject: [PATCH 041/514] drop with_devhelp since html-help option gone from haddock-2.8.0 --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 3e72baf..cacfd83 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -187,7 +187,7 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' %ghc_lib_build\ %cabal_configure --ghc -p\ %cabal build\ -%cabal haddock %{!?without_hscolour:--hyperlink-source} %{?with_devhelp:--haddock-option=--html-help=devhelp} +%cabal haddock %{!?without_hscolour:--hyperlink-source} # ghc_bin_install %ghc_bin_install\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5ce3994..a6655a8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -53,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Nov 26 2010 Jens Petersen +- drop with_devhelp since --html-help option gone from haddock-2.8.0 + * Tue Nov 23 2010 Jens Petersen - 0.10.2-1 - ignore ghc's builtin pseudo-libs From 7d50a0215901454f82b5b9a26c5d4bf703d848b0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 20 Dec 2010 19:05:33 +1000 Subject: [PATCH 042/514] revert disabling debug_package since it behaves inconsistently with redhat-rpm-config --- ghc-rpm-macros.ghc | 1 - ghc-rpm-macros.spec | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index cacfd83..2fe3ef8 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -114,7 +114,6 @@ This package provides the shared library.\ %global _use_internal_dependency_generator 0\ %global __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghcpkgbasedir}\ %global __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghcpkgbasedir}\ -%global debug_package %{nil}\ %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}-devel\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a6655a8..b315f46 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.10.2 +Version: 0.10.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -53,6 +53,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Dec 20 2010 Jens Petersen - 0.10.3-1 +- revert disabling debug_package, since with redhat-rpm-config installed + the behaviour depended on the position of ghc_lib_package in the spec file + (reported by narasim_7) + * Fri Nov 26 2010 Jens Petersen - drop with_devhelp since --html-help option gone from haddock-2.8.0 From c6c20a595172aba11806288a377ff03ab617ee21 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 30 Dec 2010 21:19:29 +0900 Subject: [PATCH 043/514] add support for subpackaging multiple libraries for ghc --- ghc-rpm-macros.ghc | 94 +++++++++++++++++++++++++-------------------- ghc-rpm-macros.spec | 15 ++++---- 2 files changed, 60 insertions(+), 49 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2fe3ef8..79e83a1 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -3,61 +3,65 @@ # configure %cabal_configure \ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} # install %cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v # root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html -# ghcdocdir [pkgname] -%ghcdocdir() %{ghcdocbasedir}/libraries/%{?1}%{!?1:%{pkg_name}}-%{version} +# (deprecated) pkg doc dir +%ghcdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version} # top library dir %ghcpkgbasedir %{_libdir}/ghc-%{ghc_version} -# ghcpkgdir [pkgname] -%ghcpkgdir() %{ghcpkgbasedir}/%{?1}%{!?1:%{pkg_name}}-%{version} - -# ghc_gen_filelists [pkgname] -%ghc_gen_filelists() \ -pkgname=%{?1}%{!?1:%{pkg_name}} \ -basefile=ghc-${pkgname} \ -pkgnamever=${pkgname}-%{version} \ -rm -f ${basefile}.files ${basefile}-devel.files ${basefile}-prof.files \ +# (deprecated) package dir +%ghcpkgdir %{ghcpkgbasedir}/%{pkg_name}-%{version} + +# ghc_gen_filelists [name-version] +%ghc_gen_filelists()\ +pkgnamever=%{?1}%{!?1:%{pkg_name}-%{version}} \ +pkgname=%{?pkg_name}%{!?pkg_name:$(echo ${pkgnamever} | sed -e "s/\\(.*\\)-.*/\\1/")} \ +basepkg=ghc-${pkgname} \ +pkgdir=%{ghcpkgbasedir}/${pkgnamever} \ +docdir=%{ghcdocbasedir}/libraries/${pkgnamever} \ +rm -f ${basepkg}.files ${basepkg}-devel.files ${basepkg}-prof.files \ %if 0%{!?without_shared:1} \ -echo "%defattr(-,root,root,-)" > ${basefile}.files \ -if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ -echo "%dir %{ghcpkgdir}" >> ${basefile}.files \ -echo "%attr(755,root,root) %{ghcpkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basefile}.files \ +echo "%defattr(-,root,root,-)" > ${basepkg}.files \ +if [ -d "${RPM_BUILD_ROOT}${pkgdir}" ]; then \ +echo "%dir ${pkgdir}" >> ${basepkg}.files \ +echo "%attr(755,root,root) ${pkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basepkg}.files \ fi \ %endif \ -echo "%defattr(-,root,root,-)" > ${basefile}-devel.files \ -if [ -d "${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}" ]; then \ - %{!?1:echo "%{_docdir}/%{name}-%{version}" >> ${basefile}%{?without_shared:-devel}.files} %{?1::} \ +echo "%defattr(-,root,root,-)" > ${basepkg}-devel.files \ +if [ -d "${RPM_BUILD_ROOT}%{_docdir}/ghc-${pkgnamever}" ]; then \ +echo "%{_docdir}/ghc-${pkgnamever}" >> ${basepkg}%{?without_shared:-devel}.files \ fi \ -echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basefile}-devel.files \ -if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} -type d | sed "s/^/%dir /" >> ${basefile}-devel.files \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basefile}-devel.files \ +echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basepkg}-devel.files \ +if [ -d "${RPM_BUILD_ROOT}${pkgdir}" ]; then \ +find ${RPM_BUILD_ROOT}${pkgdir} -type d | sed "s/^/%dir /" >> ${basepkg}-devel.files \ +find ${RPM_BUILD_ROOT}${pkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basepkg}-devel.files \ fi \ -echo "%defattr(-,root,root,-)" > ${basefile}-prof.files \ -if [ -d "${RPM_BUILD_ROOT}%{ghcpkgdir}" ]; then \ -find ${RPM_BUILD_ROOT}%{ghcpkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basefile}-prof.files \ +echo "%defattr(-,root,root,-)" > ${basepkg}-prof.files \ +if [ -d "${RPM_BUILD_ROOT}${pkgdir}" ]; then \ +find ${RPM_BUILD_ROOT}${pkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basepkg}-prof.files \ fi \ -if [ -d "${RPM_BUILD_ROOT}%{ghcdocdir}" ]; then \ -echo "%{ghcdocdir}" >> ${basefile}-devel.files \ +if [ -d "${RPM_BUILD_ROOT}${docdir}" ]; then \ +echo "${docdir}" >> ${basepkg}-devel.files \ fi \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" %{!?without_shared:${basefile}.files} ${basefile}-devel.files ${basefile}-prof.files \ +sed -i -e "s!${RPM_BUILD_ROOT}!!g" %{!?without_shared:${basepkg}.files} ${basepkg}-devel.files ${basepkg}-prof.files \ %{nil} # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} # create and install package.conf file -# cabal_pkg_conf [pkgname] -%cabal_pkg_conf \ +# cabal_pkg_conf [name-ver] +%cabal_pkg_conf()\ +pkgnamever=%{?1}%{!?1:%{pkg_name}-%{version}} \ %cabal register --gen-pkg-config \ mkdir -p $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \ -install --mode=0644 %{?1}%{!?1:%{pkg_name}}-%{version}.conf $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d +install --mode=0644 ${pkgnamever}.conf $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \ +%{nil} # devel pkg basic requires %ghc_devel_requires Requires(post): ghc = %{ghc_version}\ @@ -88,7 +92,7 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version %define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ %define ghc_pkg_name ghc-%{local_pkg_name}\ %package -n %{ghc_pkg_name}\ -Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library}\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{local_pkg_name} library}\ Group: System Environment/Libraries\ %{-v:Version: %{-v*}}\ %{-l:License: %{-l*}}\ @@ -179,23 +183,29 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' # ghc_bin_build %ghc_bin_build\ -%cabal_configure --ghc\ +%cabal_configure\ %cabal build -# ghc_lib_build -%ghc_lib_build\ -%cabal_configure --ghc -p\ +# ghc_lib_build [name-version] +%ghc_lib_build()\ +%{?1:cd %1}\ +%cabal_configure -p %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghcdocbasedir}/libraries/%1}\ %cabal build\ -%cabal haddock %{!?without_hscolour:--hyperlink-source} +%cabal haddock %{!?without_hscolour:--hyperlink-source}\ +%{?1:cd -}\ +%{nil} -# ghc_bin_install +# install bin package %ghc_bin_install\ %cabal_install\ %ghc_strip_dynlinked -# ghc_lib_install -%ghc_lib_install\ +# ghc_lib_install [name-version] +%ghc_lib_install()\ +%{?1:cd %1}\ %cabal_install\ %cabal_pkg_conf\ +%{?1:cd -}\ %ghc_gen_filelists\ -%ghc_strip_dynlinked +%{!?1:%ghc_strip_dynlinked}\ +%{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b315f46..23d2dfd 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.10.3 +Version: 0.10.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -14,7 +14,6 @@ Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS Source3: ghc-deps.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -33,7 +32,6 @@ echo no build stage needed %install -rm -rf $RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc @@ -41,10 +39,6 @@ mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm -%clean -rm -rf $RPM_BUILD_ROOT - - %files %defattr(-,root,root,-) %doc COPYING AUTHORS @@ -53,6 +47,13 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Dec 30 2010 Jens Petersen - 0.10.4-1 +- add support for subpackaging ghc's libraries: +- deprecate ghcpkgdir and ghcdocdir from now on +- ghc_gen_filelists optional arg is now name-version +- ghc_lib_build, ghc_lib_install, cabal_pkg_conf now take optional + name-version arg + * Mon Dec 20 2010 Jens Petersen - 0.10.3-1 - revert disabling debug_package, since with redhat-rpm-config installed the behaviour depended on the position of ghc_lib_package in the spec file From abebb6d20d7c8cfeb949b18a92cc3dd9f5caac16 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 30 Dec 2010 21:22:35 +0900 Subject: [PATCH 044/514] bump version to 0.11 --- ghc-rpm-macros.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 23d2dfd..8fd6bf0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.10.4 +Version: 0.11.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,7 +47,7 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog -* Thu Dec 30 2010 Jens Petersen - 0.10.4-1 +* Thu Dec 30 2010 Jens Petersen - 0.11.0-1 - add support for subpackaging ghc's libraries: - deprecate ghcpkgdir and ghcdocdir from now on - ghc_gen_filelists optional arg is now name-version From 086f1bc5e0ee1480d5e27abee56018e825e2fef4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 3 Jan 2011 20:37:32 +0900 Subject: [PATCH 045/514] more ghc libraries subpackaging fixes and other cleanup - use buildroot instead of RPM_BUILD_ROOT - rename ghcpkgbasedir to ghclibdir - split "[name-version]" args into "[name] [version]" args - move remaining name and version macro options (-n and -v) to args - drop deprecated -o options --- ghc-rpm-macros.ghc | 189 +++++++++++++++++++++++--------------------- ghc-rpm-macros.spec | 9 ++- 2 files changed, 109 insertions(+), 89 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 79e83a1..a5e6614 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -2,83 +2,89 @@ %cabal %{_bindir}/runghc Setup # configure -%cabal_configure \ +%cabal_configure\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} # install -%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v +%cabal_install %cabal copy --destdir=%{buildroot} -v # root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html # (deprecated) pkg doc dir %ghcdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version} # top library dir -%ghcpkgbasedir %{_libdir}/ghc-%{ghc_version} +%ghclibdir %{_libdir}/ghc-%{ghc_version} # (deprecated) package dir -%ghcpkgdir %{ghcpkgbasedir}/%{pkg_name}-%{version} +%ghcpkgdir %{ghclibdir}/%{pkg_name}-%{version} -# ghc_gen_filelists [name-version] +# ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ -pkgnamever=%{?1}%{!?1:%{pkg_name}-%{version}} \ -pkgname=%{?pkg_name}%{!?pkg_name:$(echo ${pkgnamever} | sed -e "s/\\(.*\\)-.*/\\1/")} \ -basepkg=ghc-${pkgname} \ -pkgdir=%{ghcpkgbasedir}/${pkgnamever} \ -docdir=%{ghcdocbasedir}/libraries/${pkgnamever} \ -rm -f ${basepkg}.files ${basepkg}-devel.files ${basepkg}-prof.files \ -%if 0%{!?without_shared:1} \ -echo "%defattr(-,root,root,-)" > ${basepkg}.files \ -if [ -d "${RPM_BUILD_ROOT}${pkgdir}" ]; then \ -echo "%dir ${pkgdir}" >> ${basepkg}.files \ -echo "%attr(755,root,root) ${pkgdir}/libHS${pkgnamever}-ghc%{ghc_version}.so" >> ${basepkg}.files \ -fi \ -%endif \ -echo "%defattr(-,root,root,-)" > ${basepkg}-devel.files \ -if [ -d "${RPM_BUILD_ROOT}%{_docdir}/ghc-${pkgnamever}" ]; then \ -echo "%{_docdir}/ghc-${pkgnamever}" >> ${basepkg}%{?without_shared:-devel}.files \ -fi \ -echo "%{ghcpkgbasedir}/package.conf.d/${pkgnamever}*.conf" >> ${basepkg}-devel.files \ -if [ -d "${RPM_BUILD_ROOT}${pkgdir}" ]; then \ -find ${RPM_BUILD_ROOT}${pkgdir} -type d | sed "s/^/%dir /" >> ${basepkg}-devel.files \ -find ${RPM_BUILD_ROOT}${pkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> ${basepkg}-devel.files \ -fi \ -echo "%defattr(-,root,root,-)" > ${basepkg}-prof.files \ -if [ -d "${RPM_BUILD_ROOT}${pkgdir}" ]; then \ -find ${RPM_BUILD_ROOT}${pkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> ${basepkg}-prof.files \ -fi \ -if [ -d "${RPM_BUILD_ROOT}${docdir}" ]; then \ -echo "${docdir}" >> ${basepkg}-devel.files \ -fi \ -sed -i -e "s!${RPM_BUILD_ROOT}!!g" %{!?without_shared:${basepkg}.files} ${basepkg}-devel.files ${basepkg}-prof.files \ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%define basepkg ghc-%{pkgname}\ +%define pkgdir %{ghclibdir}/%{pkgnamever}\ +%define docdir %{ghcdocbasedir}/libraries/%{pkgnamever}\ +rm -f %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files\ +%if 0%{!?without_shared:1}\ +echo "%defattr(-,root,root,-)" > %{basepkg}.files\ +if [ -d "%{buildroot}%{pkgdir}" ]; then\ +echo "%dir %{pkgdir}" >> %{basepkg}.files\ +echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ +fi\ +%endif\ +echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ +if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ +echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\ +fi\ +echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ +if [ -d "%{buildroot}%{pkgdir}" ]; then\ +find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ +find %{buildroot}%{pkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ +fi\ +echo "%defattr(-,root,root,-)" > %{basepkg}-prof.files\ +if [ -d "%{buildroot}%{pkgdir}" ]; then\ +find %{buildroot}%{pkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> %{basepkg}-prof.files\ +fi\ +if [ -d "%{buildroot}%{docdir}" ]; then\ +echo "%{docdir}" >> %{basepkg}-devel.files\ +fi\ +sed -i -e "s!%{buildroot}!!g" %{!?without_shared:%{basepkg}.files} %{basepkg}-devel.files %{basepkg}-prof.files\ %{nil} # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} # create and install package.conf file -# cabal_pkg_conf [name-ver] +# cabal_pkg_conf [name] [version] %cabal_pkg_conf()\ -pkgnamever=%{?1}%{!?1:%{pkg_name}-%{version}} \ -%cabal register --gen-pkg-config \ -mkdir -p $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \ -install --mode=0644 ${pkgnamever}.conf $RPM_BUILD_ROOT%{ghcpkgbasedir}/package.conf.d \ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%cabal register --gen-pkg-config\ +mkdir -p $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d\ +install --mode=0644 %{pkgnamever}.conf $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d\ %{nil} # devel pkg basic requires %ghc_devel_requires Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ %if 0%{!?without_shared:1}\ -Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ +Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif # prof pkg basic requires -%ghc_prof_requires Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}-devel = %{-v:%{-v*}}%{!-v:%{version}}-%{release}\ +%ghc_prof_requires Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}}-devel = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %{nil} -# ghc_lib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] (-o deprecated no-op) -%ghc_lib_package(n:c:h:o:)\ -%define ghc_pkg_name ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}}\ +# ghc_lib_package [-c cdepslist] [-h pkgdepslist] +%ghc_lib_package(c:h:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%define basepkg ghc-%{pkgname}\ %if 0%{!?without_shared:1}\ -%files -n %{ghc_pkg_name} -f %{ghc_pkg_name}.files\ +%files -n %{basepkg} -f %{basepkg}.files\ %defattr(-,root,root,-)\ %endif\ \ @@ -87,22 +93,25 @@ Requires: ghc-%{-n:%{-n*}}%{!-n:%{pkg_name}} = %{-v:%{-v*}}%{!-v:%{version %ghc_package_prof\ %{nil} -# ghc_binlib_package [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] (-o deprecated no-op) -%ghc_binlib_package(n:c:h:l:v:o:)\ -%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ -%define ghc_pkg_name ghc-%{local_pkg_name}\ -%package -n %{ghc_pkg_name}\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{local_pkg_name} library}\ +# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_binlib_package(c:h:l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}\ +%define basepkg ghc-%{pkgname}\ +%package -n %{basepkg}\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ Group: System Environment/Libraries\ -%{-v:Version: %{-v*}}\ +%{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ \ -%description -n %{ghc_pkg_name}\ -%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ +%description -n %{basepkg}\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ -%if 0%{!?without_shared:1} \ +%if 0%{!?without_shared:1}\ This package provides the shared library.\ -%endif \ +%endif\ \ %ghc_lib_package\ %{nil} @@ -113,17 +122,19 @@ This package provides the shared library.\ %ghc_reindex_haddock\ %{nil} -# ghc_package_devel [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] (-o deprecated no-op) -%ghc_package_devel(n:c:h:l:v:o:)\ +# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_package_devel(c:h:l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%define basepkg ghc-%{pkgname}\ %global _use_internal_dependency_generator 0\ -%global __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghcpkgbasedir}\ -%global __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghcpkgbasedir}\ -%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ -%define ghc_pkg_name ghc-%{local_pkg_name}\ -%package -n %{ghc_pkg_name}-devel\ -Summary: %{?common_summary}%{!?common_summary:%{local_pkg_name} library} development files\ +%global __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ +%global __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ +%package -n %{basepkg}-devel\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ Group: Development/Libraries\ -%{-v:Version: %{-v*}}\ +%{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_devel_requires}\ %{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\ @@ -132,46 +143,48 @@ Group: Development/Libraries\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ -Obsoletes: %{ghc_pkg_name}-doc < %{version}-%{release}\ -Provides: %{ghc_pkg_name}-doc = %{version}-%{release}\ +Obsoletes: %{basepkg}-doc < %{version}-%{release}\ +Provides: %{basepkg}-doc = %{version}-%{release}\ \ -%description -n %{ghc_pkg_name}-devel\ -%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ +%description -n %{basepkg}-devel\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ This package contains the development files.\ \ -%post -n %{ghc_pkg_name}-devel\ +%post -n %{basepkg}-devel\ %ghc_pkg_recache\ %ghc_reindex_haddock\ \ -%postun -n %{ghc_pkg_name}-devel\ +%postun -n %{basepkg}-devel\ %ghc_pkg_recache\ %ghc_reindex_haddock\ \ -%files -n %{ghc_pkg_name}-devel -f %{ghc_pkg_name}-devel.files\ +%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ %defattr(-,root,root,-)\ %{nil} -# ghc_package_prof [-n pkgname] [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-v version] -%ghc_package_prof(n:h:l:v:)\ -%define local_pkg_name %{-n:%{-n*}}%{!-n:%{pkg_name}}\ -%define ghc_pkg_name ghc-%{local_pkg_name}\ -%package -n %{ghc_pkg_name}-prof\ -Summary: Profiling libraries for %{?common_summary}%{!?common_summary:%{local_pkg_name}}\ +# ghc_package_prof [-h pkgdepslist] [-l licensetag] +%ghc_package_prof(h:l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%define basepkg ghc-%{pkgname}\ +%package -n %{basepkg}-prof\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname}} profiling libraries\ Group: Development/Libraries\ -%{-v:Version: %{-v*}}\ +%{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_prof_requires}\ %{!-h:%{?ghc_pkg_deps:Requires: %(echo "%{ghc_pkg_deps}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\ %{-h:Requires: %(echo "%{-h*}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ \ -%description -n %{ghc_pkg_name}-prof\ -%{?common_description}%{!?common_description:Haskell %{local_pkg_name} library.}\ +%description -n %{basepkg}-prof\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ This package contains the profiling library.\ \ -%files -n %{ghc_pkg_name}-prof -f %{ghc_pkg_name}-prof.files\ +%files -n %{basepkg}-prof -f %{basepkg}-prof.files\ %defattr(-,root,root,-)\ %{nil} @@ -186,10 +199,10 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' %cabal_configure\ %cabal build -# ghc_lib_build [name-version] +# ghc_lib_build [name] [version] %ghc_lib_build()\ -%{?1:cd %1}\ -%cabal_configure -p %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghcdocbasedir}/libraries/%1}\ +%{?1:cd %1-%2}\ +%cabal_configure -p %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghcdocbasedir}/libraries/%1-%2}\ %cabal build\ %cabal haddock %{!?without_hscolour:--hyperlink-source}\ %{?1:cd -}\ @@ -200,9 +213,9 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' %cabal_install\ %ghc_strip_dynlinked -# ghc_lib_install [name-version] +# ghc_lib_install [name] [version] %ghc_lib_install()\ -%{?1:cd %1}\ +%{?1:cd %1-%2}\ %cabal_install\ %cabal_pkg_conf\ %{?1:cd -}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8fd6bf0..f089c48 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.0 +Version: 0.11.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,6 +47,13 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Mon Jan 3 2011 Jens Petersen - 0.11.1-1 +- use buildroot instead of RPM_BUILD_ROOT +- rename ghcpkgbasedir to ghclibdir +- split "[name-version]" args into "[name] [version]" args +- move remaining name and version macro options (-n and -v) to args +- drop deprecated -o options + * Thu Dec 30 2010 Jens Petersen - 0.11.0-1 - add support for subpackaging ghc's libraries: - deprecate ghcpkgdir and ghcdocdir from now on From 4d6720d40ff8c1f4b705adfc8a82f3a78ba20027 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 20 Jan 2011 18:25:37 +1000 Subject: [PATCH 046/514] make sure license is in binlib shared subpackage and add option to exclude package from ghc_packages_list - put docdir (license) also into shared lib subpackage - add ghc_binlib_package option to exclude package from ghc_packages_list - condition lib base package additional description for srpm --- ghc-rpm-macros.ghc | 13 ++++++++----- ghc-rpm-macros.spec | 9 +++++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index a5e6614..2386f03 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -10,7 +10,7 @@ # root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html -# (deprecated) pkg doc dir +# (deprecated) pkg doc dir - still used in cabal_configure %ghcdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version} # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} @@ -37,6 +37,9 @@ echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\ fi\ +if [ -d "%{buildroot}%{_docdir}/%{pkgnamever}" ]; then\ +echo "%{_docdir}/%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\ +fi\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ @@ -93,12 +96,12 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %ghc_package_prof\ %{nil} -# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] -%ghc_binlib_package(c:h:l:)\ +# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] +%ghc_binlib_package(c:h:l:x)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ -%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}\ +%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ @@ -109,7 +112,7 @@ Group: System Environment/Libraries\ %description -n %{basepkg}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ -%if 0%{!?without_shared:1}\ +%if 0%{?ghc_version:%{!?without_shared:1}}\ This package provides the shared library.\ %endif\ \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f089c48..5f91ba7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.1 +Version: 0.11.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,6 +47,11 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Thu Jan 20 2011 Jens Petersen - 0.11.2-1 +- put docdir (license) also into shared lib subpackage +- add ghc_binlib_package option to exclude package from ghc_packages_list +- condition lib base package additional description for srpm + * Mon Jan 3 2011 Jens Petersen - 0.11.1-1 - use buildroot instead of RPM_BUILD_ROOT - rename ghcpkgbasedir to ghclibdir @@ -64,7 +69,7 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm * Mon Dec 20 2010 Jens Petersen - 0.10.3-1 - revert disabling debug_package, since with redhat-rpm-config installed the behaviour depended on the position of ghc_lib_package in the spec file - (reported by narasim_7) + (reported by narasim) * Fri Nov 26 2010 Jens Petersen - drop with_devhelp since --html-help option gone from haddock-2.8.0 From 0f8bb5330bdc7386071f0eadc0f788a5ab3ced9d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 21 Jan 2011 10:48:06 +1000 Subject: [PATCH 047/514] compile Setup to help speed up builds --- ghc-rpm-macros.ghc | 4 +++- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2386f03..046c1ed 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,5 +1,5 @@ # "cabal" -%cabal %{_bindir}/runghc Setup +%cabal ./Setup # configure %cabal_configure\ @@ -199,12 +199,14 @@ find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked' # ghc_bin_build %ghc_bin_build\ +ghc --make -dynamic Setup\ %cabal_configure\ %cabal build # ghc_lib_build [name] [version] %ghc_lib_build()\ %{?1:cd %1-%2}\ +ghc --make -dynamic Setup\ %cabal_configure -p %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghcdocbasedir}/libraries/%1-%2}\ %cabal build\ %cabal haddock %{!?without_hscolour:--hyperlink-source}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5f91ba7..aed83f7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.2 +Version: 0.11.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,6 +47,9 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Fri Jan 21 2011 Jens Petersen - 0.11.3-1 +- compile Setup to help speed up builds + * Thu Jan 20 2011 Jens Petersen - 0.11.2-1 - put docdir (license) also into shared lib subpackage - add ghc_binlib_package option to exclude package from ghc_packages_list From b13abaef502dc02b1b047345ce80b90b451a6a6d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 22 Jan 2011 22:48:18 +1000 Subject: [PATCH 048/514] bunch of tweaks, cleanup, and improvements - drop deprecated ghcdocdir and ghcpkgdir - new ghclibdocdir - replace some missed RPM_BUILD_ROOT's - bring back ghc requires in ghc_devel_requires - improve prof summary and description - add without_prof and without_haddock option macros --- ghc-rpm-macros.ghc | 34 ++++++++++++++++------------------ ghc-rpm-macros.spec | 10 +++++++++- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 046c1ed..b73269e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -3,19 +3,17 @@ # configure %cabal_configure\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghcdocdir} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{?with_dynamic:--ghc-option=-dynamic} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{!?without_dynamic:--enable-executable-dynamic} # install %cabal_install %cabal copy --destdir=%{buildroot} -v # root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html -# (deprecated) pkg doc dir - still used in cabal_configure -%ghcdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version} +# libraries doc dir +%ghclibdocdir %{ghcdocbasedir}/libraries # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} -# (deprecated) package dir -%ghcpkgdir %{ghclibdir}/%{pkg_name}-%{version} # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ @@ -24,7 +22,7 @@ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ -%define docdir %{ghcdocbasedir}/libraries/%{pkgnamever}\ +%define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files\ %if 0%{!?without_shared:1}\ echo "%defattr(-,root,root,-)" > %{basepkg}.files\ @@ -34,12 +32,11 @@ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> fi\ %endif\ echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ -if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ -echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\ -fi\ -if [ -d "%{buildroot}%{_docdir}/%{pkgnamever}" ]; then\ -echo "%{_docdir}/%{pkgnamever}" >> %{basepkg}%{?without_shared:-devel}.files\ +for dir in %{_docdir}/{ghc-,}%{pkgnamever} +if [ -d "%{buildroot}${dir}" ]; then\ +echo "${dir}" >> %{basepkg}%{?without_shared:-devel}.files\ fi\ +done\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ @@ -65,12 +62,13 @@ sed -i -e "s!%{buildroot}!!g" %{!?without_shared:%{basepkg}.files} %{basepkg}-de %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %cabal register --gen-pkg-config\ -mkdir -p $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d\ -install --mode=0644 %{pkgnamever}.conf $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d\ +mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\ +install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %{nil} # devel pkg basic requires -%ghc_devel_requires Requires(post): ghc = %{ghc_version}\ +%ghc_devel_requires Requires: ghc = %{ghc_version}\ + Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ %if 0%{!?without_shared:1}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ @@ -185,7 +183,7 @@ Group: Development/Libraries\ %description -n %{basepkg}-prof\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ -This package contains the profiling library.\ +This package contains the profiling development files.\ \ %files -n %{basepkg}-prof -f %{basepkg}-prof.files\ %defattr(-,root,root,-)\ @@ -194,7 +192,7 @@ This package contains the profiling library.\ # ghc_strip_dynlinked %ghc_strip_dynlinked\ %if 0%{!?__debug_package:1}\ -find $RPM_BUILD_ROOT -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ +find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ %endif # ghc_bin_build @@ -207,9 +205,9 @@ ghc --make -dynamic Setup\ %ghc_lib_build()\ %{?1:cd %1-%2}\ ghc --make -dynamic Setup\ -%cabal_configure -p %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghcdocbasedir}/libraries/%1-%2}\ +%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ -%cabal haddock %{!?without_hscolour:--hyperlink-source}\ +%{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\ %{?1:cd -}\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index aed83f7..a332bc0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.3 +Version: 0.11.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,6 +47,14 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Sat Jan 22 2011 Jens Petersen - 0.11.4-1 +- drop deprecated ghcdocdir and ghcpkgdir +- new ghclibdocdir +- replace some missed RPM_BUILD_ROOT's +- bring back ghc requires in ghc_devel_requires +- improve prof summary and description +- add without_prof and without_haddock option macros + * Fri Jan 21 2011 Jens Petersen - 0.11.3-1 - compile Setup to help speed up builds From 85779fa14ffd9058320711e32486151548504c32 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 22 Jan 2011 23:02:28 +1000 Subject: [PATCH 049/514] fix Requires misindent in ghc_devel_requires --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index b73269e..95982c8 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -68,7 +68,7 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ # devel pkg basic requires %ghc_devel_requires Requires: ghc = %{ghc_version}\ - Requires(post): ghc = %{ghc_version}\ +Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ %if 0%{!?without_shared:1}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ From ed934fb2e1a73d7b6e37fe7d47c6193c0593dd75 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 22 Jan 2011 23:38:19 +1000 Subject: [PATCH 050/514] fix the filelist docdir for-loop --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 95982c8..6b2b45e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -32,7 +32,7 @@ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> fi\ %endif\ echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ -for dir in %{_docdir}/{ghc-,}%{pkgnamever} +for dir in %{_docdir}/{ghc-,}%{pkgnamever}; do\ if [ -d "%{buildroot}${dir}" ]; then\ echo "${dir}" >> %{basepkg}%{?without_shared:-devel}.files\ fi\ From a1abcaaa783b801c489ed12503d06d2e92f11308 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 23 Jan 2011 15:05:38 +1000 Subject: [PATCH 051/514] add rpm hash requires for dynamic executables in ghc-deps.sh - compile Setup in cabal macro - use _rpmconfigdir --- ghc-deps.sh | 24 ++++++++++++++++++------ ghc-rpm-macros.ghc | 11 ++++++----- ghc-rpm-macros.spec | 7 ++++++- 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index a475c3d..37263a6 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -18,14 +18,18 @@ case $MODE in *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac +GHCVERSION=$(ghc --numeric-version) + files=$(cat) #set -x -if [ -d "$PKGCONFDIR" ]; then - for i in $files; do - LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") - if [ -n "$LIB_FILE" ]; then +for i in $files; do + LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") + if [ -n "$LIB_FILE" ]; then + if [ -d "$PKGCONFDIR" ]; then + META="" + SELF="" case $LIB_FILE in *.so) META=ghc ;; *_p.a) META=ghc-prof SELF=ghc-devel ;; @@ -48,7 +52,15 @@ if [ -d "$PKGCONFDIR" ]; then fi fi fi - done -fi + elif [ "$MODE" = "--requires" ]; then + if file $i | grep -q 'executable, .* dynamically linked'; then + BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") + for p in ${BIN_DEPS}; do + HASH=$(ghc-pkg --global field $p id | sed -e "s/^id: \+//") + echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/" + done + fi + fi +done echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 6b2b45e..16d060a 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,5 +1,6 @@ # "cabal" -%cabal ./Setup +%cabal [ -x Setup ] || ghc --make -dynamic Setup\ +./Setup # configure %cabal_configure\ @@ -130,8 +131,8 @@ This package provides the shared library.\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ %global _use_internal_dependency_generator 0\ -%global __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ -%global __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ +%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ +%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %package -n %{basepkg}-devel\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ Group: Development/Libraries\ @@ -197,14 +198,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_bin_build %ghc_bin_build\ -ghc --make -dynamic Setup\ %cabal_configure\ %cabal build # ghc_lib_build [name] [version] %ghc_lib_build()\ %{?1:cd %1-%2}\ -ghc --make -dynamic Setup\ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ %{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\ @@ -213,6 +212,8 @@ ghc --make -dynamic Setup\ # install bin package %ghc_bin_install\ +%global _use_internal_dependency_generator 0\ +%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %ghc_strip_dynlinked diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a332bc0..76cd853 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.4 +Version: 0.11.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,6 +47,11 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Sun Jan 23 2011 Jens Petersen - 0.11.5-1 +- add rpm hash requires for dynamic executables in ghc-deps.sh +- compile Setup in cabal macro +- use _rpmconfigdir + * Sat Jan 22 2011 Jens Petersen - 0.11.4-1 - drop deprecated ghcdocdir and ghcpkgdir - new ghclibdocdir From 876ea626db787fe6c445ba92916ec8aad82154ff Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 29 Jan 2011 22:34:52 +1000 Subject: [PATCH 052/514] simplify adding shared subpackage license file; own ghc-deps.sh not /usr/lib/rpm --- ghc-rpm-macros.ghc | 8 ++++---- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 16d060a..00f48cf 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -33,11 +33,11 @@ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> fi\ %endif\ echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ -for dir in %{_docdir}/{ghc-,}%{pkgnamever}; do\ -if [ -d "%{buildroot}${dir}" ]; then\ -echo "${dir}" >> %{basepkg}%{?without_shared:-devel}.files\ +%if 0%{!?1:1}\ +if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ + echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?without_shared:-devel}.files\ fi\ -done\ +%endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 76cd853..9a3ccc5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.5 +Version: 0.11.6 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -43,10 +43,14 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %defattr(-,root,root,-) %doc COPYING AUTHORS %config(noreplace) %{_sysconfdir}/rpm/macros.ghc -%{_prefix}/lib/rpm +%{_prefix}/lib/rpm/ghc-deps.sh %changelog +* Sat Jan 29 2011 Jens Petersen - 0.11.6-1 +- simplify adding shared subpackage license file +- own ghc-deps.sh not /usr/lib/rpm + * Sun Jan 23 2011 Jens Petersen - 0.11.5-1 - add rpm hash requires for dynamic executables in ghc-deps.sh - compile Setup in cabal macro From ee9ff3e826914fb32a26bfb746f55e8c8bc52e26 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 19:31:55 -0600 Subject: [PATCH 053/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9a3ccc5..bc2c2f0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros Version: 0.11.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -47,6 +47,9 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 0.11.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sat Jan 29 2011 Jens Petersen - 0.11.6-1 - simplify adding shared subpackage license file - own ghc-deps.sh not /usr/lib/rpm From 1f4312aeaa80f62ab15895512d68745db1c20190 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 10 Feb 2011 22:11:02 +1000 Subject: [PATCH 054/514] fix ghc-deps.sh for without_shared libraries --- ghc-deps.sh | 76 ++++++++++++++++++++++++--------------------- ghc-rpm-macros.ghc | 3 ++ ghc-rpm-macros.spec | 7 +++-- 3 files changed, 49 insertions(+), 37 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 37263a6..b964ce9 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -18,6 +18,8 @@ case $MODE in *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac +SHARED=$(find $PKGBASEDIR -type f -name '*.so') + GHCVERSION=$(ghc --numeric-version) files=$(cat) @@ -25,42 +27,46 @@ files=$(cat) #set -x for i in $files; do - LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") - if [ -n "$LIB_FILE" ]; then - if [ -d "$PKGCONFDIR" ]; then - META="" - SELF="" - case $LIB_FILE in - *.so) META=ghc ;; - *_p.a) META=ghc-prof SELF=ghc-devel ;; - *.a) META=ghc-devel SELF=ghc ;; - esac - if [ -n "$META" ]; then - PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") - HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") - for i in $HASHS; do - case $i in - *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;; - *) ;; - esac - done - if [ "$MODE" = "--requires" -a -n "$SELF" ]; then - HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") - for i in $HASHS; do - echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" - done - fi + LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") + if [ -n "$LIB_FILE" ]; then + if [ -d "$PKGCONFDIR" ]; then + META="" + SELF="" + case $LIB_FILE in + *.so) META=ghc ;; + *_p.a) META=ghc-prof SELF=ghc-devel ;; + *.a) META=ghc-devel + if [ -n "$SHARED" ]; then + SELF=ghc + fi + ;; + esac + if [ -n "$META" ]; then + PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") + HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") + for i in $HASHS; do + case $i in + *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;; + *) ;; + esac + done + if [ "$MODE" = "--requires" -a -n "$SELF" ]; then + HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") + for i in $HASHS; do + echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" + done + fi + fi + fi + elif [ "$MODE" = "--requires" ]; then + if file $i | grep -q 'executable, .* dynamically linked'; then + BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") + for p in ${BIN_DEPS}; do + HASH=$(ghc-pkg --global field $p id | sed -e "s/^id: \+//") + echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/" + done + fi fi - fi - elif [ "$MODE" = "--requires" ]; then - if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") - for p in ${BIN_DEPS}; do - HASH=$(ghc-pkg --global field $p id | sed -e "s/^id: \+//") - echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/" - done - fi - fi done echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 00f48cf..f2d229b 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,3 +1,6 @@ +# RPM Macros for packaging Haskell cabalized packages +# see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details + # "cabal" %cabal [ -x Setup ] || ghc --make -dynamic Setup\ ./Setup diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index bc2c2f0..036a487 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,6 +1,6 @@ Name: ghc-rpm-macros -Version: 0.11.6 -Release: 2%{?dist} +Version: 0.11.7 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -47,6 +47,9 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Thu Feb 10 2011 Jens Petersen - 0.11.7-1 +- fix ghc-deps.sh for without_shared libraries + * Tue Feb 08 2011 Fedora Release Engineering - 0.11.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From 30f51fc80d5846ca48f0e8f7289aebeee03d18c2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 11 Feb 2011 00:33:37 +1000 Subject: [PATCH 055/514] more non-shared fixes to avoid dynamic and shared on secondary archs - only link Setup dynamically if without_shared and without_dynamic not set - set without_shared and without_dynamic by default on secondary archs in cabal_bin_build and cabal_lib_build - add cabal_configure_options to pass extra options to cabal_configure --- ghc-rpm-macros.ghc | 12 ++++++++++-- ghc-rpm-macros.spec | 8 +++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index f2d229b..88410b3 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -2,12 +2,12 @@ # see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make -dynamic Setup\ +%cabal [ -x Setup ] || ghc --make %{!?without_shared:%{!?without_dynamic:-dynamic}} Setup\ ./Setup # configure %cabal_configure\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{!?without_dynamic:--enable-executable-dynamic} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{!?without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -201,12 +201,20 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_bin_build %ghc_bin_build\ +%ifnarch %{ix86} x86_64\ +%global without_dynamic 1\ +%global without_shared 1\ +%endif\ %cabal_configure\ %cabal build # ghc_lib_build [name] [version] %ghc_lib_build()\ %{?1:cd %1-%2}\ +%ifnarch %{ix86} x86_64\ +%global without_dynamic 1\ +%global without_shared 1\ +%endif\ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ %{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 036a487..4561fdf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.7 +Version: 0.11.8 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,6 +47,12 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Thu Feb 10 2011 Jens Petersen - 0.11.8-1 +- only link Setup dynamically if without_shared and without_dynamic not set +- add cabal_configure_options to pass extra options to cabal_configure +- set without_shared and without_dynamic by default on secondary archs + in cabal_bin_build and cabal_lib_build + * Thu Feb 10 2011 Jens Petersen - 0.11.7-1 - fix ghc-deps.sh for without_shared libraries From 26005406d30c153143caa7cbf721d82c84e2610e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 11 Feb 2011 01:50:04 +1000 Subject: [PATCH 056/514] revert setting without_shared and without_dynamic on secondary archs --- ghc-rpm-macros.ghc | 8 -------- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 88410b3..0b5bd29 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -201,20 +201,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_bin_build %ghc_bin_build\ -%ifnarch %{ix86} x86_64\ -%global without_dynamic 1\ -%global without_shared 1\ -%endif\ %cabal_configure\ %cabal build # ghc_lib_build [name] [version] %ghc_lib_build()\ %{?1:cd %1-%2}\ -%ifnarch %{ix86} x86_64\ -%global without_dynamic 1\ -%global without_shared 1\ -%endif\ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ %{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4561fdf..ac66a97 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,5 @@ Name: ghc-rpm-macros -Version: 0.11.8 +Version: 0.11.9 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -47,11 +47,15 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %changelog +* Fri Feb 11 2011 Jens Petersen - 0.11.9-1 +- revert "set without_shared and without_dynamic by default on secondary archs + in cabal_bin_build and cabal_lib_build" change, since happening for all archs + * Thu Feb 10 2011 Jens Petersen - 0.11.8-1 - only link Setup dynamically if without_shared and without_dynamic not set -- add cabal_configure_options to pass extra options to cabal_configure - set without_shared and without_dynamic by default on secondary archs in cabal_bin_build and cabal_lib_build +- add cabal_configure_options to pass extra options to cabal_configure * Thu Feb 10 2011 Jens Petersen - 0.11.7-1 - fix ghc-deps.sh for without_shared libraries From 2c0b10d5d5efc8f75ed5896ecfd7036bdd74e610 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 13 Feb 2011 01:07:05 +1000 Subject: [PATCH 057/514] disable shared and dynamic on secondary archs - this package is now arch-dependent - rename without_shared to ghc_without_shared and without_dynamic to ghc_without_dynamic so that they can be globally defined for secondary archs without shared libs - use %%undefined macro - disable debug_package in ghc_bin_build and ghc_lib_build - set ghc_without_shared and ghc_without_dynamic on secondary (ie non main intel archs) - disable debuginfo for self --- ghc-rpm-macros.ghc | 23 ++++++++++++----------- ghc-rpm-macros.spec | 28 +++++++++++++++++++++++++--- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 0b5bd29..8d71123 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,13 +1,13 @@ -# RPM Macros for packaging Haskell cabalized packages +# RPM Macros for packaging Haskell cabalized packages -*-rpm-spec-*- # see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?without_shared:%{!?without_dynamic:-dynamic}} Setup\ +%cabal [ -x Setup ] || ghc --make %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\ ./Setup # configure %cabal_configure\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?without_shared:--enable-shared} %{!?without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -28,7 +28,7 @@ %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files\ -%if 0%{!?without_shared:1}\ +%if %{undefined ghc_without_shared}\ echo "%defattr(-,root,root,-)" > %{basepkg}.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}.files\ @@ -38,7 +38,7 @@ fi\ echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ %if 0%{!?1:1}\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ - echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?without_shared:-devel}.files\ + echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ fi\ %endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ @@ -53,7 +53,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -sed -i -e "s!%{buildroot}!!g" %{!?without_shared:%{basepkg}.files} %{basepkg}-devel.files %{basepkg}-prof.files\ +sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files %{basepkg}-prof.files\ %{nil} # compiler version @@ -74,7 +74,7 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %ghc_devel_requires Requires: ghc = %{ghc_version}\ Requires(post): ghc = %{ghc_version}\ Requires(postun): ghc = %{ghc_version}\ -%if 0%{!?without_shared:1}\ +%if %{undefined ghc_without_shared}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif @@ -88,7 +88,7 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ -%if 0%{!?without_shared:1}\ +%if %{undefined ghc_without_shared}\ %files -n %{basepkg} -f %{basepkg}.files\ %defattr(-,root,root,-)\ %endif\ @@ -113,8 +113,7 @@ Group: System Environment/Libraries\ \ %description -n %{basepkg}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ -\ -%if 0%{?ghc_version:%{!?without_shared:1}}\ +%if %{defined ghc_version} && %{undefined ghc_without_shared}\ This package provides the shared library.\ %endif\ \ @@ -195,17 +194,19 @@ This package contains the profiling development files.\ # ghc_strip_dynlinked %ghc_strip_dynlinked\ -%if 0%{!?__debug_package:1}\ +%if %{undefined __debug_package}\ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ %endif # ghc_bin_build %ghc_bin_build\ +%global debug_package %{nil}\ %cabal_configure\ %cabal build # ghc_lib_build [name] [version] %ghc_lib_build()\ +%global debug_package %{nil}\ %{?1:cd %1-%2}\ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ac66a97..ccf13cf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,5 +1,7 @@ +%global debug_package %{nil} + Name: ghc-rpm-macros -Version: 0.11.9 +Version: 0.11.10 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -15,8 +17,6 @@ Source1: COPYING Source2: AUTHORS Source3: ghc-deps.sh -BuildArch: noarch - %description A set of macros for building GHC packages following the Haskell Guidelines of the Fedora Haskell SIG. This package probably shouldn't be installed on @@ -38,6 +38,17 @@ install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm +# this is why this package is now arch-dependent: +# turn off shared libs and dynamic linking on secondary archs +%ifnarch %{ix86} x86_64 +cat >> ${RPM_BUILD_ROOT}/%{_prefix}%{_sysconfdir}/rpm/macros.ghc < - 0.11.10-1 +- this package is now arch-dependent +- rename without_shared to ghc_without_shared and without_dynamic + to ghc_without_dynamic so that they can be globally defined for + secondary archs without shared libs +- use %%undefined macro +- disable debug_package in ghc_bin_build and ghc_lib_build +- set ghc_without_shared and ghc_without_dynamic on secondary + (ie non main intel archs) +- disable debuginfo for self + * Fri Feb 11 2011 Jens Petersen - 0.11.9-1 - revert "set without_shared and without_dynamic by default on secondary archs in cabal_bin_build and cabal_lib_build" change, since happening for all archs From 75e22924a61b6fd88e98994a86585d2f15849bcb Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 13 Feb 2011 01:19:40 +1000 Subject: [PATCH 058/514] fix macro.ghc path for cat --- ghc-rpm-macros.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ccf13cf..8013852 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.10 +Version: 0.11.10.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -41,7 +41,7 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs %ifnarch %{ix86} x86_64 -cat >> ${RPM_BUILD_ROOT}/%{_prefix}%{_sysconfdir}/rpm/macros.ghc <> ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc < Date: Sun, 13 Feb 2011 02:10:18 +1000 Subject: [PATCH 059/514] fix the defines of ghc_without_dynamic and ghc_without_shared --- ghc-rpm-macros.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8013852..b5ea8ed 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -43,9 +43,9 @@ install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm %ifnarch %{ix86} x86_64 cat >> ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc < Date: Sun, 13 Feb 2011 02:11:03 +1000 Subject: [PATCH 060/514] subminor version bump --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b5ea8ed..131d907 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.10.1 +Version: 0.11.10.2 Release: 1%{?dist} Summary: Macros for building packages for GHC From 30ceea2628b9a70010d5b444ac03b13c48e4125a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 9 Mar 2011 15:12:41 +0900 Subject: [PATCH 061/514] add docdir when subpackaging packages too --- ghc-rpm-macros.ghc | 5 +++++ ghc-rpm-macros.spec | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 8d71123..84feeb9 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -41,6 +41,11 @@ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ fi\ %endif\ +%if 0%{?1:1}\ +if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ + echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ +fi\ +%endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 131d907..4d54ff8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.10.2 +Version: 0.11.11 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,6 +58,9 @@ EOF %changelog +* Wed Mar 9 2011 Jens Petersen - 0.11.11-1 +- add docdir when subpackaging packages too + * Sun Feb 13 2011 Jens Petersen - 0.11.10-1 - this package is now arch-dependent - rename without_shared to ghc_without_shared and without_dynamic From 82b34c562946c0f323be86c2e678c389bafd50a0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 10 Mar 2011 15:02:39 +0900 Subject: [PATCH 062/514] add ghc_pkg_obsoletes to shared lib package too --- ghc-rpm-macros.ghc | 1 + ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 84feeb9..eab61e5 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -115,6 +115,7 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} Group: System Environment/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ \ %description -n %{basepkg}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4d54ff8..7ed0006 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.11 +Version: 0.11.12 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,6 +58,9 @@ EOF %changelog +* Thu Mar 10 2011 Jens Petersen - 0.11.12-1 +- add ghc_pkg_obsoletes to binlib base lib package too + * Wed Mar 9 2011 Jens Petersen - 0.11.11-1 - add docdir when subpackaging packages too From cd30bb354741cb11e02ecee22daa30cacbdb4838 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 28 Mar 2011 15:57:59 +0900 Subject: [PATCH 063/514] check PKGBASEDIR, ghc bootstrapping, ghc_reindex_haddock nop, drop ghc-*-doc provides - ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package - abort cabal_configure if ghc is not self-bootstrapped - make ghc_reindex_haddock a safe no-op - no longer provide ghc-*-doc - no longer run ghc_reindex_haddock in ghc-*-devel scripts --- ghc-deps.sh | 4 +++- ghc-rpm-macros.ghc | 17 +++++++++++------ ghc-rpm-macros.spec | 11 +++++++++-- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index b964ce9..125a097 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -18,7 +18,9 @@ case $MODE in *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac -SHARED=$(find $PKGBASEDIR -type f -name '*.so') +if [ -d "$PKGBASEDIR" ]; then + SHARED=$(find $PKGBASEDIR -type f -name '*.so') +fi GHCVERSION=$(ghc --numeric-version) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index eab61e5..17f5c49 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -7,6 +7,15 @@ # configure %cabal_configure\ +%if %{undefined ghc_bootstrap}\ +if ! ghc --info | grep -q "(\"Booter version\",\"%{ghc_version}\")"; then\ + echo "Aborting since this ghc build is not ABI self-bootstrapped.\ +The ghc package should be rebuilt against its current version first\ +to prevent avoid any potential future dependency breakage.\ +(This can be overridden by defining ghc_bootstrap at your own risk.)"\ + exit 1\ +fi\ +%endif\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} # install @@ -128,9 +137,8 @@ This package provides the shared library.\ %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : -# for docs post and postun -%ghc_reindex_haddock\ -%{nil} +# (deprecated) for docs post and postun +%ghc_reindex_haddock : # ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] %ghc_package_devel(c:h:l:)\ @@ -154,7 +162,6 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{version}-%{release}\ -Provides: %{basepkg}-doc = %{version}-%{release}\ \ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ @@ -163,11 +170,9 @@ This package contains the development files.\ \ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ -%ghc_reindex_haddock\ \ %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ -%ghc_reindex_haddock\ \ %files -n %{basepkg}-devel -f %{basepkg}-devel.files\ %defattr(-,root,root,-)\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7ed0006..9db505f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.12 +Version: 0.11.13 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,6 +58,13 @@ EOF %changelog +* Mon Mar 28 2011 Jens Petersen - 0.11.13-1 +- ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package +- abort cabal_configure if ghc is not self-bootstrapped +- make ghc_reindex_haddock a safe : no-op +- no longer provide ghc-*-doc +- no longer run ghc_reindex_haddock in ghc-*-devel scripts + * Thu Mar 10 2011 Jens Petersen - 0.11.12-1 - add ghc_pkg_obsoletes to binlib base lib package too @@ -72,7 +79,7 @@ EOF - use %%undefined macro - disable debug_package in ghc_bin_build and ghc_lib_build - set ghc_without_shared and ghc_without_dynamic on secondary - (ie non main intel archs) + (ie non main intel) archs - disable debuginfo for self * Fri Feb 11 2011 Jens Petersen - 0.11.9-1 From 78a6eab552a77a853e1fa8584f5e1a4756ecc1cd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 28 Mar 2011 16:45:18 +0900 Subject: [PATCH 064/514] fix self-bootstrap check --- ghc-rpm-macros.ghc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 17f5c49..1a86d72 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -8,11 +8,11 @@ # configure %cabal_configure\ %if %{undefined ghc_bootstrap}\ -if ! ghc --info | grep -q "(\"Booter version\",\"%{ghc_version}\")"; then\ - echo "Aborting since this ghc build is not ABI self-bootstrapped.\ +if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ + echo "Aborting since this ghc version build is not self-bootstrapped.\ The ghc package should be rebuilt against its current version first\ -to prevent avoid any potential future dependency breakage.\ -(This can be overridden by defining ghc_bootstrap at your own risk.)"\ +to prevent dependency ABI breakage with a future ghc rebuild.\ +(This can be overridden at your own risk by defining ghc_bootstrap.)"\ exit 1\ fi\ %endif\ From cbf3d70e56a64b03162d0e0c7a08e8016faf80a5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 1 Apr 2011 16:54:19 +0900 Subject: [PATCH 065/514] provides ghc-*-doc still needed for current lib templates --- ghc-rpm-macros.ghc | 1 + ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 1a86d72..28ff7ec 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -162,6 +162,7 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{version}-%{release}\ +Provides: %{basepkg}-doc = %{version}-%{release}\ \ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9db505f..a9fcf96 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.13 +Version: 0.11.14 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,10 +58,13 @@ EOF %changelog +* Fri Apr 1 2011 Jens Petersen - 0.11.14-1 +- provides ghc-*-doc still needed for current lib templates + * Mon Mar 28 2011 Jens Petersen - 0.11.13-1 - ghc-deps.sh: check PKGBASEDIR exists to avoid warning for bin package - abort cabal_configure if ghc is not self-bootstrapped -- make ghc_reindex_haddock a safe : no-op +- make ghc_reindex_haddock a safe no-op - no longer provide ghc-*-doc - no longer run ghc_reindex_haddock in ghc-*-devel scripts From 8af86b797a234acda904e0abfa6cc366c2c5f541 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 8 May 2011 23:09:07 +0900 Subject: [PATCH 066/514] drop ghc_pkg_deps from ghc_package_devel and ghc_package_prof --- ghc-deps.sh | 8 ++++---- ghc-rpm-macros.ghc | 4 +--- ghc-rpm-macros.spec | 7 ++++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 125a097..00e2440 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -30,7 +30,7 @@ files=$(cat) for i in $files; do LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") - if [ -n "$LIB_FILE" ]; then + if [ "$LIB_FILE" ]; then if [ -d "$PKGCONFDIR" ]; then META="" SELF="" @@ -38,12 +38,12 @@ for i in $files; do *.so) META=ghc ;; *_p.a) META=ghc-prof SELF=ghc-devel ;; *.a) META=ghc-devel - if [ -n "$SHARED" ]; then + if [ "$SHARED" ]; then SELF=ghc fi ;; esac - if [ -n "$META" ]; then + if [ "$META" ]; then PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") for i in $HASHS; do @@ -52,7 +52,7 @@ for i in $files; do *) ;; esac done - if [ "$MODE" = "--requires" -a -n "$SELF" ]; then + if [ "$MODE" = "--requires" -a "$SELF" ]; then HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") for i in $HASHS; do echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 28ff7ec..ccb9f06 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -16,7 +16,7 @@ to prevent dependency ABI breakage with a future ghc rebuild.\ exit 1\ fi\ %endif\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{ghclibdocdir}/%{pkg_name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -155,7 +155,6 @@ Group: Development/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_devel_requires}\ -%{!-h:%{?ghc_pkg_deps:Requires: %{ghc_pkg_deps}}}\ %{-h:Requires: %{-h*}}\ %{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ %{-c:Requires: %{-c*}}\ @@ -191,7 +190,6 @@ Group: Development/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_prof_requires}\ -%{!-h:%{?ghc_pkg_deps:Requires: %(echo "%{ghc_pkg_deps}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}}\ %{-h:Requires: %(echo "%{-h*}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ \ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a9fcf96..4544177 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.11.14 +Version: 0.12.0 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,6 +58,11 @@ EOF %changelog +* Sat May 7 2011 Jens Petersen - 0.12.0-1 +- drop ghc_pkg_deps from ghc_package_devel and ghc_package_prof since + ghc-deps.sh generates better inter-package dependencies already +- condition --htmldir on pkg_name + * Fri Apr 1 2011 Jens Petersen - 0.11.14-1 - provides ghc-*-doc still needed for current lib templates From 15b76d9f764a51d26d957d72a916c94e5fd0c869 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 8 May 2011 23:23:11 +0900 Subject: [PATCH 067/514] improve the bootstrap abort error text --- ghc-rpm-macros.ghc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ccb9f06..9ed4692 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -9,10 +9,10 @@ %cabal_configure\ %if %{undefined ghc_bootstrap}\ if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ - echo "Aborting since this ghc version build is not self-bootstrapped.\ + echo "Aborting since this ghc build is not self-bootstrapped.\ The ghc package should be rebuilt against its current version first\ -to prevent dependency ABI breakage with a future ghc rebuild.\ -(This can be overridden at your own risk by defining ghc_bootstrap.)"\ +to prevent dependency ABI breakage from a future ghc rebuild.\ +(This can be overridden understanding this risk, by defining ghc_bootstrap.)"\ exit 1\ fi\ %endif\ From c81c65671bec75a3891cf53719be2ad59c699820 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 9 May 2011 13:59:58 +0900 Subject: [PATCH 068/514] ghc-deps.sh: fix ghclibdir path documentation --- ghc-deps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 00e2440..0ad905b 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -3,10 +3,10 @@ # To use add the following lines to spec file: # %define _use_internal_dependency_generator 0 -# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghcpkgbasedir} -# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghcpkgbasedir} +# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghclibdir} -[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}" && exit 1 +[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 MODE=$1 PKGBASEDIR=$2 From eab5583c0dcf11c975b5f1f97b70774f923dfed4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 9 May 2011 18:56:37 +0900 Subject: [PATCH 069/514] include ghc_pkg_c_deps even when -c option used --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 9ed4692..9a0a97c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -156,7 +156,7 @@ Group: Development/Libraries\ %{-l:License: %{-l*}}\ %{?ghc_devel_requires}\ %{-h:Requires: %{-h*}}\ -%{!-c:%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}}\ +%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4544177..ced65f4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.12.0 +Version: 0.12.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,6 +58,9 @@ EOF %changelog +* Mon May 9 2011 Jens Petersen - 0.12.1-1 +- include ghc_pkg_c_deps even when -c option used + * Sat May 7 2011 Jens Petersen - 0.12.0-1 - drop ghc_pkg_deps from ghc_package_devel and ghc_package_prof since ghc-deps.sh generates better inter-package dependencies already From 1bc67af711426c41245fc27a735aca5be2244617 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 May 2011 10:58:56 +0900 Subject: [PATCH 070/514] merge prof subpackages into devel to simplify packaging --- ghc-rpm-macros.ghc | 42 +++++------------------------------------- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 9a0a97c..df7db99 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -36,7 +36,7 @@ fi\ %define basepkg ghc-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -rm -f %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files\ +rm -f %{basepkg}.files %{basepkg}-devel.files\ %if %{undefined ghc_without_shared}\ echo "%defattr(-,root,root,-)" > %{basepkg}.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ @@ -58,16 +58,12 @@ fi\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ -find %{buildroot}%{pkgdir} ! \\( -type d -o -name "*_p.a" -o -name "*.p_hi" -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ -fi\ -echo "%defattr(-,root,root,-)" > %{basepkg}-prof.files\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ -find %{buildroot}%{pkgdir} \\( -name "*_p.a" -o -name "*.p_hi" \\) >> %{basepkg}-prof.files\ +find %{buildroot}%{pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files %{basepkg}-prof.files\ +sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\ %{nil} # compiler version @@ -92,10 +88,6 @@ Requires(postun): ghc = %{ghc_version}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif -# prof pkg basic requires -%ghc_prof_requires Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}}-devel = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ -%{nil} - # ghc_lib_package [-c cdepslist] [-h pkgdepslist] %ghc_lib_package(c:h:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -108,8 +100,6 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %endif\ \ %ghc_package_devel\ -\ -%ghc_package_prof\ %{nil} # ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] @@ -162,6 +152,8 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{version}-%{release}\ Provides: %{basepkg}-doc = %{version}-%{release}\ +Obsoletes: %{basepkg}-prof < %{version}-%{release}\ +Provides: %{basepkg}-prof = %{version}-%{release}\ \ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ @@ -178,30 +170,6 @@ This package contains the development files.\ %defattr(-,root,root,-)\ %{nil} -# ghc_package_prof [-h pkgdepslist] [-l licensetag] -%ghc_package_prof(h:l:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%define basepkg ghc-%{pkgname}\ -%package -n %{basepkg}-prof\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname}} profiling libraries\ -Group: Development/Libraries\ -%{?1:Version: %{pkgver}}\ -%{-l:License: %{-l*}}\ -%{?ghc_prof_requires}\ -%{-h:Requires: %(echo "%{-h*}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-prof/g")}\ -\ -%description -n %{basepkg}-prof\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ -\ -This package contains the profiling development files.\ -\ -%files -n %{basepkg}-prof -f %{basepkg}-prof.files\ -%defattr(-,root,root,-)\ -%{nil} - # ghc_strip_dynlinked %ghc_strip_dynlinked\ %if %{undefined __debug_package}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ced65f4..d5b1132 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.12.1 +Version: 0.13 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -58,6 +58,9 @@ EOF %changelog +* Wed May 11 2011 Jens Petersen - 0.13-1 +- merge prof subpackages into devel to simplify packaging + * Mon May 9 2011 Jens Petersen - 0.12.1-1 - include ghc_pkg_c_deps even when -c option used From da128f954a93e88ef3c32d9658bf502b15d1ac32 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 28 May 2011 12:19:35 +0900 Subject: [PATCH 071/514] move macros.ghc to /usr/lib/rpm to avoid conflict with redhat-rpm-config --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index df7db99..9cb5c5b 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -140,7 +140,7 @@ This package provides the shared library.\ %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %package -n %{basepkg}-devel\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ +Summary: Development files for %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ Group: Development/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d5b1132..c725c97 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: ghc-rpm-macros -Version: 0.13 +Version: 0.13.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -32,10 +32,8 @@ echo no build stage needed %install -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm -install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc - mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm +install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm/macros.ghc install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm # this is why this package is now arch-dependent: @@ -58,6 +56,9 @@ EOF %changelog +* Sat May 28 2011 Jens Petersen - 0.13.1-1 +- move macros.ghc to /usr/lib/rpm to avoid conflict with redhat-rpm-config + * Wed May 11 2011 Jens Petersen - 0.13-1 - merge prof subpackages into devel to simplify packaging From e29cbf2a999785a145800a5feb3b4c5fccbfb1ba Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 28 May 2011 12:39:44 +0900 Subject: [PATCH 072/514] fix the file for macros.ghc move --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c725c97..263b19f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -51,8 +51,8 @@ EOF %files %defattr(-,root,root,-) %doc COPYING AUTHORS -%config(noreplace) %{_sysconfdir}/rpm/macros.ghc %{_prefix}/lib/rpm/ghc-deps.sh +%{_prefix}/lib/rpm/macros.ghc %changelog From 4b65f2f48ebc0f57b8767c95a8fc13d62de1b571 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 28 May 2011 15:02:35 +0900 Subject: [PATCH 073/514] move macros back to /etc/rpm and add %macro_file --- ghc-rpm-macros.spec | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 263b19f..aa19974 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,9 @@ %global debug_package %{nil} +%global macros_file %{_sysconfdir}/rpm/macros.ghc-pkg + Name: ghc-rpm-macros -Version: 0.13.1 +Version: 0.13.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -19,8 +21,8 @@ Source3: ghc-deps.sh %description A set of macros for building GHC packages following the Haskell Guidelines -of the Fedora Haskell SIG. This package probably shouldn't be installed on -its own as GHC is needed in order to make use of these macros. +of the Fedora Haskell SIG. ghc needs to be installed in order to make use of +these macros. %prep %setup -c -T @@ -32,14 +34,16 @@ echo no build stage needed %install -mkdir -p ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm -install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm/macros.ghc -install -p %{SOURCE3} ${RPM_BUILD_ROOT}/%{_prefix}/lib/rpm +mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm +install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} + +mkdir -p %{buildroot}/%{_prefix}/lib/rpm +install -p %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs %ifnarch %{ix86} x86_64 -cat >> ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm/macros.ghc <> %{buildroot}/%{macros_file} < - 0.13.2-1 +- macros need to live in /etc/rpm +- use macro_file for macros.ghc filepath + * Sat May 28 2011 Jens Petersen - 0.13.1-1 - move macros.ghc to /usr/lib/rpm to avoid conflict with redhat-rpm-config From 232d0166b5b22cdfd0728ed78d12b391bb188777 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 2 Jun 2011 13:35:47 +0900 Subject: [PATCH 074/514] rename back to macros.ghc again; revert previous devel summary ordering change --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 9cb5c5b..df7db99 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -140,7 +140,7 @@ This package provides the shared library.\ %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %package -n %{basepkg}-devel\ -Summary: Development files for %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ Group: Development/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index aa19974..e1dfa84 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,9 +1,9 @@ %global debug_package %{nil} -%global macros_file %{_sysconfdir}/rpm/macros.ghc-pkg +%global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.2 +Version: 0.13.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,10 @@ EOF %changelog +* Thu Jun 2 2011 Jens Petersen - 0.13.3-1 +- rename macros.ghc-pkg back to macros.ghc +- move the devel summary prefix back to a suffix + * Sat May 28 2011 Jens Petersen - 0.13.2-1 - macros need to live in /etc/rpm - use macro_file for macros.ghc filepath From ed9a00f761aeec1cbf292b60198737b873ed4e49 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 17 Jun 2011 12:29:21 +0900 Subject: [PATCH 075/514] add ghc_check_bootstrap --- ghc-rpm-macros.ghc | 15 ++++++++++----- ghc-rpm-macros.spec | 11 ++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index df7db99..79bef3c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -5,17 +5,22 @@ %cabal [ -x Setup ] || ghc --make %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\ ./Setup -# configure -%cabal_configure\ -%if %{undefined ghc_bootstrap}\ +# check ghc version was rebuilt against self +%ghc_check_bootstrap\ if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ - echo "Aborting since this ghc build is not self-bootstrapped.\ + echo "Warning: this ghc build is not self-bootstrapped.\ The ghc package should be rebuilt against its current version first\ to prevent dependency ABI breakage from a future ghc rebuild.\ (This can be overridden understanding this risk, by defining ghc_bootstrap.)"\ +%if %{undefined ghc_bootstrap}\ + echo "Aborting."\ exit 1\ -fi\ %endif\ +fi + +# configure +%cabal_configure\ +%ghc_check_bootstrap\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} # install diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e1dfa84..28b5356 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.3 +Version: 0.13.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -34,11 +34,9 @@ echo no build stage needed %install -mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/rpm -install -p -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} +install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} -mkdir -p %{buildroot}/%{_prefix}/lib/rpm -install -p %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm +install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs @@ -60,6 +58,9 @@ EOF %changelog +* Fri Jun 17 2011 Jens Petersen - 0.13.4-1 +- add ghc_check_bootstrap + * Thu Jun 2 2011 Jens Petersen - 0.13.3-1 - rename macros.ghc-pkg back to macros.ghc - move the devel summary prefix back to a suffix From e6a0b6cbfe1638dcf8123f02bac829274a8a975d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 17 Jun 2011 17:00:17 +0900 Subject: [PATCH 076/514] change ghc_bootstrap to a macro that disables shared and prof libs, docs, and testsuite - ghc_bootstrap is now a macro which sets ghc_bootstrapping, ghc_without_shared, without_prof, without_haddock, without_hscolour, without_manual, without_testsuite - tweaks to ghc_check_bootstrap --- ghc-rpm-macros.ghc | 20 +++++++++++++++----- ghc-rpm-macros.spec | 29 ++++++++++++++++++----------- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 79bef3c..1d96842 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -8,11 +8,11 @@ # check ghc version was rebuilt against self %ghc_check_bootstrap\ if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ - echo "Warning: this ghc build is not self-bootstrapped.\ -The ghc package should be rebuilt against its current version first\ -to prevent dependency ABI breakage from a future ghc rebuild.\ -(This can be overridden understanding this risk, by defining ghc_bootstrap.)"\ -%if %{undefined ghc_bootstrap}\ + echo "Warning: this ghc build is not self-bootstrapped."\ +%if %{undefined ghc_bootstrapping}\ + echo "The ghc package should be rebuilt against its current version before\ +proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ + echo "To override set ghc_bootstrapping. echo "Aborting."\ exit 1\ %endif\ @@ -213,3 +213,13 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ %{nil} + +# skip shared and prof libs, documentation, and testsuite +%ghc_bootstrap\ +%global ghc_bootstrapping 1\ +%global ghc_without_shared 1\ +%global without_prof 1\ +%global without_haddock 1\ +%global without_hscolour 1\ +%global without_manual 1\ +%global without_testsuite 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 28b5356..137ccd2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -2,28 +2,29 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc -Name: ghc-rpm-macros -Version: 0.13.4 -Release: 1%{?dist} -Summary: Macros for building packages for GHC +Name: ghc-rpm-macros +Version: 0.13.5 +Release: 1%{?dist} +Summary: Macros for building packages for GHC -Group: Development/Libraries -License: GPLv3 -URL: https://fedoraproject.org/wiki/Haskell_SIG +Group: Development/Libraries +License: GPLv3 +URL: https://fedoraproject.org/wiki/Haskell_SIG # This is a Fedora maintained package which is specific to # our distribution. Thus the source is only available from # within this srpm. -Source0: ghc-rpm-macros.ghc -Source1: COPYING -Source2: AUTHORS -Source3: ghc-deps.sh +Source0: ghc-rpm-macros.ghc +Source1: COPYING +Source2: AUTHORS +Source3: ghc-deps.sh %description A set of macros for building GHC packages following the Haskell Guidelines of the Fedora Haskell SIG. ghc needs to be installed in order to make use of these macros. + %prep %setup -c -T cp %{SOURCE1} %{SOURCE2} . @@ -58,6 +59,12 @@ EOF %changelog +* Fri Jun 17 2011 Jens Petersen - 0.13.5-1 +- ghc_bootstrap is now a macro which sets ghc_bootstrapping, + ghc_without_shared, without_prof, without_haddock, without_hscolour, + without_manual, without_testsuite +- tweaks to ghc_check_bootstrap + * Fri Jun 17 2011 Jens Petersen - 0.13.4-1 - add ghc_check_bootstrap From 5d0da9c487695bedfc61feb409b1fde78ed5b9c1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 17 Jun 2011 17:11:17 +0900 Subject: [PATCH 077/514] fix missing quotation in ghc_check_bootstrap --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 1d96842..48fb713 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -12,7 +12,7 @@ if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; the %if %{undefined ghc_bootstrapping}\ echo "The ghc package should be rebuilt against its current version before\ proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ - echo "To override set ghc_bootstrapping. + echo "To override set ghc_bootstrapping."\ echo "Aborting."\ exit 1\ %endif\ From 4773ef18ac4c7566676db9e221d4ad356ef7d022 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 17 Jun 2011 17:55:06 +0900 Subject: [PATCH 078/514] ghc_bootstrap: add ghc_without_dynamic and drop without_hscolour --- ghc-rpm-macros.ghc | 3 ++- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 48fb713..dab9753 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -215,11 +215,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{nil} # skip shared and prof libs, documentation, and testsuite +# - without_hscolour needs to be set locally in the spec file %ghc_bootstrap\ %global ghc_bootstrapping 1\ %global ghc_without_shared 1\ +%global ghc_without_dynamic 1\ %global without_prof 1\ %global without_haddock 1\ -%global without_hscolour 1\ %global without_manual 1\ %global without_testsuite 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 137ccd2..33125c1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.5 +Version: 0.13.6 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,10 @@ EOF %changelog +* Fri Jun 17 2011 Jens Petersen - 0.13.6-1 +- also set ghc_without_dynamic for ghc_bootstrap +- drop without_hscolour from ghc_bootstrap: doesn't work for koji + * Fri Jun 17 2011 Jens Petersen - 0.13.5-1 - ghc_bootstrap is now a macro which sets ghc_bootstrapping, ghc_without_shared, without_prof, without_haddock, without_hscolour, From 283779dff10ad8e2c4397c83a0697fd0d5a420c2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 27 Jun 2011 11:55:16 +0900 Subject: [PATCH 079/514] requires redhat-rpm-config for ghc_arches --- ghc-rpm-macros.ghc | 1 - ghc-rpm-macros.spec | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index dab9753..cb3f980 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -217,7 +217,6 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # skip shared and prof libs, documentation, and testsuite # - without_hscolour needs to be set locally in the spec file %ghc_bootstrap\ -%global ghc_bootstrapping 1\ %global ghc_without_shared 1\ %global ghc_without_dynamic 1\ %global without_prof 1\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 33125c1..2814547 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.6 +Version: 0.13.7 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -18,6 +18,7 @@ Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS Source3: ghc-deps.sh +Requires: redhat-rpm-config %description A set of macros for building GHC packages following the Haskell Guidelines @@ -59,6 +60,10 @@ EOF %changelog +* Mon Jun 27 2011 Jens Petersen - 0.13.7-1 +- add requires for redhat-rpm-config for ghc_arches +- drop ghc_bootstrapping from ghc_bootstrap: doesn't work for koji + * Fri Jun 17 2011 Jens Petersen - 0.13.6-1 - also set ghc_without_dynamic for ghc_bootstrap - drop without_hscolour from ghc_bootstrap: doesn't work for koji From f0b5c1b565a084047d749718902ee1dd3b792ce8 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 1 Jul 2011 13:54:49 +0900 Subject: [PATCH 080/514] drop defattr's; move depgen setup to ghc_lib_install --- ghc-rpm-macros.ghc | 10 +++------- ghc-rpm-macros.spec | 7 ++++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index cb3f980..594adda 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -43,13 +43,11 @@ fi %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ %if %{undefined ghc_without_shared}\ -echo "%defattr(-,root,root,-)" > %{basepkg}.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}.files\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ %endif\ -echo "%defattr(-,root,root,-)" > %{basepkg}-devel.files\ %if 0%{!?1:1}\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ @@ -101,7 +99,6 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %define basepkg ghc-%{pkgname}\ %if %{undefined ghc_without_shared}\ %files -n %{basepkg} -f %{basepkg}.files\ -%defattr(-,root,root,-)\ %endif\ \ %ghc_package_devel\ @@ -141,9 +138,6 @@ This package provides the shared library.\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ -%global _use_internal_dependency_generator 0\ -%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ -%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %package -n %{basepkg}-devel\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ Group: Development/Libraries\ @@ -172,7 +166,6 @@ This package contains the development files.\ %ghc_pkg_recache\ \ %files -n %{basepkg}-devel -f %{basepkg}-devel.files\ -%defattr(-,root,root,-)\ %{nil} # ghc_strip_dynlinked @@ -206,6 +199,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_install [name] [version] %ghc_lib_install()\ +%global _use_internal_dependency_generator 0\ +%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ +%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %{?1:cd %1-%2}\ %cabal_install\ %cabal_pkg_conf\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2814547..fa78bb9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.7 +Version: 0.13.8 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,11 @@ EOF %changelog +* Fri Jul 1 2011 Jens Petersen - 0.13.8-1 +- drop redundant defattr from filelists +- move dependency generator setup from ghc_package_devel to ghc_lib_install + in line with ghc_bin_install + * Mon Jun 27 2011 Jens Petersen - 0.13.7-1 - add requires for redhat-rpm-config for ghc_arches - drop ghc_bootstrapping from ghc_bootstrap: doesn't work for koji From dfb8f0169dcf91503c7d88f146369cfe455794b4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 3 Aug 2011 17:14:24 +0900 Subject: [PATCH 081/514] drop without_testsuite from ghc_bootstrap since it breaks koji --- ghc-rpm-macros.ghc | 3 +-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 594adda..24d2b58 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -217,5 +217,4 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global ghc_without_dynamic 1\ %global without_prof 1\ %global without_haddock 1\ -%global without_manual 1\ -%global without_testsuite 1 +%global without_manual 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fa78bb9..12fbaed 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.8 +Version: 0.13.9 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Wed Aug 3 2011 Jens Petersen - 0.13.9-1 +- drop without_testsuite from ghc_bootstrap since it breaks koji + * Fri Jul 1 2011 Jens Petersen - 0.13.8-1 - drop redundant defattr from filelists - move dependency generator setup from ghc_package_devel to ghc_lib_install From 5995766e809b0585505d3f8930582e18ba9228fc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 13 Sep 2011 10:14:17 +0900 Subject: [PATCH 082/514] don't use ghc-deps.sh when ghc_bootstrapping; add %ghc_test config --- ghc-rpm-macros.ghc | 11 +++++++++++ ghc-rpm-macros.spec | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 24d2b58..d22274c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -192,16 +192,20 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # install bin package %ghc_bin_install\ +%if %{undefined ghc_bootstrapping}\ %global _use_internal_dependency_generator 0\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ +%endif\ %cabal_install\ %ghc_strip_dynlinked # ghc_lib_install [name] [version] %ghc_lib_install()\ +%if %{undefined ghc_bootstrapping}\ %global _use_internal_dependency_generator 0\ %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ +%endif\ %{?1:cd %1-%2}\ %cabal_install\ %cabal_pkg_conf\ @@ -218,3 +222,10 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 + +# skip prof libs, and documentation +# - without_hscolour needs to be set locally in the spec file +%ghc_test\ +%global without_prof 1\ +%global without_haddock 1\ +%global without_manual 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 12fbaed..db20c5b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.9 +Version: 0.13.10 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,10 @@ EOF %changelog +* Tue Sep 13 2011 Jens Petersen - 0.13.10-1 +- do not setup ghc-deps.sh when ghc_bootstrapping +- add ghc_test build config + * Wed Aug 3 2011 Jens Petersen - 0.13.9-1 - drop without_testsuite from ghc_bootstrap since it breaks koji From fb1984734b0347ea4b72aee0068da4c737de85d4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 30 Sep 2011 10:43:58 +0900 Subject: [PATCH 083/514] fix devel subpackage's prof and doc obsoletes and provides versions --- ghc-rpm-macros.ghc | 8 ++++---- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index d22274c..24e5c12 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -149,10 +149,10 @@ Group: Development/Libraries\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ -Obsoletes: %{basepkg}-doc < %{version}-%{release}\ -Provides: %{basepkg}-doc = %{version}-%{release}\ -Obsoletes: %{basepkg}-prof < %{version}-%{release}\ -Provides: %{basepkg}-prof = %{version}-%{release}\ +Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ +Provides: %{basepkg}-doc = %{pkgver}-%{release}\ +Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ +Provides: %{basepkg}-prof = %{pkgver}-%{release}\ \ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index db20c5b..ff1ab37 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.10 +Version: 0.13.11 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,10 @@ EOF %changelog +* Fri Sep 30 2011 Jens Petersen - 0.13.11-1 +- fix devel subpackage's prof and doc obsoletes and provides versions + for multiple lib packages like ghc (reported by Henrik Nordström) + * Tue Sep 13 2011 Jens Petersen - 0.13.10-1 - do not setup ghc-deps.sh when ghc_bootstrapping - add ghc_test build config From bd7f38e058e8a38d61862e236e67885dc35971b3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 15 Oct 2011 13:01:58 +0900 Subject: [PATCH 084/514] add ghc_exclude_docdir to exclude docdir from filelists --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 24e5c12..970c6eb 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -48,12 +48,12 @@ echo "%dir %{pkgdir}" >> %{basepkg}.files\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ %endif\ -%if 0%{!?1:1}\ +%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ fi\ %endif\ -%if 0%{?1:1}\ +%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ fi\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ff1ab37..08e9daf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.11 +Version: 0.13.12 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Sat Oct 15 2011 Jens Petersen - 0.13.12-1 +- add ghc_exclude_docdir to exclude docdir from filelists + * Fri Sep 30 2011 Jens Petersen - 0.13.11-1 - fix devel subpackage's prof and doc obsoletes and provides versions for multiple lib packages like ghc (reported by Henrik Nordström) From 0b163b3d06efaa7cf43b74777a3edd315a7c96f9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 18 Oct 2011 17:43:47 +0900 Subject: [PATCH 085/514] add ghc_bootstrapping to ghc_bootstrap; fix ghc-deps.sh when bootstrapping --- ghc-deps.sh | 13 ++++++++++--- ghc-rpm-macros.ghc | 4 +++- ghc-rpm-macros.spec | 6 +++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 0ad905b..add9b9f 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -11,6 +11,13 @@ MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d +GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) + +if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" +else + GHC_PKG=/usr/bin/ghc-pkg +fi case $MODE in --provides) FIELD=id ;; @@ -45,7 +52,7 @@ for i in $files; do esac if [ "$META" ]; then PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") - HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") + HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") for i in $HASHS; do case $i in *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;; @@ -53,7 +60,7 @@ for i in $files; do esac done if [ "$MODE" = "--requires" -a "$SELF" ]; then - HASHS=$(ghc-pkg -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") + HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") for i in $HASHS; do echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" done @@ -64,7 +71,7 @@ for i in $files; do if file $i | grep -q 'executable, .* dynamically linked'; then BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") for p in ${BIN_DEPS}; do - HASH=$(ghc-pkg --global field $p id | sed -e "s/^id: \+//") + HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//") echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/" done fi diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 970c6eb..98cda6c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -221,7 +221,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global ghc_without_dynamic 1\ %global without_prof 1\ %global without_haddock 1\ -%global without_manual 1 +%global without_manual 1\ +# needs to be set also in ghc.spec\ +%global ghc_bootstrapping 1 # skip prof libs, and documentation # - without_hscolour needs to be set locally in the spec file diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 08e9daf..457a63a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.12 +Version: 0.13.13 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,10 @@ EOF %changelog +* Mon Oct 17 2011 Jens Petersen - 0.13.13-1 +- add ghc_bootstrapping to ghc_bootstrap for packages other than ghc +- make ghc-deps.sh also work when bootstrapping a new ghc version + * Sat Oct 15 2011 Jens Petersen - 0.13.12-1 - add ghc_exclude_docdir to exclude docdir from filelists From 7229f10396a5392b03dd778304b59adfc4c72e48 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 1 Nov 2011 21:18:49 +0900 Subject: [PATCH 086/514] replace devel ghc requires with ghc-compiler --- ghc-rpm-macros.ghc | 6 +++--- ghc-rpm-macros.spec | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 98cda6c..0ecb69c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -84,9 +84,9 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %{nil} # devel pkg basic requires -%ghc_devel_requires Requires: ghc = %{ghc_version}\ -Requires(post): ghc = %{ghc_version}\ -Requires(postun): ghc = %{ghc_version}\ +%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ +Requires(post): ghc-compiler = %{ghc_version}\ +Requires(postun): ghc-compiler = %{ghc_version}\ %if %{undefined ghc_without_shared}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 457a63a..0279b3a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.13.13 +Version: 0.14 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -53,13 +53,15 @@ EOF %files -%defattr(-,root,root,-) %doc COPYING AUTHORS %config(noreplace) %{macros_file} %{_prefix}/lib/rpm/ghc-deps.sh %changelog +* Tue Nov 1 2011 Jens Petersen - 0.14-1 +- replace devel ghc requires with ghc-compiler + * Mon Oct 17 2011 Jens Petersen - 0.13.13-1 - add ghc_bootstrapping to ghc_bootstrap for packages other than ghc - make ghc-deps.sh also work when bootstrapping a new ghc version From fb65ca3a005dbf9580b59ebf10c549caa3a9ae32 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 1 Nov 2011 21:24:30 +0900 Subject: [PATCH 087/514] also disable testsuite in ghc_bootstrap --- ghc-rpm-macros.ghc | 1 + ghc-rpm-macros.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 0ecb69c..980a996 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -222,6 +222,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1\ +%global without_testsuite 1\ # needs to be set also in ghc.spec\ %global ghc_bootstrapping 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0279b3a..0805cfa 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -61,6 +61,7 @@ EOF %changelog * Tue Nov 1 2011 Jens Petersen - 0.14-1 - replace devel ghc requires with ghc-compiler +- disable testsuite in ghc_bootstrap * Mon Oct 17 2011 Jens Petersen - 0.13.13-1 - add ghc_bootstrapping to ghc_bootstrap for packages other than ghc From b1204c472c8a5f3543d05b190d82a615b796ec06 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 12 Nov 2011 21:59:12 +0900 Subject: [PATCH 088/514] fix double listing of docdir in base lib package --- ghc-rpm-macros.ghc | 5 +---- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 980a996..2d6acbd 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -51,10 +51,7 @@ fi\ %if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -fi\ -%endif\ -%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ -if [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ +elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ fi\ %endif\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0805cfa..d951b61 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.14 +Version: 0.14.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,9 @@ EOF %changelog +* Sat Nov 12 2011 Jens Petersen - 0.14.1-1 +- fix double listing of docdir in base lib package + * Tue Nov 1 2011 Jens Petersen - 0.14-1 - replace devel ghc requires with ghc-compiler - disable testsuite in ghc_bootstrap From ebf81c011357c8d1bfbbabe7a7011f7027fd3fdf Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 17 Nov 2011 11:07:00 +0900 Subject: [PATCH 089/514] .gitignore: ignore local ghc-rpm-macros-*/ dirs --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e69de29..cfda0b0 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ghc-rpm-macros-*/ From d32b4577e834f8712be25c46b475d6c066fd5c99 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 17 Nov 2011 14:36:50 +0900 Subject: [PATCH 090/514] test for HsColour directly in "cabal haddock" instead of using without_haddock --- ghc-rpm-macros.ghc | 4 +++- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2d6acbd..f13bc63 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -183,7 +183,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{?1:cd %1-%2}\ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ -%{!?without_haddock:%cabal haddock %{!?without_hscolour:--hyperlink-source}}\ +%if %{undefined without_haddock}\ +%cabal haddock $(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)\ +%endif\ %{?1:cd -}\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d951b61..0220290 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.14.1 +Version: 0.14.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,10 @@ EOF %changelog +* Thu Nov 17 2011 Jens Petersen - 0.14.2-1 +- test for HsColour directly when running "cabal haddock" instead of + checking for without_haddock + * Sat Nov 12 2011 Jens Petersen - 0.14.1-1 - fix double listing of docdir in base lib package From 72e5db37b55a972d0e06f4e682fbe8b19ade3281 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 Dec 2011 22:20:12 +0900 Subject: [PATCH 091/514] use ghc system config when compiling Setup; don't setup hscolour if without_hscolour --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index f13bc63..6fff5ed 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\ +%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\ ./Setup # check ghc version was rebuilt against self @@ -184,7 +184,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ %if %{undefined without_haddock}\ -%cabal haddock $(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)\ +%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\ %endif\ %{?1:cd -}\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0220290..ee7c75e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.14.2 +Version: 0.14.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,9 +59,13 @@ EOF %changelog +* Fri Dec 2 2011 Jens Petersen - 0.14.3-1 +- do not use ghc user config by default when compiling Setup +- do not setup hscolour if without_hscolour defined + * Thu Nov 17 2011 Jens Petersen - 0.14.2-1 - test for HsColour directly when running "cabal haddock" instead of - checking for without_haddock + check hscolour is available (reported by Giam Teck Choon, #753833) * Sat Nov 12 2011 Jens Petersen - 0.14.1-1 - fix double listing of docdir in base lib package From 683aba9d80baa738c0eb0ec844ef5376c86e2d53 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Dec 2011 09:57:08 +0900 Subject: [PATCH 092/514] new ghc_files wrapper macro which takes base doc files as args - uses new ghc_shared_files and ghc_devel_files macros --- ghc-rpm-macros.ghc | 31 +++++++++++++++++++++++++------ ghc-rpm-macros.spec | 6 +++++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 6fff5ed..f780674 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -88,15 +88,18 @@ Requires(postun): ghc-compiler = %{ghc_version}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif +%ghc_shared_files\ +%if %{undefined ghc_without_shared}\ +%files -n %{basepkg} -f %{basepkg}.files\ +%{?base_doc_files:%doc %base_doc_files}\ +%endif\ +%{nil} + # ghc_lib_package [-c cdepslist] [-h pkgdepslist] %ghc_lib_package(c:h:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ -%if %{undefined ghc_without_shared}\ -%files -n %{basepkg} -f %{basepkg}.files\ -%endif\ +%ghc_shared_files\ \ %ghc_package_devel\ %{nil} @@ -129,6 +132,22 @@ This package provides the shared library.\ # (deprecated) for docs post and postun %ghc_reindex_haddock : +%ghc_devel_files\ +%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ +%if %{defined ghc_without_shared}\ +%{?base_doc_files:%doc %base_doc_files}\ +%endif\ +%{?devel_doc_files:%doc %devel_doc_files}\ +%{nil} + +%ghc_files()\ +%{?1:%define base_doc_files %*}\ +%define basepkg ghc-%{pkg_name}\ +%ghc_shared_files\ +\ +%ghc_devel_files\ +%{nil} + # ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] %ghc_package_devel(c:h:l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -162,7 +181,7 @@ This package contains the development files.\ %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ \ -%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ +%ghc_devel_files\ %{nil} # ghc_strip_dynlinked diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ee7c75e..76e36a1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.14.3 +Version: 0.14.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,10 @@ EOF %changelog +* Thu Dec 15 2011 Jens Petersen - 0.14.4-1 +- new ghc_files wrapper macro for files which takes base doc files as args + and uses new ghc_shared_files and ghc_devel_files macros + * Fri Dec 2 2011 Jens Petersen - 0.14.3-1 - do not use ghc user config by default when compiling Setup - do not setup hscolour if without_hscolour defined From e8e6da4176c2460071f0fad656c13f8a55066249 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Dec 2011 15:06:50 +0900 Subject: [PATCH 093/514] when building for non-shared archs move installed docfiles to devel docdir --- ghc-rpm-macros.ghc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index f780674..80def68 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -55,6 +55,13 @@ elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ fi\ %endif\ +%if 0%{!?1:1} && %{defined ghc_without_shared}\ +if [ "%{name}" = "ghc-%{pkg_name}" ]; then\ + if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ + mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\ + fi\ +fi\ +%endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ From 227b33e94e7bcae1fd578b94be7a02d8adb874ce Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Dec 2011 15:08:53 +0900 Subject: [PATCH 094/514] bump to 0.15 --- ghc-rpm-macros.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 76e36a1..9cd34b1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.14.4 +Version: 0.15 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,9 +59,10 @@ EOF %changelog -* Thu Dec 15 2011 Jens Petersen - 0.14.4-1 +* Thu Dec 15 2011 Jens Petersen - 0.15-1 - new ghc_files wrapper macro for files which takes base doc files as args and uses new ghc_shared_files and ghc_devel_files macros +- when building for non-shared archs move installed docfiles to devel docdir * Fri Dec 2 2011 Jens Petersen - 0.14.3-1 - do not use ghc user config by default when compiling Setup From 19872dc6fe297e13449fe9b4d8b63a515b8f8366 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Dec 2011 23:50:55 +0900 Subject: [PATCH 095/514] add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description --- ghc-rpm-macros.ghc | 48 +++++++++++++++++++++++++++++++++------------ ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 41 insertions(+), 14 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 80def68..e1ae941 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -111,25 +111,38 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %ghc_package_devel\ %{nil} -# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] -%ghc_binlib_package(c:h:l:x)\ +# ghc_package [-l licensetag] [name] [version] +%ghc_package(l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ Group: System Environment/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ -\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} + +# ghc_description [name] [version] +%ghc_description\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ %description -n %{basepkg}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ %if %{defined ghc_version} && %{undefined ghc_without_shared}\ This package provides the shared library.\ -%endif\ +%endif + +# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] +%ghc_binlib_package(c:h:l:x)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_package\ +\ +%ghc_description\ \ %ghc_lib_package\ %{nil} @@ -155,11 +168,10 @@ This package provides the shared library.\ %ghc_devel_files\ %{nil} -# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] -%ghc_package_devel(c:h:l:)\ +# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_devel_package(c:h:l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}-devel\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ @@ -176,11 +188,23 @@ Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ -\ + +# ghc_devel_description +%ghc_devel_description\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ %description -n %{basepkg}-devel\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ -This package contains the development files.\ +This package contains the development files. + +# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_package_devel(c:h:l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_devel_package\ +\ +%ghc_devel_description\ \ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9cd34b1..37f5916 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15 +Version: 0.15.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,7 +59,10 @@ EOF %changelog -* Thu Dec 15 2011 Jens Petersen - 0.15-1 +* Tue Dec 27 2011 Jens Petersen - 0.15.1-1 +- add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description + +* Tue Dec 27 2011 Jens Petersen - 0.15-1 - new ghc_files wrapper macro for files which takes base doc files as args and uses new ghc_shared_files and ghc_devel_files macros - when building for non-shared archs move installed docfiles to devel docdir From 2089fc7bf14a541c8ccdf6479b23acab1b9dfd9f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 28 Dec 2011 12:05:32 +0900 Subject: [PATCH 096/514] add ghc_devel_post_postun to help koji --- ghc-rpm-macros.ghc | 16 +++++++++++----- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e1ae941..40c43f0 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -198,6 +198,16 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ \ This package contains the development files. +# ghc_devel_post_postun +%ghc_devel_post_postun\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%post -n %{basepkg}-devel\ +%ghc_pkg_recache\ +\ +%postun -n %{basepkg}-devel\ +%ghc_pkg_recache + # ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] %ghc_package_devel(c:h:l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -206,11 +216,7 @@ This package contains the development files. \ %ghc_devel_description\ \ -%post -n %{basepkg}-devel\ -%ghc_pkg_recache\ -\ -%postun -n %{basepkg}-devel\ -%ghc_pkg_recache\ +%ghc_devel_post_postun\ \ %ghc_devel_files\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 37f5916..33de798 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.1 +Version: 0.15.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,9 @@ EOF %changelog +* Wed Dec 28 2011 Jens Petersen - 0.15.2-1 +- add ghc_devel_post_postun to help koji/mock with new macros + * Tue Dec 27 2011 Jens Petersen - 0.15.1-1 - add ghc_package, ghc_description, ghc_devel_package, ghc_devel_description From fe1a0f23eeaa1b099c5dc8f141721ce01e325466 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 6 Jan 2012 22:56:31 +0900 Subject: [PATCH 097/514] ghc_add_basepkg_file adds path to base lib package filelist --- ghc-rpm-macros.ghc | 4 ++++ ghc-rpm-macros.spec | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 40c43f0..0915eec 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -73,6 +73,10 @@ fi\ sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\ %{nil} +%ghc_add_basepkg_file()\ +%define basepkg ghc-%{pkg_name}\ +echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files + # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 33de798..fc37111 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.2 +Version: 0.15.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,9 @@ EOF %changelog +* Fri Jan 6 2012 Jens Petersen - 0.15.3-1 +- new ghc_add_basepkg_file to add a path to base lib package + * Wed Dec 28 2011 Jens Petersen - 0.15.2-1 - add ghc_devel_post_postun to help koji/mock with new macros From 488948b8d79701bd682daf7298d7374792928e2a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 6 Jan 2012 22:57:28 +0900 Subject: [PATCH 098/514] clarify changelog to mention filelist --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fc37111..4b57e29 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -60,7 +60,7 @@ EOF %changelog * Fri Jan 6 2012 Jens Petersen - 0.15.3-1 -- new ghc_add_basepkg_file to add a path to base lib package +- new ghc_add_basepkg_file to add a path to base lib package filelist * Wed Dec 28 2011 Jens Petersen - 0.15.2-1 - add ghc_devel_post_postun to help koji/mock with new macros From ab41e2f6c8b5aa514d34306a5fc08832aa3bb578 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 19 Jan 2012 18:33:08 +0900 Subject: [PATCH 099/514] allow dynamic linking of Setup with ghc_without_shared set --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 0915eec..e620a83 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_shared:%{!?ghc_without_dynamic:-dynamic}} Setup\ +%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\ ./Setup # check ghc version was rebuilt against self diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4b57e29..303e00a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.3 +Version: 0.15.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,9 @@ EOF %changelog +* Thu Jan 19 2012 Jens Petersen - 0.15.4-1 +- allow dynamic linking of Setup with ghc_without_shared set + * Fri Jan 6 2012 Jens Petersen - 0.15.3-1 - new ghc_add_basepkg_file to add a path to base lib package filelist From 8cf968c984749f89939dffe9c3797af1aad3a25e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 23 Feb 2012 18:10:50 +0900 Subject: [PATCH 100/514] fix handling of devel docdir for non-shared builds - simplify ghc_bootstrap --- ghc-rpm-macros.ghc | 37 ++++++++++++++++++------------------- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e620a83..85f3afc 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -48,20 +48,23 @@ echo "%dir %{pkgdir}" >> %{basepkg}.files\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ %endif\ -%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ -if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ - echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ - echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -fi\ -%endif\ %if 0%{!?1:1} && %{defined ghc_without_shared}\ if [ "%{name}" = "ghc-%{pkg_name}" ]; then\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\ +%if %{undefined ghc_exclude_docdir}\ + echo "%{_docdir}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\ +%endif\ fi\ fi\ %endif\ +%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ +if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ + echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ +elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ + echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ +fi\ +%endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ @@ -273,21 +276,17 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?1:%ghc_strip_dynlinked}\ %{nil} -# skip shared and prof libs, documentation, and testsuite -# - without_hscolour needs to be set locally in the spec file -%ghc_bootstrap\ -%global ghc_without_shared 1\ -%global ghc_without_dynamic 1\ -%global without_prof 1\ -%global without_haddock 1\ -%global without_manual 1\ -%global without_testsuite 1\ -# needs to be set also in ghc.spec\ -%global ghc_bootstrapping 1 +# - without_hscolour, without_testsuite, and ghc_bootstrapping +# need to be set locally in the spec file # skip prof libs, and documentation -# - without_hscolour needs to be set locally in the spec file %ghc_test\ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 + +# skip shared and prof libs, documentation, and testsuite +%ghc_bootstrap\ +%global ghc_without_shared 1\ +%global ghc_without_dynamic 1\ +%ghc_test diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 303e00a..bccb4c6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.4 +Version: 0.15.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -59,6 +59,10 @@ EOF %changelog +* Thu Feb 23 2012 Jens Petersen - 0.15.5-1 +- fix handling of devel docdir for non-shared builds +- simplify ghc_bootstrap + * Thu Jan 19 2012 Jens Petersen - 0.15.4-1 - allow dynamic linking of Setup with ghc_without_shared set From 7ffdbdc6d5f18256c446bfcd35dddc511ae04a1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 21 Mar 2012 17:41:59 +0900 Subject: [PATCH 101/514] change of rpm metadata hash format for new ghc-7.4 - drop prof meta hash data - no longer include doc files automatically by default - no longer provide doc subpackage - do not provide prof when without_prof set --- ghc-deps.sh | 7 +++---- ghc-rpm-macros.ghc | 5 ++++- ghc-rpm-macros.spec | 12 ++++++++++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index add9b9f..8685929 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -43,7 +43,6 @@ for i in $files; do SELF="" case $LIB_FILE in *.so) META=ghc ;; - *_p.a) META=ghc-prof SELF=ghc-devel ;; *.a) META=ghc-devel if [ "$SHARED" ]; then SELF=ghc @@ -55,14 +54,14 @@ for i in $files; do HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") for i in $HASHS; do case $i in - *-*) echo $i | sed -e "s/\(.*\)-\(.*\)/$META(\1) = \2/" ;; + *-*) echo "$META($i)" ;; *) ;; esac done if [ "$MODE" = "--requires" -a "$SELF" ]; then HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") for i in $HASHS; do - echo $i | sed -e "s/\(.*\)-\(.*\)/$SELF(\1) = \2/" + echo "$SELF($i)" done fi fi @@ -72,7 +71,7 @@ for i in $files; do BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") for p in ${BIN_DEPS}; do HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//") - echo $HASH | sed -e "s/\(.*\)-\(.*\)/ghc(\1) = \2/" + echo "ghc($HASH)" done fi fi diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 85f3afc..4b94a4e 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -192,9 +192,10 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ -Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ +%if %{undefined without_prof}\ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ +%endif # ghc_devel_description %ghc_devel_description\ @@ -290,3 +291,5 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global ghc_without_shared 1\ %global ghc_without_dynamic 1\ %ghc_test + +%ghc_exclude_docdir 1 diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index bccb4c6..b569e03 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.15.5 +Version: 0.90 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -13,7 +13,8 @@ URL: https://fedoraproject.org/wiki/Haskell_SIG # This is a Fedora maintained package which is specific to # our distribution. Thus the source is only available from -# within this srpm. +# within this srpm. But it could be moved to fedorahosted.org +# if other rpm distros want to use it. Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS @@ -59,6 +60,13 @@ EOF %changelog +* Mon Mar 19 2012 Jens Petersen - 0.90-1 +- use new rpm metadata hash format for ghc-7.4 +- drop prof meta hash data +- no longer include doc files automatically by default +- no longer provide doc subpackage +- do not provide prof when without_prof set + * Thu Feb 23 2012 Jens Petersen - 0.15.5-1 - fix handling of devel docdir for non-shared builds - simplify ghc_bootstrap From 6b6cf52f6de50212075bc9b15c61b5174c866eed Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 25 May 2012 22:10:06 +0900 Subject: [PATCH 102/514] don't build .o when no ghci; support meta-packages; optional common_summary and common_description - only build ghci .o library files on ghc_arches_with_ghci - support meta packages like haskell-platform without base lib files - make it possible not to have to use common_summary and common_description --- ghc-rpm-macros.ghc | 33 ++++++++++++++++++++------------- ghc-rpm-macros.spec | 7 ++++++- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 4b94a4e..ff5b0de 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,10 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} +%ifnarch %{ghc_arches_with_ghci}\ +%define disable_library_for_ghci --disable-library-for-ghci\ +%endif\ +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?disable_library_for_ghci} %{?cabal_configure_options} # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -73,7 +76,11 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -sed -i -e "s!%{buildroot}!!g" %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files\ +for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\ +if [ -f "$i" ];\ +sed -i -e "s!%{buildroot}!!g" $i\ +fi\ +done\ %{nil} %ghc_add_basepkg_file()\ @@ -124,7 +131,7 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %define pkgver %{?2}%{!?2:%{version}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ +%{?common_summary:Summary: %{common_summary}}\ Group: System Environment/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ @@ -135,10 +142,12 @@ Group: System Environment/Libraries\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ +%if %{defined common_description}\ +%{common_description}\ %if %{defined ghc_version} && %{undefined ghc_without_shared}\ This package provides the shared library.\ %endif +%endif # ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] %ghc_binlib_package(c:h:l:x)\ @@ -181,7 +190,7 @@ This package provides the shared library.\ %define pkgver %{?2}%{!?2:%{version}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}-devel\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ +%{?common_summary:Summary: %{common_summary} development files}\ Group: Development/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ @@ -202,9 +211,11 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}-devel\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ +%if %{defined common_description} +%{common_description}\ \ -This package contains the development files. +This package contains the development files.\ +%endif # ghc_devel_post_postun %ghc_devel_post_postun\ @@ -250,29 +261,25 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %if %{undefined without_haddock}\ %cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\ %endif\ -%{?1:cd -}\ +%{?1:cd ..}\ %{nil} # install bin package %ghc_bin_install\ -%if %{undefined ghc_bootstrapping}\ %global _use_internal_dependency_generator 0\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ -%endif\ %cabal_install\ %ghc_strip_dynlinked # ghc_lib_install [name] [version] %ghc_lib_install()\ -%if %{undefined ghc_bootstrapping}\ %global _use_internal_dependency_generator 0\ %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ -%endif\ %{?1:cd %1-%2}\ %cabal_install\ %cabal_pkg_conf\ -%{?1:cd -}\ +%{?1:cd ..}\ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b569e03..82d414f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.90 +Version: 0.91 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,11 @@ EOF %changelog +* Fri May 25 2012 Jens Petersen - 0.91-1 +- only build ghci .o library files on ghc_arches_with_ghci +- support meta packages like haskell-platform without base lib files +- make it possible not to have to use common_summary and common_description + * Mon Mar 19 2012 Jens Petersen - 0.90-1 - use new rpm metadata hash format for ghc-7.4 - drop prof meta hash data From 8f4190a52c22cee63335d2bb777438f015e488b5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 25 May 2012 23:52:09 +0900 Subject: [PATCH 103/514] rename ghc_binlib_package to ghc_lib_subpackage; fix new missing end of line backslashes --- ghc-rpm-macros.ghc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ff5b0de..fddf790 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -77,7 +77,7 @@ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\ -if [ -f "$i" ];\ +if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ fi\ done\ @@ -146,11 +146,11 @@ Group: System Environment/Libraries\ %{common_description}\ %if %{defined ghc_version} && %{undefined ghc_without_shared}\ This package provides the shared library.\ -%endif +%endif\ %endif -# ghc_binlib_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] -%ghc_binlib_package(c:h:l:x)\ +# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] +%ghc_lib_subpackage(c:h:l:x)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ @@ -211,7 +211,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}-devel\ -%if %{defined common_description} +%if %{defined common_description}\ %{common_description}\ \ This package contains the development files.\ From 89972ec7570a64bd627c955d66f1bd77fa647232 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 25 May 2012 23:58:01 +0900 Subject: [PATCH 104/514] add changelog about rename ghc_binlib_package to ghc_lib_subpackage --- ghc-rpm-macros.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 82d414f..68ec44a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -64,6 +64,7 @@ EOF - only build ghci .o library files on ghc_arches_with_ghci - support meta packages like haskell-platform without base lib files - make it possible not to have to use common_summary and common_description +- rename ghc_binlib_package to ghc_lib_subpackage * Mon Mar 19 2012 Jens Petersen - 0.90-1 - use new rpm metadata hash format for ghc-7.4 From 5abcaaca3341b3497b6e00bfc9ed95a6f307896f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 5 Jun 2012 11:40:54 +0900 Subject: [PATCH 105/514] add ghc_lib_build_without_haddock; no longer drop into subpackage dirs --- ghc-rpm-macros.ghc | 13 +++++++------ ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index fddf790..7ade6fb 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -252,16 +252,19 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %cabal_configure\ %cabal build -# ghc_lib_build [name] [version] -%ghc_lib_build()\ +# ghc_lib_build_without_haddock [name] [version] +%ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%{?1:cd %1-%2}\ %cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ %cabal build\ +%{nil} + +# ghc_lib_build [name] [version] +%ghc_lib_build()\ +%ghc_lib_build_without_haddock()\ %if %{undefined without_haddock}\ %cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\ %endif\ -%{?1:cd ..}\ %{nil} # install bin package @@ -276,10 +279,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global _use_internal_dependency_generator 0\ %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ -%{?1:cd %1-%2}\ %cabal_install\ %cabal_pkg_conf\ -%{?1:cd ..}\ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 68ec44a..080923f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -60,11 +60,14 @@ EOF %changelog -* Fri May 25 2012 Jens Petersen - 0.91-1 -- only build ghci .o library files on ghc_arches_with_ghci +* Tue Jun 5 2012 Jens Petersen - 0.91-1 +- only build ghci .o library files on ghc_arches_with_ghci - support meta packages like haskell-platform without base lib files - make it possible not to have to use common_summary and common_description - rename ghc_binlib_package to ghc_lib_subpackage +- add ghc_lib_build_without_haddock +- no longer drop into package dirs when subpackaging with ghc_lib_build and + ghc_lib_install * Mon Mar 19 2012 Jens Petersen - 0.90-1 - use new rpm metadata hash format for ghc-7.4 From 88a603f5373eba2cabcc32137d9e93cbd25ff0c7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 5 Jun 2012 19:16:29 +0900 Subject: [PATCH 106/514] disable generating ghci .o files by default; add variable cabal_configure_extra_options to cabal_configure --- ghc-rpm-macros.ghc | 7 ++----- ghc-rpm-macros.spec | 4 +++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 7ade6fb..07a2717 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,10 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%ifnarch %{ghc_arches_with_ghci}\ -%define disable_library_for_ghci --disable-library-for-ghci\ -%endif\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?disable_library_for_ghci} %{?cabal_configure_options} +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -261,7 +258,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build [name] [version] %ghc_lib_build()\ -%ghc_lib_build_without_haddock()\ +%ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ %cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\ %endif\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 080923f..88334d9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -61,13 +61,15 @@ EOF %changelog * Tue Jun 5 2012 Jens Petersen - 0.91-1 -- only build ghci .o library files on ghc_arches_with_ghci +- no longer build redundant ghci .o library files - support meta packages like haskell-platform without base lib files - make it possible not to have to use common_summary and common_description - rename ghc_binlib_package to ghc_lib_subpackage - add ghc_lib_build_without_haddock - no longer drop into package dirs when subpackaging with ghc_lib_build and ghc_lib_install +- add shell variable cabal_configure_extra_options to cabal_configure for + local configuration * Mon Mar 19 2012 Jens Petersen - 0.90-1 - use new rpm metadata hash format for ghc-7.4 From c6d9f1f431ef54ee321cd5ea9d876feb15353bc9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 Jun 2012 11:09:30 +0900 Subject: [PATCH 107/514] move --disable-library-for-ghci to %ghc_lib_build; revert recent common_summary and common_description changes - need the previous common_summary and common_description behaviour for ghc and haskell-platform subpackaging --- ghc-rpm-macros.ghc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 07a2717..c6ddb90 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_shared:--enable-shared} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -128,7 +128,7 @@ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver: %define pkgver %{?2}%{!?2:%{version}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ -%{?common_summary:Summary: %{common_summary}}\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ Group: System Environment/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ @@ -139,11 +139,9 @@ Group: System Environment/Libraries\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}\ -%if %{defined common_description}\ -%{common_description}\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ %if %{defined ghc_version} && %{undefined ghc_without_shared}\ This package provides the shared library.\ -%endif\ %endif # ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] @@ -187,7 +185,7 @@ This package provides the shared library.\ %define pkgver %{?2}%{!?2:%{version}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}-devel\ -%{?common_summary:Summary: %{common_summary} development files}\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ Group: Development/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ @@ -208,11 +206,9 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}-devel\ -%if %{defined common_description}\ -%{common_description}\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ \ -This package contains the development files.\ -%endif +This package contains the development files. # ghc_devel_post_postun %ghc_devel_post_postun\ @@ -252,7 +248,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\ %cabal build\ %{nil} From 64b3d676b2b13a17d8a546d7e07edde6d1d87197 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 Jun 2012 11:15:52 +0900 Subject: [PATCH 108/514] add changelog for previous commit: --disable-library-for-ghci and common_summary --- ghc-rpm-macros.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 88334d9..6a1e5bb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.91 +Version: 0.92 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,11 @@ EOF %changelog +* Thu Jun 7 2012 Jens Petersen - 0.92-1 +- move --disable-library-for-ghci to ghc_lib_build +- revert back to fallback behaviour for common_summary and common_description + since it is needed for ghc and haskell-platform subpackaging + * Tue Jun 5 2012 Jens Petersen - 0.91-1 - no longer build redundant ghci .o library files - support meta packages like haskell-platform without base lib files From 8fc16e2daa9f3fd1f693d57178bcc696520199fb Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 Jun 2012 15:00:29 +0900 Subject: [PATCH 109/514] without ghc_exclude_docdir include doc dir also for subpackages --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index c6ddb90..e568c40 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -48,7 +48,7 @@ echo "%dir %{pkgdir}" >> %{basepkg}.files\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ %endif\ -%if 0%{!?1:1} && %{defined ghc_without_shared}\ +%if %{defined ghc_without_shared}\ if [ "%{name}" = "ghc-%{pkg_name}" ]; then\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\ @@ -58,7 +58,7 @@ if [ "%{name}" = "ghc-%{pkg_name}" ]; then\ fi\ fi\ %endif\ -%if 0%{!?1:1} && %{undefined ghc_exclude_docdir}\ +%if %{undefined ghc_exclude_docdir}\ if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6a1e5bb..763ff4b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -64,6 +64,7 @@ EOF - move --disable-library-for-ghci to ghc_lib_build - revert back to fallback behaviour for common_summary and common_description since it is needed for ghc and haskell-platform subpackaging +- without ghc_exclude_docdir include doc dir also for subpackages * Tue Jun 5 2012 Jens Petersen - 0.91-1 - no longer build redundant ghci .o library files From bbc5f8f36407439ebe688050fd96e566bb24da81 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 Jun 2012 17:15:42 +0900 Subject: [PATCH 110/514] fix doc handling of subpackages for ghc_without_shared --- ghc-rpm-macros.ghc | 8 ++++---- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e568c40..579aa18 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -49,11 +49,11 @@ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> fi\ %endif\ %if %{defined ghc_without_shared}\ -if [ "%{name}" = "ghc-%{pkg_name}" ]; then\ - if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ - mv %{buildroot}%{_docdir}/%{name}-%{version} %{buildroot}%{_docdir}/%{name}-devel-%{version}\ +if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\ + if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\ + mv %{buildroot}%{_docdir}/%{basepkg}-%{pkgver} %{buildroot}%{_docdir}/%{basepkg}-devel-%{pkgver}\ %if %{undefined ghc_exclude_docdir}\ - echo "%{_docdir}/%{name}-devel-%{version}" >> %{basepkg}-devel.files\ + echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\ %endif\ fi\ fi\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 763ff4b..5f31356 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.92 +Version: 0.93 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Thu Jun 7 2012 Jens Petersen - 0.93-1 +- fix doc handling of subpackages for ghc_without_shared + * Thu Jun 7 2012 Jens Petersen - 0.92-1 - move --disable-library-for-ghci to ghc_lib_build - revert back to fallback behaviour for common_summary and common_description From fa247e69af110311fd0ed96706e04bd97512e77f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 Jun 2012 19:32:38 +0900 Subject: [PATCH 111/514] ghc_description, ghc_devel_description, ghc_devel_post_postun can take args --- ghc-rpm-macros.ghc | 6 +++--- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 579aa18..97abdf6 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -135,7 +135,7 @@ Group: System Environment/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} # ghc_description [name] [version] -%ghc_description\ +%ghc_description()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}\ @@ -202,7 +202,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ %endif # ghc_devel_description -%ghc_devel_description\ +%ghc_devel_description()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %description -n %{basepkg}-devel\ @@ -211,7 +211,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ This package contains the development files. # ghc_devel_post_postun -%ghc_devel_post_postun\ +%ghc_devel_post_postun()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %post -n %{basepkg}-devel\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5f31356..64db461 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.93 +Version: 0.94 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,10 @@ EOF %changelog +* Thu Jun 7 2012 Jens Petersen - 0.94-1 +- allow ghc_description, ghc_devel_description, ghc_devel_post_postun + to take args + * Thu Jun 7 2012 Jens Petersen - 0.93-1 - fix doc handling of subpackages for ghc_without_shared From dae8fa2606d5ae2baf6b3168506ffbe763b4e59d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 Jun 2012 20:14:06 +0900 Subject: [PATCH 112/514] let ghc_bin_install take an arg to disable implicit stripping for subpackages --- ghc-rpm-macros.ghc | 5 +++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 97abdf6..d5f45ed 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -261,11 +261,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{nil} # install bin package -%ghc_bin_install\ +%ghc_bin_install()\ %global _use_internal_dependency_generator 0\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ -%ghc_strip_dynlinked +%{!?1:%ghc_strip_dynlinked}\ +%{nil} # ghc_lib_install [name] [version] %ghc_lib_install()\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 64db461..06c9bb9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.94 +Version: 0.95 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Thu Jun 7 2012 Jens Petersen - 0.95-1 +- let ghc_bin_install take an arg to disable implicit stripping for subpackages + * Thu Jun 7 2012 Jens Petersen - 0.94-1 - allow ghc_description, ghc_devel_description, ghc_devel_post_postun to take args From c013051271906b7509a93118e8dc5ec9ffb0eacd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 Jun 2012 11:53:40 +0900 Subject: [PATCH 113/514] add a meta-package option to ghc_devel_package and use in ghc_devel_requires --- ghc-rpm-macros.ghc | 7 ++++--- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index d5f45ed..13879bf 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -102,7 +102,7 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ Requires(post): ghc-compiler = %{ghc_version}\ Requires(postun): ghc-compiler = %{ghc_version}\ -%if %{undefined ghc_without_shared}\ +%if %{undefined ghc_without_shared} && 0%{!?-m:1}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif @@ -179,8 +179,9 @@ This package provides the shared library.\ %ghc_devel_files\ %{nil} -# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] -%ghc_devel_package(c:h:l:)\ +# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version] +# -m : meta-package +%ghc_devel_package(c:h:l:m)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define basepkg ghc-%{pkgname}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 06c9bb9..f23cdd3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95 +Version: 0.95.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Fri Jun 8 2012 Jens Petersen - 0.95.1-1 +- add a meta-package option to ghc_devel_package and use in ghc_devel_requires + * Thu Jun 7 2012 Jens Petersen - 0.95-1 - let ghc_bin_install take an arg to disable implicit stripping for subpackages From 1b8536abf13ff2b6293aa96f08c5cf3c765c72ee Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 Jun 2012 14:00:43 +0900 Subject: [PATCH 114/514] ghc-deps.sh: look in buildroot package.conf.d for program deps --- ghc-deps.sh | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 8685929..a57aceb 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -16,7 +16,7 @@ GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" else - GHC_PKG=/usr/bin/ghc-pkg + GHC_PKG="/usr/bin/ghc-pkg" fi case $MODE in @@ -70,7 +70,7 @@ for i in $files; do if file $i | grep -q 'executable, .* dynamically linked'; then BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") for p in ${BIN_DEPS}; do - HASH=$(${GHC_PKG} --global field $p id | sed -e "s/^id: \+//") + HASH=$(${GHC_PKG} --global --package-conf=$PKGCONFDIR field $p id | sed -e "s/^id: \+//") echo "ghc($HASH)" done fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f23cdd3..341ad61 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.1 +Version: 0.95.2 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Fri Jun 8 2012 Jens Petersen - 0.95.2-1 +- ghc-deps.sh: look in buildroot package.conf.d for program deps + * Fri Jun 8 2012 Jens Petersen - 0.95.1-1 - add a meta-package option to ghc_devel_package and use in ghc_devel_requires From 8e22621418e086b4a697b0bc04268b1750775a3d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 9 Jun 2012 22:00:32 +0900 Subject: [PATCH 115/514] ghc-dep.sh: only use buildroot package.conf.d if it exists --- ghc-deps.sh | 5 ++++- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index a57aceb..69a2d51 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -69,8 +69,11 @@ for i in $files; do elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") + if [ -d "$PKGCONFDIR" ]; then + PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" + fi for p in ${BIN_DEPS}; do - HASH=$(${GHC_PKG} --global --package-conf=$PKGCONFDIR field $p id | sed -e "s/^id: \+//") + HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//") echo "ghc($HASH)" done fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 341ad61..862b6d5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.2 +Version: 0.95.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Sat Jun 9 2012 Jens Petersen - 0.95.3-1 +- ghc-dep.sh: only use buildroot package.conf.d if it exists + * Fri Jun 8 2012 Jens Petersen - 0.95.2-1 - ghc-deps.sh: look in buildroot package.conf.d for program deps From 8a8de3a39a77c0c5af03592f82b937a96d01b4b9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jun 2012 12:49:41 +0900 Subject: [PATCH 116/514] new cabal_tweak_dep_ver macro for tweaking versions of depends %cabal_tweak_dep_ver dep old new [backup] changes old version bound to new for dep with optional backup suffix eg %cabal_tweak_dep_ver haskell-src-exts 1.12 1.14 2 --- ghc-rpm-macros.ghc | 8 ++++++++ ghc-rpm-macros.spec | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 13879bf..ff555d9 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -18,6 +18,14 @@ proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ %endif\ fi +# tweak depends versions +# cabal_tweak_dep_ver dep old new [backup] +%cabal_tweak_dep_ver()\ +if ! grep -q "%1[ >=].*%2"; then\ + exit 1\ +fi\ +sed -i.%{?3}%{!?3:%1} -e "s/\(%1[ >=].*\)%2/\1%3/g" %{pkg_name}-%{version}/%{pkg_name}.cabal + # configure %cabal_configure\ %ghc_check_bootstrap\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 862b6d5..82a7a62 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.3 +Version: 0.95.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -60,6 +60,9 @@ EOF %changelog +* Fri Jun 22 2012 Jens Petersen - 0.95.4-1 +- add cabal_tweak_dep_ver macro to tweak a depend's version bound in .cabal + * Sat Jun 9 2012 Jens Petersen - 0.95.3-1 - ghc-dep.sh: only use buildroot package.conf.d if it exists From bab627bc22ff6fb67ff4b862d7e947e0ca90e549 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jun 2012 12:51:04 +0900 Subject: [PATCH 117/514] cabal_tweak_dep_ver: use backup arg as extra suffix prefix --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ff555d9..0e94ec6 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -24,7 +24,7 @@ fi if ! grep -q "%1[ >=].*%2"; then\ exit 1\ fi\ -sed -i.%{?3}%{!?3:%1} -e "s/\(%1[ >=].*\)%2/\1%3/g" %{pkg_name}-%{version}/%{pkg_name}.cabal +sed -i.%{?3}%1 -e "s/\(%1[ >=].*\)%2/\1%3/g" %{pkg_name}-%{version}/%{pkg_name}.cabal # configure %cabal_configure\ From 7cdea6ff7e7f816c2f3f149e71a3e73365287fe3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jun 2012 13:46:59 +0900 Subject: [PATCH 118/514] replace %cabal_tweak_dep_ver with cabal-tweak-dep-ver script rpmbuild doesn't handle spaces in quoted args --- cabal-tweak-dep-ver | 22 ++++++++++++++++++++++ ghc-rpm-macros.ghc | 8 -------- ghc-rpm-macros.spec | 6 +++++- 3 files changed, 27 insertions(+), 9 deletions(-) create mode 100755 cabal-tweak-dep-ver diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver new file mode 100755 index 0000000..b637eed --- /dev/null +++ b/cabal-tweak-dep-ver @@ -0,0 +1,22 @@ +#!/bin/sh + +USAGE="Usage: $0 dep old new" + +if [ $# -ne 3 ]; then + echo "$USAGE" + exit 1 +fi + +CABALFILE=*.cabal + +if [ $(ls $CABALFILE | wc -l) -ne 1 ]; then + echo "There needs to be one .cabal file in the current dir!" + exit 1 +fi + +if ! grep -q "$1.*$2" $CABALFILE; then + echo "$CABALFILE does not match: $1 $2" + exit 1 +fi + +sed -i.$1 -e "s/\($1.*\)$2/\1$3/g" $CABALFILE diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 0e94ec6..13879bf 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -18,14 +18,6 @@ proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ %endif\ fi -# tweak depends versions -# cabal_tweak_dep_ver dep old new [backup] -%cabal_tweak_dep_ver()\ -if ! grep -q "%1[ >=].*%2"; then\ - exit 1\ -fi\ -sed -i.%{?3}%1 -e "s/\(%1[ >=].*\)%2/\1%3/g" %{pkg_name}-%{version}/%{pkg_name}.cabal - # configure %cabal_configure\ %ghc_check_bootstrap\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 82a7a62..c5ac739 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -19,6 +19,7 @@ Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS Source3: ghc-deps.sh +Source4: cabal-tweak-dep-ver Requires: redhat-rpm-config %description @@ -41,6 +42,8 @@ install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh +install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver + # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs %ifnarch %{ix86} x86_64 @@ -57,11 +60,12 @@ EOF %doc COPYING AUTHORS %config(noreplace) %{macros_file} %{_prefix}/lib/rpm/ghc-deps.sh +%{_bindir}/cabal-tweak-dep-ver %changelog * Fri Jun 22 2012 Jens Petersen - 0.95.4-1 -- add cabal_tweak_dep_ver macro to tweak a depend's version bound in .cabal +- new cabal-tweak-dep-ver script to tweak depends version bounds in .cabal * Sat Jun 9 2012 Jens Petersen - 0.95.3-1 - ghc-dep.sh: only use buildroot package.conf.d if it exists From 1cb0fba5fbdfb893b4755df20d4bc0ada539b70c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jun 2012 14:47:51 +0900 Subject: [PATCH 119/514] cabal-tweak-dep-ver: quote wildcards in match string and show file name when no match --- cabal-tweak-dep-ver | 16 +++++++++++----- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver index b637eed..2033160 100755 --- a/cabal-tweak-dep-ver +++ b/cabal-tweak-dep-ver @@ -1,5 +1,7 @@ #!/bin/sh +set -e +x + USAGE="Usage: $0 dep old new" if [ $# -ne 3 ]; then @@ -7,16 +9,20 @@ if [ $# -ne 3 ]; then exit 1 fi -CABALFILE=*.cabal +DEP=$1 +OLD=$(echo $2 | sed -e "s/*/\\\\*/g" -e "s/\./\\\\./g") +NEW=$3 + +CABALFILE=$(ls *.cabal) -if [ $(ls $CABALFILE | wc -l) -ne 1 ]; then +if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then echo "There needs to be one .cabal file in the current dir!" exit 1 fi -if ! grep -q "$1.*$2" $CABALFILE; then - echo "$CABALFILE does not match: $1 $2" +if ! grep -q "$DEP.*$OLD" $CABALFILE; then + echo "$CABALFILE does not match: $DEP $OLD" exit 1 fi -sed -i.$1 -e "s/\($1.*\)$2/\1$3/g" $CABALFILE +sed -i.$1 -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c5ac739..138596a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.4 +Version: 0.95.4.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -64,6 +64,10 @@ EOF %changelog +* Fri Jun 22 2012 Jens Petersen - 0.95.4.1-1 +- cabal-tweak-dep-ver: show file name when no match +- cabal-tweak-dep-ver: backslash quote . and * in the match string + * Fri Jun 22 2012 Jens Petersen - 0.95.4-1 - new cabal-tweak-dep-ver script to tweak depends version bounds in .cabal From 59008edb140880f59a929a6f650cd5ad658a51ba Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jun 2012 15:21:43 +0900 Subject: [PATCH 120/514] cabal-tweak-dep-ver: make a backup file the first time --- cabal-tweak-dep-ver | 6 +++++- ghc-rpm-macros.spec | 10 ++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver index 2033160..137c944 100755 --- a/cabal-tweak-dep-ver +++ b/cabal-tweak-dep-ver @@ -25,4 +25,8 @@ if ! grep -q "$DEP.*$OLD" $CABALFILE; then exit 1 fi -sed -i.$1 -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE +if [ ! -f $CABALFILE.orig ]; then + BACKUP=.orig +fi + +sed -i$BACKUP -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 138596a..6d55450 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.4.1 +Version: 0.95.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -64,9 +64,11 @@ EOF %changelog -* Fri Jun 22 2012 Jens Petersen - 0.95.4.1-1 -- cabal-tweak-dep-ver: show file name when no match -- cabal-tweak-dep-ver: backslash quote . and * in the match string +* Fri Jun 22 2012 Jens Petersen - 0.95.5-1 +- some cabal-tweak-dep-ver improvements: +- show file name when no match +- backslash quote . and * in the match string +- create a backup file if none exists * Fri Jun 22 2012 Jens Petersen - 0.95.4-1 - new cabal-tweak-dep-ver script to tweak depends version bounds in .cabal From 20cbe43332e31228ebfecdbe59a53d809141c752 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jun 2012 17:03:46 +0900 Subject: [PATCH 121/514] cabal-tweak-dep-ver: match complete dep name and not beyond "," --- cabal-tweak-dep-ver | 6 ++++-- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver index 137c944..525b786 100755 --- a/cabal-tweak-dep-ver +++ b/cabal-tweak-dep-ver @@ -20,7 +20,9 @@ if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then exit 1 fi -if ! grep -q "$DEP.*$OLD" $CABALFILE; then +BREAK=[^[:alnum:]-] + +if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then echo "$CABALFILE does not match: $DEP $OLD" exit 1 fi @@ -29,4 +31,4 @@ if [ ! -f $CABALFILE.orig ]; then BACKUP=.orig fi -sed -i$BACKUP -e "s/\($DEP.*\)$OLD/\1$NEW/g" $CABALFILE +sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^,]*\)$OLD/\1$NEW/g" $CABALFILE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6d55450..2d215f7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.5 +Version: 0.95.5.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -64,6 +64,10 @@ EOF %changelog +* Fri Jun 22 2012 Jens Petersen - 0.95.5.1-1 +- cabal-tweak-dep-ver: be careful only to match complete dep name and + do not match beyond "," + * Fri Jun 22 2012 Jens Petersen - 0.95.5-1 - some cabal-tweak-dep-ver improvements: - show file name when no match From ac776c377e99bdf787bb8f915f19a87732e8f198 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 25 Jun 2012 11:58:19 +0900 Subject: [PATCH 122/514] provide doc from devel again to silence rpmlint warning --- ghc-rpm-macros.ghc | 1 + ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 13879bf..379b132 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -197,6 +197,7 @@ Group: Development/Libraries\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ +Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ %if %{undefined without_prof}\ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2d215f7..5d5be7c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,7 +3,7 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.5.1 +Version: 0.95.6 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -64,6 +64,9 @@ EOF %changelog +* Mon Jun 25 2012 Jens Petersen - 0.95.6-1 +- provide doc from devel a little longer to silence rpmlint + * Fri Jun 22 2012 Jens Petersen - 0.95.5.1-1 - cabal-tweak-dep-ver: be careful only to match complete dep name and do not match beyond "," From 1d2eebf689ec87ab627c2ad49a1ccf677d3c59e1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 19 Jul 2012 00:59:27 -0500 Subject: [PATCH 123/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5d5be7c..08213dd 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -4,7 +4,7 @@ Name: ghc-rpm-macros Version: 0.95.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -64,6 +64,9 @@ EOF %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 0.95.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Mon Jun 25 2012 Jens Petersen - 0.95.6-1 - provide doc from devel a little longer to silence rpmlint From ae161ab66c4f7aedf188b98ac70b9c075a0e7fc9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 26 Jul 2012 16:04:01 +0900 Subject: [PATCH 124/514] update the upstream comment in the spec file --- ghc-rpm-macros.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 08213dd..c2a4117 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,10 +11,10 @@ Group: Development/Libraries License: GPLv3 URL: https://fedoraproject.org/wiki/Haskell_SIG -# This is a Fedora maintained package which is specific to -# our distribution. Thus the source is only available from -# within this srpm. But it could be moved to fedorahosted.org -# if other rpm distros want to use it. +# This is a Fedora maintained package, originally made for +# the distribution. Hence the source is currently only available +# from this package. But it could be hosted on fedorahosted.org +# for example if other rpm distros would prefer that. Source0: ghc-rpm-macros.ghc Source1: COPYING Source2: AUTHORS From befa5e103ea5dd4c546c78d410e2cbe62e5383d2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 24 Aug 2012 22:23:20 +0900 Subject: [PATCH 125/514] make haddock build hoogle files, no longer need to disable building ghci lib files --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 379b132..74a0966 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -250,7 +250,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?ghc_with_lib_for_ghci:--disable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} \ %cabal build\ %{nil} @@ -258,7 +258,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %ghc_lib_build()\ %ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ -%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)}\ +%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ %endif\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c2a4117..3662f58 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,8 +3,8 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc Name: ghc-rpm-macros -Version: 0.95.6 -Release: 2%{?dist} +Version: 0.96 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -64,6 +64,10 @@ EOF %changelog +* Fri Aug 24 2012 Jens Petersen - 0.96-1 +- make haddock build hoogle files +- Fedora ghc-7.4.2 Cabal will not build ghci lib files by default + * Thu Jul 19 2012 Fedora Release Engineering - 0.95.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From b95424a06b5099d4ec97f68b201f3f0b230b076a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 8 Sep 2012 21:18:30 +0900 Subject: [PATCH 126/514] ghc-rpm-macros now requires hscolour so packages no longer need to BR it - this can be disabled for bootstrapping by setting without_hscolour --- ghc-rpm-macros.spec | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3662f58..f4aee22 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -2,8 +2,11 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc +# uncomment to bootstrap without hscolour +#%%global without_hscolour 1 + Name: ghc-rpm-macros -Version: 0.96 +Version: 0.97 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -21,6 +24,11 @@ Source2: AUTHORS Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Requires: redhat-rpm-config +%if %{undefined without_hscolour} +ExclusiveArch: %{ghc_arches} +BuildRequires: ghc-rpm-macros, hscolour +Requires: hscolour +%endif %description A set of macros for building GHC packages following the Haskell Guidelines @@ -55,6 +63,12 @@ cat >> %{buildroot}/%{macros_file} <> %{buildroot}/%{macros_file} < - 0.97-1 +- ghc-rpm-macros now requires hscolour so packages no longer need to BR it +- this can be disabled for bootstrapping by setting without_hscolour + * Fri Aug 24 2012 Jens Petersen - 0.96-1 - make haddock build hoogle files - Fedora ghc-7.4.2 Cabal will not build ghci lib files by default From e330117e144988d79ee473d3b374e8cf03623281 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 8 Sep 2012 21:25:38 +0900 Subject: [PATCH 127/514] fix missing %endif --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f4aee22..653ce55 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -26,7 +26,8 @@ Source4: cabal-tweak-dep-ver Requires: redhat-rpm-config %if %{undefined without_hscolour} ExclusiveArch: %{ghc_arches} -BuildRequires: ghc-rpm-macros, hscolour +BuildRequires: ghc-rpm-macros +BuildRequires: hscolour Requires: hscolour %endif @@ -69,6 +70,8 @@ cat >> %{buildroot}/%{macros_file} < Date: Wed, 19 Sep 2012 20:00:54 +0900 Subject: [PATCH 128/514] fix broken duplicate hash output for haskell-platform binaries when locally installed --- ghc-deps.sh | 2 +- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 69a2d51..761cb5f 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -73,7 +73,7 @@ for i in $files; do PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi for p in ${BIN_DEPS}; do - HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//") + HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//" | uniq) echo "ghc($HASH)" done fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 653ce55..67acbeb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97 +Version: 0.97.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -81,6 +81,10 @@ EOF %changelog +* Wed Sep 19 2012 Jens Petersen - 0.97.1-1 +- fix broken duplicate hash output for haskell-platform binaries buildhack + when haskell-platform locally installed + * Sat Sep 8 2012 Jens Petersen - 0.97-1 - ghc-rpm-macros now requires hscolour so packages no longer need to BR it - this can be disabled for bootstrapping by setting without_hscolour From 5d116cb4cc84568cd828e32573ae12eaa48b3ace Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 20 Sep 2012 12:05:40 +0900 Subject: [PATCH 129/514] no need to BR hscolour --- ghc-rpm-macros.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 67acbeb..9e5f663 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 0.97.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -27,7 +27,6 @@ Requires: redhat-rpm-config %if %{undefined without_hscolour} ExclusiveArch: %{ghc_arches} BuildRequires: ghc-rpm-macros -BuildRequires: hscolour Requires: hscolour %endif @@ -81,6 +80,9 @@ EOF %changelog +* Thu Sep 20 2012 Jens Petersen - 0.97.1-2 +- no need to BR hscolour + * Wed Sep 19 2012 Jens Petersen - 0.97.1-1 - fix broken duplicate hash output for haskell-platform binaries buildhack when haskell-platform locally installed From 07fccfd9a1af12f2fa61301a06539dde4bc0a8cc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 18:55:03 +0900 Subject: [PATCH 130/514] add comment about for unbootstrapping hscolour; add test-rebuild script for testing changes so far script gives diffs of requires and provides --- ghc-rpm-macros.spec | 2 ++ test-rebuild | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 test-rebuild diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9e5f663..cda882d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -4,6 +4,8 @@ # uncomment to bootstrap without hscolour #%%global without_hscolour 1 +# uncomment to unbootstrap hscolour on again +#%%undefine without_hscolour Name: ghc-rpm-macros Version: 0.97.1 diff --git a/test-rebuild b/test-rebuild new file mode 100755 index 0000000..96e39f8 --- /dev/null +++ b/test-rebuild @@ -0,0 +1,26 @@ +#!/bin/sh + +PKG=$1 + +fedpkg clone -a $PKG +cd $PKG + +sudo yum build-depends $PKG + +fedpkg local + +mkdir -p test + +cd $(arch) + +PKGS=$(rpm -qp --qf "%{name}\n" *) + +sudo yum install $PKGS + +for i in $PKGS; do + for k in requires provides; do + rpm -qp --$k $i*.rpm > ../test/$i.$k.test + rpm -q --$k $i > ../test/$i.$k.installed + diff -u ../test/$i.$k.installed ../test/$i.$k.test > ../$i.$k.diff + done +done From 8b059158bac2b7d2fd545ef20aaaa0d281ec1395 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:02:54 +0900 Subject: [PATCH 131/514] test-rebuild: fix builddep command and ghc-PKG rpm listing --- test-rebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-rebuild b/test-rebuild index 96e39f8..4df09ed 100755 --- a/test-rebuild +++ b/test-rebuild @@ -5,7 +5,7 @@ PKG=$1 fedpkg clone -a $PKG cd $PKG -sudo yum build-depends $PKG +sudo yum builddep $PKG fedpkg local @@ -19,7 +19,7 @@ sudo yum install $PKGS for i in $PKGS; do for k in requires provides; do - rpm -qp --$k $i*.rpm > ../test/$i.$k.test + rpm -qp --$k $(ls $i*.rpm | head) > ../test/$i.$k.test rpm -q --$k $i > ../test/$i.$k.installed diff -u ../test/$i.$k.installed ../test/$i.$k.test > ../$i.$k.diff done From eb601b5e70f4f464acdb464a5c338ae561ebf33a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:05:57 +0900 Subject: [PATCH 132/514] test-rebuild: allow building from cwd or existing subdir; builddep on spec file --- test-rebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-rebuild b/test-rebuild index 4df09ed..be6a46a 100755 --- a/test-rebuild +++ b/test-rebuild @@ -2,11 +2,11 @@ PKG=$1 -fedpkg clone -a $PKG -cd $PKG +[ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG -sudo yum builddep $PKG +[ -d "$PKG" ] && cd $PKG +sudo yum builddep $PKG.spec fedpkg local mkdir -p test From ca5159471f6a674ff2f8751a2ae91aeb7a209d8f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:07:51 +0900 Subject: [PATCH 133/514] test-rebuild: 2nd arg for fedora branch --- test-rebuild | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test-rebuild b/test-rebuild index be6a46a..ba2ce91 100755 --- a/test-rebuild +++ b/test-rebuild @@ -6,6 +6,10 @@ PKG=$1 [ -d "$PKG" ] && cd $PKG +if [ -n "$2" ]; then + fedpkg switch-branch $2 +fi + sudo yum builddep $PKG.spec fedpkg local From 1bb678c64ae916629927337f9a3fe7d51538ec7e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:15:07 +0900 Subject: [PATCH 134/514] test-rebuild: really fix yum-builddep; list subpackages by name-ver --- test-rebuild | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-rebuild b/test-rebuild index ba2ce91..7ecd93f 100755 --- a/test-rebuild +++ b/test-rebuild @@ -10,14 +10,14 @@ if [ -n "$2" ]; then fedpkg switch-branch $2 fi -sudo yum builddep $PKG.spec +sudo yum-builddep $PKG.spec fedpkg local mkdir -p test cd $(arch) -PKGS=$(rpm -qp --qf "%{name}\n" *) +PKGS=$(rpm -qp --qf "%{name}-%{version}\n" *) sudo yum install $PKGS From e399d7ff29b76e8e3c1cb515b9d67971e9250ec8 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:27:16 +0900 Subject: [PATCH 135/514] test-rebuild: rename test/ to test-tmp/ ; use ls -t; exclude rpmlib(FileDigests) --- test-rebuild | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test-rebuild b/test-rebuild index 7ecd93f..28e96a9 100755 --- a/test-rebuild +++ b/test-rebuild @@ -13,7 +13,10 @@ fi sudo yum-builddep $PKG.spec fedpkg local -mkdir -p test +TMP=test-tmp + +rm -r $TMP/ +mkdir $TMP/ cd $(arch) @@ -23,8 +26,8 @@ sudo yum install $PKGS for i in $PKGS; do for k in requires provides; do - rpm -qp --$k $(ls $i*.rpm | head) > ../test/$i.$k.test - rpm -q --$k $i > ../test/$i.$k.installed - diff -u ../test/$i.$k.installed ../test/$i.$k.test > ../$i.$k.diff + rpm -qp --$k $(ls -t $i*.rpm | head) > ../$TMP/$i.$k.test + rpm -q --$k $i > ../$TMP/$i.$k.installed + diff -u --exclude="rpmlib(FileDigests)" ../$TMP/$i.$k.installed ../$TMP/$i.$k.test > ../$k.$i.diff done done From 6f947c0328e210cb2a8b4685ba4d424268762eab Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:39:08 +0900 Subject: [PATCH 136/514] test-rebuild: use n-v-r, and keep tmp dir around --- test-rebuild | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test-rebuild b/test-rebuild index 28e96a9..614ec2f 100755 --- a/test-rebuild +++ b/test-rebuild @@ -15,18 +15,17 @@ fedpkg local TMP=test-tmp -rm -r $TMP/ -mkdir $TMP/ +mkdir -p $TMP/ cd $(arch) -PKGS=$(rpm -qp --qf "%{name}-%{version}\n" *) +PKGS=$(rpm -qp *) sudo yum install $PKGS for i in $PKGS; do for k in requires provides; do - rpm -qp --$k $(ls -t $i*.rpm | head) > ../$TMP/$i.$k.test + rpm -qp --$k $i.rpm > ../$TMP/$i.$k.test rpm -q --$k $i > ../$TMP/$i.$k.installed diff -u --exclude="rpmlib(FileDigests)" ../$TMP/$i.$k.installed ../$TMP/$i.$k.test > ../$k.$i.diff done From a8bcd3741ff27506319f881a14727ba14ef68e3b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:49:32 +0900 Subject: [PATCH 137/514] test-rebuild: set -e; require fresh arch dir --- test-rebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test-rebuild b/test-rebuild index 614ec2f..eba4cb0 100755 --- a/test-rebuild +++ b/test-rebuild @@ -1,5 +1,7 @@ #!/bin/sh +set -e + PKG=$1 [ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG @@ -11,13 +13,21 @@ if [ -n "$2" ]; then fi sudo yum-builddep $PKG.spec + +ARCH=$(arch) + +if [ -d $ARCH ]; then + echo Please remove $ARCH/ + exit 1 +fi + fedpkg local TMP=test-tmp mkdir -p $TMP/ -cd $(arch) +cd $ARCH PKGS=$(rpm -qp *) From 4f1f547f247d13323563f58f59c5f7f526af83f7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:58:56 +0900 Subject: [PATCH 138/514] test-rebuild: filter out rpmlib lines; diff can't filter lines --- test-rebuild | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-rebuild b/test-rebuild index eba4cb0..d6adc92 100755 --- a/test-rebuild +++ b/test-rebuild @@ -35,8 +35,8 @@ sudo yum install $PKGS for i in $PKGS; do for k in requires provides; do - rpm -qp --$k $i.rpm > ../$TMP/$i.$k.test - rpm -q --$k $i > ../$TMP/$i.$k.installed - diff -u --exclude="rpmlib(FileDigests)" ../$TMP/$i.$k.installed ../$TMP/$i.$k.test > ../$k.$i.diff + rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test + rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed + diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test > ../$k.$i.diff done done From 73b6ce9c5712d979fe56560897c179eb3dfd677f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 10:57:48 +0900 Subject: [PATCH 139/514] test-rebuild: add file listing and output diff's --- test-rebuild | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test-rebuild b/test-rebuild index d6adc92..d7b35f1 100755 --- a/test-rebuild +++ b/test-rebuild @@ -34,9 +34,12 @@ PKGS=$(rpm -qp *) sudo yum install $PKGS for i in $PKGS; do - for k in requires provides; do + for k in list requires provides; do rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test > ../$k.$i.diff + cat ../$k.$i.diff done done + +ls -lt list.* provides.* requires.* From a32bb68aba27488bc289a7ea066a65755da7cac1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 12:23:03 +0900 Subject: [PATCH 140/514] test-rebuild: display diff output better --- test-rebuild | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test-rebuild b/test-rebuild index d7b35f1..6001190 100755 --- a/test-rebuild +++ b/test-rebuild @@ -17,7 +17,7 @@ sudo yum-builddep $PKG.spec ARCH=$(arch) if [ -d $ARCH ]; then - echo Please remove $ARCH/ + echo Please move existing $ARCH/ exit 1 fi @@ -37,8 +37,13 @@ for i in $PKGS; do for k in list requires provides; do rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed - diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test > ../$k.$i.diff - cat ../$k.$i.diff + DIFF=$(diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test) + if [ -z "$DIFF" ]; then + echo "$i $k: same" + else + echo $DIFF > ../$k.$i.diff + cat ../$k.$i.diff + fi done done From 798c11607fb7d053d9c8b28b5ca1a7cf1198d7db Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 12:23:36 +0900 Subject: [PATCH 141/514] rename test-rebuild to test-rebuild.sh --- test-rebuild => test-rebuild.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test-rebuild => test-rebuild.sh (100%) diff --git a/test-rebuild b/test-rebuild.sh similarity index 100% rename from test-rebuild rename to test-rebuild.sh From e0729035a0270a17386a80ccfa5df31d3fd8075f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 12:25:41 +0900 Subject: [PATCH 142/514] need to pass --html to "cabal haddock" to get html and not just hoogle --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 74a0966..404bb07 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -258,7 +258,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %ghc_lib_build()\ %ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ -%cabal haddock %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ +%cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ %endif\ %{nil} From 20b1088ae249b2957ab56d0db6089c6989f418b3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 12:28:27 +0900 Subject: [PATCH 143/514] fix missing html haddock output --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cda882d..061e764 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,8 +8,8 @@ #%%undefine without_hscolour Name: ghc-rpm-macros -Version: 0.97.1 -Release: 2%{?dist} +Version: 0.97.2 +Release: 1%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -82,6 +82,9 @@ EOF %changelog +* Tue Oct 9 2012 Jens Petersen - 0.97.2-1 +- "cabal haddock" needs --html option with --hoogle to output html + * Thu Sep 20 2012 Jens Petersen - 0.97.1-2 - no need to BR hscolour From c818743e1158c2e06382046e30b0ab7eac79edd0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 12:39:43 +0900 Subject: [PATCH 144/514] test-rebuild.sh: try to fix diff output --- test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 6001190..a8f0efb 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -41,8 +41,8 @@ for i in $PKGS; do if [ -z "$DIFF" ]; then echo "$i $k: same" else + echo $DIFF echo $DIFF > ../$k.$i.diff - cat ../$k.$i.diff fi done done From 395cffc7aab576827cdafcd617f0d338ad1ce20c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 13:01:11 +0900 Subject: [PATCH 145/514] test-rebuild.sh: diff returns non-zero when there is a diff --- test-rebuild.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index a8f0efb..936e3c5 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -37,7 +37,7 @@ for i in $PKGS; do for k in list requires provides; do rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed - DIFF=$(diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test) + DIFF=$(diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test || :) if [ -z "$DIFF" ]; then echo "$i $k: same" else @@ -46,5 +46,3 @@ for i in $PKGS; do fi done done - -ls -lt list.* provides.* requires.* From 880c4fcd5d17dd8f29138c38995731f765c3f714 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 13:06:49 +0900 Subject: [PATCH 146/514] test-rebuild.sh: for now just output to stdout --- test-rebuild.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 936e3c5..7dc0bd7 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -37,12 +37,6 @@ for i in $PKGS; do for k in list requires provides; do rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed - DIFF=$(diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test || :) - if [ -z "$DIFF" ]; then - echo "$i $k: same" - else - echo $DIFF - echo $DIFF > ../$k.$i.diff - fi + diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test || : done done From 85455e4eb0771876f334ef1e31356b697823f093 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 13:16:23 +0900 Subject: [PATCH 147/514] test-rebuild.sh: yum install packages one by one --- test-rebuild.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 7dc0bd7..d25602e 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -31,9 +31,8 @@ cd $ARCH PKGS=$(rpm -qp *) -sudo yum install $PKGS - for i in $PKGS; do + sudo yum install $i for k in list requires provides; do rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed From a13d4b8b200d14ac90c97cd812a8a681e7d82ab5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 13:22:50 +0900 Subject: [PATCH 148/514] test-rebuild.sh: use "fedpkg verrel" to find built rpms --- test-rebuild.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index d25602e..37f2e3f 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -8,19 +8,19 @@ PKG=$1 [ -d "$PKG" ] && cd $PKG +ARCH=$(arch) + +#if [ -d $ARCH ]; then +# echo Please move existing $ARCH/ +# exit 1 +#fi + if [ -n "$2" ]; then fedpkg switch-branch $2 fi sudo yum-builddep $PKG.spec -ARCH=$(arch) - -if [ -d $ARCH ]; then - echo Please move existing $ARCH/ - exit 1 -fi - fedpkg local TMP=test-tmp @@ -29,7 +29,9 @@ mkdir -p $TMP/ cd $ARCH -PKGS=$(rpm -qp *) +VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//") + +PKGS=$(rpm -qp *-$VERREL) for i in $PKGS; do sudo yum install $i From e519a849418fd8aecc98136369af325f24d4dad9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 13:24:52 +0900 Subject: [PATCH 149/514] test-rebuild.sh: run fedpkg verrel in the right dir --- test-rebuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 37f2e3f..c308fee 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -23,14 +23,14 @@ sudo yum-builddep $PKG.spec fedpkg local +VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//") + TMP=test-tmp mkdir -p $TMP/ cd $ARCH -VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//") - PKGS=$(rpm -qp *-$VERREL) for i in $PKGS; do From 2950c5e61ed1db9c41257a2038b0a91ef3599116 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 16:22:37 +0900 Subject: [PATCH 150/514] test-rebuild.sh: make yum install quiet --- test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index c308fee..eb739d2 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -34,7 +34,7 @@ cd $ARCH PKGS=$(rpm -qp *-$VERREL) for i in $PKGS; do - sudo yum install $i + sudo yum install -q $i for k in list requires provides; do rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed From b968d1834961362b3a80cdc8fd2be3ba2d3a23ea Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 16:26:45 +0900 Subject: [PATCH 151/514] test-rebuild.sh: fix nvr list --- test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index eb739d2..09839ce 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -31,7 +31,7 @@ mkdir -p $TMP/ cd $ARCH -PKGS=$(rpm -qp *-$VERREL) +PKGS=$(rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do sudo yum install -q $i From fdb0081a169a8047e6184a6d91afcc33db7f6993 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 16:38:47 +0900 Subject: [PATCH 152/514] test-rebuild.sh: allow running in cwd without arg --- test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 09839ce..5b139ea 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -2,7 +2,7 @@ set -e -PKG=$1 +PKG=${1:-$(fedpkg gimmespec | sed -e "s/.spec//")} [ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG From 345bcf3e9187a1a2a5fbac0cdbc95189be7b3413 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Oct 2012 17:57:03 +0900 Subject: [PATCH 153/514] test-rebuild.sh: dont move into arch subdir --- test-rebuild.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 5b139ea..ab94f22 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -29,15 +29,13 @@ TMP=test-tmp mkdir -p $TMP/ -cd $ARCH - -PKGS=$(rpm -qp $(ls *-$VERREL*.rpm)) +PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do sudo yum install -q $i for k in list requires provides; do - rpm -qp --$k $i.rpm | grep -v rpmlib > ../$TMP/$i.$k.test - rpm -q --$k $i | grep -v rpmlib > ../$TMP/$i.$k.installed - diff -u ../$TMP/$i.$k.installed ../$TMP/$i.$k.test || : + rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test + rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed + diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || : done done From 30bb029b38329d0e367d07498e24edfa74c15cd1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 20 Oct 2012 14:26:12 +0900 Subject: [PATCH 154/514] test-rebuild.sh: fix yum install arg; also generate --scripts output --- test-rebuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index ab94f22..a3a607b 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -32,8 +32,8 @@ mkdir -p $TMP/ PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do - sudo yum install -q $i - for k in list requires provides; do + sudo yum install -q $ARCH/$i.rpm + for k in list requires provides scripts; do rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || : From 1433654678f96edabbce0c8ea014a9d6281d9dfe Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 20 Oct 2012 14:29:10 +0900 Subject: [PATCH 155/514] test-rebuild.sh: revert the erroneous yum install change --- test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index a3a607b..21b64ea 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -32,7 +32,7 @@ mkdir -p $TMP/ PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do - sudo yum install -q $ARCH/$i.rpm + sudo yum install -q $i for k in list requires provides scripts; do rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed From 82a1405dd812353c08b8f75f281a1a8e19267f0b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 20 Oct 2012 14:34:44 +0900 Subject: [PATCH 156/514] test-rebuild.sh: test if package is installed before yum install --- test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 21b64ea..92f1972 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -32,7 +32,7 @@ mkdir -p $TMP/ PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do - sudo yum install -q $i + rpm -q --quiet $i || sudo yum install -q $i for k in list requires provides scripts; do rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed From 4d0b6136b6ded968c462530d88aff61457011645 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 20 Oct 2012 15:05:25 +0900 Subject: [PATCH 157/514] test-rebuild.sh: protect the rpm query commands for when no output --- test-rebuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-rebuild.sh b/test-rebuild.sh index 92f1972..bf9e4c0 100755 --- a/test-rebuild.sh +++ b/test-rebuild.sh @@ -34,8 +34,8 @@ PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do rpm -q --quiet $i || sudo yum install -q $i for k in list requires provides scripts; do - rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test - rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed + rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || : + rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || : diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || : done done From bda56fd9b1dc076137c411124aa49a8023f6a121 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Oct 2012 18:13:54 +0900 Subject: [PATCH 158/514] BR redhat-rpm-config not ghc-rpm-macros; don't set without_hscolour in macros.ghc --- ghc-rpm-macros.spec | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 061e764..ce39bc2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -4,11 +4,9 @@ # uncomment to bootstrap without hscolour #%%global without_hscolour 1 -# uncomment to unbootstrap hscolour on again -#%%undefine without_hscolour Name: ghc-rpm-macros -Version: 0.97.2 +Version: 0.97.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -27,8 +25,8 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Requires: redhat-rpm-config %if %{undefined without_hscolour} +BuildRequires: redhat-rpm-config ExclusiveArch: %{ghc_arches} -BuildRequires: ghc-rpm-macros Requires: hscolour %endif @@ -65,14 +63,6 @@ cat >> %{buildroot}/%{macros_file} <> %{buildroot}/%{macros_file} < - 0.97.3-1 +- BR redhat-rpm-config instead of ghc-rpm-macros +- no longer set without_hscolour in macros.ghc for bootstrapping + * Tue Oct 9 2012 Jens Petersen - 0.97.2-1 - "cabal haddock" needs --html option with --hoogle to output html From 9e0aa2550c88a5b3454ce9d7e7d993a548568173 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 29 Oct 2012 20:02:06 +0900 Subject: [PATCH 159/514] bring back doc re-indexing in posttrans using /var/lib/rpm-state/ghc/ --- ghc-rpm-macros.ghc | 12 +++++++++++- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 404bb07..d73ac37 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -218,9 +218,19 @@ This package contains the development files. %define basepkg ghc-%{pkgname}\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ +if [ -d %{_localstatedir}/lib/rpm-state/ghc/ ]; then\ + touch %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ +fi\ \ %postun -n %{basepkg}-devel\ -%ghc_pkg_recache +%ghc_pkg_recache\ +\ +%posttrans -n %{basepkg}-devel\ +if [ -f %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex ]; then\ + cd %{ghcdocbasedir}/libraries\ + ./gen_contents_index\ + rm %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ +fi # ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] %ghc_package_devel(c:h:l:)\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ce39bc2..2bae0ee 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97.3 +Version: 0.98 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -72,6 +72,10 @@ EOF %changelog +* Mon Oct 29 2012 Jens Petersen - 0.98-1 +- gen_contents_index is now run once from posttrans (#870694) + http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets + * Thu Oct 25 2012 Jens Petersen - 0.97.3-1 - BR redhat-rpm-config instead of ghc-rpm-macros - no longer set without_hscolour in macros.ghc for bootstrapping From ea552a4daf0a4e2a42f2947231d2140deb23015d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 30 Oct 2012 11:00:23 +0900 Subject: [PATCH 160/514] add haddock reindexing for %postun also This will slow down removal of ghc-*-devel pkgs but seems no simple way round that and removal is less common than installing anyway. --- ghc-rpm-macros.ghc | 8 ++++++++ ghc-rpm-macros.spec | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index d73ac37..aedf13c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -224,6 +224,14 @@ fi\ \ %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ +if [ $1 -gt 1 ] ; then\ + if [ -d %{_localstatedir}/lib/rpm-state/ghc/ ]; then\ + touch %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ + fi\ +else\ + cd %{ghcdocbasedir}/libraries\ + ./gen_contents_index\ +fi\ \ %posttrans -n %{basepkg}-devel\ if [ -f %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex ]; then\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2bae0ee..6d61ee0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -73,8 +73,8 @@ EOF %changelog * Mon Oct 29 2012 Jens Petersen - 0.98-1 -- gen_contents_index is now run once from posttrans (#870694) - http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets +- gen_contents_index is now run once from posttrans or after removal (#870694) + see http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets * Thu Oct 25 2012 Jens Petersen - 0.97.3-1 - BR redhat-rpm-config instead of ghc-rpm-macros From 29279d4a5be49a2c7ef37f8c2c592427f6a637ae Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 30 Oct 2012 11:20:39 +0900 Subject: [PATCH 161/514] silence output from gen_contents_index --- ghc-rpm-macros.ghc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index aedf13c..f9edaa1 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -230,13 +230,13 @@ if [ $1 -gt 1 ] ; then\ fi\ else\ cd %{ghcdocbasedir}/libraries\ - ./gen_contents_index\ + ./gen_contents_index >/dev/null\ fi\ \ %posttrans -n %{basepkg}-devel\ if [ -f %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex ]; then\ cd %{ghcdocbasedir}/libraries\ - ./gen_contents_index\ + ./gen_contents_index >/dev/null\ rm %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ fi From 8af2ba71ac1e86dd9cde0e432fac926f9222d983 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 16 Nov 2012 16:21:40 +0900 Subject: [PATCH 162/514] test-rebuild.sh: moved to haskell-sig/bin --- test-rebuild.sh | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100755 test-rebuild.sh diff --git a/test-rebuild.sh b/test-rebuild.sh deleted file mode 100755 index bf9e4c0..0000000 --- a/test-rebuild.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -set -e - -PKG=${1:-$(fedpkg gimmespec | sed -e "s/.spec//")} - -[ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG - -[ -d "$PKG" ] && cd $PKG - -ARCH=$(arch) - -#if [ -d $ARCH ]; then -# echo Please move existing $ARCH/ -# exit 1 -#fi - -if [ -n "$2" ]; then - fedpkg switch-branch $2 -fi - -sudo yum-builddep $PKG.spec - -fedpkg local - -VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//") - -TMP=test-tmp - -mkdir -p $TMP/ - -PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) - -for i in $PKGS; do - rpm -q --quiet $i || sudo yum install -q $i - for k in list requires provides scripts; do - rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || : - rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || : - diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || : - done -done From 93b9c369fcb35e2ee92f9bc4e79b7599609e8160 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 16 Nov 2012 16:25:00 +0900 Subject: [PATCH 163/514] revert the ghc doc index changes back to just using a (now optional) cronjob The overhead to re-indexing in posttrans and postun seems too high --- ghc-rpm-macros.ghc | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index f9edaa1..404bb07 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -218,27 +218,9 @@ This package contains the development files. %define basepkg ghc-%{pkgname}\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ -if [ -d %{_localstatedir}/lib/rpm-state/ghc/ ]; then\ - touch %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ -fi\ \ %postun -n %{basepkg}-devel\ -%ghc_pkg_recache\ -if [ $1 -gt 1 ] ; then\ - if [ -d %{_localstatedir}/lib/rpm-state/ghc/ ]; then\ - touch %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ - fi\ -else\ - cd %{ghcdocbasedir}/libraries\ - ./gen_contents_index >/dev/null\ -fi\ -\ -%posttrans -n %{basepkg}-devel\ -if [ -f %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex ]; then\ - cd %{ghcdocbasedir}/libraries\ - ./gen_contents_index >/dev/null\ - rm %{_localstatedir}/lib/rpm-state/ghc/haddock-reindex\ -fi +%ghc_pkg_recache # ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] %ghc_package_devel(c:h:l:)\ From 44c764437ca357ee91b7c75bff5f5f1b52614d09 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 16 Nov 2012 16:38:37 +0900 Subject: [PATCH 164/514] revert also the doc indexing changes from the spec file --- ghc-rpm-macros.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6d61ee0..ce39bc2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.98 +Version: 0.97.3 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -72,10 +72,6 @@ EOF %changelog -* Mon Oct 29 2012 Jens Petersen - 0.98-1 -- gen_contents_index is now run once from posttrans or after removal (#870694) - see http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets - * Thu Oct 25 2012 Jens Petersen - 0.97.3-1 - BR redhat-rpm-config instead of ghc-rpm-macros - no longer set without_hscolour in macros.ghc for bootstrapping From 548aff606e5d0b3a22c886aa7a15a2ff493157c6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Nov 2012 22:34:36 +0900 Subject: [PATCH 165/514] bootstrap hscolour --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ce39bc2..f1be2c6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,10 +3,10 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc # uncomment to bootstrap without hscolour -#%%global without_hscolour 1 +%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97.3 +Version: 0.97.3.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -72,6 +72,9 @@ EOF %changelog +* Sat Nov 17 2012 Jens Petersen - 0.97.3.1-1 +- bootstrap hscolour + * Thu Oct 25 2012 Jens Petersen - 0.97.3-1 - BR redhat-rpm-config instead of ghc-rpm-macros - no longer set without_hscolour in macros.ghc for bootstrapping From 4add3928b39ef6f00db84143af8cc103211e52ae Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Nov 2012 23:11:03 +0900 Subject: [PATCH 166/514] re-enable hscolour --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f1be2c6..a2a36a4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,10 +3,10 @@ %global macros_file %{_sysconfdir}/rpm/macros.ghc # uncomment to bootstrap without hscolour -%global without_hscolour 1 +#%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97.3.1 +Version: 0.97.4 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -72,6 +72,9 @@ EOF %changelog +* Sat Nov 17 2012 Jens Petersen - 0.97.4-1 +- enable hscolour again + * Sat Nov 17 2012 Jens Petersen - 0.97.3.1-1 - bootstrap hscolour From 6af89aa214ce999f46d83d3026d50ce926b42ed7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 3 Dec 2012 16:00:06 +0900 Subject: [PATCH 167/514] add cabal-tweak-flag script for toggling flag default --- cabal-tweak-flag | 50 +++++++++++++++++++++++++++++++++++++++++++++ ghc-rpm-macros.spec | 8 +++++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 cabal-tweak-flag diff --git a/cabal-tweak-flag b/cabal-tweak-flag new file mode 100755 index 0000000..0d54d53 --- /dev/null +++ b/cabal-tweak-flag @@ -0,0 +1,50 @@ +#!/bin/sh + +# TODO: +# support "$0 FLAG NEW" when no upstream default + +set -e +x + +USAGE="Usage: $0 FLAG OLD NEW" + +if [ $# -ne 3 ]; then + echo "$USAGE" + exit 1 +fi + +FLAG=$1 +OLD=$2 +NEW=$3 + +if [ "$OLD" = "$NEW" ]; then + echo "Old and new value can't be the same!" + exit 1 +fi + +CABALFILE=$(ls *.cabal) + +if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then + echo "There needs to be one .cabal file in the current dir!" + exit 1 +fi + +if ! grep -q -i "^flag *$FLAG" $CABALFILE; then + echo "$CABALFILE does have flag $FLAG" + exit 1 +fi + +if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default:"; then + echo "$CABALFILE: $FLAG flag might not have a default" + exit 1 +fi + +if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default: *$OLD"; then + echo "$CABALFILE: $FLAG flag already defaults to $NEW" + exit 1 +fi + +if [ ! -f $CABALFILE.orig ]; then + BACKUP=.orig +fi + +sed -i$BACKUP -e "/[Ff]lag *$FLAG/,/[Dd]efault: *$OLD/ s/\([Dd]efault: *\)$OLD/\1$NEW/" $CABALFILE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a2a36a4..cc8015d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97.4 +Version: 0.97.5 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -23,6 +23,7 @@ Source1: COPYING Source2: AUTHORS Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver +Source5: cabal-tweak-flag Requires: redhat-rpm-config %if %{undefined without_hscolour} BuildRequires: redhat-rpm-config @@ -51,6 +52,7 @@ install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver +install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs @@ -69,9 +71,13 @@ EOF %config(noreplace) %{macros_file} %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver +%{_bindir}/cabal-tweak-flag %changelog +* Mon Dec 3 2012 Jens Petersen - 0.97.5-1 +- add cabal-tweak-flag script for toggling flag default + * Sat Nov 17 2012 Jens Petersen - 0.97.4-1 - enable hscolour again From 59daf96cb2610446a1f550c265f500b5a71f607f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 18 Jan 2013 18:52:08 +0900 Subject: [PATCH 168/514] make only ghc-PKG own libdir/ghc-ver/pkg-ver/ (#893777) thanks to Michael Scherer for reporting --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 404bb07..3c04aae 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -42,9 +42,9 @@ fi %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ +echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ %if %{undefined ghc_without_shared}\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ -echo "%dir %{pkgdir}" >> %{basepkg}.files\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ %endif\ @@ -67,7 +67,7 @@ fi\ %endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ -find %{buildroot}%{pkgdir} -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ +find %{buildroot}%{pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ find %{buildroot}%{pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cc8015d..5444add 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97.5 +Version: 0.97.6 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -75,6 +75,9 @@ EOF %changelog +* Fri Jan 18 2013 Jens Petersen - 0.97.6-1 +- be more careful about library pkgdir ownership (#893777) + * Mon Dec 3 2012 Jens Petersen - 0.97.5-1 - add cabal-tweak-flag script for toggling flag default From 436bfaf65de072d68d3bb6687e98c4acfb8de07c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 22 Jan 2013 11:31:08 +0900 Subject: [PATCH 169/514] %ghc_fix_dynamic_rpath for cleaning up executables linked against own libs --- ghc-rpm-macros.ghc | 17 +++++++++++++++++ ghc-rpm-macros.spec | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 3c04aae..daa57ea 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -281,6 +281,23 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?1:%ghc_strip_dynlinked}\ %{nil} +# ghc_fix_dynamic_rpath prog ... +%ghc_fix_dynamic_rpath()\ +%if %{undefined ghc_without_dynamic}\ +PDIR=$(cd ..; pwd)\ +for i in %*; do\ + PROG=%{buildroot}%{_bindir}/$i\ + RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\ + case $RPATH in\ + $PDIR*)\ + NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ + chrpath -r $NEWRPATH $PROG\ + ;;\ + esac\ +done\ +%endif\ +%{nil} + # - without_hscolour, without_testsuite, and ghc_bootstrapping # need to be set locally in the spec file diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5444add..b9a5bd0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.97.6 +Version: 0.98 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -75,6 +75,10 @@ EOF %changelog +* Mon Jan 21 2013 Jens Petersen - 0.98-1 +- new ghc_fix_dynamic_rpath macro for cleaning up package executables + linked against their own libraries + * Fri Jan 18 2013 Jens Petersen - 0.97.6-1 - be more careful about library pkgdir ownership (#893777) From 11c364e456698fc8186958b9d2745b1059daa648 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 22 Jan 2013 12:22:28 +0900 Subject: [PATCH 170/514] simplify cabal-tweak-flag script to take one flag value --- cabal-tweak-flag | 18 +++++++++--------- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cabal-tweak-flag b/cabal-tweak-flag index 0d54d53..2db3a72 100755 --- a/cabal-tweak-flag +++ b/cabal-tweak-flag @@ -1,25 +1,25 @@ #!/bin/sh # TODO: -# support "$0 FLAG NEW" when no upstream default +# support setting flag when no upstream default set -e +x -USAGE="Usage: $0 FLAG OLD NEW" +USAGE="Usage: $0 FLAG [True|False]" -if [ $# -ne 3 ]; then +if [ $# -ne 2 ]; then echo "$USAGE" exit 1 fi FLAG=$1 -OLD=$2 -NEW=$3 -if [ "$OLD" = "$NEW" ]; then - echo "Old and new value can't be the same!" - exit 1 -fi +NEW=$2 +case $NEW in + True) OLD=False ;; + False) OLD=True ;; + *) echo "Flag value can only be set to True or False" ; exit 1 ;; +esac CABALFILE=$(ls *.cabal) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b9a5bd0..67b9fed 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.98 +Version: 0.98.1 Release: 1%{?dist} Summary: Macros for building packages for GHC @@ -75,6 +75,9 @@ EOF %changelog +* Tue Jan 22 2013 Jens Petersen - 0.98.1-1 +- simplify cabal-tweak-flag script to take one flag value + * Mon Jan 21 2013 Jens Petersen - 0.98-1 - new ghc_fix_dynamic_rpath macro for cleaning up package executables linked against their own libraries From 6153b677020902e3aa105b77ecd5540897b9a360 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 17:17:21 -0600 Subject: [PATCH 171/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 67b9fed..d4cca06 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 0.98.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -75,6 +75,9 @@ EOF %changelog +* Wed Feb 13 2013 Fedora Release Engineering - 0.98.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Tue Jan 22 2013 Jens Petersen - 0.98.1-1 - simplify cabal-tweak-flag script to take one flag value From 7dad4d39bdd9afde1f12ef56658a72d7c808bbcc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 14 Feb 2013 19:43:21 +0900 Subject: [PATCH 172/514] move test-rebuild.sh here from haskell-sig.git --- tests/test-rebuild.sh | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 tests/test-rebuild.sh diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh new file mode 100755 index 0000000..f7f475b --- /dev/null +++ b/tests/test-rebuild.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +# for testing updates to ghc-rpm-macros etc +# In a pkg dir run +# $ ./test-rebuild.sh +# or clone a pkg branch: +# $ ./test-rebuild.sh [pkg] [branch] + +set -e + +PKG=${1:-$(fedpkg gimmespec | sed -e "s/.spec//")} + +[ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG + +[ -d "$PKG" ] && cd $PKG + +ARCH=$(arch) + +#if [ -d $ARCH ]; then +# echo Please move existing $ARCH/ +# exit 1 +#fi + +if [ -n "$2" ]; then + fedpkg switch-branch $2 +fi + +sudo yum-builddep $PKG.spec + +fedpkg local + +VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//") + +TMP=test-tmp + +mkdir -p $TMP/ + +PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) + +for i in $PKGS; do + # FIXME: should check NVR is same before building + rpm -q --quiet $i || sudo yum install -q $i + for k in list requires provides scripts; do + rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || : + rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || : + diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || : + done +done From ff319a0028e35a2faca6c53b678c67b93961b63c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 26 Feb 2013 18:19:02 +0100 Subject: [PATCH 173/514] add %ghc_with_lib_for_ghci to enable building ghci library file Normally not needed since ghci can now load .a files --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index daa57ea..911fd11 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -250,7 +250,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} \ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From f37546310e31597cfb6af8610e1d900ddf521335 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 26 Feb 2013 18:32:00 +0100 Subject: [PATCH 174/514] only add %pkgdir/ to filelist if it exists fixes haskell-platform build on secondary --- ghc-rpm-macros.ghc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 911fd11..ea3aa91 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -42,12 +42,12 @@ fi %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ +if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ %if %{undefined ghc_without_shared}\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ -fi\ %endif\ +fi\ %if %{defined ghc_without_shared}\ if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\ if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\ From 15903c519c6eb1c3d77c71e5b2d7485f3e3ab296 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 26 Feb 2013 18:39:44 +0100 Subject: [PATCH 175/514] add changelog entries for %pkgdir fix and %ghc_with_lib_for_ghci --- ghc-rpm-macros.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d4cca06..f8b3307 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 0.98.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -75,6 +75,12 @@ EOF %changelog +* Tue Feb 26 2013 Jens Petersen - 0.98.1-3 +- only add lib pkgdir to filelist if it exists + to fix haskell-platform build on secondary archs (no shared libs) +- add ghc_with_lib_for_ghci which re-enables ghci library .o files + (should not normally be necessary since ghci can load .a files) + * Wed Feb 13 2013 Fedora Release Engineering - 0.98.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 9921428d92e08b1a2105622cdb2d53e7fcde6601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20Cors=C3=A9pius?= Date: Wed, 20 Mar 2013 07:55:15 +0100 Subject: [PATCH 176/514] Remove %config from %{_sysconfdir}/rpm/macros.* (https://fedorahosted.org/fpc/ticket/259). --- ghc-rpm-macros.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f8b3307..750b4c3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 0.98.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Macros for building packages for GHC Group: Development/Libraries @@ -68,13 +68,17 @@ EOF %files %doc COPYING AUTHORS -%config(noreplace) %{macros_file} +%{macros_file} %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag %changelog +* Wed Mar 20 2013 Ralf Corsépius - 0.98.1-4 +- Remove %%config from %%{_sysconfdir}/rpm/macros.* + (https://fedorahosted.org/fpc/ticket/259). + * Tue Feb 26 2013 Jens Petersen - 0.98.1-3 - only add lib pkgdir to filelist if it exists to fix haskell-platform build on secondary archs (no shared libs) From 73b0bd180f65887308a6738120755d0b0ec2ff66 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Apr 2013 18:12:25 +0900 Subject: [PATCH 177/514] large update for simplified reworked revision of Packaging Guidelines - see https://fedorahosted.org/fpc/ticket/194 for discussion - move section and multiple library metamacros to new extra subpackage - packaging no longer depends on availability of shared libs so is same now for all primary and secondary archs: ie there is always a binary base library package - drop ghc_add_basepkg_file macro and ghc_exclude_docdir --- ghc-rpm-macros.ghc | 160 +-------------------------------------- ghc-rpm-macros.ghc-extra | 120 +++++++++++++++++++++++++++++ ghc-rpm-macros.spec | 38 ++++++++-- 3 files changed, 154 insertions(+), 164 deletions(-) create mode 100644 ghc-rpm-macros.ghc-extra diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ea3aa91..428b682 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -1,5 +1,5 @@ # RPM Macros for packaging Haskell cabalized packages -*-rpm-spec-*- -# see https://fedoraproject.org/wiki/PackagingDrafts/Haskell for more details +# see https://fedoraproject.org/wiki/Packaging:Haskell for more details # "cabal" %cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\ @@ -43,28 +43,11 @@ fi %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ -echo "%dir %{pkgdir}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ +echo "%dir %{pkgdir}" >> %{basepkg}.files\ %if %{undefined ghc_without_shared}\ echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ %endif\ fi\ -%if %{defined ghc_without_shared}\ -if [ "%{name}" = "%{basepkg}" -o -n "%{?1}" ]; then\ - if [ -d "%{buildroot}%{_docdir}/%{basepkg}-%{pkgver}" ]; then\ - mv %{buildroot}%{_docdir}/%{basepkg}-%{pkgver} %{buildroot}%{_docdir}/%{basepkg}-devel-%{pkgver}\ -%if %{undefined ghc_exclude_docdir}\ - echo "%{_docdir}/%{basepkg}-devel-%{version}" >> %{basepkg}-devel.files\ -%endif\ - fi\ -fi\ -%endif\ -%if %{undefined ghc_exclude_docdir}\ -if [ -d "%{buildroot}%{_docdir}/%{name}-%{version}" ]; then\ - echo "%{_docdir}/%{name}-%{version}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -elif [ -d "%{buildroot}%{_docdir}/ghc-%{pkgnamever}" ]; then\ - echo "%{_docdir}/ghc-%{pkgnamever}" >> %{basepkg}%{?ghc_without_shared:-devel}.files\ -fi\ -%endif\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ find %{buildroot}%{pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ @@ -73,17 +56,13 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in %{!?ghc_without_shared:%{basepkg}.files} %{basepkg}-devel.files; do\ +for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ fi\ done\ %{nil} -%ghc_add_basepkg_file()\ -%define basepkg ghc-%{pkg_name}\ -echo "%*" >> %{basepkg}%{?ghc_without_shared:-devel}.files - # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} @@ -102,139 +81,10 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ Requires(post): ghc-compiler = %{ghc_version}\ Requires(postun): ghc-compiler = %{ghc_version}\ -%if %{undefined ghc_without_shared} && 0%{!?-m:1}\ -Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ -%endif - -%ghc_shared_files\ -%if %{undefined ghc_without_shared}\ -%files -n %{basepkg} -f %{basepkg}.files\ -%{?base_doc_files:%doc %base_doc_files}\ -%endif\ -%{nil} - -# ghc_lib_package [-c cdepslist] [-h pkgdepslist] -%ghc_lib_package(c:h:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%ghc_shared_files\ -\ -%ghc_package_devel\ -%{nil} - -# ghc_package [-l licensetag] [name] [version] -%ghc_package(l:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define basepkg ghc-%{pkgname}\ -%package -n %{basepkg}\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ -Group: System Environment/Libraries\ -%{?1:Version: %{pkgver}}\ -%{-l:License: %{-l*}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} - -# ghc_description [name] [version] -%ghc_description()\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%description -n %{basepkg}\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ -%if %{defined ghc_version} && %{undefined ghc_without_shared}\ -This package provides the shared library.\ -%endif - -# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] -%ghc_lib_subpackage(c:h:l:x)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ -%define basepkg ghc-%{pkgname}\ -%ghc_package\ -\ -%ghc_description\ -\ -%ghc_lib_package\ -%{nil} +Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} %ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : -# (deprecated) for docs post and postun -%ghc_reindex_haddock : - -%ghc_devel_files\ -%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ -%if %{defined ghc_without_shared}\ -%{?base_doc_files:%doc %base_doc_files}\ -%endif\ -%{?devel_doc_files:%doc %devel_doc_files}\ -%{nil} - -%ghc_files()\ -%{?1:%define base_doc_files %*}\ -%define basepkg ghc-%{pkg_name}\ -%ghc_shared_files\ -\ -%ghc_devel_files\ -%{nil} - -# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version] -# -m : meta-package -%ghc_devel_package(c:h:l:m)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define basepkg ghc-%{pkgname}\ -%package -n %{basepkg}-devel\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ -Group: Development/Libraries\ -%{?1:Version: %{pkgver}}\ -%{-l:License: %{-l*}}\ -%{?ghc_devel_requires}\ -%{-h:Requires: %{-h*}}\ -%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ -%{-c:Requires: %{-c*}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ -Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ -Provides: %{basepkg}-doc = %{pkgver}-%{release}\ -Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ -%if %{undefined without_prof}\ -Provides: %{basepkg}-prof = %{pkgver}-%{release}\ -%endif - -# ghc_devel_description -%ghc_devel_description()\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%description -n %{basepkg}-devel\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ -\ -This package contains the development files. - -# ghc_devel_post_postun -%ghc_devel_post_postun()\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%post -n %{basepkg}-devel\ -%ghc_pkg_recache\ -\ -%postun -n %{basepkg}-devel\ -%ghc_pkg_recache - -# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] -%ghc_package_devel(c:h:l:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%ghc_devel_package\ -\ -%ghc_devel_description\ -\ -%ghc_devel_post_postun\ -\ -%ghc_devel_files\ -%{nil} - # ghc_strip_dynlinked %ghc_strip_dynlinked\ %if %{undefined __debug_package}\ @@ -312,5 +162,3 @@ done\ %global ghc_without_shared 1\ %global ghc_without_dynamic 1\ %ghc_test - -%ghc_exclude_docdir 1 diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra new file mode 100644 index 0000000..c778293 --- /dev/null +++ b/ghc-rpm-macros.ghc-extra @@ -0,0 +1,120 @@ +# RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- + +%ghc_shared_files\ +%files -n %{basepkg} -f %{basepkg}.files\ +%{?base_doc_files:%doc %base_doc_files}\ +%{nil} + +# ghc_lib_package [-c cdepslist] [-h pkgdepslist] +%ghc_lib_package(c:h:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_shared_files\ +\ +%ghc_package_devel\ +%{nil} + +# ghc_package [-l licensetag] [name] [version] +%ghc_package(l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define basepkg ghc-%{pkgname}\ +%package -n %{basepkg}\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ +%{?1:Version: %{pkgver}}\ +%{-l:License: %{-l*}}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} + +# ghc_description [name] [version] +%ghc_description()\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%description -n %{basepkg}\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.} + +# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] +%ghc_lib_subpackage(c:h:l:x)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_package\ +\ +%ghc_description\ +\ +%ghc_lib_package\ +%{nil} + +%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : + +# (deprecated) for docs post and postun +%ghc_reindex_haddock : + +%ghc_devel_files\ +%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ +%{?devel_doc_files:%doc %devel_doc_files}\ +%{nil} + +%ghc_files()\ +%{?1:%define base_doc_files %*}\ +%define basepkg ghc-%{pkg_name}\ +%ghc_shared_files\ +\ +%ghc_devel_files\ +%{nil} + +# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version] +# -m : meta-package +%ghc_devel_package(c:h:l:m)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +%define basepkg ghc-%{pkgname}\ +%package -n %{basepkg}-devel\ +Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ +%{?1:Version: %{pkgver}}\ +%{-l:License: %{-l*}}\ +%{?ghc_devel_requires}\ +%{-h:Requires: %{-h*}}\ +%{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ +%{-c:Requires: %{-c*}}\ +%{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ +Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ +Provides: %{basepkg}-doc = %{pkgver}-%{release}\ +Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ +%if %{undefined without_prof}\ +Provides: %{basepkg}-prof = %{pkgver}-%{release}\ +%endif + +# ghc_devel_description +%ghc_devel_description()\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%description -n %{basepkg}-devel\ +%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ +\ +This package contains the development files. + +# ghc_devel_post_postun +%ghc_devel_post_postun()\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%post -n %{basepkg}-devel\ +%ghc_pkg_recache\ +\ +%postun -n %{basepkg}-devel\ +%ghc_pkg_recache + +# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +%ghc_package_devel(c:h:l:)\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define basepkg ghc-%{pkgname}\ +%ghc_devel_package\ +\ +%ghc_devel_description\ +\ +%ghc_devel_post_postun\ +\ +%ghc_devel_files\ +%{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 750b4c3..c7700b1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,16 +1,15 @@ %global debug_package %{nil} -%global macros_file %{_sysconfdir}/rpm/macros.ghc +%global macros_dir %{_sysconfdir}/rpm # uncomment to bootstrap without hscolour #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.98.1 -Release: 4%{?dist} -Summary: Macros for building packages for GHC +Version: 0.99 +Release: 1%{?dist} +Summary: RPM macros for building packages for GHC -Group: Development/Libraries License: GPLv3 URL: https://fedoraproject.org/wiki/Haskell_SIG @@ -24,6 +23,7 @@ Source2: AUTHORS Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag +Source6: ghc-rpm-macros.ghc-extra Requires: redhat-rpm-config %if %{undefined without_hscolour} BuildRequires: redhat-rpm-config @@ -37,6 +37,13 @@ of the Fedora Haskell SIG. ghc needs to be installed in order to make use of these macros. +%package extra +Summary: Extra RPM macros for building Haskell packages with several libs +Requires: %{name} = %{version}-%{release} + +%description extra + + %prep %setup -c -T cp %{SOURCE1} %{SOURCE2} . @@ -47,7 +54,8 @@ echo no build stage needed %install -install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_file} +install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc +install -p -D -m 0644 %{SOURCE6} ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh @@ -57,7 +65,7 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag # this is why this package is now arch-dependent: # turn off shared libs and dynamic linking on secondary archs %ifnarch %{ix86} x86_64 -cat >> %{buildroot}/%{macros_file} <> %{buildroot}/%{macros_dir}/macros.ghc < - 0.99-1 +- update for simplified revised Haskell Packaging Guidelines + (https://fedorahosted.org/fpc/ticket/194) +- packaging for without_shared is now done the same way as shared + to make non-shared arch packages same as shared ones: + so all archs will now have base library binary packages +- move spec section metamacros and multiple library packaging macros still + needed for ghc and haskell-platform to new extra subpackage +- drop ghc_add_basepkg_file macro and ghc_exclude_docdir + * Wed Mar 20 2013 Ralf Corsépius - 0.98.1-4 - Remove %%config from %%{_sysconfdir}/rpm/macros.* (https://fedorahosted.org/fpc/ticket/259). From 6910d07de702efed342d7f73b4554a18925e9136 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Apr 2013 20:09:58 +0900 Subject: [PATCH 178/514] for ghc-7.6 use --global-package-db and --no-user-package-db --- ghc-deps.sh | 2 +- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 761cb5f..2725cf7 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -14,7 +14,7 @@ PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" else GHC_PKG="/usr/bin/ghc-pkg" fi diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 428b682..510e9de 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/Packaging:Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-conf} %{!?ghc_without_dynamic:-dynamic} Setup\ +%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:--no-user-package-db} %{!?ghc_without_dynamic:-dynamic} Setup\ ./Setup # check ghc version was rebuilt against self @@ -83,7 +83,7 @@ Requires(post): ghc-compiler = %{ghc_version}\ Requires(postun): ghc-compiler = %{ghc_version}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} -%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : +%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || : # ghc_strip_dynlinked %ghc_strip_dynlinked\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c7700b1..3256865 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -96,6 +96,8 @@ EOF - move spec section metamacros and multiple library packaging macros still needed for ghc and haskell-platform to new extra subpackage - drop ghc_add_basepkg_file macro and ghc_exclude_docdir +- for ghc-7.6 --global-package-db replaces --global-conf and + --no-user-package-db deprecates --no-user-package-conf * Wed Mar 20 2013 Ralf Corsépius - 0.98.1-4 - Remove %%config from %%{_sysconfdir}/rpm/macros.* From 237337a6c6b3299bc6a437446c7f17136fc67ffa Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 24 Apr 2013 16:08:41 +0900 Subject: [PATCH 179/514] fix %cabal -no-user-package-conf error in last commit ghc takes "-no-user-package-db" vs ghc-pkg's "--no-user-package-db" --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 510e9de..02e42c1 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/Packaging:Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:--no-user-package-db} %{!?ghc_without_dynamic:-dynamic} Setup\ +%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_without_dynamic:-dynamic} Setup\ ./Setup # check ghc version was rebuilt against self From 1b2339d4077661e1271e0e2b12cdc6ec4bbf0bf4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 4 May 2013 23:34:41 +0900 Subject: [PATCH 180/514] move configure --htmldir to ghc_lib_build; %ghc_compiler; move %ghc_devel_requires to extra but now I fear that %ghc_compiler needs to be in macros.ghc-srpm for mock/koji --- ghc-rpm-macros.ghc | 16 ++++++---------- ghc-rpm-macros.ghc-extra | 6 ++++++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 02e42c1..f7b31aa 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -66,6 +66,8 @@ done\ # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} +%ghc_compiler ghc-compiler = %{ghc_version} + # create and install package.conf file # cabal_pkg_conf [name] [version] %cabal_pkg_conf()\ @@ -77,14 +79,6 @@ mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %{nil} -# devel pkg basic requires -%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ -Requires(post): ghc-compiler = %{ghc_version}\ -Requires(postun): ghc-compiler = %{ghc_version}\ -Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} - -%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || : - # ghc_strip_dynlinked %ghc_strip_dynlinked\ %if %{undefined __debug_package}\ @@ -100,7 +94,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} @@ -148,6 +142,8 @@ done\ %endif\ %{nil} +%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || : + # - without_hscolour, without_testsuite, and ghc_bootstrapping # need to be set locally in the spec file diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index c778293..1b244b7 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -64,6 +64,12 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} %ghc_devel_files\ %{nil} +# devel pkg basic requires +%ghc_devel_requires Requires: %{ghc_compiler}\ +Requires(post): %{ghc_compiler}\ +Requires(postun): %{ghc_compiler}\ +Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} + # ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version] # -m : meta-package %ghc_devel_package(c:h:l:m)\ From 0dd634c574c825c9f3cfd65dee1f02d7eb13b60b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 7 May 2013 15:40:46 +0900 Subject: [PATCH 181/514] RPATH that needs to be fixed is not always first --- ghc-rpm-macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index f7b31aa..9504f2a 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -133,7 +133,7 @@ for i in %*; do\ PROG=%{buildroot}%{_bindir}/$i\ RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\ case $RPATH in\ - $PDIR*)\ + *$PDIR*)\ NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ chrpath -r $NEWRPATH $PROG\ ;;\ From 6d8c8e6f0c5dbe0885734892a196c1a86c83fa2f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 17 May 2013 17:51:41 +0900 Subject: [PATCH 182/514] drop %ghc_compiler to avoid srpm problems in koji etc --- ghc-rpm-macros.ghc | 2 -- ghc-rpm-macros.ghc-extra | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 9504f2a..2e24f6b 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -66,8 +66,6 @@ done\ # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -%ghc_compiler ghc-compiler = %{ghc_version} - # create and install package.conf file # cabal_pkg_conf [name] [version] %cabal_pkg_conf()\ diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 1b244b7..50d011e 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -65,9 +65,9 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} %{nil} # devel pkg basic requires -%ghc_devel_requires Requires: %{ghc_compiler}\ -Requires(post): %{ghc_compiler}\ -Requires(postun): %{ghc_compiler}\ +%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ +Requires(post): ghc-compiler = %{ghc_version}\ +Requires(postun): ghc-compiler = %{ghc_version}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} # ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version] From 9761c94426d6e161150a6ea6e5b8024590a5aaa1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 5 Jun 2013 12:43:26 +0900 Subject: [PATCH 183/514] drop -h option from extra macros and make -m work again --- ghc-rpm-macros.ghc-extra | 17 +++++++++-------- ghc-rpm-macros.spec | 10 ++++++++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 50d011e..f9a4dba 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -5,8 +5,8 @@ %{?base_doc_files:%doc %base_doc_files}\ %{nil} -# ghc_lib_package [-c cdepslist] [-h pkgdepslist] -%ghc_lib_package(c:h:)\ +# ghc_lib_package [-c cdepslist] +%ghc_lib_package(c:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ %ghc_shared_files\ @@ -32,8 +32,8 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} %description -n %{basepkg}\ %{?common_description}%{!?common_description:Haskell %{pkgname} library.} -# ghc_lib_subpackage [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-x] [name] [version] -%ghc_lib_subpackage(c:h:l:x)\ +# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name] [version] +%ghc_lib_subpackage(c:l:x)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ @@ -68,11 +68,13 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} %ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ Requires(post): ghc-compiler = %{ghc_version}\ Requires(postun): ghc-compiler = %{ghc_version}\ +%if 0%{!?-m:1}\ Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} +%endif -# ghc_devel_package [-c cdepslist] [-h pkgdepslist] [-l licensetag] [-m] [name] [version] +# ghc_devel_package [-c cdepslist] [-l licensetag] [-m] [name] [version] # -m : meta-package -%ghc_devel_package(c:h:l:m)\ +%ghc_devel_package(c:l:m)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define basepkg ghc-%{pkgname}\ @@ -81,7 +83,6 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_devel_requires}\ -%{-h:Requires: %{-h*}}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ @@ -112,7 +113,7 @@ This package contains the development files. %postun -n %{basepkg}-devel\ %ghc_pkg_recache -# ghc_package_devel [-c cdepslist] [-h pkgdepslist] [-l licensetag] [name] [version] +# ghc_package_devel [-c cdepslist] [-l licensetag] [name] [version] %ghc_package_devel(c:h:l:)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define basepkg ghc-%{pkgname}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3256865..cfb2aa9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,12 +6,12 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.99 +Version: 0.99.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3 -URL: https://fedoraproject.org/wiki/Haskell_SIG +URL: https://fedoraproject.org/wiki/Packaging:Haskell # This is a Fedora maintained package, originally made for # the distribution. Hence the source is currently only available @@ -87,6 +87,12 @@ EOF %changelog +* Wed Jun 5 2013 Jens Petersen - 0.99.2-1 +- drop -h option from extra macros and make -m work again + +* Fri May 17 2013 Jens Petersen - 0.99.1-1 +- drop new ghc_compiler macro since it is not good for koji + * Tue Apr 23 2013 Jens Petersen - 0.99-1 - update for simplified revised Haskell Packaging Guidelines (https://fedorahosted.org/fpc/ticket/194) From aae062eae8cbee80a86c1ab1c8a1fa0fbe9a44f5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 5 Jun 2013 12:50:18 +0900 Subject: [PATCH 184/514] fix missing \ in -m conditional --- ghc-rpm-macros.ghc-extra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index f9a4dba..014b877 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -69,7 +69,7 @@ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} Requires(post): ghc-compiler = %{ghc_version}\ Requires(postun): ghc-compiler = %{ghc_version}\ %if 0%{!?-m:1}\ -Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release} +Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ %endif # ghc_devel_package [-c cdepslist] [-l licensetag] [-m] [name] [version] From 80fec1cbd1c8651abeaabedc7b088959999a10f9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 6 Jun 2013 17:57:46 +0900 Subject: [PATCH 185/514] configure builds with ghc -O2 (#880135) --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 2e24f6b..87c0998 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -92,7 +92,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cfb2aa9..1f7e6e1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.99.2 +Version: 0.99.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -87,6 +87,9 @@ EOF %changelog +* Thu Jun 6 2013 Jens Petersen - 0.99.3-1 +- configure builds with ghc -O2 (#880135) + * Wed Jun 5 2013 Jens Petersen - 0.99.2-1 - drop -h option from extra macros and make -m work again From ecaa01415ccd1c35d87831eb15156830242c5a9f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Jun 2013 13:47:03 +0900 Subject: [PATCH 186/514] extra macros cleanup: merge all remaining macros into %ghc_lib_subpackage --- ghc-rpm-macros.ghc-extra | 110 ++++++--------------------------------- 1 file changed, 17 insertions(+), 93 deletions(-) diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 014b877..37b8daa 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -1,88 +1,31 @@ # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- -%ghc_shared_files\ -%files -n %{basepkg} -f %{basepkg}.files\ -%{?base_doc_files:%doc %base_doc_files}\ -%{nil} - -# ghc_lib_package [-c cdepslist] -%ghc_lib_package(c:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%ghc_shared_files\ -\ -%ghc_package_devel\ -%{nil} - -# ghc_package [-l licensetag] [name] [version] -%ghc_package(l:)\ +# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name] [version] +%ghc_lib_subpackage(c:l:x)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ +%define pkgnamever %{pkgname}-%{pkgver}\ +%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} - -# ghc_description [name] [version] -%ghc_description()\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%description -n %{basepkg}\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.} - -# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name] [version] -%ghc_lib_subpackage(c:l:x)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ -%define basepkg ghc-%{pkgname}\ -%ghc_package\ \ -%ghc_description\ +%description -n %{basepkg}\ +This package provides the Haskell %{pkgname} library. \ -%ghc_lib_package\ -%{nil} - -%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-conf || : - -# (deprecated) for docs post and postun -%ghc_reindex_haddock : - -%ghc_devel_files\ -%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ -%{?devel_doc_files:%doc %devel_doc_files}\ -%{nil} - -%ghc_files()\ -%{?1:%define base_doc_files %*}\ -%define basepkg ghc-%{pkg_name}\ -%ghc_shared_files\ +%files -n %{basepkg} -f %{basepkg}.files\ +%{?base_doc_files:%doc %base_doc_files}\ \ -%ghc_devel_files\ -%{nil} - -# devel pkg basic requires -%ghc_devel_requires Requires: ghc-compiler = %{ghc_version}\ -Requires(post): ghc-compiler = %{ghc_version}\ -Requires(postun): ghc-compiler = %{ghc_version}\ -%if 0%{!?-m:1}\ -Requires: ghc-%{?pkg_name}%{!?pkg_name:%{pkgname}} = %{?pkgver}%{!?pkgver:%{version}}-%{release}\ -%endif - -# ghc_devel_package [-c cdepslist] [-l licensetag] [-m] [name] [version] -# -m : meta-package -%ghc_devel_package(c:l:m)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ -%define basepkg ghc-%{pkgname}\ %package -n %{basepkg}-devel\ Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -%{?ghc_devel_requires}\ +Requires(post): ghc-compiler = %{ghc_version}\ +Requires(postun): ghc-compiler = %{ghc_version}\ +Requires: ghc-%{pkgname} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ @@ -92,36 +35,17 @@ Provides: %{basepkg}-doc = %{pkgver}-%{release}\ Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ %if %{undefined without_prof}\ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ -%endif - -# ghc_devel_description -%ghc_devel_description()\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ +%endif\ +\ %description -n %{basepkg}-devel\ -%{?common_description}%{!?common_description:Haskell %{pkgname} library.}\ +This package provides the Haskell %{pkgname} library development files. \ -This package contains the development files. - -# ghc_devel_post_postun -%ghc_devel_post_postun()\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ \ %postun -n %{basepkg}-devel\ -%ghc_pkg_recache - -# ghc_package_devel [-c cdepslist] [-l licensetag] [name] [version] -%ghc_package_devel(c:h:l:)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define basepkg ghc-%{pkgname}\ -%ghc_devel_package\ -\ -%ghc_devel_description\ -\ -%ghc_devel_post_postun\ +%ghc_pkg_recache\ \ -%ghc_devel_files\ +%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ +%{?devel_doc_files:%doc %devel_doc_files}\ %{nil} From 54b338816d8008c030b2f80a73bda035bd7f474a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Jun 2013 13:49:03 +0900 Subject: [PATCH 187/514] merge remaining extra macros into %ghc_lib_subpackage --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1f7e6e1..65c858c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.99.3 +Version: 0.99.4 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -87,6 +87,9 @@ EOF %changelog +* Mon Jun 17 2013 Jens Petersen - 0.99.4-1 +- merge remaining extra macros into ghc_lib_subpackage + * Thu Jun 6 2013 Jens Petersen - 0.99.3-1 - configure builds with ghc -O2 (#880135) From 6dad230ddb940d1c817d23c0ea38421023da8fd9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Jun 2013 13:54:55 +0900 Subject: [PATCH 188/514] extra ghc_lib_subpackage: fix missing backslashes and updates Summary's --- ghc-rpm-macros.ghc-extra | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 37b8daa..7c08aab 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -8,19 +8,16 @@ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library}\ +Summary: Haskell %{pkgname} library\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")} +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ \ %description -n %{basepkg}\ -This package provides the Haskell %{pkgname} library. -\ -%files -n %{basepkg} -f %{basepkg}.files\ -%{?base_doc_files:%doc %base_doc_files}\ +This package provides the Haskell %{pkgname} library.\ \ %package -n %{basepkg}-devel\ -Summary: %{?common_summary}%{!?common_summary:Haskell %{pkgname} library} development files\ +Summary: Haskell %{pkgname} library development files\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Requires(post): ghc-compiler = %{ghc_version}\ @@ -38,7 +35,7 @@ Provides: %{basepkg}-prof = %{pkgver}-%{release}\ %endif\ \ %description -n %{basepkg}-devel\ -This package provides the Haskell %{pkgname} library development files. +This package provides the Haskell %{pkgname} library development files.\ \ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ @@ -46,6 +43,9 @@ This package provides the Haskell %{pkgname} library development files. %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ \ +%files -n %{basepkg} -f %{basepkg}.files\ +%{?base_doc_files:%doc %base_doc_files}\ +\ %files -n %{basepkg}-devel -f %{basepkg}-devel.files\ %{?devel_doc_files:%doc %devel_doc_files}\ %{nil} From 27ddc9ecb2a2906f047ef8866fe4e43c6017f678 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 19 Jun 2013 16:33:44 +0900 Subject: [PATCH 189/514] extra: add %_isa to shared requires --- ghc-rpm-macros.ghc-extra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 7c08aab..632627d 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -22,7 +22,7 @@ Summary: Haskell %{pkgname} library development files\ %{-l:License: %{-l*}}\ Requires(post): ghc-compiler = %{ghc_version}\ Requires(postun): ghc-compiler = %{ghc_version}\ -Requires: ghc-%{pkgname} = %{pkgver}-%{release}\ +Requires: ghc-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ From 3790c3a7fbe037fb334298d89b718d9e8e767dc7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 19 Jun 2013 16:36:17 +0900 Subject: [PATCH 190/514] add --global to %cabal_configure; bump to 1.0 --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 87c0998..e9e8b92 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -92,7 +92,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} --global %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 65c858c..81a1163 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 0.99.4 +Version: 1.0 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -87,6 +87,9 @@ EOF %changelog +* Wed Jun 19 2013 Jens Petersen - 1.0-1 +- add --global to cabal_configure + * Mon Jun 17 2013 Jens Petersen - 0.99.4-1 - merge remaining extra macros into ghc_lib_subpackage From 328fc11463706f93b0cc905f23a685f4685d12c4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 20 Jun 2013 16:36:11 +0900 Subject: [PATCH 191/514] turn off hscolour for bootstrap --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 81a1163..0800789 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,11 +3,11 @@ %global macros_dir %{_sysconfdir}/rpm # uncomment to bootstrap without hscolour -#%%global without_hscolour 1 +%global without_hscolour 1 Name: ghc-rpm-macros Version: 1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3 @@ -87,6 +87,9 @@ EOF %changelog +* Thu Jun 20 2013 Jens Petersen - 1.0-2 +- turn off hscolour for bootstrap + * Wed Jun 19 2013 Jens Petersen - 1.0-1 - add --global to cabal_configure From e08038a4a487ae3a4ded7604f5a256aa3ea050ee Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 20 Jun 2013 17:32:19 +0900 Subject: [PATCH 192/514] reenable hscolour --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0800789..ce9bc47 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -3,11 +3,11 @@ %global macros_dir %{_sysconfdir}/rpm # uncomment to bootstrap without hscolour -%global without_hscolour 1 +#%%global without_hscolour 1 Name: ghc-rpm-macros Version: 1.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3 @@ -87,6 +87,9 @@ EOF %changelog +* Thu Jun 20 2013 Jens Petersen - 1.0-3 +- reenable hscolour + * Thu Jun 20 2013 Jens Petersen - 1.0-2 - turn off hscolour for bootstrap From f0c10c9f1319edbfd4bb3db50b4d307e0c30f8e2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 21 Jun 2013 01:41:43 +0900 Subject: [PATCH 193/514] only configure with --global if not subpackaging libs --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e9e8b92..a58be3c 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -92,7 +92,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} --global %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ce9bc47..cc1031a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0 -Release: 3%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3 @@ -87,6 +87,9 @@ EOF %changelog +* Thu Jun 20 2013 Jens Petersen - 1.0.1-1 +- only configure with --global if not subpackaging libs + * Thu Jun 20 2013 Jens Petersen - 1.0-3 - reenable hscolour @@ -107,6 +110,7 @@ EOF * Fri May 17 2013 Jens Petersen - 0.99.1-1 - drop new ghc_compiler macro since it is not good for koji +- ghc_fix_dynamic_rpath: do not assume first RPATH * Tue Apr 23 2013 Jens Petersen - 0.99-1 - update for simplified revised Haskell Packaging Guidelines From 1b79de9a6f69c3ff716d422646a5ce889d8b5375 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 10 Jul 2013 15:36:54 +0900 Subject: [PATCH 194/514] drop doc/prof obsoletes/provides for subpkgs; clear executable stack flag for exec's - changes are to %ghc_lib_subpackage and %ghc_bin_install --- ghc-rpm-macros.ghc | 3 +++ ghc-rpm-macros.ghc-extra | 7 ------- ghc-rpm-macros.spec | 8 +++++++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index a58be3c..ebbf3ee 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -110,6 +110,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ +%if %{undefined ghc_executable_stack}\ +execstack -c %{_buildroot}%{_bindir}/*\ +%endif\ %{nil} # ghc_lib_install [name] [version] diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 632627d..3cfc35a 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -26,13 +26,6 @@ Requires: ghc-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1-doc/g")}\ -Obsoletes: %{basepkg}-doc < %{pkgver}-%{release}\ -Provides: %{basepkg}-doc = %{pkgver}-%{release}\ -Obsoletes: %{basepkg}-prof < %{pkgver}-%{release}\ -%if %{undefined without_prof}\ -Provides: %{basepkg}-prof = %{pkgver}-%{release}\ -%endif\ \ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cc1031a..4520a86 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.1 +Version: 1.0.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -30,6 +30,8 @@ BuildRequires: redhat-rpm-config ExclusiveArch: %{ghc_arches} Requires: hscolour %endif +# for execstack +Requires: prelink %description A set of macros for building GHC packages following the Haskell Guidelines @@ -87,6 +89,10 @@ EOF %changelog +* Tue Jul 9 2013 Jens Petersen - 1.0.2-1 +- drop doc and prof obsoletes and provides from ghc_lib_subpackage +- clear executable stack flag when installing package executables (#973512) + * Thu Jun 20 2013 Jens Petersen - 1.0.1-1 - only configure with --global if not subpackaging libs From 49912b0df573bb4b2b9c175226bc8fb287055dec Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 10 Jul 2013 16:32:39 +0900 Subject: [PATCH 195/514] add ghc_clear_execstack and use it also in ghc_lib_install --- ghc-rpm-macros.ghc | 21 ++++++++++++--------- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ebbf3ee..e4918c7 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -77,12 +77,6 @@ mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ %{nil} -# ghc_strip_dynlinked -%ghc_strip_dynlinked\ -%if %{undefined __debug_package}\ -find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ -%endif - # ghc_bin_build %ghc_bin_build\ %global debug_package %{nil}\ @@ -104,15 +98,23 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %endif\ %{nil} +# ghc_strip_dynlinked +%ghc_strip_dynlinked\ +%if %{undefined __debug_package}\ +find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ +%endif + +# ghc_clear_execstack +%ghc_clear_execstack\ +find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\; + # install bin package %ghc_bin_install()\ %global _use_internal_dependency_generator 0\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ -%if %{undefined ghc_executable_stack}\ -execstack -c %{_buildroot}%{_bindir}/*\ -%endif\ +%{!?1:%ghc_clear_execstack}\ %{nil} # ghc_lib_install [name] [version] @@ -124,6 +126,7 @@ execstack -c %{_buildroot}%{_bindir}/*\ %cabal_pkg_conf\ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ +%{!?1:%ghc_clear_execstack}\ %{nil} # ghc_fix_dynamic_rpath prog ... diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4520a86..f345e0f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.2 +Version: 1.0.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -89,6 +89,9 @@ EOF %changelog +* Wed Jul 10 2013 Jens Petersen - 1.0.3-1 +- add ghc_clear_execstack and use it also in ghc_lib_install (#973512) + * Tue Jul 9 2013 Jens Petersen - 1.0.2-1 - drop doc and prof obsoletes and provides from ghc_lib_subpackage - clear executable stack flag when installing package executables (#973512) From 2e67bb2ce57f3c470ca4c453ec65c8db65581235 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 11 Jul 2013 10:41:16 +0900 Subject: [PATCH 196/514] check for bindir before looking for executables in ghc_clear_execstack --- ghc-rpm-macros.ghc | 4 +++- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index e4918c7..97317bb 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -106,7 +106,9 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_clear_execstack %ghc_clear_execstack\ -find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\; +if [ -d "%{buildroot}%{_bindir}" ]; then\ +find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\;\ +fi # install bin package %ghc_bin_install()\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f345e0f..71a65d4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.3 +Version: 1.0.4 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -89,8 +89,12 @@ EOF %changelog +* Thu Jul 11 2013 Jens Petersen - 1.0.4-1 +- check for bindir before looking for executables in ghc_clear_execstack + * Wed Jul 10 2013 Jens Petersen - 1.0.3-1 - add ghc_clear_execstack and use it also in ghc_lib_install (#973512) + and require prelink for execstack * Tue Jul 9 2013 Jens Petersen - 1.0.2-1 - drop doc and prof obsoletes and provides from ghc_lib_subpackage From e5c7bca0e86e5aabea3655c6a05ea125dcc8e6db Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 26 Jul 2013 11:40:49 +0900 Subject: [PATCH 197/514] in F20 docdir's are now unversioned https://fedoraproject.org/wiki/Changes/UnversionedDocdirs --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 97317bb..a3c4f94 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 71a65d4..b8c91a2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.4 +Version: 1.0.5 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -89,6 +89,9 @@ EOF %changelog +* Fri Jul 26 2013 Jens Petersen - 1.0.5-1 +- F20 Change: docdir's are now unversioned + * Thu Jul 11 2013 Jens Petersen - 1.0.4-1 - check for bindir before looking for executables in ghc_clear_execstack From 40a7e828d45cffe163b01f6d532ec3acadd94d02 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 26 Jul 2013 12:18:47 +0900 Subject: [PATCH 198/514] also make %ghc_lib_build docdir unversioned require redhat-rpm-config >= 9.1.0-50.fc20 --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index a3c4f94..3afbd90 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -86,7 +86,7 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1-%2 --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b8c91a2..6e5eaa2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.5 +Version: 1.0.6 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -24,7 +24,8 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: ghc-rpm-macros.ghc-extra -Requires: redhat-rpm-config +# ver-rel for unversioned docdir +Requires: redhat-rpm-config >= 9.1.0-50.fc20 %if %{undefined without_hscolour} BuildRequires: redhat-rpm-config ExclusiveArch: %{ghc_arches} @@ -89,6 +90,10 @@ EOF %changelog +* Fri Jul 26 2013 Jens Petersen - 1.0.6-1 +- also make %ghc_lib_build docdir unversioned +- require redhat-rpm-config >= 9.1.0-50.fc20 for unversioned docdir + * Fri Jul 26 2013 Jens Petersen - 1.0.5-1 - F20 Change: docdir's are now unversioned From 8bc7b06720f0c27351c1210800b7c8e06d72c3bb Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 26 Jul 2013 14:34:17 +0900 Subject: [PATCH 199/514] add %ghc_docdir for package's docdir I think rpm or at least redhat-rpm-config should provide such a macro --- ghc-rpm-macros.ghc | 4 +++- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 3afbd90..4dbfdba 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,11 +21,13 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_docdir} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v +# F20 has unversioned docdir's +%ghc_docdir %{_docdir}/%{name} # root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html # libraries doc dir diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6e5eaa2..996515e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.6 +Version: 1.0.7 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Fri Jul 26 2013 Jens Petersen - 1.0.7-1 +- add ghc_docdir for package's docdir since not provided by standard macros + * Fri Jul 26 2013 Jens Petersen - 1.0.6-1 - also make %ghc_lib_build docdir unversioned - require redhat-rpm-config >= 9.1.0-50.fc20 for unversioned docdir From c7830b0a64495e42c995c91061c36f29a2a81640 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Aug 2013 19:31:45 +0900 Subject: [PATCH 200/514] unversion htmldir's like pkg docdir's; drop ghc_docdir --- ghc-rpm-macros.ghc | 8 +++----- ghc-rpm-macros.spec | 6 +++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 4dbfdba..314145a 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,13 +21,11 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_docdir} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_pkgdocdir} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v -# F20 has unversioned docdir's -%ghc_docdir %{_docdir}/%{name} # root dir for ghc docs %ghcdocbasedir %{_docdir}/ghc/html # libraries doc dir @@ -42,7 +40,7 @@ fi %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ -%define docdir %{ghclibdocdir}/%{pkgnamever}\ +%define docdir %{ghclibdocdir}/%{pkgname}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}.files\ @@ -88,7 +86,7 @@ install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 996515e..2be2ee2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.7 +Version: 1.0.8 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,10 @@ EOF %changelog +* Tue Aug 27 2013 Jens Petersen - 1.0.8-1 +- drop ghc_docdir in favor of _pkgdocdir +- no longer version package htmldirs + * Fri Jul 26 2013 Jens Petersen - 1.0.7-1 - add ghc_docdir for package's docdir since not provided by standard macros From a2f7c2b71a0d9a1f7a9791b99dbfe73414857ebd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 7 Sep 2013 22:08:03 +0900 Subject: [PATCH 201/514] update ghc-deps.sh for rts changes as of ghc-7.7.20130828 ghc-7.8 rts now lives in its own subdir --- ghc-deps.sh | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 2725cf7..93cc992 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -36,7 +36,7 @@ files=$(cat) #set -x for i in $files; do - LIB_FILE=$(echo $i | grep /libHS | egrep -v "$PKGBASEDIR/libHS") + LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts") if [ "$LIB_FILE" ]; then if [ -d "$PKGCONFDIR" ]; then META="" @@ -68,7 +68,7 @@ for i in $files; do fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so =.*%\1%") + BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so => .*%\1%") if [ -d "$PKGCONFDIR" ]; then PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2be2ee2..76c391d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.0.8 +Version: 1.1 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Sat Sep 7 2013 Jens Petersen - 1.1-1 +- update ghc-deps.sh to handling ghc-7.8 rts + * Tue Aug 27 2013 Jens Petersen - 1.0.8-1 - drop ghc_docdir in favor of _pkgdocdir - no longer version package htmldirs From db486c2fbbfae7944df448c052f603e8fb7af8d7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 9 Sep 2013 22:55:47 +0900 Subject: [PATCH 202/514] use objdump -p instead of ldd to read executable dependencies hopefully more robust against ghc-7.7's relocatable dynamic linking --- ghc-deps.sh | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 93cc992..67f90d4 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -68,7 +68,7 @@ for i in $files; do fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(ldd $i | grep libHS | grep -v libHSrts | sed -e "s%^\\tlibHS\(.*\)-ghc${GHCVERSION}.so => .*%\1%") + BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ NEEDED *libHS\(.*\)-ghc${GHCVERSION}.so%\1%") if [ -d "$PKGCONFDIR" ]; then PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 76c391d..c9f989e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.1 +Version: 1.1.1 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Mon Sep 9 2013 Jens Petersen - 1.1.1-1 +- use objdump -p instead of ldd to read executable dependencies + * Sat Sep 7 2013 Jens Petersen - 1.1-1 - update ghc-deps.sh to handling ghc-7.8 rts From 0cd6abba00ce715fc5c5877347081311fa195308 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 9 Sep 2013 23:17:35 +0900 Subject: [PATCH 203/514] fix ghc-deps.sh when bootstrapping a new ghc version ie do not assume bindir/ghc is the same ghc version just built --- ghc-deps.sh | 8 +++----- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 67f90d4..23d009f 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -8,6 +8,8 @@ [ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 +#set -x + MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d @@ -29,12 +31,8 @@ if [ -d "$PKGBASEDIR" ]; then SHARED=$(find $PKGBASEDIR -type f -name '*.so') fi -GHCVERSION=$(ghc --numeric-version) - files=$(cat) -#set -x - for i in $files; do LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts") if [ "$LIB_FILE" ]; then @@ -68,7 +66,7 @@ for i in $files; do fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ NEEDED *libHS\(.*\)-ghc${GHCVERSION}.so%\1%") + BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%") if [ -d "$PKGCONFDIR" ]; then PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c9f989e..b33d648 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.1.1 +Version: 1.1.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Mon Sep 9 2013 Jens Petersen - 1.1.2-1 +- fix ghc-deps.sh when bootstrapping a new ghc version + * Mon Sep 9 2013 Jens Petersen - 1.1.1-1 - use objdump -p instead of ldd to read executable dependencies From 795c0c522b5ee53a2b045b724e5031ba39778632 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 10 Sep 2013 12:42:26 +0900 Subject: [PATCH 204/514] ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version ghc-7.7 has bin subdir --- ghc-deps.sh | 9 ++++++--- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 23d009f..28e39a1 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -8,17 +8,20 @@ [ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 -#set -x +set +x MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) -if [ ! -x "/usr/bin/ghc-pkg-${GHC_VER}" -a -x "$PKGBASEDIR/ghc-pkg" ]; then +if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then + # ghc-7.7 + GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" +elif [ -x "$PKGBASEDIR/ghc-pkg" ]; then GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" else - GHC_PKG="/usr/bin/ghc-pkg" + GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}" fi case $MODE in diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b33d648..86ebcb1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.1.2 +Version: 1.1.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Tue Sep 10 2013 Jens Petersen - 1.1.3-1 +- ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version + * Mon Sep 9 2013 Jens Petersen - 1.1.2-1 - fix ghc-deps.sh when bootstrapping a new ghc version From 4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 15 Oct 2013 18:08:08 +0900 Subject: [PATCH 205/514] add ghcpkgdocdir allows for unversioned haddock dirs similarly to _pkgdocdir --- ghc-rpm-macros.ghc | 5 +++-- ghc-rpm-macros.spec | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 314145a..851a978 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -30,6 +30,8 @@ fi %ghcdocbasedir %{_docdir}/ghc/html # libraries doc dir %ghclibdocdir %{ghcdocbasedir}/libraries +# pkg doc dir +%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name} # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} @@ -73,8 +75,7 @@ done\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %cabal register --gen-pkg-config\ -mkdir -p %{buildroot}%{ghclibdir}/package.conf.d\ -install --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d\ +install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\ %{nil} # ghc_bin_build diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 86ebcb1..a6f1e00 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.1.3 +Version: 1.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -57,8 +57,8 @@ echo no build stage needed %install -install -p -D -m 0644 %{SOURCE0} ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc -install -p -D -m 0644 %{SOURCE6} ${RPM_BUILD_ROOT}/%{macros_dir}/macros.ghc-extra +install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc +install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh @@ -90,6 +90,9 @@ EOF %changelog +* Tue Oct 15 2013 Jens Petersen - 1.2-1 +- add ghcpkgdocdir, which like _pkgdocdir allows for unversioned haddock dirs + * Tue Sep 10 2013 Jens Petersen - 1.1.3-1 - ghc-deps.sh: fix ghc-pkg path when bootstrapping new ghc version From 0b2f17698e1faa9c55b957f9ef902be3199e3bd1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 20 Nov 2013 19:44:54 +0900 Subject: [PATCH 206/514] test-rebuild.sh: check branch agrees with installation --- tests/test-rebuild.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index f7f475b..c859180 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -21,10 +21,19 @@ ARCH=$(arch) # exit 1 #fi +eval $(grep VERSION_ID /etc/os-release) +BRANCH="f$VERSION_ID" + +# maybe use BRANCH here too? if [ -n "$2" ]; then fedpkg switch-branch $2 fi +if [ "* $BRANCH" != "$(git branch --list $BRANCH" ]; then + echo "Git branch does not match Fedora installation!" + exit 1 +fi + sudo yum-builddep $PKG.spec fedpkg local From 585415b5d956f511c73b2459eb5f405f2a07102f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 20 Nov 2013 19:46:48 +0900 Subject: [PATCH 207/514] test-rebuild.sh: missing close paren --- tests/test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index c859180..f665523 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -29,7 +29,7 @@ if [ -n "$2" ]; then fedpkg switch-branch $2 fi -if [ "* $BRANCH" != "$(git branch --list $BRANCH" ]; then +if [ "* $BRANCH" != "$(git branch --list $BRANCH)" ]; then echo "Git branch does not match Fedora installation!" exit 1 fi From 493f56fc435d57789d0b8e317b2cde9f4cd30567 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 20 Nov 2013 19:50:50 +0900 Subject: [PATCH 208/514] test-rebuild.sh: drop branch arg and switch to os version branch need to support epel later --- tests/test-rebuild.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index f665523..2c5169f 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -4,7 +4,7 @@ # In a pkg dir run # $ ./test-rebuild.sh # or clone a pkg branch: -# $ ./test-rebuild.sh [pkg] [branch] +# $ ./test-rebuild.sh [pkg] set -e @@ -22,12 +22,12 @@ ARCH=$(arch) #fi eval $(grep VERSION_ID /etc/os-release) -BRANCH="f$VERSION_ID" +case $VERSION_ID in + 21) BRANCH=master ;; + *) BRANCH="f$VERSION_ID" ;; +esac -# maybe use BRANCH here too? -if [ -n "$2" ]; then - fedpkg switch-branch $2 -fi +fedpkg switch-branch $BRANCH if [ "* $BRANCH" != "$(git branch --list $BRANCH)" ]; then echo "Git branch does not match Fedora installation!" From 649621d68ef75aa26c993882154677df5069cc9d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 28 Nov 2013 19:16:42 +0900 Subject: [PATCH 209/514] test-rebuild.sh: epel support --- tests/test-rebuild.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 2c5169f..17d31db 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -21,11 +21,17 @@ ARCH=$(arch) # exit 1 #fi -eval $(grep VERSION_ID /etc/os-release) -case $VERSION_ID in - 21) BRANCH=master ;; - *) BRANCH="f$VERSION_ID" ;; -esac +if [ -f /etc/os-release ]; then + eval $(grep VERSION_ID /etc/os-release) + case $VERSION_ID in + 21) BRANCH=master ;; + 7.*) BRANCH=el7 ;; + *) BRANCH="f$VERSION_ID" ;; + esac +else +# assume RHEL6 + BRANCH=el6 +fi fedpkg switch-branch $BRANCH @@ -34,6 +40,8 @@ if [ "* $BRANCH" != "$(git branch --list $BRANCH)" ]; then exit 1 fi +git pull + sudo yum-builddep $PKG.spec fedpkg local From a7b6b974edb1cc7b98daadada121f74d97bfbf7d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 28 Nov 2013 19:21:31 +0900 Subject: [PATCH 210/514] test-rebuild.sh: el6 git does not have branch --list option --- tests/test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 17d31db..b73d731 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -35,7 +35,7 @@ fi fedpkg switch-branch $BRANCH -if [ "* $BRANCH" != "$(git branch --list $BRANCH)" ]; then +if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then echo "Git branch does not match Fedora installation!" exit 1 fi From 6c6978937a805616a53ee29cc937f1fd0d5c8440 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Jan 2014 10:51:38 +0900 Subject: [PATCH 211/514] cabal-tweak-flag: add flag manual field to enforce flag changes --- cabal-tweak-flag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal-tweak-flag b/cabal-tweak-flag index 2db3a72..a357bd3 100755 --- a/cabal-tweak-flag +++ b/cabal-tweak-flag @@ -47,4 +47,4 @@ if [ ! -f $CABALFILE.orig ]; then BACKUP=.orig fi -sed -i$BACKUP -e "/[Ff]lag *$FLAG/,/[Dd]efault: *$OLD/ s/\([Dd]efault: *\)$OLD/\1$NEW/" $CABALFILE +sed -i$BACKUP -e "/[Ff]lag *$FLAG/,/[Dd]efault: *$OLD/ s/\( \+\)\([Dd]efault:[ \t]*\)$OLD/\1\2$NEW\n\1manual: True/" $CABALFILE From 87a97e89f36afff837aed9a8c8f2ea558161077d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Jan 2014 10:54:19 +0900 Subject: [PATCH 212/514] ghc_fix_dynamic_rpath: abort for non-existent executable name --- ghc-rpm-macros.ghc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 851a978..14c7e93 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -138,13 +138,18 @@ fi PDIR=$(cd ..; pwd)\ for i in %*; do\ PROG=%{buildroot}%{_bindir}/$i\ - RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\ - case $RPATH in\ - *$PDIR*)\ - NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ - chrpath -r $NEWRPATH $PROG\ - ;;\ - esac\ + if [ -x "$PROG" ]; then\ + RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\ + case $RPATH in\ + *$PDIR*)\ + NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ + chrpath -r $NEWRPATH $PROG\ + ;;\ + esac\ + else\ + echo "%ghc_fix_dynamic_rpath: no such file $PROG"\ + exit 1\ + fi\ done\ %endif\ %{nil} From caadeff01678cf5068a96acb3b371b1bfdc932f7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Jan 2014 10:56:25 +0900 Subject: [PATCH 213/514] bump version --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a6f1e00..86b2c80 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2 +Version: 1.2.1 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,10 @@ EOF %changelog +* Fri Jan 10 2014 Jens Petersen - 1.2.1-1 +- ghc_fix_dynamic_rpath: abort for non-existent executable name +- cabal-tweak-flag: add manual field to enforce flag changes + * Tue Oct 15 2013 Jens Petersen - 1.2-1 - add ghcpkgdocdir, which like _pkgdocdir allows for unversioned haddock dirs From 3ec60c7a31e97fda4a3cabe14fdf9bba0aa04e78 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Jan 2014 11:48:58 +0900 Subject: [PATCH 214/514] quote ghc_fix_dynamic_rpath error message --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 14c7e93..b22ca20 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -147,7 +147,7 @@ for i in %*; do\ ;;\ esac\ else\ - echo "%ghc_fix_dynamic_rpath: no such file $PROG"\ + echo "%%ghc_fix_dynamic_rpath: no such file $PROG"\ exit 1\ fi\ done\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 86b2c80..3def8a4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.1 +Version: 1.2.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Fri Jan 10 2014 Jens Petersen - 1.2.2-1 +- quote the ghc_fix_dynamic_rpath error message + * Fri Jan 10 2014 Jens Petersen - 1.2.1-1 - ghc_fix_dynamic_rpath: abort for non-existent executable name - cabal-tweak-flag: add manual field to enforce flag changes From e4c93cb77ec4532e1d04315e4ad7bf86fabd77ab Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 10 Feb 2014 18:36:05 +0900 Subject: [PATCH 215/514] set datasubdir in cabal_configure for ghc-7.8 pkg datadir should not be arch dependent! --- ghc-deps.sh | 2 +- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 28e39a1..324926c 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -16,7 +16,7 @@ PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then - # ghc-7.7 + # ghc-7.8 GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" elif [ -x "$PKGBASEDIR/ghc-pkg" ]; then GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index b22ca20..8eae438 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_pkgdocdir} --libsubdir='$compiler/$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3def8a4..c83708a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.2 +Version: 1.2.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Mon Feb 10 2014 Jens Petersen - 1.2.3-1 +- set datasubdir in cabal_configure for ghc-7.8 + * Fri Jan 10 2014 Jens Petersen - 1.2.2-1 - quote the ghc_fix_dynamic_rpath error message From 98b6135469796a55727cec91835157a3cf492e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 14 Feb 2014 00:02:55 +0200 Subject: [PATCH 216/514] Install macros to %{_rpmconfigdir}/macros.d. https://lists.fedoraproject.org/pipermail/devel/2014-January/195026.html --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c83708a..4e30320 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,13 +1,13 @@ %global debug_package %{nil} -%global macros_dir %{_sysconfdir}/rpm +%global macros_dir %{_rpmconfigdir}/macros.d # uncomment to bootstrap without hscolour #%%global without_hscolour 1 Name: ghc-rpm-macros Version: 1.2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3 @@ -90,6 +90,9 @@ EOF %changelog +* Thu Feb 13 2014 Ville Skyttä - 1.2.3-2 +- Install macros to %%{_rpmconfigdir}/macros.d. + * Mon Feb 10 2014 Jens Petersen - 1.2.3-1 - set datasubdir in cabal_configure for ghc-7.8 From f67d26b5d667a1bc152749f8ad1c3aa89d9ffa24 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 27 Feb 2014 10:32:52 +0900 Subject: [PATCH 217/514] quote %ghc_lib_build in changelog --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4e30320..27636d1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -126,7 +126,7 @@ EOF - add ghc_docdir for package's docdir since not provided by standard macros * Fri Jul 26 2013 Jens Petersen - 1.0.6-1 -- also make %ghc_lib_build docdir unversioned +- also make %%ghc_lib_build docdir unversioned - require redhat-rpm-config >= 9.1.0-50.fc20 for unversioned docdir * Fri Jul 26 2013 Jens Petersen - 1.0.5-1 From 671df918675e2b1f75fab87174d92c72a0ee6531 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Mar 2014 12:24:45 +0900 Subject: [PATCH 218/514] abort ghc_fix_dynamic_rpath if no chrpath --- ghc-rpm-macros.ghc | 1 + ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 8eae438..0cf0f8b 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -135,6 +135,7 @@ fi # ghc_fix_dynamic_rpath prog ... %ghc_fix_dynamic_rpath()\ %if %{undefined ghc_without_dynamic}\ +if ! type chrpath > /dev/null; then exit 1; fi\ PDIR=$(cd ..; pwd)\ for i in %*; do\ PROG=%{buildroot}%{_bindir}/$i\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 27636d1..f39fca6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.3 -Release: 2%{?dist} +Version: 1.2.4 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3 @@ -90,6 +90,9 @@ EOF %changelog +* Mon Mar 17 2014 Jens Petersen - 1.2.4-1 +- abort ghc_fix_dynamic_rpath if no chrpath + * Thu Feb 13 2014 Ville Skyttä - 1.2.3-2 - Install macros to %%{_rpmconfigdir}/macros.d. From 8f2ef1279a0e758d68659792d5fb685116a47762 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 28 Mar 2014 17:40:33 +0900 Subject: [PATCH 219/514] no _pkgdocdir in RHEL7 and docdir path different to F20+ --- ghc-rpm-macros.ghc | 7 ++++--- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 0cf0f8b..7008bfa 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1 --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ %cabal build\ %{nil} @@ -133,6 +133,7 @@ fi %{nil} # ghc_fix_dynamic_rpath prog ... +# (assumes cwd = pkg_name!) %ghc_fix_dynamic_rpath()\ %if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ @@ -140,7 +141,7 @@ PDIR=$(cd ..; pwd)\ for i in %*; do\ PROG=%{buildroot}%{_bindir}/$i\ if [ -x "$PROG" ]; then\ - RPATH=$(chrpath $PROG| sed -e "s@^$PROG: RPATH=@@")\ + RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\ case $RPATH in\ *$PDIR*)\ NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f39fca6..53b2a70 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.4 +Version: 1.2.5 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -90,6 +90,9 @@ EOF %changelog +* Fri Mar 28 2014 Jens Petersen - 1.2.5-1 +- handle no _pkgdocdir in RHEL7 and docdir path different to F20+ + * Mon Mar 17 2014 Jens Petersen - 1.2.4-1 - abort ghc_fix_dynamic_rpath if no chrpath From eaa615f94882ccb472aa5817bf78a9105670ff08 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 28 Apr 2014 19:16:03 +0900 Subject: [PATCH 220/514] move macros.ghc-srpm from redhat-rpm-config to new ghc-srpm-macros update license tag to GPLv3+ --- ghc-rpm-macros.ghc-srpm | 3 +++ ghc-rpm-macros.spec | 29 +++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 ghc-rpm-macros.ghc-srpm diff --git a/ghc-rpm-macros.ghc-srpm b/ghc-rpm-macros.ghc-srpm new file mode 100644 index 0000000..80b8468 --- /dev/null +++ b/ghc-rpm-macros.ghc-srpm @@ -0,0 +1,3 @@ +# Macros needed for building srpms of Haskell packages + +%ghc_arches_with_ghci %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 53b2a70..08e5f6d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,11 +6,11 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.5 +Version: 1.2.6 Release: 1%{?dist} Summary: RPM macros for building packages for GHC -License: GPLv3 +License: GPLv3+ URL: https://fedoraproject.org/wiki/Packaging:Haskell # This is a Fedora maintained package, originally made for @@ -24,11 +24,12 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: ghc-rpm-macros.ghc-extra +Source7: ghc-rpm-macros.ghc-srpm # ver-rel for unversioned docdir Requires: redhat-rpm-config >= 9.1.0-50.fc20 %if %{undefined without_hscolour} BuildRequires: redhat-rpm-config -ExclusiveArch: %{ghc_arches} +ExclusiveArch: %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x Requires: hscolour %endif # for execstack @@ -41,10 +42,20 @@ these macros. %package extra -Summary: Extra RPM macros for building Haskell packages with several libs +Summary: Extra RPM macros for building Haskell library subpackages Requires: %{name} = %{version}-%{release} %description extra +Extra macros used for subpackaging of Haskell libraries, +for example in ghc and haskell-platform. + + +%package -n ghc-srpm-macros +Summary: RPM macros for building Haskell source packages +Requires: %{name} = %{version}-%{release} + +%description -n ghc-srpm-macros +Macros used when generating source Haskell rpm packages. %prep @@ -59,6 +70,7 @@ echo no build stage needed %install install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra +install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{macros_dir}/macros.ghc-srpm install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh @@ -89,7 +101,16 @@ EOF %{macros_dir}/macros.ghc-extra +%files -n ghc-srpm-macros +%{macros_dir}/macros.ghc-srpm + + %changelog +* Mon Apr 28 2014 Jens Petersen - 1.2.6-1 +- move macros.ghc-srpm from redhat-rpm-config to new ghc-srpm-macros subpackage: + defines ghc_arches_with_ghci and drops no longer used ghc_arches (#1089102) +- update license tag to GPLv3+ + * Fri Mar 28 2014 Jens Petersen - 1.2.5-1 - handle no _pkgdocdir in RHEL7 and docdir path different to F20+ From 48199c851a2c672494e295b3cbfc4eded20c3a11 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 30 Apr 2014 12:44:15 +0900 Subject: [PATCH 221/514] fix new requires, build on all archs and make hscolour conditional on arch - ghc-srpm-macros subpackage noarch - set Url field when generating subpackages --- ghc-rpm-macros.ghc-extra | 1 + ghc-rpm-macros.spec | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.ghc-extra b/ghc-rpm-macros.ghc-extra index 3cfc35a..554c57d 100644 --- a/ghc-rpm-macros.ghc-extra +++ b/ghc-rpm-macros.ghc-extra @@ -11,6 +11,7 @@ Summary: Haskell %{pkgname} library\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ +Url: http://hackage.haskell.org/package/%{pkgname}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ \ %description -n %{basepkg}\ diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 08e5f6d..b1996a3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.6 +Version: 1.2.7 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -25,13 +25,14 @@ Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: ghc-rpm-macros.ghc-extra Source7: ghc-rpm-macros.ghc-srpm -# ver-rel for unversioned docdir -Requires: redhat-rpm-config >= 9.1.0-50.fc20 +Requires: ghc-srpm-macros = %{version}-%{release} +# macros.ghc-srpm moved out from redhat-rpm-config-21 +Requires: redhat-rpm-config > 20-1.fc21 %if %{undefined without_hscolour} -BuildRequires: redhat-rpm-config -ExclusiveArch: %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x +%ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x Requires: hscolour %endif +%endif # for execstack Requires: prelink @@ -52,7 +53,8 @@ for example in ghc and haskell-platform. %package -n ghc-srpm-macros Summary: RPM macros for building Haskell source packages -Requires: %{name} = %{version}-%{release} +BuildArch: noarch + %description -n ghc-srpm-macros Macros used when generating source Haskell rpm packages. @@ -106,6 +108,13 @@ EOF %changelog +* Wed Apr 30 2014 Jens Petersen - 1.2.7-1 +- ghc-rpm-macros requires ghc-srpm-macros +- ghc-srpm-macros does not require ghc-rpm-macros +- drop ExclusiveArch and make hscolour requires arch conditional +- make ghc-srpm-macros subpackage noarch +- set Url field when generating subpackages + * Mon Apr 28 2014 Jens Petersen - 1.2.6-1 - move macros.ghc-srpm from redhat-rpm-config to new ghc-srpm-macros subpackage: defines ghc_arches_with_ghci and drops no longer used ghc_arches (#1089102) From e67c7efd4da020a6421fba2ae0487b43057b27b9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 13 May 2014 18:29:22 +0900 Subject: [PATCH 222/514] use -O2 also for executable (Bin) packages and allow it to be overrided --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 7008bfa..4a28def 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} --ghc-option=-O2 %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} --ghc-option=-O2\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b1996a3..9e587d0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.7 +Version: 1.2.8 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -108,6 +108,9 @@ EOF %changelog +* Tue May 13 2014 Jens Petersen - 1.2.8-1 +- use -O2 also for executable (Bin) packages and allow it to be overrided + * Wed Apr 30 2014 Jens Petersen - 1.2.7-1 - ghc-rpm-macros requires ghc-srpm-macros - ghc-srpm-macros does not require ghc-rpm-macros From 0273f7e1eb54619b8240efe964afd4909084cc9c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 16 May 2014 23:25:42 +0900 Subject: [PATCH 223/514] enable configure bcond check for tests --- ghc-rpm-macros.ghc | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index 4a28def..ad6bcfc 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} %{?with_tests:--enable-tests}\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9e587d0..764922a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.8 +Version: 1.2.9 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -108,6 +108,9 @@ EOF %changelog +* Fri May 16 2014 Jens Petersen - 1.2.9-1 +- enable configure bcond check for tests + * Tue May 13 2014 Jens Petersen - 1.2.8-1 - use -O2 also for executable (Bin) packages and allow it to be overrided From 972cb47448c292bcb8593bcfa03abc795ce979a0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 16 May 2014 23:47:47 +0900 Subject: [PATCH 224/514] do bcond cabal configure --enable-tests for both Bin and Lib pkgs --- ghc-rpm-macros.ghc | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.ghc b/ghc-rpm-macros.ghc index ad6bcfc..ec199a9 100644 --- a/ghc-rpm-macros.ghc +++ b/ghc-rpm-macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} --ghc-option=-O2 %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} --ghc-option=-O2 %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci} %{?with_tests:--enable-tests}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 764922a..16b41fb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.9 +Version: 1.2.10 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -108,6 +108,9 @@ EOF %changelog +* Fri May 16 2014 Jens Petersen - 1.2.10-1 +- do bcond cabal configure --enable-tests also for Bin packages + * Fri May 16 2014 Jens Petersen - 1.2.9-1 - enable configure bcond check for tests From e3136771b3663d6f90af82487a8292d9251793b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 May 2014 17:29:11 +0900 Subject: [PATCH 225/514] rename macros source files removing ghc-rpm- prefix --- ghc-rpm-macros.spec | 6 +++--- ghc-rpm-macros.ghc => macros.ghc | 0 ghc-rpm-macros.ghc-extra => macros.ghc-extra | 0 ghc-rpm-macros.ghc-srpm => macros.ghc-srpm | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename ghc-rpm-macros.ghc => macros.ghc (100%) rename ghc-rpm-macros.ghc-extra => macros.ghc-extra (100%) rename ghc-rpm-macros.ghc-srpm => macros.ghc-srpm (100%) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 16b41fb..948b60f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -17,14 +17,14 @@ URL: https://fedoraproject.org/wiki/Packaging:Haskell # the distribution. Hence the source is currently only available # from this package. But it could be hosted on fedorahosted.org # for example if other rpm distros would prefer that. -Source0: ghc-rpm-macros.ghc +Source0: macros.ghc Source1: COPYING Source2: AUTHORS Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag -Source6: ghc-rpm-macros.ghc-extra -Source7: ghc-rpm-macros.ghc-srpm +Source6: macros.ghc-extra +Source7: macros.ghc-srpm Requires: ghc-srpm-macros = %{version}-%{release} # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 diff --git a/ghc-rpm-macros.ghc b/macros.ghc similarity index 100% rename from ghc-rpm-macros.ghc rename to macros.ghc diff --git a/ghc-rpm-macros.ghc-extra b/macros.ghc-extra similarity index 100% rename from ghc-rpm-macros.ghc-extra rename to macros.ghc-extra diff --git a/ghc-rpm-macros.ghc-srpm b/macros.ghc-srpm similarity index 100% rename from ghc-rpm-macros.ghc-srpm rename to macros.ghc-srpm From e91dddece5ca81e3ee840e67125a5123ba92df7a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 21 May 2014 09:21:45 -0500 Subject: [PATCH 226/514] add %ghc_arches back to macros.ghc-srpm to maintain compatability with - existing specs --- ghc-rpm-macros.spec | 6 +++++- macros.ghc-srpm | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 948b60f..1ce08d3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.2.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -108,6 +108,10 @@ EOF %changelog +* Wed May 21 2014 Dennis Gilmore - 1.2.10-2 +- add %%ghc_arches back to macros.ghc-srpm to maintain compatability with +- existing specs + * Fri May 16 2014 Jens Petersen - 1.2.10-1 - do bcond cabal configure --enable-tests also for Bin packages diff --git a/macros.ghc-srpm b/macros.ghc-srpm index 80b8468..6cc1eed 100644 --- a/macros.ghc-srpm +++ b/macros.ghc-srpm @@ -1,3 +1,4 @@ # Macros needed for building srpms of Haskell packages %ghc_arches_with_ghci %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel +%ghc_arches %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel From 69ab773f59dc7d5a46c80182480813f2dfd51900 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 30 May 2014 18:25:07 +0900 Subject: [PATCH 227/514] condition use of execstack since no prelink on ppc64le or arm64 --- ghc-rpm-macros.spec | 11 ++++++++--- macros.ghc | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1ce08d3..c8d8feb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.10 -Release: 2%{?dist} +Version: 1.2.11 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -33,8 +33,10 @@ Requires: redhat-rpm-config > 20-1.fc21 Requires: hscolour %endif %endif -# for execstack +# for execstack (hack not needed for ghc-7.8) +%ifnarch ppc64le aarch64 Requires: prelink +%endif %description A set of macros for building GHC packages following the Haskell Guidelines @@ -108,6 +110,9 @@ EOF %changelog +* Fri May 30 2014 Jens Petersen - 1.2.9-1 +- condition use of execstack since no prelink on ppc64le or arm64 + * Wed May 21 2014 Dennis Gilmore - 1.2.10-2 - add %%ghc_arches back to macros.ghc-srpm to maintain compatability with - existing specs diff --git a/macros.ghc b/macros.ghc index ec199a9..d963cc8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -107,8 +107,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_clear_execstack %ghc_clear_execstack\ -if [ -d "%{buildroot}%{_bindir}" ]; then\ -find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\;\ +if [ -d "%{buildroot}%{_bindir}" -a -x "%{_bindir}/execstack" ]; then\ +find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec %{_bindir}/execstack -c "{}" \\;\ fi # install bin package From 06868afd577c390d7336068083692001d596376c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 1 Jun 2014 17:42:43 +0900 Subject: [PATCH 228/514] fix version in latest changelog --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c8d8feb..3b00017 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -110,7 +110,7 @@ EOF %changelog -* Fri May 30 2014 Jens Petersen - 1.2.9-1 +* Fri May 30 2014 Jens Petersen - 1.2.11-1 - condition use of execstack since no prelink on ppc64le or arm64 * Wed May 21 2014 Dennis Gilmore - 1.2.10-2 From 72f890df77c557a30f572694e2c15fa13b08c3df Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 1 Jun 2014 17:53:42 +0900 Subject: [PATCH 229/514] adding missing ppc64 and s390* archs and new ppc64le to ghc_arches --- ghc-rpm-macros.spec | 6 +++++- macros.ghc-srpm | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3b00017..ec555dc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.11 +Version: 1.2.12 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -110,6 +110,10 @@ EOF %changelog +* Sun Jun 1 2014 Jens Petersen - 1.2.12-1 +- add missing ppc64, s390, and s390x to ghc_arches +- add new ppc64le to ghc_arches + * Fri May 30 2014 Jens Petersen - 1.2.11-1 - condition use of execstack since no prelink on ppc64le or arm64 diff --git a/macros.ghc-srpm b/macros.ghc-srpm index 6cc1eed..dda1a7f 100644 --- a/macros.ghc-srpm +++ b/macros.ghc-srpm @@ -1,4 +1,6 @@ # Macros needed for building srpms of Haskell packages -%ghc_arches_with_ghci %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel -%ghc_arches %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel +# old archs: alpha sparcv9 + +%ghc_arches_with_ghci %{ix86} x86_64 ppc armv7hl armv5tel +%ghc_arches %{ix86} x86_64 ppc ppc64 ppc64le armv7hl armv5tel s390 s390x From 4ef4fab22830311d5c3c6b0b2088218df93c810e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 6 Jun 2014 19:57:00 +0900 Subject: [PATCH 230/514] add aarch64; and ppc64le hscolour --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc-srpm | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ec555dc..7acf9c2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.12 +Version: 1.2.13 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -29,7 +29,7 @@ Requires: ghc-srpm-macros = %{version}-%{release} # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 %if %{undefined without_hscolour} -%ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x +%ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 Requires: hscolour %endif %endif @@ -110,6 +110,9 @@ EOF %changelog +* Fri Jun 6 2014 Jens Petersen - 1.2.13-1 +- add aarch64 + * Sun Jun 1 2014 Jens Petersen - 1.2.12-1 - add missing ppc64, s390, and s390x to ghc_arches - add new ppc64le to ghc_arches diff --git a/macros.ghc-srpm b/macros.ghc-srpm index dda1a7f..f07ed60 100644 --- a/macros.ghc-srpm +++ b/macros.ghc-srpm @@ -3,4 +3,4 @@ # old archs: alpha sparcv9 %ghc_arches_with_ghci %{ix86} x86_64 ppc armv7hl armv5tel -%ghc_arches %{ix86} x86_64 ppc ppc64 ppc64le armv7hl armv5tel s390 s390x +%ghc_arches %{ix86} x86_64 ppc ppc64 ppc64le armv7hl armv5tel aarch64 s390 s390x From 88337f50f50bdc31c2eeec218366666d5a2996f0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 27 Jun 2014 10:57:08 +0900 Subject: [PATCH 231/514] macros.ghc-srpm moved to separate ghc-srpm-macros src package --- ghc-rpm-macros.spec | 22 +++++----------------- macros.ghc-srpm | 6 ------ 2 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 macros.ghc-srpm diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7acf9c2..4a44d54 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.2.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -24,8 +24,7 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: macros.ghc-extra -Source7: macros.ghc-srpm -Requires: ghc-srpm-macros = %{version}-%{release} +Requires: ghc-srpm-macros # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 %if %{undefined without_hscolour} @@ -53,15 +52,6 @@ Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. -%package -n ghc-srpm-macros -Summary: RPM macros for building Haskell source packages -BuildArch: noarch - - -%description -n ghc-srpm-macros -Macros used when generating source Haskell rpm packages. - - %prep %setup -c -T cp %{SOURCE1} %{SOURCE2} . @@ -74,7 +64,6 @@ echo no build stage needed %install install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra -install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{macros_dir}/macros.ghc-srpm install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh @@ -105,11 +94,10 @@ EOF %{macros_dir}/macros.ghc-extra -%files -n ghc-srpm-macros -%{macros_dir}/macros.ghc-srpm - - %changelog +* Fri Jun 27 2014 Jens Petersen - 1.2.13-2 +- ghc-srpm-macros is now a separate source package + * Fri Jun 6 2014 Jens Petersen - 1.2.13-1 - add aarch64 diff --git a/macros.ghc-srpm b/macros.ghc-srpm deleted file mode 100644 index f07ed60..0000000 --- a/macros.ghc-srpm +++ /dev/null @@ -1,6 +0,0 @@ -# Macros needed for building srpms of Haskell packages - -# old archs: alpha sparcv9 - -%ghc_arches_with_ghci %{ix86} x86_64 ppc armv7hl armv5tel -%ghc_arches %{ix86} x86_64 ppc ppc64 ppc64le armv7hl armv5tel aarch64 s390 s390x From 859890033394e8e7398af0893ba8cb605129aace Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 3 Aug 2014 23:29:14 +0900 Subject: [PATCH 232/514] ready for ghc-7.8: no longer need execstack hack nor disable dyn on non-intel --- ghc-rpm-macros.spec | 24 +++++++----------------- macros.ghc | 22 ++++------------------ 2 files changed, 11 insertions(+), 35 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4a44d54..e377f86 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.13 -Release: 2%{?dist} +Version: 1.3.0 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -32,10 +32,6 @@ Requires: redhat-rpm-config > 20-1.fc21 Requires: hscolour %endif %endif -# for execstack (hack not needed for ghc-7.8) -%ifnarch ppc64le aarch64 -Requires: prelink -%endif %description A set of macros for building GHC packages following the Haskell Guidelines @@ -70,17 +66,6 @@ install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag -# this is why this package is now arch-dependent: -# turn off shared libs and dynamic linking on secondary archs -%ifnarch %{ix86} x86_64 -cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.3.0-1 +- shared libs available for all archs in ghc-7.8 +- cabal_configure --disable-shared with ghc_without_shared +- ghc_clear_execstack no longer needed + * Fri Jun 27 2014 Jens Petersen - 1.2.13-2 - ghc-srpm-macros is now a separate source package diff --git a/macros.ghc b/macros.ghc index d963cc8..b3aeab3 100644 --- a/macros.ghc +++ b/macros.ghc @@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} @@ -105,19 +105,12 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ %endif -# ghc_clear_execstack -%ghc_clear_execstack\ -if [ -d "%{buildroot}%{_bindir}" -a -x "%{_bindir}/execstack" ]; then\ -find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec %{_bindir}/execstack -c "{}" \\;\ -fi - # install bin package %ghc_bin_install()\ %global _use_internal_dependency_generator 0\ %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ -%{!?1:%ghc_clear_execstack}\ %{nil} # ghc_lib_install [name] [version] @@ -129,11 +122,10 @@ fi %cabal_pkg_conf\ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ -%{!?1:%ghc_clear_execstack}\ %{nil} # ghc_fix_dynamic_rpath prog ... -# (assumes cwd = pkg_name!) +# (assumes cwd = pkg_name !) %ghc_fix_dynamic_rpath()\ %if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ @@ -161,14 +153,8 @@ done\ # - without_hscolour, without_testsuite, and ghc_bootstrapping # need to be set locally in the spec file -# skip prof libs, and documentation -%ghc_test\ +# skip prof libs and documentation +%ghc_bootstrap\ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 - -# skip shared and prof libs, documentation, and testsuite -%ghc_bootstrap\ -%global ghc_without_shared 1\ -%global ghc_without_dynamic 1\ -%ghc_test From c4f882c42c4f3490e8760fd280af99df8ca7fda6 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 15:44:07 +0000 Subject: [PATCH 233/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e377f86..e1bbd3a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.3.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -80,6 +80,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Aug 2 2014 Jens Petersen - 1.3.0-1 - shared libs available for all archs in ghc-7.8 - cabal_configure --disable-shared with ghc_without_shared From 7a5198b86befdaad91eb97320bd7d1ab81d5a813 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 20 Aug 2014 22:09:31 +0900 Subject: [PATCH 234/514] fix warning in macros.ghc-extra about unused %pkgnamever --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc-extra | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e1bbd3a..f2569e4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.0 -Release: 2%{?dist} +Version: 1.3.1 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -80,6 +80,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Wed Aug 20 2014 Jens Petersen - 1.3.1-1 +- fix warning in macros.ghc-extra about unused pkgnamever + * Sat Aug 16 2014 Fedora Release Engineering - 1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/macros.ghc-extra b/macros.ghc-extra index 554c57d..ae9e87b 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -4,8 +4,7 @@ %ghc_lib_subpackage(c:l:x)\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -%define pkgnamever %{pkgname}-%{pkgver}\ -%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgnamever}}}\ +%{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define basepkg ghc-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ From d02dbabc22293de8290c26e9a3be735201c0c5ae Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 21 Aug 2014 15:34:31 +0900 Subject: [PATCH 235/514] add ghc.attr for running ghc-deps.sh and use internal rpm dep generator - update test-rebuild.sh to f22 for master --- ghc-deps.sh | 2 -- ghc-rpm-macros.spec | 10 +++++++++- ghc.attr | 3 +++ macros.ghc | 5 ----- tests/test-rebuild.sh | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 ghc.attr diff --git a/ghc-deps.sh b/ghc-deps.sh index 324926c..9186ca1 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -80,5 +80,3 @@ for i in $files; do fi fi done - -echo $files | tr [:blank:] '\n' | /usr/lib/rpm/rpmdeps $MODE diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f2569e4..c686dd8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.1 +Version: 1.3.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -24,6 +24,7 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: macros.ghc-extra +Source7: ghc.attr Requires: ghc-srpm-macros # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 @@ -62,6 +63,7 @@ install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh +install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag @@ -70,6 +72,7 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %files %doc COPYING AUTHORS %{macros_dir}/macros.ghc +%{_prefix}/lib/rpm/fileattrs/ghc.attr %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag @@ -80,6 +83,11 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Thu Aug 21 2014 Jens Petersen - 1.3.2-1 +- add an rpm .attr file for ghc-deps.sh rather than running it + as an external dep generator (#1132275) + (see http://rpm.org/wiki/PackagerDocs/DependencyGenerator) + * Wed Aug 20 2014 Jens Petersen - 1.3.1-1 - fix warning in macros.ghc-extra about unused pkgnamever diff --git a/ghc.attr b/ghc.attr new file mode 100644 index 0000000..9f638d0 --- /dev/null +++ b/ghc.attr @@ -0,0 +1,3 @@ +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a) diff --git a/macros.ghc b/macros.ghc index b3aeab3..f86b07c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -107,17 +107,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # install bin package %ghc_bin_install()\ -%global _use_internal_dependency_generator 0\ -%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ %{nil} # ghc_lib_install [name] [version] %ghc_lib_install()\ -%global _use_internal_dependency_generator 0\ -%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}\ -%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\ %cabal_install\ %cabal_pkg_conf\ %ghc_gen_filelists\ diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index b73d731..038ed0a 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -24,7 +24,7 @@ ARCH=$(arch) if [ -f /etc/os-release ]; then eval $(grep VERSION_ID /etc/os-release) case $VERSION_ID in - 21) BRANCH=master ;; + 22) BRANCH=master ;; 7.*) BRANCH=el7 ;; *) BRANCH="f$VERSION_ID" ;; esac From 8479b0785370a5403b91010a9b198bfcfada31da Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Aug 2014 11:48:32 +0900 Subject: [PATCH 236/514] disable shared/dyn for non-intel until we move to ghc-7.8 --- ghc-rpm-macros.spec | 16 +++++++++++++++- macros.ghc | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c686dd8..f0162fc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.2 +Version: 1.3.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -68,6 +68,16 @@ install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.a install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag +# turn off shared libs and dynamic linking on secondary archs +%ifnarch %{ix86} x86_64 +cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.3.3-1 +- temporarily revert to ghc-7.6 config for shared libs + until we move to ghc-7.8 + * Thu Aug 21 2014 Jens Petersen - 1.3.2-1 - add an rpm .attr file for ghc-deps.sh rather than running it as an external dep generator (#1132275) diff --git a/macros.ghc b/macros.ghc index f86b07c..2420624 100644 --- a/macros.ghc +++ b/macros.ghc @@ -87,7 +87,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 19ad5a530b003568876a95e230ad84aa9ce420aa Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 28 Aug 2014 17:34:35 +0900 Subject: [PATCH 237/514] drop -O2 for ghc-7.8 it uses too much build mem eg - highlighting-kate OOM with 4GB ram - happy needs > 3GB --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f0162fc..efaba1e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.3 +Version: 1.3.4 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -93,6 +93,9 @@ EOF %changelog +* Thu Aug 28 2014 Jens Petersen - 1.3.4-1 +- drop -O2 for ghc-7.8: it uses too much build mem + * Fri Aug 22 2014 Jens Petersen - 1.3.3-1 - temporarily revert to ghc-7.6 config for shared libs until we move to ghc-7.8 diff --git a/macros.ghc b/macros.ghc index 2420624..d45ce18 100644 --- a/macros.ghc +++ b/macros.ghc @@ -21,7 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} --ghc-option=-O2 %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v From 3efe41dd0c4e6d19be5180d2ab5e2ece35a67ff9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 29 Aug 2014 16:04:33 +0900 Subject: [PATCH 238/514] no longer disable debuginfo by default cblrpm checks if there are C files in a package if not it disables debuginfo --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index efaba1e..6aec82c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.4 +Version: 1.3.5 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -93,6 +93,10 @@ EOF %changelog +* Fri Aug 29 2014 Jens Petersen - 1.3.5-1 +- no longer disable debuginfo by default: + packages now need to explicitly opt out of debuginfo if appropriate + * Thu Aug 28 2014 Jens Petersen - 1.3.4-1 - drop -O2 for ghc-7.8: it uses too much build mem diff --git a/macros.ghc b/macros.ghc index d45ce18..0b561a4 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,13 +80,11 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_bin_build %ghc_bin_build\ -%global debug_package %{nil}\ %cabal_configure\ %cabal build # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ -%global debug_package %{nil}\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 2da26f9db56515862de9839f12a17be5f2ed2eb7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 10 Sep 2014 16:07:29 +0900 Subject: [PATCH 239/514] improve %ghc_fix_dynamic_rpath not to assume cwd = pkg_name --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6aec82c..8e0c30f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.5 +Version: 1.3.6 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -93,6 +93,9 @@ EOF %changelog +* Wed Sep 10 2014 Jens Petersen - 1.3.6-1 +- improve ghc_fix_dynamic_rpath not to assume cwd = pkg_name + * Fri Aug 29 2014 Jens Petersen - 1.3.5-1 - no longer disable debuginfo by default: packages now need to explicitly opt out of debuginfo if appropriate diff --git a/macros.ghc b/macros.ghc index 0b561a4..dadd68c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -118,18 +118,17 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{nil} # ghc_fix_dynamic_rpath prog ... -# (assumes cwd = pkg_name !) %ghc_fix_dynamic_rpath()\ %if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ -PDIR=$(cd ..; pwd)\ +PDIR=$(pwd)\ for i in %*; do\ PROG=%{buildroot}%{_bindir}/$i\ if [ -x "$PROG" ]; then\ RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\ case $RPATH in\ *$PDIR*)\ - NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR@%{ghclibdir}@g" -e "s@/dist/build@@g")\ + NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ chrpath -r $NEWRPATH $PROG\ ;;\ esac\ From 33502e39eb7330e2de440742cb3728d812754694 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 16 Oct 2014 15:51:29 +0900 Subject: [PATCH 240/514] ghc.attr needs to handle requires for /usr/bin files too --- ghc-rpm-macros.spec | 5 ++++- ghc.attr | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8e0c30f..1b50f73 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.6 +Version: 1.3.7 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -93,6 +93,9 @@ EOF %changelog +* Mon Sep 29 2014 Jens Petersen - 1.3.7-1 +- ghc.attr needs to handle requires for /usr/bin files too + * Wed Sep 10 2014 Jens Petersen - 1.3.6-1 - improve ghc_fix_dynamic_rpath not to assume cwd = pkg_name diff --git a/ghc.attr b/ghc.attr index 9f638d0..1a4f6b7 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ %__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a) +%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a) || ^%{_bindir}/.* From 9914f51b1b8e8e9caa3131f8c0acc313c969a551 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 16 Oct 2014 17:04:18 +0900 Subject: [PATCH 241/514] add $ to ghc.attr library path; update changelog date --- ghc-rpm-macros.spec | 2 +- ghc.attr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1b50f73..bfff899 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -93,7 +93,7 @@ EOF %changelog -* Mon Sep 29 2014 Jens Petersen - 1.3.7-1 +* Thu Oct 16 2014 Jens Petersen - 1.3.7-1 - ghc.attr needs to handle requires for /usr/bin files too * Wed Sep 10 2014 Jens Petersen - 1.3.6-1 diff --git a/ghc.attr b/ghc.attr index 1a4f6b7..4a34f03 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ %__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a) || ^%{_bindir}/.* +%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ || ^%{_bindir}/.* From 87f872d02bf8cc675f5dab8b4885ee0faa6fbff0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 23 Oct 2014 15:48:27 +0900 Subject: [PATCH 242/514] ghc-deps.sh: also support ghc-pkg for ghc build before 7.6 Now test for "%buildroot%_bindir/ghc-pkg-$GHC_VER" and if it exists it means we are doing a ghc build and then condition on GHC_VER to set GHC_PKG. Otherwise just use %_bindir/ghc-pkg-$GHC_VER as usual. There are 3 cases: 7.8, 7.6, and earlier. --- ghc-deps.sh | 25 +++++++++++++++---------- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 9186ca1..e3a681e 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,11 +1,6 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -# To use add the following lines to spec file: -# %define _use_internal_dependency_generator 0 -# %define __find_requires /usr/lib/rpm/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -# %define __find_provides /usr/lib/rpm/ghc-deps.sh --provides %{buildroot}%{ghclibdir} - [ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 set +x @@ -15,11 +10,21 @@ PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) -if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then - # ghc-7.8 - GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" -elif [ -x "$PKGBASEDIR/ghc-pkg" ]; then - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" +# for a ghc build use the new ghc-pkg +INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER + +if [ -x "$INPLACE_GHCPKG" ]; then + case $GHC_VER in + 7.8.*) + GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" + ;; + 7.6.*) + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" + ;; + *) + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" + ;; + esac else GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index bfff899..c8e26d5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.7 +Version: 1.3.8 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -93,6 +93,9 @@ EOF %changelog +* Thu Oct 23 2014 Jens Petersen - 1.3.8-1 +- ghc-deps.sh: support ghc-pkg for ghc build <= 7.4.2 as well + * Thu Oct 16 2014 Jens Petersen - 1.3.7-1 - ghc.attr needs to handle requires for /usr/bin files too From 83e7a4f045d8d2cf9507414b04de1281bbcda400 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 27 Oct 2014 11:52:15 +0900 Subject: [PATCH 243/514] pass CFLAGS and LDFLAGS to ghc via %cabal_configure thanks to Ville for pushing for this in #1138982 and Sergei Trofimovich for explaining how Archlinux does it --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c8e26d5..528420b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.8 +Version: 1.3.9 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -93,6 +93,10 @@ EOF %changelog +* Mon Oct 27 2014 Jens Petersen - 1.3.9-1 +- macros.ghc: cabal_configure now passes CFLAGS and LDFLAGS to ghc (#1138982) + (thanks to Sergei Trofimovich and Ville Skyttä) + * Thu Oct 23 2014 Jens Petersen - 1.3.8-1 - ghc-deps.sh: support ghc-pkg for ghc build <= 7.4.2 as well diff --git a/macros.ghc b/macros.ghc index dadd68c..c0ec77e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -21,7 +21,9 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options +CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ +LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-opts="$(echo \ $CFLAGS | sed -e 's/ / -optc/g') $(echo \ $LDFLAGS | sed -e 's/ / -optc/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v From e5c8c16492266bfe8ef02ec58cac0f745533e165 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 27 Oct 2014 12:16:40 +0900 Subject: [PATCH 244/514] fix handling of CFLAGS and LDFLAGS --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index c0ec77e..3342c4e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -23,7 +23,7 @@ fi %ghc_check_bootstrap\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-opts="$(echo \ $CFLAGS | sed -e 's/ / -optc/g') $(echo \ $LDFLAGS | sed -e 's/ / -optc/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v From c62456812e79d66228c744a49e9a02044aa5c2e4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 14 Nov 2014 18:03:42 +0900 Subject: [PATCH 245/514] split ghc.attr into ghc_lib.attr and ghc_bin.attr; require ghc-compiler - allows handling executables more precisely and not assume bindir - avoid "ghc: command not found" error when ghc wasn't installed --- ghc-rpm-macros.spec | 17 +++++++++++++---- ghc.attr | 3 --- ghc_bin.attr | 3 +++ ghc_lib.attr | 3 +++ 4 files changed, 19 insertions(+), 7 deletions(-) delete mode 100644 ghc.attr create mode 100644 ghc_bin.attr create mode 100644 ghc_lib.attr diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 528420b..a64fa8b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.9 +Version: 1.3.10 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -24,10 +24,13 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: macros.ghc-extra -Source7: ghc.attr +Source7: ghc_bin.attr +Source8: ghc_lib.attr Requires: ghc-srpm-macros # macros.ghc-srpm moved out from redhat-rpm-config-21 Requires: redhat-rpm-config > 20-1.fc21 +# for ghc_version +Requires: ghc-compiler %if %{undefined without_hscolour} %ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 Requires: hscolour @@ -63,7 +66,8 @@ install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh -install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr +install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr +install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag @@ -82,7 +86,8 @@ EOF %files %doc COPYING AUTHORS %{macros_dir}/macros.ghc -%{_prefix}/lib/rpm/fileattrs/ghc.attr +%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr +%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag @@ -93,6 +98,10 @@ EOF %changelog +* Fri Nov 14 2014 Jens Petersen - 1.3.10-1 +- split ghc.attr into ghc_lib.attr and ghc_bin.attr for finer grained handling +- require ghc-compiler for ghc_version + * Mon Oct 27 2014 Jens Petersen - 1.3.9-1 - macros.ghc: cabal_configure now passes CFLAGS and LDFLAGS to ghc (#1138982) (thanks to Sergei Trofimovich and Ville Skyttä) diff --git a/ghc.attr b/ghc.attr deleted file mode 100644 index 4a34f03..0000000 --- a/ghc.attr +++ /dev/null @@ -1,3 +0,0 @@ -%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} -%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ || ^%{_bindir}/.* diff --git a/ghc_bin.attr b/ghc_bin.attr new file mode 100644 index 0000000..4563546 --- /dev/null +++ b/ghc_bin.attr @@ -0,0 +1,3 @@ +%__ghc_bin_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +%__ghc_bin_magic executable, .* dynamically linked +%__ghc_bin_flags exeonly diff --git a/ghc_lib.attr b/ghc_lib.attr new file mode 100644 index 0000000..c3722c0 --- /dev/null +++ b/ghc_lib.attr @@ -0,0 +1,3 @@ +%__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} +%__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +%__ghc_lib_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ From a93d10698fe64a92c8f053194a372d0174a54305 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Jan 2015 14:40:23 +0900 Subject: [PATCH 246/514] enable shared libraries and dynamic linking on all archs; disable debuginfo - ghc-7.8 support dynamic libs and linking on all arches now - ghc-7.10 will support dwarf debugging output --- ghc-rpm-macros.spec | 18 +++++++----------- macros.ghc | 2 ++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a64fa8b..46699f1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.10 +Version: 1.4.0 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -72,16 +72,6 @@ install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_l install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag -# turn off shared libs and dynamic linking on secondary archs -%ifnarch %{ix86} x86_64 -cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.4.0-1 +- enable shared libraries and dynamic linking on all arch's + since ghc-7.8 now supports that +- disable debuginfo until ghc-7.10 which will support dwarf debugging output + (#1138982) + * Fri Nov 14 2014 Jens Petersen - 1.3.10-1 - split ghc.attr into ghc_lib.attr and ghc_bin.attr for finer grained handling - require ghc-compiler for ghc_version diff --git a/macros.ghc b/macros.ghc index 3342c4e..9039b53 100644 --- a/macros.ghc +++ b/macros.ghc @@ -82,11 +82,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_bin_build %ghc_bin_build\ +%global debug_package %{nil}\ %cabal_configure\ %cabal build # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ +%global debug_package %{nil}\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 4b3c2433d5ab61566b21fb760f209604004b8c84 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Jan 2015 18:38:55 +0900 Subject: [PATCH 247/514] version doc htmldirs again haddock generates versioned cross-links anyway! This reverts commit c7830b0. --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 46699f1..c54751f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.0 +Version: 1.4.1 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,6 +88,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Sat Jan 17 2015 Jens Petersen - 1.4.1-1 +- revert to versioned doc htmldirs + * Sat Jan 17 2015 Jens Petersen - 1.4.0-1 - enable shared libraries and dynamic linking on all arch's since ghc-7.8 now supports that @@ -103,7 +106,7 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag (thanks to Sergei Trofimovich and Ville Skyttä) * Thu Oct 23 2014 Jens Petersen - 1.3.8-1 -- ghc-deps.sh: support ghc-pkg for ghc build <= 7.4.2 as well +- ghc-deps.sh: support ghc-pkg for ghc builds <= 7.4.2 as well * Thu Oct 16 2014 Jens Petersen - 1.3.7-1 - ghc.attr needs to handle requires for /usr/bin files too diff --git a/macros.ghc b/macros.ghc index 9039b53..6ae05eb 100644 --- a/macros.ghc +++ b/macros.ghc @@ -44,7 +44,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg ghc-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ -%define docdir %{ghclibdocdir}/%{pkgname}\ +%define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}.files\ @@ -89,7 +89,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 1107962ad8dbbe25edf291614eccac8b3de04086 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 22 Jan 2015 10:24:41 +0900 Subject: [PATCH 248/514] cabal-tweak-flag: add missing 'not' to an error message (#1184508) thanks to Ian Collier for the report --- cabal-tweak-flag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal-tweak-flag b/cabal-tweak-flag index a357bd3..2bf3a42 100755 --- a/cabal-tweak-flag +++ b/cabal-tweak-flag @@ -29,7 +29,7 @@ if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then fi if ! grep -q -i "^flag *$FLAG" $CABALFILE; then - echo "$CABALFILE does have flag $FLAG" + echo "$CABALFILE does not have flag $FLAG" exit 1 fi From 170e2188e9bc23dbf4ba01468285c22e2dcbe712 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 22 Jan 2015 10:29:03 +0900 Subject: [PATCH 249/514] add a changelog for the cabal-tweak-flag error msg fix --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c54751f..ba7c27a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.1 +Version: 1.4.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,6 +88,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Thu Jan 22 2015 Jens Petersen - 1.4.2-1 +- correct cabal-tweak-flag error message for missing flag (#1184508) + * Sat Jan 17 2015 Jens Petersen - 1.4.1-1 - revert to versioned doc htmldirs From 856d8134b61fac816c6efca17f4f6a81c3ce2fcf Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 22 Jan 2015 13:46:10 +0900 Subject: [PATCH 250/514] version ghcpkgdocdir and add new html doc dir names (ghcpkgdocdir used by JuicyPixels) in future: %ghcdocbasedir -> %ghc_html_dir %ghclibdocdir -> %ghc_html_libraries_dir %ghcpkgdocdir -> %ghc_html_libraries_dir Hopefully the new names should be clearer --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ba7c27a..2ce1e68 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.2 +Version: 1.4.3 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,6 +88,10 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Thu Jan 22 2015 Jens Petersen - 1.4.3-1 +- version ghcpkgdocdir +- add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir + * Thu Jan 22 2015 Jens Petersen - 1.4.2-1 - correct cabal-tweak-flag error message for missing flag (#1184508) diff --git a/macros.ghc b/macros.ghc index 6ae05eb..4e3ecf3 100644 --- a/macros.ghc +++ b/macros.ghc @@ -28,12 +28,21 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ # install %cabal_install %cabal copy --destdir=%{buildroot} -v -# root dir for ghc docs +# root dir for ghc docs (used by ghc.spec) +%ghc_html_dir %{_docdir}/ghc/html +# deprecates %ghcdocbasedir %{_docdir}/ghc/html -# libraries doc dir + +# libraries doc dir (internal) +%ghc_html_libraries_dir %{ghc_html_dir}/libraries +# deprecates %ghclibdocdir %{ghcdocbasedir}/libraries + # pkg doc dir -%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name} +%ghc_html_pkg_dir %{ghc_html_libraries_dir}/%{pkg_name}-%{version} +# deprecates +%ghcpkgdocdir %{ghclibdocdir}/%{pkg_name}-%{version} + # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} From 07399a88491d0ff92b39527451b9553973d9c867 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 09:40:55 +0000 Subject: [PATCH 251/514] on arm chrpath outputs RUNPATH= instead of RPATH= %ghc_fix_dynamic_rpath now handles both program names and absolute paths --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2ce1e68..0942bb9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.3 +Version: 1.4.4 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,6 +88,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Sat Jan 31 2015 Jens Petersen - 1.4.4-1 +- ghc_fix_dynamic_rpath: on ARMv7 RPATH is RUNPATH + * Thu Jan 22 2015 Jens Petersen - 1.4.3-1 - version ghcpkgdocdir - add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir diff --git a/macros.ghc b/macros.ghc index 4e3ecf3..0b4b85f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -136,9 +136,12 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ if ! type chrpath > /dev/null; then exit 1; fi\ PDIR=$(pwd)\ for i in %*; do\ - PROG=%{buildroot}%{_bindir}/$i\ + case $i in\ + /*) PROG=%{buildroot}$i ;;\ + *) PROG=%{buildroot}%{_bindir}/$i ;;\ + esac\ if [ -x "$PROG" ]; then\ - RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\ + RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RU\?N\?PATH=@@")\ case $RPATH in\ *$PDIR*)\ NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ From edf9be1b39cb626a9fe037a59ff4992f9849694a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 10:44:28 +0000 Subject: [PATCH 252/514] fix the R*PATH regexp --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0942bb9..c81153b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.4 +Version: 1.4.5 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,6 +88,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Sat Jan 31 2015 Jens Petersen - 1.4.5-1 +- fix the R*PATH regexp + * Sat Jan 31 2015 Jens Petersen - 1.4.4-1 - ghc_fix_dynamic_rpath: on ARMv7 RPATH is RUNPATH diff --git a/macros.ghc b/macros.ghc index 0b4b85f..bb7fa36 100644 --- a/macros.ghc +++ b/macros.ghc @@ -141,7 +141,7 @@ for i in %*; do\ *) PROG=%{buildroot}%{_bindir}/$i ;;\ esac\ if [ -x "$PROG" ]; then\ - RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RU\?N\?PATH=@@")\ + RPATH=$(chrpath $PROG | sed -e "s@^$PROG: R.*PATH=@@")\ case $RPATH in\ *$PDIR*)\ NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ From d80a2ea9588f60184799b43e08785f19c0f7211c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 17:38:02 +0000 Subject: [PATCH 253/514] disable Cabal tests on armv7 since they give internal error --- ghc-rpm-macros.spec | 16 +++++++++++++++- macros.ghc | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c81153b..1650a9c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.5 +Version: 1.4.6 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -72,6 +72,16 @@ install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_l install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag +# turn off shared libs and dynamic linking on secondary archs +%ifarch archv7hl +cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.4.6-1 +- disable Cabal tests on armv7 since they give an internal error + https://ghc.haskell.org/trac/ghc/ticket/10029 + * Sat Jan 31 2015 Jens Petersen - 1.4.5-1 - fix the R*PATH regexp diff --git a/macros.ghc b/macros.ghc index bb7fa36..ad9a3f4 100644 --- a/macros.ghc +++ b/macros.ghc @@ -23,7 +23,7 @@ fi %ghc_check_bootstrap\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{!?cabal_tests_not_working:%{?with_tests:--enable-tests}} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v From c13aaea995fd140413c44f387dd9a76b2dee8266 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 18:03:52 +0000 Subject: [PATCH 254/514] don't run cabal haddock for meta libraries --- ghc-rpm-macros.spec | 1 + macros.ghc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1650a9c..427d38c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -101,6 +101,7 @@ EOF * Sat Jan 31 2015 Jens Petersen - 1.4.6-1 - disable Cabal tests on armv7 since they give an internal error https://ghc.haskell.org/trac/ghc/ticket/10029 +- only run cabal haddock for real libraries with modules * Sat Jan 31 2015 Jens Petersen - 1.4.5-1 - fix the R*PATH regexp diff --git a/macros.ghc b/macros.ghc index ad9a3f4..1936274 100644 --- a/macros.ghc +++ b/macros.ghc @@ -106,7 +106,11 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_lib_build()\ %ghc_lib_build_without_haddock\ %if %{undefined without_haddock}\ +%define pkgname %{?1}%{!?1:%{pkg_name}}\ +%define pkgver %{?2}%{!?2:%{version}}\ +if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\ %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ +fi\ %endif\ %{nil} From 9460154623a4b2b5b94392f0714f9b9d1078520c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 18:14:30 +0000 Subject: [PATCH 255/514] touch %{basepkg}.files so that %files -f works for meta packages --- ghc-rpm-macros.spec | 2 ++ macros.ghc | 1 + 2 files changed, 3 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 427d38c..896f633 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -101,7 +101,9 @@ EOF * Sat Jan 31 2015 Jens Petersen - 1.4.6-1 - disable Cabal tests on armv7 since they give an internal error https://ghc.haskell.org/trac/ghc/ticket/10029 +- fix building of meta packages: - only run cabal haddock for real libraries with modules +- make sure basepkg.files is also created for meta packages * Sat Jan 31 2015 Jens Petersen - 1.4.5-1 - fix the R*PATH regexp diff --git a/macros.ghc b/macros.ghc index 1936274..5f7668b 100644 --- a/macros.ghc +++ b/macros.ghc @@ -55,6 +55,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ +touch %{basepkg}.files %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ echo "%dir %{pkgdir}" >> %{basepkg}.files\ %if %{undefined ghc_without_shared}\ From efcc8cce75dfb111f627bd4fa7dcce01880cf1dd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 31 Jan 2015 20:22:21 +0000 Subject: [PATCH 256/514] %cabal_tests_not_working fixes: add %cabal_test correct the arch --- ghc-rpm-macros.spec | 8 ++++++-- macros.ghc | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 896f633..969fdd5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.6 +Version: 1.4.7 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -73,7 +73,7 @@ install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag # turn off shared libs and dynamic linking on secondary archs -%ifarch archv7hl +%ifarch armv7hl cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.4.7-1 +- fix arch for cabal_tests_not_working +- add cabal_test macro which uses it + * Sat Jan 31 2015 Jens Petersen - 1.4.6-1 - disable Cabal tests on armv7 since they give an internal error https://ghc.haskell.org/trac/ghc/ticket/10029 diff --git a/macros.ghc b/macros.ghc index 5f7668b..5cbacf8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -28,6 +28,14 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ # install %cabal_install %cabal copy --destdir=%{buildroot} -v +tests +%cabal_test\ +%if %{undefined cabal_tests_not_working}\ +%if %{with tests}\ +%cabal test\ +%endif\ +%endif + # root dir for ghc docs (used by ghc.spec) %ghc_html_dir %{_docdir}/ghc/html # deprecates From 81726e4857a866d19cc59b496846d127b9e8c381 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 1 Feb 2015 07:56:35 +0000 Subject: [PATCH 257/514] drop %cabal_tests_not_working since not all tests failing on ARMv7 --- ghc-rpm-macros.spec | 15 ++++----------- macros.ghc | 4 +--- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 969fdd5..8f8d9b9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.7 +Version: 1.4.8 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -72,16 +72,6 @@ install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_l install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag -# turn off shared libs and dynamic linking on secondary archs -%ifarch armv7hl -cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.4.8-1 +- drop cabal_tests_not_working since not all tests failing on ARMv7 + * Sat Jan 31 2015 Jens Petersen - 1.4.7-1 - fix arch for cabal_tests_not_working - add cabal_test macro which uses it diff --git a/macros.ghc b/macros.ghc index 5cbacf8..7bf522c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -23,17 +23,15 @@ fi %ghc_check_bootstrap\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{!?cabal_tests_not_working:%{?with_tests:--enable-tests}} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v tests %cabal_test\ -%if %{undefined cabal_tests_not_working}\ %if %{with tests}\ %cabal test\ -%endif\ %endif # root dir for ghc docs (used by ghc.spec) From 47247e41504a55fedf36cf5cf529de1add533497 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 27 Feb 2015 22:57:15 +0900 Subject: [PATCH 258/514] turn off _hardened_build for libs since it breaks linking With "%_hardened_build 1" errors like: /usr/bin/ld: -r and -shared may not be used together and /usr/bin/ld.gold: fatal error: -pie and -r are incompatible occur when building libraries --- ghc-rpm-macros.spec | 4 ++++ macros.ghc | 1 + 2 files changed, 5 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8f8d9b9..adca694 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -88,6 +88,10 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Fri Feb 27 2015 Jens Petersen - 1.4.2-1 +- turn off _hardened_build for libraries since it breaks linking + + * Sun Feb 1 2015 Jens Petersen - 1.4.8-1 - drop cabal_tests_not_working since not all tests failing on ARMv7 diff --git a/macros.ghc b/macros.ghc index 7bf522c..5f213b2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -105,6 +105,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ +%global _hardened_build 0\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From a706fe5472664ee5734dbc82f176d61a931d8db8 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 27 Feb 2015 22:58:03 +0900 Subject: [PATCH 259/514] bump to 1.4.9 --- ghc-rpm-macros.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index adca694..7a14def 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.8 +Version: 1.4.9 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,7 +88,7 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog -* Fri Feb 27 2015 Jens Petersen - 1.4.2-1 +* Fri Feb 27 2015 Jens Petersen - 1.4.9-1 - turn off _hardened_build for libraries since it breaks linking From c2213a023682fb1732f6c9ee7155c1f1e1fde03a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 28 Feb 2015 00:58:30 +0900 Subject: [PATCH 260/514] turn off hardening in %cabal_configure: set %_hardened_ldflags to %nil %ghc_lib_build* was too late --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7a14def..d7d5c0d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.9 +Version: 1.4.10 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -88,6 +88,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Fri Feb 27 2015 Jens Petersen - 1.4.10-1 +- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil + * Fri Feb 27 2015 Jens Petersen - 1.4.9-1 - turn off _hardened_build for libraries since it breaks linking diff --git a/macros.ghc b/macros.ghc index 5f213b2..756c223 100644 --- a/macros.ghc +++ b/macros.ghc @@ -21,6 +21,7 @@ fi # configure %cabal_configure\ %ghc_check_bootstrap\ +%global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options @@ -105,7 +106,6 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%global _hardened_build 0\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 0b6b0198da94b80c4f5aff7c3f8d8fa0b58855c3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 2 Mar 2015 13:21:32 +0900 Subject: [PATCH 261/514] fix ghc-deps.sh to handle obsoleted meta libraries use --disable-shared for %ghc_without_shared --- ghc-deps.sh | 60 +++++++++++++++++++++------------------------ ghc-rpm-macros.spec | 7 +++++- macros.ghc | 2 +- 3 files changed, 35 insertions(+), 34 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index e3a681e..a305b0e 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -35,42 +35,38 @@ case $MODE in *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac -if [ -d "$PKGBASEDIR" ]; then - SHARED=$(find $PKGBASEDIR -type f -name '*.so') -fi - files=$(cat) for i in $files; do - LIB_FILE=$(echo $i | grep /libHS | egrep -v "/libHSrts") - if [ "$LIB_FILE" ]; then - if [ -d "$PKGCONFDIR" ]; then - META="" - SELF="" - case $LIB_FILE in - *.so) META=ghc ;; - *.a) META=ghc-devel - if [ "$SHARED" ]; then - SELF=ghc - fi - ;; - esac - if [ "$META" ]; then - PKGVER=$(echo $LIB_FILE | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") - HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") - for i in $HASHS; do - case $i in - *-*) echo "$META($i)" ;; - *) ;; - esac - done - if [ "$MODE" = "--requires" -a "$SELF" ]; then - HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") - for i in $HASHS; do - echo "$SELF($i)" - done - fi + META="" + SELF="" + case $i in + */libHSrts.*) ;; + */libHS*.so) + META=ghc + PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") + ;; + */package.conf.d/*.conf) + META=ghc-devel + PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\).conf%\1%") + if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-*.so ]; then + SELF=ghc fi + ;; + esac + if [ "$META" -a -d "$PKGCONFDIR" ]; then + HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") + for i in $HASHS; do + case $i in + *-*) echo "$META($i)" ;; + *) ;; + esac + done + if [ "$MODE" = "--requires" -a "$SELF" ]; then + HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") + for i in $HASHS; do + echo "$SELF($i)" + done fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d7d5c0d..ca8b083 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.10 +Version: 1.4.11 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -32,6 +32,7 @@ Requires: redhat-rpm-config > 20-1.fc21 # for ghc_version Requires: ghc-compiler %if %{undefined without_hscolour} +# could use ghc_arches here %ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 Requires: hscolour %endif @@ -88,6 +89,10 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Mon Mar 2 2015 Jens Petersen - 1.4.11-1 +- fix ghc-deps.sh to handle meta-packages +- configure --disable-shared if ghc_without_shared + * Fri Feb 27 2015 Jens Petersen - 1.4.10-1 - have to turn off hardening in cabal_configure: set _hardened_ldflags to nil diff --git a/macros.ghc b/macros.ghc index 756c223..8486cfa 100644 --- a/macros.ghc +++ b/macros.ghc @@ -106,7 +106,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 3d27a15aad8b2b956862b42a7a5e9c54a169d032 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 2 Mar 2015 13:31:38 +0900 Subject: [PATCH 262/514] update ghc_lib.attr to see package.conf.d/*.conf files instead of libHS*.a --- ghc_lib.attr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc_lib.attr b/ghc_lib.attr index c3722c0..fc5750a 100644 --- a/ghc_lib.attr +++ b/ghc_lib.attr @@ -1,3 +1,3 @@ %__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_lib_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ +%__ghc_lib_path ^%{ghclibdir}/(.*/libHS.*\\.so|package\\.conf\\.d/*\\.conf)$ From ab3cb96b9e23559e83cfef5c9d9f11303b510f38 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 2 Mar 2015 16:19:39 +0900 Subject: [PATCH 263/514] hopefully fix %__ghc_lib_path for package .conf --- ghc-deps.sh | 2 +- ghc_lib.attr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index a305b0e..68498ff 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -49,7 +49,7 @@ for i in $files; do */package.conf.d/*.conf) META=ghc-devel PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\).conf%\1%") - if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-*.so ]; then + if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-ghc${GHC_VER}.so ]; then SELF=ghc fi ;; diff --git a/ghc_lib.attr b/ghc_lib.attr index fc5750a..1ef544e 100644 --- a/ghc_lib.attr +++ b/ghc_lib.attr @@ -1,3 +1,3 @@ %__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_lib_path ^%{ghclibdir}/(.*/libHS.*\\.so|package\\.conf\\.d/*\\.conf)$ +%__ghc_lib_path ^%{ghclibdir}/(.*/libHS.*\\.so|package\\.conf\\.d/.*\\.conf)$ From 53322a25a5603a415429214d506394691be90cbc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 6 Mar 2015 16:25:12 +0900 Subject: [PATCH 264/514] add ghc-obsoletes subpackage - obsoletes ForSyDe, parameterized-data, type-level, and cgi - currently only for F22+ --- ghc-rpm-macros.spec | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ca8b083..6c0f59b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.4.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -53,6 +53,24 @@ Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. +# ideally packages should be obsoletes by some relevant package +# this is a last resort when there is no such appropriate package +%package -n ghc-obsoletes +Summary: Dummy package to obsolete deprecated Haskell packages +# 3 no longer build with ghc-7.8 (F22) +Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2 +Obsoletes: ghc-parameterized-data < 0.1.6 +Obsoletes: ghc-parameterized-data-devel < 0.1.6 +Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5 +# dropped from HP 2014.2 (F22) +Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 + +%description -n ghc-obsoletes +Meta package for obsoleting deprecated Haskell packages. + +This package can safely be removed. + + %prep %setup -c -T cp %{SOURCE1} %{SOURCE2} . @@ -88,7 +106,16 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %{macros_dir}/macros.ghc-extra +%if 0%{?fedora} >= 22 +%files -n ghc-obsoletes +%endif + + %changelog +* Fri Mar 6 2015 Jens Petersen - 1.4.11-2 +- add ghc-obsoletes dummy subpackage for obsoleting deprecated packages +- initially: ForSyDe, parameterized-data, type-level, and cgi for F22 + * Mon Mar 2 2015 Jens Petersen - 1.4.11-1 - fix ghc-deps.sh to handle meta-packages - configure --disable-shared if ghc_without_shared From f0f6b5560d52e8f92846c65a6c1759ca4ff4a1b9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 7 Mar 2015 22:38:07 +0900 Subject: [PATCH 265/514] allow overriding ghc- prefix with %ghc_name (for ghc784 etc) --- ghc-rpm-macros.spec | 9 ++++++--- macros.ghc | 2 +- macros.ghc-extra | 11 ++++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6c0f59b..61560a5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.11 -Release: 2%{?dist} +Version: 1.4.12 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -57,7 +57,7 @@ for example in ghc and haskell-platform. # this is a last resort when there is no such appropriate package %package -n ghc-obsoletes Summary: Dummy package to obsolete deprecated Haskell packages -# 3 no longer build with ghc-7.8 (F22) +# these 3 no longer build with ghc-7.8 (F22) Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2 Obsoletes: ghc-parameterized-data < 0.1.6 Obsoletes: ghc-parameterized-data-devel < 0.1.6 @@ -112,6 +112,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Sat Mar 7 2015 Jens Petersen - 1.4.12-1 +- allow overriding ghc- prefix with ghc_name (for ghc784 etc) + * Fri Mar 6 2015 Jens Petersen - 1.4.11-2 - add ghc-obsoletes dummy subpackage for obsoleting deprecated packages - initially: ForSyDe, parameterized-data, type-level, and cgi for F22 diff --git a/macros.ghc b/macros.ghc index 8486cfa..88d0450 100644 --- a/macros.ghc +++ b/macros.ghc @@ -58,7 +58,7 @@ tests %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ -%define basepkg ghc-%{pkgname}\ +%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ rm -f %{basepkg}.files %{basepkg}-devel.files\ diff --git a/macros.ghc-extra b/macros.ghc-extra index ae9e87b..7828c36 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -5,13 +5,14 @@ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ -%define basepkg ghc-%{pkgname}\ +%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc} +%define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Url: http://hackage.haskell.org/package/%{pkgname}\ -%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(ghc-[^, ]*\\)-devel/\\1/g")}\ +%{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(%{ghc_prefix}-[^, ]*\\)-devel/\\1/g")}\ \ %description -n %{basepkg}\ This package provides the Haskell %{pkgname} library.\ @@ -20,9 +21,9 @@ This package provides the Haskell %{pkgname} library.\ Summary: Haskell %{pkgname} library development files\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -Requires(post): ghc-compiler = %{ghc_version}\ -Requires(postun): ghc-compiler = %{ghc_version}\ -Requires: ghc-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ +Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\ +Requires(postun): %{ghc_prefix}-compiler = %{ghc_version}\ +Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ From fb48383d9fac61c270dddcb81db42a18d2e19eec Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 8 Mar 2015 14:30:35 +0900 Subject: [PATCH 266/514] missing backslash after defining ghc_prefix --- macros.ghc-extra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index 7828c36..d25557a 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -5,7 +5,7 @@ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ -%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc} +%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ From d1251119aa404eae99c6b88237047c44dce90a1a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 8 Mar 2015 14:41:30 +0900 Subject: [PATCH 267/514] version ghc-pkg in %ghc_pkg_recache this will work for ghc784 where ghc_override is defined but not ghc784-PKG --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 88d0450..01eb1f3 100644 --- a/macros.ghc +++ b/macros.ghc @@ -168,7 +168,7 @@ done\ %endif\ %{nil} -%ghc_pkg_recache %{_bindir}/ghc-pkg recache --no-user-package-db || : +%ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : # - without_hscolour, without_testsuite, and ghc_bootstrapping # need to be set locally in the spec file From cfbdfc60ac5fb1e09db2c973455100efd67b8f8a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 20 Mar 2015 17:39:03 +0900 Subject: [PATCH 268/514] add ghc_pkgdocdir for RHEL compatibility no _pkgdocdir in current RHEL --- ghc-rpm-macros.spec | 3 +++ macros.ghc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 61560a5..e923541 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -112,6 +112,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Fri Mar 20 2015 Jens Petersen +- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier + * Sat Mar 7 2015 Jens Petersen - 1.4.12-1 - allow overriding ghc- prefix with ghc_name (for ghc784 etc) diff --git a/macros.ghc b/macros.ghc index 01eb1f3..574af6f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -24,7 +24,7 @@ fi %global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -35,6 +35,9 @@ tests %cabal test\ %endif +# no _pkgdocdir in EPEL <= 7 +%ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} + # root dir for ghc docs (used by ghc.spec) %ghc_html_dir %{_docdir}/ghc/html # deprecates From 0c236fe8e5ff5b8a2f13b64f15f198badeb444a0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 23 Mar 2015 17:49:30 +0900 Subject: [PATCH 269/514] fix ghc-deps.sh for ghc builds: use .a files again instead of .conf - .conf handling broke since ghc .conf filenames include hash - now extract pkg-ver from filename rather than dir (for 7.10 support) - ignore prof libs --- ghc-deps.sh | 9 +++++---- ghc-rpm-macros.spec | 8 ++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 68498ff..7efd52f 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -42,13 +42,14 @@ for i in $files; do SELF="" case $i in */libHSrts.*) ;; + */libHS*_p.a) ;; */libHS*.so) META=ghc - PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/\([^/]\+\)/libHS.*%\1%") + PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?-ghc${GHC_VER}\.so%\1%") ;; - */package.conf.d/*.conf) + */libHS*.a) META=ghc-devel - PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\).conf%\1%") + PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?\.a%\1%") if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-ghc${GHC_VER}.so ]; then SELF=ghc fi @@ -70,7 +71,7 @@ for i in $files; do fi elif [ "$MODE" = "--requires" ]; then if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}.so%\1%") + BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}\.so%\1%") if [ -d "$PKGCONFDIR" ]; then PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e923541..0899c05 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.12 +Version: 1.4.13 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -112,7 +112,11 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog -* Fri Mar 20 2015 Jens Petersen +* Mon Mar 23 2015 Jens Petersen - 1.4.13-1 +- fix ghc-deps.sh for ghc builds: +- use .a files again instead of .conf for devel deps +- extract pkg-ver from library filename rather than directory + (should also work for 7.10) - introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier * Sat Mar 7 2015 Jens Petersen - 1.4.12-1 From c112f4078243a9e7d93f243f023bacf545c51916 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 23 Mar 2015 18:36:03 +0900 Subject: [PATCH 270/514] update ghc_lib.attr for change from .conf to .a --- ghc_lib.attr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc_lib.attr b/ghc_lib.attr index 1ef544e..7080f10 100644 --- a/ghc_lib.attr +++ b/ghc_lib.attr @@ -1,3 +1,3 @@ %__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_lib_path ^%{ghclibdir}/(.*/libHS.*\\.so|package\\.conf\\.d/.*\\.conf)$ +%__ghc_lib_path ^%{ghclibdir}/(.*/libHS.*\\.(so|a)$ From 3bf0b8f083675fac6e81c36af10e6c497ea14ba2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 23 Mar 2015 18:38:46 +0900 Subject: [PATCH 271/514] fix ghc_lib.attr leftover ( --- ghc_lib.attr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc_lib.attr b/ghc_lib.attr index 7080f10..c3722c0 100644 --- a/ghc_lib.attr +++ b/ghc_lib.attr @@ -1,3 +1,3 @@ %__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_lib_path ^%{ghclibdir}/(.*/libHS.*\\.(so|a)$ +%__ghc_lib_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ From e5d78dcff47a2b6d441fbcb4b49f852a38e26c11 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 2 Apr 2015 12:52:27 +0900 Subject: [PATCH 272/514] add explicit --enable-shared again for arm64 --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0899c05..2211ad7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.13 +Version: 1.4.14 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -112,6 +112,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Thu Apr 2 2015 Jens Petersen - 1.4.14-1 +- add explicit --enable-shared again for arm64 + * Mon Mar 23 2015 Jens Petersen - 1.4.13-1 - fix ghc-deps.sh for ghc builds: - use .a files again instead of .conf for devel deps diff --git a/macros.ghc b/macros.ghc index 574af6f..ca027c2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -109,7 +109,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From c5902ba33fe7bd22b765c9f30e9de4cdcb267188 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 7 May 2015 19:14:08 +0900 Subject: [PATCH 273/514] %cabal now uses utf8 locale; set %ghc_without_dynamic on aarch64 --- ghc-rpm-macros.spec | 15 ++++++++++++++- macros.ghc | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2211ad7..f59c197 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,7 +6,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.14 +Version: 1.4.15 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -91,6 +91,15 @@ install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_l install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag +# turn off dynamic linking on arm64 +%ifarch aarch64 +cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.4.15-1 +- cabal macro now sets utf8 locale +- disable dynamic linking on aarch64 as a workaround (#1195231) + * Thu Apr 2 2015 Jens Petersen - 1.4.14-1 - add explicit --enable-shared again for arm64 diff --git a/macros.ghc b/macros.ghc index ca027c2..5e36f1d 100644 --- a/macros.ghc +++ b/macros.ghc @@ -3,6 +3,7 @@ # "cabal" %cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_without_dynamic:-dynamic} Setup\ +LANG=en_US.utf8\ ./Setup # check ghc version was rebuilt against self From bf5ed29b0fc1ae8781df41e219025cd346d9608b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 25 May 2015 19:23:32 +0900 Subject: [PATCH 274/514] add leksah to ghc-obsoletes --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f59c197..c386170 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.4.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -62,6 +62,7 @@ Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2 Obsoletes: ghc-parameterized-data < 0.1.6 Obsoletes: ghc-parameterized-data-devel < 0.1.6 Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5 +Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14 # dropped from HP 2014.2 (F22) Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 @@ -121,6 +122,9 @@ EOF %changelog +* Mon May 25 2015 Jens Petersen - 1.4.15-2 +- add leksah to ghc-obsoletes + * Thu May 7 2015 Jens Petersen - 1.4.15-1 - cabal macro now sets utf8 locale - disable dynamic linking on aarch64 as a workaround (#1195231) From d5bd4b883e305772829ed4b8dd83d9356efb2d43 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 17 Jun 2015 15:42:01 +0900 Subject: [PATCH 275/514] reenable dynamic linking for aarch64 (#1195231) --- ghc-rpm-macros.spec | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c386170..8e852c1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.4.15 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -92,15 +92,6 @@ install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_l install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag -# turn off dynamic linking on arm64 -%ifarch aarch64 -cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.4.15-3 +- reenable dynamic linking for aarch64 (#1195231) + * Mon May 25 2015 Jens Petersen - 1.4.15-2 - add leksah to ghc-obsoletes From d609014ce9bc9c54ea3dee097ec4503a8d5cbf86 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 8 Oct 2015 19:20:20 +0900 Subject: [PATCH 276/514] tests comment in macros.ghc --- ghc-rpm-macros.spec | 2 +- macros.ghc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8e852c1..1b4773d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -53,7 +53,7 @@ Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. -# ideally packages should be obsoletes by some relevant package +# ideally packages should be obsoleted by some relevant package # this is a last resort when there is no such appropriate package %package -n ghc-obsoletes Summary: Dummy package to obsolete deprecated Haskell packages diff --git a/macros.ghc b/macros.ghc index 5e36f1d..9ea624c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -30,7 +30,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ # install %cabal_install %cabal copy --destdir=%{buildroot} -v -tests +# tests %cabal_test\ %if %{with tests}\ %cabal test\ From 124ef72e774bb47fd3676de15b09d75f70e1e5b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 9 May 2015 11:55:12 +0900 Subject: [PATCH 277/514] use %ghc_name for %ghc_html_dir --- macros.ghc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macros.ghc b/macros.ghc index 9ea624c..8b5dc11 100644 --- a/macros.ghc +++ b/macros.ghc @@ -40,19 +40,19 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} # root dir for ghc docs (used by ghc.spec) -%ghc_html_dir %{_docdir}/ghc/html +%ghc_html_dir %{_docdir}/%{?ghc_name}%{!?ghc_name:ghc}/html # deprecates -%ghcdocbasedir %{_docdir}/ghc/html +%ghcdocbasedir %ghc_html_dir # libraries doc dir (internal) %ghc_html_libraries_dir %{ghc_html_dir}/libraries # deprecates -%ghclibdocdir %{ghcdocbasedir}/libraries +%ghclibdocdir %ghc_html_libraries_dir # pkg doc dir %ghc_html_pkg_dir %{ghc_html_libraries_dir}/%{pkg_name}-%{version} # deprecates -%ghcpkgdocdir %{ghclibdocdir}/%{pkg_name}-%{version} +%ghcpkgdocdir %ghc_html_pkg_dir # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} From e7a174af5b0ba8dd0283b53768a6dd0cfb1c1750 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 21:42:59 +0000 Subject: [PATCH 278/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1b4773d..02695dc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.4.15 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -113,6 +113,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 1.4.15-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Jens Petersen - 1.4.15-3 - reenable dynamic linking for aarch64 (#1195231) From 5bd7efd601e162287c8b48b466d619d89a54bc6e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 8 Feb 2016 17:38:16 +0900 Subject: [PATCH 279/514] test-rebuild.sh: el7 branch is epel7 --- tests/test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 038ed0a..e98d02a 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -25,7 +25,7 @@ if [ -f /etc/os-release ]; then eval $(grep VERSION_ID /etc/os-release) case $VERSION_ID in 22) BRANCH=master ;; - 7.*) BRANCH=el7 ;; + 7.*) BRANCH=epel7 ;; *) BRANCH="f$VERSION_ID" ;; esac else From a619695bbacc496c4a01277730d432bc18ed874a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 8 Mar 2016 11:02:18 +0900 Subject: [PATCH 280/514] obsolete citeproc-hs --- ghc-rpm-macros.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 02695dc..9686a8d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ Name: ghc-rpm-macros Version: 1.4.15 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -65,6 +65,8 @@ Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5 Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14 # dropped from HP 2014.2 (F22) Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 +# for f24 +Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -113,6 +115,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Tue Mar 8 2016 Jens Petersen - 1.4.15-5 +- add ghc-citeproc-hs to obsoletes + * Wed Feb 03 2016 Fedora Release Engineering - 1.4.15-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 7e15be09630a7de5442dc27339635a0691cb36c2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 3 Jun 2016 13:16:35 +0900 Subject: [PATCH 281/514] backport changes from ghc-7.10.3 copr as 1.6.0 - ghc_gen_filelists: determine keyname with pkgnamever not just pkgname (fixes building newer version of installed package) - use _rpmconfigdir macro - support el6 (no fileattrs or /usr/lib/rpm/macros.d) - change url to github - add and use ghc-pkg-wrapper script - use ghc-pkg key field (for ghc-7.10) - configure libsubdir using pkgkey like ghc-cabal - handle no ghc-srpm-macros for fedora < 21 - fix ghc-pkg path in ghc-deps.sh for ghc-7.10 - version ghc-pkg in ghc_pkg_recache - update ghc_gen_filelists to use new keyed library filepaths and specify libHS*.so more loosely - ghc-dep.sh now just makes versioned devel reqs - rename ghc_lib.attr to ghc.attr and drop ghc_bin.attr - enable debuginfo package --- ghc-deps.sh | 72 ++++++++------------------------------------- ghc-pkg-wrapper | 32 ++++++++++++++++++++ ghc-rpm-macros.spec | 64 ++++++++++++++++++++++++++++------------ ghc.attr | 3 ++ ghc_bin.attr | 3 -- ghc_lib.attr | 3 -- macros.ghc | 30 ++++++++++--------- macros.ghc-extra | 12 ++++++++ 8 files changed, 121 insertions(+), 98 deletions(-) create mode 100755 ghc-pkg-wrapper create mode 100644 ghc.attr delete mode 100644 ghc_bin.attr delete mode 100644 ghc_lib.attr diff --git a/ghc-deps.sh b/ghc-deps.sh index 7efd52f..c21e4d6 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -8,26 +8,6 @@ set +x MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d -GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) - -# for a ghc build use the new ghc-pkg -INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER - -if [ -x "$INPLACE_GHCPKG" ]; then - case $GHC_VER in - 7.8.*) - GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" - ;; - 7.6.*) - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" - ;; - *) - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" - ;; - esac -else - GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER}" -fi case $MODE in --provides) FIELD=id ;; @@ -38,47 +18,19 @@ esac files=$(cat) for i in $files; do - META="" - SELF="" case $i in - */libHSrts.*) ;; - */libHS*_p.a) ;; - */libHS*.so) - META=ghc - PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?-ghc${GHC_VER}\.so%\1%") - ;; - */libHS*.a) - META=ghc-devel - PKGVER=$(echo $i | sed -e "s%$PKGBASEDIR/[^/]\+/libHS\(.\+-[0-9.]\+\)\(-.\+\)\?\.a%\1%") - if [ -f $PKGBASEDIR/$PKGVER/libHS$PKGVER-ghc${GHC_VER}.so ]; then - SELF=ghc - fi + # exclude builtin_rts.conf + $PKGCONFDIR/*-*.conf) + PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%") + OUT=$(/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR field $PKGVER $FIELD | sed -e "s/^depends: \+//" -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + for d in $OUT; do + case $d in + *-*) echo "ghc-devel($d)" ;; + *) ;; + esac + done + ;; + *) ;; esac - if [ "$META" -a -d "$PKGCONFDIR" ]; then - HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER $FIELD | sed -e "s/^$FIELD: \+//") - for i in $HASHS; do - case $i in - *-*) echo "$META($i)" ;; - *) ;; - esac - done - if [ "$MODE" = "--requires" -a "$SELF" ]; then - HASHS=$(${GHC_PKG} -f $PKGCONFDIR field $PKGVER id | sed -e "s/^id: \+//") - for i in $HASHS; do - echo "$SELF($i)" - done - fi - elif [ "$MODE" = "--requires" ]; then - if file $i | grep -q 'executable, .* dynamically linked'; then - BIN_DEPS=$(objdump -p $i | grep NEEDED | grep libHS | grep -v libHSrts | sed -e "s%^ *NEEDED *libHS\(.*\)-ghc${GHC_VER}\.so%\1%") - if [ -d "$PKGCONFDIR" ]; then - PACKAGE_CONF_OPT="--package-conf=$PKGCONFDIR" - fi - for p in ${BIN_DEPS}; do - HASH=$(${GHC_PKG} --global $PACKAGE_CONF_OPT field $p id | sed -e "s/^id: \+//" | uniq) - echo "ghc($HASH)" - done - fi - fi done diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper new file mode 100755 index 0000000..6cfd4f3 --- /dev/null +++ b/ghc-pkg-wrapper @@ -0,0 +1,32 @@ +#!/bin/sh + +[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1 + +set +x + +PKGBASEDIR=$1 +shift +PKGCONFDIR=$PKGBASEDIR/package.conf.d +GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) + +# for a ghc build use the new ghc-pkg +INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER + +if [ -x "$INPLACE_GHCPKG" ]; then + case $GHC_VER in + 7.4.*) + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" + ;; + 7.6.*) + GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" + ;; + # 7.8 and 7.10 + *) + GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" + ;; + esac +else + GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR" +fi + +$GHC_PKG --global $* diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9686a8d..9688f8e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,22 +1,22 @@ %global debug_package %{nil} +%if 0%{?fedora} || 0%{?rhel} >= 7 %global macros_dir %{_rpmconfigdir}/macros.d +%else +%global macros_dir %{_sysconfdir}/rpm +%endif # uncomment to bootstrap without hscolour #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.15 -Release: 5%{?dist} +Version: 1.6.0 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ -URL: https://fedoraproject.org/wiki/Packaging:Haskell - -# This is a Fedora maintained package, originally made for -# the distribution. Hence the source is currently only available -# from this package. But it could be hosted on fedorahosted.org -# for example if other rpm distros would prefer that. +URL: https://github.com/fedora-haskell/ghc-rpm-macros +# Currently source is only in git but tarballs could be made if it helps Source0: macros.ghc Source1: COPYING Source2: AUTHORS @@ -24,15 +24,12 @@ Source3: ghc-deps.sh Source4: cabal-tweak-dep-ver Source5: cabal-tweak-flag Source6: macros.ghc-extra -Source7: ghc_bin.attr -Source8: ghc_lib.attr -Requires: ghc-srpm-macros -# macros.ghc-srpm moved out from redhat-rpm-config-21 -Requires: redhat-rpm-config > 20-1.fc21 +Source7: ghc.attr +Source8: ghc-pkg-wrapper +Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler %if %{undefined without_hscolour} -# could use ghc_arches here %ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 Requires: hscolour %endif @@ -88,19 +85,31 @@ install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh -install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr -install -p -D -m 0644 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr + +%if 0%{?fedora} || 0%{?rhel} >= 7 +install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr +%endif install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag +install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper + +%if 0%{?rhel} && 0%{?rhel} < 7 +cat >> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh <= 7 +%{_prefix}/lib/rpm/fileattrs/ghc.attr +%endif %{_prefix}/lib/rpm/ghc-deps.sh +%{_prefix}/lib/rpm/ghc-pkg-wrapper %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag @@ -115,6 +124,25 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag %changelog +* Fri Jun 3 2016 Jens Petersen - 1.6.0-1 +- enable debuginfo package +- ghc-7.10 support from copr http://github.com/fedora-haskell/ghc-rpm-macros: +- ghc_gen_filelists: determine keyname with pkgnamever not just pkgname + (fixes building newer version of installed package) +- use _rpmconfigdir macro +- support el6 (no fileattrs or /usr/lib/rpm/macros.d) +- change url to github +- add and use ghc-pkg-wrapper script +- use ghc-pkg key field (for ghc-7.10) +- configure libsubdir using pkgkey like ghc-cabal +- handle no ghc-srpm-macros for fedora < 21 +- fix ghc-pkg path in ghc-deps.sh for ghc-7.10 +- version ghc-pkg in ghc_pkg_recache +- update ghc_gen_filelists to use new keyed library filepaths + and specify libHS*.so more loosely +- ghc-dep.sh now just makes versioned devel reqs +- rename ghc_lib.attr to ghc.attr and drop ghc_bin.attr + * Tue Mar 8 2016 Jens Petersen - 1.4.15-5 - add ghc-citeproc-hs to obsoletes diff --git a/ghc.attr b/ghc.attr new file mode 100644 index 0000000..7703f9e --- /dev/null +++ b/ghc.attr @@ -0,0 +1,3 @@ +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +%__ghc_path ^%{ghclibdir}/package.conf.d/.*\.conf$ diff --git a/ghc_bin.attr b/ghc_bin.attr deleted file mode 100644 index 4563546..0000000 --- a/ghc_bin.attr +++ /dev/null @@ -1,3 +0,0 @@ -%__ghc_bin_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_bin_magic executable, .* dynamically linked -%__ghc_bin_flags exeonly diff --git a/ghc_lib.attr b/ghc_lib.attr deleted file mode 100644 index c3722c0..0000000 --- a/ghc_lib.attr +++ /dev/null @@ -1,3 +0,0 @@ -%__ghc_lib_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} -%__ghc_lib_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_lib_path ^%{ghclibdir}/.*/libHS.*\\.(so|a)$ diff --git a/macros.ghc b/macros.ghc index 8b5dc11..97930c9 100644 --- a/macros.ghc +++ b/macros.ghc @@ -24,8 +24,8 @@ fi %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} -v @@ -40,7 +40,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} # root dir for ghc docs (used by ghc.spec) -%ghc_html_dir %{_docdir}/%{?ghc_name}%{!?ghc_name:ghc}/html +%ghc_html_dir %{_docdir}/ghc/html # deprecates %ghcdocbasedir %ghc_html_dir @@ -63,20 +63,19 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ -%define pkgdir %{ghclibdir}/%{pkgnamever}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ +keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key | sed -e "s/key: //")\ +pkgdir="%{ghclibdir}/${keyname}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ -echo "%dir %{pkgdir}" >> %{basepkg}.files\ +echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ +if [ -d "%{buildroot}${pkgdir}" ]; then\ +echo "%dir ${pkgdir}" >> %{basepkg}.files\ %if %{undefined ghc_without_shared}\ -echo "%attr(755,root,root) %{pkgdir}/libHS%{pkgnamever}-ghc%{ghc_version}.so" >> %{basepkg}.files\ +echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ %endif\ -fi\ -echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ -if [ -d "%{buildroot}%{pkgdir}" ]; then\ -find %{buildroot}%{pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ -find %{buildroot}%{pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ +find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ +find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ @@ -103,13 +102,11 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_bin_build %ghc_bin_build\ -%global debug_package %{nil}\ %cabal_configure\ %cabal build # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ -%global debug_package %{nil}\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} @@ -134,12 +131,17 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # install bin package %ghc_bin_install()\ +%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ +%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ %{nil} # ghc_lib_install [name] [version] %ghc_lib_install()\ +%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ +%{!?_fileattrsdir:%global __find_provides %{_rpmconfigdir}/rpmdeps --provides}\ +%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ %cabal_pkg_conf\ %ghc_gen_filelists\ diff --git a/macros.ghc-extra b/macros.ghc-extra index d25557a..38983c0 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -9,6 +9,9 @@ %define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ +%if 0%{?rhel} && 0%{?rhel} < 7\ +Group: System/Libraries\ +%endif\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Url: http://hackage.haskell.org/package/%{pkgname}\ @@ -19,6 +22,9 @@ This package provides the Haskell %{pkgname} library.\ \ %package -n %{basepkg}-devel\ Summary: Haskell %{pkgname} library development files\ +%if 0%{?rhel} && 0%{?rhel} < 7\ +Group: Development/Languages/Other\ +%endif\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\ @@ -38,8 +44,14 @@ This package provides the Haskell %{pkgname} library development files.\ %ghc_pkg_recache\ \ %files -n %{basepkg} -f %{basepkg}.files\ +%if 0%{?rhel} && 0%{?rhel} < 7\ +%defattr(-,root,root,-)\ +%endif\ %{?base_doc_files:%doc %base_doc_files}\ \ %files -n %{basepkg}-devel -f %{basepkg}-devel.files\ +%if 0%{?rhel} && 0%{?rhel} < 7\ +%defattr(-,root,root,-)\ +%endif\ %{?devel_doc_files:%doc %devel_doc_files}\ %{nil} From d364972a87dea728753d44bbdc7af2fbf0bb7f94 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 6 Jun 2016 17:22:42 +0900 Subject: [PATCH 282/514] disable debuginfo again at least until work out how to get it working --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9688f8e..08e729f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.0 +Version: 1.6.1 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -124,6 +124,9 @@ EOF %changelog +* Mon Jun 6 2016 Jens Petersen - 1.6.1-1 +- disable debuginfo again until working + * Fri Jun 3 2016 Jens Petersen - 1.6.0-1 - enable debuginfo package - ghc-7.10 support from copr http://github.com/fedora-haskell/ghc-rpm-macros: diff --git a/macros.ghc b/macros.ghc index 97930c9..8f71099 100644 --- a/macros.ghc +++ b/macros.ghc @@ -102,11 +102,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_bin_build %ghc_bin_build\ +%global debug_package %{nil}\ %cabal_configure\ %cabal build # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ +%global debug_package %{nil}\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build\ %{nil} From 41e9ee727e0d6cbc884488be226f00d558316cf6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 13 Jun 2016 16:16:29 +0900 Subject: [PATCH 283/514] %ghc_gen_filelists: uniq keyname to prevent build failure for installed version --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 08e729f..180cda7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.1 +Version: 1.6.2 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -124,6 +124,9 @@ EOF %changelog +* Mon Jun 13 2016 Jens Petersen - 1.6.2-1 +- ghc_gen_filelists: uniq keyname to prevent build failure for installed version + * Mon Jun 6 2016 Jens Petersen - 1.6.1-1 - disable debuginfo again until working diff --git a/macros.ghc b/macros.ghc index 8f71099..aa01fe6 100644 --- a/macros.ghc +++ b/macros.ghc @@ -64,7 +64,7 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key | sed -e "s/key: //")\ +keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key | sed -e "s/key: //" | uniq)\ pkgdir="%{ghclibdir}/${keyname}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ From 84c32ecae915a61be051d830de2383bf3d201824 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 22 Jun 2016 17:12:14 +0900 Subject: [PATCH 284/514] obsoletes for hakyll and leksah-server --- ghc-rpm-macros.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 180cda7..7884cc2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -64,6 +64,8 @@ Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14 Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 # for f24 Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3 +Obsoletes: ghc-hakyll < 4.5.4.0-6, ghc-hakyll-devel < 4.5.4.0-6 +Obsoletes: ghc-leksah-server < 0.14.3.1-4, ghc-leksah-server-devel < 0.14.3.1-4 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -124,6 +126,9 @@ EOF %changelog +* Wed Jun 22 2016 Jens Petersen - 1.6.2-2 +- obsoletes for hakyll and leksah-server + * Mon Jun 13 2016 Jens Petersen - 1.6.2-1 - ghc_gen_filelists: uniq keyname to prevent build failure for installed version From a1d8cc2ddcd0ba6e25e8695b95800b65787a7a8f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 20 Jul 2016 19:35:40 +0900 Subject: [PATCH 285/514] obsoletes for more packages retired for f25 cmdtheline, concrete-typerep, glade, bluetile, lambdabot-utils, haddock, monad-unify --- ghc-rpm-macros.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7884cc2..89db8ba 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -66,6 +66,14 @@ Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3 Obsoletes: ghc-hakyll < 4.5.4.0-6, ghc-hakyll-devel < 4.5.4.0-6 Obsoletes: ghc-leksah-server < 0.14.3.1-4, ghc-leksah-server-devel < 0.14.3.1-4 +# for f25 +Obsoletes: ghc-cmdtheline <= 0.2.3, ghc-cmdtheline-devel <= 0.2.3 +Obsoletes: ghc-concrete-typerep <= 0.1.0.2, ghc-concrete-typerep-devel <= 0.1.0.2 +Obsoletes: ghc-glade <= 0.12.5.0, ghc-glade-devel <= 0.12.5.0 +Obsoletes: bluetile <= 0.6, bluetile-core <= 0.6 +Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2 +Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3 +Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -126,6 +134,10 @@ EOF %changelog +* Wed Jul 20 2016 Jens Petersen - 1.6.2-3 +- obsolete cmdtheline, concrete-typerep, glade, bluetile, lambdabot-utils, + haddock, monad-unify + * Wed Jun 22 2016 Jens Petersen - 1.6.2-2 - obsoletes for hakyll and leksah-server From 2596046682b1ba6f976c82fa21b554573e861802 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 22 Jul 2016 12:28:06 +0900 Subject: [PATCH 286/514] obsolete Agda temporarily to see if it quietens the rawhide report --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 89db8ba..af77bc4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -74,6 +74,7 @@ Obsoletes: bluetile <= 0.6, bluetile-core <= 0.6 Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2 Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3 Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2 +Obsoletes: Agda <= 2.4.2.2, ghc-Agda <= 2.4.2.2, ghc-Agda-devel <= 2.4.2.2 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -134,6 +135,9 @@ EOF %changelog +* Fri Jul 22 2016 Jens Petersen - 1.6.2-4 +- try obsoleting Agda + * Wed Jul 20 2016 Jens Petersen - 1.6.2-3 - obsolete cmdtheline, concrete-typerep, glade, bluetile, lambdabot-utils, haddock, monad-unify From 27b17fb15ec6e0c76df6b27eadccb540d7910fe6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 6 Aug 2016 17:28:06 +0200 Subject: [PATCH 287/514] merge cabal_verbose from github thanks mimi1vx for the original patch --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index af77bc4..6497aac 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.2 -Release: 4%{?dist} +Version: 1.6.3 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -135,6 +135,9 @@ EOF %changelog +* Sat Aug 6 2016 Jens Petersen - 1.6.3-1 +- cabal_verbose from github fedora-haskell/ghc-rpm-macros + * Fri Jul 22 2016 Jens Petersen - 1.6.2-4 - try obsoleting Agda diff --git a/macros.ghc b/macros.ghc index aa01fe6..4824db9 100644 --- a/macros.ghc +++ b/macros.ghc @@ -25,15 +25,15 @@ fi %global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install -%cabal_install %cabal copy --destdir=%{buildroot} -v +%cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} # tests %cabal_test\ %if %{with tests}\ -%cabal test\ +%cabal test %{?cabal_verbose}\ %endif # no _pkgdocdir in EPEL <= 7 @@ -104,13 +104,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_bin_build\ %global debug_package %{nil}\ %cabal_configure\ -%cabal build +%cabal build %{_smp_mflags} %{?cabal_verbose} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ -%cabal build\ +%cabal build %{_smp_mflags} %{?cabal_verbose}\ %{nil} # ghc_lib_build [name] [version] From 986f88ae7313676cd8d64b9e1f3ed03c078fef67 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 17 Aug 2016 17:34:46 +0900 Subject: [PATCH 288/514] 2 new macros to ease bundling libraries - ghc_sublib_build and ghc_sublib_install --- ghc-rpm-macros.spec | 5 ++++- macros.ghc-extra | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6497aac..a4a7e0e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.3 +Version: 1.6.4 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -135,6 +135,9 @@ EOF %changelog +* Wed Aug 17 2016 Jens Petersen - 1.6.4-1 +- add ghc_sublib_build and ghc_sublib_install to ease bundling libraries + * Sat Aug 6 2016 Jens Petersen - 1.6.3-1 - cabal_verbose from github fedora-haskell/ghc-rpm-macros diff --git a/macros.ghc-extra b/macros.ghc-extra index 38983c0..adadc53 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -55,3 +55,39 @@ This package provides the Haskell %{pkgname} library development files.\ %endif\ %{?devel_doc_files:%doc %devel_doc_files}\ %{nil} + +# ghc_sublib_build [name-version] ... +%ghc_sublib_build()\ +HOME=$PWD\ +%define cabal_configure_options --user\ +for i in %*; do\ +name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")\ +ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")\ +cd $name-$ver\ +case $name in\ +haskell-platform)\ +%ghc_lib_build_without_haddock $name $ver\ +;;\ +*)\ +%ghc_lib_build $name $ver\ +./Setup register --inplace\ +;;\ +esac\ +cd ..\ +done\ +%{nil} + +# ghc_sublib_install [name-version] ... +%ghc_sublib_install()\ +HOME=$PWD\ +for i in %*; do\ +name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")\ +ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")\ +cd $name-$ver\ +%ghc_lib_install $name $ver\ +echo "%%license $name-$ver/LICENSE" >> ghc-$name.files\ +rm %{buildroot}%{_docdir}/ghc-$name/LICENSE\ +mv *.files ..\ +cd ..\ +done\ +%{nil} From 96d4e688f405585b95350e1bed0f813340979e58 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 17 Aug 2016 18:16:52 +0900 Subject: [PATCH 289/514] macros.ghc-extra: quote the sed expressions harder --- macros.ghc-extra | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index adadc53..51433c1 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -61,8 +61,8 @@ This package provides the Haskell %{pkgname} library development files.\ HOME=$PWD\ %define cabal_configure_options --user\ for i in %*; do\ -name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")\ -ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")\ +name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ +ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ cd $name-$ver\ case $name in\ haskell-platform)\ @@ -81,8 +81,8 @@ done\ %ghc_sublib_install()\ HOME=$PWD\ for i in %*; do\ -name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")\ -ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")\ +name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ +ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ cd $name-$ver\ %ghc_lib_install $name $ver\ echo "%%license $name-$ver/LICENSE" >> ghc-$name.files\ From 0592593f31dde684dc1945a75cb2547585ce263b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 17 Aug 2016 19:01:03 +0900 Subject: [PATCH 290/514] drop _smp_mflags for now since it can overwhelm armv7hl --- ghc-rpm-macros.spec | 1 + macros.ghc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a4a7e0e..10e42cc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -137,6 +137,7 @@ EOF %changelog * Wed Aug 17 2016 Jens Petersen - 1.6.4-1 - add ghc_sublib_build and ghc_sublib_install to ease bundling libraries +- drop _smp_mflags for now since it can overwhelm armv7hl * Sat Aug 6 2016 Jens Petersen - 1.6.3-1 - cabal_verbose from github fedora-haskell/ghc-rpm-macros diff --git a/macros.ghc b/macros.ghc index 4824db9..9e90d88 100644 --- a/macros.ghc +++ b/macros.ghc @@ -104,13 +104,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_bin_build\ %global debug_package %{nil}\ %cabal_configure\ -%cabal build %{_smp_mflags} %{?cabal_verbose} +%cabal build %{?cabal_verbose} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ -%cabal build %{_smp_mflags} %{?cabal_verbose}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?1:--package-db=user} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal build %{?cabal_verbose}\ %{nil} # ghc_lib_build [name] [version] From 2d136c953891cad07cc8dfefd024716822655a2b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 18 Aug 2016 14:24:03 +0900 Subject: [PATCH 291/514] %ghc_sublib_install: handle different license filenames --- macros.ghc-extra | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index 51433c1..07a63b3 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -85,8 +85,9 @@ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ cd $name-$ver\ %ghc_lib_install $name $ver\ -echo "%%license $name-$ver/LICENSE" >> ghc-$name.files\ -rm %{buildroot}%{_docdir}/ghc-$name/LICENSE\ +LICENSE_FILE=$(ls %{buildroot}%{_docdir}/ghc-$name/)\ +echo "%%license $name-$ver/$LICENSE_FILE" >> ghc-$name.files\ +rm %{buildroot}%{_docdir}/ghc-$name/$LICENSE_FILE\ mv *.files ..\ cd ..\ done\ From d8c629ddd4f2d1bd6f616b5bbb3adab01d81fd35 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 18 Aug 2016 15:21:00 +0900 Subject: [PATCH 292/514] remove subpackaging --package-db=user which breaks --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 9e90d88..2148caf 100644 --- a/macros.ghc +++ b/macros.ghc @@ -109,7 +109,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?1:--package-db=user} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_verbose}\ %{nil} From 40e1493069cfbc404a0752a93ebfc5bcbcae959d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 18 Aug 2016 15:25:17 +0900 Subject: [PATCH 293/514] rename to %ghc_libs_build and %ghc_libs_install from %ghc_sublib_* --- ghc-rpm-macros.spec | 2 +- macros.ghc-extra | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 10e42cc..4884d36 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -136,7 +136,7 @@ EOF %changelog * Wed Aug 17 2016 Jens Petersen - 1.6.4-1 -- add ghc_sublib_build and ghc_sublib_install to ease bundling libraries +- add ghc_libs_build and ghc_libs_install to ease bundling libraries - drop _smp_mflags for now since it can overwhelm armv7hl * Sat Aug 6 2016 Jens Petersen - 1.6.3-1 diff --git a/macros.ghc-extra b/macros.ghc-extra index 07a63b3..d1cb0e9 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -57,7 +57,7 @@ This package provides the Haskell %{pkgname} library development files.\ %{nil} # ghc_sublib_build [name-version] ... -%ghc_sublib_build()\ +%ghc_libs_build()\ HOME=$PWD\ %define cabal_configure_options --user\ for i in %*; do\ @@ -78,7 +78,7 @@ done\ %{nil} # ghc_sublib_install [name-version] ... -%ghc_sublib_install()\ +%ghc_libs_install()\ HOME=$PWD\ for i in %*; do\ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ From 84a7696ad1a0c5b31b2aa672cf44212ee1138e99 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Aug 2016 19:10:58 +0200 Subject: [PATCH 294/514] move license handling from %ghc_libs_install to %ghc_gen_filelists --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 3 +++ macros.ghc-extra | 3 --- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4884d36..a69961e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.4 +Version: 1.6.5 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -135,6 +135,9 @@ EOF %changelog +* Thu Aug 25 2016 Jens Petersen - 1.6.5-1 +- ghc_gen_filelists now handles license files automatically + * Wed Aug 17 2016 Jens Petersen - 1.6.4-1 - add ghc_libs_build and ghc_libs_install to ease bundling libraries - drop _smp_mflags for now since it can overwhelm armv7hl diff --git a/macros.ghc b/macros.ghc index 2148caf..81ea105 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,6 +80,9 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ +license_file=$(ls %{buildroot}%{_docdir}/%{basepkg}/)\ +echo "%%license %{pkgnamever}/$license_file" >> %{basepkg}.files\ +rm %{buildroot}%{_docdir}/ghc-$name/$license_file\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ diff --git a/macros.ghc-extra b/macros.ghc-extra index d1cb0e9..4da5c4d 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -85,9 +85,6 @@ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ cd $name-$ver\ %ghc_lib_install $name $ver\ -LICENSE_FILE=$(ls %{buildroot}%{_docdir}/ghc-$name/)\ -echo "%%license $name-$ver/$LICENSE_FILE" >> ghc-$name.files\ -rm %{buildroot}%{_docdir}/ghc-$name/$LICENSE_FILE\ mv *.files ..\ cd ..\ done\ From c43600a4a0d00cbd9a917f0e9a4b334bb0931e6d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 26 Aug 2016 14:21:24 +0200 Subject: [PATCH 295/514] ghc_gen_filelists: support packages with multiple license files move licenses out of docdir instead of removing, also for ghc_bin_install --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 10 +++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a69961e..4775be7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.5 +Version: 1.6.6 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -135,6 +135,10 @@ EOF %changelog +* Fri Aug 26 2016 Jens Petersen - 1.6.6-1 +- ghc_gen_filelists: support packages with more than one license file +- move licenses out of docdir instead of removing, also for ghc_bin_install + * Thu Aug 25 2016 Jens Petersen - 1.6.5-1 - ghc_gen_filelists now handles license files automatically diff --git a/macros.ghc b/macros.ghc index 81ea105..050a220 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,9 +80,11 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -license_file=$(ls %{buildroot}%{_docdir}/%{basepkg}/)\ -echo "%%license %{pkgnamever}/$license_file" >> %{basepkg}.files\ -rm %{buildroot}%{_docdir}/ghc-$name/$license_file\ +for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\ +echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ +mkdir -p %{buildroot}%{_licensedir}/%{basepkg}\ +mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_licensedir}/%{basepkg}/\ +done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ @@ -139,6 +141,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ +mkdir -p %{buildroot}%{_licensedir}/%{name}\ +mv %{buildroot}%ghc_pkgdocdir/* %{buildroot}%{_licensedir}/%{name}/\ %{!?1:%ghc_strip_dynlinked}\ %{nil} From 64dfda4d2caef7b5d1be6bd1de2a4b194db9f44a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 26 Aug 2016 18:16:55 +0200 Subject: [PATCH 296/514] _defaultlicensedir not _licensedir --- macros.ghc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macros.ghc b/macros.ghc index 050a220..dac15f2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -82,8 +82,8 @@ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ -mkdir -p %{buildroot}%{_licensedir}/%{basepkg}\ -mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_licensedir}/%{basepkg}/\ +mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ +mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ @@ -141,8 +141,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ -mkdir -p %{buildroot}%{_licensedir}/%{name}\ -mv %{buildroot}%ghc_pkgdocdir/* %{buildroot}%{_licensedir}/%{name}/\ +mkdir -p %{buildroot}%{_defaultlicensedir}/%{name}\ +mv %{buildroot}%ghc_pkgdocdir/* %{buildroot}%{_defaultlicensedir}/%{name}/\ %{!?1:%ghc_strip_dynlinked}\ %{nil} From 452a250213d0f5d2112450643b8848f52d4db5bb Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 27 Aug 2016 12:13:06 +0200 Subject: [PATCH 297/514] fix %license path when not subpackaging --- macros.ghc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros.ghc b/macros.ghc index dac15f2..30e4596 100644 --- a/macros.ghc +++ b/macros.ghc @@ -81,7 +81,7 @@ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\ -echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ +echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ done\ @@ -142,7 +142,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{name}\ -mv %{buildroot}%ghc_pkgdocdir/* %{buildroot}%{_defaultlicensedir}/%{name}/\ +mv %{buildroot}%{ghc_pkgdocdir}/* %{buildroot}%{_defaultlicensedir}/%{name}/\ %{!?1:%ghc_strip_dynlinked}\ %{nil} From 701fee729481c7f2eaafe335761ef7343fb2378a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Aug 2016 10:02:44 +0900 Subject: [PATCH 298/514] %ghc_gen_filelists: improve license handling for binlib packages --- ghc-rpm-macros.spec | 3 ++- macros.ghc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4775be7..a7c1e74 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -137,7 +137,8 @@ EOF %changelog * Fri Aug 26 2016 Jens Petersen - 1.6.6-1 - ghc_gen_filelists: support packages with more than one license file -- move licenses out of docdir instead of removing, also for ghc_bin_install +- move licenses from docdir to licensedir instead of removing, + also for ghc_bin_install * Thu Aug 25 2016 Jens Petersen - 1.6.5-1 - ghc_gen_filelists now handles license files automatically diff --git a/macros.ghc b/macros.ghc index 30e4596..7eb8646 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,7 +80,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{_docdir}/%{basepkg}/); do\ +for i in $(ls %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg})/); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ From 52dc56db34427e993e706414a45315227f55c933 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Aug 2016 11:14:00 +0900 Subject: [PATCH 299/514] additional fixes for handling binlib packages --- macros.ghc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros.ghc b/macros.ghc index 7eb8646..02a5ec4 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,10 +80,10 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg})/); do\ +for i in $(ls %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg}}/); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ -mv %{buildroot}%{_docdir}/%{basepkg}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ +mv %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg}}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ From 8539a717fca56cf7b0154d115ac3b042f86c2586 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 1 Sep 2016 14:59:29 +0900 Subject: [PATCH 300/514] %ghc_lib_subpackage now takes name-version processed with lua --- ghc-rpm-macros.spec | 5 ++++- macros.ghc-extra | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a7c1e74..fcd24f4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.6 +Version: 1.6.7 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -135,6 +135,9 @@ EOF %changelog +* Thu Sep 1 2016 Jens Petersen - 1.6.7-1 +- ghc_lib_subpackage now takes name-version processed with lua + * Fri Aug 26 2016 Jens Petersen - 1.6.6-1 - ghc_gen_filelists: support packages with more than one license file - move licenses from docdir to licensedir instead of removing, diff --git a/macros.ghc-extra b/macros.ghc-extra index 4da5c4d..329a547 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -1,9 +1,16 @@ # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- -# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name] [version] +# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name-version] %ghc_lib_subpackage(c:l:x)\ -%define pkgname %{?1}%{!?1:%{pkg_name}}\ -%define pkgver %{?2}%{!?2:%{version}}\ +%define pkgname %{lua:\ +local pv = rpm.expand("%1")\ +local _, _, name = string.find(pv, "^([%a-]+)-")\ +print(name)\ +}\ +%define pkgver %{lua:\ +local pv = rpm.expand("%1")\ +print(string.sub(pv, string.find(pv, "[%d.]+$")))\ +}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ From 68da07a47a2c3c9d7493bdd6010f01b3707f3864 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 6 Sep 2016 11:20:41 +0900 Subject: [PATCH 301/514] set Cabal docdir to licensedir so licenses end up in right place --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fcd24f4..920166e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.7 +Version: 1.6.8 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -135,6 +135,9 @@ EOF %changelog +* Tue Sep 6 2016 Jens Petersen - 1.6.8-1 +- set Cabal docdir to licensedir so licenses end up in right place + * Thu Sep 1 2016 Jens Petersen - 1.6.7-1 - ghc_lib_subpackage now takes name-version processed with lua diff --git a/macros.ghc b/macros.ghc index 02a5ec4..3d10d57 100644 --- a/macros.ghc +++ b/macros.ghc @@ -25,7 +25,7 @@ fi %global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_pkgdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_licensedir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} @@ -36,6 +36,8 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal test %{?cabal_verbose}\ %endif +%ghc_licensedir %{_defaultlicensedir}/%{name} + # no _pkgdocdir in EPEL <= 7 %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -83,7 +85,6 @@ fi\ for i in $(ls %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg}}/); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ -mv %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg}}/$i %{buildroot}%{_defaultlicensedir}/%{basepkg}/\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ @@ -114,7 +115,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{ghc_licensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_verbose}\ %{nil} @@ -141,8 +142,6 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ -mkdir -p %{buildroot}%{_defaultlicensedir}/%{name}\ -mv %{buildroot}%{ghc_pkgdocdir}/* %{buildroot}%{_defaultlicensedir}/%{name}/\ %{!?1:%ghc_strip_dynlinked}\ %{nil} From d0eef0681b8ac718aa1ea1129ee1167e04f886cf Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 6 Sep 2016 11:45:19 +0900 Subject: [PATCH 302/514] licensedir fixes --- macros.ghc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/macros.ghc b/macros.ghc index 3d10d57..d7beaaf 100644 --- a/macros.ghc +++ b/macros.ghc @@ -82,9 +82,8 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{_docdir}/%{!?1:*}%{?1:%{basepkg}}/); do\ +for i in $(ls %{buildroot}%{ghc_licensedir}/); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ -mkdir -p %{buildroot}%{_defaultlicensedir}/%{basepkg}\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ @@ -115,7 +114,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{ghc_licensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_defaultlicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_verbose}\ %{nil} From 83eef9382a63b470c87b382132c55127cbf784ab Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 6 Sep 2016 19:09:36 +0900 Subject: [PATCH 303/514] drop %ghc_licensedir and look for license correctly --- macros.ghc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/macros.ghc b/macros.ghc index d7beaaf..a06299a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -25,7 +25,7 @@ fi %global _hardened_ldflags %{nil}\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{ghc_licensedir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} @@ -36,8 +36,6 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal test %{?cabal_verbose}\ %endif -%ghc_licensedir %{_defaultlicensedir}/%{name} - # no _pkgdocdir in EPEL <= 7 %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -82,7 +80,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{ghc_licensedir}/); do\ +for i in $(ls %{buildroot}%{_defaultlicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ From 411d61ddf0301925673fdf7d55c738623a7fa0b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Sep 2016 14:30:59 +0900 Subject: [PATCH 304/514] new ghc_fix_rpath macro deprecates ghc_fix_dynamic_rpath - ghc-pkg-wrapper: quieter and simple output - ghc_libs_install now runs ghc_fix_rpath to fix subpackage rpaths --- ghc-deps.sh | 2 +- ghc-pkg-wrapper | 2 +- ghc-rpm-macros.spec | 7 ++++++- macros.ghc | 26 ++++++++++++++++++++++++++ macros.ghc-extra | 6 ++++-- 5 files changed, 38 insertions(+), 5 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index c21e4d6..ee96ddd 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -22,7 +22,7 @@ for i in $files; do # exclude builtin_rts.conf $PKGCONFDIR/*-*.conf) PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%") - OUT=$(/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR field $PKGVER $FIELD | sed -e "s/^depends: \+//" -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + OUT=$(/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR field $PKGVER $FIELD | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $OUT; do case $d in *-*) echo "ghc-devel($d)" ;; diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index 6cfd4f3..cd3778c 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -29,4 +29,4 @@ else GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR" fi -$GHC_PKG --global $* +$GHC_PKG -v0 --simple-output --global $* diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 920166e..5c81bab 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.8 +Version: 1.6.9 Release: 1%{?dist} Summary: RPM macros for building packages for GHC @@ -135,6 +135,11 @@ EOF %changelog +* Tue Sep 27 2016 Jens Petersen - 1.6.9-1 +- new ghc_fix_rpath macro deprecates ghc_fix_dynamic_rpath +- ghc-pkg-wrapper: quieter and simple output +- ghc_libs_install now runs ghc_fix_rpath to fix subpackage rpaths + * Tue Sep 6 2016 Jens Petersen - 1.6.8-1 - set Cabal docdir to licensedir so licenses end up in right place diff --git a/macros.ghc b/macros.ghc index a06299a..d4bb2a2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -153,6 +153,32 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?1:%ghc_strip_dynlinked}\ %{nil} +# ghc_fix_rpath lib-ver ... +%ghc_fix_rpath()\ +%if %{undefined ghc_without_dynamic}\ +if ! type chrpath > /dev/null; then exit 1; fi\ +PDIR=$(pwd)\ +for lib in %*; do\ +for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ + if [ -x "$i" ]; then\ + RPATH=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ + case $RPATH in\ + *$PDIR/$lib/*)\ + SYSPATH=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | uniq)\ + NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/$lib/dist/build@${SYSPATH}@g")\ + chrpath -r $NEWRPATH $i\ + ;;\ + esac\ + else\ + echo "%%ghc_fix_rpath: no $i executable"\ + exit 1\ + fi\ +done\ +done\ +%endif\ +%{nil} + +# Deprecated by ghc_fix_rpath: # ghc_fix_dynamic_rpath prog ... %ghc_fix_dynamic_rpath()\ %if %{undefined ghc_without_dynamic}\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 329a547..6c810b2 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -87,12 +87,14 @@ done\ # ghc_sublib_install [name-version] ... %ghc_libs_install()\ HOME=$PWD\ -for i in %*; do\ +args="%*"\ +for i in $args; do\ +cd $i\ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ -cd $name-$ver\ %ghc_lib_install $name $ver\ mv *.files ..\ cd ..\ done\ +%ghc_fix_rpath $args\ %{nil} From e107a783d508ab295989cc2479f9f7a0e8248f72 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Sep 2016 17:43:58 +0900 Subject: [PATCH 305/514] add extra requires for chrpath --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5c81bab..c09d871 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -44,6 +44,7 @@ these macros. %package extra Summary: Extra RPM macros for building Haskell library subpackages Requires: %{name} = %{version}-%{release} +Requires: chrpath %description extra Extra macros used for subpackaging of Haskell libraries, @@ -135,6 +136,9 @@ EOF %changelog +* Tue Sep 27 2016 Jens Petersen - 1.6.9-2 +- macros.ghc-extra requires chrpath + * Tue Sep 27 2016 Jens Petersen - 1.6.9-1 - new ghc_fix_rpath macro deprecates ghc_fix_dynamic_rpath - ghc-pkg-wrapper: quieter and simple output From a9571f976ddaea4d6e99e6b5564eb2a52a3ab114 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 28 Sep 2016 12:47:36 +0900 Subject: [PATCH 306/514] use %license --- ghc-rpm-macros.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c09d871..e9087bf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -115,7 +115,8 @@ EOF %files -%doc COPYING AUTHORS +%license COPYING +%doc AUTHORS %{macros_dir}/macros.ghc %if 0%{?fedora} || 0%{?rhel} >= 7 %{_prefix}/lib/rpm/fileattrs/ghc.attr From 54d5511eb759487988205c7ce99ed9c7b373df67 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 4 Oct 2016 19:42:47 +0900 Subject: [PATCH 307/514] add obsoletes for idris --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e9087bf..78a8a7a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -76,6 +76,7 @@ Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2 Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3 Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2 Obsoletes: Agda <= 2.4.2.2, ghc-Agda <= 2.4.2.2, ghc-Agda-devel <= 2.4.2.2 +Obsoletes: idris <= 0.9.9.1 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -137,6 +138,9 @@ EOF %changelog +* Tue Oct 4 2016 Jens Petersen - 1.6.9-3 +- obsolete idris + * Tue Sep 27 2016 Jens Petersen - 1.6.9-2 - macros.ghc-extra requires chrpath From ad5af6773aad7e0189e98624b1e07996864fcbb6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Oct 2016 12:02:19 +0900 Subject: [PATCH 308/514] update comments for %ghc_libs_build and %ghc_libs_install --- macros.ghc-extra | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index 6c810b2..7aa80c0 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -63,7 +63,7 @@ This package provides the Haskell %{pkgname} library development files.\ %{?devel_doc_files:%doc %devel_doc_files}\ %{nil} -# ghc_sublib_build [name-version] ... +# ghc_libs_build [name-version] ... %ghc_libs_build()\ HOME=$PWD\ %define cabal_configure_options --user\ @@ -84,7 +84,7 @@ cd ..\ done\ %{nil} -# ghc_sublib_install [name-version] ... +# ghc_libs_install [name-version] ... %ghc_libs_install()\ HOME=$PWD\ args="%*"\ From ef1f187fbb62d422dcdded3284c0de67d39fa5d0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Oct 2016 18:35:29 +0900 Subject: [PATCH 309/514] ghc_pkg_recache got versioned ghc-pkg last year --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 78a8a7a..e1ae92f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -199,7 +199,6 @@ EOF - configure libsubdir using pkgkey like ghc-cabal - handle no ghc-srpm-macros for fedora < 21 - fix ghc-pkg path in ghc-deps.sh for ghc-7.10 -- version ghc-pkg in ghc_pkg_recache - update ghc_gen_filelists to use new keyed library filepaths and specify libHS*.so more loosely - ghc-dep.sh now just makes versioned devel reqs @@ -232,6 +231,7 @@ EOF - introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier * Sat Mar 7 2015 Jens Petersen - 1.4.12-1 +- version ghc-pkg in ghc_pkg_recache - allow overriding ghc- prefix with ghc_name (for ghc784 etc) * Fri Mar 6 2015 Jens Petersen - 1.4.11-2 From e3aad73232c7119bf8216b3d366b366357408421 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Oct 2016 18:36:12 +0900 Subject: [PATCH 310/514] drop the Agda obsoletes --- ghc-rpm-macros.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e1ae92f..9cc44a7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,8 +11,8 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 3%{?dist} -Summary: RPM macros for building packages for GHC +Release: 4%{?dist} +Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ URL: https://github.com/fedora-haskell/ghc-rpm-macros @@ -75,7 +75,6 @@ Obsoletes: bluetile <= 0.6, bluetile-core <= 0.6 Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2 Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3 Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2 -Obsoletes: Agda <= 2.4.2.2, ghc-Agda <= 2.4.2.2, ghc-Agda-devel <= 2.4.2.2 Obsoletes: idris <= 0.9.9.1 %description -n ghc-obsoletes @@ -138,6 +137,9 @@ EOF %changelog +* Wed Oct 12 2016 Jens Petersen - 1.6.9-4 +- remove Agda obsoletes + * Tue Oct 4 2016 Jens Petersen - 1.6.9-3 - obsolete idris From b7996800fb5324d4b8fb20118d58440fc4ab19e4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Oct 2016 19:22:07 +0900 Subject: [PATCH 311/514] ghc-deps.sh: use GHC_PKG --- ghc-deps.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index ee96ddd..831c8c5 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -9,6 +9,8 @@ MODE=$1 PKGBASEDIR=$2 PKGCONFDIR=$PKGBASEDIR/package.conf.d +GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR" + case $MODE in --provides) FIELD=id ;; --requires) FIELD=depends ;; @@ -22,7 +24,7 @@ for i in $files; do # exclude builtin_rts.conf $PKGCONFDIR/*-*.conf) PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%") - OUT=$(/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR field $PKGVER $FIELD | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + OUT=$($GHC_PKG field $PKGVER $FIELD | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $OUT; do case $d in *-*) echo "ghc-devel($d)" ;; From f279bff6adf21bb1673b3dbddf76becd85272a78 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Oct 2016 19:22:40 +0900 Subject: [PATCH 312/514] test-rebuild.sh: use dnf for builddep and only switch-branch if needed --- tests/test-rebuild.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index e98d02a..2e25766 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -33,7 +33,9 @@ else BRANCH=el6 fi -fedpkg switch-branch $BRANCH +if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then + fedpkg switch-branch $BRANCH +fi if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then echo "Git branch does not match Fedora installation!" @@ -42,7 +44,8 @@ fi git pull -sudo yum-builddep $PKG.spec +echo Running dnf builddep: +sudo dnf builddep $PKG.spec fedpkg local From 46a6bfd423d031743f79b5ec4e76c9edbee2efe4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Oct 2016 10:48:52 +0900 Subject: [PATCH 313/514] try not setting CFLAGS and LDFLAGS for aarch64 (for ghc-7.10.3) - -Wall is very noisy (unused warnings) - dynlink failing --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9cc44a7..064f01a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -137,6 +137,9 @@ EOF %changelog +* Mon Oct 17 2016 Jens Petersen - 1.6.9-5 +- for aarch64 do not set CFLAGS and LDFLAGS + * Wed Oct 12 2016 Jens Petersen - 1.6.9-4 - remove Agda obsoletes diff --git a/macros.ghc b/macros.ghc index d4bb2a2..156197b 100644 --- a/macros.ghc +++ b/macros.ghc @@ -23,8 +23,10 @@ fi %cabal_configure\ %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ +%ifnarch aarch64\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ +%endif\ %cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options # install From 28274f8b3a78c9f8a15a9e1170e9e3f78746dbe5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Oct 2016 11:32:12 +0900 Subject: [PATCH 314/514] only pass CFLAGS and LDFLAGS to ghc if set --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 064f01a..6c7d3c1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 5%{?dist} +Release: 6%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -137,6 +137,9 @@ EOF %changelog +* Mon Oct 17 2016 Jens Petersen - 1.6.9-6 +- only pass CFLAGS and LDFLAGS to ghc if set + * Mon Oct 17 2016 Jens Petersen - 1.6.9-5 - for aarch64 do not set CFLAGS and LDFLAGS diff --git a/macros.ghc b/macros.ghc index 156197b..4195a9a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -27,7 +27,7 @@ fi CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %endif\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} From deba8275bf6c903c74af4b615458462614c0cffc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Oct 2016 11:37:36 +0900 Subject: [PATCH 315/514] ghc-pkg-wrapper output is simple now --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 4195a9a..7a2e352 100644 --- a/macros.ghc +++ b/macros.ghc @@ -66,7 +66,7 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key | sed -e "s/key: //" | uniq)\ +keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key | uniq)\ pkgdir="%{ghclibdir}/${keyname}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ From 55f359cbaa7aedd6f0eb5fc47838252894ed308d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Oct 2016 12:14:17 +0900 Subject: [PATCH 316/514] disable dynlinking on aarch64 and set LDFLAGS again --- ghc-rpm-macros.spec | 15 ++++++++++++++- macros.ghc | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6c7d3c1..78d6678 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 6%{?dist} +Release: 7%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -106,6 +106,15 @@ install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper +# remove for ghc-8.0.1 +%ifarch aarch64 +# dynlinking failing with ghc-7.10.3 +cat >> %{buildroot}/%{macros_dir}/macros.ghc <> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh < - 1.6.9-7 +- set LDFLAGS for aarch64 again +- disable dynamic linking for aarch64 since it fails + * Mon Oct 17 2016 Jens Petersen - 1.6.9-6 - only pass CFLAGS and LDFLAGS to ghc if set diff --git a/macros.ghc b/macros.ghc index 7a2e352..73bbedd 100644 --- a/macros.ghc +++ b/macros.ghc @@ -25,8 +25,8 @@ fi %global _hardened_ldflags %{nil}\ %ifnarch aarch64\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %endif\ +LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install From 1f5090638249ebe4457bf2091e428b39423c3a69 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 17 Oct 2016 15:46:29 +0900 Subject: [PATCH 317/514] disable dynlinking on armv7hl too also fails with: libHS---ghc7.10.3.so: error: undefined reference to 'log' --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 78d6678..fdf4d20 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.9 -Release: 7%{?dist} +Release: 8%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -107,7 +107,7 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper # remove for ghc-8.0.1 -%ifarch aarch64 +%ifarch aarch64 armv7hl # dynlinking failing with ghc-7.10.3 cat >> %{buildroot}/%{macros_dir}/macros.ghc < - 1.6.9-8 +- disable dynlinking on armv7hl too + * Mon Oct 17 2016 Jens Petersen - 1.6.9-7 - set LDFLAGS for aarch64 again - disable dynamic linking for aarch64 since it fails From 9c211a6a35bf18159c8ba55fec97580a69d9f5a0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 26 Oct 2016 17:48:51 +0900 Subject: [PATCH 318/514] add a comment about -Wunused-label for aarch64 can be removed for ghc-8.0 --- macros.ghc | 1 + 1 file changed, 1 insertion(+) diff --git a/macros.ghc b/macros.ghc index 73bbedd..6ec7dca 100644 --- a/macros.ghc +++ b/macros.ghc @@ -23,6 +23,7 @@ fi %cabal_configure\ %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ +# -Wunused-label is extremely noisy: remove for ghc-8.0\ %ifnarch aarch64\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ From ebdd0063dda51a6cdd52ae199f078ba3d02ae233 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 26 Oct 2016 17:49:50 +0900 Subject: [PATCH 319/514] make ghc_lib_subpackage backward compatible with older 2 arg form --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc-extra | 9 +++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fdf4d20..65c9966 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.9 -Release: 8%{?dist} +Version: 1.6.10 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -146,6 +146,9 @@ EOF %changelog +* Wed Oct 26 2016 Jens Petersen - 1.6.10-1 +- make ghc_lib_subpackage backward compatible with older 2 args form + * Mon Oct 17 2016 Jens Petersen - 1.6.9-8 - disable dynlinking on armv7hl too diff --git a/macros.ghc-extra b/macros.ghc-extra index 7aa80c0..c5cdafc 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -1,16 +1,17 @@ # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- # ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name-version] +# for backward compat also support: ghc_lib_subpackage name version %ghc_lib_subpackage(c:l:x)\ -%define pkgname %{lua:\ +%define pkgname %{?2:%{1}}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ local _, _, name = string.find(pv, "^([%a-]+)-")\ print(name)\ -}\ -%define pkgver %{lua:\ +}}\ +%define pkgver %{?2}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ -}\ +}}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ From 37e9abdf73c34e135993d8cb280ea17dad5c08c6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 27 Oct 2016 11:39:16 +0900 Subject: [PATCH 320/514] don't list %{ix86} twice --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 65c9966..20dc9dd 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -30,7 +30,7 @@ Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler %if %{undefined without_hscolour} -%ifarch %{ix86} %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 +%ifarch %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 Requires: hscolour %endif %endif From a3ef23ec7870903345fbf39110c9300b56de45a2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 31 Oct 2016 12:22:20 +0900 Subject: [PATCH 321/514] only disable arm dynlinking for f26 (binutils, #1386126) --- ghc-rpm-macros.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 20dc9dd..cec6d10 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -107,6 +107,9 @@ install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper # remove for ghc-8.0.1 +# binutils-2.27-7.fc26 and later break Haskell dynamic linking on aarch64 and armv7hl +# https://bugzilla.redhat.com/show_bug.cgi?id=1386126 +%if 0%{?fedora} == 26 %ifarch aarch64 armv7hl # dynlinking failing with ghc-7.10.3 cat >> %{buildroot}/%{macros_dir}/macros.ghc <> %{buildroot}/%{macros_dir}/macros.ghc <> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh < - 1.6.10-2 +- only disable arm dynlinking for f26 (#1386126) + * Wed Oct 26 2016 Jens Petersen - 1.6.10-1 - make ghc_lib_subpackage backward compatible with older 2 args form * Mon Oct 17 2016 Jens Petersen - 1.6.9-8 -- disable dynlinking on armv7hl too +- disable dynlinking on armv7hl too (#1386126) * Mon Oct 17 2016 Jens Petersen - 1.6.9-7 - set LDFLAGS for aarch64 again -- disable dynamic linking for aarch64 since it fails +- disable dynamic linking for aarch64 since it fails (#1386126) * Mon Oct 17 2016 Jens Petersen - 1.6.9-6 - only pass CFLAGS and LDFLAGS to ghc if set From 3a48002a94623d92426f9b24175b98170a466e27 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 25 Nov 2016 11:20:05 +0900 Subject: [PATCH 322/514] reenable dynlink on arm archs; condition _defaultlicensedir --- ghc-rpm-macros.spec | 22 +++++++--------------- macros.ghc | 10 +++++----- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cec6d10..d497d1d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.10 -Release: 2%{?dist} +Version: 1.6.11 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -106,19 +106,6 @@ install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper -# remove for ghc-8.0.1 -# binutils-2.27-7.fc26 and later break Haskell dynamic linking on aarch64 and armv7hl -# https://bugzilla.redhat.com/show_bug.cgi?id=1386126 -%if 0%{?fedora} == 26 -%ifarch aarch64 armv7hl -# dynlinking failing with ghc-7.10.3 -cat >> %{buildroot}/%{macros_dir}/macros.ghc <> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh < - 1.6.11-1 +- re-enable dynlink on armv7hl and aarch64 since binutils was fixed (#1386126) +- condition use of _defaultlicensedir +- quote some echo'd macros + * Mon Oct 31 2016 Jens Petersen - 1.6.10-2 - only disable arm dynlinking for f26 (#1386126) diff --git a/macros.ghc b/macros.ghc index 6ec7dca..7a5347f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -28,7 +28,7 @@ fi CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} @@ -73,9 +73,9 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ -echo "%dir ${pkgdir}" >> %{basepkg}.files\ +echo "%%dir ${pkgdir}" >> %{basepkg}.files\ %if %{undefined ghc_without_shared}\ -echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ +echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ %endif\ find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ @@ -83,7 +83,7 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ -for i in $(ls %{buildroot}%{_defaultlicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ +for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ @@ -115,7 +115,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_defaultlicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_verbose}\ %{nil} From cab483029e5ca42dc2b075420be0a65f69709f58 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 2 Dec 2016 13:52:08 +0900 Subject: [PATCH 323/514] add 4 more F25 obsoletes for editline, hashed-storage, nats, primes --- ghc-rpm-macros.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d497d1d..baf9f9a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -76,6 +76,10 @@ Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2 Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3 Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2 Obsoletes: idris <= 0.9.9.1 +Obsoletes: ghc-editline < 0.2.1.1-13, ghc-editline-devel < 0.2.1.1-13 +Obsoletes: ghc-hashed-storage < 0.5.11-4, ghc-hashed-storage-devel < 0.5.11-4 +Obsoletes: ghc-nats <= 0.2, ghc-nats-devel <= 0.2 +Obsoletes: ghc-primes <= 0.2.1.0-11, ghc-primes-devel <= 0.2.1.0-11 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -137,6 +141,9 @@ EOF %changelog +* Fri Dec 2 2016 Jens Petersen - 1.6.11-2 +- add more F25 obsoletes for: editline, hashed-storage, nats, primes + * Fri Nov 25 2016 Jens Petersen - 1.6.11-1 - re-enable dynlink on armv7hl and aarch64 since binutils was fixed (#1386126) - condition use of _defaultlicensedir From 5517c1f361b268d1cea429c1d0579567ef2cb520 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 8 Feb 2017 15:26:07 +0900 Subject: [PATCH 324/514] new cabal-tweak-drop-dep and other merges from github - no longer use a topdir for subpackage building - only autopackage license if subpackaging - move uniq to ghc-pkg-wrapper - add macros.ghc-fedora for Fedora specific config - replace cabal_verbose with cabal_configure_verbose, cabal_build_verbose, cabal_install_verbose, cabal_haddock_verbose, and cabal_test_verbose - new _ghcdocdir --- AUTHORS | 4 +++ cabal-tweak-drop-dep | 30 ++++++++++++++++++++++ ghc-deps.sh | 23 +++++++++-------- ghc-pkg-wrapper | 2 +- ghc-rpm-macros.spec | 20 +++++++++++++-- macros.ghc | 58 ++++++++++++++++++++++--------------------- macros.ghc-extra | 5 ++-- macros.ghc-fedora | 5 ++++ tests/test-rebuild.sh | 2 +- 9 files changed, 103 insertions(+), 46 deletions(-) create mode 100755 cabal-tweak-drop-dep create mode 100644 macros.ghc-fedora diff --git a/AUTHORS b/AUTHORS index adc72fc..14e0d42 100644 --- a/AUTHORS +++ b/AUTHORS @@ -5,3 +5,7 @@ Initial implementation: Bryan O'Sullivan Jens Petersen Yaakov Nemoy + +Contributions from: +Peter Trommler +Ondřej Súkup diff --git a/cabal-tweak-drop-dep b/cabal-tweak-drop-dep new file mode 100755 index 0000000..3bc5d58 --- /dev/null +++ b/cabal-tweak-drop-dep @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e +x + +USAGE="Usage: $0 dep" + +if [ $# -ne 1 ]; then + echo "$USAGE" + exit 1 +fi + +DEP=$1 + +CABALFILE=$(ls *.cabal) + +if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then + echo "There needs to be one .cabal file in the current dir!" + exit 1 +fi + +if [ ! -f $CABALFILE.orig ]; then + BACKUP=.orig +fi + +if grep $DEP $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then + echo "$0: deleting whole $DEP lines not safe - try more precise pattern" + exit 1 +fi + +sed -i$BACKUP -e "/$DEP/d" $CABALFILE diff --git a/ghc-deps.sh b/ghc-deps.sh index 831c8c5..de838cb 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -5,15 +5,15 @@ set +x -MODE=$1 -PKGBASEDIR=$2 -PKGCONFDIR=$PKGBASEDIR/package.conf.d +mode=$1 +pkgbasedir=$2 +pkgconfdir=$pkgbasedir/package.conf.d -GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR" +ghc_pkg="/usr/lib/rpm/ghc-pkg-wrapper $pkgbasedir" -case $MODE in - --provides) FIELD=id ;; - --requires) FIELD=depends ;; +case $mode in + --provides) field=id ;; + --requires) field=depends ;; *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac @@ -22,10 +22,11 @@ files=$(cat) for i in $files; do case $i in # exclude builtin_rts.conf - $PKGCONFDIR/*-*.conf) - PKGVER=$(echo $i | sed -e "s%$PKGCONFDIR/\(.\+\)-.\+.conf%\1%") - OUT=$($GHC_PKG field $PKGVER $FIELD | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") - for d in $OUT; do + $pkgconfdir/*-*.conf) + pkgver=$(echo $i | sed -e "s%$pkgconfdir/\(.\+\)-.\+.conf%\1%") + ids=$($ghc_pkg field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + + for d in $ids; do case $d in *-*) echo "ghc-devel($d)" ;; *) ;; diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index cd3778c..716cccf 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -29,4 +29,4 @@ else GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR" fi -$GHC_PKG -v0 --simple-output --global $* +$GHC_PKG -v0 --simple-output --global $* | uniq diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index baf9f9a..7c915c2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.11 -Release: 2%{?dist} +Version: 1.6.12 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -26,6 +26,8 @@ Source5: cabal-tweak-flag Source6: macros.ghc-extra Source7: ghc.attr Source8: ghc-pkg-wrapper +Source9: macros.ghc-fedora +Source11: cabal-tweak-drop-dep Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler @@ -99,6 +101,7 @@ echo no build stage needed %install install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra +install -p -D -m 0644 %{SOURCE9} %{buildroot}/%{macros_dir}/macros.ghc-fedora install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh @@ -108,6 +111,7 @@ install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.a install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag +install -p -D -m 0755 %{SOURCE11} %{buildroot}/%{_bindir}/cabal-tweak-drop-dep install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper %if 0%{?rhel} && 0%{?rhel} < 7 @@ -122,12 +126,14 @@ EOF %license COPYING %doc AUTHORS %{macros_dir}/macros.ghc +%{macros_dir}/macros.ghc-fedora %if 0%{?fedora} || 0%{?rhel} >= 7 %{_prefix}/lib/rpm/fileattrs/ghc.attr %endif %{_prefix}/lib/rpm/ghc-deps.sh %{_prefix}/lib/rpm/ghc-pkg-wrapper %{_bindir}/cabal-tweak-dep-ver +%{_bindir}/cabal-tweak-drop-dep %{_bindir}/cabal-tweak-flag @@ -141,6 +147,16 @@ EOF %changelog +* Wed Feb 8 2017 Jens Petersen - 1.6.12-1 +- no longer use a topdir for subpackage building +- only autopackage license if subpackaging +- add new cabal-tweak-drop-dep script for excluding trivial deps +- move uniq to ghc-pkg-wrapper +- add macros.ghc-fedora for Fedora specific config +- replace cabal_verbose with cabal_configure_verbose, cabal_build_verbose, + cabal_install_verbose, cabal_haddock_verbose, and cabal_test_verbose +- new _ghcdocdir + * Fri Dec 2 2016 Jens Petersen - 1.6.11-2 - add more F25 obsoletes for: editline, hashed-storage, nats, primes diff --git a/macros.ghc b/macros.ghc index 7a5347f..9e2f4a1 100644 --- a/macros.ghc +++ b/macros.ghc @@ -6,6 +6,9 @@ LANG=en_US.utf8\ ./Setup +# compiler version +%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} + # check ghc version was rebuilt against self %ghc_check_bootstrap\ if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ @@ -28,15 +31,15 @@ fi CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install -%cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot} +%cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} # tests %cabal_test\ %if %{with tests}\ -%cabal test %{?cabal_verbose}\ +%cabal test %{?cabal_test_options}\ %endif # no _pkgdocdir in EPEL <= 7 @@ -67,7 +70,7 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key | uniq)\ +keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key)\ pkgdir="%{ghclibdir}/${keyname}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ @@ -83,9 +86,11 @@ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ +%if 0%{?1:1}\ for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ -echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ +echo "%%license %{?1:../%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ +%endif\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ @@ -93,9 +98,6 @@ fi\ done\ %{nil} -# compiler version -%ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} - # create and install package.conf file # cabal_pkg_conf [name] [version] %cabal_pkg_conf()\ @@ -110,13 +112,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_bin_build\ %global debug_package %{nil}\ %cabal_configure\ -%cabal build %{?cabal_verbose} +%cabal build %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ %cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ -%cabal build %{?cabal_verbose}\ +%cabal build %{?cabal_build_options}\ %{nil} # ghc_lib_build [name] [version] @@ -126,7 +128,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\ -%cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle\ +%cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle %{?cabal_haddock_options}\ fi\ %endif\ %{nil} @@ -160,16 +162,16 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %ghc_fix_rpath()\ %if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ -PDIR=$(pwd)\ +pdir=$(pwd)\ for lib in %*; do\ for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ if [ -x "$i" ]; then\ - RPATH=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ - case $RPATH in\ - *$PDIR/$lib/*)\ - SYSPATH=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | uniq)\ - NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/$lib/dist/build@${SYSPATH}@g")\ - chrpath -r $NEWRPATH $i\ + rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ + case $rpath in\ + *$pdir/$lib/*)\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs)\ + NEWRPATH=$(echo $rpath | sed -e "s@$pdir/$lib/dist/build@${syspath}@g")\ + chrpath -r $newrpath $i\ ;;\ esac\ else\ @@ -186,22 +188,22 @@ done\ %ghc_fix_dynamic_rpath()\ %if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ -PDIR=$(pwd)\ +pdir=$(pwd)\ for i in %*; do\ case $i in\ - /*) PROG=%{buildroot}$i ;;\ - *) PROG=%{buildroot}%{_bindir}/$i ;;\ + /*) prog=%{buildroot}$i ;;\ + *) prog=%{buildroot}%{_bindir}/$i ;;\ esac\ - if [ -x "$PROG" ]; then\ - RPATH=$(chrpath $PROG | sed -e "s@^$PROG: R.*PATH=@@")\ - case $RPATH in\ - *$PDIR*)\ - NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ - chrpath -r $NEWRPATH $PROG\ + if [ -x "$prog" ]; then\ + RPATH=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\ + case $rpath in\ + *$pdir*)\ + newrpath=$(echo $rpath | sed -e "s@$pdir/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ + chrpath -r $newrpath $prog\ ;;\ esac\ else\ - echo "%%ghc_fix_dynamic_rpath: no such file $PROG"\ + echo "%%ghc_fix_dynamic_rpath: no such file $prog"\ exit 1\ fi\ done\ diff --git a/macros.ghc-extra b/macros.ghc-extra index c5cdafc..9c525af 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -51,13 +51,13 @@ This package provides the Haskell %{pkgname} library development files.\ %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ \ -%files -n %{basepkg} -f %{basepkg}.files\ +%files -n %{basepkg} -f ../%{pkgname}-%{pkgver}/%{basepkg}.files\ %if 0%{?rhel} && 0%{?rhel} < 7\ %defattr(-,root,root,-)\ %endif\ %{?base_doc_files:%doc %base_doc_files}\ \ -%files -n %{basepkg}-devel -f %{basepkg}-devel.files\ +%files -n %{basepkg}-devel -f ../%{pkgname}-%{pkgver}/%{basepkg}-devel.files\ %if 0%{?rhel} && 0%{?rhel} < 7\ %defattr(-,root,root,-)\ %endif\ @@ -94,7 +94,6 @@ cd $i\ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ %ghc_lib_install $name $ver\ -mv *.files ..\ cd ..\ done\ %ghc_fix_rpath $args\ diff --git a/macros.ghc-fedora b/macros.ghc-fedora new file mode 100644 index 0000000..1bfd7b8 --- /dev/null +++ b/macros.ghc-fedora @@ -0,0 +1,5 @@ +# Fedora specific settings + +%_ghcdocdir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} + +%cabal_install_options -v diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 2e25766..e6dc976 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -24,7 +24,7 @@ ARCH=$(arch) if [ -f /etc/os-release ]; then eval $(grep VERSION_ID /etc/os-release) case $VERSION_ID in - 22) BRANCH=master ;; + 26) BRANCH=master ;; 7.*) BRANCH=epel7 ;; *) BRANCH="f$VERSION_ID" ;; esac From ae0985a107d42c0ad8f9b34e32814a4024d44a55 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 9 Feb 2017 10:51:32 +0900 Subject: [PATCH 325/514] build subpackages inside main package dir --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- macros.ghc-extra | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7c915c2..100cf6a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.12 +Version: 1.6.13 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -147,6 +147,9 @@ EOF %changelog +* Thu Feb 9 2017 Jens Petersen - 1.6.13-1 +- build subpackages inside main package directory + * Wed Feb 8 2017 Jens Petersen - 1.6.12-1 - no longer use a topdir for subpackage building - only autopackage license if subpackaging diff --git a/macros.ghc b/macros.ghc index 9e2f4a1..00be8b5 100644 --- a/macros.ghc +++ b/macros.ghc @@ -88,7 +88,7 @@ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ %if 0%{?1:1}\ for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ -echo "%%license %{?1:../%{pkgnamever}/}$i" >> %{basepkg}.files\ +echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ %endif\ for i in %{basepkg}.files %{basepkg}-devel.files; do\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 9c525af..cafbfa2 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -51,13 +51,13 @@ This package provides the Haskell %{pkgname} library development files.\ %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ \ -%files -n %{basepkg} -f ../%{pkgname}-%{pkgver}/%{basepkg}.files\ +%files -n %{basepkg} -f %{pkgname}-%{pkgver}/%{basepkg}.files\ %if 0%{?rhel} && 0%{?rhel} < 7\ %defattr(-,root,root,-)\ %endif\ %{?base_doc_files:%doc %base_doc_files}\ \ -%files -n %{basepkg}-devel -f ../%{pkgname}-%{pkgver}/%{basepkg}-devel.files\ +%files -n %{basepkg}-devel -f %{pkgname}-%{pkgver}/%{basepkg}-devel.files\ %if 0%{?rhel} && 0%{?rhel} < 7\ %defattr(-,root,root,-)\ %endif\ From 89fc8859a144be42e3e5d03ab13dacaf06670353 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Feb 2017 12:50:02 +0900 Subject: [PATCH 326/514] fix subpackage builds if %ghc_subpackaging set configure with --user otherwise --global --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- macros.ghc-extra | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 100cf6a..ace5917 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.13 +Version: 1.6.14 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -147,6 +147,9 @@ EOF %changelog +* Fri Feb 10 2017 Jens Petersen - 1.6.14-1 +- if ghc_subpackaging set configure with --user otherwise --global + * Thu Feb 9 2017 Jens Petersen - 1.6.13-1 - build subpackages inside main package directory diff --git a/macros.ghc b/macros.ghc index 00be8b5..7986970 100644 --- a/macros.ghc +++ b/macros.ghc @@ -117,7 +117,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user} %{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_build_options}\ %{nil} diff --git a/macros.ghc-extra b/macros.ghc-extra index cafbfa2..c0bd7b1 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -67,7 +67,7 @@ This package provides the Haskell %{pkgname} library development files.\ # ghc_libs_build [name-version] ... %ghc_libs_build()\ HOME=$PWD\ -%define cabal_configure_options --user\ +%global ghc_subpackaging 1\ for i in %*; do\ name=$(echo $i | sed -e "s/\\(.*\\)-.*/\\1/")\ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ From f1517cd581d74d60ef1fd893afe7c87a2ef850ce Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 13 Feb 2017 19:25:12 +0900 Subject: [PATCH 327/514] fix handling of ghc's .files with new ghc_lib_subpackage -d option --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- macros.ghc-extra | 8 ++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ace5917..7c55e4f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.14 +Version: 1.6.15 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -147,6 +147,9 @@ EOF %changelog +* Mon Feb 13 2017 Jens Petersen - 1.6.15-1 +- fix handling of ghc's .files with new ghc_lib_subpackage -d option + * Fri Feb 10 2017 Jens Petersen - 1.6.14-1 - if ghc_subpackaging set configure with --user otherwise --global diff --git a/macros.ghc b/macros.ghc index 7986970..433474e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -117,7 +117,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user} %{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_build_options}\ %{nil} diff --git a/macros.ghc-extra b/macros.ghc-extra index c0bd7b1..4b1686b 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -1,8 +1,8 @@ # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- -# ghc_lib_subpackage [-c cdepslist] [-l licensetag] [-x] [name-version] +# ghc_lib_subpackage [-c cdepslist] [-d] [-l licensetag] [-x] [name-version] # for backward compat also support: ghc_lib_subpackage name version -%ghc_lib_subpackage(c:l:x)\ +%ghc_lib_subpackage(c:dl:x)\ %define pkgname %{?2:%{1}}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ local _, _, name = string.find(pv, "^([%a-]+)-")\ @@ -51,13 +51,13 @@ This package provides the Haskell %{pkgname} library development files.\ %postun -n %{basepkg}-devel\ %ghc_pkg_recache\ \ -%files -n %{basepkg} -f %{pkgname}-%{pkgver}/%{basepkg}.files\ +%files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ %if 0%{?rhel} && 0%{?rhel} < 7\ %defattr(-,root,root,-)\ %endif\ %{?base_doc_files:%doc %base_doc_files}\ \ -%files -n %{basepkg}-devel -f %{pkgname}-%{pkgver}/%{basepkg}-devel.files\ +%files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ %if 0%{?rhel} && 0%{?rhel} < 7\ %defattr(-,root,root,-)\ %endif\ From df54044203dad8b6e98629ba138dee49a2f6a169 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 14 Feb 2017 11:12:12 +0900 Subject: [PATCH 328/514] quieten ppc64 and ppc64le logs by not setting CFLAGS -Wunused-label very noisy with ghc-7.10 I think this can be dropped for ghc-8.0 --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7c55e4f..b8ec7ab 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -147,6 +147,9 @@ EOF %changelog +* Tue Feb 14 2017 Jens Petersen - 1.6.15-2 +- do not set CFLAGS on ppc64 or ppc64le due to -Wunused-label noise + * Mon Feb 13 2017 Jens Petersen - 1.6.15-1 - fix handling of ghc's .files with new ghc_lib_subpackage -d option diff --git a/macros.ghc b/macros.ghc index 433474e..736febf 100644 --- a/macros.ghc +++ b/macros.ghc @@ -27,7 +27,7 @@ fi %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ # -Wunused-label is extremely noisy: remove for ghc-8.0\ -%ifnarch aarch64\ +%ifnarch aarch64 ppc64 ppc64le\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ From 66fe267a12a2a40a1ae811f26b5dc065d648e000 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 22 Feb 2017 13:32:26 +0900 Subject: [PATCH 329/514] fix generation of haddock's --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b8ec7ab..004c7e3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.15 -Release: 2%{?dist} +Version: 1.6.16 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -147,6 +147,9 @@ EOF %changelog +* Wed Feb 22 2017 Jens Petersen - 1.6.16-1 +- fix generation of haddock's + * Tue Feb 14 2017 Jens Petersen - 1.6.15-2 - do not set CFLAGS on ppc64 or ppc64le due to -Wunused-label noise diff --git a/macros.ghc b/macros.ghc index 736febf..2ecf58c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -127,7 +127,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %if %{undefined without_haddock}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -if [ -f dist/build/libHS%{pkgname}-%{pkgver}.a ]; then\ +if [ -f dist/build/libHS%{pkgname}-%{pkgver}*.a ]; then\ %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle %{?cabal_haddock_options}\ fi\ %endif\ From 473b7360531466012d848ea9985cca36a2dfd377 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 22 Feb 2017 14:28:31 +0900 Subject: [PATCH 330/514] fix fixing of rpaths --- ghc-rpm-macros.spec | 1 + macros.ghc | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 004c7e3..0da784c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -149,6 +149,7 @@ EOF %changelog * Wed Feb 22 2017 Jens Petersen - 1.6.16-1 - fix generation of haddock's +- fix fixing of rpaths for subpackages * Tue Feb 14 2017 Jens Petersen - 1.6.15-2 - do not set CFLAGS on ppc64 or ppc64le due to -Wunused-label noise diff --git a/macros.ghc b/macros.ghc index 2ecf58c..2816c60 100644 --- a/macros.ghc +++ b/macros.ghc @@ -162,15 +162,14 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %ghc_fix_rpath()\ %if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ -pdir=$(pwd)\ -for lib in %*; do\ for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ +for lib in %*; do\ if [ -x "$i" ]; then\ rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ case $rpath in\ - *$pdir/$lib/*)\ + *$PWD/$lib/dist/build*)\ syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs)\ - NEWRPATH=$(echo $rpath | sed -e "s@$pdir/$lib/dist/build@${syspath}@g")\ + newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\ chrpath -r $newrpath $i\ ;;\ esac\ From 09527a512dae66a45f9b49fac6839c012972b83c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 23 Feb 2017 20:58:38 +0900 Subject: [PATCH 331/514] subpackages can contain numbers and need --user --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 4 ++-- macros.ghc-extra | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0da784c..d063ce2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.16 +Version: 1.6.17 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -147,6 +147,10 @@ EOF %changelog +* Wed Feb 22 2017 Jens Petersen - 1.6.17-1 +- setup --global/--user in cabal_configure +- allow subpackage names to contain digits + * Wed Feb 22 2017 Jens Petersen - 1.6.16-1 - fix generation of haddock's - fix fixing of rpaths for subpackages diff --git a/macros.ghc b/macros.ghc index 2816c60..c08af31 100644 --- a/macros.ghc +++ b/macros.ghc @@ -31,7 +31,7 @@ fi CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} @@ -117,7 +117,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?cabal_build_options}\ %{nil} diff --git a/macros.ghc-extra b/macros.ghc-extra index 4b1686b..189953a 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -5,7 +5,7 @@ %ghc_lib_subpackage(c:dl:x)\ %define pkgname %{?2:%{1}}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ -local _, _, name = string.find(pv, "^([%a-]+)-")\ +local _, _, name = string.find(pv, "^([%a%d-]+)-")\ print(name)\ }}\ %define pkgver %{?2}%{!?2:%{lua:\ From b1fc1965773cd7e9c4d11e6af2f9d5f3cc6878fd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 3 Mar 2017 10:04:39 +0900 Subject: [PATCH 332/514] fixes for when (subpackage) pkg-ver already installed macros.ghc no longer uses ghc-pkg-wrapper - %ghc_fix_rpath gets lib dir directly by globbing buildroot - %ghc_gen_filelists reads pkg key from .conf - ghc-deps.sh: read unique pkg id from .conf before this preinstalled libs were interfering and this was further exasperated on ghc8 where .conf filenames are not keyed so we were querying `ghc-pkg list pkg` instead of pkg-ver. --- ghc-deps.sh | 4 ++-- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 10 ++++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index de838cb..e4d1f77 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -23,8 +23,8 @@ for i in $files; do case $i in # exclude builtin_rts.conf $pkgconfdir/*-*.conf) - pkgver=$(echo $i | sed -e "s%$pkgconfdir/\(.\+\)-.\+.conf%\1%") - ids=$($ghc_pkg field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + id=$(grep "id: " $i | sed -e "s/id: //") + ids=$($ghc_pkg field $id $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d063ce2..412f0b3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.17 +Version: 1.6.18 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -147,6 +147,10 @@ EOF %changelog +* Thu Mar 2 2017 Jens Petersen - 1.6.18-1 +- fix ghc_fix_rpath, ghc_gen_filelists, and ghc-deps.sh when pkg-ver already + installed + * Wed Feb 22 2017 Jens Petersen - 1.6.17-1 - setup --global/--user in cabal_configure - allow subpackage names to contain digits diff --git a/macros.ghc b/macros.ghc index c08af31..277bbed 100644 --- a/macros.ghc +++ b/macros.ghc @@ -70,11 +70,12 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -keyname=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} field %{pkgnamever} key)\ -pkgdir="%{ghclibdir}/${keyname}"\ +pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ +key=$(grep "key: " %{buildroot}${pkgconf} | sed -e "s/key: //")\ +pkgdir="%{ghclibdir}/${key}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ -echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" >> %{basepkg}-devel.files\ +echo ${pkgconf} >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ echo "%%dir ${pkgdir}" >> %{basepkg}.files\ %if %{undefined ghc_without_shared}\ @@ -168,7 +169,8 @@ for lib in %*; do\ rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ case $rpath in\ *$PWD/$lib/dist/build*)\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs)\ + pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid)\ newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\ chrpath -r $newrpath $i\ ;;\ From 2fb629fb9b7ec14694faa3a19bf8252c2a868685 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 3 Mar 2017 11:00:57 +0900 Subject: [PATCH 333/514] %ghc_bin_install and %ghc_lib_install now run ghc_fix_rpath on subpkgs --- ghc-rpm-macros.spec | 1 + macros.ghc | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 412f0b3..1f3739b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -150,6 +150,7 @@ EOF * Thu Mar 2 2017 Jens Petersen - 1.6.18-1 - fix ghc_fix_rpath, ghc_gen_filelists, and ghc-deps.sh when pkg-ver already installed +- ghc_bin_install and ghc_lib_install now run ghc_fix_rpath on subpkgs * Wed Feb 22 2017 Jens Petersen - 1.6.17-1 - setup --global/--user in cabal_configure diff --git a/macros.ghc b/macros.ghc index 277bbed..8431003 100644 --- a/macros.ghc +++ b/macros.ghc @@ -146,6 +146,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ %{!?1:%ghc_strip_dynlinked}\ +%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ %{nil} # ghc_lib_install [name] [version] @@ -157,6 +158,7 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %cabal_pkg_conf\ %ghc_gen_filelists\ %{!?1:%ghc_strip_dynlinked}\ +%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ %{nil} # ghc_fix_rpath lib-ver ... From 836ded975127126a70c84c11c5b10fdd7d06f32e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 12 Mar 2017 13:43:32 +0900 Subject: [PATCH 334/514] obsolete geniplate and sized-types --- ghc-rpm-macros.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1f3739b..3e47f96 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.18 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -65,11 +65,11 @@ Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5 Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14 # dropped from HP 2014.2 (F22) Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 -# for f24 +# f24 Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3 Obsoletes: ghc-hakyll < 4.5.4.0-6, ghc-hakyll-devel < 4.5.4.0-6 Obsoletes: ghc-leksah-server < 0.14.3.1-4, ghc-leksah-server-devel < 0.14.3.1-4 -# for f25 +# f25 Obsoletes: ghc-cmdtheline <= 0.2.3, ghc-cmdtheline-devel <= 0.2.3 Obsoletes: ghc-concrete-typerep <= 0.1.0.2, ghc-concrete-typerep-devel <= 0.1.0.2 Obsoletes: ghc-glade <= 0.12.5.0, ghc-glade-devel <= 0.12.5.0 @@ -82,6 +82,9 @@ Obsoletes: ghc-editline < 0.2.1.1-13, ghc-editline-devel < 0.2.1.1-13 Obsoletes: ghc-hashed-storage < 0.5.11-4, ghc-hashed-storage-devel < 0.5.11-4 Obsoletes: ghc-nats <= 0.2, ghc-nats-devel <= 0.2 Obsoletes: ghc-primes <= 0.2.1.0-11, ghc-primes-devel <= 0.2.1.0-11 +# f26 +Obsoletes: ghc-geniplate <= 0.6.0.5, ghc-geniplate-devel <= 0.6.0.5 +Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -147,6 +150,9 @@ EOF %changelog +* Sun Mar 12 2017 Jens Petersen - 1.6.18-2 +- obsolete geniplate and sized-types + * Thu Mar 2 2017 Jens Petersen - 1.6.18-1 - fix ghc_fix_rpath, ghc_gen_filelists, and ghc-deps.sh when pkg-ver already installed From 195cbddf39e55f51854c54f16c78e5ec91d5c740 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 16 Mar 2017 13:14:51 +0900 Subject: [PATCH 335/514] %ghc_fix_dynamic_rpath define lowercase RPATH --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 8431003..90de3c2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -198,7 +198,7 @@ for i in %*; do\ *) prog=%{buildroot}%{_bindir}/$i ;;\ esac\ if [ -x "$prog" ]; then\ - RPATH=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\ + rpath=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\ case $rpath in\ *$pdir*)\ newrpath=$(echo $rpath | sed -e "s@$pdir/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ From 6ed0be7ab1d4bdc29977d157b47550fdc19b2974 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 16 Mar 2017 13:17:12 +0900 Subject: [PATCH 336/514] add obsoletes for cgi and multipart --- ghc-rpm-macros.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3e47f96..5fb08aa 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -85,6 +85,8 @@ Obsoletes: ghc-primes <= 0.2.1.0-11, ghc-primes-devel <= 0.2.1.0-11 # f26 Obsoletes: ghc-geniplate <= 0.6.0.5, ghc-geniplate-devel <= 0.6.0.5 Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 +Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5 +Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. From 7b97799ed47b17e6e6d9c484167e33f6ee43c6a1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 16 Mar 2017 13:27:13 +0900 Subject: [PATCH 337/514] condition obsoletes on fedora version --- ghc-rpm-macros.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5fb08aa..066839a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.18 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -57,19 +57,22 @@ for example in ghc and haskell-platform. # this is a last resort when there is no such appropriate package %package -n ghc-obsoletes Summary: Dummy package to obsolete deprecated Haskell packages -# these 3 no longer build with ghc-7.8 (F22) +%if 0%{?fedora} >= 22 +# these 3 no longer build with ghc-7.8 Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2 Obsoletes: ghc-parameterized-data < 0.1.6 Obsoletes: ghc-parameterized-data-devel < 0.1.6 Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5 Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14 -# dropped from HP 2014.2 (F22) +# dropped from HP 2014.2 Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 -# f24 +%endif +%if 0%{?fedora} >= 24 Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3 Obsoletes: ghc-hakyll < 4.5.4.0-6, ghc-hakyll-devel < 4.5.4.0-6 Obsoletes: ghc-leksah-server < 0.14.3.1-4, ghc-leksah-server-devel < 0.14.3.1-4 -# f25 +%endif +%if 0%{?fedora} >= 25 Obsoletes: ghc-cmdtheline <= 0.2.3, ghc-cmdtheline-devel <= 0.2.3 Obsoletes: ghc-concrete-typerep <= 0.1.0.2, ghc-concrete-typerep-devel <= 0.1.0.2 Obsoletes: ghc-glade <= 0.12.5.0, ghc-glade-devel <= 0.12.5.0 @@ -82,11 +85,14 @@ Obsoletes: ghc-editline < 0.2.1.1-13, ghc-editline-devel < 0.2.1.1-13 Obsoletes: ghc-hashed-storage < 0.5.11-4, ghc-hashed-storage-devel < 0.5.11-4 Obsoletes: ghc-nats <= 0.2, ghc-nats-devel <= 0.2 Obsoletes: ghc-primes <= 0.2.1.0-11, ghc-primes-devel <= 0.2.1.0-11 -# f26 +%endif +%if 0%{?fedora} >= 26 Obsoletes: ghc-geniplate <= 0.6.0.5, ghc-geniplate-devel <= 0.6.0.5 Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 +# dropped from HP 8.0.2 Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5 Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -152,8 +158,12 @@ EOF %changelog +* Thu Mar 16 2017 Jens Petersen - 1.6.18-3 +- condition obsoletes on fedora version +- add f26 obsoletes for cgi and multipart + * Sun Mar 12 2017 Jens Petersen - 1.6.18-2 -- obsolete geniplate and sized-types +- obsolete geniplate and sized-types for F26 * Thu Mar 2 2017 Jens Petersen - 1.6.18-1 - fix ghc_fix_rpath, ghc_gen_filelists, and ghc-deps.sh when pkg-ver already From 78b7c8e144bfc17d41734c2e7b48fa0af8bffa1b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 24 Mar 2017 18:17:14 +0900 Subject: [PATCH 338/514] haddock generation failing since f25 ghc-7.10 due to [ -f *.a] failing --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 066839a..b294212 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.18 -Release: 3%{?dist} +Version: 1.6.19 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -158,6 +158,9 @@ EOF %changelog +* Fri Mar 24 2017 Jens Petersen - 1.6.19-1 +- fix haddock generation + * Thu Mar 16 2017 Jens Petersen - 1.6.18-3 - condition obsoletes on fedora version - add f26 obsoletes for cgi and multipart diff --git a/macros.ghc b/macros.ghc index 90de3c2..6371042 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,7 +128,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %if %{undefined without_haddock}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ -if [ -f dist/build/libHS%{pkgname}-%{pkgver}*.a ]; then\ +if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\ %cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle %{?cabal_haddock_options}\ fi\ %endif\ From c17dd21b04954539b3d70090bebfb3a0c1e65366 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 26 Mar 2017 19:57:33 +0900 Subject: [PATCH 339/514] %cabal_configure now outputs Cabal version --- ghc-rpm-macros.spec | 1 + macros.ghc | 1 + 2 files changed, 2 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b294212..4a91f6c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -160,6 +160,7 @@ EOF %changelog * Fri Mar 24 2017 Jens Petersen - 1.6.19-1 - fix haddock generation +- cabal_configure now outputs Cabal version * Thu Mar 16 2017 Jens Petersen - 1.6.18-3 - condition obsoletes on fedora version diff --git a/macros.ghc b/macros.ghc index 6371042..c9be051 100644 --- a/macros.ghc +++ b/macros.ghc @@ -31,6 +31,7 @@ fi CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ %endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ +%cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install From 7855aaa8f1b41d167a6c23815e8b766b765b3e76 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 26 Mar 2017 20:12:10 +0900 Subject: [PATCH 340/514] ghc-pkg < 8 only accepts pkg-ver not pkg-ver-id_hash --- ghc-deps.sh | 7 ++++++- ghc-rpm-macros.spec | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index e4d1f77..d651d46 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -17,13 +17,18 @@ case $mode in *) echo "`basename $0`: Need --provides or --requires" ; exit 1 esac +ghc_ver=$(basename $pkgbasedir | sed -e s/ghc-//) + files=$(cat) for i in $files; do case $i in # exclude builtin_rts.conf $pkgconfdir/*-*.conf) - id=$(grep "id: " $i | sed -e "s/id: //") + case $ghc_ver in + 8.*) id=$(grep "id: " $i | sed -e "s/id: //") ;; + *) id=$(echo $i | sed -e "s%$pkgconfdir/%%" -e "s%.conf%%") ;; + esac ids=$($ghc_pkg field $id $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4a91f6c..4ba25c3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -161,6 +161,7 @@ EOF * Fri Mar 24 2017 Jens Petersen - 1.6.19-1 - fix haddock generation - cabal_configure now outputs Cabal version +- fix ghc-deps.sh for ghc-pkg < 8 which does not accept pkg id * Thu Mar 16 2017 Jens Petersen - 1.6.18-3 - condition obsoletes on fedora version From 38f99a79b3d4addb6ad13629e732a6f4e53f471a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 7 Apr 2017 19:09:23 +0900 Subject: [PATCH 341/514] fix %ghc_fix_rpath for ghc-7.10 --- ghc-rpm-macros.spec | 2 ++ macros.ghc | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4ba25c3..fecfe71 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -36,6 +36,8 @@ Requires: ghc-compiler Requires: hscolour %endif %endif +# this package could now be noarch again +#BuildArch: noarch %description A set of macros for building GHC packages following the Haskell Guidelines diff --git a/macros.ghc b/macros.ghc index c9be051..5076832 100644 --- a/macros.ghc +++ b/macros.ghc @@ -172,8 +172,14 @@ for lib in %*; do\ rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ case $rpath in\ *$PWD/$lib/dist/build*)\ - pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid)\ + case %{ghc_version} in\ + 7.10.*)\ + pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ + *)\ + pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ + esac\ newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\ chrpath -r $newrpath $i\ ;;\ From 635a0ea454403b408ca6ca515a55ef738115add4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 7 Apr 2017 19:11:29 +0900 Subject: [PATCH 342/514] Group and %defattr are only needed for rhel5 --- macros.ghc-extra | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index 189953a..9d98fda 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -17,7 +17,7 @@ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ %define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ -%if 0%{?rhel} && 0%{?rhel} < 7\ +%if 0%{?rhel} && 0%{?rhel} < 6\ Group: System/Libraries\ %endif\ %{?1:Version: %{pkgver}}\ @@ -30,7 +30,7 @@ This package provides the Haskell %{pkgname} library.\ \ %package -n %{basepkg}-devel\ Summary: Haskell %{pkgname} library development files\ -%if 0%{?rhel} && 0%{?rhel} < 7\ +%if 0%{?rhel} && 0%{?rhel} < 6\ Group: Development/Languages/Other\ %endif\ %{?1:Version: %{pkgver}}\ @@ -52,13 +52,13 @@ This package provides the Haskell %{pkgname} library development files.\ %ghc_pkg_recache\ \ %files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ -%if 0%{?rhel} && 0%{?rhel} < 7\ +%if 0%{?rhel} && 0%{?rhel} < 6\ %defattr(-,root,root,-)\ %endif\ %{?base_doc_files:%doc %base_doc_files}\ \ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ -%if 0%{?rhel} && 0%{?rhel} < 7\ +%if 0%{?rhel} && 0%{?rhel} < 6\ %defattr(-,root,root,-)\ %endif\ %{?devel_doc_files:%doc %devel_doc_files}\ From 445740902ce889e512411d3506c6d5327a62d267 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 7 Apr 2017 19:13:28 +0900 Subject: [PATCH 343/514] update changelog --- ghc-rpm-macros.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fecfe71..03ea774 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -164,6 +164,8 @@ EOF - fix haddock generation - cabal_configure now outputs Cabal version - fix ghc-deps.sh for ghc-pkg < 8 which does not accept pkg id +- fix ghc_fix_rpath for ghc-7.10 +- Group and defattr are only needed for rhel5 * Thu Mar 16 2017 Jens Petersen - 1.6.18-3 - condition obsoletes on fedora version From d6e0ba914f2b625658bcd38f42681684b8e28bc8 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 10 May 2017 11:15:55 +0900 Subject: [PATCH 344/514] test-rebuild.sh: fix the branch handling no longer hardcode master branch version --- tests/test-rebuild.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index e6dc976..973b9b3 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -23,11 +23,14 @@ ARCH=$(arch) if [ -f /etc/os-release ]; then eval $(grep VERSION_ID /etc/os-release) - case $VERSION_ID in - 26) BRANCH=master ;; - 7.*) BRANCH=epel7 ;; - *) BRANCH="f$VERSION_ID" ;; - esac + if git branch -a | grep -q f$VERSION_ID; then + BRANCH=f$VERSION_ID + else + case $VERSION_ID in + 7.*) BRANCH=epel7 ;; + *) BRANCH=master ;; + esac + fi else # assume RHEL6 BRANCH=el6 From 195b0fadb8baa04d390cc25a00239629fc44bdb7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 11 May 2017 12:19:39 +0900 Subject: [PATCH 345/514] obsolete git-annex --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 03ea774..d695a8d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.19 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -94,6 +94,7 @@ Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 # dropped from HP 8.0.2 Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5 Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 +Obsoletes: git-annex <= 5.20140717 %endif %description -n ghc-obsoletes @@ -160,6 +161,9 @@ EOF %changelog +* Thu May 11 2017 Jens Petersen - 1.6.19-2 +- obsolete git-annex + * Fri Mar 24 2017 Jens Petersen - 1.6.19-1 - fix haddock generation - cabal_configure now outputs Cabal version From 2cfb9bdb77f18694391f69a534373c300209ae60 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 09:54:56 +0000 Subject: [PATCH 346/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d695a8d..2170c0e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.19 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,9 @@ EOF %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.6.19-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu May 11 2017 Jens Petersen - 1.6.19-2 - obsolete git-annex From 5969f326952f6aa910b0c7fff5c2b4f12ee1b7ea Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 30 Jul 2017 21:05:03 +0100 Subject: [PATCH 347/514] add %_ghclicensedir and %ghc_smp_mflags macros backport from github --- ghc-rpm-macros.spec | 9 +++++++-- macros.ghc | 10 ++++++---- macros.ghc-fedora | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2170c0e..f098e1c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.19 -Release: 3%{?dist} +Version: 1.6.20 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,11 @@ EOF %changelog +* Sun Jul 30 2017 Jens Petersen - 1.6.20-1 +- add _ghclicensedir macro +- add ghc_smp_mflags macro, since -j4 breaks reproducible-builds.org completely + (report by Bernhard Wiedemann) + * Wed Jul 26 2017 Fedora Release Engineering - 1.6.19-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index 5076832..257bcad 100644 --- a/macros.ghc +++ b/macros.ghc @@ -64,6 +64,8 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} +%_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} + # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -89,7 +91,7 @@ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ fi\ %if 0%{?1:1}\ -for i in $(ls %{buildroot}%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ +for i in $(ls %{buildroot}%{_ghclicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ done\ %endif\ @@ -114,13 +116,13 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_bin_build\ %global debug_package %{nil}\ %cabal_configure\ -%cabal build %{?cabal_build_options} +%cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ -%cabal build %{?cabal_build_options}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} # ghc_lib_build [name] [version] diff --git a/macros.ghc-fedora b/macros.ghc-fedora index 1bfd7b8..fbb087b 100644 --- a/macros.ghc-fedora +++ b/macros.ghc-fedora @@ -1,5 +1,5 @@ # Fedora specific settings -%_ghcdocdir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir}/%{name} +%_ghcdocdir %{_ghclicensedir}/%{name} %cabal_install_options -v From 0bab6b0296b0ec109b3b25f8eae89b5d526ae02b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 30 Jul 2017 21:07:05 +0100 Subject: [PATCH 348/514] make package noarch for f27+ --- ghc-rpm-macros.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f098e1c..36aa5b4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -36,8 +36,9 @@ Requires: ghc-compiler Requires: hscolour %endif %endif -# this package could now be noarch again -#BuildArch: noarch +%if 0%{?fedora} >= 27 +BuildArch: noarch +%endif %description A set of macros for building GHC packages following the Haskell Guidelines @@ -161,6 +162,9 @@ EOF %changelog +* Sun Jul 30 2017 Jens Petersen - 1.6.20-2 +- make package noarch again + * Sun Jul 30 2017 Jens Petersen - 1.6.20-1 - add _ghclicensedir macro - add ghc_smp_mflags macro, since -j4 breaks reproducible-builds.org completely From 4c35941d50f3d2264b186b00ec2b514b1a10400c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 30 Jul 2017 21:10:26 +0100 Subject: [PATCH 349/514] changelog: noarch for f27 --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 36aa5b4..9dd5365 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -163,7 +163,7 @@ EOF %changelog * Sun Jul 30 2017 Jens Petersen - 1.6.20-2 -- make package noarch again +- make package noarch again for f27 * Sun Jul 30 2017 Jens Petersen - 1.6.20-1 - add _ghclicensedir macro From 5d5eac137ce062dd2d8dbfe77ddb25cae8422efa Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 2 Aug 2017 11:00:01 +0100 Subject: [PATCH 350/514] %ghc_gen_filelists: check package.conf exists --- ghc-rpm-macros.spec | 3 +++ macros.ghc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9dd5365..314c8d0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -162,6 +162,9 @@ EOF %changelog +* Wed Aug 2 2017 Jens Petersen +- ghc_gen_filelists: check package.conf exists + * Sun Jul 30 2017 Jens Petersen - 1.6.20-2 - make package noarch again for f27 diff --git a/macros.ghc b/macros.ghc index 257bcad..a64b865 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,6 +73,10 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ +if [ ! -f "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" ]; then\ +echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ +exit 1\ +fi\ pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ key=$(grep "key: " %{buildroot}${pkgconf} | sed -e "s/key: //")\ pkgdir="%{ghclibdir}/${key}"\ From 430e3284006484ac97deb440665b7e3e3dc3bd09 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 13 Sep 2017 18:36:31 +0900 Subject: [PATCH 351/514] make some macro call args explicit for rpm-4.14 scope change --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 314c8d0..30702e7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.20 -Release: 2%{?dist} +Version: 1.7.0 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -162,6 +162,9 @@ EOF %changelog +* Wed Sep 13 2017 Jens Petersen - 1.7.0-1 +- make some macro call args explicit for rpm-4.14 scope change + * Wed Aug 2 2017 Jens Petersen - ghc_gen_filelists: check package.conf exists diff --git a/macros.ghc b/macros.ghc index a64b865..b8ad29d 100644 --- a/macros.ghc +++ b/macros.ghc @@ -131,7 +131,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build [name] [version] %ghc_lib_build()\ -%ghc_lib_build_without_haddock\ +%ghc_lib_build_without_haddock %{?1} %{?2}\ %if %{undefined without_haddock}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ @@ -162,8 +162,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %{!?_fileattrsdir:%global __find_provides %{_rpmconfigdir}/rpmdeps --provides}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ -%cabal_pkg_conf\ -%ghc_gen_filelists\ +%cabal_pkg_conf %{?1} %{?2}\ +%ghc_gen_filelists %{?1} %{?2}\ %{!?1:%ghc_strip_dynlinked}\ %{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ %{nil} From b78d93fec34de6ff1cd3c98310f98f0afd80fa63 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 13 Sep 2017 19:17:01 +0900 Subject: [PATCH 352/514] fix the package.conf existence check --- ghc-rpm-macros.spec | 6 ++++-- macros.ghc | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 30702e7..dd959d3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.7.0 +Version: 1.6.50 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,8 +162,10 @@ EOF %changelog -* Wed Sep 13 2017 Jens Petersen - 1.7.0-1 +* Wed Sep 13 2017 Jens Petersen - 1.6.50-1 - make some macro call args explicit for rpm-4.14 scope change + (this breaks builds with earlier versions of rpm) +- fix the package.conf existence check * Wed Aug 2 2017 Jens Petersen - ghc_gen_filelists: check package.conf exists diff --git a/macros.ghc b/macros.ghc index b8ad29d..4291243 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,8 +73,8 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -if [ ! -f "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf" ]; then\ -echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ +if [ ! -f %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf ]; then\ +echo "%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ exit 1\ fi\ pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ From ff7270f82db60a6e4c1618d59af9fb83a3facda3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 10 Oct 2017 15:44:05 +0800 Subject: [PATCH 353/514] drop the git-annex obsoletes --- ghc-rpm-macros.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index dd959d3..368026b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -95,7 +95,6 @@ Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 # dropped from HP 8.0.2 Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5 Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 -Obsoletes: git-annex <= 5.20140717 %endif %description -n ghc-obsoletes @@ -162,6 +161,9 @@ EOF %changelog +* Tue Oct 10 2017 Jens Petersen - 1.6.50-2 +- drop the git-annex obsoletes + * Wed Sep 13 2017 Jens Petersen - 1.6.50-1 - make some macro call args explicit for rpm-4.14 scope change (this breaks builds with earlier versions of rpm) From ea9bb846fc5525d8f9b5b648c8b8c2469a82d54d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Nov 2017 10:56:09 +0900 Subject: [PATCH 354/514] temporarily set Wall for all archs to see which are noisy --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 368026b..112ba13 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,9 @@ EOF %changelog +* Fri Nov 10 2017 Jens Petersen - 1.6.50-3 +- temporarily set Wall for all archs to see which are noisy + * Tue Oct 10 2017 Jens Petersen - 1.6.50-2 - drop the git-annex obsoletes diff --git a/macros.ghc b/macros.ghc index 4291243..b6b4848 100644 --- a/macros.ghc +++ b/macros.ghc @@ -27,9 +27,9 @@ fi %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ # -Wunused-label is extremely noisy: remove for ghc-8.0\ -%ifnarch aarch64 ppc64 ppc64le\ +#%%ifnarch aarch64 ppc64 ppc64le s390x\ CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -%endif\ +#%%endif\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From 272d2b048a8fb10f06cea9b6d8d090a340a50b5a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Nov 2017 11:49:21 +0900 Subject: [PATCH 355/514] do not set -Wall on aarch64 and s390x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Wunused-label is extremely noisy [1 of 2] Compiling Text.Html.BlockTable ( Text/Html/BlockTable.hs, dist/build/Text/Html/BlockTable.o ) /tmp/ghcbd98_0/ghc_2.hc: In function ‘htmlzm1zi0zi1zi2zm8wVtehjIxUEBYXzzRus7033_TextziHtmlziBlockTable_getMatrix_entry’: /tmp/ghcbd98_0/ghc_2.hc:63:1: error: warning: label ‘_c2qm’ defined but not used [-Wunused-label] _c2qm: --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 112ba13..8fd6e06 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,9 @@ EOF %changelog +* Fri Nov 10 2017 Jens Petersen - 1.6.50-4 +- do not set -Wall on aarch64 and s390x since -Wunused-label is extremely noisy + * Fri Nov 10 2017 Jens Petersen - 1.6.50-3 - temporarily set Wall for all archs to see which are noisy diff --git a/macros.ghc b/macros.ghc index b6b4848..c87883e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -26,10 +26,13 @@ fi %cabal_configure\ %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ -# -Wunused-label is extremely noisy: remove for ghc-8.0\ -#%%ifnarch aarch64 ppc64 ppc64le s390x\ -CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -#%%endif\ +# -Wunused-label is extremely noisy\ +%ifarch aarch64 s390x\ +CFLAGS="${CFLAGS:-$(echo %optflags | sed -e s/-Wall//)}"\ +%else\ +CFLAGS="${CFLAGS:-%optflags}"\ +%endif\ +export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From 3643446b235e5636416447f26ef65a9a06b4b73f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Nov 2017 12:12:46 +0900 Subject: [PATCH 356/514] -Werror=format-security fails without -Wall --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8fd6e06..97dbb2d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,9 @@ EOF %changelog +* Fri Nov 10 2017 Jens Petersen - 1.6.50-5 +- -Werror=format-security fails without -Wall + * Fri Nov 10 2017 Jens Petersen - 1.6.50-4 - do not set -Wall on aarch64 and s390x since -Wunused-label is extremely noisy diff --git a/macros.ghc b/macros.ghc index c87883e..90a540d 100644 --- a/macros.ghc +++ b/macros.ghc @@ -28,7 +28,7 @@ fi %global _hardened_ldflags %{nil}\ # -Wunused-label is extremely noisy\ %ifarch aarch64 s390x\ -CFLAGS="${CFLAGS:-$(echo %optflags | sed -e s/-Wall//)}"\ +CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //')}"\ %else\ CFLAGS="${CFLAGS:-%optflags}"\ %endif\ From 97922d41b74407f0f5efbfc711a0efdcff40c41e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 14 Nov 2017 19:22:31 +0900 Subject: [PATCH 357/514] for rhel > 7 noarch and no license dir version --- ghc-rpm-macros.spec | 8 ++++++-- macros.ghc | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 97dbb2d..674c5e4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 5%{?dist} +Release: 6%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -36,7 +36,7 @@ Requires: ghc-compiler Requires: hscolour %endif %endif -%if 0%{?fedora} >= 27 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildArch: noarch %endif @@ -161,6 +161,10 @@ EOF %changelog +* Tue Nov 14 2017 Jens Petersen - 1.6.50-6 +- make package noarch RHEL > 7 +- only version license dir for RHEL <= 7 + * Fri Nov 10 2017 Jens Petersen - 1.6.50-5 - -Werror=format-security fails without -Wall diff --git a/macros.ghc b/macros.ghc index 90a540d..978c471 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,7 +128,10 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%if 0%{?rhel} && 0%{?rhel} < 8\ +%define licenseversioned 1\ +%endif\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{?licenseversioned:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} From 7faec45fddfc6f1e194975a2415562955e08d643 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 15 Nov 2017 11:25:18 +0900 Subject: [PATCH 358/514] use shell variable instead of macro to carry licensedir version --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 674c5e4..6717828 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 6%{?dist} +Release: 7%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,9 @@ EOF %changelog +* Wed Nov 15 2017 Jens Petersen - 1.6.50-7 +- use shell variable instead of macro to carry licensedir version + * Tue Nov 14 2017 Jens Petersen - 1.6.50-6 - make package noarch RHEL > 7 - only version license dir for RHEL <= 7 diff --git a/macros.ghc b/macros.ghc index 978c471..874db17 100644 --- a/macros.ghc +++ b/macros.ghc @@ -129,9 +129,9 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %ghc_lib_build_without_haddock()\ %global debug_package %{nil}\ %if 0%{?rhel} && 0%{?rhel} < 8\ -%define licenseversioned 1\ +licensedirversion=%{?2:-%2}\ %endif\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1%{?licenseversioned:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} From f3be8b6bc27e08e26d009a2e990666dbd60e240c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 15 Nov 2017 16:25:00 +0900 Subject: [PATCH 359/514] rename macros.ghc-fedora to macros.ghc-os --- ghc-rpm-macros.spec | 11 +++++++---- macros.ghc-fedora => macros.ghc-os | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) rename macros.ghc-fedora => macros.ghc-os (70%) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6717828..2babfa6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 7%{?dist} +Release: 8%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -26,7 +26,7 @@ Source5: cabal-tweak-flag Source6: macros.ghc-extra Source7: ghc.attr Source8: ghc-pkg-wrapper -Source9: macros.ghc-fedora +Source9: macros.ghc-os Source11: cabal-tweak-drop-dep Requires: redhat-rpm-config # for ghc_version @@ -115,7 +115,7 @@ echo no build stage needed %install install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra -install -p -D -m 0644 %{SOURCE9} %{buildroot}/%{macros_dir}/macros.ghc-fedora +install -p -D -m 0644 %{SOURCE9} %{buildroot}/%{macros_dir}/macros.ghc-os install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh @@ -140,7 +140,7 @@ EOF %license COPYING %doc AUTHORS %{macros_dir}/macros.ghc -%{macros_dir}/macros.ghc-fedora +%{macros_dir}/macros.ghc-os %if 0%{?fedora} || 0%{?rhel} >= 7 %{_prefix}/lib/rpm/fileattrs/ghc.attr %endif @@ -161,6 +161,9 @@ EOF %changelog +* Wed Nov 15 2017 Jens Petersen - 1.6.50-8 +- rename macros.ghc-fedora to macros.ghc-os + * Wed Nov 15 2017 Jens Petersen - 1.6.50-7 - use shell variable instead of macro to carry licensedir version diff --git a/macros.ghc-fedora b/macros.ghc-os similarity index 70% rename from macros.ghc-fedora rename to macros.ghc-os index fbb087b..9caaf2c 100644 --- a/macros.ghc-fedora +++ b/macros.ghc-os @@ -1,4 +1,4 @@ -# Fedora specific settings +# OS specific settings %_ghcdocdir %{_ghclicensedir}/%{name} From b838259f6869353c9312661ea1e91edc01e0de7b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 15 Nov 2017 18:42:21 +0900 Subject: [PATCH 360/514] obsolete ghc-webkit (#1375825) --- ghc-rpm-macros.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2babfa6..2ace874 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 8%{?dist} +Release: 9%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -96,6 +96,9 @@ Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5 Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 %endif +%if 0%{?fedora} >= 27 +Obsoletes: ghc-webkit <= 0.14.2.1, ghc-webkit-devel <= 0.14.2.1 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -161,6 +164,9 @@ EOF %changelog +* Wed Nov 15 2017 Jens Petersen - 1.6.50-9 +- obsolete ghc-webkit (#1375825) + * Wed Nov 15 2017 Jens Petersen - 1.6.50-8 - rename macros.ghc-fedora to macros.ghc-os From 32c4fa64af5ca4f8b180203f8fe6ad4d71e09c23 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 4 Dec 2017 21:24:21 +0900 Subject: [PATCH 361/514] add %ghc_set_cflags macro --- macros.ghc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/macros.ghc b/macros.ghc index 874db17..b86a469 100644 --- a/macros.ghc +++ b/macros.ghc @@ -22,10 +22,7 @@ proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ %endif\ fi -# configure -%cabal_configure\ -%ghc_check_bootstrap\ -%global _hardened_ldflags %{nil}\ +%ghc_set_cflags\ # -Wunused-label is extremely noisy\ %ifarch aarch64 s390x\ CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //')}"\ @@ -33,6 +30,13 @@ CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //' CFLAGS="${CFLAGS:-%optflags}"\ %endif\ export CFLAGS\ +%{nil} + +# configure +%cabal_configure\ +%ghc_check_bootstrap\ +%ghc_set_cflags\ +%global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From 0d7493589a120b6c205789324349eedbf7f27583 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 4 Dec 2017 21:29:12 +0900 Subject: [PATCH 362/514] update the spec file for last change --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2ace874..694d9ff 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.50 -Release: 9%{?dist} +Version: 1.6.51 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -164,6 +164,9 @@ EOF %changelog +* Mon Dec 4 2017 Jens Petersen - 1.6.51-1 +- add ghc_set_cflags macro + * Wed Nov 15 2017 Jens Petersen - 1.6.50-9 - obsolete ghc-webkit (#1375825) From f2e3e0f014d420a26185932704cff3cbc3c3a171 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 14 Dec 2017 21:27:43 +0900 Subject: [PATCH 363/514] drop arch condition on hscolour requires since package is now noarch --- ghc-rpm-macros.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 694d9ff..503fe56 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -32,10 +32,8 @@ Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler %if %{undefined without_hscolour} -%ifarch %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x ppc64le aarch64 Requires: hscolour %endif -%endif %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildArch: noarch %endif From bc93aaa088bf5a7dd6c49ee45108c619a668f9ff Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 22 Jan 2018 09:03:51 +0100 Subject: [PATCH 364/514] changes for ghc-8.2: _ghcdynlibdir, drop ghc_without_shared, chrpath - add _ghcdynlibdir for Cabal --dynlibdir - dynlibs in _libdir except ghc's libs - drop ghc_without_shared - ghc_fix_rpath removes RPATHs for 8.2+ --- ghc-rpm-macros.spec | 8 +++++++- macros.ghc | 17 +++++++++++------ macros.ghc-os | 2 ++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 503fe56..9e5a9c9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.6.51 +Version: 1.8.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,12 @@ EOF %changelog +* Mon Jan 22 2018 Jens Petersen - 1.8.0-1 +- add _ghcdynlibdir for Cabal --dynlibdir +- dynlibs in _libdir except ghc's libs +- drop ghc_without_shared +- ghc_fix_rpath removes RPATHs for 8.2+ + * Mon Dec 4 2017 Jens Petersen - 1.6.51-1 - add ghc_set_cflags macro diff --git a/macros.ghc b/macros.ghc index b86a469..986cba6 100644 --- a/macros.ghc +++ b/macros.ghc @@ -39,7 +39,7 @@ export CFLAGS\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc --dynlibdir=%{_ghcdynlibdir} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} @@ -91,12 +91,15 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo ${pkgconf} >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ +%if %{defined ghc_version_override}\ echo "%%dir ${pkgdir}" >> %{basepkg}.files\ -%if %{undefined ghc_without_shared}\ echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ -%endif\ find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ +%else\ +echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ +echo "${pkgdir}" >> %{basepkg}-devel.files\ +%endif\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ @@ -135,7 +138,7 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} --enable-shared %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} @@ -192,11 +195,13 @@ for lib in %*; do\ 7.10.*)\ pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ - *)\ + 8.0)\ pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ + *)\ + syspath="" ;;\ esac\ - newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g")\ + newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/")\ chrpath -r $newrpath $i\ ;;\ esac\ diff --git a/macros.ghc-os b/macros.ghc-os index 9caaf2c..e6ac90c 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -2,4 +2,6 @@ %_ghcdocdir %{_ghclicensedir}/%{name} +%_ghcdynlibdir %{_libdir} + %cabal_install_options -v From 5f6ff9c55c82514cf13520244066e2d000e8642c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Jan 2018 12:49:58 +0100 Subject: [PATCH 365/514] do not handle ghc libs location specially; ghc-pkg-wrapper rpath --- ghc-pkg-wrapper | 2 +- ghc-rpm-macros.spec | 2 +- macros.ghc | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index 716cccf..0b2a417 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -22,7 +22,7 @@ if [ -x "$INPLACE_GHCPKG" ]; then ;; # 7.8 and 7.10 *) - GHC_PKG="$PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" + GHC_PKG="env LD_LIBRARY_PATH=$(dirname $PKGBASEDIR) $PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" ;; esac else diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9e5a9c9..7fb43f9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -164,7 +164,7 @@ EOF %changelog * Mon Jan 22 2018 Jens Petersen - 1.8.0-1 - add _ghcdynlibdir for Cabal --dynlibdir -- dynlibs in _libdir except ghc's libs +- dynlibs in _libdir - drop ghc_without_shared - ghc_fix_rpath removes RPATHs for 8.2+ diff --git a/macros.ghc b/macros.ghc index 986cba6..e00139a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -91,15 +91,8 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo ${pkgconf} >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ -%if %{defined ghc_version_override}\ -echo "%%dir ${pkgdir}" >> %{basepkg}.files\ -echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ -find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ -find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ -%else\ echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ echo "${pkgdir}" >> %{basepkg}-devel.files\ -%endif\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ From 1306c9a80d1ff2216adf64c3eacce6315c22ef88 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Jan 2018 13:27:36 +0100 Subject: [PATCH 366/514] add ldconfig install scripts to ghc_lib_subpackage --- ghc-rpm-macros.spec | 1 + macros.ghc-extra | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7fb43f9..a6bb427 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -167,6 +167,7 @@ EOF - dynlibs in _libdir - drop ghc_without_shared - ghc_fix_rpath removes RPATHs for 8.2+ +- add ldconfig install scripts to ghc_lib_subpackage * Mon Dec 4 2017 Jens Petersen - 1.6.51-1 - add ghc_set_cflags macro diff --git a/macros.ghc-extra b/macros.ghc-extra index 9d98fda..1ca77e6 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -45,6 +45,10 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ +%post -n %{basepkg} -p /sbin/ldconfig\ +\ +%postun -n %{basepkg} -p /sbin/ldconfig\ +\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ \ From bd0af716de38627f9ad2ce17ef59fb17f1ba177f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Jan 2018 15:24:11 +0100 Subject: [PATCH 367/514] %ghc_fix_rpath: remove leading or trailing ':' --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a6bb427..239ec3c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.0 +Version: 1.8.1 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,9 @@ EOF %changelog +* Tue Jan 23 2018 Jens Petersen - 1.8.1-1 +- ghc_fix_rpath: remove leading or trailing ':' + * Mon Jan 22 2018 Jens Petersen - 1.8.0-1 - add _ghcdynlibdir for Cabal --dynlibdir - dynlibs in _libdir diff --git a/macros.ghc b/macros.ghc index e00139a..625277e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -194,7 +194,7 @@ for lib in %*; do\ *)\ syspath="" ;;\ esac\ - newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/")\ + newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\ chrpath -r $newrpath $i\ ;;\ esac\ From ba39d46794128ad5b83d94f354fae4d95086b233 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Jan 2018 07:02:40 +0100 Subject: [PATCH 368/514] remove "-z defs" from LDFLAGS since it breaks linking dist/build/Language/Haskell/HsColour.dyn_o:hscolourzm1zi24zi2zmBwYhdEbf2m3fdRy45AMG_LanguageziHaskellziHsColour_zdfShowLit6_info: error: undefined reference to 'newCAF' : dist/build/Language/Haskell/HsColour.dyn_o:sQ3F_info: error: undefined reference to 'stg_upd_frame_info' --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 239ec3c..e8e8e0d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.1 +Version: 1.8.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,9 @@ EOF %changelog +* Thu Jan 25 2018 Jens Petersen - 1.8.2-1 +- remove "-z defs" from LDFLAGS since it breaks linking with ghc + * Tue Jan 23 2018 Jens Petersen - 1.8.1-1 - ghc_fix_rpath: remove leading or trailing ':' diff --git a/macros.ghc b/macros.ghc index 625277e..9eee7f0 100644 --- a/macros.ghc +++ b/macros.ghc @@ -37,7 +37,7 @@ export CFLAGS\ %ghc_check_bootstrap\ %ghc_set_cflags\ %global _hardened_ldflags %{nil}\ -LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ +LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs //')}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc --dynlibdir=%{_ghcdynlibdir} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From b058836dae478a2b728cf29e64e2bc2c30b2f172 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Jan 2018 07:23:26 +0100 Subject: [PATCH 369/514] no whitespace after '-z defs' --- ghc-rpm-macros.spec | 6 +++--- macros.ghc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e8e8e0d..c1f71c2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.2 +Version: 1.8.3 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,8 +162,8 @@ EOF %changelog -* Thu Jan 25 2018 Jens Petersen - 1.8.2-1 -- remove "-z defs" from LDFLAGS since it breaks linking with ghc +* Thu Jan 25 2018 Jens Petersen - 1.8.3-1 +- remove "-z defs" from LDFLAGS since it breaks linking with ghc (see #1535422) * Tue Jan 23 2018 Jens Petersen - 1.8.1-1 - ghc_fix_rpath: remove leading or trailing ':' diff --git a/macros.ghc b/macros.ghc index 9eee7f0..7872201 100644 --- a/macros.ghc +++ b/macros.ghc @@ -37,7 +37,7 @@ export CFLAGS\ %ghc_check_bootstrap\ %ghc_set_cflags\ %global _hardened_ldflags %{nil}\ -LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs //')}"; export LDFLAGS\ +LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs//')}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc --dynlibdir=%{_ghcdynlibdir} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From 2e2b67241771949d9885ca78ba43ef76ef7f29d2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 28 Jan 2018 07:57:43 +0100 Subject: [PATCH 370/514] make the recent dynlib changes conditional on _ghcdynlibdir and disable (without_shared remains gone) --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 9 ++++++++- macros.ghc-extra | 2 ++ macros.ghc-os | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c1f71c2..952ef97 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.3 +Version: 1.8.4 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,10 @@ EOF %changelog +* Sun Jan 28 2018 Jens Petersen - 1.8.4-1 +- make the recent dynlib packaging changes conditional on _ghcdynlibdir +- temporarily disable _ghcdynlibdir for Rawhide + * Thu Jan 25 2018 Jens Petersen - 1.8.3-1 - remove "-z defs" from LDFLAGS since it breaks linking with ghc (see #1535422) diff --git a/macros.ghc b/macros.ghc index 7872201..4cecaf8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -39,7 +39,7 @@ export CFLAGS\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs//')}"; export LDFLAGS\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc --dynlibdir=%{_ghcdynlibdir} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} @@ -91,8 +91,15 @@ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo ${pkgconf} >> %{basepkg}-devel.files\ if [ -d "%{buildroot}${pkgdir}" ]; then\ +%if %{defined _ghcdynlibdir}\ echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ echo "${pkgdir}" >> %{basepkg}-devel.files\ +%else\ +echo "%%dir ${pkgdir}" >> %{basepkg}.files\ +echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ +find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ +find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ +%endif\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 1ca77e6..64c5c63 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -45,10 +45,12 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ +%if %{defined _ghcdynlibdir}\ %post -n %{basepkg} -p /sbin/ldconfig\ \ %postun -n %{basepkg} -p /sbin/ldconfig\ \ +%endif\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ \ diff --git a/macros.ghc-os b/macros.ghc-os index e6ac90c..4b77e16 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -2,6 +2,7 @@ %_ghcdocdir %{_ghclicensedir}/%{name} -%_ghcdynlibdir %{_libdir} +# disable for ghc-8.0 for now +#%%_ghcdynlibdir %{_libdir} %cabal_install_options -v From 811c5a99f00a24bb52652412c22f89898d101d43 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 28 Jan 2018 08:32:39 +0100 Subject: [PATCH 371/514] reenable %_ghcdynlibdir for ghc-8.2 building --- ghc-rpm-macros.spec | 5 ++++- macros.ghc-os | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 952ef97..73ef3f6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.4 +Version: 1.8.5 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,9 @@ EOF %changelog +* Sun Jan 28 2018 Jens Petersen - 1.8.5-1 +- re-enable _ghcdynlibdir (for ghc-8.2) + * Sun Jan 28 2018 Jens Petersen - 1.8.4-1 - make the recent dynlib packaging changes conditional on _ghcdynlibdir - temporarily disable _ghcdynlibdir for Rawhide diff --git a/macros.ghc-os b/macros.ghc-os index 4b77e16..e6ac90c 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -2,7 +2,6 @@ %_ghcdocdir %{_ghclicensedir}/%{name} -# disable for ghc-8.0 for now -#%%_ghcdynlibdir %{_libdir} +%_ghcdynlibdir %{_libdir} %cabal_install_options -v From ca7fad488205e06e1d0520eee8ee55cfcb1724b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 29 Jan 2018 22:21:31 +0100 Subject: [PATCH 372/514] cabal-tweak-drop-dep: quote grep pattern to allow whitespace --- cabal-tweak-drop-dep | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cabal-tweak-drop-dep b/cabal-tweak-drop-dep index 3bc5d58..04d95bc 100755 --- a/cabal-tweak-drop-dep +++ b/cabal-tweak-drop-dep @@ -22,7 +22,7 @@ if [ ! -f $CABALFILE.orig ]; then BACKUP=.orig fi -if grep $DEP $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then +if grep "$DEP" $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then echo "$0: deleting whole $DEP lines not safe - try more precise pattern" exit 1 fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 73ef3f6..17fa5db 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.5 +Version: 1.8.6 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,9 @@ EOF %changelog +* Mon Jan 29 2018 Jens Petersen - 1.8.6-1 +- cabal-tweak-drop-dep: quote grep pattern to allow whitespace + * Sun Jan 28 2018 Jens Petersen - 1.8.5-1 - re-enable _ghcdynlibdir (for ghc-8.2) From 47ac404ddc625fd11aa84e23f5e1e61da28f9be3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 4 Feb 2018 00:06:56 +0900 Subject: [PATCH 373/514] no longer need to prune -z defs from LDFLAGS --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 17fa5db..a1e3cf2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.6 +Version: 1.8.7 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,9 @@ EOF %changelog +* Sat Feb 3 2018 Jens Petersen - 1.8.7-1 +- no longer need to prune -z defs from LDFLAGS + * Mon Jan 29 2018 Jens Petersen - 1.8.6-1 - cabal-tweak-drop-dep: quote grep pattern to allow whitespace diff --git a/macros.ghc b/macros.ghc index 4cecaf8..9cc6d1a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -37,7 +37,7 @@ export CFLAGS\ %ghc_check_bootstrap\ %ghc_set_cflags\ %global _hardened_ldflags %{nil}\ -LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs//')}"; export LDFLAGS\ +LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From 0a4591897c20de9cdc10adeeb5662636e7443057 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 4 Feb 2018 00:09:19 +0900 Subject: [PATCH 374/514] drop the ldconfig scripts since they are not needed for F28 --- ghc-rpm-macros.spec | 1 + macros.ghc-extra | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a1e3cf2..d1d63eb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -164,6 +164,7 @@ EOF %changelog * Sat Feb 3 2018 Jens Petersen - 1.8.7-1 - no longer need to prune -z defs from LDFLAGS +- drop the ldconfig scripts since they are not needed for F28 * Mon Jan 29 2018 Jens Petersen - 1.8.6-1 - cabal-tweak-drop-dep: quote grep pattern to allow whitespace diff --git a/macros.ghc-extra b/macros.ghc-extra index 64c5c63..9d98fda 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -45,12 +45,6 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ -%if %{defined _ghcdynlibdir}\ -%post -n %{basepkg} -p /sbin/ldconfig\ -\ -%postun -n %{basepkg} -p /sbin/ldconfig\ -\ -%endif\ %post -n %{basepkg}-devel\ %ghc_pkg_recache\ \ From ae3cfff251aca1264d4c2c8341a9c2fe55b83fe6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 12:04:50 +0000 Subject: [PATCH 375/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d1d63eb..3136f70 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.8.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -162,6 +162,9 @@ EOF %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1.8.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Feb 3 2018 Jens Petersen - 1.8.7-1 - no longer need to prune -z defs from LDFLAGS - drop the ldconfig scripts since they are not needed for F28 From 1ffadfb29d797f61ec3b5798c5f36c315c219586 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 28 Feb 2018 17:35:02 +0900 Subject: [PATCH 376/514] drop ghc_bootstrapping from comment in macros.ghc --- macros.ghc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/macros.ghc b/macros.ghc index 9cc6d1a..d9f3015 100644 --- a/macros.ghc +++ b/macros.ghc @@ -243,8 +243,7 @@ done\ %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : -# - without_hscolour, without_testsuite, and ghc_bootstrapping -# need to be set locally in the spec file +# without_hscolour and without_testsuite need to be set locally in the spec file # skip prof libs and documentation %ghc_bootstrap\ From cae5ea467cbdcaba89575a80f94734feb2b2312c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 6 Mar 2018 18:10:20 +0900 Subject: [PATCH 377/514] obsolete ghc-ltk --- ghc-rpm-macros.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3136f70..2bc5656 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.8.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -97,6 +97,9 @@ Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 %if 0%{?fedora} >= 27 Obsoletes: ghc-webkit <= 0.14.2.1, ghc-webkit-devel <= 0.14.2.1 %endif +%if 0%{?fedora} >= 28 +Obsoletes: ghc-ltk < 0.16, ghc-ltk-devel < 0.16 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -162,6 +165,9 @@ EOF %changelog +* Tue Mar 6 2018 Jens Petersen - 1.8.7-3 +- obsolete ghc-ltk + * Wed Feb 07 2018 Fedora Release Engineering - 1.8.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 4887078b3406da2a9ba7aab56dc20a2ca7daf03f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 5 Apr 2018 18:33:56 +0900 Subject: [PATCH 378/514] use pkgid for libexecsubdir and libsubdir (#1563863) libexecsubdir is only available in Cabal 2 --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2bc5656..fbffa6f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.8.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -165,6 +165,10 @@ EOF %changelog +* Thu Apr 5 2018 Jens Petersen - 1.8.7-4 +- configure libexecsubdir (Cabal-2 only) (#1563863) +- change drop hash from libsubdir + * Tue Mar 6 2018 Jens Petersen - 1.8.7-3 - obsolete ghc-ltk diff --git a/macros.ghc b/macros.ghc index d9f3015..13ff6ff 100644 --- a/macros.ghc +++ b/macros.ghc @@ -39,7 +39,7 @@ export CFLAGS\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} From 3c4760fac8dcf8b8da3f80876ab7ae362ac7ecaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sat, 7 Apr 2018 12:49:24 +0200 Subject: [PATCH 379/514] Define pkgdir as %{ghclibdir}/%{pkgnamever} instead of %{ghclibdir}/${key} --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fbffa6f..99dbec0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.8.7 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -165,6 +165,9 @@ EOF %changelog +* Sat Apr 7 2018 Robert-Andr« Mauchin - 1.8.7-5 +- Define pkgdir as %%{ghclibdir}/%%{pkgnamever} instead of %%{ghclibdir}/${key} + * Thu Apr 5 2018 Jens Petersen - 1.8.7-4 - configure libexecsubdir (Cabal-2 only) (#1563863) - change drop hash from libsubdir diff --git a/macros.ghc b/macros.ghc index 13ff6ff..496c927 100644 --- a/macros.ghc +++ b/macros.ghc @@ -85,8 +85,7 @@ echo "%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ exit 1\ fi\ pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ -key=$(grep "key: " %{buildroot}${pkgconf} | sed -e "s/key: //")\ -pkgdir="%{ghclibdir}/${key}"\ +pkgdir="%{ghclibdir}/%{pkgnamever}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ echo ${pkgconf} >> %{basepkg}-devel.files\ From 6e6bc8e4a664cdfd20696d58dc59c6a79fca8e51 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 7 Apr 2018 22:20:14 +0900 Subject: [PATCH 380/514] fix corruption of eclipseo's name --- ghc-rpm-macros.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 99dbec0..1565051 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -165,8 +165,8 @@ EOF %changelog -* Sat Apr 7 2018 Robert-Andr« Mauchin - 1.8.7-5 -- Define pkgdir as %%{ghclibdir}/%%{pkgnamever} instead of %%{ghclibdir}/${key} +* Sat Apr 7 2018 Robert-André Mauchin - 1.8.7-5 +- drop hash from pkgdir in ghc_gen_filelists too * Thu Apr 5 2018 Jens Petersen - 1.8.7-4 - configure libexecsubdir (Cabal-2 only) (#1563863) From 87df4b821c07c68405ce3f2c0c4c96c8720e81be Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 7 Apr 2018 22:32:00 +0900 Subject: [PATCH 381/514] fix text of previous changelog --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1565051..6d5e31f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -170,7 +170,7 @@ EOF * Thu Apr 5 2018 Jens Petersen - 1.8.7-4 - configure libexecsubdir (Cabal-2 only) (#1563863) -- change drop hash from libsubdir +- drop hash from libsubdir * Tue Mar 6 2018 Jens Petersen - 1.8.7-3 - obsolete ghc-ltk From 02ff4a6bb7025456dbb81dba2811a0f8cba32795 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 30 Apr 2018 19:33:14 +0900 Subject: [PATCH 382/514] obsolete ghc-fail --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6d5e31f..6ff3f00 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.8.7 -Release: 5%{?dist} +Release: 6%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -98,6 +98,7 @@ Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 Obsoletes: ghc-webkit <= 0.14.2.1, ghc-webkit-devel <= 0.14.2.1 %endif %if 0%{?fedora} >= 28 +Obsoletes: ghc-fail < 4.9.0.0-2, ghc-fail-devel < 4.9.0.0-2 Obsoletes: ghc-ltk < 0.16, ghc-ltk-devel < 0.16 %endif @@ -165,6 +166,9 @@ EOF %changelog +* Mon Apr 30 2018 Jens Petersen - 1.8.7-6 +- obsolete ghc-fail + * Sat Apr 7 2018 Robert-André Mauchin - 1.8.7-5 - drop hash from pkgdir in ghc_gen_filelists too From 31244741925e73aba806545c728ba84c276bb1e3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 23 May 2018 10:34:08 +0900 Subject: [PATCH 383/514] drop %ghc_check_bootstrap and add %ghc_quick_build - according to upstream it is redundant now to build ghc against itself - %ghc_quick_build replaces %ghc_bootstrap --- ghc-rpm-macros.spec | 8 ++++++-- macros.ghc | 23 ++++++----------------- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6ff3f00..73e7712 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.7 -Release: 6%{?dist} +Version: 1.8.8 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -166,6 +166,10 @@ EOF %changelog +* Wed May 23 2018 Jens Petersen - 1.8.8-1 +- rename ghc_bootstrap to ghc_quick_build (disables prof and haddock) +- ghc_check_bootstrap should be redundant now according to upstream + * Mon Apr 30 2018 Jens Petersen - 1.8.7-6 - obsolete ghc-fail diff --git a/macros.ghc b/macros.ghc index 496c927..1d9fad5 100644 --- a/macros.ghc +++ b/macros.ghc @@ -9,19 +9,6 @@ LANG=en_US.utf8\ # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -# check ghc version was rebuilt against self -%ghc_check_bootstrap\ -if [ ! "$(ghc --info | grep \\"Booter\\ version\\",\\"%{ghc_version}\\")" ]; then\ - echo "Warning: this ghc build is not self-bootstrapped."\ -%if %{undefined ghc_bootstrapping}\ - echo "The ghc package should be rebuilt against its current version before\ -proceeding, to avoid dependency ABI breakage from a future ghc rebuild."\ - echo "To override set ghc_bootstrapping."\ - echo "Aborting."\ - exit 1\ -%endif\ -fi - %ghc_set_cflags\ # -Wunused-label is extremely noisy\ %ifarch aarch64 s390x\ @@ -34,7 +21,6 @@ export CFLAGS\ # configure %cabal_configure\ -%ghc_check_bootstrap\ %ghc_set_cflags\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ @@ -242,10 +228,13 @@ done\ %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : -# without_hscolour and without_testsuite need to be set locally in the spec file - -# skip prof libs and documentation +# deprecated %ghc_bootstrap\ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 + +# skip prof libs and documentation +%ghc_quick_build\ +%global without_prof 1\ +%global without_haddock 1 From 37fe2b4ab7f60a8a1b0be51373d4daec42099e72 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 25 May 2018 18:03:11 +0900 Subject: [PATCH 384/514] support packaging Cabal bundled internal libraries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for some reason installing with Cabal (rather than cabal-install) gives different hashes for the sublibrary simplification of initial work in opensuse by Ondřej Súkup https://github.com/fedora-haskell/ghc-rpm-macros/pull/7 testcase was haddock-library-1.4.5 --- ghc-deps.sh | 31 +++++++++++++++---------------- ghc-pkg-wrapper | 2 +- ghc-rpm-macros.spec | 7 ++++--- macros.ghc | 23 ++++++++++++++--------- 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index d651d46..cc9b346 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,7 +1,7 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -ne 2 ] && echo "Usage: `basename $0` [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 +[ $# -ne 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 set +x @@ -14,7 +14,9 @@ ghc_pkg="/usr/lib/rpm/ghc-pkg-wrapper $pkgbasedir" case $mode in --provides) field=id ;; --requires) field=depends ;; - *) echo "`basename $0`: Need --provides or --requires" ; exit 1 + *) echo "$(basename $0): Need --provides or --requires" + exit 1 + ;; esac ghc_ver=$(basename $pkgbasedir | sed -e s/ghc-//) @@ -24,20 +26,17 @@ files=$(cat) for i in $files; do case $i in # exclude builtin_rts.conf - $pkgconfdir/*-*.conf) - case $ghc_ver in - 8.*) id=$(grep "id: " $i | sed -e "s/id: //") ;; - *) id=$(echo $i | sed -e "s%$pkgconfdir/%%" -e "s%.conf%%") ;; - esac - ids=$($ghc_pkg field $id $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") - - for d in $ids; do - case $d in - *-*) echo "ghc-devel($d)" ;; - *) ;; - esac - done - ;; + $pkgconfdir/*-*.conf) + name=$(grep "^name: " $i | sed -e "s/name: //") + ids=$($ghc_pkg field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + + for d in $ids; do + case $d in + *-*) echo "ghc-devel($d)" ;; + *) ;; + esac + done + ;; *) ;; esac diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index 0b2a417..ca6a32d 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -29,4 +29,4 @@ else GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR" fi -$GHC_PKG -v0 --simple-output --global $* | uniq +$GHC_PKG -v0 --simple-output $* | uniq diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 73e7712..e8341a8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.8 +Version: 1.9.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -166,9 +166,10 @@ EOF %changelog -* Wed May 23 2018 Jens Petersen - 1.8.8-1 -- rename ghc_bootstrap to ghc_quick_build (disables prof and haddock) +* Thu May 24 2018 Jens Petersen - 1.9.0-1 +- support Cabal bundled internal libraries (yuck) - ghc_check_bootstrap should be redundant now according to upstream +- rename ghc_bootstrap to ghc_quick_build (disables prof and haddock) * Mon Apr 30 2018 Jens Petersen - 1.8.7-6 - obsolete ghc-fail diff --git a/macros.ghc b/macros.ghc index 1d9fad5..d85ef27 100644 --- a/macros.ghc +++ b/macros.ghc @@ -66,25 +66,23 @@ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgnamever}\ -if [ ! -f %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf ]; then\ -echo "%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found"\ +if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/)" ]; then\ +echo "%{buildroot}%{ghclibdir}/package.conf.d/*.conf not found"\ exit 1\ fi\ -pkgconf=$(echo "%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf")\ -pkgdir="%{ghclibdir}/%{pkgnamever}"\ rm -f %{basepkg}.files %{basepkg}-devel.files\ touch %{basepkg}.files %{basepkg}-devel.files\ -echo ${pkgconf} >> %{basepkg}-devel.files\ +ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ +pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ %if %{defined _ghcdynlibdir}\ -echo "%%attr(755,root,root) %{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ echo "${pkgdir}" >> %{basepkg}-devel.files\ %else\ echo "%%dir ${pkgdir}" >> %{basepkg}.files\ -echo "%%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ %endif\ +echo "%%attr(755,root,root) %{?_ghcdynlibdir}%{!?_ghcdynlibdir:${pkgdir}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ @@ -108,7 +106,14 @@ done\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %cabal register --gen-pkg-config\ +if [ -d %{pkgnamever}.conf ]; then\ +for i in $(ls "%{pkgnamever}.conf/"); do\ +sub=$(echo $i | sed -e "s/^[0-9]\\+-//")\ +install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghclibdir}/package.conf.d/${sub}.conf\ +done\ +else\ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\ +fi\ %{nil} # ghc_bin_build @@ -179,10 +184,10 @@ for lib in %*; do\ case %{ghc_version} in\ 7.10.*)\ pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ 8.0)\ pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ *)\ syspath="" ;;\ esac\ From 95e211cd842d760ea8a225f4fa011a9102204dd3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 02:05:26 +0000 Subject: [PATCH 385/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e8341a8..6aed998 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -166,6 +166,9 @@ EOF %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1.9.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu May 24 2018 Jens Petersen - 1.9.0-1 - support Cabal bundled internal libraries (yuck) - ghc_check_bootstrap should be redundant now according to upstream From 5c4bfea95eb795050cd261a4763713aa5228b4a1 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 24 Jul 2018 17:44:34 +0900 Subject: [PATCH 386/514] remove -Wall and -Werror=format-security separately (for aarch64 and s390x) --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6aed998..cde08b4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.0 -Release: 2%{?dist} +Version: 1.9.1 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -166,6 +166,9 @@ EOF %changelog +* Tue Jul 24 2018 Jens Petersen - 1.9.1-1 +- remove -Wall and -Werror=format-security separately (on aarch64 and s390x) + * Fri Jul 13 2018 Fedora Release Engineering - 1.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index d85ef27..e0af09b 100644 --- a/macros.ghc +++ b/macros.ghc @@ -12,7 +12,7 @@ LANG=en_US.utf8\ %ghc_set_cflags\ # -Wunused-label is extremely noisy\ %ifarch aarch64 s390x\ -CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //')}"\ +CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ %else\ CFLAGS="${CFLAGS:-%optflags}"\ %endif\ From 8bce457cb2c7af4784cf0f5fbf1cf317e7f1a980 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 31 Jul 2018 01:30:50 +0900 Subject: [PATCH 387/514] insert a Setup.hs file if none shipped in package current foundation and rio have no Setup.hs --- Setup.hs | 3 +++ ghc-rpm-macros.spec | 9 ++++++++- macros.ghc | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Setup.hs diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..e8ef27d --- /dev/null +++ b/Setup.hs @@ -0,0 +1,3 @@ +import Distribution.Simple + +main = defaultMain diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cde08b4..2fef7f3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.1 +Version: 1.9.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -27,6 +27,7 @@ Source6: macros.ghc-extra Source7: ghc.attr Source8: ghc-pkg-wrapper Source9: macros.ghc-os +Source10: Setup.hs Source11: cabal-tweak-drop-dep Requires: redhat-rpm-config # for ghc_version @@ -128,6 +129,8 @@ install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr %endif +install -p -D -m 0644 %{SOURCE10} %{buildroot}/%{_datadir}/%{name}/Setup.hs + install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE11} %{buildroot}/%{_bindir}/cabal-tweak-drop-dep @@ -154,6 +157,7 @@ EOF %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-drop-dep %{_bindir}/cabal-tweak-flag +%{_datadir}/%{name}/Setup.hs %files extra @@ -166,6 +170,9 @@ EOF %changelog +* Tue Jul 31 2018 Jens Petersen - 1.9.2-1 +- inject a Setup.hs if none shipped + * Tue Jul 24 2018 Jens Petersen - 1.9.1-1 - remove -Wall and -Werror=format-security separately (on aarch64 and s390x) diff --git a/macros.ghc b/macros.ghc index e0af09b..6313c1f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -24,6 +24,9 @@ export CFLAGS\ %ghc_set_cflags\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ +if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ +cp %{_datadir}/ghc-rpm-macros/Setup.hs .\ +fi\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options From 4972b52b10779a014784fac95a6322c358b03f47 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 31 Aug 2018 18:20:35 +0900 Subject: [PATCH 388/514] tests: use dnf install and ignore /usr/lib/.build-id --- tests/test-rebuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 973b9b3..18d5bb7 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -62,10 +62,10 @@ PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do # FIXME: should check NVR is same before building - rpm -q --quiet $i || sudo yum install -q $i + rpm -q --quiet $i || sudo dnf install -q $i for k in list requires provides scripts; do rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || : rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || : - diff -u $TMP/$i.$k.installed $TMP/$i.$k.test || : + diff -u $TMP/$i.$k.installed $TMP/$i.$k.test -I /usr/lib/.build-id || : done done From d190fa9b04536ab0c74f830493a867cfb29f7bad Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2018 17:53:41 +0900 Subject: [PATCH 389/514] replace %ghc_set_cflags with simplified %ghc_set_gcc_flags tested in ghc.spec in ghc:8.4 module --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 12 ++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2fef7f3..69f7896 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.2 +Version: 1.9.3 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -170,6 +170,9 @@ EOF %changelog +* Fri Oct 5 2018 Jens Petersen - 1.9.3-1 +- replace ghc_set_cflags with simplified ghc_set_gcc_flags + * Tue Jul 31 2018 Jens Petersen - 1.9.2-1 - inject a Setup.hs if none shipped diff --git a/macros.ghc b/macros.ghc index 6313c1f..e67ba38 100644 --- a/macros.ghc +++ b/macros.ghc @@ -9,14 +9,10 @@ LANG=en_US.utf8\ # compiler version %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -%ghc_set_cflags\ -# -Wunused-label is extremely noisy\ -%ifarch aarch64 s390x\ -CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ -%else\ -CFLAGS="${CFLAGS:-%optflags}"\ -%endif\ -export CFLAGS\ + +%ghc_set_gcc_flags\ +export CFLAGS="${CFLAGS:-%optflags}"\ +export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ %{nil} # configure From 7de08b499ae187cde1d9e27ecf42986161108bac Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2018 17:58:58 +0900 Subject: [PATCH 390/514] disable dynamic linking of executables for better portability --- macros.ghc | 2 +- macros.ghc-os | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index e67ba38..1a48dfc 100644 --- a/macros.ghc +++ b/macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/Packaging:Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_without_dynamic:-dynamic} Setup\ +%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_static_setup:-dynamic} Setup\ LANG=en_US.utf8\ ./Setup diff --git a/macros.ghc-os b/macros.ghc-os index e6ac90c..cdab44c 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -4,4 +4,6 @@ %_ghcdynlibdir %{_libdir} +%ghc_without_dynamic 1 + %cabal_install_options -v From e736d6cdbe357de6312e2f86b20acb574792f636 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2018 18:12:30 +0900 Subject: [PATCH 391/514] add important changelog entry for last commit --- ghc-rpm-macros.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 69f7896..9877e06 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -171,6 +171,7 @@ EOF %changelog * Fri Oct 5 2018 Jens Petersen - 1.9.3-1 +- disable dynamic linking of executables for better portability - replace ghc_set_cflags with simplified ghc_set_gcc_flags * Tue Jul 31 2018 Jens Petersen - 1.9.2-1 From 6499cbc4e2e0769d34bf17f328d7a2ae1498c6b9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2018 18:14:48 +0900 Subject: [PATCH 392/514] bump for rebuild for updated rawhide changelog --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9877e06..9f526f3 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ From 55f62273c3e4132b523c855aefaee2a65d374ea7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2018 19:02:12 +0900 Subject: [PATCH 393/514] %cabal_configure: use %ghc_set_gcc_flags --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9f526f3..29c80f6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.3 -Release: 2%{?dist} +Version: 1.9.4 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -170,6 +170,9 @@ EOF %changelog +* Fri Oct 5 2018 Jens Petersen - 1.9.4-1 +- cabal_configure now uses ghc_set_gcc_flags + * Fri Oct 5 2018 Jens Petersen - 1.9.3-1 - disable dynamic linking of executables for better portability - replace ghc_set_cflags with simplified ghc_set_gcc_flags diff --git a/macros.ghc b/macros.ghc index 1a48dfc..d3712a2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -17,7 +17,7 @@ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ # configure %cabal_configure\ -%ghc_set_cflags\ +%ghc_set_gcc_flags\ %global _hardened_ldflags %{nil}\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ From 975f21c108fd37bf4d9d937d90abc569af4e706d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 6 Oct 2018 01:13:16 +0900 Subject: [PATCH 394/514] disable hardened ldflags again only breaks x86_64 and armv7hl for static linking?: /usr/bin/ld.gold: error: /usr/lib64/ghc-8.2.2/rts/libHSrts_thr.a(MarkWeak.thr_o): requires unsupported dynamic reloc 11; recompile with -fPIC /usr/bin/ld.gold: error: /usr/lib/ghc-8.2.2/rts/libHSrts_thr.a(GCUtils.thr_o): requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 29c80f6..adf8772 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.4 +Version: 1.9.5 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -170,6 +170,9 @@ EOF %changelog +* Sat Oct 6 2018 Jens Petersen - 1.9.5-1 +- disable hardened ldflags again + * Fri Oct 5 2018 Jens Petersen - 1.9.4-1 - cabal_configure now uses ghc_set_gcc_flags diff --git a/macros.ghc b/macros.ghc index d3712a2..94e4303 100644 --- a/macros.ghc +++ b/macros.ghc @@ -10,16 +10,15 @@ LANG=en_US.utf8\ %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -%ghc_set_gcc_flags\ +%ghc_set_cflags\ export CFLAGS="${CFLAGS:-%optflags}"\ +%global _hardened_ldflags %{nil}\ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ %{nil} # configure %cabal_configure\ %ghc_set_gcc_flags\ -%global _hardened_ldflags %{nil}\ -LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ cp %{_datadir}/ghc-rpm-macros/Setup.hs .\ fi\ From 153f50041f7ec30c23f13d856860cbfe09e270fe Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 6 Oct 2018 01:47:11 +0900 Subject: [PATCH 395/514] keep %ghc_set_gcc_flags name --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index adf8772..0181b52 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -170,6 +170,9 @@ EOF %changelog +* Sat Oct 6 2018 Jens Petersen - 1.9.5-2 +- fix ghc_set_gcc_flags name + * Sat Oct 6 2018 Jens Petersen - 1.9.5-1 - disable hardened ldflags again diff --git a/macros.ghc b/macros.ghc index 94e4303..1dbeb50 100644 --- a/macros.ghc +++ b/macros.ghc @@ -10,7 +10,7 @@ LANG=en_US.utf8\ %ghc_version %{!?ghc_version_override:%(ghc --numeric-version)}%{?ghc_version_override} -%ghc_set_cflags\ +%ghc_set_gcc_flags\ export CFLAGS="${CFLAGS:-%optflags}"\ %global _hardened_ldflags %{nil}\ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ From 59959cc216d32abfcbf5c390032380776d64cd6e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Oct 2018 23:39:53 +0900 Subject: [PATCH 396/514] tests: set SUDO for non-root for containers running root --- tests/test-rebuild.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 18d5bb7..6e2802a 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -47,8 +47,14 @@ fi git pull +if [ "$UID" != "0" ]; then + SUDO="sudo" +else + SUDO="" +fi + echo Running dnf builddep: -sudo dnf builddep $PKG.spec +$SUDO dnf builddep $PKG.spec fedpkg local @@ -62,7 +68,7 @@ PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) for i in $PKGS; do # FIXME: should check NVR is same before building - rpm -q --quiet $i || sudo dnf install -q $i + rpm -q --quiet $i || $SUDO dnf install -q $i for k in list requires provides scripts; do rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || : rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || : From 298bd4e3ddf2bdab9031d4eead402eff255f095e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 23 Oct 2018 16:07:55 +0900 Subject: [PATCH 397/514] f29: obsolete content-store, bdcs, and bdcs-api --- ghc-rpm-macros.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0181b52..f7f6e38 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -102,6 +102,11 @@ Obsoletes: ghc-webkit <= 0.14.2.1, ghc-webkit-devel <= 0.14.2.1 Obsoletes: ghc-fail < 4.9.0.0-2, ghc-fail-devel < 4.9.0.0-2 Obsoletes: ghc-ltk < 0.16, ghc-ltk-devel < 0.16 %endif +%if 0%{?fedora} >= 29 +Obsoletes: ghc-content-store < 0.2.1-3, ghc-content-store-devel < 0.2.1-3 +Obsoletes: ghc-bdcs < 0.6.1-3, ghc-bdcs-devel < 0.6.1-3 +Obsoletes: ghc-bdcs-api < 0.1.3-3, ghc-bdcs-api-devel < 0.1.3-3 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -170,6 +175,9 @@ EOF %changelog +* Tue Oct 23 2018 Jens Petersen - 1.9.5-3 +- f29: obsolete content-store, bdcs, and bdcs-api + * Sat Oct 6 2018 Jens Petersen - 1.9.5-2 - fix ghc_set_gcc_flags name From 5b2544a8cce900ff62a9d1209edac849e8ab9e31 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Oct 2018 00:12:12 +0900 Subject: [PATCH 398/514] silence C Wunused-label warnings flood on s390x again --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f7f6e38..3716fa7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -175,6 +175,9 @@ EOF %changelog +* Wed Oct 24 2018 Jens Petersen - 1.9.5-4 +- silence C compiler Wunused-label warnings flood on s390x again + * Tue Oct 23 2018 Jens Petersen - 1.9.5-3 - f29: obsolete content-store, bdcs, and bdcs-api diff --git a/macros.ghc b/macros.ghc index 1dbeb50..1e0dba9 100644 --- a/macros.ghc +++ b/macros.ghc @@ -11,7 +11,13 @@ LANG=en_US.utf8\ %ghc_set_gcc_flags\ -export CFLAGS="${CFLAGS:-%optflags}"\ +# -Wunused-label is extremely noisy\ +%ifarch s390x\ +CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //')}"\ +%else\ +CFLAGS="${CFLAGS:-%optflags}"\ +%endif\ +export CFLAGS\ %global _hardened_ldflags %{nil}\ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ %{nil} From 4e2983c83c87a20c62c813691e2a759e6ad8b4dc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Oct 2018 00:48:27 +0900 Subject: [PATCH 399/514] disable -Werror=format-security too on s390x cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] cc1: some warnings being treated as errors `gcc' failed in phase `C Compiler'. (Exit code: 1) --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3716fa7..43e63e2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -175,6 +175,9 @@ EOF %changelog +* Thu Oct 25 2018 Jens Petersen - 1.9.5-5 +- need to disable -Werror=format-security too on s390x + * Wed Oct 24 2018 Jens Petersen - 1.9.5-4 - silence C compiler Wunused-label warnings flood on s390x again diff --git a/macros.ghc b/macros.ghc index 1e0dba9..b62f7f8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -13,7 +13,7 @@ LANG=en_US.utf8\ %ghc_set_gcc_flags\ # -Wunused-label is extremely noisy\ %ifarch s390x\ -CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //')}"\ +CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ %else\ CFLAGS="${CFLAGS:-%optflags}"\ %endif\ From c3ba9ccbd815baed5712464afb271dcd8a6dc233 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 21:57:05 +0000 Subject: [PATCH 400/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 43e63e2..7d9d820 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -175,6 +175,9 @@ EOF %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 1.9.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Oct 25 2018 Jens Petersen - 1.9.5-5 - need to disable -Werror=format-security too on s390x From e35da2ef7535e675786673bf2184fcae911a464a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 2 Feb 2019 01:15:02 +0800 Subject: [PATCH 401/514] disable debuginfo by undefining _enable_debug_packages --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7d9d820..7cd6347 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.5 -Release: 6%{?dist} +Version: 1.9.6 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -175,6 +175,9 @@ EOF %changelog +* Fri Feb 1 2019 Jens Petersen - 1.9.6-1 +- disable debuginfo by undefining _enable_debug_packages + * Thu Jan 31 2019 Fedora Release Engineering - 1.9.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index b62f7f8..5375a0f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -122,13 +122,13 @@ fi\ # ghc_bin_build %ghc_bin_build\ -%global debug_package %{nil}\ +%undefine _enable_debug_packages\ %cabal_configure\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ -%global debug_package %{nil}\ +%undefine _enable_debug_packages\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\ From b82b10135e793323db8282f9863cb74aed8842c2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 2 Feb 2019 01:15:55 +0800 Subject: [PATCH 402/514] use haddock --hyperlink-source unconditionally --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 5375a0f..5d77bee 100644 --- a/macros.ghc +++ b/macros.ghc @@ -143,7 +143,7 @@ licensedirversion=%{?2:-%2}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\ -%cabal haddock --html %{!?without_hscolour:%(if [ -x %{_bindir}/HsColour ]; then echo --hyperlink-source; fi)} --hoogle %{?cabal_haddock_options}\ +%cabal haddock --html --hyperlink-source --hoogle %{?cabal_haddock_options}\ fi\ %endif\ %{nil} From b60ddd4560032c636a19a4af437a554471bdf0b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 2 Feb 2019 01:17:16 +0800 Subject: [PATCH 403/514] leave stripping to generic rpm macros --- ghc-rpm-macros.spec | 1 + macros.ghc | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7cd6347..d0e1b3c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -177,6 +177,7 @@ EOF %changelog * Fri Feb 1 2019 Jens Petersen - 1.9.6-1 - disable debuginfo by undefining _enable_debug_packages +- leave stripping to generic rpm macros * Thu Jan 31 2019 Fedora Release Engineering - 1.9.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index 5d77bee..9ef602f 100644 --- a/macros.ghc +++ b/macros.ghc @@ -29,7 +29,7 @@ if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ cp %{_datadir}/ghc-rpm-macros/Setup.hs .\ fi\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" --disable-executable-stripping --disable-library-stripping %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} @@ -148,18 +148,11 @@ fi\ %endif\ %{nil} -# ghc_strip_dynlinked -%ghc_strip_dynlinked\ -%if %{undefined __debug_package}\ -find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -exec strip "{}" \\;\ -%endif - # install bin package %ghc_bin_install()\ %{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ -%{!?1:%ghc_strip_dynlinked}\ %{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ %{nil} @@ -171,7 +164,6 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ %cabal_install\ %cabal_pkg_conf %{?1} %{?2}\ %ghc_gen_filelists %{?1} %{?2}\ -%{!?1:%ghc_strip_dynlinked}\ %{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ %{nil} From c1326d82afd8ac269e5bd83feb93e3c5f78676d9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 2 Feb 2019 01:21:29 +0800 Subject: [PATCH 404/514] use C.utf8 for building instead of en_US.utf8 --- ghc-rpm-macros.spec | 1 + macros.ghc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d0e1b3c..0883607 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -178,6 +178,7 @@ EOF * Fri Feb 1 2019 Jens Petersen - 1.9.6-1 - disable debuginfo by undefining _enable_debug_packages - leave stripping to generic rpm macros +- use C.utf8 locale for building instead of en_US.utf8 * Thu Jan 31 2019 Fedora Release Engineering - 1.9.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index 9ef602f..e54b3d0 100644 --- a/macros.ghc +++ b/macros.ghc @@ -3,7 +3,7 @@ # "cabal" %cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_static_setup:-dynamic} Setup\ -LANG=en_US.utf8\ +LANG=C.utf8\ ./Setup # compiler version From fcee7ff4cbca4605fb38c8df2960b567e15f4501 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 16 Feb 2019 13:07:12 +0800 Subject: [PATCH 405/514] always build Setup with -no-user-package-db --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index e54b3d0..5719d85 100644 --- a/macros.ghc +++ b/macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/Packaging:Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make %{!?ghc_user_conf:-no-user-package-db} %{!?ghc_static_setup:-dynamic} Setup\ +%cabal [ -x Setup ] || ghc --make -no-user-package-db %{!?ghc_static_setup:-dynamic} Setup\ LANG=C.utf8\ ./Setup From 14a65baa2a96de729e6fd92b968e1b0c1d5d1fe7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 24 Feb 2019 13:51:09 +0800 Subject: [PATCH 406/514] %ghc_fix_rpath was a no-op for ghc_without_dynamic --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0883607..820bfc5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.6 +Version: 1.9.7 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -175,6 +175,9 @@ EOF %changelog +* Sun Feb 24 2019 Jens Petersen - 1.9.7-1 +- ghc_fix_rpath was a noop when ghc_without_dynamic + * Fri Feb 1 2019 Jens Petersen - 1.9.6-1 - disable debuginfo by undefining _enable_debug_packages - leave stripping to generic rpm macros diff --git a/macros.ghc b/macros.ghc index 5719d85..1655064 100644 --- a/macros.ghc +++ b/macros.ghc @@ -169,7 +169,6 @@ fi\ # ghc_fix_rpath lib-ver ... %ghc_fix_rpath()\ -%if %{undefined ghc_without_dynamic}\ if ! type chrpath > /dev/null; then exit 1; fi\ for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ for lib in %*; do\ @@ -197,7 +196,6 @@ for lib in %*; do\ fi\ done\ done\ -%endif\ %{nil} # Deprecated by ghc_fix_rpath: From 5a531e47b6291a550d832937171a2b33eec27211 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 9 Apr 2019 19:21:22 +0800 Subject: [PATCH 407/514] re-instate ghc_without_shared since useful for standalone builds --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 820bfc5..c7fc47c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.7 +Version: 1.9.8 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -175,6 +175,9 @@ EOF %changelog +* Tue Apr 9 2019 Jens Petersen - 1.9.8-1 +- re-instate ghc_without_shared since useful for standalone builds + * Sun Feb 24 2019 Jens Petersen - 1.9.7-1 - ghc_fix_rpath was a noop when ghc_without_dynamic diff --git a/macros.ghc b/macros.ghc index 1655064..9ca0ab8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -86,7 +86,9 @@ echo "%%dir ${pkgdir}" >> %{basepkg}.files\ find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ %endif\ +%if %{undefined ghc_without_shared}\ echo "%%attr(755,root,root) %{?_ghcdynlibdir}%{!?_ghcdynlibdir:${pkgdir}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ +%endif\ fi\ if [ -d "%{buildroot}%{docdir}" ]; then\ echo "%{docdir}" >> %{basepkg}-devel.files\ @@ -132,7 +134,7 @@ fi\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\ -%cabal_configure %{!?without_prof:-p} --enable-shared %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} From 03ef97695490b546581a57308f32827ff5bc1549 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Apr 2019 18:15:27 +0800 Subject: [PATCH 408/514] strip with Cabal again; obsolete ghc-hoopl unfortunately libs and exe's were not getting stripped by rpm --- ghc-rpm-macros.spec | 10 +++++++++- macros.ghc | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c7fc47c..4006643 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.8 +Version: 1.9.9 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -107,6 +107,9 @@ Obsoletes: ghc-content-store < 0.2.1-3, ghc-content-store-devel < 0.2.1-3 Obsoletes: ghc-bdcs < 0.6.1-3, ghc-bdcs-devel < 0.6.1-3 Obsoletes: ghc-bdcs-api < 0.1.3-3, ghc-bdcs-api-devel < 0.1.3-3 %endif +%if 0%{?fedora} >= 30 +Obsoletes: ghc-hoopl < 74, ghc-hoopl-devel < 74 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -175,6 +178,11 @@ EOF %changelog +* Mon Apr 15 2019 Jens Petersen - 1.9.9-1 +- cabal_configure: re-enable stripping by Cabal + (remove --disable-executable-stripping --disable-library-stripping) +- obsolete hoopl + * Tue Apr 9 2019 Jens Petersen - 1.9.8-1 - re-instate ghc_without_shared since useful for standalone builds diff --git a/macros.ghc b/macros.ghc index 9ca0ab8..5f29cb8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -29,7 +29,7 @@ if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ cp %{_datadir}/ghc-rpm-macros/Setup.hs .\ fi\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" --disable-executable-stripping --disable-library-stripping %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} From 945207835e871db77f6e48850847aec2196b7c4c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 11 May 2019 01:01:39 +0800 Subject: [PATCH 409/514] add remaining f30 obsoletes --- ghc-rpm-macros.spec | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4006643..46bcca0 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -108,7 +108,30 @@ Obsoletes: ghc-bdcs < 0.6.1-3, ghc-bdcs-devel < 0.6.1-3 Obsoletes: ghc-bdcs-api < 0.1.3-3, ghc-bdcs-api-devel < 0.1.3-3 %endif %if 0%{?fedora} >= 30 -Obsoletes: ghc-hoopl < 74, ghc-hoopl-devel < 74 +# ghc +Obsoletes: ghc-hoopl < 3.10.2.2-74, ghc-hoopl-devel < 3.10.2.2-74 +# language-ecmascript +Obsoletes: ghc-tagshare < 0.0-10, ghc-tagshare-devel < 0.0-10 +Obsoletes: ghc-testing-feat < 0.4.0.3-10, ghc-testing-feat-devel < 0.4.0.3-10 +# haskell-platform +Obsoletes : ghc-fixed < 0.2.1.1-16, ghc-fixed-devel < 0.2.1.1-16 +Obsoletes : ghc-GLURaw < 2.0.0.4, ghc-GLURaw-devel < 2.0.0.4 +Obsoletes : ghc-GLUT < 2.7.0.13, ghc-GLUT-devel < 2.7.0.13 +Obsoletes : ghc-half < 0.3, ghc-half-devel < 0.3 +Obsoletes : ghc-haskell-src < 1.0.3.0, ghc-haskell-src-devel < 1.0.3.0 +Obsoletes : ghc-ObjectName < 1.1.0.1-16, ghc-ObjectName-devel < 1.1.0.1-16 +Obsoletes : ghc-OpenGL < 3.0.2.1, ghc-OpenGL-devel < 3.0.2.1 +Obsoletes : ghc-OpenGLRaw < 3.2.6.0, ghc-OpenGLRaw-devel < 3.2.6.0 +# enumerator +Obsoletes: ghc-enumerator < 0.4.20-12, ghc-enumerator-devel < 0.4.20-12 +Obsoletes: ghc-attoparsec-enumerator < 0.3.4-10, ghc-attoparsec-enumerator-devel < 0.3.4-10 +Obsoletes: ghc-blaze-builder-enumerator < 0.2.1.0-8, ghc-blaze-builder-enumerator-devel < 0.2.1.0-8 +Obsoletes: ghc-zlib-enum < 0.2.3.1-12, ghc-zlib-enum-devel < 0.2.3.1-12 +# Agda +Obsoletes: ghc-monadplus < 1.4.2-17, ghc-monadplus-devel < 1.4.2-17 +%endif +%if 0%{?fedora} >= 31 +Obsoletes: ghc-conduit-combinators < 1.3.1, ghc-conduit-combinators-devel < 1.3.1 %endif %description -n ghc-obsoletes @@ -178,6 +201,10 @@ EOF %changelog +* Fri May 10 2019 fedora-toolbox - 1.9.9-2 +- obsoletes for f30 deprecated packages + (including haskell-platform subpackaged libraries and enumerator) + * Mon Apr 15 2019 Jens Petersen - 1.9.9-1 - cabal_configure: re-enable stripping by Cabal (remove --disable-executable-stripping --disable-library-stripping) From aeff5cde9013a1350d3ce2d1fc5c2d92ccc2fb81 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 18 May 2019 15:57:21 +0800 Subject: [PATCH 410/514] obsolete ghc-conduit-combinators base package already in f30 --- ghc-rpm-macros.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 46bcca0..58fa409 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -129,9 +129,12 @@ Obsoletes: ghc-blaze-builder-enumerator < 0.2.1.0-8, ghc-blaze-builder-enum Obsoletes: ghc-zlib-enum < 0.2.3.1-12, ghc-zlib-enum-devel < 0.2.3.1-12 # Agda Obsoletes: ghc-monadplus < 1.4.2-17, ghc-monadplus-devel < 1.4.2-17 +# conduit-combinators +Obsoletes: ghc-conduit-combinators < 1.3.1 %endif %if 0%{?fedora} >= 31 -Obsoletes: ghc-conduit-combinators < 1.3.1, ghc-conduit-combinators-devel < 1.3.1 +# base package obsoleted above in f30 +Obsoletes: ghc-conduit-combinators-devel < 1.3.1 %endif %description -n ghc-obsoletes @@ -201,6 +204,9 @@ EOF %changelog +* Sat May 18 2019 fedora-toolbox - 1.9.9-3 +- ghc-conduit-combinators base package obsoleted in f30 + * Fri May 10 2019 fedora-toolbox - 1.9.9-2 - obsoletes for f30 deprecated packages (including haskell-platform subpackaged libraries and enumerator) From a7912ec0d8aac3b46b88b82675d681376f4edd7b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 02:56:16 +0000 Subject: [PATCH 411/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 58fa409..a2491bf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.9.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -204,6 +204,9 @@ EOF %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 1.9.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat May 18 2019 fedora-toolbox - 1.9.9-3 - ghc-conduit-combinators base package obsoleted in f30 From 07a1493141bc5043e3434a750e38b8030d21bca5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 12 Jul 2019 14:08:03 +0000 Subject: [PATCH 412/514] drop deprecated %ghc_fix_dynamic_rpath deprecated since Sept 2016 --- macros.ghc | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/macros.ghc b/macros.ghc index 5f29cb8..f5c61e2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -200,33 +200,6 @@ done\ done\ %{nil} -# Deprecated by ghc_fix_rpath: -# ghc_fix_dynamic_rpath prog ... -%ghc_fix_dynamic_rpath()\ -%if %{undefined ghc_without_dynamic}\ -if ! type chrpath > /dev/null; then exit 1; fi\ -pdir=$(pwd)\ -for i in %*; do\ - case $i in\ - /*) prog=%{buildroot}$i ;;\ - *) prog=%{buildroot}%{_bindir}/$i ;;\ - esac\ - if [ -x "$prog" ]; then\ - rpath=$(chrpath $prog | sed -e "s@^$prog: R.*PATH=@@")\ - case $rpath in\ - *$pdir*)\ - newrpath=$(echo $rpath | sed -e "s@$pdir/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ - chrpath -r $newrpath $prog\ - ;;\ - esac\ - else\ - echo "%%ghc_fix_dynamic_rpath: no such file $prog"\ - exit 1\ - fi\ -done\ -%endif\ -%{nil} - %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : # deprecated From 2dafbc455d275876605246f4b8a89c1206082c96 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 12 Jul 2019 14:10:35 +0000 Subject: [PATCH 413/514] drop devel %post and %postun (replaced by triggers in ghc-compiler) No longer use %ghc_pkg_c_deps hack to require ghc-compiler = ver-rel - check for ghc_version_override instead --- macros.ghc-extra | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index 9d98fda..3002b81 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -35,8 +35,7 @@ Group: Development/Languages/Other\ %endif\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\ -Requires(postun): %{ghc_prefix}-compiler = %{ghc_version}\ +Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ @@ -45,12 +44,6 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ -%post -n %{basepkg}-devel\ -%ghc_pkg_recache\ -\ -%postun -n %{basepkg}-devel\ -%ghc_pkg_recache\ -\ %files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ %if 0%{?rhel} && 0%{?rhel} < 6\ %defattr(-,root,root,-)\ From 6cca56615fe30d328f187d24fd486e35705ec9ee Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 12 Jul 2019 14:24:17 +0000 Subject: [PATCH 414/514] bump to version 1.10 --- ghc-rpm-macros.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a2491bf..984c55e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,13 +10,13 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.9.9 -Release: 4%{?dist} +Version: 1.10.0 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ URL: https://github.com/fedora-haskell/ghc-rpm-macros -# Currently source is only in git but tarballs could be made if it helps +# Currently source is only in pkg git but tarballs could be made if it helps Source0: macros.ghc Source1: COPYING Source2: AUTHORS @@ -41,8 +41,7 @@ BuildArch: noarch %description A set of macros for building GHC packages following the Haskell Guidelines -of the Fedora Haskell SIG. ghc needs to be installed in order to make use of -these macros. +of the Fedora Haskell SIG. %package extra @@ -204,6 +203,10 @@ EOF %changelog +* Fri Jul 12 2019 Jens Petersen - 1.10.0-1 +- drop devel subpackage scriplets (replaced by ghc-compiler triggers) +- remove deprecated ghc_fix_dynamic_rpath + * Thu Jul 25 2019 Fedora Release Engineering - 1.9.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 7c7ff554cefc7eb7827cb9e5c187efb47e01a922 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Jul 2019 08:40:09 +0000 Subject: [PATCH 415/514] implement doc and prof subpackages --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 39 +++++++++++++------------------------- macros.ghc-extra | 46 ++++++++++++++++++++++++++++++++------------- 3 files changed, 50 insertions(+), 40 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 984c55e..a84507a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.10.0 +Version: 2.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -203,6 +203,9 @@ EOF %changelog +* Sun Jul 14 2019 Jens Petersen - 2.0-1 +- bring back doc and prof subpackages + * Fri Jul 12 2019 Jens Petersen - 1.10.0-1 - drop devel subpackage scriplets (replaced by ghc-compiler triggers) - remove deprecated ghc_fix_dynamic_rpath diff --git a/macros.ghc b/macros.ghc index f5c61e2..29562cc 100644 --- a/macros.ghc +++ b/macros.ghc @@ -69,36 +69,22 @@ fi\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ -%define docdir %{ghclibdocdir}/%{pkgnamever}\ -if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/)" ]; then\ -echo "%{buildroot}%{ghclibdir}/package.conf.d/*.conf not found"\ +if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ +echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ fi\ -rm -f %{basepkg}.files %{basepkg}-devel.files\ -touch %{basepkg}.files %{basepkg}-devel.files\ -ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ +rm -f %{basepkg}.files\ +touch %{basepkg}.files\ +ls %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so >> %{basepkg}.files\ pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ -%if %{defined _ghcdynlibdir}\ -echo "${pkgdir}" >> %{basepkg}-devel.files\ -%else\ -echo "%%dir ${pkgdir}" >> %{basepkg}.files\ -find %{buildroot}${pkgdir} -mindepth 1 -type d | sed "s/^/%dir /" >> %{basepkg}-devel.files\ -find %{buildroot}${pkgdir} ! \\( -type d -o -name "libHS*.so" \\) >> %{basepkg}-devel.files\ -%endif\ -%if %{undefined ghc_without_shared}\ -echo "%%attr(755,root,root) %{?_ghcdynlibdir}%{!?_ghcdynlibdir:${pkgdir}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so" >> %{basepkg}.files\ -%endif\ -fi\ -if [ -d "%{buildroot}%{docdir}" ]; then\ -echo "%{docdir}" >> %{basepkg}-devel.files\ +find %{buildroot}${pkgdir} -type d -fprintf %{basepkg}-devel.files '%%%%dir %p\\n' -o \\( -name '*.p_hi' -o -name 'libHS*_p.a' \\) -fprint %{basepkg}-prof.files -o -fprint %{basepkg}-devel.files\ +else\ +rm -f %{basepkg}-devel.files %{basepkg}-prof.files\ +touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ -%if 0%{?1:1}\ -for i in $(ls %{buildroot}%{_ghclicensedir}/%{!?1:%{name}}%{?1:%{basepkg}}); do\ -echo "%%license %{?1:%{pkgnamever}/}$i" >> %{basepkg}.files\ -done\ -%endif\ -for i in %{basepkg}.files %{basepkg}-devel.files; do\ +ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ +for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ fi\ @@ -172,7 +158,7 @@ fi\ # ghc_fix_rpath lib-ver ... %ghc_fix_rpath()\ if ! type chrpath > /dev/null; then exit 1; fi\ -for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ +for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ for lib in %*; do\ if [ -x "$i" ]; then\ rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ @@ -200,6 +186,7 @@ done\ done\ %{nil} +# deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : # deprecated diff --git a/macros.ghc-extra b/macros.ghc-extra index 3002b81..ed6db43 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -12,14 +12,12 @@ print(name)\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ }}\ +%define pkgnamever %{pkgname}-%{pkgver}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ -%if 0%{?rhel} && 0%{?rhel} < 6\ -Group: System/Libraries\ -%endif\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Url: http://hackage.haskell.org/package/%{pkgname}\ @@ -30,9 +28,6 @@ This package provides the Haskell %{pkgname} library.\ \ %package -n %{basepkg}-devel\ Summary: Haskell %{pkgname} library development files\ -%if 0%{?rhel} && 0%{?rhel} < 6\ -Group: Development/Languages/Other\ -%endif\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\ @@ -44,17 +39,42 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ -%files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ -%if 0%{?rhel} && 0%{?rhel} < 6\ -%defattr(-,root,root,-)\ +%if %{undefined without_haddock}\ +%package -n %{basepkg}-doc\ +Summary: Haskell %{pkgname} library documentation\ +%{?1:Version: %{pkgver}}\ +%{-l:License: %{-l*}}\ +Supplements: (%{basepkg}-devel and ghc-doc)\ +\ +%description -n %{basepkg}-doc\ +This package provides the Haskell %{pkgname} library documentation.\ +%endif\ +\ +%if %{undefined without_prof}\ +%package -n %{basepkg}-prof\ +Summary: Haskell %{pkgname} profiling library\ +%{?1:Version: %{pkgver}}\ +%{-l:License: %{-l*}}\ +Requires: %{ghc_prefix}-%{pkgname}-devel%{?_isa} = %{pkgver}-%{release}\ +Supplements: (%{basepkg}-devel and ghc-prof)\ +\ +%description -n %{basepkg}-prof\ +This package provides the Haskell %{pkgname} profiling library.\ %endif\ -%{?base_doc_files:%doc %base_doc_files}\ +\ +%files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ +%{_ghclicensedir}/%{basepkg}\ \ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ -%if 0%{?rhel} && 0%{?rhel} < 6\ -%defattr(-,root,root,-)\ +\ +%if %{undefined without_haddock}\ +%files -n %{basepkg}-doc\ +%{ghc_html_libraries_dir}/%{pkgnamever}\ +%endif\ +\ +%if %{undefined without_prof}\ +%files -n %{basepkg}-prof -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-prof.files\ %endif\ -%{?devel_doc_files:%doc %devel_doc_files}\ %{nil} # ghc_libs_build [name-version] ... From e046298ce0d59330ad02ec907cbbc4924f9fb090 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Jul 2019 16:32:58 +0000 Subject: [PATCH 416/514] update deps generation for prof subpackages --- ghc-deps.sh | 38 +++++++++++++++++++------------------- ghc.attr | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index cc9b346..67443eb 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -5,13 +5,13 @@ set +x -mode=$1 -pkgbasedir=$2 -pkgconfdir=$pkgbasedir/package.conf.d +MODE=$1 +PKGBASEDIR=$2 +PKGCONFDIR=$PKGBASEDIR/package.conf.d -ghc_pkg="/usr/lib/rpm/ghc-pkg-wrapper $pkgbasedir" +GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR" -case $mode in +case $MODE in --provides) field=id ;; --requires) field=depends ;; *) echo "$(basename $0): Need --provides or --requires" @@ -19,25 +19,25 @@ case $mode in ;; esac -ghc_ver=$(basename $pkgbasedir | sed -e s/ghc-//) - files=$(cat) for i in $files; do + meta="" case $i in - # exclude builtin_rts.conf - $pkgconfdir/*-*.conf) - name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($ghc_pkg field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") - - for d in $ids; do - case $d in - *-*) echo "ghc-devel($d)" ;; - *) ;; - esac - done + */libHS*_p.a) + meta=prof ;; - *) + */libHS*.a) + meta=devel ;; esac + if [ -n "$meta" ]; then + pkgver=$(basename $(dirname $i)) + ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + for d in $ids; do + case $d in + *-*) echo "ghc-${meta}($d)" ;; + esac + done + fi done diff --git a/ghc.attr b/ghc.attr index 7703f9e..ca391b6 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ %__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_path ^%{ghclibdir}/package.conf.d/.*\.conf$ +%__ghc_path ^%{ghclibdir}/.*/libHS.*\.a$ From 1862405783e3e0e8e82a185031ba74b53a9ead26 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Jul 2019 16:33:38 +0000 Subject: [PATCH 417/514] %ghc_fix_rpath: remove _libdir --- macros.ghc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/macros.ghc b/macros.ghc index 29562cc..f20863c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -157,6 +157,7 @@ fi\ # ghc_fix_rpath lib-ver ... %ghc_fix_rpath()\ +%if %{undefined disable_ghc_fix_rpath}\ if ! type chrpath > /dev/null; then exit 1; fi\ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ for lib in %*; do\ @@ -175,7 +176,14 @@ for lib in %*; do\ syspath="" ;;\ esac\ newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\ - chrpath -r $newrpath $i\ + if [ "$newrpath" = "%{_libdir}" ]; then\ + chrpath -d $i\ + else\ + chrpath -r $newrpath $i\ + fi\ + ;;\ + %{_libdir})\ + chrpath -d $i\ ;;\ esac\ else\ @@ -184,7 +192,7 @@ for lib in %*; do\ fi\ done\ done\ -%{nil} +%endif # deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : From 1d408a6badd6c29dccf58e37517ccaf21511f4cf Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 15 Jul 2019 16:34:14 +0000 Subject: [PATCH 418/514] static provides --- macros.ghc-extra | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macros.ghc-extra b/macros.ghc-extra index ed6db43..9877eeb 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -30,7 +30,8 @@ This package provides the Haskell %{pkgname} library.\ Summary: Haskell %{pkgname} library development files\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\ +Provides: %{basepkg}-static = %{pkgver}-%{release}\ +Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ From a848de7b31653f760dc10d9a2836c0ec2ab3ab3c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 16 Jul 2019 16:05:34 +0000 Subject: [PATCH 419/514] add pkg-doc.files initial use-case: adding ghc-prim and integer-gmp to base --- macros.ghc | 7 ++++--- macros.ghc-extra | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/macros.ghc b/macros.ghc index f20863c..e4f7fc5 100644 --- a/macros.ghc +++ b/macros.ghc @@ -73,8 +73,8 @@ if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; t echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ fi\ -rm -f %{basepkg}.files\ -touch %{basepkg}.files\ +rm -f %{basepkg}.files %{basepkg}-doc.files\ +touch %{basepkg}.files %{basepkg}-doc.files\ ls %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so >> %{basepkg}.files\ pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ @@ -84,7 +84,8 @@ rm -f %{basepkg}-devel.files %{basepkg}-prof.files\ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ -for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-prof.files; do\ +echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ +for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ fi\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 9877eeb..c8b8e38 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -12,7 +12,6 @@ print(name)\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ }}\ -%define pkgnamever %{pkgname}-%{pkgver}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ @@ -69,8 +68,7 @@ This package provides the Haskell %{pkgname} profiling library.\ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ \ %if %{undefined without_haddock}\ -%files -n %{basepkg}-doc\ -%{ghc_html_libraries_dir}/%{pkgnamever}\ +%files -n %{basepkg}-doc -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-doc.files\ %endif\ \ %if %{undefined without_prof}\ From 35cd9d015e08c93d808538cb7f38adfedbdbfa99 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 16 Jul 2019 16:09:25 +0000 Subject: [PATCH 420/514] switch from without_prof/haddock to with_ghc_prof/haddock We now have build config consistent with standard bcond across our packages --- macros.ghc | 14 ++++---------- macros.ghc-extra | 8 ++++---- macros.ghc-os | 2 ++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/macros.ghc b/macros.ghc index e4f7fc5..d9a0113 100644 --- a/macros.ghc +++ b/macros.ghc @@ -121,14 +121,14 @@ fi\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\ -%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ +%cabal_configure %{?with_ghc_prof:-p} %{!?ghc_without_shared:--enable-shared} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_ghclicensedir}/ghc-%1${licensedirversion} --htmldir=%{ghclibdocdir}/%1-%2} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options}\ %{nil} # ghc_lib_build [name] [version] %ghc_lib_build()\ %ghc_lib_build_without_haddock %{?1} %{?2}\ -%if %{undefined without_haddock}\ +%if %{with haddock}\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ if [ -n dist/build/libHS%{pkgname}-%{pkgver}*.so ]; then\ @@ -198,13 +198,7 @@ done\ # deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : -# deprecated -%ghc_bootstrap\ -%global without_prof 1\ -%global without_haddock 1\ -%global without_manual 1 - # skip prof libs and documentation %ghc_quick_build\ -%global without_prof 1\ -%global without_haddock 1 +%undefine with_ghc_prof\ +%undefine with_haddock diff --git a/macros.ghc-extra b/macros.ghc-extra index c8b8e38..2bdbfab 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -39,7 +39,7 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ -%if %{undefined without_haddock}\ +%if %{with haddock}\ %package -n %{basepkg}-doc\ Summary: Haskell %{pkgname} library documentation\ %{?1:Version: %{pkgver}}\ @@ -50,7 +50,7 @@ Supplements: (%{basepkg}-devel and ghc-doc)\ This package provides the Haskell %{pkgname} library documentation.\ %endif\ \ -%if %{undefined without_prof}\ +%if %{with ghc_prof}\ %package -n %{basepkg}-prof\ Summary: Haskell %{pkgname} profiling library\ %{?1:Version: %{pkgver}}\ @@ -67,11 +67,11 @@ This package provides the Haskell %{pkgname} profiling library.\ \ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ \ -%if %{undefined without_haddock}\ +%if %{with haddock}\ %files -n %{basepkg}-doc -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-doc.files\ %endif\ \ -%if %{undefined without_prof}\ +%if %{with ghc_prof}\ %files -n %{basepkg}-prof -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-prof.files\ %endif\ %{nil} diff --git a/macros.ghc-os b/macros.ghc-os index cdab44c..cd0fbdf 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -5,5 +5,7 @@ %_ghcdynlibdir %{_libdir} %ghc_without_dynamic 1 +%with_ghc_prof 1 +%with_haddock 1 %cabal_install_options -v From 8e03288604d538c32f40339261cd8c28d53b3e43 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 17 Jul 2019 06:27:12 +0000 Subject: [PATCH 421/514] revert to handling subpackage license in %ghc_gen_filelists --- macros.ghc | 5 +++++ macros.ghc-extra | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index d9a0113..b16c413 100644 --- a/macros.ghc +++ b/macros.ghc @@ -75,6 +75,11 @@ exit 1\ fi\ rm -f %{basepkg}.files %{basepkg}-doc.files\ touch %{basepkg}.files %{basepkg}-doc.files\ +%if 0%{?1:1}\ +for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\ +echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ +done\ +%endif\ ls %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so >> %{basepkg}.files\ pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 2bdbfab..4d81cd7 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -63,7 +63,6 @@ This package provides the Haskell %{pkgname} profiling library.\ %endif\ \ %files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ -%{_ghclicensedir}/%{basepkg}\ \ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ \ From f14f1387ec006f5dbb8c8f83446520ccabfff49a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 07:32:42 +0000 Subject: [PATCH 422/514] drop verbose output for Cabal install --- macros.ghc-os | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc-os b/macros.ghc-os index cd0fbdf..e061c16 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -8,4 +8,4 @@ %with_ghc_prof 1 %with_haddock 1 -%cabal_install_options -v +#%%cabal_install_options -v From 75b540630f4aa925e5a10c24f6104c3cde823c11 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 08:03:09 +0000 Subject: [PATCH 423/514] %ghc_gen_filelists: fix listing of libHS*.so --- macros.ghc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index b16c413..ba8de23 100644 --- a/macros.ghc +++ b/macros.ghc @@ -80,7 +80,9 @@ for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ done\ %endif\ -ls %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so >> %{basepkg}.files\ +for i in %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\ +echo $i >> %{basepkg}.files\ +done\ pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ find %{buildroot}${pkgdir} -type d -fprintf %{basepkg}-devel.files '%%%%dir %p\\n' -o \\( -name '*.p_hi' -o -name 'libHS*_p.a' \\) -fprint %{basepkg}-prof.files -o -fprint %{basepkg}-devel.files\ From 4288e26af90a950acb7c339c89fd7ad073338e70 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 08:04:12 +0000 Subject: [PATCH 424/514] %ghc_gen_filelists: condition haddock --- macros.ghc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/macros.ghc b/macros.ghc index ba8de23..bd50dc2 100644 --- a/macros.ghc +++ b/macros.ghc @@ -91,7 +91,9 @@ rm -f %{basepkg}-devel.files %{basepkg}-prof.files\ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ +%if %{with haddock}\ echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ +%endif\ for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\ if [ -f "$i" ]; then\ sed -i -e "s!%{buildroot}!!g" $i\ From 6dd89e30445d49f3eae77b8c386d72d9ba3192b2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 08:04:40 +0000 Subject: [PATCH 425/514] output args to %ghc_fix_rpath --- macros.ghc | 1 + 1 file changed, 1 insertion(+) diff --git a/macros.ghc b/macros.ghc index bd50dc2..f25ba09 100644 --- a/macros.ghc +++ b/macros.ghc @@ -169,6 +169,7 @@ fi\ %ghc_fix_rpath()\ %if %{undefined disable_ghc_fix_rpath}\ if ! type chrpath > /dev/null; then exit 1; fi\ +echo "ghc_fix_rpath %*"\ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ for lib in %*; do\ if [ -x "$i" ]; then\ From 25cfe11f3dfd25bd3a632b517055c0f08940ad1f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 08:05:32 +0000 Subject: [PATCH 426/514] fix deps generation for devel package.conf and prof libHS*_p.a --- ghc-deps.sh | 31 ++++++++++++++++++------------- ghc.attr | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 67443eb..ca86d9a 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -24,20 +24,25 @@ files=$(cat) for i in $files; do meta="" case $i in - */libHS*_p.a) - meta=prof + # exclude rts.conf + $pkgconfdir/*-*.conf) + name=$(grep "^name: " $i | sed -e "s/name: //") + ids=$($GHC_PKG field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + for d in $ids; do + case $d in + *-*) echo "ghc-devel($d)" ;; + *) ;; + esac + done ;; - */libHS*.a) - meta=devel + */libHS*_p.a) + pkgver=$(basename $(dirname $i)) + ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + for d in $ids; do + case $d in + *-*) echo "ghc-prof($d)" ;; + esac + done ;; esac - if [ -n "$meta" ]; then - pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") - for d in $ids; do - case $d in - *-*) echo "ghc-${meta}($d)" ;; - esac - done - fi done diff --git a/ghc.attr b/ghc.attr index ca391b6..94bd957 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ %__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} -%__ghc_path ^%{ghclibdir}/.*/libHS.*\.a$ +%__ghc_path ^%{ghclibdir}/(.*/libHS.*_p\.a|package.conf.d/.*\.conf)$ From aa3330b0d688c529e2e74351fa358371ce63d00a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 31 Jul 2019 10:16:47 +0000 Subject: [PATCH 427/514] fixup changelog dates --- ghc-rpm-macros.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a84507a..b2c534c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -203,20 +203,20 @@ EOF %changelog -* Sun Jul 14 2019 Jens Petersen - 2.0-1 +* Wed Jul 31 2019 Jens Petersen - 2.0-1 - bring back doc and prof subpackages -* Fri Jul 12 2019 Jens Petersen - 1.10.0-1 +* Fri Jul 26 2019 Jens Petersen - 1.10.0-1 - drop devel subpackage scriplets (replaced by ghc-compiler triggers) - remove deprecated ghc_fix_dynamic_rpath * Thu Jul 25 2019 Fedora Release Engineering - 1.9.9-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild -* Sat May 18 2019 fedora-toolbox - 1.9.9-3 +* Sat May 18 2019 Jens Petersen - 1.9.9-3 - ghc-conduit-combinators base package obsoleted in f30 -* Fri May 10 2019 fedora-toolbox - 1.9.9-2 +* Fri May 10 2019 Jens Petersen - 1.9.9-2 - obsoletes for f30 deprecated packages (including haskell-platform subpackaged libraries and enumerator) From c0416597f58ee8e85ecdaef2737e03c1cef6047a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 5 Aug 2019 18:50:07 +0800 Subject: [PATCH 428/514] ghc_lib_subpackage: provide static with isa suffix --- ghc-rpm-macros.spec | 5 ++++- macros.ghc-extra | 1 + macros.ghc-os | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b2c534c..cc5f021 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0 +Version: 2.0.1 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -203,6 +203,9 @@ EOF %changelog +* Mon Aug 5 2019 Jens Petersen - 2.0.1-1 +- ghc_lib_subpackage: provide static with isa suffix + * Wed Jul 31 2019 Jens Petersen - 2.0-1 - bring back doc and prof subpackages diff --git a/macros.ghc-extra b/macros.ghc-extra index 4d81cd7..014b2de 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -30,6 +30,7 @@ Summary: Haskell %{pkgname} library development files\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Provides: %{basepkg}-static = %{pkgver}-%{release}\ +Provides: %{basepkg}-static%{?_isa} = %{pkgver}-%{release}\ Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ diff --git a/macros.ghc-os b/macros.ghc-os index e061c16..c0b3d74 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -5,7 +5,11 @@ %_ghcdynlibdir %{_libdir} %ghc_without_dynamic 1 + +# enable profiling libraries in prof subpkgs %with_ghc_prof 1 + +# enable library documentation in doc subpkgs %with_haddock 1 #%%cabal_install_options -v From a11ad68d65995771662f84146d6cb1ddde962ac5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 7 Aug 2019 14:07:56 +0200 Subject: [PATCH 429/514] check if doc haddock dir exists --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index cc5f021..22a93ea 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.1 +Version: 2.0.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -203,6 +203,9 @@ EOF %changelog +* Tue Aug 6 2019 Jens Petersen - 2.0.2-1 +- check if doc haddock dir exists + * Mon Aug 5 2019 Jens Petersen - 2.0.1-1 - ghc_lib_subpackage: provide static with isa suffix diff --git a/macros.ghc b/macros.ghc index f25ba09..831460e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -92,7 +92,9 @@ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ %if %{with haddock}\ +if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\ echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ +fi\ %endif\ for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\ if [ -f "$i" ]; then\ From 8532ad674ade42fc256995fd94082778b648556d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 10 Aug 2019 22:43:05 +0200 Subject: [PATCH 430/514] ghc-deps.sh: only depend on ghc-prof(pkgid) if libHS*_p.a exists testcase: haskell-gi-overloading dummy package --- ghc-deps.sh | 13 ++++++++++++- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index ca86d9a..51916c8 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -40,7 +40,18 @@ for i in $files; do ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in - *-*) echo "ghc-prof($d)" ;; + *-*) + case $field in + id) + echo "ghc-prof($d)" + ;; + *) + if [ -f "$PKGBASEDIR/$pkgver/libHS${d}_p.a" -o -f "/usr/lib*/ghc-*/$pkgver/libHS${d}_p.a" ]; then + echo "ghc-prof($d)" + fi + ;; + esac + ;; esac done ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 22a93ea..0985206 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.2 +Version: 2.0.3 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -203,6 +203,9 @@ EOF %changelog +* Sat Aug 10 2019 Jens Petersen - 2.0.3-1 +- only depend on ghc-prof(pkgid) if libHSpkgid_p.a exists + * Tue Aug 6 2019 Jens Petersen - 2.0.2-1 - check if doc haddock dir exists From f4b028074227dc1e3a4bcbf7b7fc5bdd7e7855e9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 13 Aug 2019 17:31:29 +0200 Subject: [PATCH 431/514] add cabal-tweak-remove-upperbound --- cabal-tweak-remove-upperbound | 37 +++++++++++++++++++++++++++++++++++ ghc-rpm-macros.spec | 8 +++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100755 cabal-tweak-remove-upperbound diff --git a/cabal-tweak-remove-upperbound b/cabal-tweak-remove-upperbound new file mode 100755 index 0000000..abce557 --- /dev/null +++ b/cabal-tweak-remove-upperbound @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e +x + +USAGE="Usage: $0 dep" + +if [ $# -ne 1 ]; then + echo "$USAGE" + exit 1 +fi + +DEP=$1 +CABALFILE=$(ls *.cabal) + +if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then + echo "There needs to be one .cabal file in the current dir!" + exit 1 +fi + +BREAK=[^[:alnum:]-] + +if ! grep -q "$BREAK$DEP$BREAK[^,]*" $CABALFILE; then + echo "$CABALFILE does not match: $DEP" + exit 1 +fi + +if [ ! -f $CABALFILE.orig ]; then + BACKUP=.orig +fi + +if grep -q "$BREAK$DEP$BREAK[^,]*&&" $CABALFILE; then + sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^&,]*[^ ]\+\) *&&[^,]*/\1/g" $CABALFILE +fi + +if grep -q "$BREAK$DEP$BREAK[^,]*==" $CABALFILE; then + sed -i$BACKUP -e "s/\($BREAK$DEP$BREAK[^=,]*\)==\([^,*]*\)\.\*/\1>=\2/g" $CABALFILE +fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0985206..5c413fb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.3 +Version: 2.0.4 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -29,6 +29,7 @@ Source8: ghc-pkg-wrapper Source9: macros.ghc-os Source10: Setup.hs Source11: cabal-tweak-drop-dep +Source12: cabal-tweak-remove-upperbound Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler @@ -167,6 +168,7 @@ install -p -D -m 0644 %{SOURCE10} %{buildroot}/%{_datadir}/%{name}/Setup.hs install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag install -p -D -m 0755 %{SOURCE11} %{buildroot}/%{_bindir}/cabal-tweak-drop-dep +install -p -D -m 0755 %{SOURCE12} %{buildroot}/%{_bindir}/cabal-tweak-remove-upperbound install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper %if 0%{?rhel} && 0%{?rhel} < 7 @@ -190,6 +192,7 @@ EOF %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-drop-dep %{_bindir}/cabal-tweak-flag +%{_bindir}/cabal-tweak-remove-upperbound %{_datadir}/%{name}/Setup.hs @@ -203,6 +206,9 @@ EOF %changelog +* Tue Aug 13 2019 Jens Petersen - 2.0.4-1 +- add cabal-tweak-remove-upperbound script + * Sat Aug 10 2019 Jens Petersen - 2.0.3-1 - only depend on ghc-prof(pkgid) if libHSpkgid_p.a exists From bf725e3e8b0c32fec9670f3bdd6d9b07fd8c2da9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 27 Aug 2019 16:45:37 +0300 Subject: [PATCH 432/514] fix ghc-deps.sh generation of prof deps broken in 2.0.3 - now should correctly glob for installed prof libs --- ghc-deps.sh | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 51916c8..1850c30 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -46,7 +46,7 @@ for i in $files; do echo "ghc-prof($d)" ;; *) - if [ -f "$PKGBASEDIR/$pkgver/libHS${d}_p.a" -o -f "/usr/lib*/ghc-*/$pkgver/libHS${d}_p.a" ]; then + if [ -f /usr/lib*/ghc-*/*/libHS${d}_p.a -o -f "$PKGBASEDIR/$pkgver/libHS${d}_p.a" ]; then echo "ghc-prof($d)" fi ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5c413fb..c42d828 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.4 +Version: 2.0.5 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -206,6 +206,9 @@ EOF %changelog +* Tue Aug 27 2019 Jens Petersen - 2.0.5-1 +- ghc-deps.sh: fix generation of prof deps + * Tue Aug 13 2019 Jens Petersen - 2.0.4-1 - add cabal-tweak-remove-upperbound script From f5201b70db2bf98b6b9d73e0ad745289e533ee84 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 27 Sep 2019 18:06:47 +0800 Subject: [PATCH 433/514] add %ghc_devel_prof config to handle devel/prof lib BRs --- ghc-rpm-macros.spec | 5 ++++- macros.ghc-os | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c42d828..f32cd8f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -206,6 +206,9 @@ EOF %changelog +* Fri Sep 27 2019 Jens Petersen - 2.0.5-2 +- define ghc_devel_prof + * Tue Aug 27 2019 Jens Petersen - 2.0.5-1 - ghc-deps.sh: fix generation of prof deps diff --git a/macros.ghc-os b/macros.ghc-os index c0b3d74..d44335c 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -12,4 +12,5 @@ # enable library documentation in doc subpkgs %with_haddock 1 -#%%cabal_install_options -v +# devel suffix +%ghc_devel_prof %{?with_ghc_prof:prof}%{!?with_ghc_prof:devel} From 55f3bb578ef3e9618fb4a1927a4150c06aa9058c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 27 Sep 2019 23:45:23 +0800 Subject: [PATCH 434/514] Revert "add %ghc_devel_prof config to handle devel/prof lib BRs" This reverts commit f5201b70db2bf98b6b9d73e0ad745289e533ee84. Could define it in ghc-srpm-macros --- ghc-rpm-macros.spec | 5 ++++- macros.ghc-os | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f32cd8f..d21a863 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -206,6 +206,9 @@ EOF %changelog +* Fri Sep 27 2019 Jens Petersen - 2.0.5-3 +- ghc_devel_prof macro not available early enough in koji + * Fri Sep 27 2019 Jens Petersen - 2.0.5-2 - define ghc_devel_prof diff --git a/macros.ghc-os b/macros.ghc-os index d44335c..246a916 100644 --- a/macros.ghc-os +++ b/macros.ghc-os @@ -11,6 +11,3 @@ # enable library documentation in doc subpkgs %with_haddock 1 - -# devel suffix -%ghc_devel_prof %{?with_ghc_prof:prof}%{!?with_ghc_prof:devel} From 7d23ad27b7bc2fe28f8eff5ccc2743753f6646ca Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 27 Jan 2020 17:57:00 +0800 Subject: [PATCH 435/514] obsolete FTBFS ghc-hgettext --- ghc-rpm-macros.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d21a863..2e090e7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -135,6 +135,7 @@ Obsoletes: ghc-conduit-combinators < 1.3.1 %if 0%{?fedora} >= 31 # base package obsoleted above in f30 Obsoletes: ghc-conduit-combinators-devel < 1.3.1 +Obsoletes: ghc-hgettext < 0.1.31.0-7, ghc-hgettext-devel < 0.1.31.0-7 %endif %description -n ghc-obsoletes @@ -206,6 +207,9 @@ EOF %changelog +* Mon Jan 27 2020 Jens Petersen - 2.0.5-4 +- obsolete ghc-hgettext + * Fri Sep 27 2019 Jens Petersen - 2.0.5-3 - ghc_devel_prof macro not available early enough in koji @@ -229,6 +233,7 @@ EOF * Wed Jul 31 2019 Jens Petersen - 2.0-1 - bring back doc and prof subpackages +- ghc_lib_subpackage: provide static * Fri Jul 26 2019 Jens Petersen - 1.10.0-1 - drop devel subpackage scriplets (replaced by ghc-compiler triggers) From 94dd0104614c47028273c8eaa3840c091b48de62 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jan 2020 21:18:19 +0000 Subject: [PATCH 436/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2e090e7..0adb87a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -207,6 +207,9 @@ EOF %changelog +* Tue Jan 28 2020 Fedora Release Engineering - 2.0.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Mon Jan 27 2020 Jens Petersen - 2.0.5-4 - obsolete ghc-hgettext From 640d44dbc640cd79d1130e5c65ed174c42171934 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 10 Feb 2020 18:51:58 +0800 Subject: [PATCH 437/514] ghc-deps.sh: fix prof deps for subpackages --- ghc-deps.sh | 2 +- ghc-rpm-macros.spec | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 1850c30..d84ae79 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -46,7 +46,7 @@ for i in $files; do echo "ghc-prof($d)" ;; *) - if [ -f /usr/lib*/ghc-*/*/libHS${d}_p.a -o -f "$PKGBASEDIR/$pkgver/libHS${d}_p.a" ]; then + if [ -f /usr/lib*/ghc-*/*/libHS${d}_p.a -o -f $PKGBASEDIR/*/libHS${d}_p.a ]; then echo "ghc-prof($d)" fi ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 0adb87a..daf895b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.5 -Release: 5%{?dist} +Version: 2.0.6 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -207,6 +207,9 @@ EOF %changelog +* Mon Feb 10 2020 Jens Petersen - 2.0.6-1 +- ghc-deps.sh: fix prof deps for subpackages + * Tue Jan 28 2020 Fedora Release Engineering - 2.0.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild @@ -1271,4 +1274,3 @@ EOF * Mon May 4 2009 Yaakov M. Nemoy - 0.1-1 - creation of package - From 2e646e6adeb8c3bf11af82b5beb69230a18013a6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 3 Mar 2020 23:45:44 +0800 Subject: [PATCH 438/514] obsolete cabal-helper and ghc-derive, and unobsolete hgettext --- ghc-rpm-macros.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index daf895b..f511f35 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -135,7 +135,11 @@ Obsoletes: ghc-conduit-combinators < 1.3.1 %if 0%{?fedora} >= 31 # base package obsoleted above in f30 Obsoletes: ghc-conduit-combinators-devel < 1.3.1 -Obsoletes: ghc-hgettext < 0.1.31.0-7, ghc-hgettext-devel < 0.1.31.0-7 +%endif +%if 0%{?fedora} >= 32 +Obsoletes: ghc-cabal-helper < 0.8.2.0-5, ghc-cabal-helper-devel < 0.8.2.0-5, ghc-cabal-helper-prof < 0.8.2.0-5 +Obsoletes: ghc-cabal-plan < 0.4.0.0-5, ghc-cabal-plan-devel < 0.4.0.0-5, ghc-cabal-plan-prof < 0.4.0.0-5 +Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-prof < 2.6.5-5 %endif %description -n ghc-obsoletes @@ -207,6 +211,10 @@ EOF %changelog +* Tue Mar 3 2020 Jens Petersen - 2.0.6-2 +- obsolete ghc-cabal-helper, ghc-cabal-plan, ghc-derive +- unobsolete ghc-hgettext + * Mon Feb 10 2020 Jens Petersen - 2.0.6-1 - ghc-deps.sh: fix prof deps for subpackages From 3e574ed46053445305a9286a4b9ac8904f6449b8 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 27 Apr 2020 21:11:59 +0800 Subject: [PATCH 439/514] use -package Cabal to build Setup --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f511f35..6771b9c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.6 -Release: 2%{?dist} +Version: 2.0.7 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -211,6 +211,9 @@ EOF %changelog +* Mon Apr 27 2020 Jens Petersen - 2.0.7-1 +- use -package Cabal to build Setup + * Tue Mar 3 2020 Jens Petersen - 2.0.6-2 - obsolete ghc-cabal-helper, ghc-cabal-plan, ghc-derive - unobsolete ghc-hgettext diff --git a/macros.ghc b/macros.ghc index 831460e..db3050b 100644 --- a/macros.ghc +++ b/macros.ghc @@ -2,7 +2,7 @@ # see https://fedoraproject.org/wiki/Packaging:Haskell for more details # "cabal" -%cabal [ -x Setup ] || ghc --make -no-user-package-db %{!?ghc_static_setup:-dynamic} Setup\ +%cabal [ -x Setup ] || ghc --make -package Cabal -no-user-package-db %{!?ghc_static_setup:-dynamic} Setup\ LANG=C.utf8\ ./Setup From 0957e8f99b300db89139b3b91bb141c0d9fea48e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 8 May 2020 19:11:35 +0800 Subject: [PATCH 440/514] obsolete ghc-here --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6771b9c..ef6c559 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -140,6 +140,7 @@ Obsoletes: ghc-conduit-combinators-devel < 1.3.1 Obsoletes: ghc-cabal-helper < 0.8.2.0-5, ghc-cabal-helper-devel < 0.8.2.0-5, ghc-cabal-helper-prof < 0.8.2.0-5 Obsoletes: ghc-cabal-plan < 0.4.0.0-5, ghc-cabal-plan-devel < 0.4.0.0-5, ghc-cabal-plan-prof < 0.4.0.0-5 Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-prof < 2.6.5-5 +Obsoletes: ghc-here < 1.2.13-17, ghc-here-devel < 1.2.13-17, ghc-here-prof < 1.2.13-17 %endif %description -n ghc-obsoletes @@ -211,6 +212,9 @@ EOF %changelog +* Fri May 8 2020 Jens Petersen - 2.0.7-2 +- obsolete ghc-here (dropped from hledger) + * Mon Apr 27 2020 Jens Petersen - 2.0.7-1 - use -package Cabal to build Setup From 1f6b86fa4b3d565f60daf35e959cf13e398cf042 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 10 May 2020 21:49:27 +0800 Subject: [PATCH 441/514] ghc-deps.sh: ignore internal libraries (#1822444) --- ghc-deps.sh | 2 ++ ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index d84ae79..3a4ecb4 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -30,6 +30,7 @@ for i in $files; do ids=$($GHC_PKG field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in + *-*-internal) ;; *-*) echo "ghc-devel($d)" ;; *) ;; esac @@ -40,6 +41,7 @@ for i in $files; do ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in + *-*-internal) ;; *-*) case $field in id) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ef6c559..8580b91 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.7 -Release: 2%{?dist} +Version: 2.0.8 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -212,6 +212,9 @@ EOF %changelog +* Sun May 10 2020 Jens Petersen - 2.0.8-1 +- ghc-deps.sh: ignore internal libraries (#1822444) + * Fri May 8 2020 Jens Petersen - 2.0.7-2 - obsolete ghc-here (dropped from hledger) From 0bb1bc2091b687dba646d72798f0bbb5418ffa2c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 4 Jun 2020 12:45:56 +0800 Subject: [PATCH 442/514] doc subpackages should own %{_docdir}/ghc/html/libraries/ and parents (#1795526) --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8580b91..8c6b59b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.8 +Version: 2.0.9 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -212,6 +212,10 @@ EOF %changelog +* Thu Jun 4 2020 Jens Petersen - 2.0.9-1 +- doc subpackages should own /usr/share/doc/ghc/, /usr/share/doc/ghc/html/, + and /usr/share/doc/ghc/html/libraries/ (#1795526) + * Sun May 10 2020 Jens Petersen - 2.0.8-1 - ghc-deps.sh: ignore internal libraries (#1822444) diff --git a/macros.ghc b/macros.ghc index db3050b..d0c7525 100644 --- a/macros.ghc +++ b/macros.ghc @@ -93,6 +93,9 @@ fi\ ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ %if %{with haddock}\ if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\ +echo %dir %{_docdir}/ghc >> %{basepkg}-doc.files\ +echo %dir %{ghc_html_dir} >> %{basepkg}-doc.files\ +echo %dir %{ghc_html_libraries_dir} >> %{basepkg}-doc.files\ echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ fi\ %endif\ From 31a55c3bc94a9805b7f2b88dfcfd21d873cdeb23 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 18 Jun 2020 10:56:14 +0800 Subject: [PATCH 443/514] cabal-tweak-*: output errors to stderr with scriptname --- cabal-tweak-dep-ver | 14 ++++++++------ cabal-tweak-drop-dep | 14 ++++++++------ cabal-tweak-flag | 20 ++++++++++---------- cabal-tweak-remove-upperbound | 14 ++++++++------ ghc-rpm-macros.spec | 5 ++++- 5 files changed, 38 insertions(+), 29 deletions(-) diff --git a/cabal-tweak-dep-ver b/cabal-tweak-dep-ver index 525b786..9b15068 100755 --- a/cabal-tweak-dep-ver +++ b/cabal-tweak-dep-ver @@ -2,11 +2,15 @@ set -e +x +function fail { + echo "$0: $1" >&2 + exit 1 +} + USAGE="Usage: $0 dep old new" if [ $# -ne 3 ]; then - echo "$USAGE" - exit 1 + fail "$USAGE" fi DEP=$1 @@ -16,15 +20,13 @@ NEW=$3 CABALFILE=$(ls *.cabal) if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then - echo "There needs to be one .cabal file in the current dir!" - exit 1 + fail "There needs to be one .cabal file in the current dir!" fi BREAK=[^[:alnum:]-] if ! grep -q "$BREAK$DEP$BREAK[^,]*$OLD" $CABALFILE; then - echo "$CABALFILE does not match: $DEP $OLD" - exit 1 + fail "$CABALFILE does not match: $DEP $OLD" fi if [ ! -f $CABALFILE.orig ]; then diff --git a/cabal-tweak-drop-dep b/cabal-tweak-drop-dep index 04d95bc..4a12bfb 100755 --- a/cabal-tweak-drop-dep +++ b/cabal-tweak-drop-dep @@ -2,11 +2,15 @@ set -e +x +function fail { + echo "$0: $1" >&2 + exit 1 +} + USAGE="Usage: $0 dep" if [ $# -ne 1 ]; then - echo "$USAGE" - exit 1 + fail "$USAGE" fi DEP=$1 @@ -14,8 +18,7 @@ DEP=$1 CABALFILE=$(ls *.cabal) if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then - echo "There needs to be one .cabal file in the current dir!" - exit 1 + fail "There needs to be one .cabal file in the current dir!" fi if [ ! -f $CABALFILE.orig ]; then @@ -23,8 +26,7 @@ if [ ! -f $CABALFILE.orig ]; then fi if grep "$DEP" $CABALFILE | sed -e "s/$DEP//" | grep -q -e "[A-Za-z]"; then - echo "$0: deleting whole $DEP lines not safe - try more precise pattern" - exit 1 + fail "$0: deleting whole $DEP lines not safe - try more precise pattern" fi sed -i$BACKUP -e "/$DEP/d" $CABALFILE diff --git a/cabal-tweak-flag b/cabal-tweak-flag index 2bf3a42..d1b566b 100755 --- a/cabal-tweak-flag +++ b/cabal-tweak-flag @@ -5,11 +5,15 @@ set -e +x +function fail { + echo "$0: $1" >&2 + exit 1 +} + USAGE="Usage: $0 FLAG [True|False]" if [ $# -ne 2 ]; then - echo "$USAGE" - exit 1 + fail "$USAGE" fi FLAG=$1 @@ -24,23 +28,19 @@ esac CABALFILE=$(ls *.cabal) if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then - echo "There needs to be one .cabal file in the current dir!" - exit 1 + fail "There needs to be one .cabal file in the current dir!" fi if ! grep -q -i "^flag *$FLAG" $CABALFILE; then - echo "$CABALFILE does not have flag $FLAG" - exit 1 + fail "$CABALFILE does not have flag $FLAG" fi if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default:"; then - echo "$CABALFILE: $FLAG flag might not have a default" - exit 1 + fail "$CABALFILE: $FLAG flag might not have a default" fi if ! grep -A3 -i "^flag *$FLAG" $CABALFILE | grep -q -i "default: *$OLD"; then - echo "$CABALFILE: $FLAG flag already defaults to $NEW" - exit 1 + fail "$CABALFILE: $FLAG flag already defaults to $NEW" fi if [ ! -f $CABALFILE.orig ]; then diff --git a/cabal-tweak-remove-upperbound b/cabal-tweak-remove-upperbound index abce557..1b5fc56 100755 --- a/cabal-tweak-remove-upperbound +++ b/cabal-tweak-remove-upperbound @@ -2,26 +2,28 @@ set -e +x +function fail { + echo "$0: $1" >&2 + exit 1 +} + USAGE="Usage: $0 dep" if [ $# -ne 1 ]; then - echo "$USAGE" - exit 1 + fail "$USAGE" fi DEP=$1 CABALFILE=$(ls *.cabal) if [ $(echo $CABALFILE | wc -w) -ne 1 ]; then - echo "There needs to be one .cabal file in the current dir!" - exit 1 + fail "There needs to be one .cabal file in the current dir!" fi BREAK=[^[:alnum:]-] if ! grep -q "$BREAK$DEP$BREAK[^,]*" $CABALFILE; then - echo "$CABALFILE does not match: $DEP" - exit 1 + fail "$CABALFILE does not match: $DEP" fi if [ ! -f $CABALFILE.orig ]; then diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8c6b59b..4be8031 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.9 +Version: 2.0.10 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -212,6 +212,9 @@ EOF %changelog +* Thu Jun 18 2020 Jens Petersen - 2.0.10-1 +- cabal-tweak script now output errors to stderr + * Thu Jun 4 2020 Jens Petersen - 2.0.9-1 - doc subpackages should own /usr/share/doc/ghc/, /usr/share/doc/ghc/html/, and /usr/share/doc/ghc/html/libraries/ (#1795526) From bc06ab77b40cc4524996cb7b6ca89d9d131bf51e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 24 Jun 2020 18:42:00 +0800 Subject: [PATCH 444/514] only add dynlib to filelist if found to allow for metapkg subpackage eg base-noprelude subpackage of pandoc --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4be8031..5838171 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.10 +Version: 2.0.11 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -212,6 +212,10 @@ EOF %changelog +* Wed Jun 24 2020 Jens Petersen - 2.0.11-1 +- only add dynlib to file list if it exists + (this allows for metapkg subpackages) + * Thu Jun 18 2020 Jens Petersen - 2.0.10-1 - cabal-tweak script now output errors to stderr diff --git a/macros.ghc b/macros.ghc index d0c7525..5cd24b9 100644 --- a/macros.ghc +++ b/macros.ghc @@ -81,7 +81,11 @@ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ done\ %endif\ for i in %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\ +if [ -x "$i" ]; then\ echo $i >> %{basepkg}.files\ +else\ +echo 'Warning: %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\ +fi\ done\ pkgdir="%{ghclibdir}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ From 338a2e11bc36952869ee72a897519cdc0aae8e9f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 13 Jul 2020 12:01:44 +0800 Subject: [PATCH 445/514] %ghc_lib_subpackage -m for meta subpackages --- ghc-rpm-macros.spec | 5 +++-- macros.ghc-extra | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5838171..6520ad1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -213,8 +213,9 @@ EOF %changelog * Wed Jun 24 2020 Jens Petersen - 2.0.11-1 -- only add dynlib to file list if it exists - (this allows for metapkg subpackages) +- handle meta subpackages: + - ghc_lib_subpackage -m + - only add dynlib to file-list if it exists * Thu Jun 18 2020 Jens Petersen - 2.0.10-1 - cabal-tweak script now output errors to stderr diff --git a/macros.ghc-extra b/macros.ghc-extra index 014b2de..54e9c75 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -1,8 +1,8 @@ # RPM Macros for packaging Haskell packages with multiple libs -*-rpm-spec-*- -# ghc_lib_subpackage [-c cdepslist] [-d] [-l licensetag] [-x] [name-version] +# ghc_lib_subpackage [-c cdepslist] [-d] [-l licensetag] [-m] [-x] [name-version] # for backward compat also support: ghc_lib_subpackage name version -%ghc_lib_subpackage(c:dl:x)\ +%ghc_lib_subpackage(c:dl:mx)\ %define pkgname %{?2:%{1}}%{!?2:%{lua:\ local pv = rpm.expand("%1")\ local _, _, name = string.find(pv, "^([%a%d-]+)-")\ @@ -15,6 +15,7 @@ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ +%if 0%{!-m:1}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ %{?1:Version: %{pkgver}}\ @@ -25,6 +26,7 @@ Url: http://hackage.haskell.org/package/%{pkgname}\ %description -n %{basepkg}\ This package provides the Haskell %{pkgname} library.\ \ +%endif\ %package -n %{basepkg}-devel\ Summary: Haskell %{pkgname} library development files\ %{?1:Version: %{pkgver}}\ @@ -32,7 +34,9 @@ Summary: Haskell %{pkgname} library development files\ Provides: %{basepkg}-static = %{pkgver}-%{release}\ Provides: %{basepkg}-static%{?_isa} = %{pkgver}-%{release}\ Requires: %{ghc_prefix}-compiler = %{ghc_version}%{?ghc_version_override:-%{release}}\ +%if 0%{!-m:1}\ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ +%endif\ %{?ghc_pkg_c_deps:Requires: %{ghc_pkg_c_deps}}\ %{-c:Requires: %{-c*}}\ %{?ghc_pkg_obsoletes:Obsoletes: %{ghc_pkg_obsoletes}}\ @@ -40,6 +44,7 @@ Requires: %{ghc_prefix}-%{pkgname}%{?_isa} = %{pkgver}-%{release}\ %description -n %{basepkg}-devel\ This package provides the Haskell %{pkgname} library development files.\ \ +%if 0%{!-m:1}\ %if %{with haddock}\ %package -n %{basepkg}-doc\ Summary: Haskell %{pkgname} library documentation\ @@ -65,7 +70,9 @@ This package provides the Haskell %{pkgname} profiling library.\ \ %files -n %{basepkg} -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}.files\ \ +%endif\ %files -n %{basepkg}-devel -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-devel.files\ +%if 0%{!-m:1}\ \ %if %{with haddock}\ %files -n %{basepkg}-doc -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-doc.files\ @@ -74,6 +81,7 @@ This package provides the Haskell %{pkgname} profiling library.\ %if %{with ghc_prof}\ %files -n %{basepkg}-prof -f %{!-d:%{pkgname}-%{pkgver}/}%{basepkg}-prof.files\ %endif\ +%endif\ %{nil} # ghc_libs_build [name-version] ... From 5beed1f49f4a22e002c1dbda820fce34e4be9520 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 13 Jul 2020 12:02:19 +0800 Subject: [PATCH 446/514] don't bother creating a source dir --- ghc-rpm-macros.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6520ad1..3ed351b 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -150,12 +150,11 @@ This package can safely be removed. %prep -%setup -c -T -cp %{SOURCE1} %{SOURCE2} . +%{nil} %build -echo no build stage needed +echo no build stage %install From 11c86f82ecb4eb2111261db802a2736c38021657 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 15 Jul 2020 10:48:24 +0800 Subject: [PATCH 447/514] revert last change "don't bother creating a source dir" it break koji (mock) build need to move to tarball releases anyway --- ghc-rpm-macros.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3ed351b..7d48bca 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -150,7 +150,8 @@ This package can safely be removed. %prep -%{nil} +%setup -c -T +cp %{SOURCE1} %{SOURCE2} . %build From 2c8bb831fa90373e3b350828c51a29c102865c91 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 21 Jul 2020 18:15:30 +0800 Subject: [PATCH 448/514] obsoletes for ghc-gtksourceview2 (and drop ghc-cabal-helper) --- ghc-rpm-macros.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7d48bca..61f3c89 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.11 +Version: 2.0.12 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -137,11 +137,13 @@ Obsoletes: ghc-conduit-combinators < 1.3.1 Obsoletes: ghc-conduit-combinators-devel < 1.3.1 %endif %if 0%{?fedora} >= 32 -Obsoletes: ghc-cabal-helper < 0.8.2.0-5, ghc-cabal-helper-devel < 0.8.2.0-5, ghc-cabal-helper-prof < 0.8.2.0-5 Obsoletes: ghc-cabal-plan < 0.4.0.0-5, ghc-cabal-plan-devel < 0.4.0.0-5, ghc-cabal-plan-prof < 0.4.0.0-5 Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-prof < 2.6.5-5 Obsoletes: ghc-here < 1.2.13-17, ghc-here-devel < 1.2.13-17, ghc-here-prof < 1.2.13-17 %endif +%if 0%{?fedora} >= 33 +Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.13.3.1-14, ghc-gtksourceview2-prof < 0.13.3.1-14 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -212,6 +214,9 @@ EOF %changelog +* Tue Jul 21 2020 Jens Petersen - 2.0.12-1 +- obsoletes for ghc-gtksourceview2 + * Wed Jun 24 2020 Jens Petersen - 2.0.11-1 - handle meta subpackages: - ghc_lib_subpackage -m From 2e40c5d9799ada65c420c39886287f9855e2100a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 21 Jul 2020 18:16:30 +0800 Subject: [PATCH 449/514] make doc subpackages noarch for subpackaging --- ghc-rpm-macros.spec | 1 + macros.ghc-extra | 1 + 2 files changed, 2 insertions(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 61f3c89..a98170e 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -215,6 +215,7 @@ EOF %changelog * Tue Jul 21 2020 Jens Petersen - 2.0.12-1 +- make doc packages noarch for subpackaging - obsoletes for ghc-gtksourceview2 * Wed Jun 24 2020 Jens Petersen - 2.0.11-1 diff --git a/macros.ghc-extra b/macros.ghc-extra index 54e9c75..345f93c 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -50,6 +50,7 @@ This package provides the Haskell %{pkgname} library development files.\ Summary: Haskell %{pkgname} library documentation\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ +BuildArch: noarch\ Supplements: (%{basepkg}-devel and ghc-doc)\ \ %description -n %{basepkg}-doc\ From 0dc8c9a01a1d13455f1a67f3b437bf5baa5f0f71 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 22 Jul 2020 12:32:28 +0800 Subject: [PATCH 450/514] obsoletes for easytest (hledger-lib), EdisonAPI & EdisonCore (Agda) --- ghc-rpm-macros.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a98170e..1c1b643 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -142,6 +142,9 @@ Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-pro Obsoletes: ghc-here < 1.2.13-17, ghc-here-devel < 1.2.13-17, ghc-here-prof < 1.2.13-17 %endif %if 0%{?fedora} >= 33 +Obsoletes: ghc-easytest < 0.2.1-4, ghc-easytest-devel < 0.2.1-4, ghc-easytest-prof < 0.2.1-4, +Obsoletes: ghc-EdisonAPI < 1.3.1-23, ghc-EdisonAPI-devel < 1.3.1-23, ghc-EdisonAPI-prof < 1.3.1-23 +Obsoletes: ghc-EdisonCore < 1.3.2.1-23, ghc-EdisonCore-devel < 1.3.2.1-23, ghc-EdisonCore-prof < 1.3.2.1-23 Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.13.3.1-14, ghc-gtksourceview2-prof < 0.13.3.1-14 %endif @@ -214,6 +217,9 @@ EOF %changelog +* Wed Jul 22 2020 Jens Petersen - 2.0.12-2 +- obsoletes for ghc-EdisonAPI, ghc-EdisonCore, ghc-easytest + * Tue Jul 21 2020 Jens Petersen - 2.0.12-1 - make doc packages noarch for subpackaging - obsoletes for ghc-gtksourceview2 From 177eee41fba03117b8f949f9ef70bc81f0f456c3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 27 Jul 2020 19:36:16 +0000 Subject: [PATCH 451/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1c1b643..8ed8ba6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -217,6 +217,9 @@ EOF %changelog +* Mon Jul 27 2020 Fedora Release Engineering - 2.0.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 22 2020 Jens Petersen - 2.0.12-2 - obsoletes for ghc-EdisonAPI, ghc-EdisonCore, ghc-easytest From 4b53d0e94908111f9c293704e632deed2d484e09 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 4 Aug 2020 01:13:50 +0800 Subject: [PATCH 452/514] disable LTO on (unregisterised) s390x (#1863601) --- ghc-rpm-macros.spec | 8 ++++++-- macros.ghc | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8ed8ba6..46cb7cb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.12 -Release: 3%{?dist} +Version: 2.0.13 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -217,6 +217,10 @@ EOF %changelog +* Tue Aug 4 2020 Jens Petersen - 2.0.13-1 +- disable LTO on (unregisterised) s390x (#1863601) + to prevent linker warning flood for prof libraries + * Mon Jul 27 2020 Fedora Release Engineering - 2.0.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index 5cd24b9..aed8d80 100644 --- a/macros.ghc +++ b/macros.ghc @@ -13,6 +13,7 @@ LANG=C.utf8\ %ghc_set_gcc_flags\ # -Wunused-label is extremely noisy\ %ifarch s390x\ +%define _lto_cflags %{nil}\ CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ %else\ CFLAGS="${CFLAGS:-%optflags}"\ From d1ee98d63576727f4a9366aed26944a5aa207f5c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 26 Aug 2020 09:23:57 +0800 Subject: [PATCH 453/514] obsolete ghc-iwlib (xmobar) --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 46cb7cb..050cb40 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -147,6 +147,7 @@ Obsoletes: ghc-EdisonAPI < 1.3.1-23, ghc-EdisonAPI-devel < 1.3.1-23, ghc-Ed Obsoletes: ghc-EdisonCore < 1.3.2.1-23, ghc-EdisonCore-devel < 1.3.2.1-23, ghc-EdisonCore-prof < 1.3.2.1-23 Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.13.3.1-14, ghc-gtksourceview2-prof < 0.13.3.1-14 %endif +Obsoletes: ghc-iwlib < 0.1.0-16, ghc-iwlib-devel < 0.1.0-16, ghc-iwlib-prof < 0.1.0-16 %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -217,6 +218,9 @@ EOF %changelog +* Wed Aug 26 2020 Jens Petersen - 2.0.13-2 +- obsolete ghc-iwlib (xmobar) + * Tue Aug 4 2020 Jens Petersen - 2.0.13-1 - disable LTO on (unregisterised) s390x (#1863601) to prevent linker warning flood for prof libraries From 78bda0dce526795284ef1644e7d0dd6e0b3511dc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 29 Aug 2020 15:37:00 +0800 Subject: [PATCH 454/514] ghc-deps.sh: be careful when filtering out rts (#1873687) --- ghc-deps.sh | 4 ++-- ghc-rpm-macros.spec | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 3a4ecb4..265614e 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -27,7 +27,7 @@ for i in $files; do # exclude rts.conf $pkgconfdir/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($GHC_PKG field $name $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + ids=$($GHC_PKG field $name $field | sed -e "s/ rts\b//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;; @@ -38,7 +38,7 @@ for i in $files; do ;; */libHS*_p.a) pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/rts//" -e "s/bin-package-db-[^ ]\+//") + ids=$($GHC_PKG field $pkgver $field | sed -e "s/ rts\b//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 050cb40..22ae612 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.13 -Release: 2%{?dist} +Version: 2.0.14 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -218,6 +218,9 @@ EOF %changelog +* Sat Aug 29 2020 Jens Petersen - 2.0.14-1 +- ghc-deps.sh: be careful when filtering out rts (#1873687) + * Wed Aug 26 2020 Jens Petersen - 2.0.13-2 - obsolete ghc-iwlib (xmobar) From 523769efa934f78515331f7cd819d1669698ed73 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 07:40:30 +0000 Subject: [PATCH 455/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 22ae612..91a7362 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 2.0.14 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -218,6 +218,9 @@ EOF %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 2.0.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Aug 29 2020 Jens Petersen - 2.0.14-1 - ghc-deps.sh: be careful when filtering out rts (#1873687) From 34a277046df013e4200e1bb88e716ef211974bd4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 29 Jan 2021 23:42:16 +0800 Subject: [PATCH 456/514] extra: add %ghc_subpackages_list can be used by ghc etc for metapkg to depend on all subpackages --- macros.ghc-extra | 1 + 1 file changed, 1 insertion(+) diff --git a/macros.ghc-extra b/macros.ghc-extra index 345f93c..640a641 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -12,6 +12,7 @@ print(name)\ local pv = rpm.expand("%1")\ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ }}\ +%global ghc_subpackages_list %{?ghc_subpackages_list} %{pkgname}-%{pkgver}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ %define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ From 8ed58df419491ead2b8a23fa9c9985edbd935d8c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 30 Jan 2021 00:27:39 +0800 Subject: [PATCH 457/514] %ghc_fix_doc_perms to workaround Cabal extra-source-files perm issue --- macros.ghc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/macros.ghc b/macros.ghc index aed8d80..c15d449 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,14 +128,23 @@ install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf. fi\ %{nil} +# workaround Cabal bug causing executable extra-source-files +%ghc_fix_doc_perms\ +for f in $(ls | grep -i -e "^\(ANNOUNCE\|AUTHORS\|CHANGELOG\|CHANGES\|CONTRIBUTORS\|README\|TODO\)"); do\ +if [ -x $f ]; then chmod a-x $f; fi\ +done\ +%{nil} + # ghc_bin_build %ghc_bin_build\ +%ghc_fix_doc_perms\ %undefine _enable_debug_packages\ %cabal_configure\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ +%ghc_fix_doc_perms\ %undefine _enable_debug_packages\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ From cc769c3d44fd1afa46ccd77fd8ebc03d6360eab0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 16 Feb 2021 20:57:30 +0800 Subject: [PATCH 458/514] 2.0.15 --- ghc-rpm-macros.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 91a7362..8d7285c 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,8 +10,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.14 -Release: 2%{?dist} +Version: 2.0.15 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -218,6 +218,10 @@ EOF %changelog +* Sat Jan 30 2021 Jens Petersen - 2.0.15-1 +- add ghc_fix_doc_perms and use it in ghc_bin_build and ghc_lib_build +- ghc_lib_subpackage: define ghc_subpackages_list + * Tue Jan 26 2021 Fedora Release Engineering - 2.0.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 2e3afbabafe7ea9fc70c4a741f90b46dedc381ee Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 24 Mar 2021 00:56:56 +0800 Subject: [PATCH 459/514] drop obsoletes from older than f29 --- ghc-rpm-macros.spec | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 8d7285c..28fefa5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -59,49 +59,6 @@ for example in ghc and haskell-platform. # this is a last resort when there is no such appropriate package %package -n ghc-obsoletes Summary: Dummy package to obsolete deprecated Haskell packages -%if 0%{?fedora} >= 22 -# these 3 no longer build with ghc-7.8 -Obsoletes: ghc-ForSyDe < 3.1.2, ghc-ForSyDe-devel < 3.1.2 -Obsoletes: ghc-parameterized-data < 0.1.6 -Obsoletes: ghc-parameterized-data-devel < 0.1.6 -Obsoletes: ghc-type-level < 0.2.5, ghc-type-level-devel < 0.2.5 -Obsoletes: leksah < 0.14, ghc-leksah < 0.14, ghc-leksah-devel < 0.14 -# dropped from HP 2014.2 -Obsoletes: ghc-cgi < 3001.1.8, ghc-cgi-devel < 3001.1.8 -%endif -%if 0%{?fedora} >= 24 -Obsoletes: ghc-citeproc-hs < 0.3.10-3, ghc-citeproc-hs-devel < 0.3.10-3 -Obsoletes: ghc-hakyll < 4.5.4.0-6, ghc-hakyll-devel < 4.5.4.0-6 -Obsoletes: ghc-leksah-server < 0.14.3.1-4, ghc-leksah-server-devel < 0.14.3.1-4 -%endif -%if 0%{?fedora} >= 25 -Obsoletes: ghc-cmdtheline <= 0.2.3, ghc-cmdtheline-devel <= 0.2.3 -Obsoletes: ghc-concrete-typerep <= 0.1.0.2, ghc-concrete-typerep-devel <= 0.1.0.2 -Obsoletes: ghc-glade <= 0.12.5.0, ghc-glade-devel <= 0.12.5.0 -Obsoletes: bluetile <= 0.6, bluetile-core <= 0.6 -Obsoletes: ghc-lambdabot-utils <= 4.2.2, ghc-lambdabot-utils-devel <= 4.2.2 -Obsoletes: haddock <= 2.14.3, ghc-haddock <= 2.14.3, ghc-haddock-devel <= 2.14.3 -Obsoletes: ghc-monad-unify <= 0.2.2, ghc-monad-unify-devel <= 0.2.2 -Obsoletes: idris <= 0.9.9.1 -Obsoletes: ghc-editline < 0.2.1.1-13, ghc-editline-devel < 0.2.1.1-13 -Obsoletes: ghc-hashed-storage < 0.5.11-4, ghc-hashed-storage-devel < 0.5.11-4 -Obsoletes: ghc-nats <= 0.2, ghc-nats-devel <= 0.2 -Obsoletes: ghc-primes <= 0.2.1.0-11, ghc-primes-devel <= 0.2.1.0-11 -%endif -%if 0%{?fedora} >= 26 -Obsoletes: ghc-geniplate <= 0.6.0.5, ghc-geniplate-devel <= 0.6.0.5 -Obsoletes: ghc-sized-types <= 0.3.4.0, ghc-sized-types-devel <= 0.3.4.0 -# dropped from HP 8.0.2 -Obsoletes: ghc-cgi < 3001.2.2.2-5, ghc-cgi-devel < 3001.2.2.2-5 -Obsoletes: ghc-multipart < 0.1.2-5, ghc-multipart-devel < 0.1.2-5 -%endif -%if 0%{?fedora} >= 27 -Obsoletes: ghc-webkit <= 0.14.2.1, ghc-webkit-devel <= 0.14.2.1 -%endif -%if 0%{?fedora} >= 28 -Obsoletes: ghc-fail < 4.9.0.0-2, ghc-fail-devel < 4.9.0.0-2 -Obsoletes: ghc-ltk < 0.16, ghc-ltk-devel < 0.16 -%endif %if 0%{?fedora} >= 29 Obsoletes: ghc-content-store < 0.2.1-3, ghc-content-store-devel < 0.2.1-3 Obsoletes: ghc-bdcs < 0.6.1-3, ghc-bdcs-devel < 0.6.1-3 @@ -212,7 +169,7 @@ EOF %{macros_dir}/macros.ghc-extra -%if 0%{?fedora} >= 22 +%if 0%{?fedora} >= 29 %files -n ghc-obsoletes %endif From 708a38ba61be8ce509d423ba169b122d256eb6ef Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 24 Mar 2021 01:25:48 +0800 Subject: [PATCH 460/514] add ghc-filesystem subpkg for ghc doc dirs --- ghc-rpm-macros.spec | 23 ++++++++++++++++++++++- macros.ghc | 3 --- macros.ghc-extra | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 28fefa5..4accfe5 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.0.15 +Version: 2.1.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -55,6 +55,14 @@ Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. +%package -n ghc-filesystem +Summary: Shared directories for Haskell documentation + +%description -n ghc-filesystem +This package provides some common directories used for +Haskell libraries documentation. + + # ideally packages should be obsoleted by some relevant package # this is a last resort when there is no such appropriate package %package -n ghc-obsoletes @@ -140,6 +148,8 @@ install -p -D -m 0755 %{SOURCE11} %{buildroot}/%{_bindir}/cabal-tweak-drop-dep install -p -D -m 0755 %{SOURCE12} %{buildroot}/%{_bindir}/cabal-tweak-remove-upperbound install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper +mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries + %if 0%{?rhel} && 0%{?rhel} < 7 cat >> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh <= 29 %files -n ghc-obsoletes @@ -175,6 +192,10 @@ EOF %changelog +* Wed Mar 24 2021 Jens Petersen - 2.1.0-1 +- add ghc-filesystem subpackage to own /usr/share/doc/ghc/{,html/{,libraries/}} + and subdirs (#1926757) + * Sat Jan 30 2021 Jens Petersen - 2.0.15-1 - add ghc_fix_doc_perms and use it in ghc_bin_build and ghc_lib_build - ghc_lib_subpackage: define ghc_subpackages_list diff --git a/macros.ghc b/macros.ghc index c15d449..16c0456 100644 --- a/macros.ghc +++ b/macros.ghc @@ -98,9 +98,6 @@ fi\ ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ %if %{with haddock}\ if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\ -echo %dir %{_docdir}/ghc >> %{basepkg}-doc.files\ -echo %dir %{ghc_html_dir} >> %{basepkg}-doc.files\ -echo %dir %{ghc_html_libraries_dir} >> %{basepkg}-doc.files\ echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ fi\ %endif\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 640a641..cea1d27 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -52,6 +52,7 @@ Summary: Haskell %{pkgname} library documentation\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ BuildArch: noarch\ +Requires: ghc-filesystem\ Supplements: (%{basepkg}-devel and ghc-doc)\ \ %description -n %{basepkg}-doc\ From 979c94a42ebc1a740458de098b1c42e106548d18 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 8 Apr 2021 12:14:49 +0800 Subject: [PATCH 461/514] update url to dist-git --- ghc-rpm-macros.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4accfe5..9a8b2ad 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -15,8 +15,8 @@ Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ -URL: https://github.com/fedora-haskell/ghc-rpm-macros # Currently source is only in pkg git but tarballs could be made if it helps +URL: https://src.fedoraproject.org/rpms/ghc-rpm-macros/ Source0: macros.ghc Source1: COPYING Source2: AUTHORS From ee20904695a414214f5f479f13963167e01ff9e0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 8 Apr 2021 12:17:36 +0800 Subject: [PATCH 462/514] .spec: s!%{buildroot}/!%{buildroot}! --- ghc-rpm-macros.spec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9a8b2ad..240d5bc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -130,28 +130,28 @@ echo no build stage %install -install -p -D -m 0644 %{SOURCE0} %{buildroot}/%{macros_dir}/macros.ghc -install -p -D -m 0644 %{SOURCE6} %{buildroot}/%{macros_dir}/macros.ghc-extra -install -p -D -m 0644 %{SOURCE9} %{buildroot}/%{macros_dir}/macros.ghc-os +install -p -D -m 0644 %{SOURCE0} %{buildroot}%{macros_dir}/macros.ghc +install -p -D -m 0644 %{SOURCE6} %{buildroot}%{macros_dir}/macros.ghc-extra +install -p -D -m 0644 %{SOURCE9} %{buildroot}%{macros_dir}/macros.ghc-os -install -p -D -m 0755 %{SOURCE3} %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh +install -p -D -m 0755 %{SOURCE3} %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh %if 0%{?fedora} || 0%{?rhel} >= 7 -install -p -D -m 0644 %{SOURCE7} %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr +install -p -D -m 0644 %{SOURCE7} %{buildroot}%{_prefix}/lib/rpm/fileattrs/ghc.attr %endif -install -p -D -m 0644 %{SOURCE10} %{buildroot}/%{_datadir}/%{name}/Setup.hs +install -p -D -m 0644 %{SOURCE10} %{buildroot}%{_datadir}/%{name}/Setup.hs -install -p -D -m 0755 %{SOURCE4} %{buildroot}/%{_bindir}/cabal-tweak-dep-ver -install -p -D -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/cabal-tweak-flag -install -p -D -m 0755 %{SOURCE11} %{buildroot}/%{_bindir}/cabal-tweak-drop-dep -install -p -D -m 0755 %{SOURCE12} %{buildroot}/%{_bindir}/cabal-tweak-remove-upperbound -install -p -D -m 0755 %{SOURCE8} %{buildroot}/%{_prefix}/lib/rpm/ghc-pkg-wrapper +install -p -D -m 0755 %{SOURCE4} %{buildroot}%{_bindir}/cabal-tweak-dep-ver +install -p -D -m 0755 %{SOURCE5} %{buildroot}%{_bindir}/cabal-tweak-flag +install -p -D -m 0755 %{SOURCE11} %{buildroot}%{_bindir}/cabal-tweak-drop-dep +install -p -D -m 0755 %{SOURCE12} %{buildroot}%{_bindir}/cabal-tweak-remove-upperbound +install -p -D -m 0755 %{SOURCE8} %{buildroot}%{_prefix}/lib/rpm/ghc-pkg-wrapper mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries %if 0%{?rhel} && 0%{?rhel} < 7 -cat >> %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh <> %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh < Date: Thu, 8 Apr 2021 12:18:13 +0800 Subject: [PATCH 463/514] make this package noarch for all OS versions (drop lower bounds) --- ghc-rpm-macros.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 240d5bc..d9b577a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -36,9 +36,7 @@ Requires: ghc-compiler %if %{undefined without_hscolour} Requires: hscolour %endif -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildArch: noarch -%endif %description A set of macros for building GHC packages following the Haskell Guidelines From 63e6e932d7b50b2960534738bb51a6d16d2326a0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 8 Apr 2021 12:22:24 +0800 Subject: [PATCH 464/514] %ghc_fix_doc_perms: quote backslashes in the regexp --- macros.ghc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 16c0456..bd8c190 100644 --- a/macros.ghc +++ b/macros.ghc @@ -127,7 +127,7 @@ fi\ # workaround Cabal bug causing executable extra-source-files %ghc_fix_doc_perms\ -for f in $(ls | grep -i -e "^\(ANNOUNCE\|AUTHORS\|CHANGELOG\|CHANGES\|CONTRIBUTORS\|README\|TODO\)"); do\ +for f in $(ls | grep -i -e '^\\(ANNOUNCE\\|AUTHORS\\|CHANGELOG\\|CHANGES\\|CONTRIBUTORS\\|README\\|TODO\\)'); do\ if [ -x $f ]; then chmod a-x $f; fi\ done\ %{nil} From d2347fa858a0cb3f6740c875050c70ddbe40bfc3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 8 Apr 2021 12:26:45 +0800 Subject: [PATCH 465/514] changelog for 2.1.0-1 --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d9b577a..1115f01 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -192,7 +192,10 @@ EOF %changelog * Wed Mar 24 2021 Jens Petersen - 2.1.0-1 - add ghc-filesystem subpackage to own /usr/share/doc/ghc/{,html/{,libraries/}} - and subdirs (#1926757) + (#1926757) +- drop obsoletes from before f29 +- update url +- fix ghc_fix_doc_perms grep regexp quoting * Sat Jan 30 2021 Jens Petersen - 2.0.15-1 - add ghc_fix_doc_perms and use it in ghc_bin_build and ghc_lib_build From 9e31d7dd7dd613a30d180b0da0a4e0fe86d0bac6 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 7 Jun 2021 23:24:42 +0800 Subject: [PATCH 466/514] change %ghc_fix_rpath %{subpkgs} to %ghc_fix_rpaths for all executables needed for https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild and rpminspect runpath DT_RUNPATH errors --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 39 +++++++-------------------------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1115f01..ab9c591 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.1.0 +Version: 2.2.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -190,6 +190,10 @@ EOF %changelog +* Mon Jun 7 2021 Jens Petersen - 2.2.0-1 +- ghc_fix_rpaths macro deletes all RPATHs, replacing ghc_fix_rpath(), for + https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild + * Wed Mar 24 2021 Jens Petersen - 2.1.0-1 - add ghc-filesystem subpackage to own /usr/share/doc/ghc/{,html/{,libraries/}} (#1926757) diff --git a/macros.ghc b/macros.ghc index bd8c190..8ecc585 100644 --- a/macros.ghc +++ b/macros.ghc @@ -167,7 +167,7 @@ fi\ %{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ -%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ +%ghc_fix_rpaths\ %{nil} # ghc_lib_install [name] [version] @@ -178,47 +178,22 @@ fi\ %cabal_install\ %cabal_pkg_conf %{?1} %{?2}\ %ghc_gen_filelists %{?1} %{?2}\ -%{?ghc_subpackaging:%ghc_fix_rpath %{subpkgs}}\ +%ghc_fix_rpaths\ %{nil} -# ghc_fix_rpath lib-ver ... -%ghc_fix_rpath()\ -%if %{undefined disable_ghc_fix_rpath}\ +# ghc_fix_rpaths +%ghc_fix_rpaths\ +%if %{undefined disable_ghc_fix_rpaths}\ +echo "running ghc_fix_rpaths:"\ if ! type chrpath > /dev/null; then exit 1; fi\ -echo "ghc_fix_rpath %*"\ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ -for lib in %*; do\ if [ -x "$i" ]; then\ - rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ - case $rpath in\ - *$PWD/$lib/dist/build*)\ - case %{ghc_version} in\ - 7.10.*)\ - pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ - 8.0)\ - pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ - *)\ - syspath="" ;;\ - esac\ - newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\ - if [ "$newrpath" = "%{_libdir}" ]; then\ - chrpath -d $i\ - else\ - chrpath -r $newrpath $i\ - fi\ - ;;\ - %{_libdir})\ - chrpath -d $i\ - ;;\ - esac\ + chrpath -d $i\ else\ echo "%%ghc_fix_rpath: no $i executable"\ exit 1\ fi\ done\ -done\ %endif # deprecated for f31 From cc8736d28de50feff820aef04e493db6990e0201 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 7 Jun 2021 23:34:23 +0800 Subject: [PATCH 467/514] rename %ghc_fix_rpaths to %ghc_delete_rpaths --- ghc-rpm-macros.spec | 2 +- macros.ghc | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ab9c591..25e5491 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -191,7 +191,7 @@ EOF %changelog * Mon Jun 7 2021 Jens Petersen - 2.2.0-1 -- ghc_fix_rpaths macro deletes all RPATHs, replacing ghc_fix_rpath(), for +- ghc_delete_rpaths macro replaces ghc_fix_rpath(), needed for https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild * Wed Mar 24 2021 Jens Petersen - 2.1.0-1 diff --git a/macros.ghc b/macros.ghc index 8ecc585..1e52175 100644 --- a/macros.ghc +++ b/macros.ghc @@ -167,7 +167,7 @@ fi\ %{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ %{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ -%ghc_fix_rpaths\ +%ghc_delete_rpaths\ %{nil} # ghc_lib_install [name] [version] @@ -178,19 +178,19 @@ fi\ %cabal_install\ %cabal_pkg_conf %{?1} %{?2}\ %ghc_gen_filelists %{?1} %{?2}\ -%ghc_fix_rpaths\ +%ghc_delete_rpaths\ %{nil} -# ghc_fix_rpaths -%ghc_fix_rpaths\ -%if %{undefined disable_ghc_fix_rpaths}\ -echo "running ghc_fix_rpaths:"\ +# ghc_delete_rpaths +%ghc_delete_rpaths\ +%if %{undefined disable_ghc_delete_rpaths}\ +echo "running ghc_delete_rpaths:"\ if ! type chrpath > /dev/null; then exit 1; fi\ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ if [ -x "$i" ]; then\ chrpath -d $i\ else\ - echo "%%ghc_fix_rpath: no $i executable"\ + echo "%%ghc_delete_rpath: no $i executable"\ exit 1\ fi\ done\ From a1c1188a5201ac4fe48755d8bc9cd6eb41e6e57e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 8 Jun 2021 00:05:38 +0800 Subject: [PATCH 468/514] ghc-rpm-macros needs to require chrpath now --- ghc-rpm-macros.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 25e5491..7f4e2c2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.2.0 +Version: 2.2.1 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -33,6 +33,7 @@ Source12: cabal-tweak-remove-upperbound Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler +Requires: chrpath %if %{undefined without_hscolour} Requires: hscolour %endif @@ -46,7 +47,6 @@ of the Fedora Haskell SIG. %package extra Summary: Extra RPM macros for building Haskell library subpackages Requires: %{name} = %{version}-%{release} -Requires: chrpath %description extra Extra macros used for subpackaging of Haskell libraries, @@ -190,6 +190,9 @@ EOF %changelog +* Tue Jun 8 2021 Jens Petersen - 2.2.1-1 +- ghc-rpm-macros needs to require chrpath now instead of ghc-rpm-macros-extra + * Mon Jun 7 2021 Jens Petersen - 2.2.0-1 - ghc_delete_rpaths macro replaces ghc_fix_rpath(), needed for https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild From 192fd2f9c323b9ec2b4e0092bfb65a6f79343e61 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 8 Jun 2021 21:20:51 +0800 Subject: [PATCH 469/514] restore %ghc_fix_rpath for compat and drop it from %ghc_libs_install --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 40 ++++++++++++++++++++++++++++++++++++++++ macros.ghc-extra | 1 - 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7f4e2c2..197ca22 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 2.2.1 +Version: 2.2.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -190,6 +190,10 @@ EOF %changelog +* Tue Jun 8 2021 Jens Petersen - 2.2.2-1 +- restore ghc_fix_rpath for now for backward compatibility + and drop it from ghc_libs_install + * Tue Jun 8 2021 Jens Petersen - 2.2.1-1 - ghc-rpm-macros needs to require chrpath now instead of ghc-rpm-macros-extra diff --git a/macros.ghc b/macros.ghc index 1e52175..9736686 100644 --- a/macros.ghc +++ b/macros.ghc @@ -196,6 +196,46 @@ for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q done\ %endif +# deprecated by ghc_delete_rpaths in F35 +%ghc_fix_rpath()\ +%if %{undefined disable_ghc_fix_rpath}\ +if ! type chrpath > /dev/null; then exit 1; fi\ +echo "ghc_fix_rpath %*"\ +for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\ +for lib in %*; do\ + if [ -x "$i" ]; then\ + rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\ + case $rpath in\ + *$PWD/$lib/dist/build*)\ + case %{ghc_version} in\ + 7.10.*)\ + pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ + 8.0)\ + pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ + *)\ + syspath="" ;;\ + esac\ + newrpath=$(echo $rpath | sed -e "s@$PWD/$lib/dist/build@${syspath}@g" -e "s/::/:/" -e "s/^://" -e "s/:$//")\ + if [ "$newrpath" = "%{_libdir}" ]; then\ + chrpath -d $i\ + else\ + chrpath -r $newrpath $i\ + fi\ + ;;\ + %{_libdir})\ + chrpath -d $i\ + ;;\ + esac\ + else\ + echo "%%ghc_fix_rpath: no $i executable"\ + exit 1\ + fi\ +done\ +done\ +%endif + # deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : diff --git a/macros.ghc-extra b/macros.ghc-extra index cea1d27..e992ed5 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -119,5 +119,4 @@ ver=$(echo $i | sed -e "s/.*-\\(.*\\)/\\1/")\ %ghc_lib_install $name $ver\ cd ..\ done\ -%ghc_fix_rpath $args\ %{nil} From ce5d10cf61a65a9335b5004f54ebebc4bf9fc2a7 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 17 Jun 2021 18:28:02 +0800 Subject: [PATCH 470/514] haddock has not used hscolour for a long time --- ghc-rpm-macros.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 197ca22..56fb3f7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,12 +6,9 @@ %global macros_dir %{_sysconfdir}/rpm %endif -# uncomment to bootstrap without hscolour -#%%global without_hscolour 1 - Name: ghc-rpm-macros Version: 2.2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -34,9 +31,6 @@ Requires: redhat-rpm-config # for ghc_version Requires: ghc-compiler Requires: chrpath -%if %{undefined without_hscolour} -Requires: hscolour -%endif BuildArch: noarch %description @@ -190,6 +184,9 @@ EOF %changelog +* Thu Jun 17 2021 Jens Petersen - 2.2.2-2 +- haddock has not used hscolour for a long time + * Tue Jun 8 2021 Jens Petersen - 2.2.2-1 - restore ghc_fix_rpath for now for backward compatibility and drop it from ghc_libs_install From db0d821b08507dcb22a2039741f2ffe9a45fea71 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 10 Jul 2021 01:37:03 +0800 Subject: [PATCH 471/514] fix ghc_fix_doc_perms only to touch files not dirs testcase: MissingH announcements/ --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 56fb3f7..1d7e10f 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,8 +7,8 @@ %endif Name: ghc-rpm-macros -Version: 2.2.2 -Release: 2%{?dist} +Version: 2.2.3 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -184,6 +184,9 @@ EOF %changelog +* Sat Jul 10 2021 Jens Petersen - 2.2.3-1 +- fix ghc_fix_doc_perms only to touch files not dirs + * Thu Jun 17 2021 Jens Petersen - 2.2.2-2 - haddock has not used hscolour for a long time diff --git a/macros.ghc b/macros.ghc index 9736686..497168c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,7 +128,7 @@ fi\ # workaround Cabal bug causing executable extra-source-files %ghc_fix_doc_perms\ for f in $(ls | grep -i -e '^\\(ANNOUNCE\\|AUTHORS\\|CHANGELOG\\|CHANGES\\|CONTRIBUTORS\\|README\\|TODO\\)'); do\ -if [ -x $f ]; then chmod a-x $f; fi\ +if [ -f $f -a -x $f ]; then chmod a-x $f; fi\ done\ %{nil} From 6684a6e9bb146100b4c98038e0c648c4f66e9845 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 14 Jul 2021 09:03:26 +0800 Subject: [PATCH 472/514] drop old obsoletes haskell-platform GL libs and cabal-plan --- ghc-rpm-macros.spec | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1d7e10f..2fcd6b6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.2.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -70,15 +70,6 @@ Obsoletes: ghc-hoopl < 3.10.2.2-74, ghc-hoopl-devel < 3.10.2.2-74 # language-ecmascript Obsoletes: ghc-tagshare < 0.0-10, ghc-tagshare-devel < 0.0-10 Obsoletes: ghc-testing-feat < 0.4.0.3-10, ghc-testing-feat-devel < 0.4.0.3-10 -# haskell-platform -Obsoletes : ghc-fixed < 0.2.1.1-16, ghc-fixed-devel < 0.2.1.1-16 -Obsoletes : ghc-GLURaw < 2.0.0.4, ghc-GLURaw-devel < 2.0.0.4 -Obsoletes : ghc-GLUT < 2.7.0.13, ghc-GLUT-devel < 2.7.0.13 -Obsoletes : ghc-half < 0.3, ghc-half-devel < 0.3 -Obsoletes : ghc-haskell-src < 1.0.3.0, ghc-haskell-src-devel < 1.0.3.0 -Obsoletes : ghc-ObjectName < 1.1.0.1-16, ghc-ObjectName-devel < 1.1.0.1-16 -Obsoletes : ghc-OpenGL < 3.0.2.1, ghc-OpenGL-devel < 3.0.2.1 -Obsoletes : ghc-OpenGLRaw < 3.2.6.0, ghc-OpenGLRaw-devel < 3.2.6.0 # enumerator Obsoletes: ghc-enumerator < 0.4.20-12, ghc-enumerator-devel < 0.4.20-12 Obsoletes: ghc-attoparsec-enumerator < 0.3.4-10, ghc-attoparsec-enumerator-devel < 0.3.4-10 @@ -94,7 +85,6 @@ Obsoletes: ghc-conduit-combinators < 1.3.1 Obsoletes: ghc-conduit-combinators-devel < 1.3.1 %endif %if 0%{?fedora} >= 32 -Obsoletes: ghc-cabal-plan < 0.4.0.0-5, ghc-cabal-plan-devel < 0.4.0.0-5, ghc-cabal-plan-prof < 0.4.0.0-5 Obsoletes: ghc-derive < 2.6.5-5, ghc-derive-devel < 2.6.5-5, ghc-derive-prof < 2.6.5-5 Obsoletes: ghc-here < 1.2.13-17, ghc-here-devel < 1.2.13-17, ghc-here-prof < 1.2.13-17 %endif @@ -184,6 +174,10 @@ EOF %changelog +* Wed Jul 14 2021 Jens Petersen - 2.2.3-2 +- drop obsoletes for haskell-platform GL graphics libraries + which have been packaged and cabal-plan + * Sat Jul 10 2021 Jens Petersen - 2.2.3-1 - fix ghc_fix_doc_perms only to touch files not dirs From c796532ce56db0faae7c600438fec4a56825b097 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 01:11:08 +0000 Subject: [PATCH 473/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 2fcd6b6..9ba553a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.2.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -174,6 +174,9 @@ EOF %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 2.2.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jul 14 2021 Jens Petersen - 2.2.3-2 - drop obsoletes for haskell-platform GL graphics libraries which have been packaged and cabal-plan From 28c34c93e55b8f1ec571d59217faa457b8762524 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 17 Aug 2021 00:53:34 +0800 Subject: [PATCH 474/514] add f35 obsoletes --- ghc-rpm-macros.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9ba553a..1f20a44 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.2.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -95,6 +95,13 @@ Obsoletes: ghc-EdisonCore < 1.3.2.1-23, ghc-EdisonCore-devel < 1.3.2.1-23, Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.13.3.1-14, ghc-gtksourceview2-prof < 0.13.3.1-14 %endif Obsoletes: ghc-iwlib < 0.1.0-16, ghc-iwlib-devel < 0.1.0-16, ghc-iwlib-prof < 0.1.0-16 +%if 0%{?fedora} >= 35 +Obsoletes: pandoc-citeproc < 0.18, ghc-pandoc-citeproc < 0.18, ghc-pandoc-citeproc-devel < 0.18, ghc-pandoc-citeproc-doc < 0.18, ghc-pandoc-citeproc-prof < 0.18, pandoc-citeproc-common < 0.18 +Obsoletes: ghc-HsYAML-aeson < 0.2.0.1, ghc-HsYAML-aeson-devel < 0.2.0.1, ghc-HsYAML-aeson-doc < 0.2.0.1, ghc-HsYAML-aeson-prof < 0.2.0.1 +Obsoletes: ghc-chalmers-lava2000 < 1.6.2, ghc-chalmers-lava2000-devel < 1.6.2, ghc-chalmers-lava2000-doc < 1.6.2, ghc-chalmers-lava2000-prof < 1.6.2 +Obsoletes: ghc-codec-rpm < 0.2.3, ghc-codec-rpm-devel < 0.2.3, ghc-codec-rpm-doc < 0.2.3, ghc-codec-rpm-prof < 0.2.3 +Obsoletes: ghc-cpio-conduit < 0.7.1, ghc-cpio-conduit-devel < 0.7.1, ghc-cpio-conduit-doc < 0.7.1, ghc-cpio-conduit-prof < 0.7.1 +%endif %description -n ghc-obsoletes Meta package for obsoleting deprecated Haskell packages. @@ -174,6 +181,10 @@ EOF %changelog +* Tue Aug 17 2021 Jens Petersen - 2.2.3-4 +- F35 obsoletes for pandoc-citeproc, HsYAML-aeson, chalmers-lava2000, + cpio-conduit, and codec-rpm + * Thu Jul 22 2021 Fedora Release Engineering - 2.2.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From bb8b4e4972ab6ac1df15227dbf2042b78dfa3252 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 23 Aug 2021 01:14:38 +0800 Subject: [PATCH 475/514] add F35 obsoletes for base-noprelude and failure --- ghc-rpm-macros.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1f20a44..9674309 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.2.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -97,10 +97,12 @@ Obsoletes: ghc-gtksourceview2 < 0.13.3.1-14, ghc-gtksourceview2-devel < 0.1 Obsoletes: ghc-iwlib < 0.1.0-16, ghc-iwlib-devel < 0.1.0-16, ghc-iwlib-prof < 0.1.0-16 %if 0%{?fedora} >= 35 Obsoletes: pandoc-citeproc < 0.18, ghc-pandoc-citeproc < 0.18, ghc-pandoc-citeproc-devel < 0.18, ghc-pandoc-citeproc-doc < 0.18, ghc-pandoc-citeproc-prof < 0.18, pandoc-citeproc-common < 0.18 +Obsoletes: ghc-base-noprelude < 4.13.0.1, ghc-base-noprelude-devel < 4.13.0.1, ghc-base-noprelude-doc < 4.13.0.1, ghc-base-noprelude-prof < 4.13.0.1 Obsoletes: ghc-HsYAML-aeson < 0.2.0.1, ghc-HsYAML-aeson-devel < 0.2.0.1, ghc-HsYAML-aeson-doc < 0.2.0.1, ghc-HsYAML-aeson-prof < 0.2.0.1 Obsoletes: ghc-chalmers-lava2000 < 1.6.2, ghc-chalmers-lava2000-devel < 1.6.2, ghc-chalmers-lava2000-doc < 1.6.2, ghc-chalmers-lava2000-prof < 1.6.2 Obsoletes: ghc-codec-rpm < 0.2.3, ghc-codec-rpm-devel < 0.2.3, ghc-codec-rpm-doc < 0.2.3, ghc-codec-rpm-prof < 0.2.3 Obsoletes: ghc-cpio-conduit < 0.7.1, ghc-cpio-conduit-devel < 0.7.1, ghc-cpio-conduit-doc < 0.7.1, ghc-cpio-conduit-prof < 0.7.1 +Obsoletes: ghc-failure < 0.2.0.4, ghc-failure-devel < 0.2.0.4, ghc-failure-doc < 0.2.0.4, ghc-failure-prof < 0.2.0.4 %endif %description -n ghc-obsoletes @@ -181,6 +183,9 @@ EOF %changelog +* Mon Aug 23 2021 Jens Petersen - 2.2.3-5 +- add F35 obsoletes for base-noprelude and failure + * Tue Aug 17 2021 Jens Petersen - 2.2.3-4 - F35 obsoletes for pandoc-citeproc, HsYAML-aeson, chalmers-lava2000, cpio-conduit, and codec-rpm From 269ffdc10ba75025910b192e061b6b3e2a6206a9 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 23 Aug 2021 02:03:55 +0800 Subject: [PATCH 476/514] F35 obsoletes for attempt --- ghc-rpm-macros.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9674309..52d2814 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.2.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -103,6 +103,7 @@ Obsoletes: ghc-chalmers-lava2000 < 1.6.2, ghc-chalmers-lava2000-devel < 1.6 Obsoletes: ghc-codec-rpm < 0.2.3, ghc-codec-rpm-devel < 0.2.3, ghc-codec-rpm-doc < 0.2.3, ghc-codec-rpm-prof < 0.2.3 Obsoletes: ghc-cpio-conduit < 0.7.1, ghc-cpio-conduit-devel < 0.7.1, ghc-cpio-conduit-doc < 0.7.1, ghc-cpio-conduit-prof < 0.7.1 Obsoletes: ghc-failure < 0.2.0.4, ghc-failure-devel < 0.2.0.4, ghc-failure-doc < 0.2.0.4, ghc-failure-prof < 0.2.0.4 +Obsoletes: ghc-attempt < 0.4.0.2, ghc-attempt-devel < 0.4.0.2, ghc-attempt-doc < 0.4.0.2, ghc-attempt-prof < 0.4.0.2 %endif %description -n ghc-obsoletes @@ -183,6 +184,9 @@ EOF %changelog +* Mon Aug 23 2021 Jens Petersen - 2.2.3-6 +- F35 obsoletes for attempt + * Mon Aug 23 2021 Jens Petersen - 2.2.3-5 - add F35 obsoletes for base-noprelude and failure From 16df5d8f6d1eaabab921b935b9829993dce85808 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 9 Sep 2021 18:32:06 +0800 Subject: [PATCH 477/514] cabal_configure: add -fhide-source-paths to ghc-options --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 52d2814..9f678fd 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,8 +7,8 @@ %endif Name: ghc-rpm-macros -Version: 2.2.3 -Release: 6%{?dist} +Version: 2.2.4 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -184,6 +184,9 @@ EOF %changelog +* Thu Sep 9 2021 Jens Petersen - 2.2.4-1 +- cabal_configure: add -fhide-source-paths to ghc-options + * Mon Aug 23 2021 Jens Petersen - 2.2.3-6 - F35 obsoletes for attempt diff --git a/macros.ghc b/macros.ghc index 497168c..268b7c0 100644 --- a/macros.ghc +++ b/macros.ghc @@ -30,7 +30,7 @@ if ! [ -f Setup.hs -o -f Setup.lhs ]; then\ cp %{_datadir}/ghc-rpm-macros/Setup.hs .\ fi\ %cabal --version\ -%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --libexecsubdir='$pkgid' --ghc %{?_ghcdynlibdir:--dynlibdir=%{_ghcdynlibdir}} %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')} -fhide-source-paths" %{?cabal_configure_options} $cabal_configure_extra_options # install %cabal_install %cabal copy --destdir=%{buildroot} %{?cabal_install_options} From 12a6c28236791e7a130da162477eec60315c6b80 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 8 Dec 2021 19:26:00 +0800 Subject: [PATCH 478/514] drop dependency generation for rhel6 --- macros.ghc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/macros.ghc b/macros.ghc index 268b7c0..e2543cd 100644 --- a/macros.ghc +++ b/macros.ghc @@ -164,17 +164,12 @@ fi\ # install bin package %ghc_bin_install()\ -%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ -%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ %ghc_delete_rpaths\ %{nil} # ghc_lib_install [name] [version] %ghc_lib_install()\ -%{!?_fileattrsdir:%global _use_internal_dependency_generator 0}\ -%{!?_fileattrsdir:%global __find_provides %{_rpmconfigdir}/rpmdeps --provides}\ -%{!?_fileattrsdir:%global __find_requires %{_rpmconfigdir}/ghc-deps.sh %{buildroot}%{ghclibdir}}\ %cabal_install\ %cabal_pkg_conf %{?1} %{?2}\ %ghc_gen_filelists %{?1} %{?2}\ From b3062773f5003f76a41b3a972ccdcb28cbae4438 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 8 Dec 2021 19:29:29 +0800 Subject: [PATCH 479/514] for ghcMAJOR generate ghc-VERSION-devel(pkg-ver-hash) metadata also fix lowercase typo of PKGCONFDIR which just happened to work by glob --- ghc-deps.sh | 14 +++++++++----- ghc-rpm-macros.spec | 7 ++++++- ghc.attr | 4 ++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 265614e..72372ba 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,12 +1,16 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -ne 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir}" && exit 1 +[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir} [%{?ghc_name}]" && exit 1 set +x MODE=$1 PKGBASEDIR=$2 +if [ -z "$3" -o "$3" = "ghc" ]; +then GHCPREFIX=ghc +else GHCPREFIX=$(basename $PKGBASEDIR) +fi PKGCONFDIR=$PKGBASEDIR/package.conf.d GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR" @@ -25,13 +29,13 @@ for i in $files; do meta="" case $i in # exclude rts.conf - $pkgconfdir/*-*.conf) + $PKGCONFDIR/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") ids=$($GHC_PKG field $name $field | sed -e "s/ rts\b//" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;; - *-*) echo "ghc-devel($d)" ;; + *-*) echo "$GHCPREFIX-devel($d)" ;; *) ;; esac done @@ -45,11 +49,11 @@ for i in $files; do *-*) case $field in id) - echo "ghc-prof($d)" + echo "$GHCPREFIX-prof($d)" ;; *) if [ -f /usr/lib*/ghc-*/*/libHS${d}_p.a -o -f $PKGBASEDIR/*/libHS${d}_p.a ]; then - echo "ghc-prof($d)" + echo "$GHCPREFIX-prof($d)" fi ;; esac diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9f678fd..73bfd97 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.2.4 +Version: 2.3.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,8 +184,13 @@ EOF %changelog +* Wed Dec 8 2021 Jens Petersen - 2.3.0-1 +- support fileattrs dependency generation for ghc9.2 +- drop dependency generation for rhel6 + * Thu Sep 9 2021 Jens Petersen - 2.2.4-1 - cabal_configure: add -fhide-source-paths to ghc-options + (works for ghc-8.2 and above) * Mon Aug 23 2021 Jens Petersen - 2.2.3-6 - F35 obsoletes for attempt diff --git a/ghc.attr b/ghc.attr index 94bd957..5626da0 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ -%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} -%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %{?ghc_name} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} %{?ghc_name} %__ghc_path ^%{ghclibdir}/(.*/libHS.*_p\.a|package.conf.d/.*\.conf)$ From 3f7e41039a835aba48894c0c663bf97871ceb49f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 17 Dec 2021 18:11:29 +0800 Subject: [PATCH 480/514] ghc_gen_filelists: support ghc Hadrian install --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 14 ++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 73bfd97..73af020 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.0 +Version: 2.3.1 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Fri Dec 17 2021 Jens Petersen - 2.3.1-1 +- ghc_gen_filelists: support ghc Hadrian install + * Wed Dec 8 2021 Jens Petersen - 2.3.0-1 - support fileattrs dependency generation for ghc9.2 - drop dependency generation for rhel6 diff --git a/macros.ghc b/macros.ghc index e2543cd..e18da4e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -70,8 +70,10 @@ fi\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ -if [ -z "$(ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ -echo '%{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf not found'\ +%define ghcliblib %{ghclibdir}%{?with_hadrian:/lib}\ +%define ghclibplatform %{ghcliblib}%{?with_hadrian:/%{_arch}-linux-ghc-%{ghc_version}}\ +if [ -z "$(ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ +echo '%{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ fi\ rm -f %{basepkg}.files %{basepkg}-doc.files\ @@ -81,21 +83,21 @@ for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ done\ %endif\ -for i in %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\ +for i in %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\ if [ -x "$i" ]; then\ echo $i >> %{basepkg}.files\ else\ -echo 'Warning: %{buildroot}%{_ghcdynlibdir}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\ +echo 'Warning: %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so not found'\ fi\ done\ -pkgdir="%{ghclibdir}/%{pkgnamever}"\ +pkgdir="%{ghclibplatform}/%{pkgnamever}"\ if [ -d "%{buildroot}${pkgdir}" ]; then\ find %{buildroot}${pkgdir} -type d -fprintf %{basepkg}-devel.files '%%%%dir %p\\n' -o \\( -name '*.p_hi' -o -name 'libHS*_p.a' \\) -fprint %{basepkg}-prof.files -o -fprint %{basepkg}-devel.files\ else\ rm -f %{basepkg}-devel.files %{basepkg}-prof.files\ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ -ls %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ +ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ %if %{with haddock}\ if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\ echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ From 839272fa3a8f20b13c78b81ee2ec8e463776ae77 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 18 Dec 2021 23:26:44 +0800 Subject: [PATCH 481/514] Cabal uses ppc64 in paths instead of ppc64le --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 10 +++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 73af020..e1c7a34 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.1 +Version: 2.3.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Sat Dec 18 2021 Jens Petersen - 2.3.2-1 +- Cabal uses ppc64 in paths for ppc64le + * Fri Dec 17 2021 Jens Petersen - 2.3.1-1 - ghc_gen_filelists: support ghc Hadrian install diff --git a/macros.ghc b/macros.ghc index e18da4e..7c94045 100644 --- a/macros.ghc +++ b/macros.ghc @@ -64,6 +64,14 @@ fi\ %_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} +# needed for Cabal ppc64le +%ghc_arch\ +%ifarch ppc64le\ +ppc64\ +%else\ +%{_arch}\ +%endif + # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ @@ -71,7 +79,7 @@ fi\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ %define ghcliblib %{ghclibdir}%{?with_hadrian:/lib}\ -%define ghclibplatform %{ghcliblib}%{?with_hadrian:/%{_arch}-linux-ghc-%{ghc_version}}\ +%define ghclibplatform %{ghcliblib}%{?with_hadrian:/%{ghc_arch}-linux-ghc-%{ghc_version}}\ if [ -z "$(ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ echo '%{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ From ac98514a64151053620ad81cf24d40a6faff8de3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 18 Dec 2021 23:29:58 +0800 Subject: [PATCH 482/514] use ghcliblib/ghclibplatform paths for Hadrian dependency generation --- ghc-deps.sh | 6 +++--- ghc-pkg-wrapper | 7 +++++-- ghc-rpm-macros.spec | 1 + ghc.attr | 6 +++--- macros.ghc | 10 +++++----- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 72372ba..6441103 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,15 +1,15 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir} [%{?ghc_name}]" && exit 1 +[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghcliblib} [%{?ghc_name}]" && exit 1 set +x MODE=$1 PKGBASEDIR=$2 -if [ -z "$3" -o "$3" = "ghc" ]; +if [ -z "$3" ]; then GHCPREFIX=ghc -else GHCPREFIX=$(basename $PKGBASEDIR) +else GHCPREFIX=$3 fi PKGCONFDIR=$PKGBASEDIR/package.conf.d diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index ca6a32d..df48093 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -1,13 +1,16 @@ #!/bin/sh -[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1 +[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghcliblib} ..." && exit 1 set +x PKGBASEDIR=$1 shift PKGCONFDIR=$PKGBASEDIR/package.conf.d -GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) +case $(basename "$PKGBASEDIR") in + lib) GHC_VER=$(basename $(dirname $PKGBASEDIR) | sed -e s/ghc-//) ;; + *) GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) ;; +esac # for a ghc build use the new ghc-pkg INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index e1c7a34..d220153 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -186,6 +186,7 @@ EOF %changelog * Sat Dec 18 2021 Jens Petersen - 2.3.2-1 - Cabal uses ppc64 in paths for ppc64le +- fix ghc-deps.sh dependency generation for Hadrian * Fri Dec 17 2021 Jens Petersen - 2.3.1-1 - ghc_gen_filelists: support ghc Hadrian install diff --git a/ghc.attr b/ghc.attr index 5626da0..b5f080f 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ -%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %{?ghc_name} -%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} %{?ghc_name} -%__ghc_path ^%{ghclibdir}/(.*/libHS.*_p\.a|package.conf.d/.*\.conf)$ +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghcliblib} %{?ghc_name:ghc-%{ghc_version}} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghcliblib} %{?ghc_name:ghc-%{ghc_version}} +%__ghc_path ^(%{ghcliblib}/package.conf.d/.*\.conf|%{ghclibplatform}/.*/libHS.*_p\.a)$ diff --git a/macros.ghc b/macros.ghc index 7c94045..21832d8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -128,10 +128,10 @@ done\ if [ -d %{pkgnamever}.conf ]; then\ for i in $(ls "%{pkgnamever}.conf/"); do\ sub=$(echo $i | sed -e "s/^[0-9]\\+-//")\ -install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghclibdir}/package.conf.d/${sub}.conf\ +install -D --mode=0644 %{pkgnamever}.conf/${i} %{buildroot}%{ghcliblib}/package.conf.d/${sub}.conf\ done\ else\ -install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\ +install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}.conf\ fi\ %{nil} @@ -214,11 +214,11 @@ for lib in %*; do\ *$PWD/$lib/dist/build*)\ case %{ghc_version} in\ 7.10.*)\ - pkgid=$(cd %{buildroot}%{ghclibdir}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $pkgid library-dirs) ;;\ + pkgid=$(cd %{buildroot}%{ghcliblib}/package.conf.d; ls ${lib}* | sed -e "s/.conf$//")\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghcliblib} --global --package-db=%{buildroot}%{ghcliblib}/package.conf.d field $pkgid library-dirs) ;;\ 8.0)\ pkgid=$(cd %{buildroot}%{ghclibdir}; echo ${lib}*)\ - syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghclibdir} --global --package-db=%{buildroot}%{ghclibdir}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ + syspath=$(%{_rpmconfigdir}/ghc-pkg-wrapper %{buildroot}%{ghcliblib} --global --package-db=%{buildroot}%{ghcliblib}/package.conf.d field $lib library-dirs | grep $pkgid) ;;\ *)\ syspath="" ;;\ esac\ From 430af17a2ca983e57a7105286f8c4cc980e2a25c Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 19 Dec 2021 01:28:18 +0800 Subject: [PATCH 483/514] define %ghcliblib and %ghclibplatform globally --- ghc-rpm-macros.spec | 3 ++- macros.ghc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index d220153..a8cb807 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -185,8 +185,9 @@ EOF %changelog * Sat Dec 18 2021 Jens Petersen - 2.3.2-1 -- Cabal uses ppc64 in paths for ppc64le +- define ghcliblib and ghclibplatform globally - fix ghc-deps.sh dependency generation for Hadrian +- Cabal uses ppc64 in paths for ppc64le * Fri Dec 17 2021 Jens Petersen - 2.3.1-1 - ghc_gen_filelists: support ghc Hadrian install diff --git a/macros.ghc b/macros.ghc index 21832d8..a88cbbb 100644 --- a/macros.ghc +++ b/macros.ghc @@ -72,14 +72,16 @@ ppc64\ %{_arch}\ %endif +%ghcliblib %{ghclibdir}%{?with_hadrian:/lib} + +%ghclibplatform %{ghcliblib}%{?with_hadrian:/%{ghc_arch}-linux-ghc-%{ghc_version}} + # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ %define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ -%define ghcliblib %{ghclibdir}%{?with_hadrian:/lib}\ -%define ghclibplatform %{ghcliblib}%{?with_hadrian:/%{ghc_arch}-linux-ghc-%{ghc_version}}\ if [ -z "$(ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ echo '%{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ From 8b135f0a25f1802fadf71f98685f635b0476bcb2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 19 Dec 2021 10:05:10 +0800 Subject: [PATCH 484/514] fixup ghc_arch renaming it to Cabal_arch --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 9 ++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index a8cb807..f1adbaf 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.2 +Version: 2.3.3 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Sun Dec 19 2021 Jens Petersen - 2.3.3-1 +- fixup ghc_arch renaming it to Cabal_arch + * Sat Dec 18 2021 Jens Petersen - 2.3.2-1 - define ghcliblib and ghclibplatform globally - fix ghc-deps.sh dependency generation for Hadrian diff --git a/macros.ghc b/macros.ghc index a88cbbb..9e13dfb 100644 --- a/macros.ghc +++ b/macros.ghc @@ -65,16 +65,11 @@ fi\ %_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} # needed for Cabal ppc64le -%ghc_arch\ -%ifarch ppc64le\ -ppc64\ -%else\ -%{_arch}\ -%endif +%Cabal_arch %(arch | sed -e "s/ppc64le/ppc64/") %ghcliblib %{ghclibdir}%{?with_hadrian:/lib} -%ghclibplatform %{ghcliblib}%{?with_hadrian:/%{ghc_arch}-linux-ghc-%{ghc_version}} +%ghclibplatform %{ghcliblib}%{?with_hadrian:/%{Cabal_arch}-linux-ghc-%{ghc_version}} # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ From f75a976e04277e50b0376dad48d472f452a335cd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 19 Dec 2021 10:47:11 +0800 Subject: [PATCH 485/514] move Cabal_arch into ghclibplatform macro --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f1adbaf..b94d01d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.3 +Version: 2.3.4 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Sun Dec 19 2021 Jens Petersen - 2.3.4-1 +- move Cabal_arch into ghclibplatform macro + * Sun Dec 19 2021 Jens Petersen - 2.3.3-1 - fixup ghc_arch renaming it to Cabal_arch diff --git a/macros.ghc b/macros.ghc index 9e13dfb..03ab170 100644 --- a/macros.ghc +++ b/macros.ghc @@ -64,12 +64,9 @@ fi\ %_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} -# needed for Cabal ppc64le -%Cabal_arch %(arch | sed -e "s/ppc64le/ppc64/") - %ghcliblib %{ghclibdir}%{?with_hadrian:/lib} -%ghclibplatform %{ghcliblib}%{?with_hadrian:/%{Cabal_arch}-linux-ghc-%{ghc_version}} +%ghclibplatform %{ghcliblib}%{?with_hadrian:/%(arch | sed -e "s/ppc64le/ppc64/")-linux-ghc-%{ghc_version}} # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ From f8ff148f186be20b2abda68c7b4e290ebe549fc5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 19 Dec 2021 15:01:25 +0800 Subject: [PATCH 486/514] Hadrian haddock dirs are not versioned --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b94d01d..99115e9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.4 +Version: 2.3.5 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Sun Dec 19 2021 Jens Petersen - 2.3.5-1 +- Hadrian haddock dirs are not versioned + * Sun Dec 19 2021 Jens Petersen - 2.3.4-1 - move Cabal_arch into ghclibplatform macro diff --git a/macros.ghc b/macros.ghc index 03ab170..982c208 100644 --- a/macros.ghc +++ b/macros.ghc @@ -101,8 +101,9 @@ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ %if %{with haddock}\ -if [ -d %{buildroot}%{ghc_html_libraries_dir}/%{pkgnamever} ]; then\ -echo %{ghc_html_libraries_dir}/%{pkgnamever} >> %{basepkg}-doc.files\ +haddock_dir=%{ghc_html_libraries_dir}/%{?with_hadrian:%pkgname}%{!?with_hadrian:%pkgnamever}\ +if [ -d %{buildroot}$haddock_dir ]; then\ +echo $haddock_dir >> %{basepkg}-doc.files\ fi\ %endif\ for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\ From f5f72c49ec62eabd52f97a26a8528877c047edbc Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 20 Dec 2021 00:56:20 +0800 Subject: [PATCH 487/514] %ghc_pkg_recache is not deprecated --- macros.ghc | 1 - 1 file changed, 1 deletion(-) diff --git a/macros.ghc b/macros.ghc index 982c208..84ff039 100644 --- a/macros.ghc +++ b/macros.ghc @@ -236,7 +236,6 @@ done\ done\ %endif -# deprecated for f31 %ghc_pkg_recache %{_bindir}/ghc-pkg-%{ghc_version} recache --no-user-package-db || : # skip prof libs and documentation From 5136c98a2f22255813b542a30ce4492b0a1f6750 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 20 Dec 2021 01:21:45 +0800 Subject: [PATCH 488/514] fix Hadrian ghc dependency generation --- ghc-deps.sh | 11 ++++++++--- ghc-pkg-wrapper | 29 ++++++++--------------------- ghc-rpm-macros.spec | 5 ++++- ghc.attr | 4 ++-- 4 files changed, 22 insertions(+), 27 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 6441103..9a104b0 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,7 +1,7 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghcliblib} [%{?ghc_name}]" && exit 1 +[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir} [%{?ghc_name}]" && exit 1 set +x @@ -11,7 +11,12 @@ if [ -z "$3" ]; then GHCPREFIX=ghc else GHCPREFIX=$3 fi -PKGCONFDIR=$PKGBASEDIR/package.conf.d +if [ -d $PKGBASEDIR/lib ]; +then PKGBASELIB=$PKGBASEDIR/lib + LIB=lib/ +else PKGBASELIB=$PKGBASEDIR +fi +PKGCONFDIR=$PKGBASELIB/package.conf.d GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR" @@ -52,7 +57,7 @@ for i in $files; do echo "$GHCPREFIX-prof($d)" ;; *) - if [ -f /usr/lib*/ghc-*/*/libHS${d}_p.a -o -f $PKGBASEDIR/*/libHS${d}_p.a ]; then + if [ -f /usr/lib*/ghc-*/$LIB*/libHS${d}_p.a -o -f $PKGBASELIB/*/libHS${d}_p.a ]; then echo "$GHCPREFIX-prof($d)" fi ;; diff --git a/ghc-pkg-wrapper b/ghc-pkg-wrapper index df48093..98566a8 100755 --- a/ghc-pkg-wrapper +++ b/ghc-pkg-wrapper @@ -1,34 +1,21 @@ #!/bin/sh -[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghcliblib} ..." && exit 1 +[ $# -lt 1 ] && echo "Usage: `basename $0` %{buildroot}%{ghclibdir} ..." && exit 1 set +x PKGBASEDIR=$1 shift -PKGCONFDIR=$PKGBASEDIR/package.conf.d -case $(basename "$PKGBASEDIR") in - lib) GHC_VER=$(basename $(dirname $PKGBASEDIR) | sed -e s/ghc-//) ;; - *) GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) ;; -esac +if [ -d $PKGBASEDIR/lib ]; +then PKGCONFDIR=$PKGBASEDIR/lib/package.conf.d +else PKGCONFDIR=$PKGBASEDIR/package.conf.d +fi # for a ghc build use the new ghc-pkg -INPLACE_GHCPKG=$PKGBASEDIR/../../bin/ghc-pkg-$GHC_VER - -if [ -x "$INPLACE_GHCPKG" ]; then - case $GHC_VER in - 7.4.*) - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-conf=$PKGCONFDIR" - ;; - 7.6.*) - GHC_PKG="$PKGBASEDIR/ghc-pkg --global-package-db=$PKGCONFDIR" - ;; - # 7.8 and 7.10 - *) - GHC_PKG="env LD_LIBRARY_PATH=$(dirname $PKGBASEDIR) $PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" - ;; - esac +if [ -x "$PKGBASEDIR/bin/ghc-pkg" ]; then + GHC_PKG="env LD_LIBRARY_PATH=$(dirname $PKGBASEDIR) $PKGBASEDIR/bin/ghc-pkg --global-package-db=$PKGCONFDIR" else + GHC_VER=$(basename $PKGBASEDIR | sed -e s/ghc-//) GHC_PKG="/usr/bin/ghc-pkg-${GHC_VER} -f $PKGCONFDIR" fi diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 99115e9..9665280 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.5 +Version: 2.3.6 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Mon Dec 20 2021 Jens Petersen - 2.3.6-1 +- fix missing Hadrian ghc dependency generation + * Sun Dec 19 2021 Jens Petersen - 2.3.5-1 - Hadrian haddock dirs are not versioned diff --git a/ghc.attr b/ghc.attr index b5f080f..8e62be6 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ -%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghcliblib} %{?ghc_name:ghc-%{ghc_version}} -%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghcliblib} %{?ghc_name:ghc-%{ghc_version}} +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %{?ghc_name:ghc-%{ghc_version}} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} %{?ghc_name:ghc-%{ghc_version}} %__ghc_path ^(%{ghcliblib}/package.conf.d/.*\.conf|%{ghclibplatform}/.*/libHS.*_p\.a)$ From ad76ca4d4c74f241053f526c157ab7ea08cbf9f5 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 20 Dec 2021 03:05:20 +0800 Subject: [PATCH 489/514] ghclibplatform: Cabal calls i686 as i386 --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9665280..201de12 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.6 +Version: 2.3.7 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Mon Dec 20 2021 Jens Petersen - 2.3.7-1 +- ghclibplatform: Cabal uses i386 for i686 + * Mon Dec 20 2021 Jens Petersen - 2.3.6-1 - fix missing Hadrian ghc dependency generation diff --git a/macros.ghc b/macros.ghc index 84ff039..c185808 100644 --- a/macros.ghc +++ b/macros.ghc @@ -66,7 +66,8 @@ fi\ %ghcliblib %{ghclibdir}%{?with_hadrian:/lib} -%ghclibplatform %{ghcliblib}%{?with_hadrian:/%(arch | sed -e "s/ppc64le/ppc64/")-linux-ghc-%{ghc_version}} +# Cabal has specific arch names +%ghclibplatform %{ghcliblib}%{?with_hadrian:/%(arch | sed -e "s/ppc64le/ppc64/" -e "s/i686/i386/")-linux-ghc-%{ghc_version}} # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ From 400c1175509d86b432972eaec09e76f82198820b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 20 Dec 2021 13:45:07 +0800 Subject: [PATCH 490/514] _arch fits Cabal better for ghclibplatform --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 201de12..04b1109 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.7 +Version: 2.3.8 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Mon Dec 20 2021 Jens Petersen - 2.3.8-1 +- _arch fits Cabal better for ghclibplatform + * Mon Dec 20 2021 Jens Petersen - 2.3.7-1 - ghclibplatform: Cabal uses i386 for i686 diff --git a/macros.ghc b/macros.ghc index c185808..dc91a70 100644 --- a/macros.ghc +++ b/macros.ghc @@ -67,7 +67,7 @@ fi\ %ghcliblib %{ghclibdir}%{?with_hadrian:/lib} # Cabal has specific arch names -%ghclibplatform %{ghcliblib}%{?with_hadrian:/%(arch | sed -e "s/ppc64le/ppc64/" -e "s/i686/i386/")-linux-ghc-%{ghc_version}} +%ghclibplatform %{ghcliblib}%{?with_hadrian:/%(echo %{_arch} | sed -e "s/ppc64le/ppc64/")-linux-ghc-%{ghc_version}} # ghc_gen_filelists [name] [version] %ghc_gen_filelists()\ From 9e7ffdac88f9607a97dc975cd67f7ee0af403518 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 20 Dec 2021 14:23:29 +0800 Subject: [PATCH 491/514] ghc-deps.sh: only exclude unversioned rts.conf - Hadrian's rts.conf is versioned - bin-package-db disappeared in ghc7 This change prevents: nothing provides ghc-9.2.1-devel(ghc-prim-0.8.0-1.0.2) needed by ghc9.2-base-devel-4.16.0.0-2.fc36.x86_64 --- ghc-deps.sh | 2 +- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 9a104b0..ffd0d10 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -36,7 +36,7 @@ for i in $files; do # exclude rts.conf $PKGCONFDIR/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($GHC_PKG field $name $field | sed -e "s/ rts\b//" -e "s/bin-package-db-[^ ]\+//") + ids=$($GHC_PKG field $name $field | sed -e "s/ rts[^-]//") for d in $ids; do case $d in *-*-internal) ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 04b1109..35205d1 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.8 +Version: 2.3.9 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Mon Dec 20 2021 Jens Petersen - 2.3.9-1 +- ghc-deps.sh: only exclude unversioned rts.conf + * Mon Dec 20 2021 Jens Petersen - 2.3.8-1 - _arch fits Cabal better for ghclibplatform From 6a30ca822bed716b4be7ffe659d9a0be7137bd07 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 29 Dec 2021 10:15:58 +0800 Subject: [PATCH 492/514] put docs/haddocks under %ghc_name if defined --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 35205d1..ce65fbc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.9 +Version: 2.3.10 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Wed Dec 29 2021 Jens Petersen - 2.3.10-1 +- ghc_html_dir: use ghc_name for ghcX.Y docs + * Mon Dec 20 2021 Jens Petersen - 2.3.9-1 - ghc-deps.sh: only exclude unversioned rts.conf diff --git a/macros.ghc b/macros.ghc index dc91a70..ccc4b1a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -45,7 +45,7 @@ fi\ %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} # root dir for ghc docs (used by ghc.spec) -%ghc_html_dir %{_docdir}/ghc/html +%ghc_html_dir %{_docdir}/%{?ghc_name}%{!?ghc_name:ghc}/html # deprecates %ghcdocbasedir %ghc_html_dir From bff7a5f6ac9f2ccf18a48610370d0e29b9141a1a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 5 Jan 2022 14:48:09 +0800 Subject: [PATCH 493/514] ghc-deps.sh: fix the rts deps erasure cleanly was breaking ghc-ghci-devel deps: ghc*-devel(ghc-heap-8.10.7template-haskell-2.16.0.0) for non-Hadrian --- ghc-deps.sh | 4 ++-- ghc-rpm-macros.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index ffd0d10..0f215fe 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -36,7 +36,7 @@ for i in $files; do # exclude rts.conf $PKGCONFDIR/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($GHC_PKG field $name $field | sed -e "s/ rts[^-]//") + ids=$($GHC_PKG field $name $field | sed -e "s/ rts / /") for d in $ids; do case $d in *-*-internal) ;; @@ -47,7 +47,7 @@ for i in $files; do ;; */libHS*_p.a) pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/ rts\b//" -e "s/bin-package-db-[^ ]\+//") + ids=$($GHC_PKG field $pkgver $field | sed -e "s/ rts / /" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index ce65fbc..5e99c53 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.10 +Version: 2.3.11 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Wed Jan 5 2022 Jens Petersen - 2.3.11-1 +- ghc-deps.sh: fix the rts deps erasure cleanly + * Wed Dec 29 2021 Jens Petersen - 2.3.10-1 - ghc_html_dir: use ghc_name for ghcX.Y docs From 6bd72629563cf6bed74ec220a1a4b034fbed8f63 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 5 Jan 2022 15:03:51 +0800 Subject: [PATCH 494/514] ghc-deps.sh: also match 'rts' if first, last, or only output --- ghc-deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 0f215fe..dce4e65 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -36,7 +36,7 @@ for i in $files; do # exclude rts.conf $PKGCONFDIR/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($GHC_PKG field $name $field | sed -e "s/ rts / /") + ids=$($GHC_PKG field $name $field | sed -e "s/\(^\| \)rts\( \|$\)/ /") for d in $ids; do case $d in *-*-internal) ;; @@ -47,7 +47,7 @@ for i in $files; do ;; */libHS*_p.a) pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/ rts / /" -e "s/bin-package-db-[^ ]\+//") + ids=$($GHC_PKG field $pkgver $field | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;; From db4b6534d48acff9dbc93dd648daffb4f03f6377 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 05:28:00 +0000 Subject: [PATCH 495/514] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 5e99c53..4802b92 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.3.11 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -184,6 +184,9 @@ EOF %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 2.3.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jan 5 2022 Jens Petersen - 2.3.11-1 - ghc-deps.sh: fix the rts deps erasure cleanly From 22d34de16e18a692f6672c121dd7b481238ed7fd Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 21 Jan 2022 22:10:52 +0800 Subject: [PATCH 496/514] disable package notes, which break all Haskell packages (#2043092) occurred during F36 mass rebuild --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4802b92..1db2df6 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,8 +7,8 @@ %endif Name: ghc-rpm-macros -Version: 2.3.11 -Release: 2%{?dist} +Version: 2.3.12 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -184,6 +184,9 @@ EOF %changelog +* Fri Jan 21 2022 Jens Petersen - 2.3.12-1 +- disable package notes since breaks all Haskell packages (#2043092) + * Thu Jan 20 2022 Fedora Release Engineering - 2.3.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index ccc4b1a..a6c20e5 100644 --- a/macros.ghc +++ b/macros.ghc @@ -19,6 +19,7 @@ CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-se CFLAGS="${CFLAGS:-%optflags}"\ %endif\ export CFLAGS\ +%undefine _package_note_flags\ %global _hardened_ldflags %{nil}\ export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"\ %{nil} From 9a341be0e168a091ce6c87231b22ed4802e4d462 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 8 Feb 2022 13:27:43 +0800 Subject: [PATCH 497/514] ghc_set_gcc_flags disable _lto_cflags for all archs --- ghc-rpm-macros.spec | 10 ++++++++-- macros.ghc | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1db2df6..6b23f8d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.12 +Version: 2.3.13 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,8 +184,14 @@ EOF %changelog +* Tue Feb 8 2022 Jens Petersen - 2.3.13-1 +- ghc_set_gcc_flags: disable _lto_cflags for all archs + to address missing symbol linking errors across packages + (particularly those using FFI) + * Fri Jan 21 2022 Jens Petersen - 2.3.12-1 -- disable package notes since breaks all Haskell packages (#2043092) +- disable package notes which broke all Haskell package builds (#2043092) + https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects * Thu Jan 20 2022 Fedora Release Engineering - 2.3.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index a6c20e5..370c48c 100644 --- a/macros.ghc +++ b/macros.ghc @@ -11,9 +11,9 @@ LANG=C.utf8\ %ghc_set_gcc_flags\ +%global _lto_cflags %{nil}\ # -Wunused-label is extremely noisy\ %ifarch s390x\ -%define _lto_cflags %{nil}\ CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ %else\ CFLAGS="${CFLAGS:-%optflags}"\ From b47d44f0861248282d1cd923d3abf80cd638d079 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 12 Feb 2022 14:13:10 +0800 Subject: [PATCH 498/514] %ghc_set_gcc_flags: always sed CFLAGS whether pre-set or not Needed for F36 https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck --- ghc-rpm-macros.spec | 6 +++++- macros.ghc | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6b23f8d..03b7a66 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.13 +Version: 2.3.14 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,10 @@ EOF %changelog +* Sat Feb 12 2022 Jens Petersen - 2.3.14-1 +- ghc_set_gcc_flags: also sed CFLAGS when preset in F36 + because of https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck + * Tue Feb 8 2022 Jens Petersen - 2.3.13-1 - ghc_set_gcc_flags: disable _lto_cflags for all archs to address missing symbol linking errors across packages diff --git a/macros.ghc b/macros.ghc index 370c48c..34ec75a 100644 --- a/macros.ghc +++ b/macros.ghc @@ -14,7 +14,7 @@ LANG=C.utf8\ %global _lto_cflags %{nil}\ # -Wunused-label is extremely noisy\ %ifarch s390x\ -CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall //' -e 's/-Werror=format-security //')}"\ +CFLAGS="$(echo ${CFLAGS:-%optflags} | sed -e 's/-Wall //' -e 's/-Werror=format-security //')"\ %else\ CFLAGS="${CFLAGS:-%optflags}"\ %endif\ From 57481f93943114ea7cf42b2b0992f4caedc5826b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 10 Mar 2022 13:13:54 +0800 Subject: [PATCH 499/514] ghc_set_gcc_flags: disable brp-strip-lto to avoid strip timestamp warnings --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 03b7a66..fbd59ef 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.14 +Version: 2.3.15 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -184,6 +184,9 @@ EOF %changelog +* Thu Mar 10 2022 Jens Petersen - 2.3.15-1 +- ghc_set_gcc_flags: disable brp-strip-lto to avoid strip timestamp warnings + * Sat Feb 12 2022 Jens Petersen - 2.3.14-1 - ghc_set_gcc_flags: also sed CFLAGS when preset in F36 because of https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck diff --git a/macros.ghc b/macros.ghc index 34ec75a..b8be433 100644 --- a/macros.ghc +++ b/macros.ghc @@ -12,6 +12,7 @@ LANG=C.utf8\ %ghc_set_gcc_flags\ %global _lto_cflags %{nil}\ +%global __brp_strip_lto %{nil}\ # -Wunused-label is extremely noisy\ %ifarch s390x\ CFLAGS="$(echo ${CFLAGS:-%optflags} | sed -e 's/-Wall //' -e 's/-Werror=format-security //')"\ From 0b9d47c300773fef70624781d315f67cd3f6c082 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 27 Apr 2022 10:54:18 +0800 Subject: [PATCH 500/514] update license and use https for subpackage url (Tim Landscheidt,#2) --- COPYING | 8 ++++---- ghc-rpm-macros.spec | 4 ++++ macros.ghc-extra | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/COPYING b/COPYING index 94a9ed0..e600086 100644 --- a/COPYING +++ b/COPYING @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. 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 . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ 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 -. +. 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 -. +. diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index fbd59ef..f03b9c8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -184,6 +184,10 @@ EOF %changelog +* Wed Apr 27 2022 Tim Landscheidt +- Update license from https://www.gnu.org/licenses/ +- Use https for subpackage URLs + * Thu Mar 10 2022 Jens Petersen - 2.3.15-1 - ghc_set_gcc_flags: disable brp-strip-lto to avoid strip timestamp warnings diff --git a/macros.ghc-extra b/macros.ghc-extra index e992ed5..2983eeb 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -21,7 +21,7 @@ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ Summary: Haskell %{pkgname} library\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ -Url: http://hackage.haskell.org/package/%{pkgname}\ +Url: https://hackage.haskell.org/package/%{pkgname}\ %{?ghc_pkg_obsoletes:Obsoletes: %(echo "%{ghc_pkg_obsoletes}" | sed -e "s/\\(%{ghc_prefix}-[^, ]*\\)-devel/\\1/g")}\ \ %description -n %{basepkg}\ From 7f9cbd873d400e8a751c7ddf813323377006933b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 27 Apr 2022 10:59:30 +0800 Subject: [PATCH 501/514] drop ghc-compiler requires to allow using ghcX.Y-compiler-default --- ghc-rpm-macros.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index f03b9c8..4e372ff 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.3.15 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -28,10 +28,9 @@ Source10: Setup.hs Source11: cabal-tweak-drop-dep Source12: cabal-tweak-remove-upperbound Requires: redhat-rpm-config -# for ghc_version -Requires: ghc-compiler +# ghc_version needs ghc-compiler or ghcX.Y-compiler-default Requires: chrpath -BuildArch: noarch +BuildArch: noarch %description A set of macros for building GHC packages following the Haskell Guidelines @@ -184,6 +183,9 @@ EOF %changelog +* Wed Apr 27 2022 Jens Petersen - 2.3.15-2 +- drop ghc-compiler requires to allow using ghcX.Y-compiler-default + * Wed Apr 27 2022 Tim Landscheidt - Update license from https://www.gnu.org/licenses/ - Use https for subpackage URLs From 051b51f30f42de12c07a0a96bf607328554df15f Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 16 May 2022 18:28:41 +0800 Subject: [PATCH 502/514] define ghc_prefix (used for ghcX.Y packaging) --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 7 +++++-- macros.ghc-extra | 7 +++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 4e372ff..81c73be 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,8 +7,8 @@ %endif Name: ghc-rpm-macros -Version: 2.3.15 -Release: 2%{?dist} +Version: 2.3.16 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -183,6 +183,9 @@ EOF %changelog +* Mon May 16 2022 Jens Petersen - 2.3.16-1 +- define ghc_prefix (used for ghcX.Y packaging) + * Wed Apr 27 2022 Jens Petersen - 2.3.15-2 - drop ghc-compiler requires to allow using ghcX.Y-compiler-default diff --git a/macros.ghc b/macros.ghc index b8be433..4f8c7cd 100644 --- a/macros.ghc +++ b/macros.ghc @@ -46,8 +46,11 @@ fi\ # no _pkgdocdir in EPEL <= 7 %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} +# library package prefix +%ghc_prefix %{?ghc_name}%{!?ghc_name:ghc} + # root dir for ghc docs (used by ghc.spec) -%ghc_html_dir %{_docdir}/%{?ghc_name}%{!?ghc_name:ghc}/html +%ghc_html_dir %{_docdir}/%{ghc_prefix}/html # deprecates %ghcdocbasedir %ghc_html_dir @@ -76,7 +79,7 @@ fi\ %define pkgname %{?1}%{!?1:%{pkg_name}}\ %define pkgver %{?2}%{!?2:%{version}}\ %define pkgnamever %{pkgname}-%{pkgver}\ -%define basepkg %{?ghc_name}%{!?ghc_name:ghc}-%{pkgname}\ +%define basepkg %{ghc_prefix}-%{pkgname}\ if [ -z "$(ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf)" ]; then\ echo '%{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf not found'\ exit 1\ diff --git a/macros.ghc-extra b/macros.ghc-extra index 2983eeb..ae447d7 100644 --- a/macros.ghc-extra +++ b/macros.ghc-extra @@ -14,7 +14,6 @@ print(string.sub(pv, string.find(pv, "[%d.]+$")))\ }}\ %global ghc_subpackages_list %{?ghc_subpackages_list} %{pkgname}-%{pkgver}\ %{!-x:%{?1:%global ghc_packages_list %{?ghc_packages_list} %{pkgname}-%{pkgver}}}\ -%define ghc_prefix %{?ghc_name}%{!?ghc_name:ghc}\ %define basepkg %{ghc_prefix}-%{pkgname}\ %if 0%{!-m:1}\ %package -n %{basepkg}\ @@ -52,8 +51,8 @@ Summary: Haskell %{pkgname} library documentation\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ BuildArch: noarch\ -Requires: ghc-filesystem\ -Supplements: (%{basepkg}-devel and ghc-doc)\ +Requires: %{ghc_prefix}-filesystem\ +Supplements: (%{basepkg}-devel and %{ghc_prefix}-doc)\ \ %description -n %{basepkg}-doc\ This package provides the Haskell %{pkgname} library documentation.\ @@ -65,7 +64,7 @@ Summary: Haskell %{pkgname} profiling library\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Requires: %{ghc_prefix}-%{pkgname}-devel%{?_isa} = %{pkgver}-%{release}\ -Supplements: (%{basepkg}-devel and ghc-prof)\ +Supplements: (%{basepkg}-devel and %{ghc_prefix}-prof)\ \ %description -n %{basepkg}-prof\ This package provides the Haskell %{pkgname} profiling library.\ From e780fd088dca2b9e154570d391de0d44ed054d31 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 8 Jun 2022 18:14:29 +0800 Subject: [PATCH 503/514] add %_ghc_doc_dir used for filesystem --- ghc-rpm-macros.spec | 2 +- macros.ghc | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 81c73be..6ae58e2 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -183,7 +183,7 @@ EOF %changelog -* Mon May 16 2022 Jens Petersen - 2.3.16-1 +* Wed Jun 8 2022 Jens Petersen - 2.3.16-1 - define ghc_prefix (used for ghcX.Y packaging) * Wed Apr 27 2022 Jens Petersen - 2.3.15-2 diff --git a/macros.ghc b/macros.ghc index 4f8c7cd..f967f60 100644 --- a/macros.ghc +++ b/macros.ghc @@ -49,8 +49,11 @@ fi\ # library package prefix %ghc_prefix %{?ghc_name}%{!?ghc_name:ghc} +# top ghcdocdir +%_ghc_doc_dir %{_docdir}/%{ghc_prefix} + # root dir for ghc docs (used by ghc.spec) -%ghc_html_dir %{_docdir}/%{ghc_prefix}/html +%ghc_html_dir %{_ghc_doc_dir}/html # deprecates %ghcdocbasedir %ghc_html_dir @@ -67,10 +70,10 @@ fi\ # top library dir %ghclibdir %{_libdir}/ghc-%{ghc_version} -%_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} - %ghcliblib %{ghclibdir}%{?with_hadrian:/lib} +%_ghclicensedir %{?_defaultlicensedir}%{!?_defaultlicensedir:%_docdir} + # Cabal has specific arch names %ghclibplatform %{ghcliblib}%{?with_hadrian:/%(echo %{_arch} | sed -e "s/ppc64le/ppc64/")-linux-ghc-%{ghc_version}} From bb41ad6f7b46ad9fd53e21670fac2fbea12e781d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 8 Jun 2022 21:01:34 +0800 Subject: [PATCH 504/514] add missing changelog entry for _ghc_doc_dir --- ghc-rpm-macros.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 6ae58e2..3df2720 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -185,6 +185,7 @@ EOF %changelog * Wed Jun 8 2022 Jens Petersen - 2.3.16-1 - define ghc_prefix (used for ghcX.Y packaging) +- add _ghc_doc_dir * Wed Apr 27 2022 Jens Petersen - 2.3.15-2 - drop ghc-compiler requires to allow using ghcX.Y-compiler-default From f6aa817b92c7512729fde97012724005056fc9a4 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Jun 2022 14:36:23 +0800 Subject: [PATCH 505/514] ghc-deps.sh: split off buildroot from the ghclibdir arg for more precise paths This allows using the ghclibdir for checking for prof libs, avoiding collisions with other ghcX.Y-*-prof files: Processing files: ghc-doctemplates-prof-0.9-7.fc37.x86_64 /usr/lib/rpm/ghc-deps.sh: line 60: [: too many arguments /usr/lib/rpm/ghc-deps.sh: line 60: [: too many arguments /usr/lib/rpm/ghc-deps.sh: line 60: [: too many arguments --- ghc-deps.sh | 18 +++++++++--------- ghc-rpm-macros.spec | 6 +++++- ghc.attr | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index dce4e65..57e2433 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,24 +1,24 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot}%{ghclibdir} [%{?ghc_name}]" && exit 1 +[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot} %{ghclibdir} [%{?ghc_name}]" && exit 1 set +x MODE=$1 -PKGBASEDIR=$2 -if [ -z "$3" ]; +BUILDROOT=$2 +PKGBASEDIR=$3 +if [ -z "$4" ]; then GHCPREFIX=ghc -else GHCPREFIX=$3 +else GHCPREFIX=$4 fi -if [ -d $PKGBASEDIR/lib ]; +if [ -d $BUILDROOT$PKGBASEDIR/lib ]; then PKGBASELIB=$PKGBASEDIR/lib - LIB=lib/ else PKGBASELIB=$PKGBASEDIR fi PKGCONFDIR=$PKGBASELIB/package.conf.d -GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $PKGBASEDIR" +GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $BUILDROOT$PKGBASEDIR" case $MODE in --provides) field=id ;; @@ -34,7 +34,7 @@ for i in $files; do meta="" case $i in # exclude rts.conf - $PKGCONFDIR/*-*.conf) + $BUILDROOT$PKGCONFDIR/*-*.conf) name=$(grep "^name: " $i | sed -e "s/name: //") ids=$($GHC_PKG field $name $field | sed -e "s/\(^\| \)rts\( \|$\)/ /") for d in $ids; do @@ -57,7 +57,7 @@ for i in $files; do echo "$GHCPREFIX-prof($d)" ;; *) - if [ -f /usr/lib*/ghc-*/$LIB*/libHS${d}_p.a -o -f $PKGBASELIB/*/libHS${d}_p.a ]; then + if [ -f $PKGBASELIB/*/libHS${d}_p.a -o -f $BUILDROOT$PKGBASELIB/*/libHS${d}_p.a ]; then echo "$GHCPREFIX-prof($d)" fi ;; diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 3df2720..b0b0ce4 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.3.16 +Version: 2.4.0 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -183,6 +183,10 @@ EOF %changelog +* Fri Jun 10 2022 Jens Petersen - 2.4.0-1 +- change ghc-deps.sh, splitting buildroot path from ghclibdir + so that the ghc version can be used more precisely + * Wed Jun 8 2022 Jens Petersen - 2.3.16-1 - define ghc_prefix (used for ghcX.Y packaging) - add _ghc_doc_dir diff --git a/ghc.attr b/ghc.attr index 8e62be6..560c331 100644 --- a/ghc.attr +++ b/ghc.attr @@ -1,3 +1,3 @@ -%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %{?ghc_name:ghc-%{ghc_version}} -%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} %{?ghc_name:ghc-%{ghc_version}} +%__ghc_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot} %{ghclibdir} %{?ghc_name:ghc-%{ghc_version}} +%__ghc_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot} %{ghclibdir} %{?ghc_name:ghc-%{ghc_version}} %__ghc_path ^(%{ghcliblib}/package.conf.d/.*\.conf|%{ghclibplatform}/.*/libHS.*_p\.a)$ From cfbb8bcbb774e4a49fcb5a5a83b7668992c39b11 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 11 Jun 2022 12:29:26 +0800 Subject: [PATCH 506/514] ghc-deps.sh: ShellCheck tweaks and sort uniq output --- ghc-deps.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ghc-deps.sh b/ghc-deps.sh index 57e2433..ee48af6 100755 --- a/ghc-deps.sh +++ b/ghc-deps.sh @@ -1,7 +1,7 @@ #!/bin/sh # find rpm provides and requires for Haskell GHC libraries -[ $# -lt 2 ] && echo "Usage: $(basename $0) [--provides|--requires] %{buildroot} %{ghclibdir} [%{?ghc_name}]" && exit 1 +[ $# -lt 2 ] && echo "Usage: $(basename "$0") [--provides|--requires] %{buildroot} %{ghclibdir} [%{?ghc_version}]" && exit 1 set +x @@ -12,7 +12,7 @@ if [ -z "$4" ]; then GHCPREFIX=ghc else GHCPREFIX=$4 fi -if [ -d $BUILDROOT$PKGBASEDIR/lib ]; +if [ -d "$BUILDROOT$PKGBASEDIR/lib" ]; then PKGBASELIB=$PKGBASEDIR/lib else PKGBASELIB=$PKGBASEDIR fi @@ -23,20 +23,20 @@ GHC_PKG="/usr/lib/rpm/ghc-pkg-wrapper $BUILDROOT$PKGBASEDIR" case $MODE in --provides) field=id ;; --requires) field=depends ;; - *) echo "$(basename $0): Need --provides or --requires" + *) echo "$(basename "$0"): Need --provides or --requires" exit 1 ;; esac files=$(cat) +( for i in $files; do - meta="" case $i in # exclude rts.conf $BUILDROOT$PKGCONFDIR/*-*.conf) - name=$(grep "^name: " $i | sed -e "s/name: //") - ids=$($GHC_PKG field $name $field | sed -e "s/\(^\| \)rts\( \|$\)/ /") + name=$(grep "^name: " "$i" | sed -e "s/name: //") + ids=$($GHC_PKG field "$name" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /") for d in $ids; do case $d in *-*-internal) ;; @@ -46,8 +46,8 @@ for i in $files; do done ;; */libHS*_p.a) - pkgver=$(basename $(dirname $i)) - ids=$($GHC_PKG field $pkgver $field | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") + pkgver=$(basename "$(dirname "$i")") + ids=$($GHC_PKG field "$pkgver" "$field" | sed -e "s/\(^\| \)rts\( \|$\)/ /" -e "s/bin-package-db-[^ ]\+//") for d in $ids; do case $d in *-*-internal) ;; @@ -57,7 +57,7 @@ for i in $files; do echo "$GHCPREFIX-prof($d)" ;; *) - if [ -f $PKGBASELIB/*/libHS${d}_p.a -o -f $BUILDROOT$PKGBASELIB/*/libHS${d}_p.a ]; then + if [ -f "$PKGBASELIB"/*/libHS"${d}"_p.a ] || [ -f "$BUILDROOT$PKGBASELIB"/*/libHS"${d}"_p.a ]; then echo "$GHCPREFIX-prof($d)" fi ;; @@ -68,3 +68,4 @@ for i in $files; do ;; esac done +) | sort | uniq From 1facb30fc06876377c1db00c798079b8beba7f01 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 17 Jul 2022 14:56:52 +0800 Subject: [PATCH 507/514] ghc_bin_build,ghc_lib_build: defining %ghc_debuginfo allows debuginfo Needed for ghcX.Y which builds hadrian using %ghc_bin_build which accidently disabled debuginfo as a side-effect, which lead to ghcX.Y-compiler .build-id file conflicts: Error: Transaction test error: file /usr/lib/.build-id/4e/f85f81abfd9c031a34af8117ab8e14fcbae536 from install of ghc9.4-compiler-9.4.0.20220623-5.fc36.x86_64 conflicts with file from package ghc9.2-compiler-9.2.3-10.fc36.x86_64 due to missing debuginfo data --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index b0b0ce4..777ab4a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.4.0 +Version: 2.4.1 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -183,6 +183,9 @@ EOF %changelog +* Sun Jul 17 2022 Jens Petersen - 2.4.1-1 +- ghc_bin_build,ghc_lib_build: use ghc_debuginfo to enable debuginfo + * Fri Jun 10 2022 Jens Petersen - 2.4.0-1 - change ghc-deps.sh, splitting buildroot path from ghclibdir so that the ghc version can be used more precisely diff --git a/macros.ghc b/macros.ghc index f967f60..0b2bc39 100644 --- a/macros.ghc +++ b/macros.ghc @@ -149,14 +149,18 @@ done\ # ghc_bin_build %ghc_bin_build\ %ghc_fix_doc_perms\ +%if %{undefined ghc_debuginfo}\ %undefine _enable_debug_packages\ +%endif\ %cabal_configure\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %ghc_fix_doc_perms\ +%if %{undefined ghc_debuginfo}\ %undefine _enable_debug_packages\ +%endif\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\ From 4f552ad804231874ea6d0d6551916b648817ca59 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 19 Jul 2022 13:57:00 +0800 Subject: [PATCH 508/514] ghc_bin_build,ghc_lib_build: define ghc_debuginfo to really enable debuginfo --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 8 ++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 777ab4a..bdccb33 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.4.1 +Version: 2.4.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -183,6 +183,9 @@ EOF %changelog +* Tue Jul 19 2022 Jens Petersen - 2.4.2-1 +- ghc_bin_build,ghc_lib_build: define ghc_debuginfo to really enable debuginfo + * Sun Jul 17 2022 Jens Petersen - 2.4.1-1 - ghc_bin_build,ghc_lib_build: use ghc_debuginfo to enable debuginfo diff --git a/macros.ghc b/macros.ghc index 0b2bc39..be19641 100644 --- a/macros.ghc +++ b/macros.ghc @@ -149,18 +149,14 @@ done\ # ghc_bin_build %ghc_bin_build\ %ghc_fix_doc_perms\ -%if %{undefined ghc_debuginfo}\ -%undefine _enable_debug_packages\ -%endif\ +%{?!ghc_debuginfo:%undefine _enable_debug_packages}\ %cabal_configure\ %cabal build %{?ghc_smp_mflags} %{?cabal_build_options} # ghc_lib_build_without_haddock [name] [version] %ghc_lib_build_without_haddock()\ %ghc_fix_doc_perms\ -%if %{undefined ghc_debuginfo}\ -%undefine _enable_debug_packages\ -%endif\ +%{?!ghc_debuginfo:%undefine _enable_debug_packages}\ %if 0%{?rhel} && 0%{?rhel} < 8\ licensedirversion=%{?2:-%2}\ %endif\ From b8cd891b7790fa12b887698926c57fb533e789ac Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 19 Jul 2022 14:53:06 +0800 Subject: [PATCH 509/514] in F37 ghc-filesystem is now a subpackage of ghc --- ghc-rpm-macros.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index bdccb33..14d8ae7 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,7 +7,7 @@ %endif Name: ghc-rpm-macros -Version: 2.4.2 +Version: 2.4.3 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -46,12 +46,14 @@ Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. +%if 0%{?fedora} < 37 %package -n ghc-filesystem Summary: Shared directories for Haskell documentation %description -n ghc-filesystem This package provides some common directories used for Haskell libraries documentation. +%endif # ideally packages should be obsoleted by some relevant package @@ -139,7 +141,9 @@ install -p -D -m 0755 %{SOURCE11} %{buildroot}%{_bindir}/cabal-tweak-drop-dep install -p -D -m 0755 %{SOURCE12} %{buildroot}%{_bindir}/cabal-tweak-remove-upperbound install -p -D -m 0755 %{SOURCE8} %{buildroot}%{_prefix}/lib/rpm/ghc-pkg-wrapper +%if 0%{?fedora} < 37 mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries +%endif %if 0%{?rhel} && 0%{?rhel} < 7 cat >> %{buildroot}%{_prefix}/lib/rpm/ghc-deps.sh <= 29 @@ -183,6 +190,9 @@ EOF %changelog +* Tue Jul 19 2022 Jens Petersen - 2.4.3-1 +- in F37 ghc-filesystem is now a subpackage of ghc + * Tue Jul 19 2022 Jens Petersen - 2.4.2-1 - ghc_bin_build,ghc_lib_build: define ghc_debuginfo to really enable debuginfo From 0fd2441bc1d449177339fdc204b61b8c46a65fdf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 05:43:26 +0000 Subject: [PATCH 510/514] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ghc-rpm-macros.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 14d8ae7..c3c93f9 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -8,7 +8,7 @@ Name: ghc-rpm-macros Version: 2.4.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -190,6 +190,9 @@ EOF %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 2.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Jul 19 2022 Jens Petersen - 2.4.3-1 - in F37 ghc-filesystem is now a subpackage of ghc From b6ba7540fe261409c12fce2fa59cd00c95e2c994 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 26 Jul 2022 18:33:57 +0800 Subject: [PATCH 511/514] %ghc_gen_filelists: check pkg licensedir exists prevents warning errors: eg for ghc9.4: ls: cannot access '~/fedora/haskell/ghc9.4/BUILDROOT/ghc9.4-9.4.0.20220721-7.fc37.x86_64/usr/share/licenses/ghc9.4-Cabal': No such file or directory etc, though not actually harmful --- ghc-rpm-macros.spec | 7 +++++-- macros.ghc | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index c3c93f9..9cc011a 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -7,8 +7,8 @@ %endif Name: ghc-rpm-macros -Version: 2.4.3 -Release: 2%{?dist} +Version: 2.4.4 +Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -190,6 +190,9 @@ EOF %changelog +* Tue Jul 26 2022 Jens Petersen - 2.4.4-1 +- ghc_gen_filelists: check pkg licensedir exists + * Thu Jul 21 2022 Fedora Release Engineering - 2.4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index be19641..7503666 100644 --- a/macros.ghc +++ b/macros.ghc @@ -90,9 +90,11 @@ fi\ rm -f %{basepkg}.files %{basepkg}-doc.files\ touch %{basepkg}.files %{basepkg}-doc.files\ %if 0%{?1:1}\ +if [ -d "%{buildroot}%{_ghclicensedir}/%{basepkg}" ]; then\ for i in $(ls %{buildroot}%{_ghclicensedir}/%{basepkg}); do\ echo "%%license %{pkgnamever}/$i" >> %{basepkg}.files\ done\ +fi\ %endif\ for i in %{buildroot}%{?_ghcdynlibdir}%{!?_ghcdynlibdir:%{ghclibplatform}}/libHS%{pkgnamever}-*ghc%{ghc_version}.so; do\ if [ -x "$i" ]; then\ From eb63b7162009df4af203af884c2aeef84434959d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 26 Jul 2022 16:03:46 +0800 Subject: [PATCH 512/514] in 9.4.1 Hadrian html docdirs are versioned again if using hadrian we also check for unversioned --- ghc-rpm-macros.spec | 1 + macros.ghc | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 9cc011a..3bcfd41 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -192,6 +192,7 @@ EOF %changelog * Tue Jul 26 2022 Jens Petersen - 2.4.4-1 - ghc_gen_filelists: check pkg licensedir exists +- in 9.4.1 Hadrian html docdirs are versioned again (breaks older Hadrian) * Thu Jul 21 2022 Fedora Release Engineering - 2.4.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/macros.ghc b/macros.ghc index 7503666..77d226b 100644 --- a/macros.ghc +++ b/macros.ghc @@ -112,9 +112,17 @@ touch %{basepkg}-devel.files %{basepkg}-prof.files\ fi\ ls %{buildroot}%{ghcliblib}/package.conf.d/%{pkgnamever}*.conf >> %{basepkg}-devel.files\ %if %{with haddock}\ -haddock_dir=%{ghc_html_libraries_dir}/%{?with_hadrian:%pkgname}%{!?with_hadrian:%pkgnamever}\ +haddock_dir=%{ghc_html_libraries_dir}/%{pkgnamever}\ if [ -d %{buildroot}$haddock_dir ]; then\ echo $haddock_dir >> %{basepkg}-doc.files\ +%if %{with hadrian}\ +# for < 9.4.1-rc1\ +else\ +haddock_dir=%{ghc_html_libraries_dir}/%{pkgname}\ +if [ -d %{buildroot}$haddock_dir ]; then\ +echo $haddock_dir >> %{basepkg}-doc.files\ +fi\ +%endif\ fi\ %endif\ for i in %{basepkg}.files %{basepkg}-devel.files %{basepkg}-doc.files %{basepkg}-prof.files; do\ From 70d2298b04ff70a09d557013de5b3525f982b45e Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sun, 31 Jul 2022 02:35:28 +0800 Subject: [PATCH 513/514] test-rebuild.sh: use rawhide branch --- tests/test-rebuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 6e2802a..06aed0d 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -28,7 +28,7 @@ if [ -f /etc/os-release ]; then else case $VERSION_ID in 7.*) BRANCH=epel7 ;; - *) BRANCH=master ;; + *) BRANCH=rawhide ;; esac fi else From 1ecba3222ddead96a494223d838859093cb11395 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 30 Oct 2023 21:53:41 +0300 Subject: [PATCH 514/514] Remove unnecessary files --- sources | 0 tests/test-rebuild.sh | 77 ------------------------------------------- 2 files changed, 77 deletions(-) delete mode 100644 sources delete mode 100755 tests/test-rebuild.sh diff --git a/sources b/sources deleted file mode 100644 index e69de29..0000000 diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh deleted file mode 100755 index 06aed0d..0000000 --- a/tests/test-rebuild.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh - -# for testing updates to ghc-rpm-macros etc -# In a pkg dir run -# $ ./test-rebuild.sh -# or clone a pkg branch: -# $ ./test-rebuild.sh [pkg] - -set -e - -PKG=${1:-$(fedpkg gimmespec | sed -e "s/.spec//")} - -[ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG - -[ -d "$PKG" ] && cd $PKG - -ARCH=$(arch) - -#if [ -d $ARCH ]; then -# echo Please move existing $ARCH/ -# exit 1 -#fi - -if [ -f /etc/os-release ]; then - eval $(grep VERSION_ID /etc/os-release) - if git branch -a | grep -q f$VERSION_ID; then - BRANCH=f$VERSION_ID - else - case $VERSION_ID in - 7.*) BRANCH=epel7 ;; - *) BRANCH=rawhide ;; - esac - fi -else -# assume RHEL6 - BRANCH=el6 -fi - -if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then - fedpkg switch-branch $BRANCH -fi - -if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then - echo "Git branch does not match Fedora installation!" - exit 1 -fi - -git pull - -if [ "$UID" != "0" ]; then - SUDO="sudo" -else - SUDO="" -fi - -echo Running dnf builddep: -$SUDO dnf builddep $PKG.spec - -fedpkg local - -VERREL=$(fedpkg verrel | sed -e "s/^$PKG-//") - -TMP=test-tmp - -mkdir -p $TMP/ - -PKGS=$(cd $ARCH; rpm -qp $(ls *-$VERREL*.rpm)) - -for i in $PKGS; do - # FIXME: should check NVR is same before building - rpm -q --quiet $i || $SUDO dnf install -q $i - for k in list requires provides scripts; do - rpm -qp --$k $ARCH/$i.rpm | grep -v rpmlib > $TMP/$i.$k.test || : - rpm -q --$k $i | grep -v rpmlib > $TMP/$i.$k.installed || : - diff -u $TMP/$i.$k.installed $TMP/$i.$k.test -I /usr/lib/.build-id || : - done -done